diff options
Diffstat (limited to 'app-office/calligra')
6 files changed, 198 insertions, 54 deletions
diff --git a/app-office/calligra/Manifest b/app-office/calligra/Manifest index de300275a081..58dc28cc52df 100644 --- a/app-office/calligra/Manifest +++ b/app-office/calligra/Manifest @@ -5,7 +5,9 @@ AUX calligra-3.2.1-cxx17-for-poppler-22.patch 857 BLAKE2B f4ce16863c99be4681e6a2 AUX calligra-3.2.1-imath-1.patch 971 BLAKE2B 10686e8aa72d7a6953393863123ca42f3cfaa3bad50e3a38876418d564f917a7f9b1009f972330a6e1abe4ef0e2e40ddeb02a62dc05c52ecbb94718beb468e51 SHA512 3ed2f1e92519baec97f110bb07c8a47fad14779c6dcc30ad4fa2bd13b18867258b9bf08a2e99ae732cdc4372dd462b0872abaebb5eef0e093934a70140c46591 AUX calligra-3.2.1-imath-2.patch 688 BLAKE2B a991405acd4f9bc1b496cac0cfd969764e6145dec5bd682a2bdafc245c3ea21e369a8b595b6c60991a1c082bc65cf3681de5bcd66953fd4480e5895b45a9ae71 SHA512 08cc502599136db86b501be4793cdbc2aa0debced9dce0ac3a470b977595241b1d4eb32252095d644cf13661f04e9bd1f33fef43f506e567eed67f69d2548213 AUX calligra-3.2.1-openexr-3.patch 3188 BLAKE2B 221e8925f86418ef491a2e43c0e2981be4962b2afcb74465a93f3af22ad6cedfd36119006831d89af8b05dfd5b833f3a5ba0f4593559377b5e20d0479c981e22 SHA512 4ad40876e68317fab59dfc7f5672ef850e40edf636dd6ed996a8239850fd4705825e18db86f132d4d0f06540e804c66d86b1954702187f57b90fd811d2c59bf5 -AUX calligra-3.2.1-poppler-22.03.0.patch 2311 BLAKE2B 403c5564a0e51dd3493363aacd4423b7fa78c7d86acfa6ee8b68b0385898558c6d3867a978973362d84a8033c03aeceadf489979d316b4a5a44825be1612ace0 SHA512 6937d985409cf8a69cf0cb59e64a4f8ebacfad3ba79b021d7a74c8a5275e2c3c43bc5a7ac7d66354107cfe039ea5b523564744d2647715244da7347daa2e84ff +AUX calligra-3.2.1-poppler-22.03.0-1.patch 3030 BLAKE2B c919e410dd252a3fefed1ca05c5c2bbc16deff583e8225dcd7d942a0846e378ba662f35b8983601b0d99f691f9f55d855e2a65a4bc274a6a0895c50fc25336be SHA512 11f660e5a097a25bd718503d2f46676b3c8647f30e6b5920184ccb8314faa1d22ac9a62ecf97f75391f59fc435422e6c33ff87cb8045c74299f1cfa4f847ad7f +AUX calligra-3.2.1-poppler-22.03.0-2.patch 3453 BLAKE2B 02967036156934898862c9fe157033d0f946f78858ffd8d9a75fb7cca0d93e62c4d1a5fb8fed74de190addede37e32c07915e4b60da04634417e99d13bd35f20 SHA512 3322c81a2b596d3b1e49a0af4c0f13934f6674cdb0dfa7f9c5552117cfc4858ea2a7720c6a405c18b121a61c9bdce62b575703c58a9137addeed3906d210a518 +AUX calligra-3.2.1-poppler-22.04.0.patch 897 BLAKE2B 27619f10b4902da729f9e5d99c872e95bb61953de7c2a27d760e463b3d27e950cf113515671d9fb15ff5fcdd51c30c6d266e7166fdf64499f445afa02120c7f2 SHA512 9ec649c29051d5ca9faf9e6f84b6ba2cfe2ba600c5d84feaa0f87df1b1656fe5616be4ff3413ae985894f68cc2dceb7eca344f2642bc3e9b429915e506994009 DIST calligra-3.2.1.tar.xz 55207684 BLAKE2B 332629f18adbee649e8d25a1eedf4ee48af7d8cbb79382c70678bacfa89d9a10797eb0ff42cb5aad51ef2c28aa7071e687bd34053cadcc40ac1936bb9a40dc20 SHA512 e53a939aa1b277c2291cfd626868c77085fc9cc7774df160b5b1afceb33314b4381fa8ffe03636cbde6e35cc2abd170a51e7f9c1a99191339313b9c9c3b1526f -EBUILD calligra-3.2.1-r5.ebuild 5490 BLAKE2B f34de7cb1ad8f9bdfffa8ec61e49608a54de36468cedadb4de15d45cb098827e58ce8c2362312f5607d9b0f1721478d5cd34983c3fdef540e5aca96d3586d59e SHA512 25bea7dbe0edf40829d6fc6370b68a52a01f120a581b041644fd094bcfc0993c22bde88e360e32c9b8ed173809d7dc57d7357523fbe17697b8fd9dc7fc9253bc +EBUILD calligra-3.2.1-r5.ebuild 5508 BLAKE2B 5aafa91065219ddc2517c904b24ae37bcb51164f416f106ca2f8cc6109680a1498c574cdba400494dfac9fc50ef199118bc513eba1f728ff7a0b9d6cddb99214 SHA512 ed191c150173bf2d09315cd74761dbe368b5cca644cf1c1da35447c7efd40af38a0920552e599a55889ad4580731dcdbe671a0fdf815db00caf4f5d1238ae847 MISC metadata.xml 1218 BLAKE2B 0989022a6025992ca04069a3f1e77e626df5a37c51bb1f6889e81360a6dd7a11311d319ba874e9dbadcb98ec53e6c1436563ecc6baf047218bd23adc726499b2 SHA512 b8b0e4cc426a2ff43211ef9f5b9d72db6ceefb26f22c49c32805bdfa7716920e54d09e19836e5da7293d9ac264364568119a64ee458f3f51f85dafe4e050f835 diff --git a/app-office/calligra/calligra-3.2.1-r5.ebuild b/app-office/calligra/calligra-3.2.1-r5.ebuild index d80568af53ec..49246e3bca3d 100644 --- a/app-office/calligra/calligra-3.2.1-r5.ebuild +++ b/app-office/calligra/calligra-3.2.1-r5.ebuild @@ -120,7 +120,8 @@ PATCHES=( "${FILESDIR}"/${P}-{openexr-3,imath-{1,2}}.patch "${FILESDIR}"/${P}-cxx17-for-poppler-22.patch "${FILESDIR}"/${P}-cxx17-fixes.patch - "${FILESDIR}"/${P}-poppler-22.03.0.patch # by Archlinux, TODO upstream + "${FILESDIR}"/${P}-poppler-22.03.0-{1,2}.patch + "${FILESDIR}"/${P}-poppler-22.04.0.patch ) pkg_pretend() { diff --git a/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0-1.patch b/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0-1.patch new file mode 100644 index 000000000000..2d308371a0a7 --- /dev/null +++ b/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0-1.patch @@ -0,0 +1,73 @@ +From 63ae4ecc780ba42901e6934302b75bd18d3bc5eb Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid <aacid@kde.org> +Date: Wed, 13 Apr 2022 01:25:44 +0200 +Subject: [PATCH 1/3] 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. +--- + CMakeLists.txt | 1 + + filters/karbon/pdf/CMakeLists.txt | 2 +- + filters/karbon/pdf/PdfImport.cpp | 9 +++++++++ + 3 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bdd9ed74406..d8c86810b54 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -998,6 +998,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 94d4071da3d..ef360f44359 100644 +--- a/filters/karbon/pdf/CMakeLists.txt ++++ b/filters/karbon/pdf/CMakeLists.txt +@@ -19,7 +19,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 286f5fa78bc..c171c754116 100644 +--- a/filters/karbon/pdf/PdfImport.cpp ++++ b/filters/karbon/pdf/PdfImport.cpp +@@ -30,6 +30,10 @@ + + #include <kpluginfactory.h> + ++#include <poppler-version.h> ++ ++#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" +@@ -73,8 +77,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<GooString> fname = std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()); ++ PDFDoc * pdfDoc = new PDFDoc(std::move(fname)); ++#endif + if (! pdfDoc) { + #ifdef HAVE_POPPLER_PRE_0_83 + delete globalParams; +-- +2.35.1 + diff --git a/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0-2.patch b/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0-2.patch new file mode 100644 index 000000000000..f39304e04c82 --- /dev/null +++ b/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0-2.patch @@ -0,0 +1,94 @@ +From feb28e5fbd4e3b41c74da1220bc14826bcf9b3c7 Mon Sep 17 00:00:00 2001 +From: Dag Andersen <dag.andersen@kdemail.net> +Date: Wed, 13 Apr 2022 14:45:33 +0200 +Subject: [PATCH 2/3] PdfImport: Fix compile with newer poppler + +Also fixes odg2pdf filter. + +Same solution as commit 236bacbe13739414e919de868283b0caf2df5d8a +by accid@kde.org. +--- + filters/karbon/pdf/CMakeLists.txt | 2 +- + filters/karbon/pdf/Pdf2OdgImport.cpp | 9 +++++++++ + filters/karbon/pdf/SvgOutputDev.cpp | 9 +++++++++ + 3 files changed, 19 insertions(+), 1 deletion(-) + +diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt +index ef360f44359..849baa70f12 100644 +--- a/filters/karbon/pdf/CMakeLists.txt ++++ b/filters/karbon/pdf/CMakeLists.txt +@@ -29,6 +29,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 745239c9c21..b5f3722b320 100644 +--- a/filters/karbon/pdf/Pdf2OdgImport.cpp ++++ b/filters/karbon/pdf/Pdf2OdgImport.cpp +@@ -40,6 +40,8 @@ + + #include <kpluginfactory.h> + ++#include <poppler-version.h> ++ + // Don't show this warning: it's an issue in poppler + #ifdef __GNUC__ + #pragma GCC diagnostic ignored "-Wunused-parameter" +@@ -49,6 +51,8 @@ + #include <PDFDoc.h> + #include <GlobalParams.h> + ++#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<Pdf2OdgImport>();) + +@@ -86,8 +90,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<GooString> fname = std::make_unique<GooString>(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 b980fdf60f6..76b909e3b69 100644 +--- a/filters/karbon/pdf/SvgOutputDev.cpp ++++ b/filters/karbon/pdf/SvgOutputDev.cpp +@@ -35,6 +35,10 @@ + #include <QPen> + #include <QImage> + ++#include <poppler-version.h> ++ ++#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) ++ + class SvgOutputDev::Private + { + public: +@@ -410,7 +414,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<GfxFont> font = state->getFont(); ++#endif ++ + + QString str; + +-- +2.35.1 + diff --git a/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0.patch b/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0.patch deleted file mode 100644 index c704d7896e1f..000000000000 --- a/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8f328bef497a9e3bc628e4e294c1a70b0c8b0eab Mon Sep 17 00:00:00 2001 -From: foutrelis <foutrelis@eb2447ed-0c53-47e4-bac8-5bc4a241df78> -Date: Wed, 2 Mar 2022 10:28:24 +0000 -Subject: [PATCH] Fix build with poppler 22.03.0 - -diff -uprw a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt ---- a/filters/karbon/pdf/CMakeLists.txt 2020-05-14 09:51:30.000000000 +0300 -+++ b/filters/karbon/pdf/CMakeLists.txt 2022-03-02 12:19:08.039939530 +0200 -@@ -14,6 +14,10 @@ if(Poppler_VERSION VERSION_LESS "0.83.0" - add_definitions("-DHAVE_POPPLER_PRE_0_83") - endif() - -+if(Poppler_VERSION VERSION_LESS "22.3.0") -+ add_definitions("-DHAVE_POPPLER_PRE_22_3") -+endif() -+ - set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp SvgOutputDev.cpp ) - - add_library(calligra_filter_pdf2svg MODULE ${pdf2svg_PART_SRCS}) -diff -uprw a/filters/karbon/pdf/Pdf2OdgImport.cpp b/filters/karbon/pdf/Pdf2OdgImport.cpp ---- a/filters/karbon/pdf/Pdf2OdgImport.cpp 2020-05-14 09:51:30.000000000 +0300 -+++ b/filters/karbon/pdf/Pdf2OdgImport.cpp 2022-03-02 12:20:35.125605950 +0200 -@@ -86,8 +86,12 @@ KoFilter::ConversionStatus Pdf2OdgImport - if (! globalParams) - return KoFilter::NotImplemented; - -+#ifdef HAVE_POPPLER_PRE_22_3 - GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); - PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); -+#else -+ PDFDoc * pdfDoc = new PDFDoc(std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data())); -+#endif - if (! pdfDoc) { - #ifdef HAVE_POPPLER_PRE_0_83 - delete globalParams; -diff -uprw a/filters/karbon/pdf/PdfImport.cpp b/filters/karbon/pdf/PdfImport.cpp ---- a/filters/karbon/pdf/PdfImport.cpp 2020-05-14 09:51:30.000000000 +0300 -+++ b/filters/karbon/pdf/PdfImport.cpp 2022-03-02 12:21:46.197510028 +0200 -@@ -73,8 +73,12 @@ KoFilter::ConversionStatus PdfImport::co - if (! globalParams) - return KoFilter::NotImplemented; - -+#ifdef HAVE_POPPLER_PRE_22_3 - GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); - PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); -+#else -+ PDFDoc * pdfDoc = new PDFDoc(std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data())); -+#endif - if (! pdfDoc) { - #ifdef HAVE_POPPLER_PRE_0_83 - delete globalParams; diff --git a/app-office/calligra/files/calligra-3.2.1-poppler-22.04.0.patch b/app-office/calligra/files/calligra-3.2.1-poppler-22.04.0.patch new file mode 100644 index 000000000000..f76ef92d8fcf --- /dev/null +++ b/app-office/calligra/files/calligra-3.2.1-poppler-22.04.0.patch @@ -0,0 +1,25 @@ +From 2dd2c02094ab9dfd964b2363039527d414db3b28 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid <aacid@kde.org> +Date: Wed, 13 Apr 2022 21:30:14 +0200 +Subject: [PATCH 3/3] SvgOutputDev: Fix ifdef version for getFont API change + +--- + filters/karbon/pdf/SvgOutputDev.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp +index 76b909e3b69..588cda8ecbe 100644 +--- a/filters/karbon/pdf/SvgOutputDev.cpp ++++ b/filters/karbon/pdf/SvgOutputDev.cpp +@@ -414,7 +414,7 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) + if (s->getLength() == 0) + return; + +-#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) ++#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 04, 0) + GfxFont * font = state->getFont(); + #else + std::shared_ptr<GfxFont> font = state->getFont(); +-- +2.35.1 + |