diff --git a/recipes-libreoffice/libreoffice/files/0003-poppler-22.03.0.patch b/recipes-libreoffice/libreoffice/files/0003-poppler-22.03.0.patch new file mode 100644 index 0000000..a9b6d8d --- /dev/null +++ b/recipes-libreoffice/libreoffice/files/0003-poppler-22.03.0.patch @@ -0,0 +1,46 @@ +From 389e500a5bda3c463bc3c57f49c23fcd477ece0d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Wed, 2 Dec 2020 22:00:50 +0100 +Subject: [PATCH] Fix build with poppler >= 22.03 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Stolen from [1] + +[1] https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/libreoffice-fresh/trunk/poppler-22.03.0.patch + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller +--- + +diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +index ad6320139..e5f6d9c68 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +@@ -138,6 +138,15 @@ int main(int argc, char **argv) + _setmode( _fileno( g_binary_out ), _O_BINARY ); + #endif + ++#if POPPLER_CHECK_VERSION(22, 3, 0) ++ PDFDoc aDoc( std::make_unique(pFileName), ++ GooString(pOwnerPasswordStr), ++ GooString(pUserPasswordStr) ); ++ ++ PDFDoc aErrDoc( std::make_unique(pErrFileName), ++ GooString(pOwnerPasswordStr), ++ GooString(pUserPasswordStr) ); ++#else + PDFDoc aDoc( pFileName, + pOwnerPasswordStr, + pUserPasswordStr ); +@@ -145,6 +154,7 @@ int main(int argc, char **argv) + PDFDoc aErrDoc( pErrFileName, + pOwnerPasswordStr, + pUserPasswordStr ); ++#endif + + // Check various permissions for aDoc. + PDFDoc &rDoc = aDoc.isOk()? aDoc: aErrDoc; + diff --git a/recipes-libreoffice/libreoffice/libreoffice.inc b/recipes-libreoffice/libreoffice/libreoffice.inc index c90d8d9..6090759 100644 --- a/recipes-libreoffice/libreoffice/libreoffice.inc +++ b/recipes-libreoffice/libreoffice/libreoffice.inc @@ -12,6 +12,7 @@ SRC_URI += " \ git://github.com/dagwieers/unoconv.git;destsuffix=git/unoconv;name=unoconv;branch=master;protocol=https \ file://0001-Workaround-boost-library-detection-failures.patch \ file://0002-Fix-build-with-icu-68.patch \ + file://0003-poppler-22.03.0.patch \ " SRCREV_unoconv = "260b815bf2c57118df439f381974f3f0987222a1"