$ git diff --patch-with-stat --summary 3e1b63df91ccfc07b681271433b8b75a08fa4872..111c6c27d73219917bcbcfa54708d5a3aaaa265a
scribus-1.5.5-c++17.patch | 251 +++++++++++++++++++++++++++++++++++++++++
scribus-1.5.5-poppler-84.patch | 164 +++++++++++++++++++++++++++
scribus.spec | 21 +++-
3 files changed, 431 insertions(+), 5 deletions(-)
create mode 100644 scribus-1.5.5-c++17.patch
create mode 100644 scribus-1.5.5-poppler-84.patch
diff --git a/scribus-1.5.5-c++17.patch b/scribus-1.5.5-c++17.patch
new file mode 100644
index 0000000..7b58d09
--- /dev/null
+++ b/scribus-1.5.5-c++17.patch
@@ -0,0 +1,251 @@
+diff -up scribus-1.5.5/scribus/third_party/pgf/PGFplatform.h.omv~ scribus-1.5.5/scribus/third_party/pgf/PGFplatform.h
+--- scribus-1.5.5/scribus/third_party/pgf/PGFplatform.h.omv~ 2020-01-28 19:37:07.280053317 +0100
++++ scribus-1.5.5/scribus/third_party/pgf/PGFplatform.h 2020-01-28 19:38:37.492048940 +0100
+@@ -480,7 +480,11 @@ __inline int MulDiv(int nNumber, int nNu
+ #define ReturnWithError2(err, ret) throw IOException(err)
+ #endif //NEXCEPTIONS
+
++#if __cplusplus >= 201402L
++#define THROW_ noexcept(false)
++#else
+ #define THROW_ throw(IOException)
++#endif
+ #define CONST const
+
+ //-------------------------------------------------------------------------------
+diff -up scribus-1.5.5/scribus/third_party/prc/oPRCFile.cc.omv~ scribus-1.5.5/scribus/third_party/prc/oPRCFile.cc
+--- scribus-1.5.5/scribus/third_party/prc/oPRCFile.cc.omv~ 2020-01-28 19:32:23.603067080 +0100
++++ scribus-1.5.5/scribus/third_party/prc/oPRCFile.cc 2020-01-28 19:35:02.593059366 +0100
+@@ -449,9 +449,9 @@ void oPRCFile::doGroup(PRCgroup& group)
+ }
+ if(!same_color && i>0)
+ {
+- tess->rgba_vertices.push_back(byte(lit->color.red));
+- tess->rgba_vertices.push_back(byte(lit->color.green));
+- tess->rgba_vertices.push_back(byte(lit->color.blue));
++ tess->rgba_vertices.push_back(::byte(lit->color.red));
++ tess->rgba_vertices.push_back(::byte(lit->color.green));
++ tess->rgba_vertices.push_back(::byte(lit->color.blue));
+ }
+ }
+ }
+@@ -593,23 +593,23 @@ void oPRCFile::doGroup(PRCgroup& group)
+ triangles++;
+ if(!same_colour)
+ {
+- tessFace->rgba_vertices.push_back(byte(C[1].R));
+- tessFace->rgba_vertices.push_back(byte(C[1].G));
+- tessFace->rgba_vertices.push_back(byte(C[1].B));
++ tessFace->rgba_vertices.push_back(::byte(C[1].R));
++ tessFace->rgba_vertices.push_back(::byte(C[1].G));
++ tessFace->rgba_vertices.push_back(::byte(C[1].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[1].A));
++ tessFace->rgba_vertices.push_back(::byte(C[1].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[2].R));
+- tessFace->rgba_vertices.push_back(byte(C[2].G));
+- tessFace->rgba_vertices.push_back(byte(C[2].B));
++ tessFace->rgba_vertices.push_back(::byte(C[2].R));
++ tessFace->rgba_vertices.push_back(::byte(C[2].G));
++ tessFace->rgba_vertices.push_back(::byte(C[2].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[2].A));
++ tessFace->rgba_vertices.push_back(::byte(C[2].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[3].R));
+- tessFace->rgba_vertices.push_back(byte(C[3].G));
+- tessFace->rgba_vertices.push_back(byte(C[3].B));
++ tessFace->rgba_vertices.push_back(::byte(C[3].R));
++ tessFace->rgba_vertices.push_back(::byte(C[3].G));
++ tessFace->rgba_vertices.push_back(::byte(C[3].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[3].A));
++ tessFace->rgba_vertices.push_back(::byte(C[3].A));
+ }
+ }
+ else
+@@ -620,23 +620,23 @@ void oPRCFile::doGroup(PRCgroup& group)
+ triangles++;
+ if(!same_colour)
+ {
+- tessFace->rgba_vertices.push_back(byte(C[0].R));
+- tessFace->rgba_vertices.push_back(byte(C[0].G));
+- tessFace->rgba_vertices.push_back(byte(C[0].B));
++ tessFace->rgba_vertices.push_back(::byte(C[0].R));
++ tessFace->rgba_vertices.push_back(::byte(C[0].G));
++ tessFace->rgba_vertices.push_back(::byte(C[0].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[0].A));
++ tessFace->rgba_vertices.push_back(::byte(C[0].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[2].R));
+- tessFace->rgba_vertices.push_back(byte(C[2].G));
+- tessFace->rgba_vertices.push_back(byte(C[2].B));
++ tessFace->rgba_vertices.push_back(::byte(C[2].R));
++ tessFace->rgba_vertices.push_back(::byte(C[2].G));
++ tessFace->rgba_vertices.push_back(::byte(C[2].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[2].A));
++ tessFace->rgba_vertices.push_back(::byte(C[2].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[3].R));
+- tessFace->rgba_vertices.push_back(byte(C[3].G));
+- tessFace->rgba_vertices.push_back(byte(C[3].B));
++ tessFace->rgba_vertices.push_back(::byte(C[3].R));
++ tessFace->rgba_vertices.push_back(::byte(C[3].G));
++ tessFace->rgba_vertices.push_back(::byte(C[3].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[3].A));
++ tessFace->rgba_vertices.push_back(::byte(C[3].A));
+ }
+ tess->triangulated_index.push_back(vertex_indices[3]);
+ tess->triangulated_index.push_back(vertex_indices[1]);
+@@ -644,23 +644,23 @@ void oPRCFile::doGroup(PRCgroup& group)
+ triangles++;
+ if(!same_colour)
+ {
+- tessFace->rgba_vertices.push_back(byte(C[3].R));
+- tessFace->rgba_vertices.push_back(byte(C[3].G));
+- tessFace->rgba_vertices.push_back(byte(C[3].B));
++ tessFace->rgba_vertices.push_back(::byte(C[3].R));
++ tessFace->rgba_vertices.push_back(::byte(C[3].G));
++ tessFace->rgba_vertices.push_back(::byte(C[3].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[3].A));
++ tessFace->rgba_vertices.push_back(::byte(C[3].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[1].R));
+- tessFace->rgba_vertices.push_back(byte(C[1].G));
+- tessFace->rgba_vertices.push_back(byte(C[1].B));
++ tessFace->rgba_vertices.push_back(::byte(C[1].R));
++ tessFace->rgba_vertices.push_back(::byte(C[1].G));
++ tessFace->rgba_vertices.push_back(::byte(C[1].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[1].A));
++ tessFace->rgba_vertices.push_back(::byte(C[1].A));
+
+- tessFace->rgba_vertices.push_back(byte(C[0].R));
+- tessFace->rgba_vertices.push_back(byte(C[0].G));
+- tessFace->rgba_vertices.push_back(byte(C[0].B));
++ tessFace->rgba_vertices.push_back(::byte(C[0].R));
++ tessFace->rgba_vertices.push_back(::byte(C[0].G));
++ tessFace->rgba_vertices.push_back(::byte(C[0].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[0].A));
++ tessFace->rgba_vertices.push_back(::byte(C[0].A));
+ }
+ }
+ }
+@@ -1648,21 +1648,21 @@ uint32_t oPRCFile::createTriangleMesh(ui
+ tessFace->rgba_vertices.reserve((tessFace->is_rgba?4:3)*3*nI);
+ for(uint32_t i=0; i<nI; i++)
+ {
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].B));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][0]].R));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][0]].G));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][0]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].B));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][0]].A));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].R));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].G));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].B));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].A));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][2]].R));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][2]].G));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][2]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].A));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][2]].A));
+ }
+ }
+ tess->addTessFace(tessFace);
+@@ -1792,37 +1792,37 @@ uint32_t oPRCFile::createQuadMesh(uint32
+ for(uint32_t i=0; i<nI; i++)
+ {
+ // first triangle
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].B));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][0]].R));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][0]].G));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][0]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][0]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].B));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][0]].A));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].R));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].G));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].B));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].A));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][3]].R));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][3]].G));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][3]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].A));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][3]].A));
+ // second triangle
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].B));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].R));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].G));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][1]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].B));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][1]].A));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][2]].R));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][2]].G));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][2]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][2]].A));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].R));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].G));
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].B));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][2]].A));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][3]].R));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][3]].G));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][3]].B));
+ if(tessFace->is_rgba)
+- tessFace->rgba_vertices.push_back(byte(C[CI[i][3]].A));
++ tessFace->rgba_vertices.push_back(::byte(C[CI[i][3]].A));
+ }
+ }
+ tess->addTessFace(tessFace);
+@@ -1910,11 +1910,11 @@ uint32_t oPRCFile::createLines(uint32_t
+ tess->rgba_vertices.reserve((tess->is_rgba?4:3)*nCI);
+ for(uint32_t i=0; i<nCI; i++)
+ {
+- tess->rgba_vertices.push_back(byte(C[CI[i]].R));
+- tess->rgba_vertices.push_back(byte(C[CI[i]].G));
+- tess->rgba_vertices.push_back(byte(C[CI[i]].B));
++ tess->rgba_vertices.push_back(::byte(C[CI[i]].R));
++ tess->rgba_vertices.push_back(::byte(C[CI[i]].G));
++ tess->rgba_vertices.push_back(::byte(C[CI[i]].B));
+ if(tess->is_rgba)
+- tess->rgba_vertices.push_back(byte(C[CI[i]].A));
++ tess->rgba_vertices.push_back(::byte(C[CI[i]].A));
+ }
+ }
+ const uint32_t tess_index = add3DWireTess(tess);
diff --git a/scribus-1.5.5-poppler-84.patch b/scribus-1.5.5-poppler-84.patch
new file mode 100644
index 0000000..e2421a6
--- /dev/null
+++ b/scribus-1.5.5-poppler-84.patch
@@ -0,0 +1,164 @@
+diff -up scribus-1.5.5/build/scribus/plugins/import/pdf/slaoutput.h.omv~ scribus-1.5.5/build/scribus/plugins/import/pdf/slaoutput.h
+diff -up scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp.omv~ scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp
+--- scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp.omv~ 2020-01-28 18:47:59.176196348 +0100
++++ scribus-1.5.5/scribus/plugins/import/pdf/importpdf.cpp 2020-01-28 18:53:04.320181543 +0100
+@@ -6,6 +6,7 @@ for which a new license (GPL+exception)
+ */
+
+ #include <cstdlib>
++#include <memory>
+
+ #include <QByteArray>
+ #include <QCursor>
+@@ -75,7 +76,7 @@ PdfPlug::PdfPlug(ScribusDoc* doc, int fl
+ QImage PdfPlug::readThumbnail(const QString& fName)
+ {
+ QString pdfFile = QDir::toNativeSeparators(fName);
+- globalParams = new GlobalParams();
++ globalParams = std::make_unique<GlobalParams>();
+ if (globalParams)
+ {
+ #if defined(Q_OS_WIN32) && POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 62, 0)
+@@ -90,7 +91,6 @@ QImage PdfPlug::readThumbnail(const QStr
+ if (pdfDoc->getErrorCode() == errEncrypted)
+ {
+ delete pdfDoc;
+- delete globalParams;
+ return QImage();
+ }
+ if (pdfDoc->isOk())
+@@ -134,11 +134,9 @@ QImage PdfPlug::readThumbnail(const QStr
+ image.setText("YSize", QString("%1").arg(h));
+ delete dev;
+ delete pdfDoc;
+- delete globalParams;
+ return image;
+ }
+ delete pdfDoc;
+- delete globalParams;
+ }
+ }
+ return QImage();
+@@ -387,7 +385,7 @@ bool PdfPlug::convert(const QString& fn)
+ qApp->processEvents();
+ }
+
+- globalParams = new GlobalParams();
++ globalParams = std::make_unique<GlobalParams>();
+ GooString *userPW = nullptr;
+ if (globalParams)
+ {
+@@ -429,7 +427,6 @@ bool PdfPlug::convert(const QString& fn)
+ if (progressDialog)
+ progressDialog->close();
+ delete pdfDoc;
+- delete globalParams;
+ return false;
+ }
+ if (progressDialog)
+@@ -474,7 +471,6 @@ bool PdfPlug::convert(const QString& fn)
+ progressDialog->close();
+ delete optImp;
+ delete pdfDoc;
+- delete globalParams;
+ return false;
+ }
+ pageString = optImp->getPagesString();
+@@ -908,8 +904,6 @@ bool PdfPlug::convert(const QString& fn)
+ }
+ delete pdfDoc;
+ }
+- delete globalParams;
+- globalParams = nullptr;
+
+ // qDebug() << "converting finished";
+ // qDebug() << "Imported" << Elements.count() << "Elements";
+diff -up scribus-1.5.5/scribus/plugins/import/pdf/slaoutput.cpp.omv~ scribus-1.5.5/scribus/plugins/import/pdf/slaoutput.cpp
+--- scribus-1.5.5/scribus/plugins/import/pdf/slaoutput.cpp.omv~ 2020-01-28 18:42:14.775213057 +0100
++++ scribus-1.5.5/scribus/plugins/import/pdf/slaoutput.cpp 2020-01-28 18:46:47.179199841 +0100
+@@ -1229,7 +1229,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc,
+ globalParams->getEnableT1lib(),
+ #endif
+ #if HAVE_FREETYPE_H
+- globalParams->getEnableFreeType(),
++ true /*globalParams->getEnableFreeType()*/,
+ true,
+ true,
+ #endif
+@@ -2784,7 +2784,7 @@ void SlaOutputDev::drawMaskedImage(GfxSt
+ delete[] mbuffer;
+ }
+
+-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg)
++void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, const int *maskColors, GBool inlineImg)
+ {
+ ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
+ // qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors;
+@@ -3365,7 +3365,7 @@ err1:
+ fontsrc->unref();
+ }
+
+-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)
++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)
+ {
+ double x1, y1, x2, y2;
+ int render;
+@@ -3452,7 +3452,7 @@ void SlaOutputDev::drawChar(GfxState *st
+ }
+ }
+
+-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen)
++GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, const Unicode *u, int uLen)
+ {
+ // qDebug() << "beginType3Char";
+ GfxFont *gfxFont;
+@@ -3705,7 +3705,7 @@ QString SlaOutputDev::getAnnotationColor
+ return fNam;
+ }
+
+-QString SlaOutputDev::convertPath(GfxPath *path)
++QString SlaOutputDev::convertPath(const GfxPath *path)
+ {
+ if (! path)
+ return QString();
+@@ -3715,7 +3715,7 @@ QString SlaOutputDev::convertPath(GfxPat
+
+ for (int i = 0; i < path->getNumSubpaths(); ++i)
+ {
+- GfxSubpath * subpath = path->getSubpath(i);
++ const GfxSubpath * subpath = path->getSubpath(i);
+ if (subpath->getNumPoints() > 0)
+ {
+ output += QString("M %1 %2").arg(subpath->getX(0)).arg(subpath->getY(0));
+diff -up scribus-1.5.5/scribus/plugins/import/pdf/slaoutput.h.omv~ scribus-1.5.5/scribus/plugins/import/pdf/slaoutput.h
+--- scribus-1.5.5/scribus/plugins/import/pdf/slaoutput.h.omv~ 2020-01-28 18:38:16.652224610 +0100
++++ scribus-1.5.5/scribus/plugins/import/pdf/slaoutput.h 2020-01-28 18:46:05.291201873 +0100
+@@ -229,7 +229,7 @@ public:
+
+ //----- image drawing
+ void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) override;
+- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) override;
++ void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, const int *maskColors, GBool inlineImg) override;
+ void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
+ int width, int height,
+ GfxImageColorMap *colorMap,
+@@ -261,8 +261,8 @@ public:
+ //----- text drawing
+ void beginTextObject(GfxState *state) override;
+ void endTextObject(GfxState *state) override;
+- 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;
++ 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;
+ 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;
+@@ -282,7 +282,7 @@ private:
+ 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(const GfxPath *path);
+ int getBlendMode(GfxState *state);
+ void applyMask(PageItem *ite);
+ void pushGroup(const QString& maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
diff --git a/scribus.spec b/scribus.spec
index 541c25e..7f2ef98 100644
--- a/scribus.spec
+++ b/scribus.spec
@@ -1,12 +1,16 @@
+%global optflags %{optflags} -Wno-register
+
Summary: Scribus - Open Source Page Layout
Name: scribus
Version: 1.5.5
-Release: 2
+Release: 4
License: GPLv2+
Group: Office
Url: http://www.scribus.net/
Source0: https://downloads.sourceforge.net/project/scribus/scribus-devel/%{version}/scribus-%{version}.tar.xz
Source10: scribus.rpmlintrc
+Patch0: scribus-1.5.5-poppler-84.patch
+Patch1: scribus-1.5.5-c++17.patch
BuildRequires: cmake
BuildRequires: ninja
BuildRequires: desktop-file-utils
@@ -55,8 +59,9 @@ BuildRequires: pkgconfig(Qt5OpenGL)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5PrintSupport)
-Requires: tkinter
Requires: ghostscript-common
+# Currently used in font sampler plugin and calendar plugin
+Recommends: tkinter
%description
Scribus is a desktop open source page layout program with the aim of
@@ -98,14 +103,20 @@ Development headers for programs that will use Scribus.
%prep
%autosetup -p1
+# We don't need NaziOS crap... And it contains python scripts
+# that 2to3 (called below) will choke on
+rm -rf OSX-package
+
# Don't add (Development) to name in program menu, it makes no sense for
# users
sed -i -e "s/ (Development)//" scribus.desktop.in
+# Various plugins are written in python2 and called through /usr/bin/python...
+# Let's hope 2to3 is sufficient to fix everything they do
+find . -name "*.py" |xargs 2to3 -w
+
%build
-#export CC=gcc
-#export CXX=g++
-%cmake_qt5 -DWANT_HUNSPELL:BOOL=ON -DWANT_HEADERINSTALL:BOOL=ON -G Ninja
+%cmake_qt5 -DWANT_HUNSPELL:BOOL=ON -DWANT_HEADERINSTALL:BOOL=ON -DWANT_CPP17:BOOL=ON -G Ninja
%ninja_build
%install