From c19e0faee2b254c457903e311f9997735ae63038 Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Fri, 25 Mar 2022 18:28:08 -0700 Subject: [PATCH 1/8] poppler: update to 22.03.0 --- common/shlibs | 2 +- srcpkgs/poppler/patches/fix-cflags.patch | 21 --------------------- srcpkgs/poppler/template | 12 ++++++++---- 3 files changed, 9 insertions(+), 26 deletions(-) delete mode 100644 srcpkgs/poppler/patches/fix-cflags.patch diff --git a/common/shlibs b/common/shlibs index 7d323593a120..5fd53def3e64 100644 --- a/common/shlibs +++ b/common/shlibs @@ -346,7 +346,7 @@ libMagickCore-6.Q16.so.7 libmagick6-6.9.11.61_1 libMagickWand-6.Q16.so.7 libmagick6-6.9.11.61_1 libMagick++-6.Q16.so.9 libmagick6-6.9.12.1_1 libltdl.so.7 libltdl-2.2.6_1 -libpoppler.so.111 libpoppler-21.07.0_1 +libpoppler.so.119 libpoppler-22.03.0_1 libpoppler-glib.so.8 poppler-glib-0.18.2_1 libpoppler-cpp.so.0 poppler-cpp-0.18.2_1 libpoppler-qt5.so.1 poppler-qt5-0.31.0_1 diff --git a/srcpkgs/poppler/patches/fix-cflags.patch b/srcpkgs/poppler/patches/fix-cflags.patch deleted file mode 100644 index f1a408d03cce..000000000000 --- a/srcpkgs/poppler/patches/fix-cflags.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake -index fe1182d..6013bd2 100644 ---- a/cmake/modules/PopplerMacros.cmake -+++ b/cmake/modules/PopplerMacros.cmake -@@ -104,14 +104,14 @@ if(CMAKE_COMPILER_IS_GNUCXX) - set(DEFAULT_COMPILE_WARNINGS_EXTRA "${_warn} ${_warnx}") - - set(_save_cxxflags "${CMAKE_CXX_FLAGS}") -- set(CMAKE_CXX_FLAGS "-fno-exceptions -fno-check-new -fno-common -fno-operator-names -D_DEFAULT_SOURCE") -+ set(CMAKE_CXX_FLAGS "-fno-exceptions -fno-check-new -fno-common -fno-operator-names -D_DEFAULT_SOURCE ${_save_cxxflags}") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cxxflags}") - set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${_save_cxxflags}") - set(CMAKE_CXX_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cxxflags}") - set(CMAKE_CXX_FLAGS_DEBUGFULL "-g3 -fno-inline ${_save_cxxflags}") - set(CMAKE_CXX_FLAGS_PROFILE "-g3 -fno-inline -ftest-coverage -fprofile-arcs ${_save_cxxflags}") - set(_save_cflags "${CMAKE_C_FLAGS}") -- set(CMAKE_C_FLAGS "-std=c99 -D_DEFAULT_SOURCE") -+ set(CMAKE_C_FLAGS "-std=c99 -D_DEFAULT_SOURCE ${_save_cflags}") - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g ${_save_cflags}") - set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG ${_save_cflags}") - set(CMAKE_C_FLAGS_DEBUG "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline ${_save_cflags}") diff --git a/srcpkgs/poppler/template b/srcpkgs/poppler/template index 0aa4edf20b57..2b44ee8dfc66 100644 --- a/srcpkgs/poppler/template +++ b/srcpkgs/poppler/template @@ -3,13 +3,15 @@ # THIS PKG MUST BE SYNCHRONIZED WITH "srcpkgs/poppler-qt5". # pkgname=poppler -version=21.07.0 +version=22.03.0 revision=1 +_testVersion=0762e0144143e680e24ec8d4c34c46c3716b8713 build_style=cmake build_helper="gir" configure_args="-DENABLE_UNSTABLE_API_ABI_HEADERS=ON -DENABLE_CPP=ON -DENABLE_GLIB=ON -DENABLE_GOBJECT_INTROSPECTION=$(vopt_if gir ON OFF) - -DENABLE_QT5=OFF -DENABLE_UTILS=ON -DENABLE_BOOST=$(vopt_if boost ON OFF)" + -DENABLE_QT5=OFF -DENABLE_UTILS=ON -DENABLE_BOOST=$(vopt_if boost ON OFF) + -DCMAKE_BUILD_TYPE=RELEASE -DTESTDATADIR='${XBPS_BUILDDIR}/test-${_testVersion}'" hostmakedepends="pkg-config glib-devel" makedepends="libpng-devel libglib-devel cairo-devel tiff-devel lcms2-devel libcurl-devel libopenjpeg2-devel $(vopt_if boost boost-devel)" @@ -17,8 +19,10 @@ short_desc="PDF rendering library" maintainer="Orphaned " license="GPL-2.0-or-later, GPL-3.0-or-later" homepage="https://poppler.freedesktop.org" -distfiles="${homepage}/${pkgname}-${version}.tar.xz" -checksum=e26ab29f68065de4d6562f0a3e2b5435a83ca92be573b99a1c81998fa286a4d4 +distfiles="${homepage}/${pkgname}-${version}.tar.xz + https://gitlab.freedesktop.org/poppler/test/-/archive/${_testVersion}/test-${_testVersion}.tar.gz" +checksum="728c78ba94d75a55f6b6355d4fbdaa6f49934d9616be58e5e679a9cfd0980e1e + 21401040d5ccf05e9ed85c09a5de225d05b270f8ba75921af8ff67114f2313a6" build_options="gir boost" build_options_default="gir boost" From 6c60deccadbb890cb316a48d6026b6569c7b2bd3 Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Fri, 25 Mar 2022 18:29:02 -0700 Subject: [PATCH 2/8] poppler-qt5: update to 22.03.0 --- srcpkgs/poppler-qt5/patches | 1 - srcpkgs/poppler-qt5/template | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) delete mode 120000 srcpkgs/poppler-qt5/patches diff --git a/srcpkgs/poppler-qt5/patches b/srcpkgs/poppler-qt5/patches deleted file mode 120000 index 636e4ac2cbd9..000000000000 --- a/srcpkgs/poppler-qt5/patches +++ /dev/null @@ -1 +0,0 @@ -../poppler/patches \ No newline at end of file diff --git a/srcpkgs/poppler-qt5/template b/srcpkgs/poppler-qt5/template index 2a15f56128c1..000e3387b5bc 100644 --- a/srcpkgs/poppler-qt5/template +++ b/srcpkgs/poppler-qt5/template @@ -4,12 +4,13 @@ # IT IS SPLIT TO AVOID A CYCLIC DEPENDENCY: qt5 -> cups -> poppler -> qt5. # pkgname=poppler-qt5 -version=21.07.0 +version=22.03.0 revision=1 wrksrc="poppler-${version}" build_style=cmake configure_args="-DENABLE_UNSTABLE_API_ABI_HEADERS=ON -DENABLE_GLIB=OFF - -DENABLE_QT5=ON -DENABLE_UTILS=OFF -DENABLE_CPP=OFF -DENABLE_BOOST=OFF" + -DENABLE_QT5=ON -DENABLE_UTILS=OFF -DENABLE_CPP=OFF -DENABLE_BOOST=OFF + -DCMAKE_BUILD_TYPE=RELEASE" hostmakedepends="pkg-config qt5-devel" makedepends="libpng-devel tiff-devel lcms2-devel libcurl-devel fontconfig-devel cairo-devel libopenjpeg2-devel qt5-devel" @@ -18,7 +19,7 @@ maintainer="Orphaned " license="GPL-2.0-or-later, GPL-3.0-or-later" homepage="https://poppler.freedesktop.org" distfiles="${homepage}/poppler-${version}.tar.xz" -checksum=e26ab29f68065de4d6562f0a3e2b5435a83ca92be573b99a1c81998fa286a4d4 +checksum=728c78ba94d75a55f6b6355d4fbdaa6f49934d9616be58e5e679a9cfd0980e1e # fails to find a bunch of files make_check=no From 159ab174b864abc7862d770b9e474321543d898b Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Fri, 25 Mar 2022 18:29:32 -0700 Subject: [PATCH 3/8] poppler-data: update to 0.4.11 --- srcpkgs/poppler-data/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/poppler-data/template b/srcpkgs/poppler-data/template index 48dba2497fb6..4b6e956b7b72 100644 --- a/srcpkgs/poppler-data/template +++ b/srcpkgs/poppler-data/template @@ -1,13 +1,13 @@ # Template file for 'poppler-data' pkgname=poppler-data -version=0.4.10 +version=0.4.11 revision=1 short_desc="Encoding data for the poppler PDF rendering library" maintainer="Orphaned " license="MIT, GPL-2.0-or-later, BSD-3-Clause" homepage="https://poppler.freedesktop.org/" distfiles="https://poppler.freedesktop.org/${pkgname}-${version}.tar.gz" -checksum=6e2fcef66ec8c44625f94292ccf8af9f1d918b410d5aa69c274ce67387967b30 +checksum=2cec05cd1bb03af98a8b06a1e22f6e6e1a65b1e2f3816cb3069bb0874825f08c do_install() { make prefix=/usr DESTDIR=${DESTDIR} install From 0e099c55d06326db279ea4ff456ae6e8b33caaa9 Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Fri, 25 Mar 2022 18:33:32 -0700 Subject: [PATCH 4/8] calligra: rebuild against libpoppler 22.03.0 --- .../patches/0001-Fix-some-more-warnings.patch | 440 ++++++++++++++++++ .../0002-Make-show-hidden-row-s-work.patch | 29 ++ srcpkgs/calligra/patches/c++17.patch | 16 + .../patches/poppler-22.03.0-fix.patch | 22 + srcpkgs/calligra/template | 2 +- 5 files changed, 508 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/calligra/patches/0001-Fix-some-more-warnings.patch create mode 100644 srcpkgs/calligra/patches/0002-Make-show-hidden-row-s-work.patch create mode 100644 srcpkgs/calligra/patches/c++17.patch create mode 100644 srcpkgs/calligra/patches/poppler-22.03.0-fix.patch diff --git a/srcpkgs/calligra/patches/0001-Fix-some-more-warnings.patch b/srcpkgs/calligra/patches/0001-Fix-some-more-warnings.patch new file mode 100644 index 000000000000..6cc132925b16 --- /dev/null +++ b/srcpkgs/calligra/patches/0001-Fix-some-more-warnings.patch @@ -0,0 +1,440 @@ +From 068cd9aec11052733e393976142516d2190e4564 Mon Sep 17 00:00:00 2001 +From: Pierre Ducroquet +Date: Sun, 28 Feb 2021 23:23:02 +0100 +Subject: [PATCH] Fix some more warnings + +--- + filters/libmsooxml/MsooXmlDiagramReader_p.cpp | 1 + + filters/sheets/csv/csvimport.cc | 2 +- + filters/sheets/excel/sidewinder/excel.cpp | 1 + + filters/sheets/excel/sidewinder/formulas.cpp | 2 +- + filters/sheets/gnumeric/gnumericexport.cc | 5 ++--- + filters/sheets/html/htmlexport.cc | 2 -- + filters/sheets/latex/export/latexexport.cc | 1 - + filters/sheets/latex/export/table.cc | 1 + + filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp | 1 - + filters/stage/pptx/PptxXmlDocumentReader.cpp | 2 +- + filters/words/msword-odf/texthandler.cpp | 2 ++ + filters/words/msword-odf/wv2/src/parser9x.cpp | 4 +++- + filters/words/msword-odf/wv2/src/styles.cpp | 4 +--- + filters/words/msword-odf/wv2/src/styles.h | 11 ++++++++--- + gemini/lib/GeminiMainWindow.cpp | 2 ++ + libs/pageapp/KoPAOdfPageSaveHelper.cpp | 2 +- + plugins/spacenavigator/SpaceNavigatorDevice.h | 6 ++---- + plugins/spacenavigator/SpaceNavigatorEvent.h | 2 +- + plugins/spacenavigator/SpaceNavigatorPollingThread.h | 3 +-- + plugins/vectorshape/VectorShape.cpp | 1 + + sheets/functions/datetime.cpp | 1 + + sheets/part/Digest.cpp | 8 ++++---- + sheets/shape/TableToolFactory.h | 2 +- + sheets/tests/TestSort.cpp | 4 ++-- + 24 files changed, 38 insertions(+), 32 deletions(-) + +diff --git a/filters/libmsooxml/MsooXmlDiagramReader_p.cpp b/filters/libmsooxml/MsooXmlDiagramReader_p.cpp +index 14b08531262..14fc6ab9a71 100644 +--- a/filters/libmsooxml/MsooXmlDiagramReader_p.cpp ++++ b/filters/libmsooxml/MsooXmlDiagramReader_p.cpp +@@ -872,6 +872,7 @@ void LayoutNodeAtom::finishBuild(Context* context) { + case AlgorithmAtom::UnknownAlg: + warnMsooXml << "Layout with name=" << m_name << "defines an unknown algorithm."; + // fall through and use the composite-algorithm ++ // fall through + case AlgorithmAtom::CompositeAlg: m_algorithmImpl = new CompositeAlgorithm; break; + case AlgorithmAtom::ConnectorAlg: m_algorithmImpl = new ConnectorAlgorithm; break; + case AlgorithmAtom::CycleAlg: m_algorithmImpl = new CycleAlgorithm; break; +diff --git a/filters/sheets/csv/csvimport.cc b/filters/sheets/csv/csvimport.cc +index 89fb7162e00..1008d186f18 100644 +--- a/filters/sheets/csv/csvimport.cc ++++ b/filters/sheets/csv/csvimport.cc +@@ -97,8 +97,8 @@ KoFilter::ConversionStatus CSVFilter::convert(const QByteArray& from, const QByt + return KoFilter::FileNotFound; + } + +- QString csv_delimiter; + // ###### FIXME: disabled for now ++ //QString csv_delimiter; + //if (!config.isNull()) + // csv_delimiter = config[0]; + +diff --git a/filters/sheets/excel/sidewinder/excel.cpp b/filters/sheets/excel/sidewinder/excel.cpp +index ab592225ca6..7fa5633d433 100644 +--- a/filters/sheets/excel/sidewinder/excel.cpp ++++ b/filters/sheets/excel/sidewinder/excel.cpp +@@ -2449,6 +2449,7 @@ bool ExcelReader::load(Workbook* workbook, const char* filename) + } else { + bytes_read = combObjStream->read( buffer, markerOrLength ); + QString ansiString = readByteString(buffer, markerOrLength); ++ Q_UNUSED(ansiString); + //TODO... + //printf( "markerOrLength=%i ansiString=%s\n",markerOrLength,ansiString.ascii() ); + } +diff --git a/filters/sheets/excel/sidewinder/formulas.cpp b/filters/sheets/excel/sidewinder/formulas.cpp +index 62747469a49..0132d39e024 100644 +--- a/filters/sheets/excel/sidewinder/formulas.cpp ++++ b/filters/sheets/excel/sidewinder/formulas.cpp +@@ -1513,7 +1513,7 @@ static void mergeTokens(UStringStack* stack, unsigned count, const QString &merg + if (!stack) return; + if (stack->size() < count) return; + +- QString s1, s2; ++ QString s1; + + while (count) { + count--; +diff --git a/filters/sheets/gnumeric/gnumericexport.cc b/filters/sheets/gnumeric/gnumericexport.cc +index 1256c68bc74..2468548edb3 100644 +--- a/filters/sheets/gnumeric/gnumericexport.cc ++++ b/filters/sheets/gnumeric/gnumericexport.cc +@@ -1293,15 +1293,13 @@ KoFilter::ConversionStatus GNUMERICExport::convert(const QByteArray& from, const + i = 0; + } + +- QString line; + for (int currentcolumn = 1; currentcolumn <= iMaxColumn; currentcolumn++) { + QDomElement cell_contents; + Cell cell(table, currentcolumn, currentrow); + +- QString text, style; ++ QString text; + QDomDocument domLink; + QDomElement domRoot; +- QDomNode domNode; + QDomNodeList childNodes; + + if (!cell.isDefault() && !cell.isEmpty()) { +@@ -1342,6 +1340,7 @@ KoFilter::ConversionStatus GNUMERICExport::convert(const QByteArray& from, const + text = domNode.toElement().text(); + + while (!domNode.isNull()) { ++ QString style; + style = domNode.toElement().tagName(); + + if (style == "b") +diff --git a/filters/sheets/html/htmlexport.cc b/filters/sheets/html/htmlexport.cc +index 2d116e0608c..bf41a6f743e 100644 +--- a/filters/sheets/html/htmlexport.cc ++++ b/filters/sheets/html/htmlexport.cc +@@ -242,7 +242,6 @@ void HTMLExport::convertSheet(Sheet *sheet, QString &str, int iMaxUsedRow, int i + i = 0; + } + +- QString separators; + QString line; + unsigned int nonempty_cells = 0; + +@@ -435,7 +434,6 @@ void HTMLExport::detectFilledCells(Sheet *sheet, int &rows, int &columns) + int iUsedColumn = 0; + for (int currentcolumn = 1 ; currentcolumn <= iMaxColumn ; currentcolumn++) { + cell = Cell(sheet, currentcolumn, currentrow); +- QString text; + if (!cell.isDefault() && !cell.isEmpty()) { + iUsedColumn = currentcolumn; + } +diff --git a/filters/sheets/latex/export/latexexport.cc b/filters/sheets/latex/export/latexexport.cc +index 8d0698a3420..4f8caf235d9 100644 +--- a/filters/sheets/latex/export/latexexport.cc ++++ b/filters/sheets/latex/export/latexexport.cc +@@ -38,7 +38,6 @@ LATEXExport::LATEXExport(QObject* parent, const QVariantList&) : + + KoFilter::ConversionStatus LATEXExport::convert(const QByteArray& from, const QByteArray& to) + { +- QString config; + + if (to != "text/x-tex" || from != "application/x-kspread") + return KoFilter::NotImplemented; +diff --git a/filters/sheets/latex/export/table.cc b/filters/sheets/latex/export/table.cc +index 8d8b6701a39..e58827dfbc7 100644 +--- a/filters/sheets/latex/export/table.cc ++++ b/filters/sheets/latex/export/table.cc +@@ -118,6 +118,7 @@ void Table::analyzePaper(const QDomNode node) + + /* borders */ + QDomNode border = getChild(node, "borders"); ++ Q_UNUSED(border); + setBorderRight(getAttr(node, "right").toLong()); + setBorderLeft(getAttr(node, "left").toLong()); + setBorderBottom(getAttr(node, "bottom").toLong()); +diff --git a/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp b/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp +index 782a5914729..eda8ffc6b47 100644 +--- a/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp ++++ b/filters/sheets/xlsx/XlsxXmlWorksheetReader.cpp +@@ -872,7 +872,6 @@ KoFilter::ConversionStatus XlsxXmlWorksheetReader::read_conditionalFormatting() + while (index < m_conditionalIndices.size()) { + QString conditionalArea; + Condition examinedCondition = m_conditionalIndices.at(index); +- QString sqrefOriginal = sqref; + int areaIndex = 0; + Condition previousCond; + +diff --git a/filters/stage/pptx/PptxXmlDocumentReader.cpp b/filters/stage/pptx/PptxXmlDocumentReader.cpp +index 4cf86aea8c8..11b5ad266b9 100644 +--- a/filters/stage/pptx/PptxXmlDocumentReader.cpp ++++ b/filters/stage/pptx/PptxXmlDocumentReader.cpp +@@ -316,7 +316,7 @@ KoFilter::ConversionStatus PptxXmlDocumentReader::read_sldId() + + QString slideMasterPath, slideMasterFile; + MSOOXML::Utils::splitPathAndFile(m_context->relationships->targetForType(slidePath, slideFile, QLatin1String(MSOOXML::Schemas::officeDocument::relationships) + "/slideLayout"), &slideMasterPath, &slideMasterFile); +- const QString slideMasterPathAndFile = m_context->relationships->targetForType(slideMasterPath, slideMasterFile, QLatin1String(MSOOXML::Schemas::officeDocument::relationships) + "/slideMaster"); ++ // const QString slideMasterPathAndFile = m_context->relationships->targetForType(slideMasterPath, slideMasterFile, QLatin1String(MSOOXML::Schemas::officeDocument::relationships) + "/slideMaster"); + + // Delay the reading of a tableStyle until we find a table as we need the + // clrMap from the master slide +diff --git a/filters/words/msword-odf/texthandler.cpp b/filters/words/msword-odf/texthandler.cpp +index e167d86e028..89ef678961a 100644 +--- a/filters/words/msword-odf/texthandler.cpp ++++ b/filters/words/msword-odf/texthandler.cpp +@@ -408,6 +408,7 @@ void WordsTextHandler::footnoteFound(wvWare::FootnoteData data, + } + case msonfcUCLetter: + letter = 'A'; ++ // fall through + case msonfcLCLetter: + { + while (noteNumber / 25 > 0) { +@@ -1064,6 +1065,7 @@ void WordsTextHandler::fieldStart(const wvWare::FLD* fld, wvWare::SharedPtrm_type = UNSUPPORTED; +diff --git a/filters/words/msword-odf/wv2/src/parser9x.cpp b/filters/words/msword-odf/wv2/src/parser9x.cpp +index 9a6d1606ce9..e5d7d14691c 100644 +--- a/filters/words/msword-odf/wv2/src/parser9x.cpp ++++ b/filters/words/msword-odf/wv2/src/parser9x.cpp +@@ -581,7 +581,8 @@ void Parser9x::processPiece( String* string, U32 fc, U32 limit, const Position& + // same ASCII code as TTP_MARK (0x0007), NOTE: table depth == 1 + case CELL_MARK: + m_cellMarkFound = true; +- // Fall-through intended. A row/cell end is also a paragraph end. ++ // A row/cell end is also a paragraph end. ++ // fall through + case PARAGRAPH_MARK: + { + // No "index - start + 1" here, as we don't want to copy the +@@ -1064,6 +1065,7 @@ void Parser9x::emitSpecialCharacter( UChar character, U32 globalCP, SharedPtrtell(); // address where the STD starts +@@ -938,7 +936,7 @@ void Style::mergeUpechpx( const Style* parentStyle, WordVersion version ) + } + + +-StyleSheet::StyleSheet( OLEStreamReader* tableStream, U32 fcStshf, U32 lcbStshf ) throw(InvalidFormatException) ++StyleSheet::StyleSheet( OLEStreamReader* tableStream, U32 fcStshf, U32 lcbStshf ) + : m_udsNum(0) + { + WordVersion version = Word8; +diff --git a/filters/words/msword-odf/wv2/src/styles.h b/filters/words/msword-odf/wv2/src/styles.h +index ba02def6845..41c8278dd21 100644 +--- a/filters/words/msword-odf/wv2/src/styles.h ++++ b/filters/words/msword-odf/wv2/src/styles.h +@@ -58,8 +58,9 @@ struct STD + STD(); + /** + * Simply calls read(...) ++ * @throw InvalidFormatException + */ +- STD( U16 stdfSize, U16 totalSize, OLEStreamReader* stream, bool preservePos = false ) throw(InvalidFormatException); ++ STD( U16 stdfSize, U16 totalSize, OLEStreamReader* stream, bool preservePos = false ); + /** + * Attention: This struct allocates memory on the heap + */ +@@ -74,8 +75,9 @@ struct STD + * false the state of stream will be changed! + * + * @return true - success, false - failed ++ * @throw InvalidFormatException + */ +- bool read( const U16 cbStd, const U16 stdfSize, OLEStreamReader* stream, bool preservePos = false ) throw(InvalidFormatException); ++ bool read( const U16 cbStd, const U16 stdfSize, OLEStreamReader* stream, bool preservePos = false ); + + /** + * Same as reading :) +@@ -365,7 +367,10 @@ class WV2_EXPORT Style + class WV2_EXPORT StyleSheet + { + public: +- StyleSheet( OLEStreamReader* tableStream, U32 fcStshf, U32 lcbStshf ) throw(InvalidFormatException); ++ /** ++ * @throw InvalidFormatException ++ */ ++ StyleSheet( OLEStreamReader* tableStream, U32 fcStshf, U32 lcbStshf ); + ~StyleSheet(); + + /** +diff --git a/gemini/lib/GeminiMainWindow.cpp b/gemini/lib/GeminiMainWindow.cpp +index 3d05f6461e0..eb5f120c0f7 100644 +--- a/gemini/lib/GeminiMainWindow.cpp ++++ b/gemini/lib/GeminiMainWindow.cpp +@@ -136,8 +136,10 @@ void GeminiMainWindow::setFullScreen(bool newState) + } + + ++ + void GeminiMainWindow::changeState(GeminiMainWindow::GeminiState newState, bool lockNewState) + { ++ Q_UNUSED(lockNewState); + d->syncObject = new GeminiModeSynchronisationObject; + + if(centralWidget()) { +diff --git a/libs/pageapp/KoPAOdfPageSaveHelper.cpp b/libs/pageapp/KoPAOdfPageSaveHelper.cpp +index 92c6dfd4cb4..068501c8af1 100644 +--- a/libs/pageapp/KoPAOdfPageSaveHelper.cpp ++++ b/libs/pageapp/KoPAOdfPageSaveHelper.cpp +@@ -49,7 +49,7 @@ KoPAOdfPageSaveHelper::KoPAOdfPageSaveHelper( KoPADocument * doc, QList( page ); + masterPages.insert( p->masterPage() ); + } +- m_masterPages = masterPages.toList(); ++ m_masterPages = masterPages.values(); + } + } + +diff --git a/plugins/spacenavigator/SpaceNavigatorDevice.h b/plugins/spacenavigator/SpaceNavigatorDevice.h +index b9056ac98c1..ecd696e415f 100644 +--- a/plugins/spacenavigator/SpaceNavigatorDevice.h ++++ b/plugins/spacenavigator/SpaceNavigatorDevice.h +@@ -31,10 +31,8 @@ class SpaceNavigatorDevice : public KoInputDeviceHandler + explicit SpaceNavigatorDevice(QObject *parent); + virtual ~SpaceNavigatorDevice(); + +- /// reimplemented from KoInputDeviceHandler +- virtual bool start(); +- /// reimplemented from KoInputDeviceHandler +- virtual bool stop(); ++ virtual bool start() override; ++ virtual bool stop() override; + private Q_SLOTS: + void slotMoveEvent( int x, int y, int z, int rx, int ry, int rz, Qt::MouseButtons ); + void slotButtonEvent( int x, int y, int z, int rx, int ry, int rz, Qt::MouseButtons, Qt::MouseButton, int type ); +diff --git a/plugins/spacenavigator/SpaceNavigatorEvent.h b/plugins/spacenavigator/SpaceNavigatorEvent.h +index 73751ec88ff..76ee8e2f880 100644 +--- a/plugins/spacenavigator/SpaceNavigatorEvent.h ++++ b/plugins/spacenavigator/SpaceNavigatorEvent.h +@@ -33,7 +33,7 @@ class SpaceNavigatorEvent : public KoInputDeviceHandlerEvent + void setPosition( int x, int y, int z ); + void setRotation( int rx, int ry, int rz ); + +- virtual KoPointerEvent * pointerEvent(); ++ virtual KoPointerEvent * pointerEvent() override; + + private: + int m_x, m_y, m_z; +diff --git a/plugins/spacenavigator/SpaceNavigatorPollingThread.h b/plugins/spacenavigator/SpaceNavigatorPollingThread.h +index 62c4de8ab73..67d59177021 100644 +--- a/plugins/spacenavigator/SpaceNavigatorPollingThread.h ++++ b/plugins/spacenavigator/SpaceNavigatorPollingThread.h +@@ -39,8 +39,7 @@ class SpaceNavigatorPollingThread : public QThread + + protected: + +- /// reimplemented from QThread +- virtual void run(); ++ virtual void run() override; + + private: + bool m_stopped; +diff --git a/plugins/vectorshape/VectorShape.cpp b/plugins/vectorshape/VectorShape.cpp +index a25ab3fc561..9acbd251c94 100644 +--- a/plugins/vectorshape/VectorShape.cpp ++++ b/plugins/vectorshape/VectorShape.cpp +@@ -294,6 +294,7 @@ void VectorShape::saveOdf(KoShapeSavingContext & context) const + break; + case VectorTypeSvg: + mimeType = "image/svg+xml"; ++ break; + default: + // FIXME: What here? + mimeType = "application/x-what"; +diff --git a/sheets/functions/datetime.cpp b/sheets/functions/datetime.cpp +index 9f59fe2cf75..6157b0996c1 100644 +--- a/sheets/functions/datetime.cpp ++++ b/sheets/functions/datetime.cpp +@@ -597,6 +597,7 @@ Value func_currentDate(valVector, ValueCalc * calc, FuncExtra *) + // Function: CURRENTTIME + Value func_currentTime(valVector, ValueCalc * calc, FuncExtra *) + { ++ Q_UNUSED(calc); + return Value(QTime::currentTime()); + } + +diff --git a/sheets/part/Digest.cpp b/sheets/part/Digest.cpp +index 8cd972db989..e9246ce6e7d 100644 +--- a/sheets/part/Digest.cpp ++++ b/sheets/part/Digest.cpp +@@ -596,10 +596,10 @@ static void __rtl_digest_endSHA(DigestContextSHA *ctx) + } + + switch (ctx->m_nDatLen & 0x03) { +- case 0: X[i] = ((sal_uInt32)(*(p++))) << 0L; +- case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8L; +- case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16L; +- case 3: X[i] |= ((sal_uInt32)(*(p++))) << 24L; ++ case 0: X[i] = ((sal_uInt32)(*(p++))) << 0L; /* fall through */ ++ case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8L; /* fall through */ ++ case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16L; /* fall through */ ++ case 3: X[i] |= ((sal_uInt32)(*(p++))) << 24L; /* fall through */ + } + + __rtl_digest_swapLong(X, i + 1); +diff --git a/sheets/shape/TableToolFactory.h b/sheets/shape/TableToolFactory.h +index 679bfe14b8e..9412d8ffdc5 100644 +--- a/sheets/shape/TableToolFactory.h ++++ b/sheets/shape/TableToolFactory.h +@@ -34,7 +34,7 @@ class TableToolFactory : public KoToolFactoryBase + TableToolFactory(); + ~TableToolFactory(); + +- KoToolBase* createTool(KoCanvasBase* canvas); ++ KoToolBase* createTool(KoCanvasBase* canvas) override; + }; + + } // namespace Sheets +diff --git a/sheets/tests/TestSort.cpp b/sheets/tests/TestSort.cpp +index b3f1e35169d..6354d79abc5 100644 +--- a/sheets/tests/TestSort.cpp ++++ b/sheets/tests/TestSort.cpp +@@ -68,7 +68,7 @@ void TestSort::AscendingOrder() + command->setSheet(sheet); + + // Parameters. +- command->setSortRows(Qt::Vertical); ++ command->setSortRows(true); + command->setSkipFirst(false); + command->setCopyFormat(false); + +@@ -121,7 +121,7 @@ void TestSort::DescendingOrder() + command->setSheet(sheet); + + // Parameters. +- command->setSortRows(Qt::Vertical); ++ command->setSortRows(true); + command->setSkipFirst(false); + command->setCopyFormat(false); + diff --git a/srcpkgs/calligra/patches/0002-Make-show-hidden-row-s-work.patch b/srcpkgs/calligra/patches/0002-Make-show-hidden-row-s-work.patch new file mode 100644 index 000000000000..d4b082b9a0f1 --- /dev/null +++ b/srcpkgs/calligra/patches/0002-Make-show-hidden-row-s-work.patch @@ -0,0 +1,29 @@ +From 22e02998dec8af15a25b7e8e3d53c174810cc3be Mon Sep 17 00:00:00 2001 +From: Dag Andersen +Date: Thu, 11 Jun 2020 10:43:38 +0200 +Subject: [PATCH] Make show hidden row(s) work + +Check for hidden rows was inverted to check for shown rows, +hence hidden rows would never be unhidden. + +BUG:338816 +BUG:354236 +FIXED-IN:3.2.2 +(cherry picked from commit 28920c50e6300d643477f256aba91c8c51836682) +--- + sheets/commands/RowColumnManipulators.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sheets/commands/RowColumnManipulators.cpp b/sheets/commands/RowColumnManipulators.cpp +index 95282d6e31b..25e8c454e27 100644 +--- a/sheets/commands/RowColumnManipulators.cpp ++++ b/sheets/commands/RowColumnManipulators.cpp +@@ -192,7 +192,7 @@ bool HideShowManipulator::preProcessing() + } + } + for (int row = range.top(); row <= range.bottom(); ++row) { +- if (!m_sheet->rowFormats()->isHidden(row)) { ++ if (m_sheet->rowFormats()->isHidden(row)) { + region.add(QRect(1, row, KS_colMax, 1)); + } + } diff --git a/srcpkgs/calligra/patches/c++17.patch b/srcpkgs/calligra/patches/c++17.patch new file mode 100644 index 000000000000..1db8385161a3 --- /dev/null +++ b/srcpkgs/calligra/patches/c++17.patch @@ -0,0 +1,16 @@ +diff -Naur CMakeLists.txt.orig CMakeLists.txt +--- a/CMakeLists.txt.orig ++++ b/CMakeLists.txt +@@ -106,9 +106,9 @@ + + # use CPP-11 + if (CMAKE_VERSION VERSION_LESS "3.1") +- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + else () +- set (CMAKE_CXX_STANDARD 11) ++ set (CMAKE_CXX_STANDARD 17) + endif () + + ############ + diff --git a/srcpkgs/calligra/patches/poppler-22.03.0-fix.patch b/srcpkgs/calligra/patches/poppler-22.03.0-fix.patch new file mode 100644 index 000000000000..eeb148d06b64 --- /dev/null +++ b/srcpkgs/calligra/patches/poppler-22.03.0-fix.patch @@ -0,0 +1,22 @@ +--- a/filters/karbon/pdf/Pdf2OdgImport.cpp.orig ++++ b/filters/karbon/pdf/Pdf2OdgImport.cpp +@@ -87,7 +87,7 @@ + return KoFilter::NotImplemented; + + GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); +- PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); ++ PDFDoc * pdfDoc = new PDFDoc(std::make_unique(fname)); + if (! pdfDoc) { + #ifdef HAVE_POPPLER_PRE_0_83 + delete globalParams; +--- a/filters/karbon/pdf/PdfImport.cpp.orig ++++ b/filters/karbon/pdf/PdfImport.cpp +@@ -74,7 +74,7 @@ + return KoFilter::NotImplemented; + + GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); +- PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); ++ PDFDoc * pdfDoc = new PDFDoc(std::make_unique(fname)); + if (! pdfDoc) { + #ifdef HAVE_POPPLER_PRE_0_83 + delete globalParams; diff --git a/srcpkgs/calligra/template b/srcpkgs/calligra/template index 89d0b1648e9e..7c1411bf3da6 100644 --- a/srcpkgs/calligra/template +++ b/srcpkgs/calligra/template @@ -1,7 +1,7 @@ # Template file for 'calligra' pkgname=calligra version=3.2.1 -revision=6 +revision=7 build_style=cmake configure_args="-Wno-dev -DCALLIGRA_SHOULD_BUILD_UNMAINTAINED=ON -DBUILD_TESTING=OFF" From bc81396e81b19fe2db11efea1089429f0c78c6dd Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Fri, 25 Mar 2022 18:34:07 -0700 Subject: [PATCH 5/8] inkscape: rebuild against libpoppler 22.03.0 --- ...ibility-with-Poppler-22.03-and-later.patch | 50 +++++++++++++++++++ .../Fix-build-with-poppler-21.11.0.patch | 29 +++++++++++ srcpkgs/inkscape/template | 2 +- 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/inkscape/patches/Ensure-compatibility-with-Poppler-22.03-and-later.patch create mode 100644 srcpkgs/inkscape/patches/Fix-build-with-poppler-21.11.0.patch diff --git a/srcpkgs/inkscape/patches/Ensure-compatibility-with-Poppler-22.03-and-later.patch b/srcpkgs/inkscape/patches/Ensure-compatibility-with-Poppler-22.03-and-later.patch new file mode 100644 index 000000000000..297ef677665e --- /dev/null +++ b/srcpkgs/inkscape/patches/Ensure-compatibility-with-Poppler-22.03-and-later.patch @@ -0,0 +1,50 @@ +From a18c57ffff313fd08bc8a44f6b6bf0b01d7e9b75 Mon Sep 17 00:00:00 2001 +From: Evangelos Foutras +Date: Sun, 20 Mar 2022 22:41:51 -0300 +Subject: [PATCH] Ensure compatibility with Poppler 22.03 and later + +This change ensures that Inkscape will build against Poppler 22.03 after +the changes that were made to the constructor of `PDFDoc`. + +See: https://gitlab.freedesktop.org/poppler/poppler/-/commit/4f2abd3ef + +Co-authored-by: Rafael Siejakowski +--- + src/extension/internal/pdfinput/pdf-input.cpp | 3 +-- + src/extension/internal/pdfinput/poppler-transition-api.h | 6 ++++++ + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp +index 3dabc94ba2..079b0dc713 100644 +--- a/src/extension/internal/pdfinput/pdf-input.cpp ++++ b/src/extension/internal/pdfinput/pdf-input.cpp +@@ -688,8 +688,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { + + // poppler does not use glib g_open. So on win32 we must use unicode call. code was copied from + // glib gstdio.c +- GooString *filename_goo = new GooString(uri); +- pdf_doc = std::make_shared(filename_goo, nullptr, nullptr, nullptr); // TODO: Could ask for password ++ pdf_doc = _POPPLER_MAKE_SHARED_PDFDOC(uri); // TODO: Could ask for password + + if (!pdf_doc->isOk()) { + int error = pdf_doc->getErrorCode(); +diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h +index 87a19d4c42..50b617c25c 100644 +--- a/src/extension/internal/pdfinput/poppler-transition-api.h ++++ b/src/extension/internal/pdfinput/poppler-transition-api.h +@@ -14,6 +14,12 @@ + + #include + ++#if POPPLER_CHECK_VERSION(22, 3, 0) ++#define _POPPLER_MAKE_SHARED_PDFDOC(uri) std::make_shared(std::make_unique(uri)) ++#else ++#define _POPPLER_MAKE_SHARED_PDFDOC(uri) std::make_shared(new GooString(uri), nullptr, nullptr, nullptr) ++#endif ++ + #if POPPLER_CHECK_VERSION(0, 83, 0) + #define _POPPLER_CONST_83 const + #else +-- +GitLab + diff --git a/srcpkgs/inkscape/patches/Fix-build-with-poppler-21.11.0.patch b/srcpkgs/inkscape/patches/Fix-build-with-poppler-21.11.0.patch new file mode 100644 index 000000000000..5d7f4801273d --- /dev/null +++ b/srcpkgs/inkscape/patches/Fix-build-with-poppler-21.11.0.patch @@ -0,0 +1,29 @@ +From 5724c21b9cb7b6176a7b36ca24068b148c817e82 Mon Sep 17 00:00:00 2001 +From: Evangelos Foutras +Date: Mon, 1 Nov 2021 21:45:38 +0200 +Subject: [PATCH] Fix build with poppler 21.11.0 + +GfxFont::tag is now of type std::string instead of GooString *. +--- + src/extension/internal/pdfinput/pdf-parser.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp +index e3d04d544b..feecefa043 100644 +--- a/src/extension/internal/pdfinput/pdf-parser.cpp ++++ b/src/extension/internal/pdfinput/pdf-parser.cpp +@@ -2169,7 +2169,11 @@ void PdfParser::opSetFont(Object args[], int /*numArgs*/) + } + if (printCommands) { + printf(" font: tag=%s name='%s' %g\n", ++#if POPPLER_CHECK_VERSION(21,11,0) ++ font->getTag().c_str(), ++#else + font->getTag()->getCString(), ++#endif + font->getName() ? font->getName()->getCString() : "???", + args[1].getNum()); + fflush(stdout); +-- +GitLab + diff --git a/srcpkgs/inkscape/template b/srcpkgs/inkscape/template index 45f48ccda0dc..4d902e663f73 100644 --- a/srcpkgs/inkscape/template +++ b/srcpkgs/inkscape/template @@ -1,7 +1,7 @@ # Template file for 'inkscape' pkgname=inkscape version=1.1.1 -revision=3 +revision=4 wrksrc="inkscape-${version}_2021-09-20_3bf5ae0d25" build_style=cmake # builds executables then runs checks From 012ceb7940657148feff457ba0fc69109d48496d Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Fri, 25 Mar 2022 18:34:43 -0700 Subject: [PATCH 6/8] ipe: rebuild against libpoppler 22.03.0 --- srcpkgs/ipe/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/ipe/template b/srcpkgs/ipe/template index fbd500a3dc94..62fcfe950504 100644 --- a/srcpkgs/ipe/template +++ b/srcpkgs/ipe/template @@ -1,7 +1,7 @@ # Template file for 'ipe' pkgname=ipe version=7.2.24 -revision=5 +revision=6 _tools_commit=v7.2.20.1 hostmakedepends="pkg-config doxygen qt5-qmake qt5-tools qt5-host-tools" makedepends="cairo-devel gsl-devel libcurl-devel libjpeg-turbo-devel From 2e9fd9d9e5146ed49dea5c6b058a529d53ab1d3b Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Fri, 25 Mar 2022 18:35:30 -0700 Subject: [PATCH 7/8] kitinerary: rebuild against libpoppler 22.03.0 --- srcpkgs/kitinerary/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/kitinerary/template b/srcpkgs/kitinerary/template index aa5ad07fe219..5c36e829f7ae 100644 --- a/srcpkgs/kitinerary/template +++ b/srcpkgs/kitinerary/template @@ -1,7 +1,7 @@ # Template file for 'kitinerary' pkgname=kitinerary version=21.12.3 -revision=1 +revision=2 build_style=cmake hostmakedepends="extra-cmake-modules gettext kcoreaddons pkg-config qt5-host-tools qt5-qmake qt5-tools-devel" makedepends="kcalendarcore-devel kcontacts-devel kdeclarative-devel kmime-devel From 5f612bc951bb86d1825cd78f19c0cf75ad1510b3 Mon Sep 17 00:00:00 2001 From: oreo639 <31916379+Oreo639@users.noreply.github.com> Date: Fri, 25 Mar 2022 18:36:24 -0700 Subject: [PATCH 8/8] scribus: rebuild against libpoppler 22.03.0 --- .../scribus/patches/poppler-22.03.0-fix.patch | 52 +++++++ .../scribus/patches/poppler-22.2.0-fix.patch | 129 ++++++++++++++++++ srcpkgs/scribus/template | 4 +- 3 files changed, 183 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/scribus/patches/poppler-22.03.0-fix.patch create mode 100644 srcpkgs/scribus/patches/poppler-22.2.0-fix.patch diff --git a/srcpkgs/scribus/patches/poppler-22.03.0-fix.patch b/srcpkgs/scribus/patches/poppler-22.03.0-fix.patch new file mode 100644 index 000000000000..f7a0c03fdd96 --- /dev/null +++ b/srcpkgs/scribus/patches/poppler-22.03.0-fix.patch @@ -0,0 +1,52 @@ +From f19410ac3b27e33dd62105746784e61e85b90a1d Mon Sep 17 00:00:00 2001 +From: Jean Ghali +Date: Wed, 2 Mar 2022 22:22:53 +0000 +Subject: [PATCH] #16764: Build break with poppler 22.03.0 + +git-svn-id: svn://scribus.net/trunk/Scribus@24982 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/importpdf.cpp | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp +index 154e58a3f0..392dcd9e64 100644 +--- a/scribus/plugins/import/pdf/importpdf.cpp ++++ b/scribus/plugins/import/pdf/importpdf.cpp +@@ -89,7 +89,11 @@ QImage PdfPlug::readThumbnail(const QString& fName) + #endif + globalParams->setErrQuiet(gTrue); + ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) ++ PDFDoc pdfDoc{ std::make_unique(fname) }; ++#else + PDFDoc pdfDoc{fname, nullptr, nullptr, nullptr}; ++#endif + if (!pdfDoc.isOk() || pdfDoc.getErrorCode() == errEncrypted) + return QImage(); + +@@ -342,7 +346,11 @@ bool PdfPlug::convert(const QString& fn) + globalParams->setErrQuiet(gTrue); + // globalParams->setPrintCommands(gTrue); + QList ocgGroups; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) ++ auto pdfDoc = std::make_unique(std::make_unique(fname)); ++#else + auto pdfDoc = std::unique_ptr(new PDFDoc(fname, nullptr, nullptr, nullptr)); ++#endif + if (pdfDoc) + { + if (pdfDoc->getErrorCode() == errEncrypted) +@@ -361,8 +369,13 @@ bool PdfPlug::convert(const QString& fn) + #else + auto fname = new GooString(QFile::encodeName(fn).data()); + #endif ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0) ++ std::optional userPW(std::in_place, text.toLocal8Bit().data()); ++ pdfDoc.reset(new PDFDoc(std::make_unique(fname), userPW, userPW, nullptr)); ++#else + auto userPW = new GooString(text.toLocal8Bit().data()); + pdfDoc.reset(new PDFDoc(fname, userPW, userPW, nullptr)); ++#endif + qApp->changeOverrideCursor(QCursor(Qt::WaitCursor)); + } + if ((!pdfDoc) || (pdfDoc->getErrorCode() != errNone)) diff --git a/srcpkgs/scribus/patches/poppler-22.2.0-fix.patch b/srcpkgs/scribus/patches/poppler-22.2.0-fix.patch new file mode 100644 index 000000000000..4e0f607c6a07 --- /dev/null +++ b/srcpkgs/scribus/patches/poppler-22.2.0-fix.patch @@ -0,0 +1,129 @@ +From 85c0dff3422fa3c26fbc2e8d8561f597ec24bd92 Mon Sep 17 00:00:00 2001 +From: Jean Ghali +Date: Wed, 2 Feb 2022 23:12:52 +0000 +Subject: [PATCH] #16734: Build break with poppler 22.2.0 + +git-svn-id: svn://scribus.net/trunk/Scribus@24884 11d20701-8431-0410-a711-e3c959e3b870 +--- + scribus/plugins/import/pdf/slaoutput.cpp | 47 +++++++++++++++++++----- + 1 file changed, 37 insertions(+), 10 deletions(-) + +diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp +index 5894bf2ad6..3650c96f52 100644 +--- a/scribus/plugins/import/pdf/slaoutput.cpp ++++ b/scribus/plugins/import/pdf/slaoutput.cpp +@@ -7,6 +7,11 @@ for which a new license (GPL+exception) is in place. + + #include "slaoutput.h" + ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0) ++#include ++#include ++#endif ++ + #include + #include + #include +@@ -3027,18 +3032,24 @@ void SlaOutputDev::markPoint(POPPLER_CONST char *name, Dict *properties) + void SlaOutputDev::updateFont(GfxState *state) + { + GfxFont *gfxFont; +- GfxFontLoc *fontLoc; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0) ++ std::optional fontLoc; ++ const GooString * fileName = nullptr; ++ std::unique_ptr ff; ++#else ++ GfxFontLoc * fontLoc = nullptr; ++ GooString * fileName = nullptr; ++ FoFiTrueType * ff = nullptr; ++#endif + GfxFontType fontType; + SlaOutFontFileID *id; + SplashFontFile *fontFile; + SplashFontSrc *fontsrc = nullptr; +- FoFiTrueType *ff; + Object refObj, strObj; +- GooString *fileName; +- char *tmpBuf; ++ char *tmpBuf = nullptr; + int tmpBufLen = 0; +- int *codeToGID; +- const double *textMat; ++ int *codeToGID = nullptr; ++ const double *textMat = nullptr; + double m11, m12, m21, m22, fontSize; + SplashCoord mat[4]; + int n = 0; +@@ -3046,9 +3057,6 @@ void SlaOutputDev::updateFont(GfxState *state) + SplashCoord matrix[6]; + + m_font = nullptr; +- fileName = nullptr; +- tmpBuf = nullptr; +- fontLoc = nullptr; + + gfxFont = state->getFont(); + if (!gfxFont) +@@ -3083,7 +3091,11 @@ void SlaOutputDev::updateFont(GfxState *state) + } + else + { // gfxFontLocExternal ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0) ++ fileName = fontLoc->pathAsGooString(); ++#else + fileName = fontLoc->path; ++#endif + fontType = fontLoc->fontType; + } + +@@ -3136,9 +3148,14 @@ void SlaOutputDev::updateFont(GfxState *state) + ff = FoFiTrueType::make(tmpBuf, tmpBufLen); + if (ff) + { ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0) ++ codeToGID = ((Gfx8BitFont*) gfxFont)->getCodeToGIDMap(ff.get()); ++ ff.reset(); ++#else + codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff); +- n = 256; + delete ff; ++#endif ++ n = 256; + } + else + { +@@ -3209,8 +3226,13 @@ void SlaOutputDev::updateFont(GfxState *state) + ff = FoFiTrueType::make(tmpBuf, tmpBufLen); + if (! ff) + goto err2; ++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 2, 0) ++ codeToGID = ((GfxCIDFont*) gfxFont)->getCodeToGIDMap(ff.get(), &n); ++ ff.reset(); ++#else + codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n); + delete ff; ++#endif + } + if (!(fontFile = m_fontEngine->loadTrueTypeFont( + id, +@@ -3247,14 +3269,19 @@ void SlaOutputDev::updateFont(GfxState *state) + mat[3] = -m22; + m_font = m_fontEngine->getFont(fontFile, mat, matrix); + ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0) + delete fontLoc; ++#endif + if (fontsrc && !fontsrc->isFile) + fontsrc->unref(); + return; + + err2: + delete id; ++#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(22, 2, 0) + delete fontLoc; ++#endif ++ + err1: + if (fontsrc && !fontsrc->isFile) + fontsrc->unref(); diff --git a/srcpkgs/scribus/template b/srcpkgs/scribus/template index 0ec908f7ef50..125a7d54e4cf 100644 --- a/srcpkgs/scribus/template +++ b/srcpkgs/scribus/template @@ -1,10 +1,10 @@ # Template file for 'scribus' pkgname=scribus version=1.5.8 -revision=1 +revision=2 build_style=cmake configure_args="-DCMAKE_SKIP_RPATH=TRUE -DQT_PREFIX=${XBPS_CROSS_BASE}/usr - -DWANT_GRAPHICSMAGICK=1" + -DWANT_GRAPHICSMAGICK=1 -DWANT_CPP17=ON" hostmakedepends="pkg-config qt5-qmake qt5-host-tools python3" makedepends="qt5-devel qt5-tools-devel zlib-devel cairo-devel lcms2-devel cups-devel libxml2-devel hyphen-devel ghostscript-devel boost-devel