summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD26
-rw-r--r--findOpenSSL.patch15
-rw-r--r--fix-15289-2.patch243
-rw-r--r--fix-15289.patch70
-rw-r--r--fix-icu-0.61.1-compilation.patch11
-rw-r--r--fix-poppler-issue.patch534
7 files changed, 335 insertions, 585 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 802429ff8d3b..3b4228d1f643 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = scribus-devel
pkgdesc = Desktop publishing software
- pkgver = 1.5.3
- pkgrel = 3
+ pkgver = 1.5.4
+ pkgrel = 1
url = https://www.scribus.net/
arch = i686
arch = x86_64
@@ -15,6 +15,7 @@ pkgbase = scribus-devel
depends = libmspub
depends = libpagemaker
depends = libvisio
+ depends = libzmf
depends = podofo
depends = poppler
depends = python2
@@ -25,18 +26,16 @@ pkgbase = scribus-devel
optdepends = hyphen-lang: hyphenation patterns for desired languages
provides = scribus
conflicts = scribus
- source = https://downloads.sourceforge.net/scribus/scribus-1.5.3.tar.xz
- source = https://downloads.sourceforge.net/scribus/scribus-1.5.3.tar.xz.asc
- source = findOpenSSL.patch
- source = fix-poppler-issue.patch
- source = fix-icu-0.61.1-compilation.patch
+ source = https://downloads.sourceforge.net/scribus/scribus-1.5.4.tar.xz
+ source = https://downloads.sourceforge.net/scribus/scribus-1.5.4.tar.xz.asc
+ source = fix-15289.patch
+ source = fix-15289-2.patch
validpgpkeys = 5086B8D68E70FDDF4C40045AEF7B95E7F60166DA
validpgpkeys = 757F5E9B13DD648887AD50092D47C099E782504E
- sha256sums = 73a30b4727e19f5d301a936d23a84275cc4f5613a92416cbd843f5167721d74f
+ sha256sums = 6480925250b2bb07028e2f378c02b67fe3e33206743671e03c07c701cd05da03
sha256sums = SKIP
- sha256sums = d6d798a370442026e04d56769848761111d63af2ca69a6c2591233da3703dfb4
- sha256sums = 9e9e954cb30fe606196cb8fc1864983fa571f3a729aec0c3ef01fc577be238a1
- sha256sums = 9faa7fe6d5c7744511b5472ad0e376162360099b9456aaaf3ec78290b1bfef11
+ sha256sums = 0a782958360ad70145a588a5e1c0044d162344e96b4ff9b0aeb31388cc9b2e36
+ sha256sums = edb124793e1b838e60cff4c21c536e16c77e91322f9837eab75d9ff06439ad4f
pkgname = scribus-devel
diff --git a/PKGBUILD b/PKGBUILD
index 81842cf5b001..97567a75662e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,13 +7,13 @@
_pkgname=scribus
pkgname=${_pkgname}-devel
-pkgver=1.5.3
-pkgrel=3
+pkgver=1.5.4
+pkgrel=1
pkgdesc="Desktop publishing software"
arch=('i686' 'x86_64')
url="https://www.scribus.net/"
license=('GPL')
-depends=('hunspell' 'libcdr' 'libmspub' 'libpagemaker' 'libvisio' 'podofo'
+depends=('hunspell' 'libcdr' 'libmspub' 'libpagemaker' 'libvisio' 'libzmf' 'podofo'
'poppler' 'python2' 'qt5-base' 'hicolor-icon-theme' 'harfbuzz-icu')
makedepends=('cmake' 'boost' 'mesa' 'qt5-tools')
optdepends=('tk: scripts based on tkinter'
@@ -21,22 +21,20 @@ optdepends=('tk: scripts based on tkinter'
conflicts=("${_pkgname}")
provides=("${_pkgname}")
source=("https://downloads.sourceforge.net/${_pkgname}/${_pkgname}-${pkgver}.tar.xz"{,.asc}
- 'findOpenSSL.patch'
- 'fix-poppler-issue.patch'
- 'fix-icu-0.61.1-compilation.patch')
-sha256sums=('73a30b4727e19f5d301a936d23a84275cc4f5613a92416cbd843f5167721d74f' 'SKIP'
- 'd6d798a370442026e04d56769848761111d63af2ca69a6c2591233da3703dfb4'
- '9e9e954cb30fe606196cb8fc1864983fa571f3a729aec0c3ef01fc577be238a1'
- '9faa7fe6d5c7744511b5472ad0e376162360099b9456aaaf3ec78290b1bfef11')
+ 'fix-15289.patch'
+ 'fix-15289-2.patch')
+sha256sums=('6480925250b2bb07028e2f378c02b67fe3e33206743671e03c07c701cd05da03'
+ 'SKIP'
+ '0a782958360ad70145a588a5e1c0044d162344e96b4ff9b0aeb31388cc9b2e36'
+ 'edb124793e1b838e60cff4c21c536e16c77e91322f9837eab75d9ff06439ad4f')
validpgpkeys=('5086B8D68E70FDDF4C40045AEF7B95E7F60166DA' # Peter Linnell <plinnell@scribus.net>
'757F5E9B13DD648887AD50092D47C099E782504E') # The Scribus Team (www.scribus.net) <the_scribus_team@scribus.net>
prepare() {
cd ${_pkgname}-${pkgver}
- patch -p1 -i ../findOpenSSL.patch
- patch -p1 -i ../fix-poppler-issue.patch
- patch -p1 -i ../fix-icu-0.61.1-compilation.patch
+ patch -p1 -i ../fix-15289.patch
+ patch -p1 -i ../fix-15289-2.patch
# Fix python name
sed \
@@ -51,7 +49,7 @@ build() {
cd ${_pkgname}-${pkgver}/build
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_BUILD_TYPE=None \
-DCMAKE_SKIP_RPATH=ON
make
}
diff --git a/findOpenSSL.patch b/findOpenSSL.patch
deleted file mode 100644
index c2cb5e9dd58e..000000000000
--- a/findOpenSSL.patch
+++ /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/fix-15289-2.patch b/fix-15289-2.patch
new file mode 100644
index 000000000000..8e5d65a270d5
--- /dev/null
+++ b/fix-15289-2.patch
@@ -0,0 +1,243 @@
+From 7d4ceeb5cac32287769e3c0238699e0b3e56c24d Mon Sep 17 00:00:00 2001
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Wed, 2 May 2018 14:22:50 +0000
+Subject: [PATCH] #15289: FTBFS when using poppler 0.64.0
+
+git-svn-id: svn://scribus.net/trunk/Scribus@22513 11d20701-8431-0410-a711-e3c959e3b870
+---
+ scribus/plugins/import/pdf/slaoutput.cpp | 42 +++++++++++++++++---------------
+ scribus/plugins/import/pdf/slaoutput.h | 26 +++++++++++++++-----
+ 2 files changed, 42 insertions(+), 26 deletions(-)
+
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
+index 257deb30c6..96847508ba 100644
+--- a/scribus/plugins/import/pdf/slaoutput.cpp
++++ b/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -6,7 +6,7 @@ for which a new license (GPL+exception) is in place.
+ */
+
+ #include "slaoutput.h"
+-#include <poppler/cpp/poppler-version.h>
++
+ #include <poppler/GlobalParams.h>
+ #include <poppler/poppler-config.h>
+ #include <poppler/FileSpec.h>
+@@ -20,12 +20,6 @@ for which a new license (GPL+exception) is in place.
+ #include "util_math.h"
+ #include <tiffio.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)
+-
+ LinkSubmitForm::LinkSubmitForm(Object *actionObj)
+ {
+ Object obj1, obj2, obj3;
+@@ -44,7 +38,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj)
+ {
+ if (obj3.isName())
+ {
+- char *name = obj3.getName();
++ POPPLER_CONST char *name = obj3.getName();
+ if (!strcmp(name, "URL"))
+ {
+ obj2 = obj1.dictLookup("F");
+@@ -508,8 +502,8 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
+ QString fileName = "";
+ if (act->getKind() == actionGoTo)
+ {
+- LinkGoTo *gto = (LinkGoTo*)act;
+- LinkDest *dst = gto->getDest();
++ LinkGoTo *gto = (LinkGoTo*) act;
++ POPPLER_CONST LinkDest *dst = gto->getDest();
+ if (dst)
+ {
+ if (dst->getKind() == destXYZ)
+@@ -528,7 +522,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
+ }
+ else
+ {
+- GooString *ndst = gto->getNamedDest();
++ POPPLER_CONST GooString *ndst = gto->getNamedDest();
+ if (ndst)
+ {
+ LinkDest *dstn = pdfDoc->findDest(ndst);
+@@ -555,7 +549,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
+ {
+ LinkGoToR *gto = (LinkGoToR*)act;
+ fileName = UnicodeParsedString(gto->getFileName());
+- LinkDest *dst = gto->getDest();
++ POPPLER_CONST LinkDest *dst = gto->getDest();
+ if (dst)
+ {
+ if (dst->getKind() == destXYZ)
+@@ -568,7 +562,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double xCoor, double yCoor, do
+ }
+ else
+ {
+- GooString *ndst = gto->getNamedDest();
++ POPPLER_CONST GooString *ndst = gto->getNamedDest();
+ if (ndst)
+ {
+ LinkDest *dstn = pdfDoc->findDest(ndst);
+@@ -709,7 +703,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
+ bool bgFound = false;
+ if (achar)
+ {
+- AnnotColor *bgCol = achar->getBackColor();
++ POPPLER_CONST AnnotColor *bgCol = achar->getBackColor();
+ if (bgCol)
+ {
+ bgFound = true;
+@@ -717,7 +711,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double xCoor, double yCoor,
+ }
+ else
+ CurrColorFill = CommonStrings::None;
+- AnnotColor *fgCol = achar->getBorderColor();
++ POPPLER_CONST AnnotColor *fgCol = achar->getBorderColor();
+ if (fgCol)
+ {
+ fgFound = true;
+@@ -1054,7 +1048,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ int xco = 0;
+ int yco = 0;
+ LinkGoTo *gto = (LinkGoTo*)Lact;
+- LinkDest *dst = gto->getDest();
++ POPPLER_CONST LinkDest *dst = gto->getDest();
+ if (dst)
+ {
+ if (dst->getKind() == destXYZ)
+@@ -1075,7 +1069,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ }
+ else
+ {
+- GooString *ndst = gto->getNamedDest();
++ POPPLER_CONST GooString *ndst = gto->getNamedDest();
+ if (ndst)
+ {
+ LinkDest *dstn = pdfDoc->findDest(ndst);
+@@ -1107,7 +1101,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ int yco = 0;
+ LinkGoToR *gto = (LinkGoToR*)Lact;
+ QString fileName = UnicodeParsedString(gto->getFileName());
+- LinkDest *dst = gto->getDest();
++ POPPLER_CONST LinkDest *dst = gto->getDest();
+ if (dst)
+ {
+ if (dst->getKind() == destXYZ)
+@@ -1123,7 +1117,7 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano)
+ }
+ else
+ {
+- GooString *ndst = gto->getNamedDest();
++ POPPLER_CONST GooString *ndst = gto->getNamedDest();
+ if (ndst)
+ {
+ LinkDest *dstn = pdfDoc->findDest(ndst);
+@@ -3001,6 +2995,14 @@ void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int widt
+ if ((mm.type() == QTransform::TxShear) || (mm.type() == QTransform::TxRotate))
+ {
+ ite->setImageRotation(-tline.angle());
++ /*QTransform rotMat;
++ rotMat.rotate(tline.angle());
++ QTransform imgMat = m_ctm * rotMat.inverted();
++ double scaleX = sqrt(imgMat.m11() * imgMat.m11() + imgMat.m12() * imgMat.m12());
++ double scaleY = sqrt(imgMat.m21() * imgMat.m21() + imgMat.m22() * imgMat.m22());
++ imgMat.scale(1.0 / scaleX, 1.0 / scaleY);
++ if (!imgMat.isIdentity())
++ img = img.transformed(imgMat);*/
+ }
+ else
+ {
+@@ -4031,7 +4033,7 @@ QString SlaOutputDev::getColor(GfxColorSpace *color_space, GfxColor *color, int
+ return fNam;
+ }
+
+-QString SlaOutputDev::getAnnotationColor(AnnotColor *color)
++QString SlaOutputDev::getAnnotationColor(const AnnotColor *color)
+ {
+ QString fNam;
+ QString namPrefix = "FromPDF";
+diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h
+index 6698c030e0..7317cae210 100644
+--- a/scribus/plugins/import/pdf/slaoutput.h
++++ b/scribus/plugins/import/pdf/slaoutput.h
+@@ -26,6 +26,7 @@ for which a new license (GPL+exception) is in place.
+ #include "selection.h"
+ #include "vgradient.h"
+
++#include <poppler/cpp/poppler-version.h>
+ #include <poppler/goo/gtypes.h>
+ #include <poppler/Object.h>
+ #include <poppler/OutputDev.h>
+@@ -49,6 +50,18 @@ for which a new license (GPL+exception) is in place.
+ #include <poppler/splash/SplashPath.h>
+ #include <poppler/splash/SplashGlyphBitmap.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)
++
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 64, 0)
++#define POPPLER_CONST const
++#else
++#define POPPLER_CONST
++#endif
++
+ //------------------------------------------------------------------------
+ // LinkSubmitData
+ //------------------------------------------------------------------------
+@@ -61,9 +74,9 @@ class LinkSubmitForm: public LinkAction
+ // Destructor.
+ virtual ~LinkSubmitForm();
+ // Was the LinkImportData created successfully?
+- virtual GBool isOk() { return fileName != NULL; }
++ virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
+ // Accessors.
+- virtual LinkActionKind getKind() { return actionUnknown; }
++ virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
+ GooString *getFileName() { return fileName; }
+ int getFlags() { return m_flags; }
+ private:
+@@ -83,9 +96,9 @@ class LinkImportData: public LinkAction
+ // Destructor.
+ virtual ~LinkImportData();
+ // Was the LinkImportData created successfully?
+- virtual GBool isOk() { return fileName != NULL; }
++ virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
+ // Accessors.
+- virtual LinkActionKind getKind() { return actionUnknown; }
++ virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
+ GooString *getFileName() { return fileName; }
+ private:
+ GooString *fileName; // file name
+@@ -98,7 +111,7 @@ class SplashOutFontFileID: public SplashFontFileID
+ {
+ public:
+
+- SplashOutFontFileID(Ref *rA) { r = *rA; }
++ SplashOutFontFileID(const Ref *rA) { r = *rA; }
+ ~SplashOutFontFileID() {}
+ GBool matches(SplashFontFileID *id)
+ {
+@@ -146,6 +159,7 @@ class SlaOutputDev : public OutputDev
+ public:
+ SlaOutputDev(ScribusDoc* doc, QList<PageItem*> *Elements, QStringList *importedColors, int flags);
+ virtual ~SlaOutputDev();
++
+ LinkAction* SC_getAction(AnnotWidget *ano);
+ LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano);
+ static GBool annotations_callback(Annot *annota, void *user_data);
+@@ -261,7 +275,7 @@ class SlaOutputDev : public OutputDev
+ private:
+ void getPenState(GfxState *state);
+ QString getColor(GfxColorSpace *color_space, GfxColor *color, int *shade);
+- QString getAnnotationColor(AnnotColor *color);
++ QString getAnnotationColor(const AnnotColor *color);
+ QString convertPath(GfxPath *path);
+ int getBlendMode(GfxState *state);
+ void applyMask(PageItem *ite);
diff --git a/fix-15289.patch b/fix-15289.patch
new file mode 100644
index 000000000000..1c35064d1907
--- /dev/null
+++ b/fix-15289.patch
@@ -0,0 +1,70 @@
+From d867ec3c386baaed1b8e076dd70b278863411480 Mon Sep 17 00:00:00 2001
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Mon, 30 Apr 2018 09:19:33 +0000
+Subject: [PATCH] =?UTF-8?q?#15289:=20FTBFS=201.5.4=20with=20error:=20inval?=
+ =?UTF-8?q?id=20conversion=20from=20=E2=80=98const=20GooString*=E2=80=99?=
+ =?UTF-8?q?=20to=20=E2=80=98GooString*=E2=80=99?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+git-svn-id: svn://scribus.net/trunk/Scribus@22498 11d20701-8431-0410-a711-e3c959e3b870
+---
+ scribus/plugins/import/pdf/importpdf.cpp | 2 +-
+ scribus/plugins/import/pdf/importpdf.h | 2 +-
+ scribus/plugins/import/pdf/slaoutput.cpp | 2 +-
+ scribus/plugins/import/pdf/slaoutput.h | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
+index c1802861aa..d4c5a9ba49 100644
+--- a/scribus/plugins/import/pdf/importpdf.cpp
++++ b/scribus/plugins/import/pdf/importpdf.cpp
+@@ -1081,7 +1081,7 @@ QRectF PdfPlug::getCBox(int box, int pgNum)
+ return cRect;
+ }
+
+-QString PdfPlug::UnicodeParsedString(GooString *s1)
++QString PdfPlug::UnicodeParsedString(const GooString *s1)
+ {
+ if ( !s1 || s1->getLength() == 0 )
+ return QString();
+diff --git a/scribus/plugins/import/pdf/importpdf.h b/scribus/plugins/import/pdf/importpdf.h
+index c8c5efcd0d..5249562692 100644
+--- a/scribus/plugins/import/pdf/importpdf.h
++++ b/scribus/plugins/import/pdf/importpdf.h
+@@ -81,7 +81,7 @@ class PdfPlug : public QObject
+ private:
+ bool convert(const QString& fn);
+ QRectF getCBox(int box, int pgNum);
+- QString UnicodeParsedString(GooString *s1);
++ QString UnicodeParsedString(const GooString *s1);
+
+ QList<PageItem*> Elements;
+ double baseX, baseY;
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
+index be1815dc29..17b6357246 100644
+--- a/scribus/plugins/import/pdf/slaoutput.cpp
++++ b/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -4252,7 +4252,7 @@ void SlaOutputDev::pushGroup(QString maskName, GBool forSoftMask, GBool alpha, b
+ m_groupStack.push(gElements);
+ }
+
+-QString SlaOutputDev::UnicodeParsedString(GooString *s1)
++QString SlaOutputDev::UnicodeParsedString(const GooString *s1)
+ {
+ if ( !s1 || s1->getLength() == 0 )
+ return QString();
+diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h
+index 20e8b2d311..6698c030e0 100644
+--- a/scribus/plugins/import/pdf/slaoutput.h
++++ b/scribus/plugins/import/pdf/slaoutput.h
+@@ -266,7 +266,7 @@ class SlaOutputDev : public OutputDev
+ int getBlendMode(GfxState *state);
+ void applyMask(PageItem *ite);
+ void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
+- QString UnicodeParsedString(GooString *s1);
++ QString UnicodeParsedString(const GooString *s1);
+ bool checkClip();
+ bool pathIsClosed;
+ QString CurrColorFill;
diff --git a/fix-icu-0.61.1-compilation.patch b/fix-icu-0.61.1-compilation.patch
deleted file mode 100644
index 62089451e3ab..000000000000
--- a/fix-icu-0.61.1-compilation.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -914,7 +914,8 @@ endif()
- # CTL support
- pkg_check_modules(HARFBUZZ REQUIRED harfbuzz>=0.9.42 harfbuzz-icu)
- pkg_check_modules(ICU REQUIRED icu-uc)
-+add_definitions(-DU_USING_ICU_NAMESPACE=1)
-
-
- ##############################################################################################################
- ########## Include Setup ##########
diff --git a/fix-poppler-issue.patch b/fix-poppler-issue.patch
deleted file mode 100644
index 61f5552f959e..000000000000
--- a/fix-poppler-issue.patch
+++ /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>
- #include <poppler/ViewerPreferences.h>
- #include <poppler/poppler-config.h>
-+#include <poppler/cpp/poppler-version.h>
- #include <poppler/SplashOutputDev.h>
- #include <poppler/splash/SplashBitmap.h>
-
-@@ -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 <poppler/cpp/poppler-version.h>
- #include <poppler/GlobalParams.h>
- #include <poppler/poppler-config.h>
- #include <poppler/FileSpec.h>
-@@ -19,11 +20,49 @@ for which a new license (GPL+exception) is in place.
- #include "util_math.h"
- #include <tiffio.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)
-+
- 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<int> 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
- }
- }
- }