From nobody Wed Mar 26 18:37:54 2025 X-Original-To: dev-commits-ports-main@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 4ZNFsG6kc0z5sGhV; Wed, 26 Mar 2025 18:37:54 +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 4ZNFsG48sJz41vf; Wed, 26 Mar 2025 18:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743014274; 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=cU7lHyDcy9TOIJfpc2x8LKmRwvDo6sm1Dr1cV3grVmw=; b=kl5B/bnJDAuaseN9OJIaoTVc+H/UctDEjPXNIEA1j17SHtzQZ0dGdv39Bq+8g7ZQiwVtnH Keovz3HzYmhsC291Zg0rqPjd4uiMpRg+6gQ1JURD8ckDRg+FTmVh9dvOmgKVlYxtTjpSrU eouEZ/Hjk9k8GVRhAnrq/1AmgUfurq8CWxdLpOKd027zamUQ7PwaWAHfiEmvPm2gM88y8S h6YueMFWS5zKFJANCIi1qDRHtM34LjkAwxTN9H5QlsfY1c2ZYp6p5/G0nDH1PjTbeT5jQW IdOlN+2U1qMEYqKtadxKvY/oWYSQtq5T1rA2QnFiI8DOWC24ALwJ6MeOI0t4rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743014274; a=rsa-sha256; cv=none; b=R9O8KHILyZ+QVZ06+IFdELvKHofW6QiwepcVXcZwsKdyj9OmclQVNymnR383VZPGDWNjwR MqHYIdEla64GEw/VFIZrtSaVTxi9nHDA2PoSaIWiWEB1JUArS+lPLfLzL4PGLVUx0M3F89 3xdaFRzMDlVFerTRKcsFWNMH/B/rHa8V3yRiE2Y0iTiSvUgEUF2tKA4+EzRmPauAiBRn6k 1k5KSuMbRg+4+zzMeHcrn1yx6Y53buMOiToHVizGxLBo+De9ELVFP57TcH1mys1Y90nuB/ obWYpjI1V7Kjh1k2KnjGsMevtAC6cVA8HtJR3vqyGp6RugDXX+TIjcGGjSsIZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743014274; 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=cU7lHyDcy9TOIJfpc2x8LKmRwvDo6sm1Dr1cV3grVmw=; b=bwK/PEofbieOhr4ZJlwzd+8SleirgSje2QOTNGAmlUcnEBUWKCQBxdNNPG1fH8LlSVK22+ iinyxr0E4QJtTCfY6jsarZbapCDTxkduqZUNCf2+Rjeu8XDc4uMsJPUb6aQDRCznV7OmPm KyTWoGjz1WDNVMMKKmOBEIooaszKSxQQFKVjsgFkVjNil6ntYpLzBW6Wk442+pHRRXOoZz 2wLt6HrOpz8WHlE1hzF8Q14hBZACl2qyZCBvbcVD32gohixZ+qG27mo92suYtxEnlRQJpI Y3QFD6KyyxrdT48f2XWDnOUyoQJGgVjYZjPbI7D1SfLFz6qGU90ihyB4UoSu8g== 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 4ZNFsG3bvSz6xg; Wed, 26 Mar 2025 18:37:54 +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 52QIbsge072218; Wed, 26 Mar 2025 18:37:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 52QIbsua072215; Wed, 26 Mar 2025 18:37:54 GMT (envelope-from git) Date: Wed, 26 Mar 2025 18:37:54 GMT Message-Id: <202503261837.52QIbsua072215@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: e6daa211c609 - main - editors/abiword: fix build with libc++ 19 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@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/main X-Git-Reftype: branch X-Git-Commit: e6daa211c609bde6ed3fe00fd5ce675714371805 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=e6daa211c609bde6ed3fe00fd5ce675714371805 commit e6daa211c609bde6ed3fe00fd5ce675714371805 Author: Dimitry Andric AuthorDate: 2025-03-25 19:20:28 +0000 Commit: Dimitry Andric CommitDate: 2025-03-26 18:36:56 +0000 editors/abiword: 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 editors/abiword 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, | ^ ut_string_class.cpp:1275:41: note: in instantiation of template class 'std::basic_string' requested here 1275 | : pimpl(new UT_StringImpl(*rhs.pimpl)) | ^ /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 `UT_UCS4Char` as `char32_t` instead of `gunichar`, and patching up a few places where those types are mixed indiscriminately. [1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals PR: 285657 Approved by: gnome (fluffy) MFH: 2025Q1 --- .../files/patch-plugins_kword_xp_ie__imp__KWord__1.cpp | 11 +++++++++++ .../abiword/files/patch-src_af_ev_gtk_ev__UnixKeyboard.cpp | 11 +++++++++++ .../abiword/files/patch-src_af_gr_xp_gr__CairoGraphics.cpp | 11 +++++++++++ editors/abiword/files/patch-src_af_util_xp_ut__types.h | 11 +++++++++++ .../files/patch-src_text_fmt_xp_fv__View__protected.cpp | 11 +++++++++++ .../files/patch-src_wp_ap_gtk_ap__UnixDialog__Options.cpp | 11 +++++++++++ .../abiword/files/patch-src_wp_ap_xp_ap__Menu__Functions.cpp | 11 +++++++++++ 7 files changed, 77 insertions(+) diff --git a/editors/abiword/files/patch-plugins_kword_xp_ie__imp__KWord__1.cpp b/editors/abiword/files/patch-plugins_kword_xp_ie__imp__KWord__1.cpp new file mode 100644 index 000000000000..6f18251f9fac --- /dev/null +++ b/editors/abiword/files/patch-plugins_kword_xp_ie__imp__KWord__1.cpp @@ -0,0 +1,11 @@ +--- plugins/kword/xp/ie_imp_KWord_1.cpp.orig 2021-07-03 15:46:07 UTC ++++ plugins/kword/xp/ie_imp_KWord_1.cpp +@@ -180,7 +180,7 @@ void IE_Imp_KWord_1::charData(const gchar *s, int len) + m_charDataSeen[m_lenCharDataSeen++] = currentChar; + if (m_lenCharDataSeen == m_lenCharDataExpected) + { +- buf += g_utf8_get_char(m_charDataSeen); ++ buf += static_cast(g_utf8_get_char(m_charDataSeen)); + m_lenCharDataSeen = 0; + } + } diff --git a/editors/abiword/files/patch-src_af_ev_gtk_ev__UnixKeyboard.cpp b/editors/abiword/files/patch-src_af_ev_gtk_ev__UnixKeyboard.cpp new file mode 100644 index 000000000000..7bcd4e0f414a --- /dev/null +++ b/editors/abiword/files/patch-src_af_ev_gtk_ev__UnixKeyboard.cpp @@ -0,0 +1,11 @@ +--- src/af/ev/gtk/ev_UnixKeyboard.cpp.orig 2021-07-03 15:46:07 UTC ++++ src/af/ev/gtk/ev_UnixKeyboard.cpp +@@ -130,7 +130,7 @@ bool ev_UnixKeyboard::keyPressEvent(AV_View* pView, Gd + { + // TODO: is this necessary? + charData = gdk_keyval_to_unicode (charData); +- UT_UTF8String utf8 (static_cast(&charData), 1); ++ UT_UTF8String utf8 (reinterpret_cast(&charData), 1); + return charDataEvent (pView, state, utf8.utf8_str(), utf8.byteLength()); + } + diff --git a/editors/abiword/files/patch-src_af_gr_xp_gr__CairoGraphics.cpp b/editors/abiword/files/patch-src_af_gr_xp_gr__CairoGraphics.cpp new file mode 100644 index 000000000000..0d748743a49c --- /dev/null +++ b/editors/abiword/files/patch-src_af_gr_xp_gr__CairoGraphics.cpp @@ -0,0 +1,11 @@ +--- src/af/gr/xp/gr_CairoGraphics.cpp.orig 2021-07-03 15:46:07 UTC ++++ src/af/gr/xp/gr_CairoGraphics.cpp +@@ -535,7 +535,7 @@ void GR_CairoGraphics::drawGlyph(UT_uint32 Char, UT_si + + void GR_CairoGraphics::drawGlyph(UT_uint32 Char, UT_sint32 xoff, UT_sint32 yoff) + { +- drawChars(&Char, 0, 1, xoff, yoff, NULL); ++ drawChars(reinterpret_cast(&Char), 0, 1, xoff, yoff, NULL); + } + + void GR_CairoGraphics::setColorSpace(GR_Graphics::ColorSpace /* c */) diff --git a/editors/abiword/files/patch-src_af_util_xp_ut__types.h b/editors/abiword/files/patch-src_af_util_xp_ut__types.h new file mode 100644 index 000000000000..d8eadeffacae --- /dev/null +++ b/editors/abiword/files/patch-src_af_util_xp_ut__types.h @@ -0,0 +1,11 @@ +--- src/af/util/xp/ut_types.h.orig 2021-07-03 15:46:07 UTC ++++ src/af/util/xp/ut_types.h +@@ -40,7 +40,7 @@ typedef guint8 UT_Byte; + + typedef guint8 UT_Byte; + +-typedef gunichar UT_UCS4Char; ++typedef char32_t UT_UCS4Char; + typedef guint16 UT_UCS2Char; + typedef gint32 UT_GrowBufElement; + diff --git a/editors/abiword/files/patch-src_text_fmt_xp_fv__View__protected.cpp b/editors/abiword/files/patch-src_text_fmt_xp_fv__View__protected.cpp new file mode 100644 index 000000000000..2a9a0c69c089 --- /dev/null +++ b/editors/abiword/files/patch-src_text_fmt_xp_fv__View__protected.cpp @@ -0,0 +1,11 @@ +--- src/text/fmt/xp/fv_View_protected.cpp.orig 2021-07-03 15:46:07 UTC ++++ src/text/fmt/xp/fv_View_protected.cpp +@@ -5752,7 +5752,7 @@ UT_UCSChar * FV_View::_lookupSuggestion(fl_BlockLayout + UT_uint32 len = iLength; + for (UT_uint32 ldex=0; ldex < len && ldex < INPUTWORDLEN; ldex++) + { +- stMisspelledWord += *pWord == UCS_RQUOTE ? '\'' : *pWord; ++ stMisspelledWord += *pWord == UCS_RQUOTE ? U'\'' : *pWord; + ++pWord; + } + diff --git a/editors/abiword/files/patch-src_wp_ap_gtk_ap__UnixDialog__Options.cpp b/editors/abiword/files/patch-src_wp_ap_gtk_ap__UnixDialog__Options.cpp new file mode 100644 index 000000000000..46f8c131d284 --- /dev/null +++ b/editors/abiword/files/patch-src_wp_ap_gtk_ap__UnixDialog__Options.cpp @@ -0,0 +1,11 @@ +--- src/wp/ap/gtk/ap_UnixDialog_Options.cpp.orig 2021-07-03 15:46:07 UTC ++++ src/wp/ap/gtk/ap_UnixDialog_Options.cpp +@@ -959,7 +959,7 @@ void AP_UnixDialog_Options::_setupSmartQuotesCombos( + wszDisplayString[1] = (gunichar)'O'; + wszDisplayString[2] = XAP_EncodingManager::smartQuoteStyles[i].rightQuote; + wszDisplayString[3] = (gunichar)0; +- gchar* szDisplayStringUTF8 = g_ucs4_to_utf8 ( wszDisplayString, -1, NULL, NULL, NULL ); ++ gchar* szDisplayStringUTF8 = g_ucs4_to_utf8 ( reinterpret_cast(wszDisplayString), -1, NULL, NULL, NULL ); + XAP_appendComboBoxTextAndInt(combo, szDisplayStringUTF8, i); + g_free ( szDisplayStringUTF8 ); + } diff --git a/editors/abiword/files/patch-src_wp_ap_xp_ap__Menu__Functions.cpp b/editors/abiword/files/patch-src_wp_ap_xp_ap__Menu__Functions.cpp new file mode 100644 index 000000000000..f10d22f56c21 --- /dev/null +++ b/editors/abiword/files/patch-src_wp_ap_xp_ap__Menu__Functions.cpp @@ -0,0 +1,11 @@ +--- src/wp/ap/xp/ap_Menu_Functions.cpp.orig 2021-07-03 15:46:07 UTC ++++ src/wp/ap/xp/ap_Menu_Functions.cpp +@@ -744,7 +744,7 @@ Defun_EV_GetMenuItemComputedLabel_Fn(ap_GetLabel_Sugge + UT_UCSChar *p = pView->getContextSuggest(ndx); + gchar * c = NULL; + if (p && *p) { +- c = g_ucs4_to_utf8(p, -1, NULL, NULL, NULL); ++ c = g_ucs4_to_utf8(reinterpret_cast(p), -1, NULL, NULL, NULL); + } + else if (ndx == 1) + {