rebuilt with upstream build fix [release 0.9.8-2mamba;Wed Jan 11 2023]

This commit is contained in:
Silvan Calarco 2024-01-06 10:23:37 +01:00
parent b156f12c18
commit f763ea52a9
2 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1,39 @@
From d0e9f5d503b0cb79516ec9bff989f3d7d625b678 Mon Sep 17 00:00:00 2001
From: Pino Toscano <toscano.pino@tiscali.it>
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()
{
}

View File

@ -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 <ercole69@gmail.com>
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 <silvan.calarco@mambasoft.it> 0.9.8-2mamba
- rebuilt with upstream build fix
* Thu May 05 2022 Automatic Build System <autodist@mambasoft.it> 0.9.8-1mamba
- automatic version update by autodist