[PATCH] gnu: scribus: Fix build against poppler-0.86

  • Done
  • quality assurance status badge
Details
2 participants
  • Boris A. Dekshteyn
  • Marius Bakke
Owner
unassigned
Submitted by
Boris A. Dekshteyn
Severity
normal
B
B
Boris A. Dekshteyn wrote on 10 May 2020 17:35
(address . guix-patches@gnu.org)(name . Boris A. Dekshteyn)(address . boris.dekshteyn@gmail.com)
20200510153555.22994-1-boris.dekshteyn@gmail.com
* gnu/packages/scribus.scm (scribus): Fix build against poppler-0.86
* gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch: New file
* gnu/local.mk (dist_patch_DATA): Add new patch

The original series of patches authored by Craig Bradney <mrb@scribus.info>
and Jean Ghali <jghali@libertysurf.fr>, taken from
---
gnu/local.mk | 1 +
...scribus-1.5.5-poppler-0.86-build-fix.patch | 651 ++++++++++++++++++
gnu/packages/scribus.scm | 1 +
3 files changed, 653 insertions(+)
create mode 100644 gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch

Toggle diff (562 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index a7ccec5e0b..8177cd3186 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1479,6 +1479,7 @@ dist_patch_DATA = \
%D%/packages/patches/scotch-build-parallelism.patch \
%D%/packages/patches/scotch-integer-declarations.patch \
%D%/packages/patches/screen-hurd-path-max.patch \
+ %D%/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch \
%D%/packages/patches/sdl-libx11-1.6.patch \
%D%/packages/patches/seq24-rename-mutex.patch \
%D%/packages/patches/sharutils-CVE-2018-1000097.patch \
diff --git a/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch b/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch
new file mode 100644
index 0000000000..ca5d500f46
--- /dev/null
+++ b/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch
@@ -0,0 +1,651 @@
+ scribus/plugins/import/pdf/importpdf.cpp | 73 +++++++-
+ scribus/plugins/import/pdf/importpdf.h | 1 +
+ scribus/plugins/import/pdf/importpdfconfig.h | 12 ++
+ scribus/plugins/import/pdf/slaoutput.cpp | 170 +++++++++++++++++--
+ scribus/plugins/import/pdf/slaoutput.h | 15 +-
+ 5 files changed, 251 insertions(+), 20 deletions(-)
+
+diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
+index 77f076c..54ffb11 100644
+--- a/scribus/plugins/import/pdf/importpdf.cpp
++++ b/scribus/plugins/import/pdf/importpdf.cpp
+@@ -75,7 +75,11 @@ PdfPlug::PdfPlug(ScribusDoc* doc, int flags)
+ QImage PdfPlug::readThumbnail(const QString& fName)
+ {
+ QString pdfFile = QDir::toNativeSeparators(fName);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
++ globalParams.reset(new GlobalParams());
++#else
+ globalParams = new GlobalParams();
++#endif
+ if (globalParams)
+ {
+ #if defined(Q_OS_WIN32) && POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 62, 0)
+@@ -90,7 +94,9 @@ QImage PdfPlug::readThumbnail(const QString& fName)
+ if (pdfDoc->getErrorCode() == errEncrypted)
+ {
+ delete pdfDoc;
++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
+ delete globalParams;
++#endif
+ return QImage();
+ }
+ if (pdfDoc->isOk())
+@@ -134,11 +140,15 @@ QImage PdfPlug::readThumbnail(const QString& fName)
+ image.setText("YSize", QString("%1").arg(h));
+ delete dev;
+ delete pdfDoc;
++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
+ delete globalParams;
++#endif
+ return image;
+ }
+ delete pdfDoc;
++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
+ delete globalParams;
++#endif
+ }
+ }
+ return QImage();
+@@ -387,7 +397,11 @@ bool PdfPlug::convert(const QString& fn)
+ qApp->processEvents();
+ }
+
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
++ globalParams.reset(new GlobalParams());
++#else
+ globalParams = new GlobalParams();
++#endif
+ GooString *userPW = nullptr;
+ if (globalParams)
+ {
+@@ -429,7 +443,9 @@ bool PdfPlug::convert(const QString& fn)
+ if (progressDialog)
+ progressDialog->close();
+ delete pdfDoc;
++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
+ delete globalParams;
++#endif
+ return false;
+ }
+ if (progressDialog)
+@@ -474,7 +490,9 @@ bool PdfPlug::convert(const QString& fn)
+ progressDialog->close();
+ delete optImp;
+ delete pdfDoc;
++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
+ delete globalParams;
++#endif
+ return false;
+ }
+ pageString = optImp->getPagesString();
+@@ -838,11 +856,20 @@ bool PdfPlug::convert(const QString& fn)
+ names = catDict.dictLookup("OpenAction");
+ if (names.isDict())
+ {
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ std::unique_ptr<LinkAction> linkAction;
++ linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
++#else
+ LinkAction *linkAction = nullptr;
+ linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI());
++#endif
+ if (linkAction)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)linkAction;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) linkAction.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) linkAction;
++#endif
+ if (jsa->isOk())
+ {
+ QString script = UnicodeParsedString(jsa->getScript());
+@@ -908,8 +935,12 @@ bool PdfPlug::convert(const QString& fn)
+ }
+ delete pdfDoc;
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
++ globalParams.release();
++#else
+ delete globalParams;
+ globalParams = nullptr;
++#endif
+
+ // qDebug() << "converting finished";
+ // qDebug() << "Imported" << Elements.count() << "Elements";
+@@ -1046,3 +1077,43 @@ QString PdfPlug::UnicodeParsedString(POPPLER_CONST GooString *s1)
+ }
+ return result;
+ }
++
++QString PdfPlug::UnicodeParsedString(const std::string& s1)
++{
++ if (s1.length() == 0)
++ return QString();
++ GBool isUnicode;
++ int i;
++ Unicode u;
++ QString result;
++ if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) == 0xff))
++ {
++ isUnicode = gTrue;
++ i = 2;
++ result.reserve((s1.length() - 2) / 2);
++ }
++ else
++ {
++ isUnicode = gFalse;
++ i = 0;
++ result.reserve(s1.length());
++ }
++ while (i < s1.length())
++ {
++ if (isUnicode)
++ {
++ u = ((s1.at(i) & 0xff) << 8) | (s1.at(i+1) & 0xff);
++ i += 2;
++ }
++ else
++ {
++ u = s1.at(i) & 0xff;
++ ++i;
++ }
++ // #15616: imagemagick may write unicode strings incorrectly in PDF
++ if (u == 0)
++ continue;
++ result += QChar( u );
++ }
++ return result;
++}
+diff --git a/scribus/plugins/import/pdf/importpdf.h b/scribus/plugins/import/pdf/importpdf.h
+index 9dbfecc..df95bc9 100644
+--- a/scribus/plugins/import/pdf/importpdf.h
++++ b/scribus/plugins/import/pdf/importpdf.h
+@@ -82,6 +82,7 @@ private:
+ bool convert(const QString& fn);
+ QRectF getCBox(int box, int pgNum);
+ QString UnicodeParsedString(POPPLER_CONST GooString *s1);
++ QString UnicodeParsedString(const std::string& s1);
+
+ QList<PageItem*> Elements;
+ double baseX, baseY;
+diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
+index 2a13b0d..5a7e0d2 100644
+--- a/scribus/plugins/import/pdf/importpdfconfig.h
++++ b/scribus/plugins/import/pdf/importpdfconfig.h
+@@ -52,4 +52,16 @@ for which a new license (GPL+exception) is in place.
+ #define POPPLER_REF
+ #endif
+
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 82, 0)
++#define POPPLER_CONST_082 const
++#else
++#define POPPLER_CONST_082
++#endif
++
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
++#define POPPLER_CONST_083 const
++#else
++#define POPPLER_CONST_083
++#endif
++
+ #endif
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
+index 6094f3d..c5122ca 100644
+--- a/scribus/plugins/import/pdf/slaoutput.cpp
++++ b/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -308,9 +308,15 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *ano)
+ }
+
+ /* Replacement for the crippled Poppler function LinkAction* AnnotWidget::getAdditionalAction(AdditionalActionsType type) */
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++std::unique_ptr<LinkAction> SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano)
++{
++ std::unique_ptr<LinkAction> linkAction;
++#else
+ LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano)
+ {
+ LinkAction *linkAction = nullptr;
++#endif
+ Object obj;
+ Ref refa = ano->getRef();
+
+@@ -455,7 +461,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
+ POPPLER_CONST GooString *ndst = gto->getNamedDest();
+ if (ndst)
+ {
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
++#else
+ LinkDest *dstn = pdfDoc->findDest(ndst);
++#endif
+ if (dstn)
+ {
+ if (dstn->getKind() == destXYZ)
+@@ -499,7 +509,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
+ POPPLER_CONST GooString *ndst = gto->getNamedDest();
+ if (ndst)
+ {
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
++#else
+ LinkDest *dstn = pdfDoc->findDest(ndst);
++#endif
+ if (dstn)
+ {
+ if (dstn->getKind() == destXYZ)
+@@ -967,7 +981,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ POPPLER_CONST GooString *ndst = gto->getNamedDest();
+ if (ndst)
+ {
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
++#else
+ LinkDest *dstn = pdfDoc->findDest(ndst);
++#endif
+ if (dstn)
+ {
+ if (dstn->getKind() == destXYZ)
+@@ -1019,7 +1037,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ POPPLER_CONST GooString *ndst = gto->getNamedDest();
+ if (ndst)
+ {
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ std::unique_ptr<LinkDest> dstn = pdfDoc->findDest(ndst);
++#else
+ LinkDest *dstn = pdfDoc->findDest(ndst);
++#endif
+ if (dstn)
+ {
+ if (dstn->getKind() == destXYZ)
+@@ -1088,96 +1110,148 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ else
+ qDebug() << "Found unsupported Action of type" << Lact->getKind();
+ }
+- LinkAction *Aact = SC_getAdditionalAction("D", ano);
++ auto Aact = SC_getAdditionalAction("D", ano);
+ if (Aact)
+ {
+ if (Aact->getKind() == actionJavaScript)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+ if (jsa->isOk())
+ {
+ ite->annotation().setD_act(UnicodeParsedString(jsa->getScript()));
+ ite->annotation().setAAact(true);
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ Aact.reset();
++#else
+ Aact = nullptr;
++#endif
+ }
+ Aact = SC_getAdditionalAction("E", ano);
+ if (Aact)
+ {
+ if (Aact->getKind() == actionJavaScript)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+ if (jsa->isOk())
+ {
+ ite->annotation().setE_act(UnicodeParsedString(jsa->getScript()));
+ ite->annotation().setAAact(true);
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ Aact.reset();
++#else
+ Aact = nullptr;
++#endif
+ }
+ Aact = SC_getAdditionalAction("X", ano);
+ if (Aact)
+ {
+ if (Aact->getKind() == actionJavaScript)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+ if (jsa->isOk())
+ {
+ ite->annotation().setX_act(UnicodeParsedString(jsa->getScript()));
+ ite->annotation().setAAact(true);
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ Aact.reset();
++#else
+ Aact = nullptr;
++#endif
+ }
+ Aact = SC_getAdditionalAction("Fo", ano);
+ if (Aact)
+ {
+ if (Aact->getKind() == actionJavaScript)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+ if (jsa->isOk())
+ {
+ ite->annotation().setFo_act(UnicodeParsedString(jsa->getScript()));
+ ite->annotation().setAAact(true);
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ Aact.reset();
++#else
+ Aact = nullptr;
++#endif
+ }
+ Aact = SC_getAdditionalAction("Bl", ano);
+ if (Aact)
+ {
+ if (Aact->getKind() == actionJavaScript)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+ if (jsa->isOk())
+ {
+ ite->annotation().setBl_act(UnicodeParsedString(jsa->getScript()));
+ ite->annotation().setAAact(true);
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ Aact.reset();
++#else
+ Aact = nullptr;
++#endif
+ }
+ Aact = SC_getAdditionalAction("C", ano);
+ if (Aact)
+ {
+ if (Aact->getKind() == actionJavaScript)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+ if (jsa->isOk())
+ {
+ ite->annotation().setC_act(UnicodeParsedString(jsa->getScript()));
+ ite->annotation().setAAact(true);
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ Aact.reset();
++#else
+ Aact = nullptr;
++#endif
+ }
+ Aact = SC_getAdditionalAction("F", ano);
+ if (Aact)
+ {
+ if (Aact->getKind() == actionJavaScript)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+ if (jsa->isOk())
+ {
+ ite->annotation().setF_act(UnicodeParsedString(jsa->getScript()));
+@@ -1185,14 +1259,22 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ ite->annotation().setFormat(5);
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ Aact.reset();
++#else
+ Aact = nullptr;
++#endif
+ }
+ Aact = SC_getAdditionalAction("K", ano);
+ if (Aact)
+ {
+ if (Aact->getKind() == actionJavaScript)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+ if (jsa->isOk())
+ {
+ ite->annotation().setK_act(UnicodeParsedString(jsa->getScript()));
+@@ -1200,21 +1282,33 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ ite->annotation().setFormat(5);
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ Aact.reset();
++#else
+ Aact = nullptr;
++#endif
+ }
+ Aact = SC_getAdditionalAction("V", ano);
+ if (Aact)
+ {
+ if (Aact->getKind() == actionJavaScript)
+ {
+- LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++ LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+ if (jsa->isOk())
+ {
+ ite->annotation().setV_act(UnicodeParsedString(jsa->getScript()));
+ ite->annotation().setAAact(true);
+ }
+ }
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++ Aact.reset();
++#else
+ Aact = nullptr;
++#endif
+ }
+ }
+
+@@ -1224,6 +1318,11 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA)
+ catalog = catA;
+ pdfDoc = doc;
+ updateGUICounter = 0;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 84, 0)
++ m_fontEngine = new SplashFontEngine(true, true, true, true);
++#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 61, 0)
++ m_fontEngine = new SplashFontEngine(globalParams->getEnableFreeType(), true, true, true);
++#else
+ m_fontEngine = new SplashFontEngine(
+ #if HAVE_T1LIB_H
+ globalParams->getEnableT1lib(),
+@@ -1234,6 +1333,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA)
+ true,
+ #endif
+ true);
++#endif
+ }
+
+ void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *)
+@@ -2784,7 +2884,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, i
+ delete[] mbuffer;
+ }
+
+-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg)
++void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int* maskColors, GBool inlineImg)
+ {
+ ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
+ // qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors;
+@@ -3365,7 +3465,7 @@ err1:
+ fontsrc->unref();
+ }
+
+-void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen)
++void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, POPPLER_CONST_082 Unicode *u, int uLen)
+ {
+ double x1, y1, x2, y2;
+ int render;
+@@ -3452,7 +3552,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, doub
+ }
+ }
+
+-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen)
++GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen)
+ {
+ // qDebug() << "beginType3Char";
+ GfxFont *gfxFont;
+@@ -3705,7 +3805,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotColor *color)
+ return fNam;
+ }
+
+-QString SlaOutputDev::convertPath(GfxPath *path)
++QString SlaOutputDev::convertPath(POPPLER_CONST_083 GfxPath *path)
+ {
+ if (! path)
+ return QString();
+@@ -3715,7 +3815,7 @@ QString SlaOutputDev::convertPath(GfxPath *path)
+
+ for (int i = 0; i < path->getNumSubpaths(); ++i)
+ {
+- GfxSubpath * subpath = path->getSubpath(i);
++ POPPLER_CONST_083 GfxSubpath * subpath = path->getSubpath(i);
+ if (subpath->getNumPoints() > 0)
+ {
+ output += QString("M %1 %2").arg(subpath->getX(0)).arg(subpath->getY(0));
+@@ -3922,6 +4022,46 @@ QString SlaOutputDev::UnicodeParsedString(POPPLER_CONST GooString *s1)
+ return result;
This message was truncated. Download the full message here.
M
M
Marius Bakke wrote on 10 May 2020 23:01
(name . Boris A. Dekshteyn)(address . boris.dekshteyn@gmail.com)
87lflz1p2x.fsf@devup.no
"Boris A. Dekshteyn" <boris.dekshteyn@gmail.com> writes:

Toggle quote (4 lines)
> * gnu/packages/scribus.scm (scribus): Fix build against poppler-0.86
> * gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch: New file
> * gnu/local.mk (dist_patch_DATA): Add new patch

Thanks!

Toggle quote (4 lines)
> The original series of patches authored by Craig Bradney <mrb@scribus.info>
> and Jean Ghali <jghali@libertysurf.fr>, taken from
> https://gitweb.gentoo.org/repo/gentoo.git/tree/app-office/scribus/files

I took this comment and added it to the top of the patch file ...

Toggle quote (9 lines)
> +++ b/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch
> @@ -0,0 +1,651 @@
> + scribus/plugins/import/pdf/importpdf.cpp | 73 +++++++-
> + scribus/plugins/import/pdf/importpdf.h | 1 +
> + scribus/plugins/import/pdf/importpdfconfig.h | 12 ++
> + scribus/plugins/import/pdf/slaoutput.cpp | 170 +++++++++++++++++--
> + scribus/plugins/import/pdf/slaoutput.h | 15 +-
> + 5 files changed, 251 insertions(+), 20 deletions(-)

... here, and also removed the unnecessary diffstat and index lines.

I also adjusted the commit message slightly to adhere to the
Guix-flavored GNU ChangeLog style.

Pushed as 38b46a3e32c6827bc7255a9027c9e77d3becdff0.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl64a8YACgkQoqBt8qM6
VPp9rwf/bT75pU3Sgq61x4ItWW2gmie6k9SEz/D6sB/ddPekgNbkc65QadzO9Pa1
SA3fCvbuVgaakiLtareAa/ar55cEuzhfqZioda54iqF/WSyF9kiCB+w/crytMXC3
rvUmlav0i4HqbqWfCufP6D/PAj29OPuQVCdy2TUY55WJcdoTyFc4jeio78CFlWyH
qcF6UawXKWOI5tsCJIU1TKElB1PbYhgy4c6AxctuvZB/hbBMDhGpXCRnqqK87xuy
74JRNhi+SRUxyhiFBOj8vijUk/5M/jWHzSFZXUZGWqKTuxoBhWH9pOXhvhPWDyzp
jj1CWDhoN1gJVVwtem8TO/FAy7T6Nw==
=7sW6
-----END PGP SIGNATURE-----

Closed
?