From nobody Thu Nov 21 23:11:42 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XvYrt4yLnz5dk9Y; Thu, 21 Nov 2024 23:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XvYrt4Tmtz4PT6; Thu, 21 Nov 2024 23:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732230702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUZA2szPNjc6sNcn0o8lMEsO/DkKjqZO9WdAQiulGII=; b=HD7NZ/MBMENK1Z/wiKkfGuhysNOyPocul2f6ZX+NbmulaRyoZpNo8W48xWDd6O9EH1CuRI 8XjmI1HI4vAwZbWsAdRROgcTGq1yU/GAI3JK0jFKZ3g/hl7YGUR78BFM8WHLT+kYAWsr0b 2BA7r+zpFdxr5xDJR5TK9qRiZlmeEz2fXGFJLv8FmFrTSzezrtDZy2ccVXYgkWGQVbnWz9 g0RRBAJco3qdagxVqHQmc8kXv5oT8ddQULRU/i7wqhptFcULW3PJFENhPgKPjeSvuaik6M k+D5XBmUAtovUCAber4xebuYj45rNbPRjJgwQp44igrt6dC4FJAvRh1BVgK0eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732230702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUZA2szPNjc6sNcn0o8lMEsO/DkKjqZO9WdAQiulGII=; b=tycd8OKM692XGaXuPrUEZb4MUH+F+qaCpe4/cqDWEl85Nm4S49T5YrzKrHS++L8/cc3zK+ vdLgLrC0nzdw8sJE/q8SenRK7ibM2jgH/15xniHN2slcXLqITnwNK/f8LLs5m2R4yIlzzf qPVq2FQelrgC/+2BOu3JXNyeYiTIVeu7BNGXWdimljn5bbPBLv74CEvHQt3J9/TVVJWpno 3Y6G/FrD4lBQ5K5jPGLGaJhudD3Zy9aRbtzd77lx1XWeWeNuB8Xal1qSUlEQQDQpLl+t+A 9SRfNXxP2y9/qb97TfVwsAGZNTioqABXjsae/mkpN9BmAXlvFA/k+T560JuL+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732230702; a=rsa-sha256; cv=none; b=KI3iHTfMDyeCV4L+e2Cifes8sFCGMGPbiIquAGw1eHkslrArM+eaE8R3a+cxpPo8BBYoQ3 oYF4xPZ93vQKC5OLkTDPXOwkXAuwydjtI3mpfLfpJWzfCSIBv90ILlSO3pF/4F4VV6J9e+ YBYfVYRgIMGiYyIQ0GArRRPXNEx4Hq9W1x6yC4CnPcrr8+LDLR33YJbzxuZLAXxOXQ6Hz7 ILg4RDhGeEfEqtsTtV/RbIisAhPOvL9k5vPndSjCx9G6WediuIRmIa4hvT+Afu4xoCp9XX NYDmNzuz2x7oyjOp0UIu+SD79yog2Zq4spjd4dP2gq1d2TmN4AmIfDSQjrcS3w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XvYrt45Lyz10NK; Thu, 21 Nov 2024 23:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ALNBg8A096439; Thu, 21 Nov 2024 23:11:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ALNBgwu096436; Thu, 21 Nov 2024 23:11:42 GMT (envelope-from git) Date: Thu, 21 Nov 2024 23:11:42 GMT Message-Id: <202411212311.4ALNBgwu096436@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Dimitry Andric Subject: git: fa64477e6c3f - 2024Q4 - graphics/povray37: fix build with libc++ 19 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/2024Q4 X-Git-Reftype: branch X-Git-Commit: fa64477e6c3f80ff90f2e661fdd1a2c0de0ee8b2 Auto-Submitted: auto-generated The branch 2024Q4 has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=fa64477e6c3f80ff90f2e661fdd1a2c0de0ee8b2 commit fa64477e6c3f80ff90f2e661fdd1a2c0de0ee8b2 Author: Dimitry Andric AuthorDate: 2024-11-09 12:04:23 +0000 Commit: Dimitry Andric CommitDate: 2024-11-21 23:11:13 +0000 graphics/povray37: 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/povray37 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' 820 | static_assert(is_same<_CharT, typename traits_type::char_type>::value, | ^ ./base/configbase.h:159:19: note: in instantiation of template class 'std::basic_string' requested here 159 | inline UCS2String ASCIItoUCS2String(const char *s) | ^ /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here 23 | struct _LIBCPP_TEMPLATE_VIS char_traits; | ^ This can be fixed by defining `POVMSUCS2` as `char16_t` instead of `unsigned short`, `UCS2` as `char16_t` instead of `unsigned short`, and `UCS4` as `char32_t` instead of `unsigned int` in the passed-in `CPPFLAGS` variable. Also, patch up `vfe.cpp` and `vfeconf.h` to use `char16_t` and `u16string` instead of the non-standard types. [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals PR: 282645 Approved by: bsd@philippost.de (maintainer) MFH: 2024Q4 (cherry picked from commit 6133473e4227abbfcf023bea6ab5eeed9c17e55b) --- graphics/povray37/Makefile | 3 +++ graphics/povray37/files/patch-vfe_vfe.cpp | 26 ++++++++++++++++++++++++++ graphics/povray37/files/patch-vfe_vfeconf.h | 19 +++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/graphics/povray37/Makefile b/graphics/povray37/Makefile index b5d197ad53c0..5a41e5ca6c63 100644 --- a/graphics/povray37/Makefile +++ b/graphics/povray37/Makefile @@ -24,6 +24,9 @@ GNU_CONFIGURE_MANPREFIX=${PREFIX}/share CONFIGURE_ARGS= COMPILED_BY=${HOSTARCH}-portbld-${OPSYS:tl}-${OSREL:R} \ --program-transform-name='s/povray/${PKGBASE}/' \ --disable-optimiz +CPPFLAGS+= -D POVMSUCS2="char16_t" +CPPFLAGS+= -D UCS2="char16_t" +CPPFLAGS+= -D UCS4="char32_t" VERSION_BASE= ${PORTVERSION:C/([0-9]+\.[0-9]+).*/\1/} ETCDIR= ${PREFIX}/etc/${PORTNAME}/${VERSION_BASE} diff --git a/graphics/povray37/files/patch-vfe_vfe.cpp b/graphics/povray37/files/patch-vfe_vfe.cpp new file mode 100644 index 000000000000..f4c8e56714ef --- /dev/null +++ b/graphics/povray37/files/patch-vfe_vfe.cpp @@ -0,0 +1,26 @@ +--- vfe/vfe.cpp.orig 2021-07-08 09:56:01 UTC ++++ vfe/vfe.cpp +@@ -1372,7 +1372,7 @@ int Allow_File_Write (const char *Filename, const unsi + return (vfeSession::GetSessionFromThreadID()->TestAccessAllowed(Filename, true)); + } + +-int Allow_File_Write (const unsigned short *Filename, const unsigned int FileType) ++int Allow_File_Write (const char16_t *Filename, const unsigned int FileType) + { + if (strcmp(UCS2toASCIIString(Filename).c_str(), "stdout") == 0 || strcmp(UCS2toASCIIString(Filename).c_str(), "stderr") == 0) + return true; +@@ -1384,12 +1384,12 @@ int Allow_File_Read (const char *Filename, const unsig + return (vfeSession::GetSessionFromThreadID()->TestAccessAllowed(Filename, false)); + } + +-int Allow_File_Read (const unsigned short *Filename, const unsigned int FileType) ++int Allow_File_Read (const char16_t *Filename, const unsigned int FileType) + { + return (vfeSession::GetSessionFromThreadID()->TestAccessAllowed(Filename, false)); + } + +-FILE *vfeFOpen (const std::basic_string& name, const char *mode) ++FILE *vfeFOpen (const UCS2String& name, const char *mode) + { + return (fopen (UCS2toASCIIString (name).c_str(), mode)) ; + } diff --git a/graphics/povray37/files/patch-vfe_vfeconf.h b/graphics/povray37/files/patch-vfe_vfeconf.h new file mode 100644 index 000000000000..e0761680ed1f --- /dev/null +++ b/graphics/povray37/files/patch-vfe_vfeconf.h @@ -0,0 +1,19 @@ +--- vfe/vfeconf.h.orig 2021-07-08 09:56:01 UTC ++++ vfe/vfeconf.h +@@ -61,12 +61,12 @@ namespace vfe + int vfe_POVMS_Sys_QueueSend(POVMS_Sys_QueueNode *q, void *p, int l) ; + int Allow_File_Write (const char *Filename, const unsigned int FileType); + int Allow_File_Read (const char *Filename, const unsigned int FileType); +- int Allow_File_Read (const unsigned short *Filename, const unsigned int FileType); +- int Allow_File_Write (const unsigned short *Filename, const unsigned int FileType); ++ int Allow_File_Read (const char16_t *Filename, const unsigned int FileType); ++ int Allow_File_Write (const char16_t *Filename, const unsigned int FileType); + POVMS_Sys_Thread_Type POVMS_GetCurrentThread(); + void vfeAssert (const char *message, const char *filename, int line) ; +- FILE *vfeFOpen (const std::basic_string& name, const char *mode); +- bool vfeRemove (const std::basic_string& name); ++ FILE *vfeFOpen (const std::u16string& name, const char *mode); ++ bool vfeRemove (const std::u16string& name); + + #if defined _DEBUG + void *vfe_POVMS_Sys_Malloc(size_t size, const char *func, const char *file, int line) ;