From nobody Sun Oct 27 16:22:19 2024 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 4Xc1y34z08z5bBnP; Sun, 27 Oct 2024 16:22:19 +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 4Xc1y34CwMz4NZy; Sun, 27 Oct 2024 16:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730046139; 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=xjI26iSjueawCegYlze87LrMqgXFttCvNhRL32bccXE=; b=o9QUm7cR3g619VoHFxtGti2H8Jb4qlAf79RC0BVlqbreqLqi1DvFU4fQdu192wRfI+gJHr yuHH+jd66AjDWlz3Upx1b0BpOsTFZ453eyhTrt/AT0DHjNL3MZiqCMwbisjmZWLYVAfF4a S9pCNntyMOelXeBD0jDRvj5ge3Bj1QQ2bSwA9Rkqiv0LeWGm4z2L8bz6aHkhSX3m8haR3d E2ZyFR4EDQTspLB56mFUD0vh87Wxj5og4luziFYuM0tIyEbVnhUr0YGUUcSwm5kMKsptp0 OwPPeeTf0OG6oNv27PXIpix90SkUn2JRUiry1GtIx+3HipMBZ711PM9ASM/jFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730046139; 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=xjI26iSjueawCegYlze87LrMqgXFttCvNhRL32bccXE=; b=QH2ynrHZwVSYwPrBFjRrjIG05qlc+cvnxhreLg4m/cg7r5RZWSwOuuUa51h4njVa5v65fl n5/Xm0xz4V7KY3xYniKrTANhlPt9Je4ksR6XKvxuX5y9ztvQTmJvRCONXnJLM4lWrocdBU dhflfF+hVaIsJbQm6SblTqbA0X83ETb6C5LV/JnvS+qlA+SKPQ7Gyx/xTq/2n4m+nlYbHV y/NrHxhyBCf2xzuGADochHiAZBMBHrGyuAEm7yT5Fv/lkwWI40Wj8WuJKepZqfjO371/Ho kjN0q4FUxHHbJlc3j61v04s93Stm3sBEiHvl/737Z0FkHRgJwysfpTSjejaEcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730046139; a=rsa-sha256; cv=none; b=SucYekns0d2FE4Cdo6FrT1YEExvRjiVd29INK+t9eEgMz6IHRQEvkywlNUrUM2f9EbOQxU +yaf39I8qqe14I3MCHc14fA9EMqSOt0n2Nhlm68BgwwGCEJeu5oCaf0MeOqMZvXmzpLtO6 jN1KyDwZALLhiYj889siGWwofS19bnqJpNQukHVGVoBFHEmUb+XpVkii2r3V5JfwrM6+kc wFSTBY+XufegXRf3J0/16gH1a9KDqvJ9AStJoinyG8AGJPly5qOe1ZQwh+ZyJyaNUfG5Qi u8sJxmZvOqamBxIiJfbzvMtDVIYUh/gVEG0OHEU/FeOkfYiYx8C9us0xrS+ubA== 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 4Xc1y338Mgz11sm; Sun, 27 Oct 2024 16:22:19 +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 49RGMJWK016170; Sun, 27 Oct 2024 16:22:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49RGMJvT016167; Sun, 27 Oct 2024 16:22:19 GMT (envelope-from git) Date: Sun, 27 Oct 2024 16:22:19 GMT Message-Id: <202410271622.49RGMJvT016167@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Christoph Moench-Tegeder Subject: git: 74e2551e863b - main - mail/thunderbird: fix build with clang 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: cmt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74e2551e863ba50a34faeeec03b82a078e8cb8e2 Auto-Submitted: auto-generated The branch main has been updated by cmt: URL: https://cgit.FreeBSD.org/ports/commit/?id=74e2551e863ba50a34faeeec03b82a078e8cb8e2 commit 74e2551e863ba50a34faeeec03b82a078e8cb8e2 Author: Christoph Moench-Tegeder AuthorDate: 2024-10-27 16:20:12 +0000 Commit: Christoph Moench-Tegeder CommitDate: 2024-10-27 16:20:12 +0000 mail/thunderbird: fix build with clang 19 clang/libcxx 19 is more strict about std::char_traits, causing build failure in the rnp submodule. Import patches from upstream (rnp). PR: 282347 Submitted by: jkim@ --- mail/thunderbird/files/patch-rnp-clang19 | 200 +++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) diff --git a/mail/thunderbird/files/patch-rnp-clang19 b/mail/thunderbird/files/patch-rnp-clang19 new file mode 100644 index 000000000000..e943dcdea81e --- /dev/null +++ b/mail/thunderbird/files/patch-rnp-clang19 @@ -0,0 +1,200 @@ +In clang/libcxx 19, treatment of std::char_traits was tightened +down - e.g. no generic (std::char_traits etc) traits +are not implemented anymore - which resulted in fallout in HEAD +after the import of llvm/libcxx 19. +jkim@ collected the neccessary patches from +https://github.com/rnpgp/rnp/commit/20419f739f632fb30666650544f0055e8d4f1afa +https://github.com/rnpgp/sexpp/commit/46744a14ffc235330bb99cebfaf294829c31bba4 + +--- comm/third_party/rnp/src/lib/types.h.orig 2024-10-25 23:29:32 UTC ++++ comm/third_party/rnp/src/lib/types.h +@@ -95,9 +95,6 @@ class id_str_pair { + static int lookup(const id_str_pair pair[], + const std::vector &bytes, + int notfound = 0); +- static int lookup(const id_str_pair pair[], +- const std::basic_string &bytes, +- int notfound = 0); + }; + + /** pgp_fingerprint_t */ +--- comm/third_party/rnp/src/lib/utils.cpp.orig 2024-10-25 23:29:32 UTC ++++ comm/third_party/rnp/src/lib/utils.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2021, [Ribose Inc](https://www.ribose.com). ++ * Copyright (c) 2021, 2024 [Ribose Inc](https://www.ribose.com). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -53,21 +53,6 @@ id_str_pair::lookup(const id_str_pair pair[], const st + + int + id_str_pair::lookup(const id_str_pair pair[], const std::vector &bytes, int notfound) +-{ +- while (pair && pair->str) { +- if ((strlen(pair->str) == bytes.size()) && +- !memcmp(pair->str, bytes.data(), bytes.size())) { +- return pair->id; +- } +- pair++; +- } +- return notfound; +-} +- +-int +-id_str_pair::lookup(const id_str_pair pair[], +- const std::basic_string &bytes, +- int notfound) + { + while (pair && pair->str) { + if ((strlen(pair->str) == bytes.size()) && +--- comm/third_party/rnp/src/librekey/key_store_g10.cpp.orig 2024-10-25 23:29:32 UTC ++++ comm/third_party/rnp/src/librekey/key_store_g10.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2017-2022, [Ribose Inc](https://www.ribose.com). ++ * Copyright (c) 2017-2024, [Ribose Inc](https://www.ribose.com). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -312,12 +312,12 @@ read_curve(const sexp_list_t *list, const std::string + + const auto &bytes = data->get_string(); + pgp_curve_t curve = static_cast( +- id_str_pair::lookup(g10_curve_aliases, data->get_string(), PGP_CURVE_UNKNOWN)); ++ id_str_pair::lookup(g10_curve_aliases, (const char *) bytes.data(), PGP_CURVE_UNKNOWN)); + if (curve != PGP_CURVE_UNKNOWN) { + key.curve = curve; + return true; + } +- RNP_LOG("Unknown curve: %.*s", (int) bytes.size(), (char *) bytes.data()); ++ RNP_LOG("Unknown curve: %.*s", (int) bytes.size(), (const char *) bytes.data()); + return false; + } + +@@ -806,7 +806,7 @@ g23_parse_seckey(pgp_key_pkt_t &seckey, + + auto & alg_bt = alg_s_exp->sexp_string_at(0)->get_string(); + pgp_pubkey_alg_t alg = static_cast( +- id_str_pair::lookup(g10_alg_aliases, alg_bt.c_str(), PGP_PKA_NOTHING)); ++ id_str_pair::lookup(g10_alg_aliases, (const char *) alg_bt.data(), PGP_PKA_NOTHING)); + if (alg == PGP_PKA_NOTHING) { + RNP_LOG( + "Unsupported algorithm: '%.*s'", (int) alg_bt.size(), (const char *) alg_bt.data()); +--- comm/third_party/rnp/src/libsexpp/include/sexpp/sexp.h.orig 2024-10-25 23:29:32.000000000 +0000 ++++ comm/third_party/rnp/src/libsexpp/include/sexpp/sexp.h 2024-10-27 06:14:59.238155000 +0000 +@@ -44,8 +44,93 @@ + #include "sexp-public.h" + #include "sexp-error.h" + ++// We are implementing char traits for octet_t with trhe following restrictions ++// -- limit visibility so that other traits for unsigned char are still possible ++// -- create template specializatio in std workspace (use workspace specialization ++// is not specified and causes issues at least with gcc 4.8 ++ + namespace sexp { ++using octet_t = uint8_t; ++} // namespace sexp + ++namespace std { ++ ++template <> struct char_traits { ++ typedef sexp::octet_t char_type; ++ typedef int int_type; ++ typedef std::streampos pos_type; ++ typedef std::streamoff off_type; ++ typedef mbstate_t state_type; ++ ++ static void assign(char_type &__c1, const char_type &__c2) noexcept { __c1 = __c2; } ++ ++ static constexpr bool eq(const char_type &__c1, const char_type &__c2) noexcept ++ { ++ return __c1 == __c2; ++ } ++ ++ static constexpr bool lt(const char_type &__c1, const char_type &__c2) noexcept ++ { ++ return __c1 < __c2; ++ } ++ ++ static int compare(const char_type *__s1, const char_type *__s2, size_t __n) ++ { ++ return memcmp(__s1, __s2, __n); ++ } ++ ++ static size_t length(const char_type *__s) ++ { ++ return strlen(reinterpret_cast(__s)); ++ } ++ ++ static const char_type *find(const char_type *__s, size_t __n, const char_type &__a) ++ { ++ return static_cast(memchr(__s, __a, __n)); ++ } ++ ++ static char_type *move(char_type *__s1, const char_type *__s2, size_t __n) ++ { ++ return static_cast(memmove(__s1, __s2, __n)); ++ } ++ ++ static char_type *copy(char_type *__s1, const char_type *__s2, size_t __n) ++ { ++ return static_cast(memcpy(__s1, __s2, __n)); ++ } ++ ++ static char_type *assign(char_type *__s, size_t __n, char_type __a) ++ { ++ return static_cast(memset(__s, __a, __n)); ++ } ++ ++ static constexpr char_type to_char_type(const int_type &__c) noexcept ++ { ++ return static_cast(__c); ++ } ++ ++ // To keep both the byte 0xff and the eof symbol 0xffffffff ++ // from ending up as 0xffffffff. ++ static constexpr int_type to_int_type(const char_type &__c) noexcept ++ { ++ return static_cast(static_cast(__c)); ++ } ++ ++ static constexpr bool eq_int_type(const int_type &__c1, const int_type &__c2) noexcept ++ { ++ return __c1 == __c2; ++ } ++ ++ static constexpr int_type eof() noexcept { return static_cast(0xFFFFFFFF); } ++ ++ static constexpr int_type not_eof(const int_type &__c) noexcept ++ { ++ return (__c == eof()) ? 0 : __c; ++ } ++}; ++} // namespace std ++ ++namespace sexp { + /* + * SEXP octet_t definitions + * We maintain some presumable redundancy with ctype +@@ -99,14 +184,14 @@ class sexp_input_stream_t; + * SEXP simple string + */ + +-typedef uint8_t octet_t; ++using octet_traits = std::char_traits; ++using octet_string = std::basic_string; + +-class SEXP_PUBLIC_SYMBOL sexp_simple_string_t : public std::basic_string, +- private sexp_char_defs_t { ++class SEXP_PUBLIC_SYMBOL sexp_simple_string_t : public octet_string, private sexp_char_defs_t { + public: + sexp_simple_string_t(void) = default; +- sexp_simple_string_t(const octet_t *dt) : std::basic_string{dt} {} +- sexp_simple_string_t(const octet_t *bt, size_t ln) : std::basic_string{bt, ln} {} ++ sexp_simple_string_t(const octet_t *dt) : octet_string{dt} {} ++ sexp_simple_string_t(const octet_t *bt, size_t ln) : octet_string{bt, ln} {} + sexp_simple_string_t &append(int c) + { + (*this) += (octet_t)(c & 0xFF);