Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2026 13:08:03 +0000
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 6d07173babd1 - main - graphics/podofo: fix build with libc++ >= 20
Message-ID:  <6991c533.3fc8f.5980d6a7@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6d07173babd17fc1d3ece984639f8f83d6b94d74

commit 6d07173babd17fc1d3ece984639f8f83d6b94d74
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-14 21:37:11 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-15 13:07:53 +0000

    graphics/podofo: fix build with libc++ >= 20
    
    With libc++ 20 or higher graphics/podofo fails to build, with errors
    similar to:
    
        /wrkdirs/usr/ports/graphics/podofo/work/podofo-0.10.4/src/podofo/main/PdfColor.cpp:686:13: error: call to 'from_chars' is ambiguous
          686 |         if (std::from_chars(name.data() + 1, name.data() + name.size(), grayVal, chars_format::fixed).ec != std::errc())
              |             ^~~~~~~~~~~~~~~
        /usr/include/c++/v1/__charconv/from_chars_floating_point.h:63:1: note: candidate function
           63 | from_chars(const char* __first, const char* __last, double& __value, chars_format __fmt = chars_format::general) {
              | ^
        /wrkdirs/usr/ports/graphics/podofo/work/podofo-0.10.4/src/podofo/private/charconv_compat.h:34:30: note: candidate function
           34 |     inline from_chars_result from_chars(const char* first, const char* last,
              |                              ^
    
    This is because libc++ 20 started offering std::from_chars() for
    floating point values, and pododo does not check for this. Correct the
    WANT_FROM_CHARS check to correctly check for libc++ 20 or higher.
    
    PR:             293181
    Approved by:    sunpoet (maintainer)
    MFH:            2026Q1
---
 graphics/podofo/files/patch-libc++20 | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/graphics/podofo/files/patch-libc++20 b/graphics/podofo/files/patch-libc++20
new file mode 100644
index 000000000000..ba64080f5fec
--- /dev/null
+++ b/graphics/podofo/files/patch-libc++20
@@ -0,0 +1,11 @@
+--- src/podofo/private/charconv_compat.h.orig	2024-09-12 19:14:33 UTC
++++ 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__) && !defined(__MINGW32__) &&  __GNUC__ < 11) || (defined(__MINGW32__) &&  __GNUC__ < 12) || defined(__clang__)
++#if (defined(__GNUC__) && !defined(__clang__) && !defined(__MINGW32__) &&  __GNUC__ < 11) || (defined(__MINGW32__) &&  __GNUC__ < 12) || (defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 200000)
+ #define WANT_FROM_CHARS
+ #endif
+ 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6991c533.3fc8f.5980d6a7>