diff --git a/calligra-3.2.1-c++17.patch b/calligra-3.2.1-c++17.patch new file mode 100644 index 0000000..610958e --- /dev/null +++ b/calligra-3.2.1-c++17.patch @@ -0,0 +1,11 @@ +--- calligra-3.2.1/CMakeLists.txt ++++ calligra-3.2.1/CMakeLists.txt +@@ -108,7 +108,7 @@ message(STATUS "Release build: ${RELEASE + if (CMAKE_VERSION VERSION_LESS "3.1") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + else () +- set (CMAKE_CXX_STANDARD 11) ++ set (CMAKE_CXX_STANDARD 17) + endif () + + ############ diff --git a/calligra-3.2.1-poppler-22.08.0-1.patch b/calligra-3.2.1-poppler-22.08.0-1.patch new file mode 100644 index 0000000..ff5539d --- /dev/null +++ b/calligra-3.2.1-poppler-22.08.0-1.patch @@ -0,0 +1,65 @@ +From 236bacbe13739414e919de868283b0caf2df5d8a Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Wed, 13 Apr 2022 01:25:44 +0200 +Subject: PdfImport: Fix compile with newer poppler + +Brings a dependency on poppler-qt5 to be able to include the version +header, honestly it's not strictly needed, one could do a +check_cxx_source_compiles, but I don't care about Calligra enough to +spend more time making it compile while it's using poppler the wrong +way. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 51f1d65b8e6..06bbad5c24c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -952,6 +952,7 @@ calligra_drop_product_on_bad_condition( FILTER_WPG_TO_ODG + calligra_drop_product_on_bad_condition( FILTER_PDF_TO_SVG + NOT_WIN "not supported on Windows" + PopplerXPDFHeaders_FOUND "poppler xpdf headers not found" ++ Poppler_FOUND "poppler qt5 headers not found" + ) + + calligra_drop_product_on_bad_condition( FILTER_HTML_TO_ODS +diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt +index 8fddf1ad757..b71c92cbf04 100644 +--- a/filters/karbon/pdf/CMakeLists.txt ++++ b/filters/karbon/pdf/CMakeLists.txt +@@ -3,7 +3,7 @@ set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp SvgOutputDev.cpp ) + add_library(calligra_filter_pdf2svg MODULE ${pdf2svg_PART_SRCS}) + calligra_filter_desktop_to_json(calligra_filter_pdf2svg calligra_filter_pdf2svg.desktop) + +-target_link_libraries(calligra_filter_pdf2svg komain Poppler::Core) ++target_link_libraries(calligra_filter_pdf2svg komain Poppler::Core Poppler::Qt5) + + install(TARGETS calligra_filter_pdf2svg DESTINATION ${PLUGIN_INSTALL_DIR}/calligra/formatfilters) + +diff --git a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp +index abbe681b4e8..e97974fc133 100644 +--- a/filters/karbon/pdf/PdfImport.cpp ++++ b/filters/karbon/pdf/PdfImport.cpp +@@ -17,6 +17,10 @@ + + #include + ++#include ++ ++#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) ++ + // Don't show this warning: it's an issue in poppler + #ifdef __GNUC__ + #pragma GCC diagnostic ignored "-Wunused-parameter" +@@ -54,8 +58,13 @@ KoFilter::ConversionStatus PdfImport::convert(const QByteArray& from, const QByt + if (! globalParams) + return KoFilter::NotImplemented; + ++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) + GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); + PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); ++#else ++ std::unique_ptr fname = std::make_unique(QFile::encodeName(m_chain->inputFile()).data()); ++ PDFDoc * pdfDoc = new PDFDoc(std::move(fname)); ++#endif + if (! pdfDoc) { + #ifdef HAVE_POPPLER_PRE_0_83 + delete globalParams; diff --git a/calligra-3.2.1-poppler-22.08.0-2.patch b/calligra-3.2.1-poppler-22.08.0-2.patch new file mode 100644 index 0000000..d6f5b20 --- /dev/null +++ b/calligra-3.2.1-poppler-22.08.0-2.patch @@ -0,0 +1,86 @@ +From 6b75bec784c9835c78993349845d8c2ef22ec3de Mon Sep 17 00:00:00 2001 +From: Dag Andersen +Date: Wed, 13 Apr 2022 14:45:33 +0200 +Subject: PdfImport: Fix compile with newer poppler + +Also fixes odg2pdf filter. + +Same solution as commit 236bacbe13739414e919de868283b0caf2df5d8a +by accid@kde.org. + +diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt +index b71c92cbf04..4ce138ccdd6 100644 +--- a/filters/karbon/pdf/CMakeLists.txt ++++ b/filters/karbon/pdf/CMakeLists.txt +@@ -13,6 +13,6 @@ set(pdf2odg_PART_SRCS PdfImportDebug.cpp Pdf2OdgImport.cpp SvgOutputDev.cpp) + add_library(calligra_filter_pdf2odg MODULE ${pdf2odg_PART_SRCS}) + calligra_filter_desktop_to_json(calligra_filter_pdf2odg calligra_filter_pdf2odg.desktop) + +-target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core) ++target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core Poppler::Qt5) + + install(TARGETS calligra_filter_pdf2odg DESTINATION ${PLUGIN_INSTALL_DIR}/calligra/formatfilters) +diff --git a/filters/karbon/pdf/Pdf2OdgImport.cpp b/filters/karbon/pdf/Pdf2OdgImport.cpp +index 934e31dd5aa..a21eac97a77 100644 +--- a/filters/karbon/pdf/Pdf2OdgImport.cpp ++++ b/filters/karbon/pdf/Pdf2OdgImport.cpp +@@ -27,6 +27,8 @@ + + #include + ++#include ++ + // Don't show this warning: it's an issue in poppler + #ifdef __GNUC__ + #pragma GCC diagnostic ignored "-Wunused-parameter" +@@ -36,6 +38,8 @@ + #include + #include + ++#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) ++ + K_PLUGIN_FACTORY_WITH_JSON(Pdf2OdgImportFactory, "calligra_filter_pdf2odg.json", + registerPlugin();) + +@@ -69,8 +73,13 @@ KoFilter::ConversionStatus Pdf2OdgImport::convert(const QByteArray& from, const + if (! globalParams) + return KoFilter::NotImplemented; + ++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) + GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); + PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); ++#else ++ std::unique_ptr fname = std::make_unique(QFile::encodeName(m_chain->inputFile()).data()); ++ PDFDoc * pdfDoc = new PDFDoc(std::move(fname)); ++#endif + if (! pdfDoc) { + #ifdef HAVE_POPPLER_PRE_0_83 + delete globalParams; +diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp +index 0e6e5a934ca..7caec15175a 100644 +--- a/filters/karbon/pdf/SvgOutputDev.cpp ++++ b/filters/karbon/pdf/SvgOutputDev.cpp +@@ -22,6 +22,10 @@ + #include + #include + ++#include ++ ++#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) ++ + class SvgOutputDev::Private + { + public: +@@ -386,7 +390,12 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) + if (s->getLength() == 0) + return; + ++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) + GfxFont * font = state->getFont(); ++#else ++ std::shared_ptr font = state->getFont(); ++#endif ++ + + QString str; + diff --git a/calligra.spec b/calligra.spec index dcc5720..1b5fb89 100644 --- a/calligra.spec +++ b/calligra.spec @@ -1,6 +1,6 @@ Name: calligra Version: 3.2.1 -Release: 4mamba +Release: 5mamba Epoch: 1 Summary: An integrated office suite built on the KDE platform (formerly known as koffice) Group: Graphical Desktop/Applications/Office @@ -24,6 +24,9 @@ Patch9: calligra-3.2.1-Fix-inserting-a-large-JPEG-image-into-a-presentati Patch10: calligra-3.2.1-gcc11.patch Patch11: calligra-3.2.1-Partial-update-of-Commit-62f51070-to-make-it-compile.patch Patch12: calligra-3.2.1-kundo2_aware_xgettext.sh-fix-a-gawk-warning.patch +Patch13: calligra-3.2.1-poppler-22.08.0-1.patch +Patch14: calligra-3.2.1-poppler-22.08.0-2.patch +Patch15: calligra-3.2.1-c++17.patch License: GPL, LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -91,8 +94,8 @@ BuildRequires: libz-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtdeclarative-devel ## AUTOBUILDREQ-END +BuildRequires: libokular-devel >= 23.08.0-1mamba BuildRequires: libgit2-devel >= 1.1.0-1mamba -BuildRequires: libokular-devel >= 22.04.0 BuildRequires: libwps-devel >= 0.4.0-1mamba BuildRequires: libxbase-devel >= 2.1.1 BuildRequires: cmake @@ -280,22 +283,26 @@ This package provides the run-time library used by most of the Calligra componen #-D -T #:<< _EOF #%patch0 -p1 -%patch1 -p1 -b .Fix-some-more-warnings -%patch2 -p1 -b .Make-show-hidden-row-s-work -%patch3 -p1 -b .Fix-Bug-423038-Annotation-shape-crashes-on-paste -%patch4 -p1 -b .Fix-comparison-between-QString-and-0 -%patch5 -p1 -b .Sheets-Fix-Bug-423474-Selections-not-retained-when-s -%patch6 -p1 -b .ChartTool-KoFormulaTool-Guard-against-crash-if-activ -%patch7 -p1 -b .Fix-assert-with-invalid-.local-share-autocorrect-cus -%patch8 -p1 -b .Repair-KFileWidget-integration -%patch9 -p1 -b .Fix-inserting-a-large-JPEG-image-into-a-presentation -%patch10 -p1 -b .gcc11 -%patch11 -p1 -b .Partial-update-of-Commit-62f51070-to-make-it-compile -%patch12 -p1 -b .kundo2_aware_xgettext.sh-fix-a-gawk-warning +%patch 1 -p1 -b .Fix-some-more-warnings +%patch 2 -p1 -b .Make-show-hidden-row-s-work +%patch 3 -p1 -b .Fix-Bug-423038-Annotation-shape-crashes-on-paste +%patch 4 -p1 -b .Fix-comparison-between-QString-and-0 +%patch 5 -p1 -b .Sheets-Fix-Bug-423474-Selections-not-retained-when-s +%patch 6 -p1 -b .ChartTool-KoFormulaTool-Guard-against-crash-if-activ +%patch 7 -p1 -b .Fix-assert-with-invalid-.local-share-autocorrect-cus +%patch 8 -p1 -b .Repair-KFileWidget-integration +%patch 9 -p1 -b .Fix-inserting-a-large-JPEG-image-into-a-presentation +%patch 10 -p1 -b .gcc11 +%patch 11 -p1 -b .Partial-update-of-Commit-62f51070-to-make-it-compile +%patch 12 -p1 -b .kundo2_aware_xgettext.sh-fix-a-gawk-warning +%patch 13 -p1 -b .poppler-22.08.0-1 +%patch 14 -p1 -b .poppler-22.08.0-2 +%patch 15 -p1 -b .c++17 %build #:<< _EOF %cmake_kde5 -d build \ + -Wno-dev \ -DEIGEN3_INCLUDE_DIR=%{_includedir}/eigen32 %make @@ -451,6 +458,9 @@ This package provides the run-time library used by most of the Calligra componen %{_libdir}/lib*.so %changelog +* Thu Sep 07 2023 Automatic Build System 3.2.1-5mamba +- rebuilt by autoport with build requirements: libokular-devel>=23.08.0-1mamba + * Thu Apr 28 2022 Silvan Calarco 3.2.1-4mamba - rebuilt with okular 22.04.0