commit: b51689bf8caa38cecf589640bbe6f51f44ffcd58 Author: Violet Purcell <vimproved <AT> inventati <DOT> org> AuthorDate: Sat Jul 26 15:14:01 2025 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sun Jul 27 02:25:38 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b51689bf
app-text/podofo: backport libc++ 20 build fix PoDoFo also has a separate issue with the upcoming libc++ 21 that I have not managed to fix yet. In addition, the latest release upstream is at 1.0.1, however I'm leaving that bump to the package's actual maintainers since it has massive API changes. Signed-off-by: Violet Purcell <vimproved <AT> inventati.org> Closes: https://github.com/gentoo/gentoo/pull/43170 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> .../files/podofo-0.10.3-libcxx-20-from_chars.patch | 23 ++++++++++++++++++++++ app-text/podofo/podofo-0.10.3-r1.ebuild | 5 +++++ 2 files changed, 28 insertions(+) diff --git a/app-text/podofo/files/podofo-0.10.3-libcxx-20-from_chars.patch b/app-text/podofo/files/podofo-0.10.3-libcxx-20-from_chars.patch new file mode 100644 index 000000000000..ddd047ab141e --- /dev/null +++ b/app-text/podofo/files/podofo-0.10.3-libcxx-20-from_chars.patch @@ -0,0 +1,23 @@ +From https://github.com/podofo/podofo/commit/aa9267229b40b49e5927f286841be4cbe81d05d5.patch Mon Sep 17 00:00:00 2001 +From: Yao Zi <[email protected]> +Date: Sun, 22 Jun 2025 07:02:49 +0000 +Subject: [PATCH] private: charconv: Don't define from_chars for libc++ 20 or + later + +LLVM libc++ starts to provide a float-point-capable std::from_chars() +since LLVM 20 release[1]. Unconditionally defining from_chars() when +using Clang will cause ambiguous references and fails the build. + +Link: https://github.com/llvm/llvm-project/pull/91651 # [1] +Signed-off-by: Yao Zi <[email protected]> +--- a/src/podofo/private/charconv_compat.h ++++ b/src/podofo/private/charconv_compat.h +@@ -7,7 +7,7 @@ + #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 10 + #define WANT_CHARS_FORMAT + #endif +-#if (defined(__GNUC__) && __GNUC__ < 11) || defined(__clang__) ++#if (defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 11) || (defined(__clang__) && defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION < 200000)) + #define WANT_FROM_CHARS + #endif + #if (defined(__GNUC__) && !defined(__clang__) && !defined(__MINGW32__) && __GNUC__ < 11) || (defined(__MINGW32__) && __GNUC__ < 12) || (defined(__clang__) && ((defined(__apple_build_version__) && __apple_build_version__ < 15000000) || __clang_major__ < 14)) diff --git a/app-text/podofo/podofo-0.10.3-r1.ebuild b/app-text/podofo/podofo-0.10.3-r1.ebuild index 0ddfff4f73b4..0093d62004a5 100644 --- a/app-text/podofo/podofo-0.10.3-r1.ebuild +++ b/app-text/podofo/podofo-0.10.3-r1.ebuild @@ -37,6 +37,11 @@ BDEPEND=" test? ( fontconfig? ( media-fonts/liberation-fonts ) ) " +PATCHES=( + # backport of https://github.com/podofo/podofo/commit/aa9267229b40b49e5927f286841be4cbe81d05d5 + "${FILESDIR}/${P}-libcxx-20-from_chars.patch" +) + src_prepare() { cmake_src_prepare if use test; then
