From a1b41309dbead3676d00dea2e8a54e2db43a373fcc3c42d2a9b10e8fffd21b21 Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Mon, 7 Mar 2022 09:35:12 +0000 Subject: [PATCH] Accepting request 959715 from home:iznogood:factory Fix build with poppler 22.03.0. Staging M please when forwarded to Factory OBS-URL: https://build.opensuse.org/request/show/959715 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=994 --- libreoffice.changes | 6 ++++++ libreoffice.spec | 3 +++ poppler-22-03-0.patch | 29 +++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 poppler-22-03-0.patch diff --git a/libreoffice.changes b/libreoffice.changes index d2ac035..1be4493 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Mar 5 14:30:08 UTC 2022 - Bjørn Lie + +- Add poppler-22-03-0.patch: Fix build with poppler 22.03.0. Patch + lifted from arch linux. + ------------------------------------------------------------------- Mon Feb 28 16:46:05 UTC 2022 - Danilo Spinella diff --git a/libreoffice.spec b/libreoffice.spec index 5bcf4e1..b1f231a 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -112,6 +112,8 @@ Patch101: 0001-Revert-java-9-changes.patch Patch990: install-with-hardlinks.diff # save time by relying on rpm check rather than doing stupid find+grep Patch991: libreoffice-no-destdircheck.patch +# PATCH-FIX-UPSTRAM poppler-22-03-0.patch +Patch992: poppler-22-03-0.patch BuildRequires: %{name}-share-linker BuildRequires: ant BuildRequires: autoconf @@ -1015,6 +1017,7 @@ Provides %{langname} translations and additional resources (help files, etc.) fo %endif %patch990 -p1 %patch991 -p1 +%patch992 -p1 # Disable some of the failing tests (some are random) %if 0%{?suse_version} < 1330 diff --git a/poppler-22-03-0.patch b/poppler-22-03-0.patch new file mode 100644 index 0000000..64f8c54 --- /dev/null +++ b/poppler-22-03-0.patch @@ -0,0 +1,29 @@ +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; +