From 576950f933cdf6275d59a3022f6af841753172fb Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 21 Aug 2020 15:58:13 -0600 Subject: [PATCH 1/7] - Fix static ctor initialization issue by removing the unused static data member Re-enable LTO --- scribus-ctorfix.patch | 32 ++++++++++++++++++++++++++++++++ scribus.spec | 12 +++++++----- 2 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 scribus-ctorfix.patch diff --git a/scribus-ctorfix.patch b/scribus-ctorfix.patch new file mode 100644 index 0000000..28ecaf5 --- /dev/null +++ b/scribus-ctorfix.patch @@ -0,0 +1,32 @@ +diff --git a/scribus/ui/colorlistmodel.cpp b/scribus/ui/colorlistmodel.cpp +index a4905a5..8363e97 100644 +--- a/scribus/ui/colorlistmodel.cpp ++++ b/scribus/ui/colorlistmodel.cpp +@@ -10,8 +10,6 @@ for which a new license (GPL+exception) is in place. + #include "colorlistbox.h" + #include "commonstrings.h" + +-ColorPixmapValue ColorListModel::m_NoneColor(ScColor(), nullptr, CommonStrings::None); +- + ColorListModel::ColorListModel(QObject *parent) + : QAbstractItemModel(parent) + { +diff --git a/scribus/ui/colorlistmodel.h b/scribus/ui/colorlistmodel.h +index 8f5bc65..892d0a7 100644 +--- a/scribus/ui/colorlistmodel.h ++++ b/scribus/ui/colorlistmodel.h +@@ -103,12 +103,9 @@ protected: + // SortRule m_sortRule + SortRule m_sortRule; + +- //! Dummy object used to represent None Color +- static ColorPixmapValue m_NoneColor; +- + static bool compareColorNames(const ColorPixmapValue& v1, const ColorPixmapValue& v2); + static bool compareColorValues(const ColorPixmapValue& v1, const ColorPixmapValue& v2); + static bool compareColorTypes(const ColorPixmapValue& v1, const ColorPixmapValue& v2); + }; + +-#endif // COLORLISTMODEL_H +\ No newline at end of file ++#endif // COLORLISTMODEL_H diff --git a/scribus.spec b/scribus.spec index 92107dc..f1dc809 100644 --- a/scribus.spec +++ b/scribus.spec @@ -1,10 +1,6 @@ -# LTO runtime issues, so rather disable globally -# https://bugzilla.redhat.com/show_bug.cgi?id=1866207 -%global _lto_cflags %{nil} - Name: scribus Version: 1.5.6 -Release: 0.11%{?dist} +Release: 0.12%{?dist} Summary: Desktop Publishing application written in Qt # swatches bring in the fun licenses License: GPLv2+ and OGL and CC0 and CC-BY and CC-BY-SA and Public Domain and ASL 2.0 and LGPLv2+ @@ -20,6 +16,7 @@ Source0: %{name}-%{version}-free.tar.xz Patch0: scribus-1.5.6-poppler-0.84.0.patch Patch1: scribus-1.5.6-poppler-0.90.0.patch +Patch2: scribus-ctorfix.patch BuildRequires: boost-devel BuildRequires: cmake @@ -156,6 +153,11 @@ appstream-util validate-relax --nonet \ %changelog +* Fri Aug 21 2020 Jeff law - 1.5.6-0.12 +- Fix static ctor initialization issue by removing the unused static + data member + Re-enable LTO + * Fri Aug 21 2020 Dan HorĂ¡k - 1.5.6-0.11 - build with LTO disabled (#1866207) From 2085312fce9a7a27ccc8725b5846b24dd3d51a7a Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 5 Oct 2020 17:52:19 +0200 Subject: [PATCH 2/7] add BR on python3-setuptools explicitly --- scribus.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scribus.spec b/scribus.spec index f1dc809..e910798 100644 --- a/scribus.spec +++ b/scribus.spec @@ -1,6 +1,6 @@ Name: scribus Version: 1.5.6 -Release: 0.12%{?dist} +Release: 0.13%{?dist} Summary: Desktop Publishing application written in Qt # swatches bring in the fun licenses License: GPLv2+ and OGL and CC0 and CC-BY and CC-BY-SA and Public Domain and ASL 2.0 and LGPLv2+ @@ -50,6 +50,7 @@ BuildRequires: poppler-cpp-devel BuildRequires: poppler-data-devel BuildRequires: poppler-devel BuildRequires: pkgconfig(python3) +BuildRequires: python3-setuptools BuildRequires: python3-pillow-devel BuildRequires: python3-qt5-devel BuildRequires: python3-tkinter @@ -153,6 +154,9 @@ appstream-util validate-relax --nonet \ %changelog +* Mon Oct 05 2020 Than Ngo - 1.5.6-0.13 +- add BR on python3-setuptools explicitly + * Fri Aug 21 2020 Jeff law - 1.5.6-0.12 - Fix static ctor initialization issue by removing the unused static data member From 8831297722ca164a2e67bc15d078336131fca069 Mon Sep 17 00:00:00 2001 From: Luya Tshimbalanga Date: Thu, 22 Oct 2020 08:42:03 -0700 Subject: [PATCH 3/7] Update scribus.spec - Further implement pkgconfig for build requirement - Use python3dist for some python package build requirement Signed-off-by: Luya Tshimbalanga --- scribus.spec | 130 ++++++++++++++++++++++++++------------------------- 1 file changed, 66 insertions(+), 64 deletions(-) diff --git a/scribus.spec b/scribus.spec index e910798..203cebb 100644 --- a/scribus.spec +++ b/scribus.spec @@ -16,60 +16,58 @@ Source0: %{name}-%{version}-free.tar.xz Patch0: scribus-1.5.6-poppler-0.84.0.patch Patch1: scribus-1.5.6-poppler-0.90.0.patch -Patch2: scribus-ctorfix.patch +Patch2: scribus-ctorfix.patch -BuildRequires: boost-devel -BuildRequires: cmake -BuildRequires: cups-devel -BuildRequires: desktop-file-utils -BuildRequires: gcc-c++ -BuildRequires: ghostscript -BuildRequires: GraphicsMagick-devel -BuildRequires: GraphicsMagick-c++-devel -BuildRequires: hyphen-devel -BuildRequires: hunspell-devel -BuildRequires: lcms2-devel -BuildRequires: libappstream-glib -BuildRequires: libcdr-devel -BuildRequires: libfreehand-devel -BuildRequires: libjpeg-turbo-devel -BuildRequires: libmspub-devel -BuildRequires: libpagemaker-devel -BuildRequires: libqxp-devel -BuildRequires: librevenge-devel -BuildRequires: libvisio-devel -BuildRequires: libwpd-devel -BuildRequires: libwpg-devel -BuildRequires: libxml2-devel -# Dependency needed for development repository -BuildRequires: libzmf-devel -BuildRequires: OpenSceneGraph-devel -BuildRequires: openssl-devel -BuildRequires: podofo-devel -BuildRequires: poppler-cpp-devel -BuildRequires: poppler-data-devel -BuildRequires: poppler-devel -BuildRequires: pkgconfig(python3) -BuildRequires: python3-setuptools -BuildRequires: python3-pillow-devel -BuildRequires: python3-qt5-devel -BuildRequires: python3-tkinter -BuildRequires: qt5-qtbase-devel -BuildRequires: qt5-qtdeclarative-devel -BuildRequires: qt5-qttools-devel -BuildRequires: qt5-qtwebkit-devel -BuildRequires: tk-devel +BuildRequires: boost-devel +BuildRequires: cmake +BuildRequires: cups-devel +BuildRequires: desktop-file-utils +BuildRequires: gcc-c++ +BuildRequires: ghostscript +BuildRequires: hyphen-devel +BuildRequires: libappstream-glib +BuildRequires: pkgconfig(cairo) +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(gnutls) +BuildRequires: pkgconfig(GraphicsMagick) +BuildRequires: pkgconfig(GraphicsMagick++) +BuildRequires: pkgconfig(harfbuzz) +BuildRequires: pkgconfig(hunspell) +BuildRequires: pkgconfig(icu-uc) +BuildRequires: pkgconfig(lcms2) +BuildRequires: pkgconfig(libcdr-0.1) +BuildRequires: pkgconfig(libfreehand-0.1) +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libmspub-0.1) +BuildRequires: pkgconfig(libpagemaker-0.0) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libpodofo) +BuildRequires: pkgconfig(libqxp-0.0) +BuildRequires: pkgconfig(librevenge-0.0) +BuildRequires: pkgconfig(libtiff-4) +BuildRequires: pkgconfig(libvisio-0.1) +BuildRequires: pkgconfig(libwpd-0.10) +BuildRequires: pkgconfig(libwpg-0.3) +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(libzmf-0.0) +BuildRequires: pkgconfig(openscenegraph) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(poppler) +BuildRequires: pkgconfig(poppler-cpp) +BuildRequires: pkgconfig(poppler-data) +BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(Qt5) +BuildRequires: pkgconfig(Qt5Quick) +BuildRequires: pkgconfig(Qt5UiTools) +BuildRequires: pkgconfig(Qt5WebKit) +BuildRequires: pkgconfig(tk) +BuildRequires: pkgconfig(zlib) +BuildRequires: python3dist(pillow) +BuildRequires: python3-qt5-devel +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(tkinter) -# Some libraries have pkconfig files so use them -BuildRequires: pkgconfig(cairo) -BuildRequires: pkgconfig(fontconfig) -BuildRequires: pkgconfig(freetype2) -BuildRequires: pkgconfig(gnutls) -BuildRequires: pkgconfig(harfbuzz) -BuildRequires: pkgconfig(icu-uc) -BuildRequires: pkgconfig(libpng) -BuildRequires: pkgconfig(libtiff-4) -BuildRequires: pkgconfig(zlib) %filter_provides_in %{_libdir}/%{name}/plugins %filter_setup @@ -87,8 +85,8 @@ import/export and creation of color separations. %package devel -Summary: Header files for Scribus -Requires: %{name} = %{version}-%{release} +Summary: Header files for Scribus +Requires: %{name} = %{version}-%{release} %description devel #Header files for Scribus. @@ -101,21 +99,21 @@ chmod a-x scribus/pageitem_latexframe.h # drop shebang lines from python scripts pathfix.py -pni "%{__python3} %{py3_shbang_opts}" \ - %{name}/plugins/scriptplugin/{samples,scripts}/*.py + %{name}/plugins/scriptplugin/{samples,scripts}/*.py %build %cmake -DWANT_CCACHE=YES \ - -DWANT_DISTROBUILD=YES \ - -DWANT_GRAPHICSMAGICK=1 \ - -DWANT_HUNSPELL=1 \ + -DWANT_DISTROBUILD=YES \ + -DWANT_GRAPHICSMAGICK=1 \ + -DWANT_HUNSPELL=1 \ %if "%{_lib}" == "lib64" - -DWANT_LIB64=YES \ + -DWANT_LIB64=YES \ %endif - -DWANT_NORPATH=1 \ - -DWITH_BOOST=1 \ - -DWITH_PODOFO=1 .. + -DWANT_NORPATH=1 \ + -DWITH_BOOST=1 \ + -DWITH_PODOFO=1 .. -%cmake_build +%cmake_build VERBOSE=1 %install %cmake_install @@ -125,7 +123,7 @@ find %{buildroot} -type f -name "*.la" -exec rm -f {} ';' %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop appstream-util validate-relax --nonet \ - %{buildroot}%{_metainfodir}/%{name}.appdata.xml + %{buildroot}%{_metainfodir}/%{name}.appdata.xml %files @@ -154,6 +152,10 @@ appstream-util validate-relax --nonet \ %changelog +* Tue Nov 05 2019 Luya Tshimbalanga - 1.5.6-0.14 +- Further implement pkgconfig for build requirement +- Use python3dist macro for some build requirement + * Mon Oct 05 2020 Than Ngo - 1.5.6-0.13 - add BR on python3-setuptools explicitly From 01792a089ce386f1303bc3907d873de1b287e0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Sat, 31 Oct 2020 08:53:02 +0100 Subject: [PATCH 4/7] drop unused and empty devel subpackage --- scribus.spec | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/scribus.spec b/scribus.spec index 203cebb..9ba6d3a 100644 --- a/scribus.spec +++ b/scribus.spec @@ -1,6 +1,6 @@ Name: scribus Version: 1.5.6 -Release: 0.13%{?dist} +Release: 0.14%{?dist} Summary: Desktop Publishing application written in Qt # swatches bring in the fun licenses License: GPLv2+ and OGL and CC0 and CC-BY and CC-BY-SA and Public Domain and ASL 2.0 and LGPLv2+ @@ -84,13 +84,6 @@ features, such as CMYK color, easy PDF creation, Encapsulated Postscript import/export and creation of color separations. -%package devel -Summary: Header files for Scribus -Requires: %{name} = %{version}-%{release} - -%description devel -#Header files for Scribus. - %prep %autosetup -p1 @@ -147,9 +140,6 @@ appstream-util validate-relax --nonet \ %{_mandir}/pl/man1/* %{_mandir}/de/man1/* -%files devel -%doc AUTHORS COPYING - %changelog * Tue Nov 05 2019 Luya Tshimbalanga - 1.5.6-0.14 From 1b08f76de35b516e152ab4358b6566196d12501a Mon Sep 17 00:00:00 2001 From: Luya Tshimbalanga Date: Tue, 1 Dec 2020 01:32:27 -0800 Subject: [PATCH 5/7] Update to 1.5.6.1 Use c++17 --- .gitignore | 1 + scribus.spec | 27 ++++++++++++++++----------- sources | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 0c9430c..86308e9 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ scribus-1.3.8.tar.bz2 /scribus-1.5.5-free.tar.xz /scribus-1.5.6.tar.xz /scribus-1.5.6-free.tar.xz +/scribus-1.5.6.1-free.tar.xz diff --git a/scribus.spec b/scribus.spec index 9ba6d3a..016f31c 100644 --- a/scribus.spec +++ b/scribus.spec @@ -1,6 +1,6 @@ Name: scribus -Version: 1.5.6 -Release: 0.14%{?dist} +Version: 1.5.6.1 +Release: 1%{?dist} Summary: Desktop Publishing application written in Qt # swatches bring in the fun licenses License: GPLv2+ and OGL and CC0 and CC-BY and CC-BY-SA and Public Domain and ASL 2.0 and LGPLv2+ @@ -14,9 +14,9 @@ Source0: %{name}-%{version}-free.tar.xz #Source0: http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz #Source1: http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz.asc -Patch0: scribus-1.5.6-poppler-0.84.0.patch -Patch1: scribus-1.5.6-poppler-0.90.0.patch -Patch2: scribus-ctorfix.patch +#Patch0: scribus-1.5.6-poppler-0.84.0.patch +#Patch1: scribus-1.5.6-poppler-0.90.0.patch +#Patch2: scribus-ctorfix.patch BuildRequires: boost-devel BuildRequires: cmake @@ -66,7 +66,7 @@ BuildRequires: pkgconfig(zlib) BuildRequires: python3dist(pillow) BuildRequires: python3-qt5-devel BuildRequires: python3dist(setuptools) -BuildRequires: python3dist(tkinter) +BuildRequires: python3-tkinter %filter_provides_in %{_libdir}/%{name}/plugins @@ -95,7 +95,9 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" \ %{name}/plugins/scriptplugin/{samples,scripts}/*.py %build -%cmake -DWANT_CCACHE=YES \ +%cmake \ + -DCMAKE_CXX_STANDARD=17 \ + -DWANT_CCACHE=YES \ -DWANT_DISTROBUILD=YES \ -DWANT_GRAPHICSMAGICK=1 \ -DWANT_HUNSPELL=1 \ @@ -104,9 +106,8 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" \ %endif -DWANT_NORPATH=1 \ -DWITH_BOOST=1 \ - -DWITH_PODOFO=1 .. - -%cmake_build VERBOSE=1 + -DWITH_PODOFO=1 +%cmake_build %install %cmake_install @@ -142,7 +143,11 @@ appstream-util validate-relax --nonet \ %changelog -* Tue Nov 05 2019 Luya Tshimbalanga - 1.5.6-0.14 +* Tue Dec 01 2020 Luya Tshimbalanga - 1.5.6.1-1 +- Update to 1.5.6.1 +- Use c++17 + +* Tue Nov 03 2020 Luya Tshimbalanga - 1.5.6-0.14 - Further implement pkgconfig for build requirement - Use python3dist macro for some build requirement diff --git a/sources b/sources index bc6aad5..731e07c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (scribus-1.5.6-free.tar.xz) = b83af7b882b46d48e1cc1790117f2be00f9cbc12d2c7d2e68663c8a583e78c7bdea473d52dfe89d30e64ab391a58363caa4f9de468046d2e7059ba6d208d9f8f +SHA512 (scribus-1.5.6.1-free.tar.xz) = f8888db74a20a6de24e7979bd99bbc13d9c45a44440c1706b075fdedc9ef624990b29e8f3168af0cffae610c1adf787cd047eb267d76e2cf37c16b8165f58b9d From 5dfea79c6588f48833dd15969488d917c84c25fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 7 Dec 2020 11:38:59 +0100 Subject: [PATCH 6/7] remove patches now in upstream --- scribus-1.5.6-poppler-0.84.0.patch | 157 ---------------------- scribus-1.5.6-poppler-0.90.0.patch | 201 ----------------------------- scribus.spec | 4 +- 3 files changed, 1 insertion(+), 361 deletions(-) delete mode 100644 scribus-1.5.6-poppler-0.84.0.patch delete mode 100644 scribus-1.5.6-poppler-0.90.0.patch diff --git a/scribus-1.5.6-poppler-0.84.0.patch b/scribus-1.5.6-poppler-0.84.0.patch deleted file mode 100644 index 3c44024..0000000 --- a/scribus-1.5.6-poppler-0.84.0.patch +++ /dev/null @@ -1,157 +0,0 @@ ---- 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 9913ee382..5a7e0d216 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 5e4d32a55..ffcfa8450 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 60fb90061..d928fada8 100644 ---- a/scribus/plugins/import/pdf/slaoutput.h -+++ b/scribus/plugins/import/pdf/slaoutput.h -@@ -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(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); ---- 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 *) diff --git a/scribus-1.5.6-poppler-0.90.0.patch b/scribus-1.5.6-poppler-0.90.0.patch deleted file mode 100644 index 8200f64..0000000 --- a/scribus-1.5.6-poppler-0.90.0.patch +++ /dev/null @@ -1,201 +0,0 @@ ---- scribus-1.5.6/scribus/plugins/import/pdf/importpdf.cpp -+++ scribus-1.5.6/scribus/plugins/import/pdf/importpdf.cpp -@@ -792,14 +792,15 @@ bool PdfPlug::convert(const QString& fn) - names = catDict.dictLookup("OpenAction"); - if (names.isDict()) - { -- LinkAction *linkAction = nullptr; -+ std::unique_ptr<::LinkAction> linkAction; - linkAction = LinkAction::parseAction(&names, pdfDoc->getCatalog()->getBaseURI()); - if (linkAction) - { -- LinkJavaScript *jsa = (LinkJavaScript*)linkAction; -+ LinkJavaScript *jsa = static_cast(linkAction.get()); - if (jsa->isOk()) - { -- QString script = UnicodeParsedString(jsa->getScript()); -+ const GooString scriptGooString(jsa->getScript()); -+ QString script = UnicodeParsedString(&scriptGooString); - if (script.startsWith("this.")) - { - script.remove(0, 5); ---- scribus-1.5.6/scribus/plugins/import/pdf/slaoutput.cpp -+++ scribus-1.5.6/scribus/plugins/import/pdf/slaoutput.cpp -@@ -324,7 +324,7 @@ LinkAction* SlaOutputDev::SC_getAddition - { - Object actionObject = additionalActionsObject.dictLookup(key); - if (actionObject.isDict()) -- linkAction = LinkAction::parseAction(&actionObject, pdfDoc->getCatalog()->getBaseURI()); -+ linkAction = (LinkAction::parseAction(&actionObject, pdfDoc->getCatalog()->getBaseURI())).release(); - } - } - return linkAction; -@@ -455,7 +455,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot - POPPLER_CONST GooString *ndst = gto->getNamedDest(); - if (ndst) - { -- LinkDest *dstn = pdfDoc->findDest(ndst); -+ std::unique_ptr dstn = pdfDoc->findDest(ndst); - if (dstn) - { - if (dstn->getKind() == destXYZ) -@@ -499,7 +499,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot - POPPLER_CONST GooString *ndst = gto->getNamedDest(); - if (ndst) - { -- LinkDest *dstn = pdfDoc->findDest(ndst); -+ std::unique_ptr dstn = pdfDoc->findDest(ndst); - if (dstn) - { - if (dstn->getKind() == destXYZ) -@@ -516,8 +516,9 @@ bool SlaOutputDev::handleLinkAnnot(Annot - else if (act->getKind() == actionURI) - { - LinkURI *gto = (LinkURI*)act; -+ const GooString uriGooString(gto->getURI()); - validLink = true; -- fileName = UnicodeParsedString(gto->getURI()); -+ fileName = UnicodeParsedString(&uriGooString); - } - if (validLink) - { -@@ -929,8 +930,9 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Lact; - if (jsa->isOk()) - { -+ const GooString scriptGooString(jsa->getScript()); - ite->annotation().setActionType(1); -- ite->annotation().setAction(UnicodeParsedString(jsa->getScript())); -+ ite->annotation().setAction(UnicodeParsedString(&scriptGooString)); - } - } - else if (Lact->getKind() == actionGoTo) -@@ -967,7 +969,7 @@ void SlaOutputDev::handleActions(PageIte - POPPLER_CONST GooString *ndst = gto->getNamedDest(); - if (ndst) - { -- LinkDest *dstn = pdfDoc->findDest(ndst); -+ std::unique_ptr dstn = pdfDoc->findDest(ndst); - if (dstn) - { - if (dstn->getKind() == destXYZ) -@@ -1019,7 +1021,7 @@ void SlaOutputDev::handleActions(PageIte - POPPLER_CONST GooString *ndst = gto->getNamedDest(); - if (ndst) - { -- LinkDest *dstn = pdfDoc->findDest(ndst); -+ std::unique_ptr dstn = pdfDoc->findDest(ndst); - if (dstn) - { - if (dstn->getKind() == destXYZ) -@@ -1039,7 +1041,8 @@ void SlaOutputDev::handleActions(PageIte - else if (Lact->getKind() == actionUnknown) - { - LinkUnknown *uno = (LinkUnknown*)Lact; -- QString actString = UnicodeParsedString(uno->getAction()); -+ const GooString actionGooString(uno->getAction()); -+ QString actString = UnicodeParsedString(&actionGooString); - if (actString == "ResetForm") - { - ite->annotation().setActionType(4); -@@ -1082,8 +1085,9 @@ void SlaOutputDev::handleActions(PageIte - else if (Lact->getKind() == actionNamed) - { - LinkNamed *uno = (LinkNamed*)Lact; -+ const GooString nameGooString(uno->getName()); - ite->annotation().setActionType(10); -- ite->annotation().setAction(UnicodeParsedString(uno->getName())); -+ ite->annotation().setAction(UnicodeParsedString(&nameGooString)); - } - else - qDebug() << "Found unsupported Action of type" << Lact->getKind(); -@@ -1096,7 +1100,8 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Aact; - if (jsa->isOk()) - { -- ite->annotation().setD_act(UnicodeParsedString(jsa->getScript())); -+ const GooString scriptGooString(jsa->getScript()); -+ ite->annotation().setD_act(UnicodeParsedString(&scriptGooString)); - ite->annotation().setAAact(true); - } - } -@@ -1110,7 +1115,8 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Aact; - if (jsa->isOk()) - { -- ite->annotation().setE_act(UnicodeParsedString(jsa->getScript())); -+ const GooString scriptGooString(jsa->getScript()); -+ ite->annotation().setE_act(UnicodeParsedString(&scriptGooString)); - ite->annotation().setAAact(true); - } - } -@@ -1124,7 +1130,8 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Aact; - if (jsa->isOk()) - { -- ite->annotation().setX_act(UnicodeParsedString(jsa->getScript())); -+ const GooString scriptGooString(jsa->getScript()); -+ ite->annotation().setX_act(UnicodeParsedString(&scriptGooString)); - ite->annotation().setAAact(true); - } - } -@@ -1138,7 +1145,8 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Aact; - if (jsa->isOk()) - { -- ite->annotation().setFo_act(UnicodeParsedString(jsa->getScript())); -+ const GooString scriptGooString(jsa->getScript()); -+ ite->annotation().setFo_act(UnicodeParsedString(&scriptGooString)); - ite->annotation().setAAact(true); - } - } -@@ -1152,7 +1160,8 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Aact; - if (jsa->isOk()) - { -- ite->annotation().setBl_act(UnicodeParsedString(jsa->getScript())); -+ const GooString scriptGooString(jsa->getScript()); -+ ite->annotation().setBl_act(UnicodeParsedString(&scriptGooString)); - ite->annotation().setAAact(true); - } - } -@@ -1166,7 +1175,8 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Aact; - if (jsa->isOk()) - { -- ite->annotation().setC_act(UnicodeParsedString(jsa->getScript())); -+ const GooString scriptGooString(jsa->getScript()); -+ ite->annotation().setC_act(UnicodeParsedString(&scriptGooString)); - ite->annotation().setAAact(true); - } - } -@@ -1180,7 +1190,8 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Aact; - if (jsa->isOk()) - { -- ite->annotation().setF_act(UnicodeParsedString(jsa->getScript())); -+ const GooString scriptGooString(jsa->getScript()); -+ ite->annotation().setF_act(UnicodeParsedString(&scriptGooString)); - ite->annotation().setAAact(true); - ite->annotation().setFormat(5); - } -@@ -1195,7 +1206,8 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Aact; - if (jsa->isOk()) - { -- ite->annotation().setK_act(UnicodeParsedString(jsa->getScript())); -+ const GooString scriptGooString(jsa->getScript()); -+ ite->annotation().setK_act(UnicodeParsedString(&scriptGooString)); - ite->annotation().setAAact(true); - ite->annotation().setFormat(5); - } -@@ -1210,7 +1222,8 @@ void SlaOutputDev::handleActions(PageIte - LinkJavaScript *jsa = (LinkJavaScript*)Aact; - if (jsa->isOk()) - { -- ite->annotation().setV_act(UnicodeParsedString(jsa->getScript())); -+ const GooString scriptGooString(jsa->getScript()); -+ ite->annotation().setV_act(UnicodeParsedString(&scriptGooString)); - ite->annotation().setAAact(true); - } - } diff --git a/scribus.spec b/scribus.spec index 016f31c..32ec287 100644 --- a/scribus.spec +++ b/scribus.spec @@ -14,9 +14,7 @@ Source0: %{name}-%{version}-free.tar.xz #Source0: http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz #Source1: http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz.asc -#Patch0: scribus-1.5.6-poppler-0.84.0.patch -#Patch1: scribus-1.5.6-poppler-0.90.0.patch -#Patch2: scribus-ctorfix.patch +#Patch0: scribus-ctorfix.patch BuildRequires: boost-devel BuildRequires: cmake From 85fc263e990a4cba2bb45ba34e47ca48fc625b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 7 Dec 2020 11:39:21 +0100 Subject: [PATCH 7/7] update the LTO fix --- scribus-ctorfix.patch | 25 ++++++++++++------------- scribus.spec | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/scribus-ctorfix.patch b/scribus-ctorfix.patch index 28ecaf5..7e98315 100644 --- a/scribus-ctorfix.patch +++ b/scribus-ctorfix.patch @@ -1,16 +1,3 @@ -diff --git a/scribus/ui/colorlistmodel.cpp b/scribus/ui/colorlistmodel.cpp -index a4905a5..8363e97 100644 ---- a/scribus/ui/colorlistmodel.cpp -+++ b/scribus/ui/colorlistmodel.cpp -@@ -10,8 +10,6 @@ for which a new license (GPL+exception) is in place. - #include "colorlistbox.h" - #include "commonstrings.h" - --ColorPixmapValue ColorListModel::m_NoneColor(ScColor(), nullptr, CommonStrings::None); -- - ColorListModel::ColorListModel(QObject *parent) - : QAbstractItemModel(parent) - { diff --git a/scribus/ui/colorlistmodel.h b/scribus/ui/colorlistmodel.h index 8f5bc65..892d0a7 100644 --- a/scribus/ui/colorlistmodel.h @@ -30,3 +17,15 @@ index 8f5bc65..892d0a7 100644 -#endif // COLORLISTMODEL_H \ No newline at end of file +#endif // COLORLISTMODEL_H +diff -up scribus-1.5.6.1/scribus/ui/colorlistmodel.cpp.orig scribus-1.5.6.1/scribus/ui/colorlistmodel.cpp +--- scribus-1.5.6.1/scribus/ui/colorlistmodel.cpp.orig 2020-12-07 10:58:06.108966263 +0100 ++++ scribus-1.5.6.1/scribus/ui/colorlistmodel.cpp 2020-12-07 10:58:11.058358432 +0100 +@@ -31,8 +31,6 @@ ColorPixmapValue::ColorPixmapValue( cons + m_name = colName; + } + +-ColorPixmapValue ColorListModel::m_NoneColor(ScColor(), nullptr, CommonStrings::None); +- + ColorListModel::ColorListModel(QObject *parent) + : QAbstractItemModel(parent) + { diff --git a/scribus.spec b/scribus.spec index 32ec287..ed42c2e 100644 --- a/scribus.spec +++ b/scribus.spec @@ -14,7 +14,7 @@ Source0: %{name}-%{version}-free.tar.xz #Source0: http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz #Source1: http://downloads.sourceforge.net/%%{name}/%%{name}-%%{version}.tar.xz.asc -#Patch0: scribus-ctorfix.patch +Patch0: scribus-ctorfix.patch BuildRequires: boost-devel BuildRequires: cmake