commit:     4f2670a9b5d455c285c6f75347488481a412cc61
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Sun Sep 24 04:23:34 2023 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Sep 25 02:43:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f2670a9

app-text/podofo: suppress possibly impactful compiler fp handling

The tests fail on specific combinations of compiler optimizations due to
https://github.com/podofo/podofo/issues/103

In particular, at -march=x86-64-v3 levels and up, plus -O2. Setting
-ffp-contract=off makes the tests pass again... this *could* just be a
test data issue, but it may also be genuine library mis-handling. To be
on the safe side, just compile podofo such that it definitely passes its
tests, while waiting for an upstream response.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 app-text/podofo/{podofo-0.10.1.ebuild => podofo-0.10.1-r1.ebuild} | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/app-text/podofo/podofo-0.10.1.ebuild 
b/app-text/podofo/podofo-0.10.1-r1.ebuild
similarity index 85%
rename from app-text/podofo/podofo-0.10.1.ebuild
rename to app-text/podofo/podofo-0.10.1-r1.ebuild
index 29d54510af38..18c138d78704 100644
--- a/app-text/podofo/podofo-0.10.1.ebuild
+++ b/app-text/podofo/podofo-0.10.1-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit cmake
+inherit cmake flag-o-matic
 
 DESCRIPTION="PoDoFo is a C++ library to work with the PDF file format"
 HOMEPAGE="https://github.com/podofo/podofo";
@@ -52,5 +52,11 @@ src_configure() {
                $(cmake_use_find_package png PNG)
                $(cmake_use_find_package fontconfig Fontconfig)
        )
+
+       # some optimizations cause testsuite failures which may indicate
+       # unsoundness with contraction. Be cautious for now. Reported
+       # upstream as https://github.com/podofo/podofo/issues/103
+       append-cxxflags $(test-flags-CXX -ffp-contract=off)
+
        cmake_src_configure
 }

Reply via email to