From f763ea52a98c6c2a1875b2c10e4d2a15acc458f7 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 10:23:37 +0100 Subject: [PATCH] rebuilt with upstream build fix [release 0.9.8-2mamba;Wed Jan 11 2023] --- ...upstream-fix_declaration_of_operator.patch | 39 +++++++++++++++++++ podofo.spec | 9 ++++- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 podofo-0.9.8-upstream-fix_declaration_of_operator.patch diff --git a/podofo-0.9.8-upstream-fix_declaration_of_operator.patch b/podofo-0.9.8-upstream-fix_declaration_of_operator.patch new file mode 100644 index 0000000..1bd7172 --- /dev/null +++ b/podofo-0.9.8-upstream-fix_declaration_of_operator.patch @@ -0,0 +1,39 @@ +From d0e9f5d503b0cb79516ec9bff989f3d7d625b678 Mon Sep 17 00:00:00 2001 +From: Pino Toscano +Date: Sun, 14 Aug 2022 08:27:13 +0200 +Subject: [PATCH] Fix declaration of operator<< for PoDoFo::PdfString + +Since PdfString is in the PoDoFo namespace, the operator<< for it must +be in the same namespace as well, otherwise it is not found. In +particular, operator<<(std::ostream&) is needed by cppunit as a way to +get the string representation of an arbitrary type, when using +CPPUNIT_ASSERT_EQUAL() on instances of it. + +This used to work with GCC until 11 because of a buggy behaviour. +GCC 12 fixed it [1], causing this test to fail to build with it. + +[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51577 +--- + test/unit/StringTest.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/test/unit/StringTest.cpp b/test/unit/StringTest.cpp +index a7841f78..b52b7880 100644 +--- a/test/unit/StringTest.cpp ++++ b/test/unit/StringTest.cpp +@@ -29,11 +29,15 @@ using namespace PoDoFo; + // Registers the fixture into the 'registry' + CPPUNIT_TEST_SUITE_REGISTRATION( StringTest ); + ++namespace PoDoFo { ++ + inline std::ostream& operator<<(std::ostream& o, const PdfString& s) + { + return o << s.GetStringUtf8(); + } + ++} ++ + void StringTest::setUp() + { + } diff --git a/podofo.spec b/podofo.spec index 4e469ca..7449bbd 100644 --- a/podofo.spec +++ b/podofo.spec @@ -2,15 +2,16 @@ Name: podofo Version: 0.9.8 -Release: 1mamba +Release: 2mamba Summary: Tools based on libpodofo to work with the PDF file format Group: System/Tools Vendor: openmamba Distribution: openmamba Packager: Ercole 'ercolinux' Carpanetto -URL: http://podofo.sourceforge.net/ +URL: https://podofo.sourceforge.net/ Source: https://downloads.sourceforge.net/project/podofo/podofo/%{version}/podofo-%{version}.tar.gz Patch0: podofo-0.9.3-gcc-4.9.patch +Patch1: podofo-0.9.8-upstream-fix_declaration_of_operator.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -64,6 +65,7 @@ This package contains libraries and header files for developing applications tha #%ifnarch x86_64 #%patch0 -p1 #%endif +%patch1 -p1 -b .upstream-fix_declaration_of_operator %build %cmake -d build \ @@ -109,6 +111,9 @@ This package contains libraries and header files for developing applications tha %doc COPYING %changelog +* Wed Jan 11 2023 Silvan Calarco 0.9.8-2mamba +- rebuilt with upstream build fix + * Thu May 05 2022 Automatic Build System 0.9.8-1mamba - automatic version update by autodist