From ae10ec441aa524bf267f9cefd4a319b44d0b8b44 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 12 Nov 2020 16:35:24 +0100 Subject: gnu: glib: Graft patch to detect changes to the installed applications. Fixes . Reported by sirgazil and others. * gnu/packages/patches/glib-appinfo-watch.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/glib.scm (glib)[replacement]: New field. (glib-with-gio-patch): New variable. (glib-with-documentation): Use 'package/inherit'. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d5a13cbdbd..2301a04d2f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1050,6 +1050,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ + %D%/packages/patches/glib-appinfo-watch.patch \ %D%/packages/patches/glib-tests-timer.patch \ %D%/packages/patches/glibc-CVE-2018-11236.patch \ %D%/packages/patches/glibc-CVE-2018-11237.patch \ -- cgit v1.2.3 From b91e0a5a14009421f9c6a62f6fc8372bed27faf2 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 16 Nov 2020 03:55:24 +0100 Subject: gnu: scribus: Update to 1.5.6. * gnu/packages/scribus.scm (scribus): Update to 1.5.6. [source]: Remove patch. [inputs]: Substitute python for python-2. * gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../scribus-1.5.5-poppler-0.86-build-fix.patch | 642 --------------------- gnu/packages/scribus.scm | 9 +- 3 files changed, 4 insertions(+), 648 deletions(-) delete mode 100644 gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 91a3295e75..bc60307094 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1593,7 +1593,6 @@ 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/seed-webkit.patch \ %D%/packages/patches/seq24-rename-mutex.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 deleted file mode 100644 index 39008cba5c..0000000000 --- a/gnu/packages/patches/scribus-1.5.5-poppler-0.86-build-fix.patch +++ /dev/null @@ -1,642 +0,0 @@ -Fix build with Poppler 0.86. - -The original series of patches authored by Craig Bradney -and Jean Ghali , taken from -https://gitweb.gentoo.org/repo/gentoo.git/tree/app-office/scribus/files - -diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp ---- 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::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 ---- 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 Elements; - double baseX, baseY; -diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h ---- 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 ---- 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 SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *ano) -+{ -+ std::unique_ptr 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 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 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 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 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; - } - -+QString SlaOutputDev::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; -+} -+ - bool SlaOutputDev::checkClip() - { - bool ret = false; -diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h ---- a/scribus/plugins/import/pdf/slaoutput.h -+++ b/scribus/plugins/import/pdf/slaoutput.h -@@ -20,6 +20,8 @@ for which a new license (GPL+exception) is in place. - #include - #include - -+#include -+ - #include "fpointarray.h" - #include "importpdfconfig.h" - #include "pageitem.h" -@@ -159,7 +161,11 @@ public: - virtual ~SlaOutputDev(); - - LinkAction* SC_getAction(AnnotWidget *ano); -+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0) -+ std::unique_ptr SC_getAdditionalAction(const char *key, AnnotWidget *ano); -+#else - LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano); -+#endif - static GBool annotations_callback(Annot *annota, void *user_data); - bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); - bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double width, double height); -@@ -229,7 +235,7 @@ public: - - //----- image drawing - void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) override; -- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) override; -+ void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int *maskColors, GBool inlineImg) override; - void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, -@@ -261,8 +267,8 @@ public: - //----- text drawing - void beginTextObject(GfxState *state) override; - void endTextObject(GfxState *state) override; -- void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) override; -- GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) override; -+ void 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*/) override; -+ GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override; - void endType3Char(GfxState * /*state*/) override; - void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override; - void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override; -@@ -282,11 +288,12 @@ private: - void getPenState(GfxState *state); - QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor *color, int *shade); - QString getAnnotationColor(const AnnotColor *color); -- QString convertPath(GfxPath *path); -+ QString convertPath(POPPLER_CONST_083 GfxPath *path); - int getBlendMode(GfxState *state); - void applyMask(PageItem *ite); - void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false); - QString UnicodeParsedString(POPPLER_CONST GooString *s1); -+ QString UnicodeParsedString(const std::string& s1); - bool checkClip(); - bool pathIsClosed; - QString CurrColorFill; diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index 6519ce7a7f..e380a2ef12 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017, 2018 Nicolas Goaziou ;;; Copyright © 2018 Clément Lassieur ;;; Copyright © 2019 Marius Bakke +;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -48,16 +49,14 @@ (define-public scribus (package (name "scribus") - (version "1.5.5") + (version "1.5.6") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/scribus/scribus-devel/" version "/scribus-" version ".tar.xz")) - (patches (search-patches "scribus-1.5.5-poppler-0.86-build-fix.patch")) (sha256 - (base32 - "0w9zzsiaq3f7vpxybk01c9z2b4qqg67mzpyfb2gjchz8dhdb423r")))) + (base32 "1qj7mzf2gmdyil27a4hl2pr1i3h3zzy2h33x74lnwp48mzp0cyap")))) (build-system cmake-build-system) (arguments `(#:tests? #f ;no test target @@ -99,7 +98,7 @@ ("openssl" ,openssl) ("podofo" ,podofo) ("poppler" ,poppler) - ("python" ,python-2) ;need Python library + ("python" ,python) ; need Python library ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) ("zlib" ,zlib))) -- cgit v1.2.3 From f2c6375449d085393eb538240200840ff242a743 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 16 Nov 2020 14:54:04 +0100 Subject: gnu: gcc-vc4: Update to commit 0fe4b83897341742f9df65797474cb0feab4b377. * gnu/packages/patches/gcc-6-fix-buffer-size.patch: New file. * gnu/packages/patches/gcc-6-fix-isl-includes.patch: New file. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/embedded.scm (gcc-vc4): Update to commit 0fe4b83897341742f9df65797474cb0feab4b377. [source]: Add the patches from above. --- gnu/local.mk | 2 ++ gnu/packages/embedded.scm | 9 ++++++--- gnu/packages/patches/gcc-6-fix-buffer-size.patch | 15 +++++++++++++++ gnu/packages/patches/gcc-6-fix-isl-includes.patch | 16 ++++++++++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/gcc-6-fix-buffer-size.patch create mode 100644 gnu/packages/patches/gcc-6-fix-isl-includes.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index bc60307094..d2c3a471e7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1013,6 +1013,8 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-4.9-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-libsanitizer-ustat.patch \ %D%/packages/patches/gcc-4.9-libsanitizer-mode-size.patch \ + %D%/packages/patches/gcc-6-fix-isl-includes.patch \ + %D%/packages/patches/gcc-6-fix-buffer-size.patch \ %D%/packages/patches/gcc-6-libsanitizer-mode-size.patch \ %D%/packages/patches/gcc-7-libsanitizer-mode-size.patch \ %D%/packages/patches/gcc-libvtv-runpath.patch \ diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 3a64c75109..89d4aaf97e 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -1024,8 +1024,8 @@ the Raspberry Pi chip.") (home-page "https://github.com/puppeh/vc4-toolchain/")))) (define-public gcc-vc4 - (let ((commit "165f6d0e11d2e76ee799533bb45bd5c92bf60dc2") - (xgcc (cross-gcc "vc4-elf" #:xbinutils binutils-vc4))) + (let ((commit "0fe4b83897341742f9df65797474cb0feab4b377") + (xgcc (cross-gcc "vc4-elf" #:xgcc gcc-6 #:xbinutils binutils-vc4))) (package (inherit xgcc) (name "gcc-vc4") (source (origin @@ -1039,7 +1039,10 @@ the Raspberry Pi chip.") "-checkout")) (sha256 (base32 - "13h30qjcwnlz6lfma1d82nnvfmjnhh7abkagip4vly6vm5fpnvf2")))) + "0kvaq4s0assvinmmicwqp07d0wwldcw0fv6f4k13whp3q5909jnr")) + (patches + (search-patches "gcc-6-fix-buffer-size.patch" + "gcc-6-fix-isl-includes.patch")))) (native-inputs `(("flex" ,flex) ,@(package-native-inputs xgcc))) diff --git a/gnu/packages/patches/gcc-6-fix-buffer-size.patch b/gnu/packages/patches/gcc-6-fix-buffer-size.patch new file mode 100644 index 0000000000..5fcd769d45 --- /dev/null +++ b/gnu/packages/patches/gcc-6-fix-buffer-size.patch @@ -0,0 +1,15 @@ +Fixes a possible buffer overflow. (There are others) +Author: Danny Milosavljevic +Date: 2020-11-16 + +--- a/gcc/gimplify.c.orig 2020-10-29 08:45:11.532479774 +0100 ++++ b/gcc/gimplify.c 2020-10-29 08:45:49.584637018 +0100 +@@ -5229,7 +5229,7 @@ + flexibility, split it into separate input and output + operands. */ + tree input; +- char buf[10]; ++ char buf[12]; + + /* Turn the in/out constraint into an output constraint. */ + char *p = xstrdup (constraint); diff --git a/gnu/packages/patches/gcc-6-fix-isl-includes.patch b/gnu/packages/patches/gcc-6-fix-isl-includes.patch new file mode 100644 index 0000000000..ab3c5634ea --- /dev/null +++ b/gnu/packages/patches/gcc-6-fix-isl-includes.patch @@ -0,0 +1,16 @@ +See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724 +Author: Rainer Jung +Date: 2018-07-29 + +isl 0.20 stopped including other unused header files in their header files. +Therefore,now it's necessary to include the stuff ourselves. +--- .../gcc/graphite.h 2018-01-03 11:03:58.000000000 +0000 ++++ .../gcc/graphite.h 2018-07-29 17:42:55.836121000 +0000 +@@ -37,6 +37,8 @@ + #include + #include + #include ++#include ++#include + + typedef struct poly_dr *poly_dr_p; -- cgit v1.2.3 From 3aec121e95581e34a47e3a2d175af97579961206 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Tue, 17 Nov 2020 09:52:04 -0600 Subject: gnu: tomb: Update to 2.8. Fixes CVE-2020-28638. * gnu/packages/crypto.scm (tomb): Update to 2.8 [source]: Remove obsolete patch. * gnu/packages/patches/tomb-fix-errors-on-open.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/crypto.scm | 9 ++++---- gnu/packages/patches/tomb-fix-errors-on-open.patch | 25 ---------------------- 3 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 gnu/packages/patches/tomb-fix-errors-on-open.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d2c3a471e7..d4d10bc32b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1650,7 +1650,6 @@ dist_patch_DATA = \ %D%/packages/patches/tk-find-library.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ - %D%/packages/patches/tomb-fix-errors-on-open.patch \ %D%/packages/patches/tup-unbundle-dependencies.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ %D%/packages/patches/twinkle-bcg729.patch \ diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm index aa6f80f731..1b51366d7e 100644 --- a/gnu/packages/crypto.scm +++ b/gnu/packages/crypto.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2016, 2017 Nikita -;;; Copyright © 2016, 2017, 2019 Eric Bavier +;;; Copyright © 2016, 2017, 2019, 2020 Eric Bavier ;;; Copyright © 2017 Pierre Langlois ;;; Copyright © 2018, 2020 Efraim Flashner ;;; Copyright © 2018 Arun Isaac @@ -444,15 +444,14 @@ total number of shares generated.") (define-public tomb (package (name "tomb") - (version "2.7") + (version "2.8") (source (origin (method url-fetch) - (uri (string-append "https://files.dyne.org/tomb/" + (uri (string-append "https://files.dyne.org/tomb/releases/" "Tomb-" version ".tar.gz")) (sha256 (base32 - "0x3al02796vx1cvy6y6h685c367qx70dwv471g0hmks2gr10f0cn")) - (patches (search-patches "tomb-fix-errors-on-open.patch")))) + "0bggzzqmpfiknr76lyl8iszybrcpyqlbgiqk47fxq08h2b5ln1ic")))) (build-system gnu-build-system) (native-inputs `(("sudo" ,sudo))) ;presence needed for 'check' phase (inputs diff --git a/gnu/packages/patches/tomb-fix-errors-on-open.patch b/gnu/packages/patches/tomb-fix-errors-on-open.patch deleted file mode 100644 index 5f41c9ee8f..0000000000 --- a/gnu/packages/patches/tomb-fix-errors-on-open.patch +++ /dev/null @@ -1,25 +0,0 @@ -Description: Avoid error messages when opening a new tomb - Make sure control file exists and has user ownership before user writes to it. -Author: Sven Geuer -Bug: https://github.com/dyne/Tomb/issues/369 -Last-Update: 2019-11-04 ---- a/tomb -+++ b/tomb -@@ -2197,14 +2197,15 @@ - # {{{ Open - - _update_control_file() { -- # replaces a control file with new contents and gives it user ownership -+ # make sure a control file exists, gives it user ownership -+ # and replaces it with new contents - # stdin = contents - # $1 = path to control file - # $2 = contents - [[ "$2" = "" ]] && return 1 - _sudo touch "$1" -- print "$2" > "$1" - _sudo chown ${_UID}:${_GID} "$1" -+ print "$2" > "$1" - _verbose "updated control file $1 = $2" - } - -- cgit v1.2.3 From fa268b28e1ccc392c85846810d836034c96df3c0 Mon Sep 17 00:00:00 2001 From: Simon South Date: Fri, 6 Nov 2020 18:15:28 -0500 Subject: gnu: bitcoin-core: Update to 0.20.1. * gnu/packages/finance.scm (bitcoin-core): Update to 0.20.1. [source]: Remove obsolete patch. [native-inputs]: Add autoconf, automake and libtool. [inputs]: Remove protobuf. [arguments]: Add "set-no-git-flag" phase to indicate the build is not taking place within a git repository. * gnu/packages/patches/bitcoin-core-python-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Christopher Baines --- gnu/local.mk | 1 - gnu/packages/finance.scm | 18 ++++++++++---- .../patches/bitcoin-core-python-compat.patch | 28 ---------------------- 3 files changed, 13 insertions(+), 34 deletions(-) delete mode 100644 gnu/packages/patches/bitcoin-core-python-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 217c05eab6..a1da838aee 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -846,7 +846,6 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-loongson-workaround.patch \ %D%/packages/patches/binutils-mingw-w64-timestamp.patch \ %D%/packages/patches/binutils-mingw-w64-deterministic.patch \ - %D%/packages/patches/bitcoin-core-python-compat.patch \ %D%/packages/patches/blender-2.79-gcc8.patch \ %D%/packages/patches/blender-2.79-gcc9.patch \ %D%/packages/patches/blender-2.79-newer-ffmpeg.patch \ diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 7b87bde50c..7ef40f544f 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -108,7 +108,7 @@ (define-public bitcoin-core (package (name "bitcoin-core") - (version "0.19.1") + (version "0.20.1") (source (origin (method url-fetch) (uri @@ -116,11 +116,13 @@ version "/bitcoin-" version ".tar.gz")) (sha256 (base32 - "1h3w7brc18145np920vy7j5ms5hym59hvr40swdjx34fbdaisngj")) - (patches (search-patches "bitcoin-core-python-compat.patch")))) + "0y5rad68b398arh0abr2wgiwybdw0i5a4dxz9s3fk9fgdbyn5gab")))) (build-system gnu-build-system) (native-inputs - `(("pkg-config" ,pkg-config) + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config) ("python" ,python) ; for the tests ("util-linux" ,util-linux) ; provides the hexdump command for tests ("qttools" ,qttools))) @@ -130,7 +132,6 @@ ("libevent" ,libevent) ("miniupnpc" ,miniupnpc) ("openssl" ,openssl) - ("protobuf" ,protobuf) ("qtbase" ,qtbase))) (arguments `(#:configure-flags @@ -154,6 +155,13 @@ ;; Make Qt deterministic. (setenv "QT_RCC_SOURCE_DATE_OVERRIDE" "1") #t)) + (add-before 'build 'set-no-git-flag + (lambda _ + ;; Make it clear we are not building from within a git repository + ;; (and thus no information regarding this build is available + ;; from git). + (setenv "BITCOIN_GENBUILD_NO_GIT" "1") + #t)) (add-before 'check 'set-home (lambda _ (setenv "HOME" (getenv "TMPDIR")) ; tests write to $HOME diff --git a/gnu/packages/patches/bitcoin-core-python-compat.patch b/gnu/packages/patches/bitcoin-core-python-compat.patch deleted file mode 100644 index 6bf744124d..0000000000 --- a/gnu/packages/patches/bitcoin-core-python-compat.patch +++ /dev/null @@ -1,28 +0,0 @@ -Get rid of deprecation warning emitted by Python 3.8, which causes a test failure(!). - -https://github.com/bitcoin/bitcoin/pull/17931 - -Taken from upstream: - -https://github.com/bitcoin/bitcoin/commit/f117fb00da747147cddfb071c1427a2754c278cd - -diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py -index 20864881c165..07eacf410d88 100755 ---- a/test/functional/p2p_invalid_messages.py -+++ b/test/functional/p2p_invalid_messages.py -@@ -145,13 +145,13 @@ def run_test(self): - def test_magic_bytes(self): - conn = self.nodes[0].add_p2p_connection(P2PDataStore()) - -- def swap_magic_bytes(): -+ async def swap_magic_bytes(): - conn._on_data = lambda: None # Need to ignore all incoming messages from now, since they come with "invalid" magic bytes - conn.magic_bytes = b'\x00\x11\x22\x32' - - # Call .result() to block until the atomic swap is complete, otherwise - # we might run into races later on -- asyncio.run_coroutine_threadsafe(asyncio.coroutine(swap_magic_bytes)(), NetworkThread.network_event_loop).result() -+ asyncio.run_coroutine_threadsafe(swap_magic_bytes(), NetworkThread.network_event_loop).result() - - with self.nodes[0].assert_debug_log(['PROCESSMESSAGE: INVALID MESSAGESTART ping']): - conn.send_message(messages.msg_ping(nonce=0xff)) -- cgit v1.2.3