From unknown Tue Jun 17 01:44:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28954] [PATCH] Update Scribus to 1.5.3. Re-vamp package. Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Oct 2017 10:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28954 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 28954@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150875564517085 (code B ref -1); Mon, 23 Oct 2017 10:48:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Oct 2017 10:47:25 +0000 Received: from localhost ([127.0.0.1]:56637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6aGP-0004RR-5l for submit@debbugs.gnu.org; Mon, 23 Oct 2017 06:47:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6aGL-0004R8-6N for submit@debbugs.gnu.org; Mon, 23 Oct 2017 06:47:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6aGC-0006kE-Ly for submit@debbugs.gnu.org; Mon, 23 Oct 2017 06:47:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33319) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6aGC-0006ik-Gx for submit@debbugs.gnu.org; Mon, 23 Oct 2017 06:47:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6aG3-0004Vd-VB for guix-patches@gnu.org; Mon, 23 Oct 2017 06:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6aG0-0006Z4-9y for guix-patches@gnu.org; Mon, 23 Oct 2017 06:47:00 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:41155) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6aFz-0006YK-Nr for guix-patches@gnu.org; Mon, 23 Oct 2017 06:46:56 -0400 Received: from saiph.selenimh (000043010000000000000469.ipv6.commingeshautdebit.fr [IPv6:2a03:a0a0:0:4301::469]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id D6EBEC5A8B for ; Mon, 23 Oct 2017 12:46:52 +0200 (CEST) Received: from ngz by saiph.selenimh with local (Exim 4.89) (envelope-from ) id 1e6aFw-0008Aq-07 for guix-patches@gnu.org; Mon, 23 Oct 2017 12:46:52 +0200 From: Nicolas Goaziou User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Date: Mon, 23 Oct 2017 12:46:51 +0200 Message-ID: <8760b6rvj8.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) --=-=-= Content-Type: text/plain Hello, The following patch updates Scribus to 1.5.3. It requires changes to the package definition itself (in particular patches and additional inputs). While at it, i also added some more inputs so as to get a more complete package. I discussed the possibility to split the patch in two (update on the one hand, and additional inputs on the other one), but the clear cut between the two is difficult to find. For example, "libcdr", "libfreehand", "libmspub", "libpagemaker, "librevenge" and "libvisio" obviously belongs to the second patch, but "fontconfig", "harfbuzz", "openssl" and "boost" would need to be tested. In any case, notwithstanding my laziness, I think the split is not worth it: current Scribus package is not working at the moment. The package may still be missing Tkinter and Mesa as inputs. I have no use for them at the moment, though. WDYT? Regards, -- Nicolas Goaziou 0x80A93738 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-scribus-Update-to-1.5.3.-Re-vamp-package.patch Content-Transfer-Encoding: quoted-printable Content-Description: Scribus re-vamp >From e42a5b62476e63184c3a4164d73410decbbb2a75 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 23 Oct 2017 12:25:13 +0200 Subject: [PATCH] gnu: scribus: Update to 1.5.3. Re-vamp package. * gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch: * gnu/packages/patches/scribus-fix-poppler-packaging.patch: New files. * gnu/local.mk (dist_patch_DATA): Register new files. * gnu/packages/scribus.scm (scribus): Update to 1.5.3. [input]: Add fontconfig, harfbuzz, hunspell, icu4c, libcdr, libfreehand, libmspub, librevenge, libvisio, openssl, podofo, poppler. [native-input]: Move qttools from inputs. Add boost. [home-page]: Fix URL. --- gnu/local.mk | 2 + .../scribus-fix-poppler-0.58-breakage.patch | 526 +++++++++++++++++= ++++ .../patches/scribus-fix-poppler-packaging.patch | 95 ++++ gnu/packages/scribus.scm | 57 ++- 4 files changed, 669 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/scribus-fix-poppler-0.58-breakage.= patch create mode 100644 gnu/packages/patches/scribus-fix-poppler-packaging.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6b70300ff..ff0e74a0b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1022,6 +1022,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-test-threading.patch \ + %D%/packages/patches/scribus-fix-poppler-0.58-breakage.patch \ + %D%/packages/patches/scribus-fix-poppler-packaging.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ diff --git a/gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch b= /gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch new file mode 100644 index 000000000..cd95e9b2a --- /dev/null +++ b/gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch @@ -0,0 +1,526 @@ +diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/im= port/pdf/importpdf.cpp +index 4c462bead..1c0bd8a88 100644 +--- a/scribus/plugins/import/pdf/importpdf.cpp ++++ b/scribus/plugins/import/pdf/importpdf.cpp +@@ -22,6 +22,7 @@ for which a new license (GPL+exception) is in place. + #include =0D + #include =0D + #include =0D ++#include =0D + #include =0D + #include =0D + =0D +@@ -59,6 +60,12 @@ for which a new license (GPL+exception) is in place. + #include "ui/multiprogressdialog.h"=0D + #include "ui/propertiespalette.h"=0D + =0D ++#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \ ++ ((major) * 10000) \ ++ + ((minor) * 100) \ ++ + ((micro) * 1))=0D ++#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MA= JOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)=0D ++=0D + PdfPlug::PdfPlug(ScribusDoc* doc, int flags)=0D + {=0D + tmpSele =3D new Selection(this, false);=0D +@@ -507,12 +514,20 @@ bool PdfPlug::convert(const QString& fn) + {=0D + for (int i =3D 0; i < order->getLength (); ++i)=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object orderItem =3D order->get(i);=0D ++#else=0D + Object orderItem;=0D + order->get(i, &orderItem);=0D ++#endif=0D + if (orderItem.isDict())=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object ref =3D order->getNF(i); =0D ++#else=0D + Object ref;=0D + order->getNF(i, &ref);=0D ++#endif=0D + if (ref.isRef())=0D + {=0D + OptionalContentGroup *oc =3D ocg->findOcgByRef(ref.getRef());= =0D +@@ -523,7 +538,9 @@ bool PdfPlug::convert(const QString& fn) + ocgNames.append(ocgName);=0D + }=0D + }=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + ref.free();=0D ++#endif=0D + }=0D + else=0D + {=0D +@@ -597,39 +614,71 @@ bool PdfPlug::convert(const QString& fn) + dev->layersSetByOCG =3D true;=0D + }=0D + #endif=0D ++=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object info =3D pdfDoc->getDocInfo();=0D ++ if (info.isDict())=0D ++ {=0D ++ Object obj;=0D ++ Dict *infoDict =3D info.getDict();=0D ++ obj =3D infoDict->lookup((char*) "Title");=0D ++ if (obj.isString())=0D ++ {=0D ++ m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString(= )));=0D ++ }=0D ++ obj =3D infoDict->lookup((char*) "Author");=0D ++ if (obj.isString())=0D ++ {=0D ++ m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString= ()));=0D ++ }=0D ++ obj =3D infoDict->lookup((char*) "Subject");=0D ++ if (obj.isString())=0D ++ {=0D ++ m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getStrin= g()));=0D ++ }=0D ++ obj =3D infoDict->lookup((char*) "Keywords");=0D ++ if (obj.isString())=0D ++ {=0D ++ // s1 =3D obj.getString();=0D ++ m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getStri= ng()));=0D ++ }=0D ++ }=0D ++ info =3D Object();=0D ++#else=0D + Object info;=0D + pdfDoc->getDocInfo(&info);=0D + if (info.isDict())=0D + {=0D + Object obj;=0D +- // GooString *s1;=0D ++ // GooString *s1;=0D + Dict *infoDict =3D info.getDict();=0D +- if (infoDict->lookup((char*)"Title", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Title", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString(= )));=0D + obj.free();=0D + }=0D +- if (infoDict->lookup((char*)"Author", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Author", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString= ()));=0D + obj.free();=0D + }=0D +- if (infoDict->lookup((char*)"Subject", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Subject", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getStrin= g()));=0D + obj.free();=0D + }=0D +- if (infoDict->lookup((char*)"Keywords", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Keywords", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getStri= ng()));=0D + obj.free();=0D + }=0D + }=0D + info.free();=0D ++#endif=0D + if (cropped)=0D + {=0D + QRectF crBox =3D getCBox(contentRect, pageNs[0]);=0D +@@ -746,8 +795,13 @@ bool PdfPlug::convert(const QString& fn) + pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, cr= op, printing, NULL, NULL, dev->annotations_callback, dev);=0D + }=0D + PDFPresentationData ef;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object trans =3D pdfDoc->getPage(pp)->getTrans();=0D ++ Object *transi =3D &trans;=0D ++#else=0D + Object trans;=0D + Object *transi =3D pdfDoc->getPage(pp)->getTrans(&trans);=0D ++#endif=0D + if (transi->isDict())=0D + {=0D + m_Doc->pdfOptions().PresentMode =3D true;=0D +@@ -793,32 +847,51 @@ bool PdfPlug::convert(const QString& fn) + delete pgTrans;=0D + }=0D + m_Doc->currentPage()->PresentVals =3D ef;=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + trans.free();=0D + transi->free();=0D ++#endif=0D + }=0D + int numjs =3D pdfDoc->getCatalog()->numJS();=0D + if (numjs > 0)=0D + {=0D + NameTree *jsNameTreeP =3D new NameTree();=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object catDict =3D pdfDoc->getXRef()->getCatalog();=0D ++#else=0D + Object catDict;=0D + pdfDoc->getXRef()->getCatalog(&catDict);=0D ++#endif=0D + if (catDict.isDict())=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object names =3D catDict.dictLookup("Names");=0D ++#else=0D + Object names;=0D + catDict.dictLookup("Names", &names);=0D ++#endif=0D + if (names.isDict())=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object obj =3D names.dictLookup("JavaScript");=0D ++ jsNameTreeP->init(pdfDoc->getXRef(), &obj);=0D ++#else=0D + Object obj;=0D + names.dictLookup("JavaScript", &obj);=0D + jsNameTreeP->init(pdfDoc->getXRef(), &obj);=0D + obj.free();=0D ++#endif=0D + }=0D + for (int a =3D 0; a < numjs; a++)=0D + {=0D + m_Doc->JavaScripts.insert(UnicodeParsedString(jsNameTreeP->getNa= me(a)), UnicodeParsedString(pdfDoc->getCatalog()->getJS(a)));=0D + }=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ names =3D catDict.dictLookup("OpenAction");=0D ++#else=0D + names.free();=0D + catDict.dictLookup("OpenAction", &names);=0D ++#endif=0D + if (names.isDict())=0D + {=0D + LinkAction *linkAction =3D NULL;=0D +@@ -839,9 +912,13 @@ bool PdfPlug::convert(const QString& fn) + }=0D + }=0D + }=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + names.free();=0D ++#endif=0D + }=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + catDict.free();=0D ++#endif=0D + delete jsNameTreeP;=0D + }=0D + m_Doc->pdfOptions().Version =3D (PDFOptions::PDFVersion)qMin(15, qM= ax(13, pdfDoc->getPDFMajorVersion() * 10 + pdfDoc->getPDFMinorVersion()));= =0D +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/im= port/pdf/slaoutput.cpp +index 32cfed101..ffa417a3b 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -6,6 +6,7 @@ for which a new license (GPL+exception) is in place. + */=0D + =0D + #include "slaoutput.h"=0D ++#include =0D + #include =0D + #include =0D + #include =0D +@@ -19,11 +20,49 @@ for which a new license (GPL+exception) is in place. + #include "util_math.h"=0D + #include =0D + =0D ++#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \ ++ ((major) * 10000) \ ++ + ((minor) * 100) \ ++ + ((micro) * 1))=0D ++#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MA= JOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)=0D ++=0D + LinkSubmitForm::LinkSubmitForm(Object *actionObj)=0D + {=0D + Object obj1, obj2, obj3;=0D + fileName =3D NULL;=0D + m_flags =3D 0;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ if (actionObj->isDict())=0D ++ {=0D ++ obj1 =3D actionObj->dictLookup("F");=0D ++ if (!obj1.isNull())=0D ++ {=0D ++ if (obj1.isDict())=0D ++ {=0D ++ obj3 =3D obj1.dictLookup("FS");=0D ++ if (!obj3.isNull())=0D ++ {=0D ++ if (obj3.isName())=0D ++ {=0D ++ char *name =3D obj3.getName();=0D ++ if (!strcmp(name, "URL"))=0D ++ {=0D ++ obj2 =3D obj1.dictLookup("F");=0D ++ if (!obj2.isNull())=0D ++ fileName =3D obj2.getString()->copy();=0D ++ }=0D ++ }=0D ++ }=0D ++ }=0D ++ }=0D ++ obj1 =3D actionObj->dictLookup("Flags");=0D ++ if (!obj1.isNull())=0D ++ {=0D ++ if (obj1.isNum())=0D ++ m_flags =3D obj1.getInt();=0D ++ }=0D ++ }=0D ++#else=0D + if (actionObj->isDict())=0D + {=0D + if (!actionObj->dictLookup("F", &obj1)->isNull())=0D +@@ -54,6 +93,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj) + }=0D + obj1.free();=0D + }=0D ++#endif=0D + }=0D + =0D + LinkSubmitForm::~LinkSubmitForm()=0D +@@ -66,11 +106,25 @@ LinkImportData::LinkImportData(Object *actionObj) + {=0D + Object obj1, obj3;=0D + fileName =3D NULL;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ if (actionObj->isDict())=0D ++ {=0D ++ obj1 =3D actionObj->dictLookup("F");=0D ++ if (!obj1.isNull())=0D ++ {=0D ++ obj3 =3D getFileSpecNameForPlatform(&obj1);=0D ++ if (!obj3.isNull())=0D ++ {=0D ++ fileName =3D obj3.getString()->copy();=0D ++ }=0D ++ }=0D ++ }=0D ++#else=0D + if (actionObj->isDict())=0D + {=0D + if (!actionObj->dictLookup("F", &obj1)->isNull())=0D + {=0D +- if (getFileSpecNameForPlatform (&obj1, &obj3))=0D ++ if (getFileSpecNameForPlatform(&obj1, &obj3))=0D + {=0D + fileName =3D obj3.getString()->copy();=0D + obj3.free();=0D +@@ -78,6 +132,7 @@ LinkImportData::LinkImportData(Object *actionObj) + }=0D + obj1.free();=0D + }=0D ++#endif=0D + }=0D + =0D + LinkImportData::~LinkImportData()=0D +@@ -256,6 +311,27 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *a= no) + Object obj;=0D + Ref refa =3D ano->getRef();=0D + Object additionalActions;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj =3D xref->fetch(refa.num, refa.gen);=0D ++ if (obj.isDict())=0D ++ {=0D ++ Dict* adic =3D obj.getDict();=0D ++ additionalActions =3D adic->lookupNF("A");=0D ++ Object additionalActionsObject =3D additionalActions.fetch(pdfDoc->getX= Ref());=0D ++ if (additionalActionsObject.isDict())=0D ++ {=0D ++ Object actionObject =3D additionalActionsObject.dictLookup("S");=0D ++ if (actionObject.isName("ImportData"))=0D ++ {=0D ++ linkAction =3D new LinkImportData(&additionalActionsObject);=0D ++ }=0D ++ else if (actionObject.isName("SubmitForm"))=0D ++ {=0D ++ linkAction =3D new LinkSubmitForm(&additionalActionsObject);=0D ++ }=0D ++ }=0D ++ }=0D ++#else=0D + Object *act =3D xref->fetch(refa.num, refa.gen, &obj);=0D + if (act)=0D + {=0D +@@ -283,6 +359,7 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *an= o) + }=0D + }=0D + obj.free();=0D ++#endif=0D + return linkAction;=0D + }=0D + =0D +@@ -293,6 +370,22 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(cons= t char *key, AnnotWidget *a + Object obj;=0D + Ref refa =3D ano->getRef();=0D + Object additionalActions;=0D ++=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj =3D xref->fetch(refa.num, refa.gen);=0D ++ if (obj.isDict())=0D ++ {=0D ++ Dict* adic =3D obj.getDict();=0D ++ additionalActions =3D adic->lookupNF("AA");=0D ++ Object additionalActionsObject =3D additionalActions.fetch(pdfDoc->getX= Ref());=0D ++ if (additionalActionsObject.isDict())=0D ++ {=0D ++ Object actionObject =3D additionalActionsObject.dictLookup(key);=0D ++ if (actionObject.isDict())=0D ++ linkAction =3D LinkAction::parseAction(&actionObject, pdfDoc->getCata= log()->getBaseURI());=0D ++ }=0D ++ }=0D ++#else=0D + Object *act =3D xref->fetch(refa.num, refa.gen, &obj);=0D + if (act)=0D + {=0D +@@ -313,6 +406,7 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(const= char *key, AnnotWidget *a + }=0D + }=0D + obj.free();=0D ++#endif=0D + return linkAction;=0D + }=0D + =0D +@@ -838,6 +932,33 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, d= ouble xCoor, double yCoor, + {=0D + Object obj1;=0D + Ref refa =3D annota->getRef();=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj1 =3D xref->fetch(refa.num, refa.gen);=0D ++ if (obj1.isDict())=0D ++ {=0D ++ Dict* dict =3D obj1.getDict();=0D ++ Object obj2 =3D dict->lookup("Kids");=0D ++ //childs=0D ++ if (obj2.isArray())=0D ++ {=0D ++ // Load children=0D ++ QList radList;=0D ++ for (int i =3D 0; i < obj2.arrayGetLength(); i++)=0D ++ {=0D ++ Object childRef =3D obj2.arrayGetNF(i);=0D ++ if (!childRef.isRef())=0D ++ continue;=0D ++ Object childObj =3D obj2.arrayGet(i);=0D ++ if (!childObj.isDict())=0D ++ continue;=0D ++ const Ref ref =3D childRef.getRef();=0D ++ radList.append(ref.num);=0D ++ }=0D ++ QString tmTxt =3D UnicodeParsedString(annota->getName());=0D ++ m_radioMap.insert(tmTxt, radList);=0D ++ }=0D ++ }=0D ++#else=0D + Object *act =3D xref->fetch(refa.num, refa.gen, &obj1);=0D + if (act && act->isDict())=0D + {=0D +@@ -873,6 +994,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, do= uble xCoor, double yCoor, + obj2.free();=0D + }=0D + obj1.free();=0D ++#endif=0D + }=0D + return retVal;=0D + }=0D +@@ -3007,6 +3129,23 @@ void SlaOutputDev::beginMarkedContent(char *name, O= bject *dictRef) + }=0D + else=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ dictObj =3D dictRef->fetch(xref);=0D ++ if (!dictObj.isDict())=0D ++ return;=0D ++ dict =3D dictObj.getDict();=0D ++ dictType =3D dict->lookup("Type");=0D ++ if (dictType.isName("OCG"))=0D ++ {=0D ++ oc =3D contentConfig->findOcgByRef(dictRef->getRef());=0D ++ if (oc)=0D ++ {=0D ++ // qDebug() << "Begin OCG Content with Name " << UnicodeParsedSt= ring(oc->getName());=0D ++ m_doc->setActiveLayer(UnicodeParsedString(oc->getName()));=0D ++ mSte.ocgName =3D UnicodeParsedString(oc->getName());=0D ++ }=0D ++ }=0D ++#else=0D + dictRef->fetch(xref, &dictObj);=0D + if (!dictObj.isDict())=0D + {=0D +@@ -3027,6 +3166,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Ob= ject *dictRef) + }=0D + dictType.free();=0D + dictObj.free();=0D ++#endif=0D + }=0D + }=0D + m_mcStack.push(mSte);=0D +@@ -3046,14 +3186,20 @@ void SlaOutputDev::beginMarkedContent(char *name, = Dict *properties) + {=0D + if (layersSetByOCG)=0D + return;=0D +- Object obj;=0D + QString lName =3D QString("Layer_%1").arg(layerNum + 1);=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object obj =3D properties->lookup((char*) "Title");=0D ++ if (obj.isString())=0D ++ lName =3D QString(obj.getString()->getCString());=0D ++#else=0D ++ Object obj;=0D + if (properties->lookup((char*)"Title", &obj))=0D + {=0D + if (obj.isString())=0D + lName =3D QString(obj.getString()->getCString());=0D + obj.free();=0D + }=0D ++#endif=0D + for (ScLayers::iterator it =3D m_doc->Layers.begin(); it !=3D m_doc->L= ayers.end(); ++it)=0D + {=0D + if (it->Name =3D=3D lName)=0D +@@ -3066,6 +3212,29 @@ void SlaOutputDev::beginMarkedContent(char *name, D= ict *properties) + if (!firstLayer)=0D + currentLayer =3D m_doc->addLayer(lName, true);=0D + firstLayer =3D false;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj =3D properties->lookup((char*) "Visible");=0D ++ if (obj.isBool())=0D ++ m_doc->setLayerVisible(currentLayer, obj.getBool());=0D ++ obj =3D properties->lookup((char*) "Editable");=0D ++ if (obj.isBool())=0D ++ m_doc->setLayerLocked(currentLayer, !obj.getBool());=0D ++ obj =3D properties->lookup((char*) "Printed");=0D ++ if (obj.isBool())=0D ++ m_doc->setLayerPrintable(currentLayer, obj.getBool());=0D ++ obj =3D properties->lookup((char*)"Color");=0D ++ if (obj.isArray())=0D ++ {=0D ++ Object obj1;=0D ++ obj1 =3D obj.arrayGet(0);=0D ++ int r =3D obj1.getNum() / 256;=0D ++ obj1 =3D obj.arrayGet(1);=0D ++ int g =3D obj1.getNum() / 256;=0D ++ obj1 =3D obj.arrayGet(2);=0D ++ int b =3D obj1.getNum() / 256;=0D ++ m_doc->setLayerMarker(currentLayer, QColor(r, g, b));=0D ++ }=0D ++#else=0D + if (properties->lookup((char*)"Visible", &obj))=0D + {=0D + if (obj.isBool())=0D +@@ -3102,6 +3271,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Di= ct *properties) + }=0D + obj.free();=0D + }=0D ++#endif=0D + }=0D + }=0D + }=0D +--=20 +2.14.2 + diff --git a/gnu/packages/patches/scribus-fix-poppler-packaging.patch b/gnu= /packages/patches/scribus-fix-poppler-packaging.patch new file mode 100644 index 000000000..2659bafa6 --- /dev/null +++ b/gnu/packages/patches/scribus-fix-poppler-packaging.patch @@ -0,0 +1,95 @@ +diff --git a/.travis.yml b/.travis.yml +index 6e9562b2c..f4273227a 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -31,8 +31,8 @@ before_install: + libhyphen-dev liblcms2-dev libpodofo-dev libtiff-dev libxml2-dev + python-all-dev zlib1g-dev qt58base qt58declarative + qt58tools libgraphicsmagick++1-dev +- libopenscenegraph-dev libpoppler-dev libcairo2-dev libwpg-dev libms= pub-dev +- libcdr-dev libvisio-dev libharfbuzz-dev libharfbuzz-icu0 ++ libopenscenegraph-dev libpoppler-dev libpoppler-cpp-dev libcairo2-d= ev libwpg-dev=20 ++ libmspub-dev libcdr-dev libvisio-dev libharfbuzz-dev libharfbuzz-ic= u0 + coreutils binutils python-tk; + fi + # OSX +diff --git a/cmake/modules/FindPOPPLER.cmake b/cmake/modules/FindPOPPLER.c= make +index d684bd503..899284db6 100644 +--- a/cmake/modules/FindPOPPLER.cmake ++++ b/cmake/modules/FindPOPPLER.cmake +@@ -1,12 +1,16 @@ + if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) + include(UsePkgConfig) + PKGCONFIG(poppler _libPopplerIncDir _libPopplerLinkDir _libPopplerLinkFl= ags _libPopplerCflags) +- set(PKG_POPPLER_INCLUDE_DIRS ${_libPopplerIncDir}) +- set(PKG_POPPLER_LIBRARIES ${_libPopplerLinkDir}) +- else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) +- include(FindPkgConfig) ++ set(PKG_POPPLER_INCLUDE_DIRS ${_libPopplerIncDir}) ++ set(PKG_POPPLER_LIBRARIES ${_libPopplerLinkDir}) ++else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) ++ include(FindPkgConfig) + pkg_search_module(POPPLER libpoppler>=3D0.19.0 poppler>=3D0.19.0) +- endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) ++ if (POPPLER_FOUND) ++ pkg_search_module(POPPLER_CPP REQUIRED libpoppler-cpp>=3D0.19.0 poppler= -cpp>=3D0.19.0) ++ endif(POPPLER_FOUND) ++endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) ++=20 + find_path(POPPLER_INCLUDE_DIR=20 + NAMES poppler-config.h + PATHS ${PKG_POPPLER_INCLUDE_DIRS} ${POPPLER_INCLUDE_DIRS} /usr/local/in= clude /usr/include +@@ -14,16 +18,31 @@ find_path(POPPLER_INCLUDE_DIR + NO_DEFAULT_PATH + ) +=20 ++find_path(POPPLER_CPP_INCLUDE_DIR=20 ++ NAMES poppler-version.h ++ PATHS ${PKG_POPPLER_CPP_INCLUDE_DIRS} ${POPPLER_CPP_INCLUDE_DIRS} /usr/= local/include /usr/include ++ PATH_SUFFIXES poppler ++ NO_DEFAULT_PATH ++) ++ + find_library(POPPLER_LIBRARY + NAMES libpoppler poppler + PATHS ${PKG_POPPLER_LIBRARIES} ${POPPLER_LIBRARY_DIRS} /usr/local/lib /= usr/lib /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} + PATH_SUFFIXES poppler + NO_DEFAULT_PATH + ) ++ ++find_library(POPPLER_CPP_LIBRARY ++ NAMES libpoppler-cpp poppler-cpp ++ PATHS ${PKG_POPPLER_CPP_LIBRARIES} ${POPPLER_CPP_LIBRARY_DIRS} /usr/loc= al/lib /usr/lib /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} ++ PATH_SUFFIXES poppler ++ NO_DEFAULT_PATH ++) ++ + if (POPPLER_LIBRARY) +- if (POPPLER_INCLUDE_DIR) ++ if (POPPLER_INCLUDE_DIR AND POPPLER_CPP_INCLUDE_DIR) + set( FOUND_POPPLER 1 ) +- set( POPPLER_LIBRARIES ${POPPLER_LIBRARY} ) +- set( POPPLER_INCLUDES ${POPPLER_INCLUDE_DIR}) +- endif (POPPLER_INCLUDE_DIR) ++ set( POPPLER_LIBRARIES ${POPPLER_LIBRARY} ${POPPLER_CPP_LIBRARY} ) ++ set( POPPLER_INCLUDES ${POPPLER_INCLUDE_DIR} ${POPPLER_CPP_INCLUDE_DI= R} ) ++ endif (POPPLER_INCLUDE_DIR AND POPPLER_CPP_INCLUDE_DIR) + endif (POPPLER_LIBRARY) +diff --git a/scribus/plugins/import/pdf/CMakeLists.txt b/scribus/plugins/i= mport/pdf/CMakeLists.txt +index cd1610298..85760d96e 100644 +--- a/scribus/plugins/import/pdf/CMakeLists.txt ++++ b/scribus/plugins/import/pdf/CMakeLists.txt +@@ -2,9 +2,9 @@ include_directories( + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/scribus + ${POPPLER_INCLUDE_DIR} ++ ${POPPLER_CPP_INCLUDE_DIR} + ) +=20 +- + set(IMPORTPDF_PLUGIN_UI_SRC + pdfimportoptions.ui + ) +--=20 +2.14.2 + diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index d48051ee3..02280f555 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 Ricardo Wurmus ;;; Copyright =C2=A9 2016 Efraim Flashner +;;; Copyright =C2=A9 2017 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,53 +25,87 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cmake) #:use-module (gnu packages) + #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages cups) #:use-module (gnu packages fontutils) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) + #:use-module (gnu packages imagemagick) + #:use-module (gnu packages libreoffice) #:use-module (gnu packages linux) + #:use-module (gnu packages pdf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages qt) - #:use-module (gnu packages imagemagick) + #:use-module (gnu packages tls) #:use-module (gnu packages xml)) =20 (define-public scribus (package (name "scribus") - (version "1.5.2") + (version "1.5.3") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/scribus/scribus-de= vel/" version "/scribus-" version ".tar.xz")) (sha256 (base32 - "1xbl7h4x32y2nfhn57ivjziyvlnwadcbizqwfqx5srfsmqiyqppc")))) + "0kyp45vidxa3v35ic9592db4zk3m8al26vck38q5v7z14x3hp8vk")) + (patches + ;; These patches are necessary to build package with Popple= r >=3D + ;; 0.58. They are extracted from trunk and will be include= d in + ;; Scribus 1.5.4. + (search-patches "scribus-fix-poppler-0.58-breakage.patch" + "scribus-fix-poppler-packaging.patch")))) (build-system cmake-build-system) (arguments - `(#:tests? #f ; no test target + `(#:tests? #f ;no test target #:configure-flags - '("-DCMAKE_CXX_FLAGS=3D-std=3Dgnu++11"))) + '("-DWANT_GRAPHICSMAGICK=3D1") + #:phases + (modify-phases %standard-phases + ;; Fix typo. Patch included in trunk. See + ;; . + (add-before 'configure 'fix-podofo + (lambda _ + (substitute* "cmake/modules/FindLIBPODOFO.cmake" + (("find_package\\(OPENSSL\\)") "find_package(OpenSSL)")) + #t))))) (inputs `(("cairo" ,cairo) ("cups" ,cups) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) ("graphicsmagick" ,graphicsmagick) + ("harfbuzz" ,harfbuzz) + ("hunspell" ,hunspell) + ("icu4c" ,icu4c) ("lcms" ,lcms) + ("libcdr" ,libcdr) + ("libfreehand" ,libfreehand) ("libjpeg" ,libjpeg) + ("libmspub" ,libmspub) + ("libpagemaker" ,libpagemaker) + ("librevenge" ,librevenge) ("libtiff" ,libtiff) + ("libvisio" ,libvisio) ("libxml2" ,libxml2) - ("python" ,python-2) - ("freetype" ,freetype) + ("openssl" ,openssl) + ("podofo" ,podofo) + ("poppler" ,poppler) + ("python" ,python-2) ;need Python library ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) - ("qttools" ,qttools) ("zlib" ,zlib))) (native-inputs - `(("util-linux" ,util-linux) - ("pkg-config" ,pkg-config))) - (home-page "http://scribus.net") + `(("boost" ,boost) + ("pkg-config" ,pkg-config) + ("qttools" ,qttools) + ("util-linux" ,util-linux))) + (home-page "https://www.scribus.net") (synopsis "Desktop publishing and page layout program") (description "Scribus is a @dfn{desktop publishing} (DTP) application and can be u= sed --=20 2.14.2 --=-=-=-- From unknown Tue Jun 17 01:44:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28954] [PATCH] Update Scribus to 1.5.3. Re-vamp package. Resent-From: Eric Bavier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Oct 2017 13:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28954 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou Cc: 28954@debbugs.gnu.org Received: via spool by 28954-submit@debbugs.gnu.org id=B28954.150885208115049 (code B ref 28954); Tue, 24 Oct 2017 13:35:01 +0000 Received: (at 28954) by debbugs.gnu.org; 24 Oct 2017 13:34:41 +0000 Received: from localhost ([127.0.0.1]:58453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6zLs-0003ue-Ta for submit@debbugs.gnu.org; Tue, 24 Oct 2017 09:34:41 -0400 Received: from mail.centurylink.net ([205.219.233.9]:56064 helo=smtp.centurylink.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6zLo-0003uM-6L for 28954@debbugs.gnu.org; Tue, 24 Oct 2017 09:34:39 -0400 DKIM-Signature: v=1; a=rsa-sha1; d=centurylink.net; s=ctl201402; c=relaxed/simple; q=dns/txt; i=@centurylink.net; t=1508852069; h=From:Subject:Date:To:MIME-Version:Content-Type; bh=Gg3uOs/nAYxHVyWq5U/BpYVVSfA=; b=nZLkiUFBfLDkPooL/UfLOFrNV/JG0W+bDazf0P3CPtDNfo2OeoLYW0wgRz6U8A1U cNHvL4Ocr6c+87pXw48XaASoCZEvhN0LHPENV/egdmRxhZXIpUUoIaRO/6c/1icJ w7SmLAag5pOhcF+qWwnSihe6bvV0CSs8n7skTpd6Zha+KrgD2r8GEChbVFCs/7uc tmMuVRu6W3TDqFGGkrAIwaNRWM+Gca0Loh10+ksxAS5csVjHSot0ENvnpV7kx2Ty +V90seuZ5xgiBD8zZd7B/koeS1++aNdet7db9LjUfCZ5p4fy0BYWkxsMn3YNAmiC l3SE6s0j2w77YesL1vHgLw==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.2 cv=NaWk7CL4 c=1 sm=1 tr=0 a=vYGdbaltFBZNd9BlzHJvqw==:117 a=vYGdbaltFBZNd9BlzHJvqw==:17 a=KGjhK52YXX0A:10 a=kj9zAlcOel0A:10 a=1x0kU5LsU6YA:10 a=02M-m0pO-4AA:10 a=zSv6zi-ZgakA:10 a=mDV3o1hIAAAA:8 a=iIfsmPQ1AAAA:8 a=pX0Iro7DtA-ptQKmPO4A:9 a=CjuIK1q_8ugA:10 a=s602_O6NB9gA:10 a=_FVE-zBwftR9WsbkzFJk:22 a=2yt72UtZcGNphq7gSX6B:22 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: ZXJpY2JhdmllckBjZW50dXJ5bGluay5uZXQ= Authentication-Results: smtp03.agate.dfw.synacor.com smtp.user=ericbavier@centurylink.net; auth=pass (LOGIN) Received: from [97.116.109.77] ([97.116.109.77:33280] helo=localhost) by smtp.centurylink.net (envelope-from ) (ecelerity 3.5.1.37854 r(Momo-dev:3.5.1.0)) with ESMTPSA (cipher=AES256-GCM-SHA384) id 95/C5-19870-4614FE95; Tue, 24 Oct 2017 09:34:29 -0400 Date: Tue, 24 Oct 2017 03:34:36 -0500 From: Eric Bavier Message-ID: <20171024033436.65edd619@centurylink.net> In-Reply-To: <8760b6rvj8.fsf@nicolasgoaziou.fr> References: <8760b6rvj8.fsf@nicolasgoaziou.fr> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.4 (/) On Mon, 23 Oct 2017 12:46:51 +0200 Nicolas Goaziou wrote: > From: Nicolas Goaziou > To: 28954@debbugs.gnu.org > Subject: [bug#28954] [PATCH] Update Scribus to 1.5.3. Re-vamp package. > Date: Mon, 23 Oct 2017 12:46:51 +0200 > Sender: "Guix-patches" > > User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) > > Hello, > > The following patch updates Scribus to 1.5.3. It requires changes to > the package definition itself (in particular patches and additional > inputs). > [...] > From e42a5b62476e63184c3a4164d73410decbbb2a75 Mon Sep 17 00:00:00 2001 > From: Nicolas Goaziou > Date: Mon, 23 Oct 2017 12:25:13 +0200 > Subject: [PATCH] gnu: scribus: Update to 1.5.3. Re-vamp package. > > * gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch: > * gnu/packages/patches/scribus-fix-poppler-packaging.patch: New files. > * gnu/local.mk (dist_patch_DATA): Register new files. > > * gnu/packages/scribus.scm (scribus): Update to 1.5.3. > [input]: Add fontconfig, harfbuzz, hunspell, icu4c, libcdr, libfreehand, > libmspub, librevenge, libvisio, openssl, podofo, poppler. > [native-input]: Move qttools from inputs. Add boost. > [home-page]: Fix URL. Remove the blank line between entries. > --- > gnu/local.mk | 2 + > .../scribus-fix-poppler-0.58-breakage.patch | 526 +++++++++++++++++++++ > .../patches/scribus-fix-poppler-packaging.patch | 95 ++++ Could you include a url where these patches came from in the patches themselves? You mention in the package definition that they came from upstream's trunk. Or, for large patches, some have experimented with using an origin that fetches the patch from upstream rather than pulling the patch into Guix. > gnu/packages/scribus.scm | 57 ++- > 4 files changed, 669 insertions(+), 11 deletions(-) > create mode 100644 gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch > create mode 100644 gnu/packages/patches/scribus-fix-poppler-packaging.patch > [...] > (define-public scribus > (package > (name "scribus") > - (version "1.5.2") > + (version "1.5.3") > (source (origin > (method url-fetch) > (uri (string-append "mirror://sourceforge/scribus/scribus-devel/" > version "/scribus-" version ".tar.xz")) > (sha256 > (base32 > - "1xbl7h4x32y2nfhn57ivjziyvlnwadcbizqwfqx5srfsmqiyqppc")))) > + "0kyp45vidxa3v35ic9592db4zk3m8al26vck38q5v7z14x3hp8vk")) > + (patches > + ;; These patches are necessary to build package with Poppler >= > + ;; 0.58. They are extracted from trunk and will be included in > + ;; Scribus 1.5.4. > + (search-patches "scribus-fix-poppler-0.58-breakage.patch" > + "scribus-fix-poppler-packaging.patch")))) > (build-system cmake-build-system) > (arguments > - `(#:tests? #f ; no test target > + `(#:tests? #f ;no test target I see no need for this whitespace-only change. > #:configure-flags > - '("-DCMAKE_CXX_FLAGS=-std=gnu++11"))) > + '("-DWANT_GRAPHICSMAGICK=1") > + #:phases > + (modify-phases %standard-phases > + ;; Fix typo. Patch included in trunk. See > + ;; . > + (add-before 'configure 'fix-podofo > + (lambda _ > + (substitute* "cmake/modules/FindLIBPODOFO.cmake" > + (("find_package\\(OPENSSL\\)") "find_package(OpenSSL)")) > + #t))))) Could you move this into an origin snippet instead? We'd want a fix like this included in the source when someone uses 'guix build -S scribus' > (inputs > `(("cairo" ,cairo) > ("cups" ,cups) > + ("fontconfig" ,fontconfig) > + ("freetype" ,freetype) > ("graphicsmagick" ,graphicsmagick) > + ("harfbuzz" ,harfbuzz) > + ("hunspell" ,hunspell) > + ("icu4c" ,icu4c) > ("lcms" ,lcms) > + ("libcdr" ,libcdr) > + ("libfreehand" ,libfreehand) > ("libjpeg" ,libjpeg) > + ("libmspub" ,libmspub) > + ("libpagemaker" ,libpagemaker) > + ("librevenge" ,librevenge) > ("libtiff" ,libtiff) > + ("libvisio" ,libvisio) > ("libxml2" ,libxml2) > - ("python" ,python-2) > - ("freetype" ,freetype) > + ("openssl" ,openssl) > + ("podofo" ,podofo) > + ("poppler" ,poppler) > + ("python" ,python-2) ;need Python library > ("qtbase" ,qtbase) > ("qtdeclarative" ,qtdeclarative) > - ("qttools" ,qttools) > ("zlib" ,zlib))) > (native-inputs > - `(("util-linux" ,util-linux) > - ("pkg-config" ,pkg-config))) > - (home-page "http://scribus.net") > + `(("boost" ,boost) Is boost really a native input? I'm surprised. Is it used only for build-related things? Otherwise LGTM. Could you send an updated patch? Then I'll try building it. Thanks, `~Eric From unknown Tue Jun 17 01:44:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28954] [PATCH] Update Scribus to 1.5.3. Re-vamp package. Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 24 Oct 2017 15:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28954 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Eric Bavier Cc: 28954@debbugs.gnu.org Received: via spool by 28954-submit@debbugs.gnu.org id=B28954.15088592744289 (code B ref 28954); Tue, 24 Oct 2017 15:35:02 +0000 Received: (at 28954) by debbugs.gnu.org; 24 Oct 2017 15:34:34 +0000 Received: from localhost ([127.0.0.1]:60042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e71Dp-00016x-6K for submit@debbugs.gnu.org; Tue, 24 Oct 2017 11:34:34 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:35960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e71Di-00016j-6h for 28954@debbugs.gnu.org; Tue, 24 Oct 2017 11:34:27 -0400 Received: from saiph.selenimh (000043010000000000000469.ipv6.commingeshautdebit.fr [IPv6:2a03:a0a0:0:4301::469]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id E8AB6A80D8; Tue, 24 Oct 2017 17:34:19 +0200 (CEST) Received: from ngz by saiph.selenimh with local (Exim 4.89) (envelope-from ) id 1e71De-0000nM-RJ; Tue, 24 Oct 2017 17:34:18 +0200 From: Nicolas Goaziou In-Reply-To: <20171024033436.65edd619@centurylink.net> (Eric Bavier's message of "Tue, 24 Oct 2017 03:34:36 -0500") References: <8760b6rvj8.fsf@nicolasgoaziou.fr> <20171024033436.65edd619@centurylink.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Date: Tue, 24 Oct 2017 17:34:18 +0200 Message-ID: <87lgk0zhj9.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain Hello, Eric Bavier writes: > Remove the blank line between entries. Fixed. > Could you include a url where these patches came from in the patches > themselves? You mention in the package definition that they came from > upstream's trunk. > > Or, for large patches, some have experimented with using an origin that > fetches the patch from upstream rather than pulling the patch into > Guix. I cloned project's git mirror and picked two specific commits. There is no proper URL that I know of. You can see them at https://www.scribus.net/websvn/listing.php?repname=Scribus&peg=22197&rev=22154 and https://www.scribus.net/websvn/listing.php?repname=Scribus&peg=22197&rev=22155 although not as patch files. >> + `(#:tests? #f ;no test target > > I see no need for this whitespace-only change. Considering I rewrote a large part of the package definition, I might as well fix indentation issues. This one is going to bother anyone editing the package with Emacs. With this change, the line isn't modified when re-indenting the whole S-exp. If you are not convinced, consider this to be a nitpicking of mine. > Could you move this into an origin snippet instead? We'd want a fix > like this included in the source when someone uses 'guix build -S > scribus' Done. > Is boost really a native input? I'm surprised. Is it used only for > build-related things? I don't know. I think Archlinux put that in the build side. However, I never know when a package is meant to be a native-input or not. I know the difference between native inputs and inputs, though. Thank you for the review. Regards, -- Nicolas Goaziou 0x80A93738 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-scribus-Update-to-1.5.3.-Re-vamp-package.patch Content-Transfer-Encoding: quoted-printable Content-Description: scribus update - take 2 >From 6fdd0727a064cd041d3581eed0f8d2a30d1f8bfe Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 23 Oct 2017 12:25:13 +0200 Subject: [PATCH] gnu: scribus: Update to 1.5.3. Re-vamp package. * gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch: * gnu/packages/patches/scribus-fix-poppler-packaging.patch: New files. * gnu/local.mk (dist_patch_DATA): Register new files. * gnu/packages/scribus.scm (scribus): Update to 1.5.3. [input]: Add fontconfig, harfbuzz, hunspell, icu4c, libcdr, libfreehand, libmspub, librevenge, libvisio, openssl, podofo, poppler. [native-input]: Move qttools from inputs. Add boost. [home-page]: Fix URL. --- gnu/local.mk | 2 + .../scribus-fix-poppler-0.58-breakage.patch | 526 +++++++++++++++++= ++++ .../patches/scribus-fix-poppler-packaging.patch | 95 ++++ gnu/packages/scribus.scm | 56 ++- 4 files changed, 667 insertions(+), 12 deletions(-) create mode 100644 gnu/packages/patches/scribus-fix-poppler-0.58-breakage.= patch create mode 100644 gnu/packages/patches/scribus-fix-poppler-packaging.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6b70300ff..ff0e74a0b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1022,6 +1022,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-test-threading.patch \ + %D%/packages/patches/scribus-fix-poppler-0.58-breakage.patch \ + %D%/packages/patches/scribus-fix-poppler-packaging.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ diff --git a/gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch b= /gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch new file mode 100644 index 000000000..cd95e9b2a --- /dev/null +++ b/gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch @@ -0,0 +1,526 @@ +diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/im= port/pdf/importpdf.cpp +index 4c462bead..1c0bd8a88 100644 +--- a/scribus/plugins/import/pdf/importpdf.cpp ++++ b/scribus/plugins/import/pdf/importpdf.cpp +@@ -22,6 +22,7 @@ for which a new license (GPL+exception) is in place. + #include =0D + #include =0D + #include =0D ++#include =0D + #include =0D + #include =0D + =0D +@@ -59,6 +60,12 @@ for which a new license (GPL+exception) is in place. + #include "ui/multiprogressdialog.h"=0D + #include "ui/propertiespalette.h"=0D + =0D ++#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \ ++ ((major) * 10000) \ ++ + ((minor) * 100) \ ++ + ((micro) * 1))=0D ++#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MA= JOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)=0D ++=0D + PdfPlug::PdfPlug(ScribusDoc* doc, int flags)=0D + {=0D + tmpSele =3D new Selection(this, false);=0D +@@ -507,12 +514,20 @@ bool PdfPlug::convert(const QString& fn) + {=0D + for (int i =3D 0; i < order->getLength (); ++i)=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object orderItem =3D order->get(i);=0D ++#else=0D + Object orderItem;=0D + order->get(i, &orderItem);=0D ++#endif=0D + if (orderItem.isDict())=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object ref =3D order->getNF(i); =0D ++#else=0D + Object ref;=0D + order->getNF(i, &ref);=0D ++#endif=0D + if (ref.isRef())=0D + {=0D + OptionalContentGroup *oc =3D ocg->findOcgByRef(ref.getRef());= =0D +@@ -523,7 +538,9 @@ bool PdfPlug::convert(const QString& fn) + ocgNames.append(ocgName);=0D + }=0D + }=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + ref.free();=0D ++#endif=0D + }=0D + else=0D + {=0D +@@ -597,39 +614,71 @@ bool PdfPlug::convert(const QString& fn) + dev->layersSetByOCG =3D true;=0D + }=0D + #endif=0D ++=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object info =3D pdfDoc->getDocInfo();=0D ++ if (info.isDict())=0D ++ {=0D ++ Object obj;=0D ++ Dict *infoDict =3D info.getDict();=0D ++ obj =3D infoDict->lookup((char*) "Title");=0D ++ if (obj.isString())=0D ++ {=0D ++ m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString(= )));=0D ++ }=0D ++ obj =3D infoDict->lookup((char*) "Author");=0D ++ if (obj.isString())=0D ++ {=0D ++ m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString= ()));=0D ++ }=0D ++ obj =3D infoDict->lookup((char*) "Subject");=0D ++ if (obj.isString())=0D ++ {=0D ++ m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getStrin= g()));=0D ++ }=0D ++ obj =3D infoDict->lookup((char*) "Keywords");=0D ++ if (obj.isString())=0D ++ {=0D ++ // s1 =3D obj.getString();=0D ++ m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getStri= ng()));=0D ++ }=0D ++ }=0D ++ info =3D Object();=0D ++#else=0D + Object info;=0D + pdfDoc->getDocInfo(&info);=0D + if (info.isDict())=0D + {=0D + Object obj;=0D +- // GooString *s1;=0D ++ // GooString *s1;=0D + Dict *infoDict =3D info.getDict();=0D +- if (infoDict->lookup((char*)"Title", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Title", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString(= )));=0D + obj.free();=0D + }=0D +- if (infoDict->lookup((char*)"Author", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Author", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString= ()));=0D + obj.free();=0D + }=0D +- if (infoDict->lookup((char*)"Subject", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Subject", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getStrin= g()));=0D + obj.free();=0D + }=0D +- if (infoDict->lookup((char*)"Keywords", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Keywords", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getStri= ng()));=0D + obj.free();=0D + }=0D + }=0D + info.free();=0D ++#endif=0D + if (cropped)=0D + {=0D + QRectF crBox =3D getCBox(contentRect, pageNs[0]);=0D +@@ -746,8 +795,13 @@ bool PdfPlug::convert(const QString& fn) + pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, cr= op, printing, NULL, NULL, dev->annotations_callback, dev);=0D + }=0D + PDFPresentationData ef;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object trans =3D pdfDoc->getPage(pp)->getTrans();=0D ++ Object *transi =3D &trans;=0D ++#else=0D + Object trans;=0D + Object *transi =3D pdfDoc->getPage(pp)->getTrans(&trans);=0D ++#endif=0D + if (transi->isDict())=0D + {=0D + m_Doc->pdfOptions().PresentMode =3D true;=0D +@@ -793,32 +847,51 @@ bool PdfPlug::convert(const QString& fn) + delete pgTrans;=0D + }=0D + m_Doc->currentPage()->PresentVals =3D ef;=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + trans.free();=0D + transi->free();=0D ++#endif=0D + }=0D + int numjs =3D pdfDoc->getCatalog()->numJS();=0D + if (numjs > 0)=0D + {=0D + NameTree *jsNameTreeP =3D new NameTree();=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object catDict =3D pdfDoc->getXRef()->getCatalog();=0D ++#else=0D + Object catDict;=0D + pdfDoc->getXRef()->getCatalog(&catDict);=0D ++#endif=0D + if (catDict.isDict())=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object names =3D catDict.dictLookup("Names");=0D ++#else=0D + Object names;=0D + catDict.dictLookup("Names", &names);=0D ++#endif=0D + if (names.isDict())=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object obj =3D names.dictLookup("JavaScript");=0D ++ jsNameTreeP->init(pdfDoc->getXRef(), &obj);=0D ++#else=0D + Object obj;=0D + names.dictLookup("JavaScript", &obj);=0D + jsNameTreeP->init(pdfDoc->getXRef(), &obj);=0D + obj.free();=0D ++#endif=0D + }=0D + for (int a =3D 0; a < numjs; a++)=0D + {=0D + m_Doc->JavaScripts.insert(UnicodeParsedString(jsNameTreeP->getNa= me(a)), UnicodeParsedString(pdfDoc->getCatalog()->getJS(a)));=0D + }=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ names =3D catDict.dictLookup("OpenAction");=0D ++#else=0D + names.free();=0D + catDict.dictLookup("OpenAction", &names);=0D ++#endif=0D + if (names.isDict())=0D + {=0D + LinkAction *linkAction =3D NULL;=0D +@@ -839,9 +912,13 @@ bool PdfPlug::convert(const QString& fn) + }=0D + }=0D + }=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + names.free();=0D ++#endif=0D + }=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + catDict.free();=0D ++#endif=0D + delete jsNameTreeP;=0D + }=0D + m_Doc->pdfOptions().Version =3D (PDFOptions::PDFVersion)qMin(15, qM= ax(13, pdfDoc->getPDFMajorVersion() * 10 + pdfDoc->getPDFMinorVersion()));= =0D +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/im= port/pdf/slaoutput.cpp +index 32cfed101..ffa417a3b 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -6,6 +6,7 @@ for which a new license (GPL+exception) is in place. + */=0D + =0D + #include "slaoutput.h"=0D ++#include =0D + #include =0D + #include =0D + #include =0D +@@ -19,11 +20,49 @@ for which a new license (GPL+exception) is in place. + #include "util_math.h"=0D + #include =0D + =0D ++#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \ ++ ((major) * 10000) \ ++ + ((minor) * 100) \ ++ + ((micro) * 1))=0D ++#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MA= JOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)=0D ++=0D + LinkSubmitForm::LinkSubmitForm(Object *actionObj)=0D + {=0D + Object obj1, obj2, obj3;=0D + fileName =3D NULL;=0D + m_flags =3D 0;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ if (actionObj->isDict())=0D ++ {=0D ++ obj1 =3D actionObj->dictLookup("F");=0D ++ if (!obj1.isNull())=0D ++ {=0D ++ if (obj1.isDict())=0D ++ {=0D ++ obj3 =3D obj1.dictLookup("FS");=0D ++ if (!obj3.isNull())=0D ++ {=0D ++ if (obj3.isName())=0D ++ {=0D ++ char *name =3D obj3.getName();=0D ++ if (!strcmp(name, "URL"))=0D ++ {=0D ++ obj2 =3D obj1.dictLookup("F");=0D ++ if (!obj2.isNull())=0D ++ fileName =3D obj2.getString()->copy();=0D ++ }=0D ++ }=0D ++ }=0D ++ }=0D ++ }=0D ++ obj1 =3D actionObj->dictLookup("Flags");=0D ++ if (!obj1.isNull())=0D ++ {=0D ++ if (obj1.isNum())=0D ++ m_flags =3D obj1.getInt();=0D ++ }=0D ++ }=0D ++#else=0D + if (actionObj->isDict())=0D + {=0D + if (!actionObj->dictLookup("F", &obj1)->isNull())=0D +@@ -54,6 +93,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj) + }=0D + obj1.free();=0D + }=0D ++#endif=0D + }=0D + =0D + LinkSubmitForm::~LinkSubmitForm()=0D +@@ -66,11 +106,25 @@ LinkImportData::LinkImportData(Object *actionObj) + {=0D + Object obj1, obj3;=0D + fileName =3D NULL;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ if (actionObj->isDict())=0D ++ {=0D ++ obj1 =3D actionObj->dictLookup("F");=0D ++ if (!obj1.isNull())=0D ++ {=0D ++ obj3 =3D getFileSpecNameForPlatform(&obj1);=0D ++ if (!obj3.isNull())=0D ++ {=0D ++ fileName =3D obj3.getString()->copy();=0D ++ }=0D ++ }=0D ++ }=0D ++#else=0D + if (actionObj->isDict())=0D + {=0D + if (!actionObj->dictLookup("F", &obj1)->isNull())=0D + {=0D +- if (getFileSpecNameForPlatform (&obj1, &obj3))=0D ++ if (getFileSpecNameForPlatform(&obj1, &obj3))=0D + {=0D + fileName =3D obj3.getString()->copy();=0D + obj3.free();=0D +@@ -78,6 +132,7 @@ LinkImportData::LinkImportData(Object *actionObj) + }=0D + obj1.free();=0D + }=0D ++#endif=0D + }=0D + =0D + LinkImportData::~LinkImportData()=0D +@@ -256,6 +311,27 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *a= no) + Object obj;=0D + Ref refa =3D ano->getRef();=0D + Object additionalActions;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj =3D xref->fetch(refa.num, refa.gen);=0D ++ if (obj.isDict())=0D ++ {=0D ++ Dict* adic =3D obj.getDict();=0D ++ additionalActions =3D adic->lookupNF("A");=0D ++ Object additionalActionsObject =3D additionalActions.fetch(pdfDoc->getX= Ref());=0D ++ if (additionalActionsObject.isDict())=0D ++ {=0D ++ Object actionObject =3D additionalActionsObject.dictLookup("S");=0D ++ if (actionObject.isName("ImportData"))=0D ++ {=0D ++ linkAction =3D new LinkImportData(&additionalActionsObject);=0D ++ }=0D ++ else if (actionObject.isName("SubmitForm"))=0D ++ {=0D ++ linkAction =3D new LinkSubmitForm(&additionalActionsObject);=0D ++ }=0D ++ }=0D ++ }=0D ++#else=0D + Object *act =3D xref->fetch(refa.num, refa.gen, &obj);=0D + if (act)=0D + {=0D +@@ -283,6 +359,7 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *an= o) + }=0D + }=0D + obj.free();=0D ++#endif=0D + return linkAction;=0D + }=0D + =0D +@@ -293,6 +370,22 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(cons= t char *key, AnnotWidget *a + Object obj;=0D + Ref refa =3D ano->getRef();=0D + Object additionalActions;=0D ++=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj =3D xref->fetch(refa.num, refa.gen);=0D ++ if (obj.isDict())=0D ++ {=0D ++ Dict* adic =3D obj.getDict();=0D ++ additionalActions =3D adic->lookupNF("AA");=0D ++ Object additionalActionsObject =3D additionalActions.fetch(pdfDoc->getX= Ref());=0D ++ if (additionalActionsObject.isDict())=0D ++ {=0D ++ Object actionObject =3D additionalActionsObject.dictLookup(key);=0D ++ if (actionObject.isDict())=0D ++ linkAction =3D LinkAction::parseAction(&actionObject, pdfDoc->getCata= log()->getBaseURI());=0D ++ }=0D ++ }=0D ++#else=0D + Object *act =3D xref->fetch(refa.num, refa.gen, &obj);=0D + if (act)=0D + {=0D +@@ -313,6 +406,7 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(const= char *key, AnnotWidget *a + }=0D + }=0D + obj.free();=0D ++#endif=0D + return linkAction;=0D + }=0D + =0D +@@ -838,6 +932,33 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, d= ouble xCoor, double yCoor, + {=0D + Object obj1;=0D + Ref refa =3D annota->getRef();=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj1 =3D xref->fetch(refa.num, refa.gen);=0D ++ if (obj1.isDict())=0D ++ {=0D ++ Dict* dict =3D obj1.getDict();=0D ++ Object obj2 =3D dict->lookup("Kids");=0D ++ //childs=0D ++ if (obj2.isArray())=0D ++ {=0D ++ // Load children=0D ++ QList radList;=0D ++ for (int i =3D 0; i < obj2.arrayGetLength(); i++)=0D ++ {=0D ++ Object childRef =3D obj2.arrayGetNF(i);=0D ++ if (!childRef.isRef())=0D ++ continue;=0D ++ Object childObj =3D obj2.arrayGet(i);=0D ++ if (!childObj.isDict())=0D ++ continue;=0D ++ const Ref ref =3D childRef.getRef();=0D ++ radList.append(ref.num);=0D ++ }=0D ++ QString tmTxt =3D UnicodeParsedString(annota->getName());=0D ++ m_radioMap.insert(tmTxt, radList);=0D ++ }=0D ++ }=0D ++#else=0D + Object *act =3D xref->fetch(refa.num, refa.gen, &obj1);=0D + if (act && act->isDict())=0D + {=0D +@@ -873,6 +994,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, do= uble xCoor, double yCoor, + obj2.free();=0D + }=0D + obj1.free();=0D ++#endif=0D + }=0D + return retVal;=0D + }=0D +@@ -3007,6 +3129,23 @@ void SlaOutputDev::beginMarkedContent(char *name, O= bject *dictRef) + }=0D + else=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ dictObj =3D dictRef->fetch(xref);=0D ++ if (!dictObj.isDict())=0D ++ return;=0D ++ dict =3D dictObj.getDict();=0D ++ dictType =3D dict->lookup("Type");=0D ++ if (dictType.isName("OCG"))=0D ++ {=0D ++ oc =3D contentConfig->findOcgByRef(dictRef->getRef());=0D ++ if (oc)=0D ++ {=0D ++ // qDebug() << "Begin OCG Content with Name " << UnicodeParsedSt= ring(oc->getName());=0D ++ m_doc->setActiveLayer(UnicodeParsedString(oc->getName()));=0D ++ mSte.ocgName =3D UnicodeParsedString(oc->getName());=0D ++ }=0D ++ }=0D ++#else=0D + dictRef->fetch(xref, &dictObj);=0D + if (!dictObj.isDict())=0D + {=0D +@@ -3027,6 +3166,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Ob= ject *dictRef) + }=0D + dictType.free();=0D + dictObj.free();=0D ++#endif=0D + }=0D + }=0D + m_mcStack.push(mSte);=0D +@@ -3046,14 +3186,20 @@ void SlaOutputDev::beginMarkedContent(char *name, = Dict *properties) + {=0D + if (layersSetByOCG)=0D + return;=0D +- Object obj;=0D + QString lName =3D QString("Layer_%1").arg(layerNum + 1);=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object obj =3D properties->lookup((char*) "Title");=0D ++ if (obj.isString())=0D ++ lName =3D QString(obj.getString()->getCString());=0D ++#else=0D ++ Object obj;=0D + if (properties->lookup((char*)"Title", &obj))=0D + {=0D + if (obj.isString())=0D + lName =3D QString(obj.getString()->getCString());=0D + obj.free();=0D + }=0D ++#endif=0D + for (ScLayers::iterator it =3D m_doc->Layers.begin(); it !=3D m_doc->L= ayers.end(); ++it)=0D + {=0D + if (it->Name =3D=3D lName)=0D +@@ -3066,6 +3212,29 @@ void SlaOutputDev::beginMarkedContent(char *name, D= ict *properties) + if (!firstLayer)=0D + currentLayer =3D m_doc->addLayer(lName, true);=0D + firstLayer =3D false;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj =3D properties->lookup((char*) "Visible");=0D ++ if (obj.isBool())=0D ++ m_doc->setLayerVisible(currentLayer, obj.getBool());=0D ++ obj =3D properties->lookup((char*) "Editable");=0D ++ if (obj.isBool())=0D ++ m_doc->setLayerLocked(currentLayer, !obj.getBool());=0D ++ obj =3D properties->lookup((char*) "Printed");=0D ++ if (obj.isBool())=0D ++ m_doc->setLayerPrintable(currentLayer, obj.getBool());=0D ++ obj =3D properties->lookup((char*)"Color");=0D ++ if (obj.isArray())=0D ++ {=0D ++ Object obj1;=0D ++ obj1 =3D obj.arrayGet(0);=0D ++ int r =3D obj1.getNum() / 256;=0D ++ obj1 =3D obj.arrayGet(1);=0D ++ int g =3D obj1.getNum() / 256;=0D ++ obj1 =3D obj.arrayGet(2);=0D ++ int b =3D obj1.getNum() / 256;=0D ++ m_doc->setLayerMarker(currentLayer, QColor(r, g, b));=0D ++ }=0D ++#else=0D + if (properties->lookup((char*)"Visible", &obj))=0D + {=0D + if (obj.isBool())=0D +@@ -3102,6 +3271,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Di= ct *properties) + }=0D + obj.free();=0D + }=0D ++#endif=0D + }=0D + }=0D + }=0D +--=20 +2.14.2 + diff --git a/gnu/packages/patches/scribus-fix-poppler-packaging.patch b/gnu= /packages/patches/scribus-fix-poppler-packaging.patch new file mode 100644 index 000000000..2659bafa6 --- /dev/null +++ b/gnu/packages/patches/scribus-fix-poppler-packaging.patch @@ -0,0 +1,95 @@ +diff --git a/.travis.yml b/.travis.yml +index 6e9562b2c..f4273227a 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -31,8 +31,8 @@ before_install: + libhyphen-dev liblcms2-dev libpodofo-dev libtiff-dev libxml2-dev + python-all-dev zlib1g-dev qt58base qt58declarative + qt58tools libgraphicsmagick++1-dev +- libopenscenegraph-dev libpoppler-dev libcairo2-dev libwpg-dev libms= pub-dev +- libcdr-dev libvisio-dev libharfbuzz-dev libharfbuzz-icu0 ++ libopenscenegraph-dev libpoppler-dev libpoppler-cpp-dev libcairo2-d= ev libwpg-dev=20 ++ libmspub-dev libcdr-dev libvisio-dev libharfbuzz-dev libharfbuzz-ic= u0 + coreutils binutils python-tk; + fi + # OSX +diff --git a/cmake/modules/FindPOPPLER.cmake b/cmake/modules/FindPOPPLER.c= make +index d684bd503..899284db6 100644 +--- a/cmake/modules/FindPOPPLER.cmake ++++ b/cmake/modules/FindPOPPLER.cmake +@@ -1,12 +1,16 @@ + if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) + include(UsePkgConfig) + PKGCONFIG(poppler _libPopplerIncDir _libPopplerLinkDir _libPopplerLinkFl= ags _libPopplerCflags) +- set(PKG_POPPLER_INCLUDE_DIRS ${_libPopplerIncDir}) +- set(PKG_POPPLER_LIBRARIES ${_libPopplerLinkDir}) +- else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) +- include(FindPkgConfig) ++ set(PKG_POPPLER_INCLUDE_DIRS ${_libPopplerIncDir}) ++ set(PKG_POPPLER_LIBRARIES ${_libPopplerLinkDir}) ++else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) ++ include(FindPkgConfig) + pkg_search_module(POPPLER libpoppler>=3D0.19.0 poppler>=3D0.19.0) +- endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) ++ if (POPPLER_FOUND) ++ pkg_search_module(POPPLER_CPP REQUIRED libpoppler-cpp>=3D0.19.0 poppler= -cpp>=3D0.19.0) ++ endif(POPPLER_FOUND) ++endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) ++=20 + find_path(POPPLER_INCLUDE_DIR=20 + NAMES poppler-config.h + PATHS ${PKG_POPPLER_INCLUDE_DIRS} ${POPPLER_INCLUDE_DIRS} /usr/local/in= clude /usr/include +@@ -14,16 +18,31 @@ find_path(POPPLER_INCLUDE_DIR + NO_DEFAULT_PATH + ) +=20 ++find_path(POPPLER_CPP_INCLUDE_DIR=20 ++ NAMES poppler-version.h ++ PATHS ${PKG_POPPLER_CPP_INCLUDE_DIRS} ${POPPLER_CPP_INCLUDE_DIRS} /usr/= local/include /usr/include ++ PATH_SUFFIXES poppler ++ NO_DEFAULT_PATH ++) ++ + find_library(POPPLER_LIBRARY + NAMES libpoppler poppler + PATHS ${PKG_POPPLER_LIBRARIES} ${POPPLER_LIBRARY_DIRS} /usr/local/lib /= usr/lib /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} + PATH_SUFFIXES poppler + NO_DEFAULT_PATH + ) ++ ++find_library(POPPLER_CPP_LIBRARY ++ NAMES libpoppler-cpp poppler-cpp ++ PATHS ${PKG_POPPLER_CPP_LIBRARIES} ${POPPLER_CPP_LIBRARY_DIRS} /usr/loc= al/lib /usr/lib /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} ++ PATH_SUFFIXES poppler ++ NO_DEFAULT_PATH ++) ++ + if (POPPLER_LIBRARY) +- if (POPPLER_INCLUDE_DIR) ++ if (POPPLER_INCLUDE_DIR AND POPPLER_CPP_INCLUDE_DIR) + set( FOUND_POPPLER 1 ) +- set( POPPLER_LIBRARIES ${POPPLER_LIBRARY} ) +- set( POPPLER_INCLUDES ${POPPLER_INCLUDE_DIR}) +- endif (POPPLER_INCLUDE_DIR) ++ set( POPPLER_LIBRARIES ${POPPLER_LIBRARY} ${POPPLER_CPP_LIBRARY} ) ++ set( POPPLER_INCLUDES ${POPPLER_INCLUDE_DIR} ${POPPLER_CPP_INCLUDE_DI= R} ) ++ endif (POPPLER_INCLUDE_DIR AND POPPLER_CPP_INCLUDE_DIR) + endif (POPPLER_LIBRARY) +diff --git a/scribus/plugins/import/pdf/CMakeLists.txt b/scribus/plugins/i= mport/pdf/CMakeLists.txt +index cd1610298..85760d96e 100644 +--- a/scribus/plugins/import/pdf/CMakeLists.txt ++++ b/scribus/plugins/import/pdf/CMakeLists.txt +@@ -2,9 +2,9 @@ include_directories( + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/scribus + ${POPPLER_INCLUDE_DIR} ++ ${POPPLER_CPP_INCLUDE_DIR} + ) +=20 +- + set(IMPORTPDF_PLUGIN_UI_SRC + pdfimportoptions.ui + ) +--=20 +2.14.2 + diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index d48051ee3..3c5232ec3 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 Ricardo Wurmus ;;; Copyright =C2=A9 2016 Efraim Flashner +;;; Copyright =C2=A9 2017 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,53 +25,84 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cmake) #:use-module (gnu packages) + #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages cups) #:use-module (gnu packages fontutils) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) + #:use-module (gnu packages imagemagick) + #:use-module (gnu packages libreoffice) #:use-module (gnu packages linux) + #:use-module (gnu packages pdf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages qt) - #:use-module (gnu packages imagemagick) + #:use-module (gnu packages tls) #:use-module (gnu packages xml)) =20 (define-public scribus (package (name "scribus") - (version "1.5.2") + (version "1.5.3") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/scribus/scribus-de= vel/" version "/scribus-" version ".tar.xz")) (sha256 (base32 - "1xbl7h4x32y2nfhn57ivjziyvlnwadcbizqwfqx5srfsmqiyqppc")))) + "0kyp45vidxa3v35ic9592db4zk3m8al26vck38q5v7z14x3hp8vk")) + (patches + ;; These patches are necessary to build package with Popple= r >=3D + ;; 0.58. They are extracted from trunk and will be include= d in + ;; Scribus 1.5.4. + (search-patches "scribus-fix-poppler-0.58-breakage.patch" + "scribus-fix-poppler-packaging.patch")) + (modules '((guix build utils))) + (snippet + ;; Fix typo. Patch included in trunk. See + ;; . + '(substitute* "cmake/modules/FindLIBPODOFO.cmake" + (("find_package\\(OPENSSL\\)") "find_package(OpenSSL)"))= ))) (build-system cmake-build-system) (arguments - `(#:tests? #f ; no test target + `(#:tests? #f ;no test target #:configure-flags - '("-DCMAKE_CXX_FLAGS=3D-std=3Dgnu++11"))) + '("-DWANT_GRAPHICSMAGICK=3D1"))) (inputs - `(("cairo" ,cairo) + `(("boost" ,boost) + ("cairo" ,cairo) ("cups" ,cups) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) ("graphicsmagick" ,graphicsmagick) + ("harfbuzz" ,harfbuzz) + ("hunspell" ,hunspell) + ("icu4c" ,icu4c) ("lcms" ,lcms) + ("libcdr" ,libcdr) + ("libfreehand" ,libfreehand) ("libjpeg" ,libjpeg) + ("libmspub" ,libmspub) + ("libpagemaker" ,libpagemaker) + ("librevenge" ,librevenge) ("libtiff" ,libtiff) + ("libvisio" ,libvisio) ("libxml2" ,libxml2) - ("python" ,python-2) - ("freetype" ,freetype) + ("openssl" ,openssl) + ("podofo" ,podofo) + ("poppler" ,poppler) + ("python" ,python-2) ;need Python library ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) - ("qttools" ,qttools) ("zlib" ,zlib))) (native-inputs - `(("util-linux" ,util-linux) - ("pkg-config" ,pkg-config))) - (home-page "http://scribus.net") + `(("pkg-config" ,pkg-config) + ("qttools" ,qttools) + ("util-linux" ,util-linux))) + (home-page "https://www.scribus.net") (synopsis "Desktop publishing and page layout program") (description "Scribus is a @dfn{desktop publishing} (DTP) application and can be u= sed --=20 2.14.2 --=-=-=-- From unknown Tue Jun 17 01:44:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28954] [PATCH] Update Scribus to 1.5.3. Re-vamp package. Resent-From: Eric Bavier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Oct 2017 04:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28954 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Goaziou Cc: 28954@debbugs.gnu.org Received: via spool by 28954-submit@debbugs.gnu.org id=B28954.15089918401969 (code B ref 28954); Thu, 26 Oct 2017 04:24:02 +0000 Received: (at 28954) by debbugs.gnu.org; 26 Oct 2017 04:24:00 +0000 Received: from localhost ([127.0.0.1]:33813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Zhx-0000VY-Ho for submit@debbugs.gnu.org; Thu, 26 Oct 2017 00:24:00 -0400 Received: from mail.centurylink.net ([205.219.233.9]:15322 helo=smtp.centurylink.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7Zhv-0000VK-Qh for 28954@debbugs.gnu.org; Thu, 26 Oct 2017 00:23:52 -0400 DKIM-Signature: v=1; a=rsa-sha1; d=centurylink.net; s=ctl201402; c=relaxed/simple; q=dns/txt; i=@centurylink.net; t=1508991826; h=From:Subject:Date:To:MIME-Version:Content-Type; bh=fqKleIgeIletCbfjAsLDXofmOlY=; b=xpmt1I4pqg74JQIwwFOrtLxUYYGIVEJhBMPIr0AngO3qOKI42WKjZ9fGTAp63e2u bMFy1EujHAJf4Np0d5FoKR1A7CBhuLOBFOOlLEUG/UjxXKC1co8TImQZzUg9ngst Dqq86lPTzMSftwlCNoPCb4EdTEjf4vwfnSY1zzE9JAPGyQaI16utRVpytt3AqlLR RYJ/yLFWmceOoE/2GRBvn+RglRV1JrLESqhbEDGifFqiarOggoJq0rcuV/Sf1UhD 8Ouo/n7DkAN3DXR9K+q2FYEHVsQkYnOi2beXBwrhgUFgNzWlYRAnjFK6BCJjc3XI x1IhN8Ux75kYS5KxHWNtvA==; X_CMAE_Category: , , X-CNFS-Analysis: v=2.2 cv=Bfua6fl2 c=1 sm=1 tr=0 a=vYGdbaltFBZNd9BlzHJvqw==:117 a=vYGdbaltFBZNd9BlzHJvqw==:17 a=KGjhK52YXX0A:10 a=1x0kU5LsU6YA:10 a=02M-m0pO-4AA:10 a=zSv6zi-ZgakA:10 a=I_5RNyk1AAAA:8 a=iIfsmPQ1AAAA:8 a=kb57kwaRQaAkK9ejO_QA:9 a=CjuIK1q_8ugA:10 a=nkPxWaZsEqoA:10 a=inoG4m36AAAA:8 a=1cBlP2KbAAAA:8 a=NEAV23lmAAAA:8 a=a9uKs-LIpkMRwPdlxYoA:9 a=s602_O6NB9gA:10 a=i1Onrr28YPwNiekmoLwA:9 a=Eh9yxdLE6B1twWrs3SXz:22 a=2yt72UtZcGNphq7gSX6B:22 a=_Qgj-RFg6mImvLaOgLPg:22 a=sVIR2NZf5ZpJ0KoDd6yV:22 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine X-Authed-Username: ZXJpY2JhdmllckBjZW50dXJ5bGluay5uZXQ= Authentication-Results: smtp03.agate.dfw.synacor.com smtp.user=ericbavier@centurylink.net; auth=pass (LOGIN) Received: from [97.116.109.77] ([97.116.109.77:38706] helo=localhost) by smtp.centurylink.net (envelope-from ) (ecelerity 3.5.1.37854 r(Momo-dev:3.5.1.0)) with ESMTPSA (cipher=AES256-GCM-SHA384) id 53/04-11538-15361F95; Thu, 26 Oct 2017 00:23:45 -0400 Date: Wed, 25 Oct 2017 18:23:56 -0500 From: Eric Bavier Message-ID: <20171025182356.441331a3@centurylink.net> In-Reply-To: <87lgk0zhj9.fsf@nicolasgoaziou.fr> References: <8760b6rvj8.fsf@nicolasgoaziou.fr> <20171024033436.65edd619@centurylink.net> <87lgk0zhj9.fsf@nicolasgoaziou.fr> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/EBkQ/nId11a=grW8fU=T5xX" X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello Nicolas, Thanks for the quick fixes. On Tue, 24 Oct 2017 17:34:18 +0200 Nicolas Goaziou wrote: [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid --MP_/EBkQ/nId11a=grW8fU=T5xX Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello Nicolas, Thanks for the quick fixes. On Tue, 24 Oct 2017 17:34:18 +0200 Nicolas Goaziou wrote: > Hello, > > Eric Bavier writes: > > > Could you include a url where these patches came from in the patches > > themselves? You mention in the package definition that they came from > > upstream's trunk. > > > > Or, for large patches, some have experimented with using an origin that > > fetches the patch from upstream rather than pulling the patch into > > Guix. > > I cloned project's git mirror and picked two specific commits. There is > no proper URL that I know of. > > You can see them at > > https://www.scribus.net/websvn/listing.php?repname=Scribus&peg=22197&rev=22154 > > and > > https://www.scribus.net/websvn/listing.php?repname=Scribus&peg=22197&rev=22155 > > although not as patch files. The scribus team has a "mirror" on github that tracks the svn repository. I was able to find the patches there. What do you think of this version of your patch? 'guix lint scribus' complains about the patch file names, but that should probably get a bug. `~Eric --MP_/EBkQ/nId11a=grW8fU=T5xX Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=0001-gnu-scribus-Update-to-1.5.3.-Add-inputs.patch =46rom a69f37e8dc715cc3fd6008ffc360dc8a3f84e3c9 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 23 Oct 2017 12:25:13 +0200 Subject: [PATCH] gnu: scribus: Update to 1.5.3. Add inputs. * gnu/packages/scribus.scm (scribus): Update to 1.5.3. [input]: Add fontconfig, harfbuzz, hunspell, icu4c, libcdr, libfreehand, libmspub, librevenge, libvisio, openssl, podofo, poppler, and boost. Move qttools to ... [native-input]: ... here. [home-page]: Fix URL. Co-authored-by: Eric Bavier --- gnu/packages/scribus.scm | 79 +++++++++++++++++++++++++++++++++++++-------= ---- 1 file changed, 61 insertions(+), 18 deletions(-) diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index d48051ee3..6230195ed 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 Ricardo Wurmus ;;; Copyright =C2=A9 2016 Efraim Flashner +;;; Copyright =C2=A9 2017 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,53 +25,95 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cmake) #:use-module (gnu packages) + #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages cups) #:use-module (gnu packages fontutils) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) + #:use-module (gnu packages imagemagick) + #:use-module (gnu packages libreoffice) #:use-module (gnu packages linux) + #:use-module (gnu packages pdf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages qt) - #:use-module (gnu packages imagemagick) + #:use-module (gnu packages tls) #:use-module (gnu packages xml)) =20 (define-public scribus (package (name "scribus") - (version "1.5.2") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/scribus/scribus-de= vel/" - version "/scribus-" version ".tar.xz")) - (sha256 - (base32 - "1xbl7h4x32y2nfhn57ivjziyvlnwadcbizqwfqx5srfsmqiyqppc")))) + (version "1.5.3") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/scribus/scribus-devel/" + version "/scribus-" version ".tar.xz")) + (sha256 + (base32 + "0kyp45vidxa3v35ic9592db4zk3m8al26vck38q5v7z14x3hp8vk")) + (patches + (list + (origin + (method url-fetch) + (uri (string-append "https://github.com/scribusproject/scribus/= commit/" + "61186c7ef083046b7e0c908952e8a773e2787d82.p= atch")) + (file-name "scribus-fix-poppler-0.58-breakage.patch") + (sha256 + (base32 "189qw9xmgz01xz1w1bi9lzrp399zk1j1iz5qdhchdrhgnd69b7ly"= ))) + (origin + (method url-fetch) + (uri (string-append "https://github.com/scribusproject/scribus/= commit/" + "d82b1c989bd0e79b5611521f671adbfb94996e5e.p= atch")) + (file-name "scribus-fix-poppler-packaging.patch") + (sha256 + (base32 "1p9s18jjvj2h0ba1xvk1zhmnn4f4n3ykrgb56mjd6in30h0vrykx"= ))))) + (modules '((guix build utils))) + (snippet + ;; Fix typo. Equivalent to patch at + ;; https://bugs.scribus.net/view.php?id=3D14850 + '(substitute* "cmake/modules/FindLIBPODOFO.cmake" + (("find_package\\(OPENSSL\\)") "find_package(OpenSSL)"))))) (build-system cmake-build-system) (arguments - `(#:tests? #f ; no test target + `(#:tests? #f ;no test target #:configure-flags - '("-DCMAKE_CXX_FLAGS=3D-std=3Dgnu++11"))) + '("-DWANT_GRAPHICSMAGICK=3D1"))) (inputs - `(("cairo" ,cairo) + `(("boost" ,boost) + ("cairo" ,cairo) ("cups" ,cups) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) ("graphicsmagick" ,graphicsmagick) + ("harfbuzz" ,harfbuzz) + ("hunspell" ,hunspell) + ("icu4c" ,icu4c) ("lcms" ,lcms) + ("libcdr" ,libcdr) + ("libfreehand" ,libfreehand) ("libjpeg" ,libjpeg) + ("libmspub" ,libmspub) + ("libpagemaker" ,libpagemaker) + ("librevenge" ,librevenge) ("libtiff" ,libtiff) + ("libvisio" ,libvisio) ("libxml2" ,libxml2) - ("python" ,python-2) - ("freetype" ,freetype) + ("openssl" ,openssl) + ("podofo" ,podofo) + ("poppler" ,poppler) + ("python" ,python-2) ;need Python library ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) - ("qttools" ,qttools) ("zlib" ,zlib))) (native-inputs - `(("util-linux" ,util-linux) - ("pkg-config" ,pkg-config))) - (home-page "http://scribus.net") + `(("pkg-config" ,pkg-config) + ("qttools" ,qttools) + ("util-linux" ,util-linux))) + (home-page "https://www.scribus.net") (synopsis "Desktop publishing and page layout program") (description "Scribus is a @dfn{desktop publishing} (DTP) application and can be u= sed --=20 2.14.2 --MP_/EBkQ/nId11a=grW8fU=T5xX-- From unknown Tue Jun 17 01:44:22 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#28954] [PATCH] Update Scribus to 1.5.3. Re-vamp package. Resent-From: Nicolas Goaziou Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 Oct 2017 05:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28954 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Eric Bavier Cc: 28954@debbugs.gnu.org Received: via spool by 28954-submit@debbugs.gnu.org id=B28954.15089949317367 (code B ref 28954); Thu, 26 Oct 2017 05:16:01 +0000 Received: (at 28954) by debbugs.gnu.org; 26 Oct 2017 05:15:31 +0000 Received: from localhost ([127.0.0.1]:33869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7aVv-0001ul-6u for submit@debbugs.gnu.org; Thu, 26 Oct 2017 01:15:31 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:40483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e7aVt-0001ub-1l for 28954@debbugs.gnu.org; Thu, 26 Oct 2017 01:15:29 -0400 Received: from saiph.selenimh (000043010000000000000469.ipv6.commingeshautdebit.fr [IPv6:2a03:a0a0:0:4301::469]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id EAD111720A4; Thu, 26 Oct 2017 07:15:26 +0200 (CEST) Received: from ngz by saiph.selenimh with local (Exim 4.89) (envelope-from ) id 1e7aVp-0003JN-Ex; Thu, 26 Oct 2017 07:15:25 +0200 From: Nicolas Goaziou In-Reply-To: <20171025182356.441331a3@centurylink.net> (Eric Bavier's message of "Wed, 25 Oct 2017 18:23:56 -0500") References: <8760b6rvj8.fsf@nicolasgoaziou.fr> <20171024033436.65edd619@centurylink.net> <87lgk0zhj9.fsf@nicolasgoaziou.fr> <20171025182356.441331a3@centurylink.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Date: Thu, 26 Oct 2017 07:15:25 +0200 Message-ID: <877evizdzm.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hello, Eric Bavier writes: > The scribus team has a "mirror" on github that tracks the svn > repository. That's the repository I cloned to generate the patches. > I was able to find the patches there. What do you think of this > version of your patch? I didn't know you could generate a patch that way. That is better, indeed! Thank you. Regards, -- Nicolas Goaziou 0x80A93738 From unknown Tue Jun 17 01:44:22 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Nicolas Goaziou Subject: bug#28954: closed (Re: [bug#28954] [PATCH] Update Scribus to 1.5.3. Re-vamp package.) Message-ID: References: <87y3nuweub.fsf@nicolasgoaziou.fr> <8760b6rvj8.fsf@nicolasgoaziou.fr> X-Gnu-PR-Message: they-closed 28954 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 28954@debbugs.gnu.org Date: Sun, 29 Oct 2017 08:15:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1509264902-3572-1" This is a multi-part message in MIME format... ------------=_1509264902-3572-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #28954: [PATCH] Update Scribus to 1.5.3. Re-vamp package. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 28954@debbugs.gnu.org. --=20 28954: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D28954 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1509264902-3572-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 28954-done) by debbugs.gnu.org; 29 Oct 2017 08:14:24 +0000 Received: from localhost ([127.0.0.1]:39720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8ijg-0000pS-Hw for submit@debbugs.gnu.org; Sun, 29 Oct 2017 04:14:24 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:42751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e8ijf-0000p2-3m for 28954-done@debbugs.gnu.org; Sun, 29 Oct 2017 04:14:23 -0400 Received: from saiph.selenimh (unknown [IPv6:2a01:e34:ec4b:72a0:9c6c:1d5e:e4fa:6b49]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id AA4DCC5A4E; Sun, 29 Oct 2017 09:14:20 +0100 (CET) Received: from ngz by saiph.selenimh with local (Exim 4.89) (envelope-from ) id 1e8ijc-0001JR-4q; Sun, 29 Oct 2017 09:14:20 +0100 From: Nicolas Goaziou To: Eric Bavier Subject: Re: [bug#28954] [PATCH] Update Scribus to 1.5.3. Re-vamp package. In-Reply-To: <877evizdzm.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Thu, 26 Oct 2017 07:15:25 +0200") References: <8760b6rvj8.fsf@nicolasgoaziou.fr> <20171024033436.65edd619@centurylink.net> <87lgk0zhj9.fsf@nicolasgoaziou.fr> <20171025182356.441331a3@centurylink.net> <877evizdzm.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Date: Sun, 29 Oct 2017 09:14:20 +0100 Message-ID: <87y3nuweub.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 28954-done Cc: 28954-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Nicolas Goaziou writes: > Eric Bavier writes: > >> I was able to find the patches there. What do you think of this >> version of your patch? > > I didn't know you could generate a patch that way. That is better, > indeed! Since there was no more comment, I pushed the commit into master. Thank you again for the help. Regards, ------------=_1509264902-3572-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Oct 2017 10:47:25 +0000 Received: from localhost ([127.0.0.1]:56637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6aGP-0004RR-5l for submit@debbugs.gnu.org; Mon, 23 Oct 2017 06:47:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35875) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6aGL-0004R8-6N for submit@debbugs.gnu.org; Mon, 23 Oct 2017 06:47:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6aGC-0006kE-Ly for submit@debbugs.gnu.org; Mon, 23 Oct 2017 06:47:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33319) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6aGC-0006ik-Gx for submit@debbugs.gnu.org; Mon, 23 Oct 2017 06:47:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6aG3-0004Vd-VB for guix-patches@gnu.org; Mon, 23 Oct 2017 06:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6aG0-0006Z4-9y for guix-patches@gnu.org; Mon, 23 Oct 2017 06:47:00 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:41155) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6aFz-0006YK-Nr for guix-patches@gnu.org; Mon, 23 Oct 2017 06:46:56 -0400 Received: from saiph.selenimh (000043010000000000000469.ipv6.commingeshautdebit.fr [IPv6:2a03:a0a0:0:4301::469]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id D6EBEC5A8B for ; Mon, 23 Oct 2017 12:46:52 +0200 (CEST) Received: from ngz by saiph.selenimh with local (Exim 4.89) (envelope-from ) id 1e6aFw-0008Aq-07 for guix-patches@gnu.org; Mon, 23 Oct 2017 12:46:52 +0200 From: Nicolas Goaziou To: guix-patches@gnu.org Subject: [PATCH] Update Scribus to 1.5.3. Re-vamp package. User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Date: Mon, 23 Oct 2017 12:46:51 +0200 Message-ID: <8760b6rvj8.fsf@nicolasgoaziou.fr> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) --=-=-= Content-Type: text/plain Hello, The following patch updates Scribus to 1.5.3. It requires changes to the package definition itself (in particular patches and additional inputs). While at it, i also added some more inputs so as to get a more complete package. I discussed the possibility to split the patch in two (update on the one hand, and additional inputs on the other one), but the clear cut between the two is difficult to find. For example, "libcdr", "libfreehand", "libmspub", "libpagemaker, "librevenge" and "libvisio" obviously belongs to the second patch, but "fontconfig", "harfbuzz", "openssl" and "boost" would need to be tested. In any case, notwithstanding my laziness, I think the split is not worth it: current Scribus package is not working at the moment. The package may still be missing Tkinter and Mesa as inputs. I have no use for them at the moment, though. WDYT? Regards, -- Nicolas Goaziou 0x80A93738 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-scribus-Update-to-1.5.3.-Re-vamp-package.patch Content-Transfer-Encoding: quoted-printable Content-Description: Scribus re-vamp >From e42a5b62476e63184c3a4164d73410decbbb2a75 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 23 Oct 2017 12:25:13 +0200 Subject: [PATCH] gnu: scribus: Update to 1.5.3. Re-vamp package. * gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch: * gnu/packages/patches/scribus-fix-poppler-packaging.patch: New files. * gnu/local.mk (dist_patch_DATA): Register new files. * gnu/packages/scribus.scm (scribus): Update to 1.5.3. [input]: Add fontconfig, harfbuzz, hunspell, icu4c, libcdr, libfreehand, libmspub, librevenge, libvisio, openssl, podofo, poppler. [native-input]: Move qttools from inputs. Add boost. [home-page]: Fix URL. --- gnu/local.mk | 2 + .../scribus-fix-poppler-0.58-breakage.patch | 526 +++++++++++++++++= ++++ .../patches/scribus-fix-poppler-packaging.patch | 95 ++++ gnu/packages/scribus.scm | 57 ++- 4 files changed, 669 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/scribus-fix-poppler-0.58-breakage.= patch create mode 100644 gnu/packages/patches/scribus-fix-poppler-packaging.patch diff --git a/gnu/local.mk b/gnu/local.mk index 6b70300ff..ff0e74a0b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1022,6 +1022,8 @@ dist_patch_DATA =3D \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-test-threading.patch \ + %D%/packages/patches/scribus-fix-poppler-0.58-breakage.patch \ + %D%/packages/patches/scribus-fix-poppler-packaging.patch \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ diff --git a/gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch b= /gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch new file mode 100644 index 000000000..cd95e9b2a --- /dev/null +++ b/gnu/packages/patches/scribus-fix-poppler-0.58-breakage.patch @@ -0,0 +1,526 @@ +diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/im= port/pdf/importpdf.cpp +index 4c462bead..1c0bd8a88 100644 +--- a/scribus/plugins/import/pdf/importpdf.cpp ++++ b/scribus/plugins/import/pdf/importpdf.cpp +@@ -22,6 +22,7 @@ for which a new license (GPL+exception) is in place. + #include =0D + #include =0D + #include =0D ++#include =0D + #include =0D + #include =0D + =0D +@@ -59,6 +60,12 @@ for which a new license (GPL+exception) is in place. + #include "ui/multiprogressdialog.h"=0D + #include "ui/propertiespalette.h"=0D + =0D ++#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \ ++ ((major) * 10000) \ ++ + ((minor) * 100) \ ++ + ((micro) * 1))=0D ++#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MA= JOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)=0D ++=0D + PdfPlug::PdfPlug(ScribusDoc* doc, int flags)=0D + {=0D + tmpSele =3D new Selection(this, false);=0D +@@ -507,12 +514,20 @@ bool PdfPlug::convert(const QString& fn) + {=0D + for (int i =3D 0; i < order->getLength (); ++i)=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object orderItem =3D order->get(i);=0D ++#else=0D + Object orderItem;=0D + order->get(i, &orderItem);=0D ++#endif=0D + if (orderItem.isDict())=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object ref =3D order->getNF(i); =0D ++#else=0D + Object ref;=0D + order->getNF(i, &ref);=0D ++#endif=0D + if (ref.isRef())=0D + {=0D + OptionalContentGroup *oc =3D ocg->findOcgByRef(ref.getRef());= =0D +@@ -523,7 +538,9 @@ bool PdfPlug::convert(const QString& fn) + ocgNames.append(ocgName);=0D + }=0D + }=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + ref.free();=0D ++#endif=0D + }=0D + else=0D + {=0D +@@ -597,39 +614,71 @@ bool PdfPlug::convert(const QString& fn) + dev->layersSetByOCG =3D true;=0D + }=0D + #endif=0D ++=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object info =3D pdfDoc->getDocInfo();=0D ++ if (info.isDict())=0D ++ {=0D ++ Object obj;=0D ++ Dict *infoDict =3D info.getDict();=0D ++ obj =3D infoDict->lookup((char*) "Title");=0D ++ if (obj.isString())=0D ++ {=0D ++ m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString(= )));=0D ++ }=0D ++ obj =3D infoDict->lookup((char*) "Author");=0D ++ if (obj.isString())=0D ++ {=0D ++ m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString= ()));=0D ++ }=0D ++ obj =3D infoDict->lookup((char*) "Subject");=0D ++ if (obj.isString())=0D ++ {=0D ++ m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getStrin= g()));=0D ++ }=0D ++ obj =3D infoDict->lookup((char*) "Keywords");=0D ++ if (obj.isString())=0D ++ {=0D ++ // s1 =3D obj.getString();=0D ++ m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getStri= ng()));=0D ++ }=0D ++ }=0D ++ info =3D Object();=0D ++#else=0D + Object info;=0D + pdfDoc->getDocInfo(&info);=0D + if (info.isDict())=0D + {=0D + Object obj;=0D +- // GooString *s1;=0D ++ // GooString *s1;=0D + Dict *infoDict =3D info.getDict();=0D +- if (infoDict->lookup((char*)"Title", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Title", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString(= )));=0D + obj.free();=0D + }=0D +- if (infoDict->lookup((char*)"Author", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Author", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString= ()));=0D + obj.free();=0D + }=0D +- if (infoDict->lookup((char*)"Subject", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Subject", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getStrin= g()));=0D + obj.free();=0D + }=0D +- if (infoDict->lookup((char*)"Keywords", &obj )->isString())=0D ++ if (infoDict->lookup((char*)"Keywords", &obj)->isString())=0D + {=0D +- // s1 =3D obj.getString();=0D ++ // s1 =3D obj.getString();=0D + m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getStri= ng()));=0D + obj.free();=0D + }=0D + }=0D + info.free();=0D ++#endif=0D + if (cropped)=0D + {=0D + QRectF crBox =3D getCBox(contentRect, pageNs[0]);=0D +@@ -746,8 +795,13 @@ bool PdfPlug::convert(const QString& fn) + pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, cr= op, printing, NULL, NULL, dev->annotations_callback, dev);=0D + }=0D + PDFPresentationData ef;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object trans =3D pdfDoc->getPage(pp)->getTrans();=0D ++ Object *transi =3D &trans;=0D ++#else=0D + Object trans;=0D + Object *transi =3D pdfDoc->getPage(pp)->getTrans(&trans);=0D ++#endif=0D + if (transi->isDict())=0D + {=0D + m_Doc->pdfOptions().PresentMode =3D true;=0D +@@ -793,32 +847,51 @@ bool PdfPlug::convert(const QString& fn) + delete pgTrans;=0D + }=0D + m_Doc->currentPage()->PresentVals =3D ef;=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + trans.free();=0D + transi->free();=0D ++#endif=0D + }=0D + int numjs =3D pdfDoc->getCatalog()->numJS();=0D + if (numjs > 0)=0D + {=0D + NameTree *jsNameTreeP =3D new NameTree();=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object catDict =3D pdfDoc->getXRef()->getCatalog();=0D ++#else=0D + Object catDict;=0D + pdfDoc->getXRef()->getCatalog(&catDict);=0D ++#endif=0D + if (catDict.isDict())=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object names =3D catDict.dictLookup("Names");=0D ++#else=0D + Object names;=0D + catDict.dictLookup("Names", &names);=0D ++#endif=0D + if (names.isDict())=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object obj =3D names.dictLookup("JavaScript");=0D ++ jsNameTreeP->init(pdfDoc->getXRef(), &obj);=0D ++#else=0D + Object obj;=0D + names.dictLookup("JavaScript", &obj);=0D + jsNameTreeP->init(pdfDoc->getXRef(), &obj);=0D + obj.free();=0D ++#endif=0D + }=0D + for (int a =3D 0; a < numjs; a++)=0D + {=0D + m_Doc->JavaScripts.insert(UnicodeParsedString(jsNameTreeP->getNa= me(a)), UnicodeParsedString(pdfDoc->getCatalog()->getJS(a)));=0D + }=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ names =3D catDict.dictLookup("OpenAction");=0D ++#else=0D + names.free();=0D + catDict.dictLookup("OpenAction", &names);=0D ++#endif=0D + if (names.isDict())=0D + {=0D + LinkAction *linkAction =3D NULL;=0D +@@ -839,9 +912,13 @@ bool PdfPlug::convert(const QString& fn) + }=0D + }=0D + }=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + names.free();=0D ++#endif=0D + }=0D ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)=0D + catDict.free();=0D ++#endif=0D + delete jsNameTreeP;=0D + }=0D + m_Doc->pdfOptions().Version =3D (PDFOptions::PDFVersion)qMin(15, qM= ax(13, pdfDoc->getPDFMajorVersion() * 10 + pdfDoc->getPDFMinorVersion()));= =0D +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/im= port/pdf/slaoutput.cpp +index 32cfed101..ffa417a3b 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -6,6 +6,7 @@ for which a new license (GPL+exception) is in place. + */=0D + =0D + #include "slaoutput.h"=0D ++#include =0D + #include =0D + #include =0D + #include =0D +@@ -19,11 +20,49 @@ for which a new license (GPL+exception) is in place. + #include "util_math.h"=0D + #include =0D + =0D ++#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \ ++ ((major) * 10000) \ ++ + ((minor) * 100) \ ++ + ((micro) * 1))=0D ++#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MA= JOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)=0D ++=0D + LinkSubmitForm::LinkSubmitForm(Object *actionObj)=0D + {=0D + Object obj1, obj2, obj3;=0D + fileName =3D NULL;=0D + m_flags =3D 0;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ if (actionObj->isDict())=0D ++ {=0D ++ obj1 =3D actionObj->dictLookup("F");=0D ++ if (!obj1.isNull())=0D ++ {=0D ++ if (obj1.isDict())=0D ++ {=0D ++ obj3 =3D obj1.dictLookup("FS");=0D ++ if (!obj3.isNull())=0D ++ {=0D ++ if (obj3.isName())=0D ++ {=0D ++ char *name =3D obj3.getName();=0D ++ if (!strcmp(name, "URL"))=0D ++ {=0D ++ obj2 =3D obj1.dictLookup("F");=0D ++ if (!obj2.isNull())=0D ++ fileName =3D obj2.getString()->copy();=0D ++ }=0D ++ }=0D ++ }=0D ++ }=0D ++ }=0D ++ obj1 =3D actionObj->dictLookup("Flags");=0D ++ if (!obj1.isNull())=0D ++ {=0D ++ if (obj1.isNum())=0D ++ m_flags =3D obj1.getInt();=0D ++ }=0D ++ }=0D ++#else=0D + if (actionObj->isDict())=0D + {=0D + if (!actionObj->dictLookup("F", &obj1)->isNull())=0D +@@ -54,6 +93,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj) + }=0D + obj1.free();=0D + }=0D ++#endif=0D + }=0D + =0D + LinkSubmitForm::~LinkSubmitForm()=0D +@@ -66,11 +106,25 @@ LinkImportData::LinkImportData(Object *actionObj) + {=0D + Object obj1, obj3;=0D + fileName =3D NULL;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ if (actionObj->isDict())=0D ++ {=0D ++ obj1 =3D actionObj->dictLookup("F");=0D ++ if (!obj1.isNull())=0D ++ {=0D ++ obj3 =3D getFileSpecNameForPlatform(&obj1);=0D ++ if (!obj3.isNull())=0D ++ {=0D ++ fileName =3D obj3.getString()->copy();=0D ++ }=0D ++ }=0D ++ }=0D ++#else=0D + if (actionObj->isDict())=0D + {=0D + if (!actionObj->dictLookup("F", &obj1)->isNull())=0D + {=0D +- if (getFileSpecNameForPlatform (&obj1, &obj3))=0D ++ if (getFileSpecNameForPlatform(&obj1, &obj3))=0D + {=0D + fileName =3D obj3.getString()->copy();=0D + obj3.free();=0D +@@ -78,6 +132,7 @@ LinkImportData::LinkImportData(Object *actionObj) + }=0D + obj1.free();=0D + }=0D ++#endif=0D + }=0D + =0D + LinkImportData::~LinkImportData()=0D +@@ -256,6 +311,27 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *a= no) + Object obj;=0D + Ref refa =3D ano->getRef();=0D + Object additionalActions;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj =3D xref->fetch(refa.num, refa.gen);=0D ++ if (obj.isDict())=0D ++ {=0D ++ Dict* adic =3D obj.getDict();=0D ++ additionalActions =3D adic->lookupNF("A");=0D ++ Object additionalActionsObject =3D additionalActions.fetch(pdfDoc->getX= Ref());=0D ++ if (additionalActionsObject.isDict())=0D ++ {=0D ++ Object actionObject =3D additionalActionsObject.dictLookup("S");=0D ++ if (actionObject.isName("ImportData"))=0D ++ {=0D ++ linkAction =3D new LinkImportData(&additionalActionsObject);=0D ++ }=0D ++ else if (actionObject.isName("SubmitForm"))=0D ++ {=0D ++ linkAction =3D new LinkSubmitForm(&additionalActionsObject);=0D ++ }=0D ++ }=0D ++ }=0D ++#else=0D + Object *act =3D xref->fetch(refa.num, refa.gen, &obj);=0D + if (act)=0D + {=0D +@@ -283,6 +359,7 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *an= o) + }=0D + }=0D + obj.free();=0D ++#endif=0D + return linkAction;=0D + }=0D + =0D +@@ -293,6 +370,22 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(cons= t char *key, AnnotWidget *a + Object obj;=0D + Ref refa =3D ano->getRef();=0D + Object additionalActions;=0D ++=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj =3D xref->fetch(refa.num, refa.gen);=0D ++ if (obj.isDict())=0D ++ {=0D ++ Dict* adic =3D obj.getDict();=0D ++ additionalActions =3D adic->lookupNF("AA");=0D ++ Object additionalActionsObject =3D additionalActions.fetch(pdfDoc->getX= Ref());=0D ++ if (additionalActionsObject.isDict())=0D ++ {=0D ++ Object actionObject =3D additionalActionsObject.dictLookup(key);=0D ++ if (actionObject.isDict())=0D ++ linkAction =3D LinkAction::parseAction(&actionObject, pdfDoc->getCata= log()->getBaseURI());=0D ++ }=0D ++ }=0D ++#else=0D + Object *act =3D xref->fetch(refa.num, refa.gen, &obj);=0D + if (act)=0D + {=0D +@@ -313,6 +406,7 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(const= char *key, AnnotWidget *a + }=0D + }=0D + obj.free();=0D ++#endif=0D + return linkAction;=0D + }=0D + =0D +@@ -838,6 +932,33 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, d= ouble xCoor, double yCoor, + {=0D + Object obj1;=0D + Ref refa =3D annota->getRef();=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj1 =3D xref->fetch(refa.num, refa.gen);=0D ++ if (obj1.isDict())=0D ++ {=0D ++ Dict* dict =3D obj1.getDict();=0D ++ Object obj2 =3D dict->lookup("Kids");=0D ++ //childs=0D ++ if (obj2.isArray())=0D ++ {=0D ++ // Load children=0D ++ QList radList;=0D ++ for (int i =3D 0; i < obj2.arrayGetLength(); i++)=0D ++ {=0D ++ Object childRef =3D obj2.arrayGetNF(i);=0D ++ if (!childRef.isRef())=0D ++ continue;=0D ++ Object childObj =3D obj2.arrayGet(i);=0D ++ if (!childObj.isDict())=0D ++ continue;=0D ++ const Ref ref =3D childRef.getRef();=0D ++ radList.append(ref.num);=0D ++ }=0D ++ QString tmTxt =3D UnicodeParsedString(annota->getName());=0D ++ m_radioMap.insert(tmTxt, radList);=0D ++ }=0D ++ }=0D ++#else=0D + Object *act =3D xref->fetch(refa.num, refa.gen, &obj1);=0D + if (act && act->isDict())=0D + {=0D +@@ -873,6 +994,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, do= uble xCoor, double yCoor, + obj2.free();=0D + }=0D + obj1.free();=0D ++#endif=0D + }=0D + return retVal;=0D + }=0D +@@ -3007,6 +3129,23 @@ void SlaOutputDev::beginMarkedContent(char *name, O= bject *dictRef) + }=0D + else=0D + {=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ dictObj =3D dictRef->fetch(xref);=0D ++ if (!dictObj.isDict())=0D ++ return;=0D ++ dict =3D dictObj.getDict();=0D ++ dictType =3D dict->lookup("Type");=0D ++ if (dictType.isName("OCG"))=0D ++ {=0D ++ oc =3D contentConfig->findOcgByRef(dictRef->getRef());=0D ++ if (oc)=0D ++ {=0D ++ // qDebug() << "Begin OCG Content with Name " << UnicodeParsedSt= ring(oc->getName());=0D ++ m_doc->setActiveLayer(UnicodeParsedString(oc->getName()));=0D ++ mSte.ocgName =3D UnicodeParsedString(oc->getName());=0D ++ }=0D ++ }=0D ++#else=0D + dictRef->fetch(xref, &dictObj);=0D + if (!dictObj.isDict())=0D + {=0D +@@ -3027,6 +3166,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Ob= ject *dictRef) + }=0D + dictType.free();=0D + dictObj.free();=0D ++#endif=0D + }=0D + }=0D + m_mcStack.push(mSte);=0D +@@ -3046,14 +3186,20 @@ void SlaOutputDev::beginMarkedContent(char *name, = Dict *properties) + {=0D + if (layersSetByOCG)=0D + return;=0D +- Object obj;=0D + QString lName =3D QString("Layer_%1").arg(layerNum + 1);=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ Object obj =3D properties->lookup((char*) "Title");=0D ++ if (obj.isString())=0D ++ lName =3D QString(obj.getString()->getCString());=0D ++#else=0D ++ Object obj;=0D + if (properties->lookup((char*)"Title", &obj))=0D + {=0D + if (obj.isString())=0D + lName =3D QString(obj.getString()->getCString());=0D + obj.free();=0D + }=0D ++#endif=0D + for (ScLayers::iterator it =3D m_doc->Layers.begin(); it !=3D m_doc->L= ayers.end(); ++it)=0D + {=0D + if (it->Name =3D=3D lName)=0D +@@ -3066,6 +3212,29 @@ void SlaOutputDev::beginMarkedContent(char *name, D= ict *properties) + if (!firstLayer)=0D + currentLayer =3D m_doc->addLayer(lName, true);=0D + firstLayer =3D false;=0D ++#if POPPLER_ENCODED_VERSION >=3D POPPLER_VERSION_ENCODE(0, 58, 0)=0D ++ obj =3D properties->lookup((char*) "Visible");=0D ++ if (obj.isBool())=0D ++ m_doc->setLayerVisible(currentLayer, obj.getBool());=0D ++ obj =3D properties->lookup((char*) "Editable");=0D ++ if (obj.isBool())=0D ++ m_doc->setLayerLocked(currentLayer, !obj.getBool());=0D ++ obj =3D properties->lookup((char*) "Printed");=0D ++ if (obj.isBool())=0D ++ m_doc->setLayerPrintable(currentLayer, obj.getBool());=0D ++ obj =3D properties->lookup((char*)"Color");=0D ++ if (obj.isArray())=0D ++ {=0D ++ Object obj1;=0D ++ obj1 =3D obj.arrayGet(0);=0D ++ int r =3D obj1.getNum() / 256;=0D ++ obj1 =3D obj.arrayGet(1);=0D ++ int g =3D obj1.getNum() / 256;=0D ++ obj1 =3D obj.arrayGet(2);=0D ++ int b =3D obj1.getNum() / 256;=0D ++ m_doc->setLayerMarker(currentLayer, QColor(r, g, b));=0D ++ }=0D ++#else=0D + if (properties->lookup((char*)"Visible", &obj))=0D + {=0D + if (obj.isBool())=0D +@@ -3102,6 +3271,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Di= ct *properties) + }=0D + obj.free();=0D + }=0D ++#endif=0D + }=0D + }=0D + }=0D +--=20 +2.14.2 + diff --git a/gnu/packages/patches/scribus-fix-poppler-packaging.patch b/gnu= /packages/patches/scribus-fix-poppler-packaging.patch new file mode 100644 index 000000000..2659bafa6 --- /dev/null +++ b/gnu/packages/patches/scribus-fix-poppler-packaging.patch @@ -0,0 +1,95 @@ +diff --git a/.travis.yml b/.travis.yml +index 6e9562b2c..f4273227a 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -31,8 +31,8 @@ before_install: + libhyphen-dev liblcms2-dev libpodofo-dev libtiff-dev libxml2-dev + python-all-dev zlib1g-dev qt58base qt58declarative + qt58tools libgraphicsmagick++1-dev +- libopenscenegraph-dev libpoppler-dev libcairo2-dev libwpg-dev libms= pub-dev +- libcdr-dev libvisio-dev libharfbuzz-dev libharfbuzz-icu0 ++ libopenscenegraph-dev libpoppler-dev libpoppler-cpp-dev libcairo2-d= ev libwpg-dev=20 ++ libmspub-dev libcdr-dev libvisio-dev libharfbuzz-dev libharfbuzz-ic= u0 + coreutils binutils python-tk; + fi + # OSX +diff --git a/cmake/modules/FindPOPPLER.cmake b/cmake/modules/FindPOPPLER.c= make +index d684bd503..899284db6 100644 +--- a/cmake/modules/FindPOPPLER.cmake ++++ b/cmake/modules/FindPOPPLER.cmake +@@ -1,12 +1,16 @@ + if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) + include(UsePkgConfig) + PKGCONFIG(poppler _libPopplerIncDir _libPopplerLinkDir _libPopplerLinkFl= ags _libPopplerCflags) +- set(PKG_POPPLER_INCLUDE_DIRS ${_libPopplerIncDir}) +- set(PKG_POPPLER_LIBRARIES ${_libPopplerLinkDir}) +- else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) +- include(FindPkgConfig) ++ set(PKG_POPPLER_INCLUDE_DIRS ${_libPopplerIncDir}) ++ set(PKG_POPPLER_LIBRARIES ${_libPopplerLinkDir}) ++else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) ++ include(FindPkgConfig) + pkg_search_module(POPPLER libpoppler>=3D0.19.0 poppler>=3D0.19.0) +- endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) ++ if (POPPLER_FOUND) ++ pkg_search_module(POPPLER_CPP REQUIRED libpoppler-cpp>=3D0.19.0 poppler= -cpp>=3D0.19.0) ++ endif(POPPLER_FOUND) ++endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5) ++=20 + find_path(POPPLER_INCLUDE_DIR=20 + NAMES poppler-config.h + PATHS ${PKG_POPPLER_INCLUDE_DIRS} ${POPPLER_INCLUDE_DIRS} /usr/local/in= clude /usr/include +@@ -14,16 +18,31 @@ find_path(POPPLER_INCLUDE_DIR + NO_DEFAULT_PATH + ) +=20 ++find_path(POPPLER_CPP_INCLUDE_DIR=20 ++ NAMES poppler-version.h ++ PATHS ${PKG_POPPLER_CPP_INCLUDE_DIRS} ${POPPLER_CPP_INCLUDE_DIRS} /usr/= local/include /usr/include ++ PATH_SUFFIXES poppler ++ NO_DEFAULT_PATH ++) ++ + find_library(POPPLER_LIBRARY + NAMES libpoppler poppler + PATHS ${PKG_POPPLER_LIBRARIES} ${POPPLER_LIBRARY_DIRS} /usr/local/lib /= usr/lib /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} + PATH_SUFFIXES poppler + NO_DEFAULT_PATH + ) ++ ++find_library(POPPLER_CPP_LIBRARY ++ NAMES libpoppler-cpp poppler-cpp ++ PATHS ${PKG_POPPLER_CPP_LIBRARIES} ${POPPLER_CPP_LIBRARY_DIRS} /usr/loc= al/lib /usr/lib /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} ++ PATH_SUFFIXES poppler ++ NO_DEFAULT_PATH ++) ++ + if (POPPLER_LIBRARY) +- if (POPPLER_INCLUDE_DIR) ++ if (POPPLER_INCLUDE_DIR AND POPPLER_CPP_INCLUDE_DIR) + set( FOUND_POPPLER 1 ) +- set( POPPLER_LIBRARIES ${POPPLER_LIBRARY} ) +- set( POPPLER_INCLUDES ${POPPLER_INCLUDE_DIR}) +- endif (POPPLER_INCLUDE_DIR) ++ set( POPPLER_LIBRARIES ${POPPLER_LIBRARY} ${POPPLER_CPP_LIBRARY} ) ++ set( POPPLER_INCLUDES ${POPPLER_INCLUDE_DIR} ${POPPLER_CPP_INCLUDE_DI= R} ) ++ endif (POPPLER_INCLUDE_DIR AND POPPLER_CPP_INCLUDE_DIR) + endif (POPPLER_LIBRARY) +diff --git a/scribus/plugins/import/pdf/CMakeLists.txt b/scribus/plugins/i= mport/pdf/CMakeLists.txt +index cd1610298..85760d96e 100644 +--- a/scribus/plugins/import/pdf/CMakeLists.txt ++++ b/scribus/plugins/import/pdf/CMakeLists.txt +@@ -2,9 +2,9 @@ include_directories( + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/scribus + ${POPPLER_INCLUDE_DIR} ++ ${POPPLER_CPP_INCLUDE_DIR} + ) +=20 +- + set(IMPORTPDF_PLUGIN_UI_SRC + pdfimportoptions.ui + ) +--=20 +2.14.2 + diff --git a/gnu/packages/scribus.scm b/gnu/packages/scribus.scm index d48051ee3..02280f555 100644 --- a/gnu/packages/scribus.scm +++ b/gnu/packages/scribus.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 Ricardo Wurmus ;;; Copyright =C2=A9 2016 Efraim Flashner +;;; Copyright =C2=A9 2017 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,53 +25,87 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cmake) #:use-module (gnu packages) + #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages cups) #:use-module (gnu packages fontutils) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) + #:use-module (gnu packages imagemagick) + #:use-module (gnu packages libreoffice) #:use-module (gnu packages linux) + #:use-module (gnu packages pdf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages qt) - #:use-module (gnu packages imagemagick) + #:use-module (gnu packages tls) #:use-module (gnu packages xml)) =20 (define-public scribus (package (name "scribus") - (version "1.5.2") + (version "1.5.3") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/scribus/scribus-de= vel/" version "/scribus-" version ".tar.xz")) (sha256 (base32 - "1xbl7h4x32y2nfhn57ivjziyvlnwadcbizqwfqx5srfsmqiyqppc")))) + "0kyp45vidxa3v35ic9592db4zk3m8al26vck38q5v7z14x3hp8vk")) + (patches + ;; These patches are necessary to build package with Popple= r >=3D + ;; 0.58. They are extracted from trunk and will be include= d in + ;; Scribus 1.5.4. + (search-patches "scribus-fix-poppler-0.58-breakage.patch" + "scribus-fix-poppler-packaging.patch")))) (build-system cmake-build-system) (arguments - `(#:tests? #f ; no test target + `(#:tests? #f ;no test target #:configure-flags - '("-DCMAKE_CXX_FLAGS=3D-std=3Dgnu++11"))) + '("-DWANT_GRAPHICSMAGICK=3D1") + #:phases + (modify-phases %standard-phases + ;; Fix typo. Patch included in trunk. See + ;; . + (add-before 'configure 'fix-podofo + (lambda _ + (substitute* "cmake/modules/FindLIBPODOFO.cmake" + (("find_package\\(OPENSSL\\)") "find_package(OpenSSL)")) + #t))))) (inputs `(("cairo" ,cairo) ("cups" ,cups) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) ("graphicsmagick" ,graphicsmagick) + ("harfbuzz" ,harfbuzz) + ("hunspell" ,hunspell) + ("icu4c" ,icu4c) ("lcms" ,lcms) + ("libcdr" ,libcdr) + ("libfreehand" ,libfreehand) ("libjpeg" ,libjpeg) + ("libmspub" ,libmspub) + ("libpagemaker" ,libpagemaker) + ("librevenge" ,librevenge) ("libtiff" ,libtiff) + ("libvisio" ,libvisio) ("libxml2" ,libxml2) - ("python" ,python-2) - ("freetype" ,freetype) + ("openssl" ,openssl) + ("podofo" ,podofo) + ("poppler" ,poppler) + ("python" ,python-2) ;need Python library ("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative) - ("qttools" ,qttools) ("zlib" ,zlib))) (native-inputs - `(("util-linux" ,util-linux) - ("pkg-config" ,pkg-config))) - (home-page "http://scribus.net") + `(("boost" ,boost) + ("pkg-config" ,pkg-config) + ("qttools" ,qttools) + ("util-linux" ,util-linux))) + (home-page "https://www.scribus.net") (synopsis "Desktop publishing and page layout program") (description "Scribus is a @dfn{desktop publishing} (DTP) application and can be u= sed --=20 2.14.2 --=-=-=-- ------------=_1509264902-3572-1--