From nobody Sat Sep 28 10:01:33 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 4XG2t56yQFz5X68n; Sat, 28 Sep 2024 10:01:33 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XG2t53d5sz44F5; Sat, 28 Sep 2024 10:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727517693; 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=rk+NTDY0oggh09N9AH0Gd9Jn74Ki+my24NLo1smxLq0=; b=jV+7Rg6L9zTtgHHX/ciTcDAD1uxcearRWUPU+GYX0BGHSlEqIyQdx3gZHxN58Fzq4SsaWO h8zIYXpz3E8o5lQcfjYrSMpxrty9YbRe/z1Rhknl2YHK8gPHiy71fRB/vda/aAe/QxE8C0 +u7ClzBU2/suBalD0HGv334ERDghTZY2eo8KHYeEq1wZkjLRyXfKwthXexrpO3qxylM9ZS 9fhcAojPuSxmz0wauK50mtEV5sdf7YKOZ0U+GMfXhP8J9U43l25LLh6627oUBD0ee47Z6w xClX7fPg+VMz/YgUJzDhF+DettL+QUqCYF5vw1m1rgTB5GiiD8rjlc9EvoGE0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727517693; 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=rk+NTDY0oggh09N9AH0Gd9Jn74Ki+my24NLo1smxLq0=; b=V4koAJn6+hnYfifqpZQp06C3M0xCf91+LM8qdwnofVPjJg3s0+4hbI3b00dsKUADTPGYHt bT0QkiGTmYL1abpLEOJOxEAVo/T4V3fOFOuaRflcuraUsDXWsG6blHpk/kcYY/SwPSF74P fmuD7JiQSwUd+wtfFWIYITIglgQCUvAgOLuCHoWR+aGAFPtp4n7EPrv0NMPDJBt2eJECDs h34H+/h6WKm+AsmCbR2dQ4X1KcGmVVdMj4S3beSfCsJ+FcwHiKjvX/KdGmnwj7oJ8vyR3E /BEYNJYuG7Nzgq2qr6Vb7v+n+taoi5wd07V7cejf3dA05bsrTSnJCL9BHdvpWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727517693; a=rsa-sha256; cv=none; b=WS5YFsCJZcIb5mrbbzOJhW3WMH863WGtJp+W6LxRP6i+Og/N0+FfQoYaea1Tb0QZXt/2Un RukcxwBrUZ+ASV/D40VvuhXMCeUIBc+w9FfJLZRbtA4n1Z6+rIOMergJVDEkv0btKWNiVn U03ty8L3nkKdAZbifDUvfwRyzCXBYSaY8VAT5JRGUWxvU0gZOtreDzNnfyk3wkubhVp1fG Ud30HQWP/twr+P1LZ/h5DYMsvQmhqB4ZwdSdQTfplt3D2/WJaGIIGlZTxnBk4QHpNc906W z9EwMrdb5o8zaVHaXSUb9/e9qMU63yOjs0IPqmHlTWyJ55tFbWw757IY+MuRvQ== 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 4XG2t520HQzKkt; Sat, 28 Sep 2024 10:01:33 +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 48SA1Xc1045075; Sat, 28 Sep 2024 10:01:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48SA1Xcm045072; Sat, 28 Sep 2024 10:01:33 GMT (envelope-from git) Date: Sat, 28 Sep 2024 10:01:33 GMT Message-Id: <202409281001.48SA1Xcm045072@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: 5b9dda30c763 - 2024Q3 - graphics/libemf: 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/2024Q3 X-Git-Reftype: branch X-Git-Commit: 5b9dda30c763cfaf81e0abcdeee4f6b2ac02ff45 Auto-Submitted: auto-generated The branch 2024Q3 has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=5b9dda30c763cfaf81e0abcdeee4f6b2ac02ff45 commit 5b9dda30c763cfaf81e0abcdeee4f6b2ac02ff45 Author: Dimitry Andric AuthorDate: 2024-09-15 11:55:03 +0000 Commit: Dimitry Andric CommitDate: 2024-09-28 10:01:20 +0000 graphics/libemf: 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/libemf 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, | ^ libemf.cpp:982:30: note: in instantiation of template class 'std::basic_string' requested here 982 | std::basic_string filename_w( filename, filename + filename_count ); | ^ /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here 23 | struct _LIBCPP_TEMPLATE_VIS char_traits; | ^ libemf should really use char16_t for its 16-bit character type, but the code is full of Windows assumptions that WCHAR is unsigned short. Since std::basic_string is no longer available, use std::basic_string instead, and cast the result to the appropriate type for GetEnhMetaFileW(). [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals PR: 281516 Approved by: maintainer timeout (~2 weeks) MFH: 2024Q3 (cherry picked from commit 2b65317363f625eceb125cad5864fd873a66562f) --- graphics/libemf/files/patch-libemf_libemf.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/graphics/libemf/files/patch-libemf_libemf.cpp b/graphics/libemf/files/patch-libemf_libemf.cpp index b0da3b4bbe53..e0368f114e08 100644 --- a/graphics/libemf/files/patch-libemf_libemf.cpp +++ b/graphics/libemf/files/patch-libemf_libemf.cpp @@ -1,4 +1,4 @@ ---- libemf/libemf.cpp.orig 2021-11-01 12:21:53 UTC +--- libemf/libemf.cpp.orig 2020-06-07 13:10:20 UTC +++ libemf/libemf.cpp @@ -72,8 +72,7 @@ namespace EMF { if ( not bigEndian() ) { @@ -10,3 +10,15 @@ } /*! +@@ -980,9 +979,9 @@ extern "C" { + + int filename_count = ::strlen( filename ); + +- std::basic_string filename_w( filename, filename + filename_count ); ++ std::basic_string filename_w( filename, filename + filename_count ); + +- HENHMETAFILE handle = GetEnhMetaFileW( filename_w.c_str() ); ++ HENHMETAFILE handle = GetEnhMetaFileW( reinterpret_cast(filename_w.c_str()) ); + + return handle; + }