Hello community,

here is the log from the commit of package scribus for openSUSE:Factory checked 
in at 2020-01-16 18:23:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/scribus (Old)
 and      /work/SRC/openSUSE:Factory/.scribus.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "scribus"

Thu Jan 16 18:23:46 2020 rev:67 rq:765022 version:1.5.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/scribus/scribus.changes  2019-09-11 
10:33:29.383329390 +0200
+++ /work/SRC/openSUSE:Factory/.scribus.new.26092/scribus.changes       
2020-01-16 18:23:58.881065872 +0100
@@ -1,0 +2,12 @@
+Thu Jan 16 11:28:56 UTC 2020 - Wolfgang Bauer <wba...@tmo.at>
+
+- Add port-scripter-to-Python-3.patch and build with python3
+- Add patches to fix build with newer poppler versions:
+  * Work-around-poppler-0.82-signature-changes.patch
+  * Use-same-mechanism-as-with-previous-poppler-versions.patch
+  * Fix-failure-to-build-against-poppler-0.83.0.patch
+  * Fix-failure-to-build-with-poppler-0.84.0.patch
+- Add Fails-to-build-with-python-3.8.patch to fix build with python
+  3.8
+
+-------------------------------------------------------------------

New:
----
  Fails-to-build-with-python-3.8.patch
  Fix-failure-to-build-against-poppler-0.83.0.patch
  Fix-failure-to-build-with-poppler-0.84.0.patch
  Use-same-mechanism-as-with-previous-poppler-versions.patch
  Work-around-poppler-0.82-signature-changes.patch
  port-scripter-to-Python-3.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ scribus.spec ++++++
--- /var/tmp/diff_new_pack.GqFaer/_old  2020-01-16 18:24:01.597067321 +0100
+++ /var/tmp/diff_new_pack.GqFaer/_new  2020-01-16 18:24:01.597067321 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package scribus
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 # Copyright (c) Peter Linnell and 2010 SUSE LINUX Products GmbH, Nuernberg, 
Germany.
 #
 # All modifications and additions to the file contributed by third parties
@@ -28,6 +28,18 @@
 Source:         %{name}-%{version}.tar.xz
 # PATCH-FIX-OPENSUSE
 Patch0:         0001-Make-sure-information-displayed-on-the-about-window-.patch
+# PATCH-FEATURE-UPSTREAM
+Patch1:         port-scripter-to-Python-3.patch
+# PATCH-FIX-UPSTREAM
+Patch2:         Work-around-poppler-0.82-signature-changes.patch
+# PATCH-FIX-UPSTREAM
+Patch3:         Use-same-mechanism-as-with-previous-poppler-versions.patch
+# PATCH-FIX-UPSTREAM
+Patch4:         Fix-failure-to-build-against-poppler-0.83.0.patch
+# PATCH-FIX-UPSTREAM
+Patch5:         Fix-failure-to-build-with-poppler-0.84.0.patch
+# PATCH-FIX-UPSTREAM
+Patch6:         Fails-to-build-with-python-3.8.patch
 BuildRequires:  breeze5-icons
 BuildRequires:  cmake
 BuildRequires:  cups-devel
@@ -47,7 +59,7 @@
 BuildRequires:  libwpg-devel
 BuildRequires:  libzmf-devel
 BuildRequires:  pkgconfig
-BuildRequires:  python-devel
+BuildRequires:  python3-devel
 BuildRequires:  update-desktop-files
 BuildRequires:  cmake(Qt5Core) >= 5.7.0
 BuildRequires:  cmake(Qt5Gui) >= 5.7.0
@@ -72,8 +84,8 @@
 BuildRequires:  pkgconfig(openssl)
 BuildRequires:  pkgconfig(poppler)
 BuildRequires:  pkgconfig(zlib)
-Recommends:     python2-Pillow
-Recommends:     python-tk
+Recommends:     python3-Pillow
+Recommends:     python3-tk
 # Only available in graphics for the moment
 Recommends:     uniconvertor
 Recommends:     scribus-doc
@@ -103,9 +115,14 @@
 This package provides the documentation for Scribus.
 
 %prep
-%autosetup -p1
+%setup -q
 # W: wrong-script-end-of-line-encoding
 dos2unix scribus/plugins/scriptplugin/scripts/Ligatursatz.py
+# necessary to be able to apply the patches
+dos2unix scribus/plugins/scriptplugin/cmdannotations.cpp
+dos2unix scribus/plugins/scriptplugin/cmddoc.cpp
+dos2unix scribus/plugins/scriptplugin/cmdstyle.cpp
+%autopatch -p1
 
 %build
 # Don't use the %%cmake macro, it causes crashes when starting scribus

++++++ Fails-to-build-with-python-3.8.patch ++++++
>From df0ba0a365fd36bf4a4abac3b45e65a65a46c82c Mon Sep 17 00:00:00 2001
From: Jean Ghali <jgh...@libertysurf.fr>
Date: Sun, 3 Nov 2019 01:15:12 +0000
Subject: [PATCH] #15901: Fails to build with python 3.8

git-svn-id: svn://scribus.net/trunk/Scribus@23314 
11d20701-8431-0410-a711-e3c959e3b870
---
 .../plugins/scriptplugin/objimageexport.cpp   | 52 ++++++++++++++++---
 scribus/plugins/scriptplugin/objpdffile.cpp   | 13 ++++-
 scribus/plugins/scriptplugin/objprinter.cpp   | 13 ++++-
 3 files changed, 70 insertions(+), 8 deletions(-)

diff --git a/scribus/plugins/scriptplugin/objimageexport.cpp 
b/scribus/plugins/scriptplugin/objimageexport.cpp
index cfc3c3fa06..7d2fb2f0a8 100644
--- a/scribus/plugins/scriptplugin/objimageexport.cpp
+++ b/scribus/plugins/scriptplugin/objimageexport.cpp
@@ -220,29 +220,62 @@ PyTypeObject ImageExport_Type = {
        const_cast<char*>("scribus.ImageExport"), // char *tp_name; /* For 
printing, in format "<module>.<name>" */
        sizeof(ImageExport),   // int tp_basicsize, /* For allocation */
        0,  // int tp_itemsize; /* For allocation */
+
+       /* Methods to implement standard operations */
+
        (destructor) ImageExport_dealloc, //     destructor tp_dealloc;
-       nullptr, //      printfunc tp_print;
+#if PY_VERSION_HEX >= 0x03080000
+       0,       //     Py_ssize_t tp_vectorcall_offset
+#else
+       nullptr, //     printfunc tp_print;
+#endif
        nullptr, //      getattrfunc tp_getattr;
        nullptr, //      setattrfunc tp_setattr;
-       nullptr, //      cmpfunc tp_compare;
+       nullptr, //      cmpfunc tp_as_async;
        nullptr, //      reprfunc tp_repr;
+
+       /* Method suites for standard classes */
+
        nullptr, //      PyNumberMethods *tp_as_number;
        nullptr, //      PySequenceMethods *tp_as_sequence;
        nullptr, //      PyMappingMethods *tp_as_mapping;
+
+       /* More standard operations (here for binary compatibility) */
+
        nullptr, //      hashfunc tp_hash;
        nullptr, //      ternaryfunc tp_call;
        nullptr, //      reprfunc tp_str;
        nullptr, //      getattrofunc tp_getattro;
        nullptr, //      setattrofunc tp_setattro;
+
+       /* Functions to access object as input/output buffer */
        nullptr, //      PyBufferProcs *tp_as_buffer;
+
+       /* Flags to define presence of optional/expanded features */
        Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, // long tp_flags;
+
        imgexp__doc__, // char *tp_doc; /* Documentation string */
+
+       /* Assigned meaning in release 2.0 */
+       /* call function for all accessible objects */
        nullptr, //      traverseproc tp_traverse;
+
+       /* delete references to contained objects */
        nullptr, //      inquiry tp_clear;
+
+       /* Assigned meaning in release 2.1 */
+       /* rich comparisons */
        nullptr, //      richcmpfunc tp_richcompare;
+
+       /* weak reference enabler */
        0, //    long tp_weaklistoffset;
+
+       /* Added in release 2.2 */
+       /* Iterators */
        nullptr, //      getiterfunc tp_iter;
        nullptr, //      iternextfunc tp_iternext;
+
+       /* Attribute descriptor and subclassing stuff */
        ImageExport_methods, //  struct PyMethodDef *tp_methods;
        ImageExport_members, //  struct PyMemberDef *tp_members;
        ImageExport_getseters, //        struct PyGetSetDef *tp_getset;
@@ -264,12 +297,19 @@ PyTypeObject ImageExport_Type = {
        nullptr, //      destructor tp_del;
        0, //    unsigned int tp_version_tag;
        0, //    destructor tp_finalize;
+#if PY_VERSION_HEX >= 0x03080000
+       nullptr, // tp_vectorcall
+#endif
+#if PY_VERSION_HEX >= 0x03080000 && PY_VERSION_HEX < 0x03090000
+       nullptr, //deprecated tp_print
+#endif
 
 #ifdef COUNT_ALLOCS
        /* these must be last and never explicitly initialized */
-       //      int tp_allocs;
-       //      int tp_frees;
-       //      int tp_maxalloc;
-       //      struct _typeobject *tp_next;
+       //    int tp_allocs;
+       //    int tp_frees;
+       //    int tp_maxalloc;
+       //    struct _typeobject *tp_prev;
+       //    struct _typeobject *tp_next;
 #endif
 };
diff --git a/scribus/plugins/scriptplugin/objpdffile.cpp 
b/scribus/plugins/scriptplugin/objpdffile.cpp
index 2ae8c93452..5ec423b20c 100644
--- a/scribus/plugins/scriptplugin/objpdffile.cpp
+++ b/scribus/plugins/scriptplugin/objpdffile.cpp
@@ -1555,10 +1555,14 @@ PyTypeObject PDFfile_Type = {
        /* Methods to implement standard operations */
 
        (destructor) PDFfile_dealloc, //     destructor tp_dealloc;
+#if PY_VERSION_HEX >= 0x03080000
+       0,       //     Py_ssize_t tp_vectorcall_offset
+#else
        nullptr, //     printfunc tp_print;
+#endif
        nullptr, //     getattrfunc tp_getattr;
        nullptr, //     setattrfunc tp_setattr;
-       nullptr, //     cmpfunc tp_compare;
+       nullptr, //     cmpfunc tp_as_async;
        nullptr, //     reprfunc tp_repr;
 
        /* Method suites for standard classes */
@@ -1624,12 +1628,19 @@ PyTypeObject PDFfile_Type = {
        nullptr, //     destructor tp_del;
        0, //    unsigned int tp_version_tag;
        0, //    destructor tp_finalize;
+#if PY_VERSION_HEX >= 0x03080000
+       nullptr, // tp_vectorcall
+#endif
+#if PY_VERSION_HEX >= 0x03080000 && PY_VERSION_HEX < 0x03090000
+       nullptr, //deprecated tp_print
+#endif
 
 #ifdef COUNT_ALLOCS
        /* these must be last and never explicitly initialized */
        //    int tp_allocs;
        //    int tp_frees;
        //    int tp_maxalloc;
+       //    struct _typeobject *tp_prev;
        //    struct _typeobject *tp_next;
 #endif
 };
diff --git a/scribus/plugins/scriptplugin/objprinter.cpp 
b/scribus/plugins/scriptplugin/objprinter.cpp
index 3219f77534..e59e71d024 100644
--- a/scribus/plugins/scriptplugin/objprinter.cpp
+++ b/scribus/plugins/scriptplugin/objprinter.cpp
@@ -517,10 +517,14 @@ PyTypeObject Printer_Type = {
        /* Methods to implement standard operations */
 
        (destructor) Printer_dealloc, //     destructor tp_dealloc;
+#if PY_VERSION_HEX >= 0x03080000
+       0,       //     Py_ssize_t tp_vectorcall_offset
+#else
        nullptr, //     printfunc tp_print;
+#endif
        nullptr, //     getattrfunc tp_getattr;
        nullptr, //     setattrfunc tp_setattr;
-       nullptr, //     cmpfunc tp_compare;
+       nullptr, //     cmpfunc tp_as_async;
        nullptr, //     reprfunc tp_repr;
 
        /* Method suites for standard classes */
@@ -586,12 +590,19 @@ PyTypeObject Printer_Type = {
        nullptr, //     destructor tp_del;
        0, //    unsigned int tp_version_tag;
        0, //    destructor tp_finalize;
+#if PY_VERSION_HEX >= 0x03080000
+       nullptr, // tp_vectorcall
+#endif
+#if PY_VERSION_HEX >= 0x03080000 && PY_VERSION_HEX < 0x03090000
+       nullptr, //deprecated tp_print
+#endif
 
 #ifdef COUNT_ALLOCS
        /* these must be last and never explicitly initialized */
        //    int tp_allocs;
        //    int tp_frees;
        //    int tp_maxalloc;
+       //    struct _typeobject *tp_prev;
        //    struct _typeobject *tp_next;
 #endif
 };
++++++ Fix-failure-to-build-against-poppler-0.83.0.patch ++++++
>From b51c2bab4d57d685f96d427d6816bdd4ecfb4674 Mon Sep 17 00:00:00 2001
From: Jean Ghali <jgh...@libertysurf.fr>
Date: Wed, 4 Dec 2019 05:51:19 +0000
Subject: [PATCH] #15985: Fix failure to build against poppler 0.83.0

git-svn-id: svn://scribus.net/trunk/Scribus@23395 
11d20701-8431-0410-a711-e3c959e3b870
---
 scribus/plugins/import/pdf/importpdf.cpp     | 22 ++++++++++++++++++++
 scribus/plugins/import/pdf/importpdfconfig.h |  6 ++++++
 scribus/plugins/import/pdf/slaoutput.cpp     |  4 ++--
 scribus/plugins/import/pdf/slaoutput.h       |  2 +-
 4 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/scribus/plugins/import/pdf/importpdf.cpp 
b/scribus/plugins/import/pdf/importpdf.cpp
index 2ab38ac758..427cd66ef2 100644
--- a/scribus/plugins/import/pdf/importpdf.cpp
+++ b/scribus/plugins/import/pdf/importpdf.cpp
@@ -74,7 +74,11 @@ PdfPlug::PdfPlug(ScribusDoc* doc, int flags)
 QImage PdfPlug::readThumbnail(const QString& fName)
 {
        QString pdfFile = QDir::toNativeSeparators(fName);
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
+       globalParams.reset(new GlobalParams());
+#else
        globalParams = new GlobalParams();
+#endif
        if (globalParams)
        {
 #if defined(Q_OS_WIN32) && POPPLER_ENCODED_VERSION >= 
POPPLER_VERSION_ENCODE(0, 62, 0)
@@ -89,7 +93,9 @@ QImage PdfPlug::readThumbnail(const QString& fName)
                        if (pdfDoc->getErrorCode() == errEncrypted)
                        {
                                delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
                                delete globalParams;
+#endif
                                return QImage();
                        }
                        if (pdfDoc->isOk())
@@ -133,11 +139,15 @@ QImage PdfPlug::readThumbnail(const QString& fName)
                                image.setText("YSize", QString("%1").arg(h));
                                delete dev;
                                delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
                                delete globalParams;
+#endif
                                return image;
                        }
                        delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
                        delete globalParams;
+#endif
                }
        }
        return QImage();
@@ -343,7 +353,11 @@ bool PdfPlug::convert(const QString& fn)
                qApp->processEvents();
        }
 
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
+       globalParams.reset(new GlobalParams());
+#else
        globalParams = new GlobalParams();
+#endif
        GooString *userPW = nullptr;
        if (globalParams)
        {
@@ -385,7 +399,9 @@ bool PdfPlug::convert(const QString& fn)
                                        if (progressDialog)
                                                progressDialog->close();
                                        delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
                                        delete globalParams;
+#endif
                                        return false;
                                }
                                if (progressDialog)
@@ -430,7 +446,9 @@ bool PdfPlug::convert(const QString& fn)
                                                        progressDialog->close();
                                                delete optImp;
                                                delete pdfDoc;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 83, 0)
                                                delete globalParams;
+#endif
                                                return false;
                                        }
                                        pageString = optImp->getPagesString();
@@ -843,8 +861,12 @@ bool PdfPlug::convert(const QString& fn)
                }
                delete pdfDoc;
        }
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
+       globalParams.release();
+#else
        delete globalParams;
        globalParams = nullptr;
+#endif
 
 //     qDebug() << "converting finished";
 //     qDebug() << "Imported" << Elements.count() << "Elements";
diff --git a/scribus/plugins/import/pdf/importpdfconfig.h 
b/scribus/plugins/import/pdf/importpdfconfig.h
index 9913ee382c..5a7e0d2162 100644
--- a/scribus/plugins/import/pdf/importpdfconfig.h
+++ b/scribus/plugins/import/pdf/importpdfconfig.h
@@ -58,4 +58,10 @@ for which a new license (GPL+exception) is in place.
 #define POPPLER_CONST_082
 #endif
 
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 83, 0)
+#define POPPLER_CONST_083 const
+#else
+#define POPPLER_CONST_083
+#endif
+
 #endif
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp 
b/scribus/plugins/import/pdf/slaoutput.cpp
index 5e4d32a551..ffcfa8450b 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -3678,7 +3678,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotColor 
*color)
        return fNam;
 }
 
-QString SlaOutputDev::convertPath(GfxPath *path)
+QString SlaOutputDev::convertPath(POPPLER_CONST_083 GfxPath *path)
 {
        if (! path)
                return QString();
@@ -3688,7 +3688,7 @@ QString SlaOutputDev::convertPath(GfxPath *path)
 
        for (int i = 0; i < path->getNumSubpaths(); ++i)
        {
-               GfxSubpath * subpath = path->getSubpath(i);
+               POPPLER_CONST_083 GfxSubpath * subpath = path->getSubpath(i);
                if (subpath->getNumPoints() > 0)
                {
                        output += QString("M %1 
%2").arg(subpath->getX(0)).arg(subpath->getY(0));
diff --git a/scribus/plugins/import/pdf/slaoutput.h 
b/scribus/plugins/import/pdf/slaoutput.h
index 60fb900618..d928fada81 100644
--- a/scribus/plugins/import/pdf/slaoutput.h
+++ b/scribus/plugins/import/pdf/slaoutput.h
@@ -282,7 +282,7 @@ class SlaOutputDev : public OutputDev
        void getPenState(GfxState *state);
        QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor 
*color, int *shade);
        QString getAnnotationColor(const AnnotColor *color);
-       QString convertPath(GfxPath *path);
+       QString convertPath(POPPLER_CONST_083 GfxPath *path);
        int getBlendMode(GfxState *state);
        void applyMask(PageItem *ite);
        void pushGroup(const QString& maskName = "", GBool forSoftMask = 
gFalse, GBool alpha = gFalse, bool inverted = false);
++++++ Fix-failure-to-build-with-poppler-0.84.0.patch ++++++
>From 3742559924136c2471ab15081c5b600dd5feaeb0 Mon Sep 17 00:00:00 2001
From: Jean Ghali <jgh...@libertysurf.fr>
Date: Sat, 28 Dec 2019 21:32:29 +0000
Subject: [PATCH] Fix failure to build with poppler 0.84.0

git-svn-id: svn://scribus.net/trunk/Scribus@23429 
11d20701-8431-0410-a711-e3c959e3b870
---
 scribus/plugins/import/pdf/slaoutput.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scribus/plugins/import/pdf/slaoutput.cpp 
b/scribus/plugins/import/pdf/slaoutput.cpp
index ffcfa8450b..d788f9f06c 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -1189,6 +1189,11 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, 
Catalog *catA)
        catalog = catA;
        pdfDoc = doc;
        updateGUICounter = 0;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 84, 0)
+       m_fontEngine = new SplashFontEngine(true, true, true, true);
+#elif POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 61, 0)
+       m_fontEngine = new SplashFontEngine(globalParams->getEnableFreeType(), 
true, true, true);
+#else
        m_fontEngine = new SplashFontEngine(
 #if HAVE_T1LIB_H
        globalParams->getEnableT1lib(),
@@ -1199,6 +1204,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, 
Catalog *catA)
        true,
 #endif
        true);
+#endif
 }
 
 void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *)
++++++ Use-same-mechanism-as-with-previous-poppler-versions.patch ++++++
>From fca3858b15aa76dc05691cfa7b5b3649264b7786 Mon Sep 17 00:00:00 2001
From: Jean Ghali <jgh...@libertysurf.fr>
Date: Tue, 29 Oct 2019 01:55:42 +0000
Subject: [PATCH] Use same mechanism as with previous poppler versions to
 support change of constness in function signatures

git-svn-id: svn://scribus.net/trunk/Scribus@23289 
11d20701-8431-0410-a711-e3c959e3b870
---
 scribus/plugins/import/pdf/importpdfconfig.h |  6 +++++
 scribus/plugins/import/pdf/slaoutput.cpp     | 26 ++++++--------------
 scribus/plugins/import/pdf/slaoutput.h       | 15 +++--------
 3 files changed, 16 insertions(+), 31 deletions(-)

diff --git a/scribus/plugins/import/pdf/importpdfconfig.h 
b/scribus/plugins/import/pdf/importpdfconfig.h
index 2a13b0d109..9913ee382c 100644
--- a/scribus/plugins/import/pdf/importpdfconfig.h
+++ b/scribus/plugins/import/pdf/importpdfconfig.h
@@ -52,4 +52,10 @@ for which a new license (GPL+exception) is in place.
 #define POPPLER_REF
 #endif
 
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 82, 0)
+#define POPPLER_CONST_082 const
+#else
+#define POPPLER_CONST_082
+#endif
+
 #endif
diff --git a/scribus/plugins/import/pdf/slaoutput.cpp 
b/scribus/plugins/import/pdf/slaoutput.cpp
index f3d6446880..bb7b184272 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -1606,7 +1606,7 @@ void SlaOutputDev::stroke(GfxState *state)
                        ite->PoLine = out.copy();
                        ite->ClipEdited = true;
                        ite->FrameType = 3;
-                       ite->setWidthHeight(wh.x(),wh.y());
+                       ite->setWidthHeight(wh.x(), wh.y());
                        m_doc->adjustItemSize(ite);
                        if (m_Elements->count() != 0)
                        {
@@ -2471,7 +2471,7 @@ void SlaOutputDev::drawImageMask(GfxState *state, Object 
*ref, Stream *str, int
                                out.translate(-ite->xPos(), -ite->yPos());
                                ite->PoLine = out.copy();
                                FPoint wh = getMaxClipF(&ite->PoLine);
-                               ite->setWidthHeight(wh.x(),wh.y());
+                               ite->setWidthHeight(wh.x(), wh.y());
                                
ite->setTextFlowMode(PageItem::TextFlowDisabled);
                                ite->ScaleType   = true;
                                m_doc->adjustItemSize(ite);
@@ -2613,7 +2613,7 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state, 
Object *ref, Stream *str
                                out.translate(-ite->xPos(), -ite->yPos());
                                ite->PoLine = out.copy();
                                FPoint wh = getMaxClipF(&ite->PoLine);
-                               ite->setWidthHeight(wh.x(),wh.y());
+                               ite->setWidthHeight(wh.x(), wh.y());
                                
ite->setTextFlowMode(PageItem::TextFlowDisabled);
                                ite->ScaleType   = true;
                                m_doc->adjustItemSize(ite);
@@ -2762,7 +2762,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, 
Object *ref, Stream *str,  i
                                out.translate(-ite->xPos(), -ite->yPos());
                                ite->PoLine = out.copy();
                                FPoint wh = getMaxClipF(&ite->PoLine);
-                               ite->setWidthHeight(wh.x(),wh.y());
+                               ite->setWidthHeight(wh.x(), wh.y());
                                
ite->setTextFlowMode(PageItem::TextFlowDisabled);
                                ite->ScaleType   = true;
                                m_doc->adjustItemSize(ite);
@@ -2784,11 +2784,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, 
Object *ref, Stream *str,  i
        delete[] mbuffer;
 }
 
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int 
width, int height, GfxImageColorMap *colorMap, GBool interpolate, int* 
maskColors, GBool inlineImg)
-#else
-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int 
width, int height, GfxImageColorMap *colorMap, GBool interpolate, const int* 
maskColors, GBool inlineImg)
-#endif
+void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int 
width, int height, GfxImageColorMap *colorMap, GBool interpolate, 
POPPLER_CONST_082 int* maskColors, GBool inlineImg)
 {
        ImageStream * imgStr = new ImageStream(str, width, 
colorMap->getNumPixelComps(), colorMap->getBits());
 //     qDebug() << "Image Components" << colorMap->getNumPixelComps() << 
"Mask" << maskColors;
@@ -3369,11 +3365,7 @@ void SlaOutputDev::updateFont(GfxState *state)
                fontsrc->unref();
 }
 
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
-void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, 
double dy, double originX, double originY, CharCode code, int nBytes, Unicode 
*u, int uLen)
-#else
-void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, 
double dy, double originX, double originY, CharCode code, int nBytes, const 
Unicode *u, int uLen)
-#endif
+void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, 
double dy, double originX, double originY, CharCode code, int nBytes, 
POPPLER_CONST_082 Unicode *u, int uLen)
 {
        double x1, y1, x2, y2;
        int render;
@@ -3460,11 +3452,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, 
double y, double dx, doub
        }
 }
 
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double 
dx, double dy, CharCode code, Unicode *u, int uLen)
-#else
-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double 
dx, double dy, CharCode code, const Unicode *u, int uLen)
-#endif
+GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double 
dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen)
 {
 //     qDebug() << "beginType3Char";
        GfxFont *gfxFont;
diff --git a/scribus/plugins/import/pdf/slaoutput.h 
b/scribus/plugins/import/pdf/slaoutput.h
index b5905184e5..14a590d55e 100644
--- a/scribus/plugins/import/pdf/slaoutput.h
+++ b/scribus/plugins/import/pdf/slaoutput.h
@@ -229,11 +229,7 @@ class SlaOutputDev : public OutputDev
 
        //----- image drawing
        void drawImageMask(GfxState *state, Object *ref, Stream *str, int 
width, int height, GBool invert, GBool interpolate, GBool inlineImg) override;
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
-       void drawImage(GfxState *state, Object *ref, Stream *str, int width, 
int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, 
GBool inlineImg) override;
-#else
-       void drawImage(GfxState *state, Object *ref, Stream *str, int width, 
int height, GfxImageColorMap *colorMap, GBool interpolate, const int 
*maskColors, GBool inlineImg) override;
-#endif
+       void drawImage(GfxState *state, Object *ref, Stream *str, int width, 
int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 
int *maskColors, GBool inlineImg) override;
        void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
                                   int width, int height,
                                   GfxImageColorMap *colorMap,
@@ -265,13 +261,8 @@ class SlaOutputDev : public OutputDev
        //----- text drawing
        void  beginTextObject(GfxState *state) override;
        void  endTextObject(GfxState *state) override;
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
-       void  drawChar(GfxState *state, double /*x*/, double /*y*/, double 
/*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode 
/*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) override;
-       GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, 
double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) 
override;
-#else
-       void  drawChar(GfxState *state, double /*x*/, double /*y*/, double 
/*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode 
/*code*/, int /*nBytes*/, const Unicode * /*u*/, int /*uLen*/) override;
-       GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, 
double /*dx*/, double /*dy*/, CharCode /*code*/, const Unicode * /*u*/, int 
/*uLen*/) override;
-#endif
+       void  drawChar(GfxState *state, double /*x*/, double /*y*/, double 
/*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode 
/*code*/, int /*nBytes*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) 
override;
+       GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, 
double /*dx*/, double /*dy*/, CharCode /*code*/, POPPLER_CONST_082 Unicode * 
/*u*/, int /*uLen*/) override;
        void  endType3Char(GfxState * /*state*/) override;
        void  type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) 
override;
        void  type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, 
double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override;
++++++ Work-around-poppler-0.82-signature-changes.patch ++++++
>From 6db15ec1af791377b28981601f8c296006de3c6f Mon Sep 17 00:00:00 2001
From: Craig Bradney <m...@scribus.info>
Date: Mon, 28 Oct 2019 22:11:56 +0000
Subject: [PATCH] Work around poppler 0.82 signature changes

git-svn-id: svn://scribus.net/trunk/Scribus@23287 
11d20701-8431-0410-a711-e3c959e3b870
---
 scribus/plugins/import/pdf/slaoutput.cpp | 14 +++++++++++++-
 scribus/plugins/import/pdf/slaoutput.h   |  9 +++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/scribus/plugins/import/pdf/slaoutput.cpp 
b/scribus/plugins/import/pdf/slaoutput.cpp
index 6094f3d9eb..f3d6446880 100644
--- a/scribus/plugins/import/pdf/slaoutput.cpp
+++ b/scribus/plugins/import/pdf/slaoutput.cpp
@@ -2784,7 +2784,11 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, 
Object *ref, Stream *str,  i
        delete[] mbuffer;
 }
 
-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int 
width, int height, GfxImageColorMap *colorMap, GBool interpolate, int 
*maskColors, GBool inlineImg)
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
+void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int 
width, int height, GfxImageColorMap *colorMap, GBool interpolate, int* 
maskColors, GBool inlineImg)
+#else
+void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int 
width, int height, GfxImageColorMap *colorMap, GBool interpolate, const int* 
maskColors, GBool inlineImg)
+#endif
 {
        ImageStream * imgStr = new ImageStream(str, width, 
colorMap->getNumPixelComps(), colorMap->getBits());
 //     qDebug() << "Image Components" << colorMap->getNumPixelComps() << 
"Mask" << maskColors;
@@ -3365,7 +3369,11 @@ void SlaOutputDev::updateFont(GfxState *state)
                fontsrc->unref();
 }
 
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
 void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, 
double dy, double originX, double originY, CharCode code, int nBytes, Unicode 
*u, int uLen)
+#else
+void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, 
double dy, double originX, double originY, CharCode code, int nBytes, const 
Unicode *u, int uLen)
+#endif
 {
        double x1, y1, x2, y2;
        int render;
@@ -3452,7 +3460,11 @@ void SlaOutputDev::drawChar(GfxState *state, double x, 
double y, double dx, doub
        }
 }
 
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
 GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double 
dx, double dy, CharCode code, Unicode *u, int uLen)
+#else
+GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double 
dx, double dy, CharCode code, const Unicode *u, int uLen)
+#endif
 {
 //     qDebug() << "beginType3Char";
        GfxFont *gfxFont;
diff --git a/scribus/plugins/import/pdf/slaoutput.h 
b/scribus/plugins/import/pdf/slaoutput.h
index bc4350a034..b5905184e5 100644
--- a/scribus/plugins/import/pdf/slaoutput.h
+++ b/scribus/plugins/import/pdf/slaoutput.h
@@ -229,7 +229,11 @@ class SlaOutputDev : public OutputDev
 
        //----- image drawing
        void drawImageMask(GfxState *state, Object *ref, Stream *str, int 
width, int height, GBool invert, GBool interpolate, GBool inlineImg) override;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
        void drawImage(GfxState *state, Object *ref, Stream *str, int width, 
int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, 
GBool inlineImg) override;
+#else
+       void drawImage(GfxState *state, Object *ref, Stream *str, int width, 
int height, GfxImageColorMap *colorMap, GBool interpolate, const int 
*maskColors, GBool inlineImg) override;
+#endif
        void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
                                   int width, int height,
                                   GfxImageColorMap *colorMap,
@@ -261,8 +265,13 @@ class SlaOutputDev : public OutputDev
        //----- text drawing
        void  beginTextObject(GfxState *state) override;
        void  endTextObject(GfxState *state) override;
+#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
        void  drawChar(GfxState *state, double /*x*/, double /*y*/, double 
/*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode 
/*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) override;
        GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, 
double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) 
override;
+#else
+       void  drawChar(GfxState *state, double /*x*/, double /*y*/, double 
/*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode 
/*code*/, int /*nBytes*/, const Unicode * /*u*/, int /*uLen*/) override;
+       GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, 
double /*dx*/, double /*dy*/, CharCode /*code*/, const Unicode * /*u*/, int 
/*uLen*/) override;
+#endif
        void  endType3Char(GfxState * /*state*/) override;
        void  type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) 
override;
        void  type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, 
double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override;
++++++ port-scripter-to-Python-3.patch ++++++
++++ 3922 lines (skipped)


Reply via email to