app-office/scribus: Move 1.5.3 specific patches into tarball
authorAndreas Sturmlechner <asturm@gentoo.org>
Wed, 20 Jun 2018 16:29:55 +0000 (18:29 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 20 Jun 2018 16:30:49 +0000 (18:30 +0200)
Package-Manager: Portage-2.3.40, Repoman-2.3.9

app-office/scribus/Manifest
app-office/scribus/files/scribus-1.5.3-cmake-openssl.patch [deleted file]
app-office/scribus/files/scribus-1.5.3-poppler-0.58.patch [deleted file]
app-office/scribus/files/scribus-1.5.3-qt-5.11.patch [deleted file]
app-office/scribus/files/scribus-1.5.3-x86-fpic.patch [deleted file]
app-office/scribus/scribus-1.5.3-r1.ebuild

index 5fa3548de6d13b27a8a03599be5563d8bd8fb9b1..cbfcaf580cf10231f04f4d0647efdb6d63d685cd 100644 (file)
@@ -1,3 +1,4 @@
+DIST scribus-1.5.3.patches.tar.xz 5332 BLAKE2B 3e7702da61a0698873175011115d86bc473a4d2d59be4bca894bbde41844029707dda7307f1d07033fde501da03097aed21dcf12991bb978df1156cb6654077a SHA512 aeb8142eca826a3f9cbd25e8e2276a352f24fe65241a2fe737fd26597419ad9a7180b337f77fb6ba6ac83f378b235d38b1eb6fd85d10985d3a1dbd21bbe4773f
 DIST scribus-1.5.3.tar.xz 74222084 BLAKE2B ffb50c728c0669ab8a22c416c143e8dd47c818120247b4cf5a890872857326b53491be99004a344d78ea2cf2b174ae2987ddcddb4cef39a6e95fe1695be45d48 SHA512 487cea685869397bc52acc7be8e8e9f4bad3f594c1f95740207e4d9e26b07461a7fd2a95d5337b38f1b0fa6504a9f6059cca6740c78cc165eab0b779ffdfe980
 DIST scribus-1.5.4-poppler-0.64.0.patch.tar.xz 3020 BLAKE2B 3388efe6498545ffef6604a41b9e697a0cb6cd053c4893f9d64349bb2251400aca7a4f7dd193eb94cf69ca3f4ae1a3ba3ed106127c4fa680f396940d8056e669 SHA512 4577b4b737948a2b41dc0cec90ec95ba260959343e4953929696ceab518a2723a28a891b189caf79435e7fc8f8fc0a1012e7079e890d10549cb2ba426d15b568
 DIST scribus-1.5.4.tar.xz 72832248 BLAKE2B 64797e865ce44fb01f1e29823e3cb46b2b8f1501e8d07e8b265e93a37961582ec4118d0f32d460bc044e32cf7fa6069732f6b9ce60e4dc4b0b42f914b280e637 SHA512 7875ea5f3db5fb116856cf4cf56b4cce2d0b00d9c4820969f52b89e9bf2b36f96eb9e15b368d392be74d4c6d32e971fc28f6ecbf6661fce5e3b9cb61c4d02403
diff --git a/app-office/scribus/files/scribus-1.5.3-cmake-openssl.patch b/app-office/scribus/files/scribus-1.5.3-cmake-openssl.patch
deleted file mode 100644 (file)
index c2cb5e9..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Fix case of "OpenSSL" to match the case of the file shipped by cmake
-Author: Mattia Rizzolo <mattia@debian.org>
-Last-Update: 2017-06-05
-
---- a/cmake/modules/FindLIBPODOFO.cmake
-+++ b/cmake/modules/FindLIBPODOFO.cmake
-@@ -45,7 +45,7 @@
-       #message(STATUS "PODOFO PATCH VERSION ${PODOFO_PATCH_VER}")
-       set(LIBPODOFO_VERSION "${PODOFO_MAJOR_VER}.${PODOFO_MINOR_VER}.${PODOFO_PATCH_VER}" CACHE STRING "PoDoFo version string")
-       if(LIBPODOFO_VERSION VERSION_GREATER "0.9.4")
--              find_package(OPENSSL)
-+              find_package(OpenSSL)
-               if (OPENSSL_FOUND)
-                       message("OpenSSL found OK for installed version of PoDoFo (>= 0.9.5) - Enabling support for PDF embedded in AI")
-                       set(LIBPODOFO_FOUND TRUE CACHE BOOLEAN "Was libpodofo found")
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
deleted file mode 100644 (file)
index 61f5552..0000000
+++ /dev/null
@@ -1,534 +0,0 @@
-From 61186c7ef083046b7e0c908952e8a773e2787d82 Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-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 <poppler/PageTransition.h>\r
- #include <poppler/ViewerPreferences.h>\r
- #include <poppler/poppler-config.h>\r
-+#include <poppler/cpp/poppler-version.h>\r
- #include <poppler/SplashOutputDev.h>\r
- #include <poppler/splash/SplashBitmap.h>\r
\r
-@@ -59,6 +60,12 @@ for which a new license (GPL+exception) is in place.
- #include "ui/multiprogressdialog.h"\r
- #include "ui/propertiespalette.h"\r
\r
-+#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \
-+        ((major) * 10000)                             \
-+      + ((minor) *   100)                             \
-+      + ((micro) *     1))\r
-+#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MAJOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)\r
-+\r
- PdfPlug::PdfPlug(ScribusDoc* doc, int flags)\r
- {\r
-       tmpSele = new Selection(this, false);\r
-@@ -507,12 +514,20 @@ bool PdfPlug::convert(const QString& fn)
-                                                       {\r
-                                                               for (int i = 0; i < order->getLength (); ++i)\r
-                                                               {\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                                                                      Object orderItem = order->get(i);\r
-+#else\r
-                                                                       Object orderItem;\r
-                                                                       order->get(i, &orderItem);\r
-+#endif\r
-                                                                       if (orderItem.isDict())\r
-                                                                       {\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                                                                              Object ref = order->getNF(i);           \r
-+#else\r
-                                                                               Object ref;\r
-                                                                               order->getNF(i, &ref);\r
-+#endif\r
-                                                                               if (ref.isRef())\r
-                                                                               {\r
-                                                                                       OptionalContentGroup *oc = ocg->findOcgByRef(ref.getRef());\r
-@@ -523,7 +538,9 @@ bool PdfPlug::convert(const QString& fn)
-                                                                                               ocgNames.append(ocgName);\r
-                                                                                       }\r
-                                                                               }\r
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)\r
-                                                                               ref.free();\r
-+#endif\r
-                                                                       }\r
-                                                                       else\r
-                                                                       {\r
-@@ -597,39 +614,71 @@ bool PdfPlug::convert(const QString& fn)
-                                                       dev->layersSetByOCG = true;\r
-                                               }\r
- #endif\r
-+\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                                              Object info = pdfDoc->getDocInfo();\r
-+                                              if (info.isDict())\r
-+                                              {\r
-+                                                      Object obj;\r
-+                                                      Dict *infoDict = info.getDict();\r
-+                                                      obj = infoDict->lookup((char*) "Title");\r
-+                                                      if (obj.isString())\r
-+                                                      {\r
-+                                                              m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString()));\r
-+                                                      }\r
-+                                                      obj = infoDict->lookup((char*) "Author");\r
-+                                                      if (obj.isString())\r
-+                                                      {\r
-+                                                              m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString()));\r
-+                                                      }\r
-+                                                      obj = infoDict->lookup((char*) "Subject");\r
-+                                                      if (obj.isString())\r
-+                                                      {\r
-+                                                              m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getString()));\r
-+                                                      }\r
-+                                                      obj = infoDict->lookup((char*) "Keywords");\r
-+                                                      if (obj.isString())\r
-+                                                      {\r
-+                                                              //              s1 = obj.getString();\r
-+                                                              m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getString()));\r
-+                                                      }\r
-+                                              }\r
-+                                              info = Object();\r
-+#else\r
-                                               Object info;\r
-                                               pdfDoc->getDocInfo(&info);\r
-                                               if (info.isDict())\r
-                                               {\r
-                                                       Object obj;\r
--                                              //      GooString *s1;\r
-+                                                      //      GooString *s1;\r
-                                                       Dict *infoDict = info.getDict();\r
--                                                      if (infoDict->lookup((char*)"Title", &obj )->isString())\r
-+                                                      if (infoDict->lookup((char*)"Title", &obj)->isString())\r
-                                                       {\r
--                                              //              s1 = obj.getString();\r
-+                                                              //              s1 = obj.getString();\r
-                                                               m_Doc->documentInfo().setTitle(UnicodeParsedString(obj.getString()));\r
-                                                               obj.free();\r
-                                                       }\r
--                                                      if (infoDict->lookup((char*)"Author", &obj )->isString())\r
-+                                                      if (infoDict->lookup((char*)"Author", &obj)->isString())\r
-                                                       {\r
--                                              //              s1 = obj.getString();\r
-+                                                              //              s1 = obj.getString();\r
-                                                               m_Doc->documentInfo().setAuthor(UnicodeParsedString(obj.getString()));\r
-                                                               obj.free();\r
-                                                       }\r
--                                                      if (infoDict->lookup((char*)"Subject", &obj )->isString())\r
-+                                                      if (infoDict->lookup((char*)"Subject", &obj)->isString())\r
-                                                       {\r
--                                              //              s1 = obj.getString();\r
-+                                                              //              s1 = obj.getString();\r
-                                                               m_Doc->documentInfo().setSubject(UnicodeParsedString(obj.getString()));\r
-                                                               obj.free();\r
-                                                       }\r
--                                                      if (infoDict->lookup((char*)"Keywords", &obj )->isString())\r
-+                                                      if (infoDict->lookup((char*)"Keywords", &obj)->isString())\r
-                                                       {\r
--                                              //              s1 = obj.getString();\r
-+                                                              //              s1 = obj.getString();\r
-                                                               m_Doc->documentInfo().setKeywords(UnicodeParsedString(obj.getString()));\r
-                                                               obj.free();\r
-                                                       }\r
-                                               }\r
-                                               info.free();\r
-+#endif\r
-                                               if (cropped)\r
-                                               {\r
-                                                       QRectF crBox = getCBox(contentRect, pageNs[0]);\r
-@@ -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);\r
-                                                       }\r
-                                                       PDFPresentationData ef;\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                                                      Object trans = pdfDoc->getPage(pp)->getTrans();\r
-+                                                      Object *transi = &trans;\r
-+#else\r
-                                                       Object trans;\r
-                                                       Object *transi = pdfDoc->getPage(pp)->getTrans(&trans);\r
-+#endif\r
-                                                       if (transi->isDict())\r
-                                                       {\r
-                                                               m_Doc->pdfOptions().PresentMode = true;\r
-@@ -793,32 +847,51 @@ bool PdfPlug::convert(const QString& fn)
-                                                               delete pgTrans;\r
-                                                       }\r
-                                                       m_Doc->currentPage()->PresentVals = ef;\r
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)\r
-                                                       trans.free();\r
-                                                       transi->free();\r
-+#endif\r
-                                               }\r
-                                               int numjs = pdfDoc->getCatalog()->numJS();\r
-                                               if (numjs > 0)\r
-                                               {\r
-                                                       NameTree *jsNameTreeP = new NameTree();\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                                                      Object catDict = pdfDoc->getXRef()->getCatalog();\r
-+#else\r
-                                                       Object catDict;\r
-                                                       pdfDoc->getXRef()->getCatalog(&catDict);\r
-+#endif\r
-                                                       if (catDict.isDict())\r
-                                                       {\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                                                              Object names = catDict.dictLookup("Names");\r
-+#else\r
-                                                               Object names;\r
-                                                               catDict.dictLookup("Names", &names);\r
-+#endif\r
-                                                               if (names.isDict())\r
-                                                               {\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                                                                      Object obj = names.dictLookup("JavaScript");\r
-+                                                                      jsNameTreeP->init(pdfDoc->getXRef(), &obj);\r
-+#else\r
-                                                                       Object obj;\r
-                                                                       names.dictLookup("JavaScript", &obj);\r
-                                                                       jsNameTreeP->init(pdfDoc->getXRef(), &obj);\r
-                                                                       obj.free();\r
-+#endif\r
-                                                               }\r
-                                                               for (int a = 0; a < numjs; a++)\r
-                                                               {\r
-                                                                       m_Doc->JavaScripts.insert(UnicodeParsedString(jsNameTreeP->getName(a)), UnicodeParsedString(pdfDoc->getCatalog()->getJS(a)));\r
-                                                               }\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                                                              names = catDict.dictLookup("OpenAction");\r
-+#else\r
-                                                               names.free();\r
-                                                               catDict.dictLookup("OpenAction", &names);\r
-+#endif\r
-                                                               if (names.isDict())\r
-                                                               {\r
-                                                                       LinkAction *linkAction = NULL;\r
-@@ -839,9 +912,13 @@ bool PdfPlug::convert(const QString& fn)
-                                                                               }\r
-                                                                       }\r
-                                                               }\r
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)\r
-                                                               names.free();\r
-+#endif\r
-                                                       }\r
-+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 58, 0)\r
-                                                       catDict.free();\r
-+#endif\r
-                                                       delete jsNameTreeP;\r
-                                               }\r
-                                               m_Doc->pdfOptions().Version = (PDFOptions::PDFVersion)qMin(15, qMax(13, pdfDoc->getPDFMajorVersion() * 10 + pdfDoc->getPDFMinorVersion()));\r
-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.
- */\r
\r
- #include "slaoutput.h"\r
-+#include <poppler/cpp/poppler-version.h>\r
- #include <poppler/GlobalParams.h>\r
- #include <poppler/poppler-config.h>\r
- #include <poppler/FileSpec.h>\r
-@@ -19,11 +20,49 @@ for which a new license (GPL+exception) is in place.
- #include "util_math.h"\r
- #include <tiffio.h>\r
\r
-+#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \
-+        ((major) * 10000)                             \
-+      + ((minor) *   100)                             \
-+      + ((micro) *     1))\r
-+#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MAJOR, POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)\r
-+\r
- LinkSubmitForm::LinkSubmitForm(Object *actionObj)\r
- {\r
-       Object obj1, obj2, obj3;\r
-       fileName = NULL;\r
-       m_flags = 0;\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+      if (actionObj->isDict())\r
-+      {\r
-+              obj1 = actionObj->dictLookup("F");\r
-+              if (!obj1.isNull())\r
-+              {\r
-+                      if (obj1.isDict())\r
-+                      {\r
-+                              obj3 = obj1.dictLookup("FS");\r
-+                              if (!obj3.isNull())\r
-+                              {\r
-+                                      if (obj3.isName())\r
-+                                      {\r
-+                                              char *name = obj3.getName();\r
-+                                              if (!strcmp(name, "URL"))\r
-+                                              {\r
-+                                                      obj2 = obj1.dictLookup("F");\r
-+                                                      if (!obj2.isNull())\r
-+                                                              fileName = obj2.getString()->copy();\r
-+                                              }\r
-+                                      }\r
-+                              }\r
-+                      }\r
-+              }\r
-+              obj1 = actionObj->dictLookup("Flags");\r
-+              if (!obj1.isNull())\r
-+              {\r
-+                      if (obj1.isNum())\r
-+                              m_flags = obj1.getInt();\r
-+              }\r
-+      }\r
-+#else\r
-       if (actionObj->isDict())\r
-       {\r
-               if (!actionObj->dictLookup("F", &obj1)->isNull())\r
-@@ -54,6 +93,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj)
-               }\r
-               obj1.free();\r
-       }\r
-+#endif\r
- }\r
\r
- LinkSubmitForm::~LinkSubmitForm()\r
-@@ -66,11 +106,25 @@ LinkImportData::LinkImportData(Object *actionObj)
- {\r
-       Object obj1, obj3;\r
-       fileName = NULL;\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+      if (actionObj->isDict())\r
-+      {\r
-+              obj1 = actionObj->dictLookup("F");\r
-+              if (!obj1.isNull())\r
-+              {\r
-+                      obj3 = getFileSpecNameForPlatform(&obj1);\r
-+                      if (!obj3.isNull())\r
-+                      {\r
-+                              fileName = obj3.getString()->copy();\r
-+                      }\r
-+              }\r
-+      }\r
-+#else\r
-       if (actionObj->isDict())\r
-       {\r
-               if (!actionObj->dictLookup("F", &obj1)->isNull())\r
-               {\r
--                      if (getFileSpecNameForPlatform (&obj1, &obj3))\r
-+                      if (getFileSpecNameForPlatform(&obj1, &obj3))\r
-                       {\r
-                               fileName = obj3.getString()->copy();\r
-                               obj3.free();\r
-@@ -78,6 +132,7 @@ LinkImportData::LinkImportData(Object *actionObj)
-               }\r
-               obj1.free();\r
-       }\r
-+#endif\r
- }\r
\r
- LinkImportData::~LinkImportData()\r
-@@ -256,6 +311,27 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *ano)
-       Object obj;\r
-       Ref refa = ano->getRef();\r
-       Object additionalActions;\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+      obj = xref->fetch(refa.num, refa.gen);\r
-+      if (obj.isDict())\r
-+      {\r
-+              Dict* adic = obj.getDict();\r
-+              additionalActions = adic->lookupNF("A");\r
-+              Object additionalActionsObject = additionalActions.fetch(pdfDoc->getXRef());\r
-+              if (additionalActionsObject.isDict())\r
-+              {\r
-+                      Object actionObject = additionalActionsObject.dictLookup("S");\r
-+                      if (actionObject.isName("ImportData"))\r
-+                      {\r
-+                              linkAction = new LinkImportData(&additionalActionsObject);\r
-+                      }\r
-+                      else if (actionObject.isName("SubmitForm"))\r
-+                      {\r
-+                              linkAction = new LinkSubmitForm(&additionalActionsObject);\r
-+                      }\r
-+              }\r
-+      }\r
-+#else\r
-       Object *act = xref->fetch(refa.num, refa.gen, &obj);\r
-       if (act)\r
-       {\r
-@@ -283,6 +359,7 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *ano)
-               }\r
-       }\r
-       obj.free();\r
-+#endif\r
-       return linkAction;\r
- }\r
\r
-@@ -293,6 +370,22 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *a
-       Object obj;\r
-       Ref refa = ano->getRef();\r
-       Object additionalActions;\r
-+\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+      obj = xref->fetch(refa.num, refa.gen);\r
-+      if (obj.isDict())\r
-+      {\r
-+              Dict* adic = obj.getDict();\r
-+              additionalActions = adic->lookupNF("AA");\r
-+              Object additionalActionsObject = additionalActions.fetch(pdfDoc->getXRef());\r
-+              if (additionalActionsObject.isDict())\r
-+              {\r
-+                      Object actionObject = additionalActionsObject.dictLookup(key);\r
-+                      if (actionObject.isDict())\r
-+                              linkAction = LinkAction::parseAction(&actionObject, pdfDoc->getCatalog()->getBaseURI());\r
-+              }\r
-+      }\r
-+#else\r
-       Object *act = xref->fetch(refa.num, refa.gen, &obj);\r
-       if (act)\r
-       {\r
-@@ -313,6 +406,7 @@ LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget *a
-               }\r
-       }\r
-       obj.free();\r
-+#endif\r
-       return linkAction;\r
- }\r
\r
-@@ -838,6 +932,33 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
-       {\r
-               Object obj1;\r
-               Ref refa = annota->getRef();\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+              obj1 = xref->fetch(refa.num, refa.gen);\r
-+              if (obj1.isDict())\r
-+              {\r
-+                      Dict* dict = obj1.getDict();\r
-+                      Object obj2 = dict->lookup("Kids");\r
-+                      //childs\r
-+                      if (obj2.isArray())\r
-+                      {\r
-+                              // Load children\r
-+                              QList<int> radList;\r
-+                              for (int i = 0; i < obj2.arrayGetLength(); i++)\r
-+                              {\r
-+                                      Object childRef = obj2.arrayGetNF(i);\r
-+                                      if (!childRef.isRef())\r
-+                                              continue;\r
-+                                      Object childObj = obj2.arrayGet(i);\r
-+                                      if (!childObj.isDict())\r
-+                                              continue;\r
-+                                      const Ref ref = childRef.getRef();\r
-+                                      radList.append(ref.num);\r
-+                              }\r
-+                              QString tmTxt = UnicodeParsedString(annota->getName());\r
-+                              m_radioMap.insert(tmTxt, radList);\r
-+                      }\r
-+              }\r
-+#else\r
-               Object *act = xref->fetch(refa.num, refa.gen, &obj1);\r
-               if (act && act->isDict())\r
-               {\r
-@@ -873,6 +994,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
-                       obj2.free();\r
-               }\r
-               obj1.free();\r
-+#endif\r
-       }\r
-       return retVal;\r
- }\r
-@@ -3007,6 +3129,23 @@ void SlaOutputDev::beginMarkedContent(char *name, Object *dictRef)
-               }\r
-               else\r
-               {\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                      dictObj = dictRef->fetch(xref);\r
-+                      if (!dictObj.isDict())\r
-+                              return;\r
-+                      dict = dictObj.getDict();\r
-+                      dictType = dict->lookup("Type");\r
-+                      if (dictType.isName("OCG"))\r
-+                      {\r
-+                              oc = contentConfig->findOcgByRef(dictRef->getRef());\r
-+                              if (oc)\r
-+                              {\r
-+                                      //                                      qDebug() << "Begin OCG Content with Name " << UnicodeParsedString(oc->getName());\r
-+                                      m_doc->setActiveLayer(UnicodeParsedString(oc->getName()));\r
-+                                      mSte.ocgName = UnicodeParsedString(oc->getName());\r
-+                              }\r
-+                      }\r
-+#else\r
-                       dictRef->fetch(xref, &dictObj);\r
-                       if (!dictObj.isDict())\r
-                       {\r
-@@ -3027,6 +3166,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Object *dictRef)
-                       }\r
-                       dictType.free();\r
-                       dictObj.free();\r
-+#endif\r
-               }\r
-       }\r
-       m_mcStack.push(mSte);\r
-@@ -3046,14 +3186,20 @@ void SlaOutputDev::beginMarkedContent(char *name, Dict *properties)
-               {\r
-                       if (layersSetByOCG)\r
-                               return;\r
--                      Object obj;\r
-                       QString lName = QString("Layer_%1").arg(layerNum + 1);\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                      Object obj = properties->lookup((char*) "Title");\r
-+                      if (obj.isString())\r
-+                              lName = QString(obj.getString()->getCString());\r
-+#else\r
-+                      Object obj;\r
-                       if (properties->lookup((char*)"Title", &obj))\r
-                       {\r
-                               if (obj.isString())\r
-                                       lName =  QString(obj.getString()->getCString());\r
-                               obj.free();\r
-                       }\r
-+#endif\r
-                       for (ScLayers::iterator it = m_doc->Layers.begin(); it != m_doc->Layers.end(); ++it)\r
-                       {\r
-                               if (it->Name == lName)\r
-@@ -3066,6 +3212,29 @@ void SlaOutputDev::beginMarkedContent(char *name, Dict *properties)
-                       if (!firstLayer)\r
-                               currentLayer = m_doc->addLayer(lName, true);\r
-                       firstLayer = false;\r
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)\r
-+                      obj = properties->lookup((char*) "Visible");\r
-+                      if (obj.isBool())\r
-+                              m_doc->setLayerVisible(currentLayer, obj.getBool());\r
-+                      obj = properties->lookup((char*) "Editable");\r
-+                      if (obj.isBool())\r
-+                              m_doc->setLayerLocked(currentLayer, !obj.getBool());\r
-+                      obj = properties->lookup((char*) "Printed");\r
-+                      if (obj.isBool())\r
-+                              m_doc->setLayerPrintable(currentLayer, obj.getBool());\r
-+                      obj = properties->lookup((char*)"Color");\r
-+                      if (obj.isArray())\r
-+                      {\r
-+                              Object obj1;\r
-+                              obj1 = obj.arrayGet(0);\r
-+                              int r = obj1.getNum() / 256;\r
-+                              obj1 = obj.arrayGet(1);\r
-+                              int g = obj1.getNum() / 256;\r
-+                              obj1 = obj.arrayGet(2);\r
-+                              int b = obj1.getNum() / 256;\r
-+                              m_doc->setLayerMarker(currentLayer, QColor(r, g, b));\r
-+                      }\r
-+#else\r
-                       if (properties->lookup((char*)"Visible", &obj))\r
-                       {\r
-                               if (obj.isBool())\r
-@@ -3102,6 +3271,7 @@ void SlaOutputDev::beginMarkedContent(char *name, Dict *properties)
-                               }\r
-                               obj.free();\r
-                       }\r
-+#endif\r
-               }\r
-       }\r
- }\r
diff --git a/app-office/scribus/files/scribus-1.5.3-qt-5.11.patch b/app-office/scribus/files/scribus-1.5.3-qt-5.11.patch
deleted file mode 100644 (file)
index d46a9cf..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-From ed5bb7e205e10a2855b2f55d6de9d5702f81633f Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Mon, 19 Mar 2018 23:52:49 +0100
-Subject: [PATCH] Fix build with Qt 5.11 (missing headers)
-
----
- .../plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp   | 3 ++-
- scribus/plugins/tools/lenseffects/lensdialog.cpp                       | 1 +
- scribus/sclistboxpixmap.h                                              | 2 ++
- 3 files changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp b/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
-index 3f0d916b7..645aec8d1 100644
---- a/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
-+++ b/scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.cpp
-@@ -26,8 +26,9 @@ for which a new license (GPL+exception) is in place.
- #include "meshdistortiondialog.h"
--#include <QPainterPath>
- #include <QGraphicsItem>
-+#include <QPainterPath>
-+#include <QStyleOptionGraphicsItem>
- #include "commonstrings.h"
- #include "fpointarray.h"
-diff --git a/scribus/plugins/tools/lenseffects/lensdialog.cpp b/scribus/plugins/tools/lenseffects/lensdialog.cpp
-index cfabc4091..bed8305dc 100644
---- a/scribus/plugins/tools/lenseffects/lensdialog.cpp
-+++ b/scribus/plugins/tools/lenseffects/lensdialog.cpp
-@@ -27,6 +27,7 @@ for which a new license (GPL+exception) is in place.
- #include "lensdialog.h"
- #include <cmath>
- #include <QRadialGradient>
-+#include <QStyleOptionGraphicsItem>
- #include "iconmanager.h"
- #include "selection.h"
- #include "sccolorengine.h"
-diff --git a/scribus/sclistboxpixmap.h b/scribus/sclistboxpixmap.h
-index a067b7912..ebdae272c 100644
---- a/scribus/sclistboxpixmap.h
-+++ b/scribus/sclistboxpixmap.h
-@@ -9,11 +9,13 @@ for which a new license (GPL+exception) is in place.
- #include <memory>
-+#include <QAbstractItemDelegate>
- #include <QApplication>
- #include <QDebug>
- #include <QPainter>
- #include <QPixmap>
- #include <QScopedPointer>
-+#include <QStyleOptionMenuItem>
- #include <QVariant>
- #include "scguardedptr.h"
--- 
-2.16.2
-
diff --git a/app-office/scribus/files/scribus-1.5.3-x86-fpic.patch b/app-office/scribus/files/scribus-1.5.3-x86-fpic.patch
deleted file mode 100644 (file)
index 03d4dc4..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/CMakeLists.txt   2017-05-28 11:10:27.000000000 +0200
-+++ b/CMakeLists.txt   2018-01-09 14:26:14.494922353 +0100
-@@ -155,11 +155,11 @@
-       set(ARCH_HPPA 1)
- endif()
--# We need to pass -fPIC to lib2geom on amd64, mips, mipsel, and hppa. See:
-+# We need to pass -fPIC to lib2geom on amd64, mips, mipsel, hppa and x86. See:
- # http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 and
- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559133
--if (ARCH_X86_64 EQUAL 1 OR ARCH_HPPA EQUAL 1 OR ARCH_MIPS EQUAL 1 OR ARCH_MIPS_64 EQUAL 1 OR ARCH_PPC_64 EQUAL 1)
-+if (ARCH_X86 EQUAL 1 OR ARCH_X86_64 EQUAL 1 OR ARCH_HPPA EQUAL 1 OR ARCH_MIPS EQUAL 1 OR ARCH_MIPS_64 EQUAL 1 OR ARCH_PPC_64 EQUAL 1)
-       set(CMAKE_CXX_FLAGS_FPIC "-fPIC")
- endif()
index 12d674025929b1fe3d891a86df1eab8f7cb128a8..b962ce4b7175e151a86266c834d4ea3a4189d1fe 100644 (file)
@@ -11,7 +11,8 @@ inherit cmake-utils eutils flag-o-matic gnome2 python-single-r1 xdg-utils
 
 DESCRIPTION="Desktop publishing (DTP) and layout program"
 HOMEPAGE="https://www.scribus.net/"
-SRC_URI="mirror://sourceforge/project/${PN}/${PN}-devel/${PV}/${P}.tar.xz"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}-devel/${PV}/${P}.tar.xz
+https://dev.gentoo.org/~asturm/distfiles/${P}.patches.tar.xz"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -94,10 +95,10 @@ DEPEND="${COMMON_DEPEND}
 PATCHES=(
        "${FILESDIR}"/${P}-docdir.patch
        "${FILESDIR}"/${P}-fpic.patch
-       "${FILESDIR}"/${P}-cmake-openssl.patch
-       "${FILESDIR}"/${P}-poppler-0.58.patch
-       "${FILESDIR}"/${P}-x86-fpic.patch
-       "${FILESDIR}"/${P}-qt-5.11.patch
+       "${WORKDIR}"/${P}-cmake-openssl.patch
+       "${WORKDIR}"/${P}-poppler-0.58.patch
+       "${WORKDIR}"/${P}-x86-fpic.patch
+       "${WORKDIR}"/${P}-qt-5.11.patch
 )
 
 src_prepare() {