git: 6930d099097e - 2024Q3 - graphics/poppler: fix build with libc++ 19

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Fri, 16 Aug 2024 15:44:45 UTC
The branch 2024Q3 has been updated by dim:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6930d099097eb9de5321e7bb9728e82efaabf0f6

commit 6930d099097eb9de5321e7bb9728e82efaabf0f6
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-08-01 19:48:37 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-08-16 15:43:43 +0000

    graphics/poppler: fix build with libc++ 19
    
    As noted in the libc++ 19 release notes [1], std::char_traits<> is now
    only provided for char, char8_t, char16_t, char32_t and wchar_t, and any
    instantiation for other types will fail.
    
    This causes graphics/poppler to fail to compile with clang 19 and libc++
    19, resulting in errors similar to:
    
        /usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
          820 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
              |                                          ^
        /wrkdirs/usr/ports/graphics/poppler/work/poppler-24.02.0/cpp/poppler-global.h:101:43: note: in instantiation of template class 'std::basic_string<unsigned short>' requested here
          101 | class POPPLER_CPP_EXPORT ustring : public std::basic_string<unsigned short>
              |                                           ^
        /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here
           23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
              |                             ^
    
    Upstream poppler has fixed this in commit b4ac7d9a [2], so add it as a
    PATCHFILES entry in the Makefile, until the next version of poppler is
    released.
    
    [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
    [2] https://gitlab.freedesktop.org/poppler/poppler/-/commit/b4ac7d9a
    
    PR:             280564
    Approved by:    maintainer timeout (2 weeks)
    MFH:            2024Q3
    
    (cherry picked from commit 6bf6ee19368dea736b8a402d115c797f271a0f47)
---
 graphics/poppler/Makefile | 3 +++
 graphics/poppler/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/graphics/poppler/Makefile b/graphics/poppler/Makefile
index c929c6151c56..80f7919f330a 100644
--- a/graphics/poppler/Makefile
+++ b/graphics/poppler/Makefile
@@ -4,6 +4,9 @@ PORTREVISION=	1
 CATEGORIES=	graphics print
 MASTER_SITES=	https://poppler.freedesktop.org/
 
+PATCH_SITES=	https://gitlab.freedesktop.org/poppler/${PORTNAME}/-/commit/
+PATCHFILES+=	b4ac7d9a.patch:-p1 # deprecated char_traits template has been removed in libc++ 19
+
 MAINTAINER?=	desktop@FreeBSD.org
 COMMENT?=	PDF rendering library
 WWW=		https://poppler.freedesktop.org/
diff --git a/graphics/poppler/distinfo b/graphics/poppler/distinfo
index 54fa5a1fcc08..90d8fd359057 100644
--- a/graphics/poppler/distinfo
+++ b/graphics/poppler/distinfo
@@ -1,3 +1,5 @@
-TIMESTAMP = 1707805389
+TIMESTAMP = 1722540994
 SHA256 (poppler-24.02.0.tar.xz) = 19187a3fdd05f33e7d604c4799c183de5ca0118640c88b370ddcf3136343222e
 SIZE (poppler-24.02.0.tar.xz) = 1897604
+SHA256 (b4ac7d9a.patch) = 0e03b8df2d44531b552dc6881ffe858e426eedd96019241b42bc37d979e66770
+SIZE (b4ac7d9a.patch) = 911