diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2022-03-12 16:39:32 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2022-03-12 16:52:47 +0100 |
commit | a976c14d3eb189f1866b298e418e979f7a912350 (patch) | |
tree | 9172b0a04d2e9cc5c8e1cd3f20b52d5b9b532079 /app-office/calligra | |
parent | sci-libs/gdal: Fix build with >=app-text/poppler-22.03.0 (diff) | |
download | gentoo-a976c14d3eb189f1866b298e418e979f7a912350.tar.gz gentoo-a976c14d3eb189f1866b298e418e979f7a912350.tar.bz2 gentoo-a976c14d3eb189f1866b298e418e979f7a912350.zip |
app-office/calligra: Fix build with >=app-text/poppler-22.03.0
Patch taken from Arch Linux
Closes: https://bugs.gentoo.org/834539
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'app-office/calligra')
-rw-r--r-- | app-office/calligra/calligra-3.2.1-r5.ebuild | 1 | ||||
-rw-r--r-- | app-office/calligra/files/calligra-3.2.1-poppler-22.03.0.patch | 51 |
2 files changed, 52 insertions, 0 deletions
diff --git a/app-office/calligra/calligra-3.2.1-r5.ebuild b/app-office/calligra/calligra-3.2.1-r5.ebuild index 99221952f06f..d80568af53ec 100644 --- a/app-office/calligra/calligra-3.2.1-r5.ebuild +++ b/app-office/calligra/calligra-3.2.1-r5.ebuild @@ -120,6 +120,7 @@ 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 ) pkg_pretend() { 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 new file mode 100644 index 000000000000..c704d7896e1f --- /dev/null +++ b/app-office/calligra/files/calligra-3.2.1-poppler-22.03.0.patch @@ -0,0 +1,51 @@ +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; |