From c85a90f90521c7e11d618b527d6630cc64cecbd4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 26 Dec 2017 20:10:49 +0000 Subject: gentoo resync : 26.12.2017 --- app-office/scribus/Manifest | 3 +- .../scribus/files/scribus-1.5.3-poppler-0.58.patch | 534 +++++++++++++++++++++ app-office/scribus/scribus-1.5.3-r1.ebuild | 4 +- 3 files changed, 538 insertions(+), 3 deletions(-) create mode 100644 app-office/scribus/files/scribus-1.5.3-poppler-0.58.patch (limited to 'app-office/scribus') diff --git a/app-office/scribus/Manifest b/app-office/scribus/Manifest index 7c8afd15ffcd..1b077a841550 100644 --- a/app-office/scribus/Manifest +++ b/app-office/scribus/Manifest @@ -2,11 +2,12 @@ AUX scribus-1.4.0-minizip.patch 1891 BLAKE2B 407d5a46210573f511572ef3dd3e25f7b23 AUX scribus-1.5.3-cmake-openssl.patch 737 BLAKE2B 276d3ad6804506ef4d4c041ce1e0bbf943fe4325e933c9d56401690d1bbd38317898dd5ab00311ee3dd92a873255f615a6b8c415d3c7a6878ce0469ac2a24853 SHA512 63ef4eaa68aad8811150e4208842e602640a7e2e034d2923b79318ca1bcb433829daf7fb6b33fcd22d3e2e9f4103c5f7c6d76883970307ea280c0bfd6df80d61 AUX scribus-1.5.3-docdir.patch 1309 BLAKE2B 978a5b54992bc2d2e84cc7435ffe15c2ace03a649de6b240a5b7a8a513134eb1ffac3f9a0f8adcf8679bf07f7beef47b4216102f9d3e3c84333b208b68e41e00 SHA512 5f3bd4fe4f61a2c8d2a58e3f480c95d32280358366a7eabc3c483abe1f3ef07ef5e3864be8ffce8b48584da23f81cb9b96b81c83a59ad4f3da5c7a5c34234063 AUX scribus-1.5.3-fpic.patch 499 BLAKE2B 68790e6d7a76c4ae01490956b0db09bc79e1c27269fa4cd4c4752bd60b228e36973a1c32d5d8156c12782091fa15614ba274be07dee0d92df9ef521f2d4361a2 SHA512 e38fc85e72af67c0fea4c14dad92a759f5065cd4e337ef2257a90f27e39297c6991c467e53e9c51ae247bf2f8c34fa62fa76cf839a53b386c9c378e53756d015 +AUX scribus-1.5.3-poppler-0.58.patch 17057 BLAKE2B 87a0e55baa398ed412b48cb5c4d3c8c2dd8f15f40da5a20f9d09a652191c77dc103640357dc5928fbfeae90031762e288221c13115da97a7d307b676f697510d SHA512 e9ad65c1c20ca6efd204829bec141336d250c073ebed08f74f07c416213bf46204826abc410510f7a72df21a00a43f7e1793847107612981dedbe96a5927956d AUX scribus-9999-docdir.patch 1309 BLAKE2B 978a5b54992bc2d2e84cc7435ffe15c2ace03a649de6b240a5b7a8a513134eb1ffac3f9a0f8adcf8679bf07f7beef47b4216102f9d3e3c84333b208b68e41e00 SHA512 5f3bd4fe4f61a2c8d2a58e3f480c95d32280358366a7eabc3c483abe1f3ef07ef5e3864be8ffce8b48584da23f81cb9b96b81c83a59ad4f3da5c7a5c34234063 AUX scribus-9999-fpic.patch 499 BLAKE2B 68790e6d7a76c4ae01490956b0db09bc79e1c27269fa4cd4c4752bd60b228e36973a1c32d5d8156c12782091fa15614ba274be07dee0d92df9ef521f2d4361a2 SHA512 e38fc85e72af67c0fea4c14dad92a759f5065cd4e337ef2257a90f27e39297c6991c467e53e9c51ae247bf2f8c34fa62fa76cf839a53b386c9c378e53756d015 DIST scribus-1.4.6.tar.xz 73601104 BLAKE2B 5968a48410d1a2a4caa333c9f83b43f68c964862d9aa3cb20e136760201ef2ef6cb82f770026b6f962758c9d397f25a017d906433f52f88bec11c57105c27f6b SHA512 74d8a89eb767535bcd8fe5e3c55d03709d59ff8fc5280005bcc2ad36cae1d37c8442ab85abaea86fdee9f351a901c86947231001324e2d8df00cbd8e5c18d1e3 DIST scribus-1.5.3.tar.xz 74222084 BLAKE2B ffb50c728c0669ab8a22c416c143e8dd47c818120247b4cf5a890872857326b53491be99004a344d78ea2cf2b174ae2987ddcddb4cef39a6e95fe1695be45d48 SHA512 487cea685869397bc52acc7be8e8e9f4bad3f594c1f95740207e4d9e26b07461a7fd2a95d5337b38f1b0fa6504a9f6059cca6740c78cc165eab0b779ffdfe980 EBUILD scribus-1.4.6.ebuild 4201 BLAKE2B f0a9f6c762ac9284f310ba312c380812d1d31c80525afeb86e9dce9f8ac7c015510243360f9c2df9c86e055d6425703ba1015b20d8f32e4131b1243db027280e SHA512 cc1b338a59557e15c17eee40b1d5f77153264705287a5ed36dcf5c503f1909268d63ba1b759f669a7a9a79226e9058457f2aa412ae85b0facf7250939f5a6239 -EBUILD scribus-1.5.3-r1.ebuild 6743 BLAKE2B 72e1b74d578a4d11d7a33521447ecff341e8d1a9a4fc423f98a56a7ef08d94dbada593aca7ebd7eda0b9de8e17d265137257ded1e231a037e4a72d53368132b4 SHA512 d98e0abb5711985ed40280a23769ec57dc5429794f3774575f6f129a7e1ec0386ee6060a963eb3f78f67f323d1b88351050e766baa0fb52eb8de7069a2f6b826 +EBUILD scribus-1.5.3-r1.ebuild 6757 BLAKE2B 94fdc8728a21f4f8274c8ef1822f15313cf2c9144842c4e1d69f6b2a3a1ca79dc7d022f9f83952c532a1eb9c35cd5b8217f3449f5ef837874823680e36571dd1 SHA512 4692901e1a8f6760e2c70ded61d520f83d4bf8d0ad79bfc42d4981ef93786ba8aa9cbfade0302b1fd4876fffc336640fbca6fa3ccbba13781379dc0c77729f43 EBUILD scribus-9999.ebuild 6694 BLAKE2B 29e67d0590d1a3839ddbc5cd240cdbe678b2b0584d84e49d8fdf05057fc01a76abb0ca551c76e2f24094246272937e25d8775d009f82e95158ca64368da25a2c SHA512 5476ae71b3b05fb99456fd330ef5e9f342f2c457744cc3c9d1ba015c2f8d5bcfca05d339390b96aa79599953dbc60a66ff70481f1e6bece90f6af24043150d26 MISC metadata.xml 895 BLAKE2B 9f470d1d5f1eec9f76aca47dce40a3b276f3c7646f0a89ecc69f09f2644af7622655eadbe76486e3f1312fc282400592d7bfcddf3fe4c12b865c7642f61174b6 SHA512 a4b3ba4d363b674e781faa22cab86ef0455b235d9aa1bc4da12b4cc1ae4f23b954f81fdd4ca2348057d2c5108b141a4d6f3307eaf8ff79f76a2754538b80faa1 diff --git a/app-office/scribus/files/scribus-1.5.3-poppler-0.58.patch b/app-office/scribus/files/scribus-1.5.3-poppler-0.58.patch new file mode 100644 index 000000000000..61f5552f959e --- /dev/null +++ b/app-office/scribus/files/scribus-1.5.3-poppler-0.58.patch @@ -0,0 +1,534 @@ +From 61186c7ef083046b7e0c908952e8a773e2787d82 Mon Sep 17 00:00:00 2001 +From: Jean Ghali +Date: Fri, 8 Sep 2017 16:52:10 +0000 +Subject: [PATCH] #14979: poppler-0.58 breaks build + +git-svn-id: svn://scribus.net/trunk/Scribus@22154 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/importpdf.cpp | 95 +++++++++++++++-- + scribus/plugins/import/pdf/slaoutput.cpp | 174 ++++++++++++++++++++++++++++++- + 2 files changed, 258 insertions(+), 11 deletions(-) + +diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp +index 4c462beadd..1c0bd8a888 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 + #include + #include ++#include + #include + #include + +@@ -59,6 +60,12 @@ for which a new license (GPL+exception) is in place. + #include "ui/multiprogressdialog.h" + #include "ui/propertiespalette.h" + ++#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \ ++ ((major) * 10000) \ ++ + ((minor) * 100) \ ++ + ((micro) * 1)) ++#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MAJOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO) ++ + PdfPlug::PdfPlug(ScribusDoc* doc, int flags) + { + tmpSele = new Selection(this, false); +@@ -507,12 +514,20 @@ bool PdfPlug::convert(const QString& fn) + { + for (int i = 0; i < order->getLength (); ++i) + { ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ Object orderItem = order->get(i); ++#else + Object orderItem; + order->get(i, &orderItem); ++#endif + if (orderItem.isDict()) + { ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ Object ref = order->getNF(i); ++#else + Object ref; + order->getNF(i, &ref); ++#endif + if (ref.isRef()) + { + OptionalContentGroup *oc = ocg->findOcgByRef(ref.getRef()); +@@ -523,7 +538,9 @@ bool PdfPlug::convert(const QString& fn) + ocgNames.append(ocgName); + } + } ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0) + ref.free(); ++#endif + } + else + { +@@ -597,39 +614,71 @@ bool PdfPlug::convert(const QString& fn) + dev->layersSetByOCG = true; + } + #endif ++ ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ Object info = pdfDoc->getDocInfo(); ++ if (info.isDict()) ++ { ++ Object obj; ++ Dict *infoDict = info.getDict(); ++ obj = infoDict->lookup((char*) "Title"); ++ if (obj.isString()) ++ { ++ m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString())); ++ } ++ obj = infoDict->lookup((char*) "Author"); ++ if (obj.isString()) ++ { ++ m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString())); ++ } ++ obj = infoDict->lookup((char*) "Subject"); ++ if (obj.isString()) ++ { ++ m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getString())); ++ } ++ obj = infoDict->lookup((char*) "Keywords"); ++ if (obj.isString()) ++ { ++ // s1 = obj.getString(); ++ m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getString())); ++ } ++ } ++ info = Object(); ++#else + Object info; + pdfDoc->getDocInfo(&info); + if (info.isDict()) + { + Object obj; +- // GooString *s1; ++ // GooString *s1; + Dict *infoDict = info.getDict(); +- if (infoDict->lookup((char*)"Title", &obj )->isString()) ++ if (infoDict->lookup((char*)"Title", &obj)->isString()) + { +- // s1 = obj.getString(); ++ // s1 = obj.getString(); + m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString())); + obj.free(); + } +- if (infoDict->lookup((char*)"Author", &obj )->isString()) ++ if (infoDict->lookup((char*)"Author", &obj)->isString()) + { +- // s1 = obj.getString(); ++ // s1 = obj.getString(); + m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString())); + obj.free(); + } +- if (infoDict->lookup((char*)"Subject", &obj )->isString()) ++ if (infoDict->lookup((char*)"Subject", &obj)->isString()) + { +- // s1 = obj.getString(); ++ // s1 = obj.getString(); + m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getString())); + obj.free(); + } +- if (infoDict->lookup((char*)"Keywords", &obj )->isString()) ++ if (infoDict->lookup((char*)"Keywords", &obj)->isString()) + { +- // s1 = obj.getString(); ++ // s1 = obj.getString(); + m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getString())); + obj.free(); + } + } + info.free(); ++#endif + if (cropped) + { + QRectF crBox = getCBox(contentRect, pageNs[0]); +@@ -746,8 +795,13 @@ bool PdfPlug::convert(const QString& fn) + pdfDoc->displayPage(dev, pp, hDPI, vDPI, rotate, useMediaBox, crop, printing, NULL, NULL, dev->annotations_callback, dev); + } + PDFPresentationData ef; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ Object trans = pdfDoc->getPage(pp)->getTrans(); ++ Object *transi = &trans; ++#else + Object trans; + Object *transi = pdfDoc->getPage(pp)->getTrans(&trans); ++#endif + if (transi->isDict()) + { + m_Doc->pdfOptions().PresentMode = true; +@@ -793,32 +847,51 @@ bool PdfPlug::convert(const QString& fn) + delete pgTrans; + } + m_Doc->currentPage()->PresentVals = ef; ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0) + trans.free(); + transi->free(); ++#endif + } + int numjs = pdfDoc->getCatalog()->numJS(); + if (numjs > 0) + { + NameTree *jsNameTreeP = new NameTree(); ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ Object catDict = pdfDoc->getXRef()->getCatalog(); ++#else + Object catDict; + pdfDoc->getXRef()->getCatalog(&catDict); ++#endif + if (catDict.isDict()) + { ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ Object names = catDict.dictLookup("Names"); ++#else + Object names; + catDict.dictLookup("Names", &names); ++#endif + if (names.isDict()) + { ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ Object obj = names.dictLookup("JavaScript"); ++ jsNameTreeP->init(pdfDoc->getXRef(), &obj); ++#else + Object obj; + names.dictLookup("JavaScript", &obj); + jsNameTreeP->init(pdfDoc->getXRef(), &obj); + obj.free(); ++#endif + } + for (int a = 0; a < numjs; a++) + { + m_Doc->JavaScripts.insert(UnicodeParsedString(jsNameTreeP->getName(a)), UnicodeParsedString(pdfDoc->getCatalog()->getJS(a))); + } ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ names = catDict.dictLookup("OpenAction"); ++#else + names.free(); + catDict.dictLookup("OpenAction", &names); ++#endif + if (names.isDict()) + { + LinkAction *linkAction = NULL; +@@ -839,9 +912,13 @@ bool PdfPlug::convert(const QString& fn) + } + } + } ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0) + names.free(); ++#endif + } ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0) + catDict.free(); ++#endif + delete jsNameTreeP; + } + m_Doc->pdfOptions().Version = (PDFOptions::PDFVersion)qMin(15, qMax(13, pdfDoc->getPDFMajorVersion() * 10 + pdfDoc->getPDFMinorVersion())); +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index 32cfed1012..ffa417a3b6 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. + */ + + #include "slaoutput.h" ++#include + #include + #include + #include +@@ -19,11 +20,49 @@ for which a new license (GPL+exception) is in place. + #include "util_math.h" + #include + ++#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \ ++ ((major) * 10000) \ ++ + ((minor) * 100) \ ++ + ((micro) * 1)) ++#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MAJOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO) ++ + LinkSubmitForm::LinkSubmitForm(Object *actionObj) + { + Object obj1, obj2, obj3; + fileName = NULL; + m_flags = 0; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ if (actionObj->isDict()) ++ { ++ obj1 = actionObj->dictLookup("F"); ++ if (!obj1.isNull()) ++ { ++ if (obj1.isDict()) ++ { ++ obj3 = obj1.dictLookup("FS"); ++ if (!obj3.isNull()) ++ { ++ if (obj3.isName()) ++ { ++ char *name = obj3.getName(); ++ if (!strcmp(name, "URL")) ++ { ++ obj2 = obj1.dictLookup("F"); ++ if (!obj2.isNull()) ++ fileName = obj2.getString()->copy(); ++ } ++ } ++ } ++ } ++ } ++ obj1 = actionObj->dictLookup("Flags"); ++ if (!obj1.isNull()) ++ { ++ if (obj1.isNum()) ++ m_flags = obj1.getInt(); ++ } ++ } ++#else + if (actionObj->isDict()) + { + if (!actionObj->dictLookup("F", &obj1)->isNull()) +@@ -54,6 +93,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj) + } + obj1.free(); + } ++#endif + } + + LinkSubmitForm::~LinkSubmitForm() +@@ -66,11 +106,25 @@ LinkImportData::LinkImportData(Object *actionObj) + { + Object obj1, obj3; + fileName = NULL; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ if (actionObj->isDict()) ++ { ++ obj1 = actionObj->dictLookup("F"); ++ if (!obj1.isNull()) ++ { ++ obj3 = getFileSpecNameForPlatform(&obj1); ++ if (!obj3.isNull()) ++ { ++ fileName = obj3.getString()->copy(); ++ } ++ } ++ } ++#else + if (actionObj->isDict()) + { + if (!actionObj->dictLookup("F", &obj1)->isNull()) + { +- if (getFileSpecNameForPlatform (&obj1, &obj3)) ++ if (getFileSpecNameForPlatform(&obj1, &obj3)) + { + fileName = obj3.getString()->copy(); + obj3.free(); +@@ -78,6 +132,7 @@ LinkImportData::LinkImportData(Object *actionObj) + } + obj1.free(); + } ++#endif + } + + LinkImportData::~LinkImportData() +@@ -256,6 +311,27 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *ano) + Object obj; + Ref refa = ano->getRef(); + Object additionalActions; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ obj = xref->fetch(refa.num, refa.gen); ++ if (obj.isDict()) ++ { ++ Dict* adic = obj.getDict(); ++ additionalActions = adic->lookupNF("A"); ++ Object additionalActionsObject = additionalActions.fetch(pdfDoc->getXRef()); ++ if (additionalActionsObject.isDict()) ++ { ++ Object actionObject = additionalActionsObject.dictLookup("S"); ++ if (actionObject.isName("ImportData")) ++ { ++ linkAction = new LinkImportData(&additionalActionsObject); ++ } ++ else if (actionObject.isName("SubmitForm")) ++ { ++ linkAction = new LinkSubmitForm(&additionalActionsObject); ++ } ++ } ++ } ++#else + Object *act = xref->fetch(refa.num, refa.gen, &obj); + if (act) + { +@@ -283,6 +359,7 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *ano) + } + } + obj.free(); ++#endif + return linkAction; + } + +@@ -293,6 +370,22 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *a + Object obj; + Ref refa = ano->getRef(); + Object additionalActions; ++ ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ obj = xref->fetch(refa.num, refa.gen); ++ if (obj.isDict()) ++ { ++ Dict* adic = obj.getDict(); ++ additionalActions = adic->lookupNF("AA"); ++ Object additionalActionsObject = additionalActions.fetch(pdfDoc->getXRef()); ++ if (additionalActionsObject.isDict()) ++ { ++ Object actionObject = additionalActionsObject.dictLookup(key); ++ if (actionObject.isDict()) ++ linkAction = LinkAction::parseAction(&actionObject, pdfDoc->getCatalog()->getBaseURI()); ++ } ++ } ++#else + Object *act = xref->fetch(refa.num, refa.gen, &obj); + if (act) + { +@@ -313,6 +406,7 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *a + } + } + obj.free(); ++#endif + return linkAction; + } + +@@ -838,6 +932,33 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor, + { + Object obj1; + Ref refa = annota->getRef(); ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ obj1 = xref->fetch(refa.num, refa.gen); ++ if (obj1.isDict()) ++ { ++ Dict* dict = obj1.getDict(); ++ Object obj2 = dict->lookup("Kids"); ++ //childs ++ if (obj2.isArray()) ++ { ++ // Load children ++ QList radList; ++ for (int i = 0; i < obj2.arrayGetLength(); i++) ++ { ++ Object childRef = obj2.arrayGetNF(i); ++ if (!childRef.isRef()) ++ continue; ++ Object childObj = obj2.arrayGet(i); ++ if (!childObj.isDict()) ++ continue; ++ const Ref ref = childRef.getRef(); ++ radList.append(ref.num); ++ } ++ QString tmTxt = UnicodeParsedString(annota->getName()); ++ m_radioMap.insert(tmTxt, radList); ++ } ++ } ++#else + Object *act = xref->fetch(refa.num, refa.gen, &obj1); + if (act && act->isDict()) + { +@@ -873,6 +994,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor, + obj2.free(); + } + obj1.free(); ++#endif + } + return retVal; + } +@@ -3007,6 +3129,23 @@ void SlaOutputDev::beginMarkedContent(char *name, Object *dictRef) + } + else + { ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ dictObj = dictRef->fetch(xref); ++ if (!dictObj.isDict()) ++ return; ++ dict = dictObj.getDict(); ++ dictType = dict->lookup("Type"); ++ if (dictType.isName("OCG")) ++ { ++ oc = contentConfig->findOcgByRef(dictRef->getRef()); ++ if (oc) ++ { ++ // qDebug() << "Begin OCG Content with Name " << UnicodeParsedString(oc->getName()); ++ m_doc->setActiveLayer(UnicodeParsedString(oc->getName())); ++ mSte.ocgName = UnicodeParsedString(oc->getName()); ++ } ++ } ++#else + dictRef->fetch(xref, &dictObj); + if (!dictObj.isDict()) + { +@@ -3027,6 +3166,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Object *dictRef) + } + dictType.free(); + dictObj.free(); ++#endif + } + } + m_mcStack.push(mSte); +@@ -3046,14 +3186,20 @@ void SlaOutputDev::beginMarkedContent(char *name, Dict *properties) + { + if (layersSetByOCG) + return; +- Object obj; + QString lName = QString("Layer_%1").arg(layerNum + 1); ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ Object obj = properties->lookup((char*) "Title"); ++ if (obj.isString()) ++ lName = QString(obj.getString()->getCString()); ++#else ++ Object obj; + if (properties->lookup((char*)"Title", &obj)) + { + if (obj.isString()) + lName = QString(obj.getString()->getCString()); + obj.free(); + } ++#endif + for (ScLayers::iterator it = m_doc->Layers.begin(); it != m_doc->Layers.end(); ++it) + { + if (it->Name == lName) +@@ -3066,6 +3212,29 @@ void SlaOutputDev::beginMarkedContent(char *name, Dict *properties) + if (!firstLayer) + currentLayer = m_doc->addLayer(lName, true); + firstLayer = false; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0) ++ obj = properties->lookup((char*) "Visible"); ++ if (obj.isBool()) ++ m_doc->setLayerVisible(currentLayer, obj.getBool()); ++ obj = properties->lookup((char*) "Editable"); ++ if (obj.isBool()) ++ m_doc->setLayerLocked(currentLayer, !obj.getBool()); ++ obj = properties->lookup((char*) "Printed"); ++ if (obj.isBool()) ++ m_doc->setLayerPrintable(currentLayer, obj.getBool()); ++ obj = properties->lookup((char*)"Color"); ++ if (obj.isArray()) ++ { ++ Object obj1; ++ obj1 = obj.arrayGet(0); ++ int r = obj1.getNum() / 256; ++ obj1 = obj.arrayGet(1); ++ int g = obj1.getNum() / 256; ++ obj1 = obj.arrayGet(2); ++ int b = obj1.getNum() / 256; ++ m_doc->setLayerMarker(currentLayer, QColor(r, g, b)); ++ } ++#else + if (properties->lookup((char*)"Visible", &obj)) + { + if (obj.isBool()) +@@ -3102,6 +3271,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Dict *properties) + } + obj.free(); + } ++#endif + } + } + } diff --git a/app-office/scribus/scribus-1.5.3-r1.ebuild b/app-office/scribus/scribus-1.5.3-r1.ebuild index 145861f5eeb5..98015e52135b 100644 --- a/app-office/scribus/scribus-1.5.3-r1.ebuild +++ b/app-office/scribus/scribus-1.5.3-r1.ebuild @@ -6,7 +6,6 @@ EAPI=6 PYTHON_COMPAT=( python2_7 ) PYTHON_REQ_USE="tk?" CMAKE_MAKEFILE_GENERATOR=ninja -CMAKE_MIN_VERSION=3.2.0 inherit cmake-utils eutils flag-o-matic gnome2 python-single-r1 xdg-utils @@ -77,6 +76,7 @@ PATCHES=( "${FILESDIR}"/${P}-docdir.patch "${FILESDIR}"/${P}-fpic.patch "${FILESDIR}"/${P}-cmake-openssl.patch + "${FILESDIR}"/${P}-poppler-0.58.patch ) src_prepare() { @@ -145,7 +145,7 @@ src_configure() { -DWANT_GRAPHICSMAGICK="$(usex graphicsmagick)" -DWANT_NOOSG="$(usex !osg)" -DWANT_DEBUG="$(usex debug)" - -DWANT_NOHEADERINSTALL="$(usex minimal)" + -DWANT_HEADERINSTALL="$(usex !minimal)" -DWANT_HUNSPELL="$(usex hunspell)" -DWANT_NOEXAMPLES="$(usex !examples)" -DWANT_NOTEMPLATES="$(usex !templates)" -- cgit v1.2.3