From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E3E6415ACFC for ; Fri, 5 May 2023 05:08:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 31606E095E; Fri, 5 May 2023 05:08:57 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1B0FBE095E for ; Fri, 5 May 2023 05:08:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 52F37341220 for ; Fri, 5 May 2023 05:08:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DF852A57 for ; Fri, 5 May 2023 05:08:54 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1683263299.365603f75e075df14603daa916aceb3d9519f3cd.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: gnome-extra/cjs/files/, gnome-extra/cjs/ X-VCS-Repository: repo/gentoo X-VCS-Files: gnome-extra/cjs/cjs-5.6.1.ebuild gnome-extra/cjs/files/cjs-5.6.1-clang15.patch X-VCS-Directories: gnome-extra/cjs/ gnome-extra/cjs/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 365603f75e075df14603daa916aceb3d9519f3cd X-VCS-Branch: master Date: Fri, 5 May 2023 05:08:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: df2b3633-6b2c-403a-87da-22b6bf89783e X-Archives-Hash: c2399a80125814a57b5fcd46cb231917 commit: 365603f75e075df14603daa916aceb3d9519f3cd Author: Sam James gentoo org> AuthorDate: Fri May 5 05:08:19 2023 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 5 05:08:19 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=365603f7 gnome-extra/cjs: fix build w/ clang 15 Closes: https://bugs.gentoo.org/905430 Signed-off-by: Sam James gentoo.org> gnome-extra/cjs/cjs-5.6.1.ebuild | 4 +++ gnome-extra/cjs/files/cjs-5.6.1-clang15.patch | 50 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/gnome-extra/cjs/cjs-5.6.1.ebuild b/gnome-extra/cjs/cjs-5.6.1.ebuild index e30a52266004..25a3e01843cd 100644 --- a/gnome-extra/cjs/cjs-5.6.1.ebuild +++ b/gnome-extra/cjs/cjs-5.6.1.ebuild @@ -38,6 +38,10 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}"/${PN}-5.6.1-clang15.patch +) + src_prepare() { default python_fix_shebang build diff --git a/gnome-extra/cjs/files/cjs-5.6.1-clang15.patch b/gnome-extra/cjs/files/cjs-5.6.1-clang15.patch new file mode 100644 index 000000000000..43439e6f2c2a --- /dev/null +++ b/gnome-extra/cjs/files/cjs-5.6.1-clang15.patch @@ -0,0 +1,50 @@ +https://bugs.gentoo.org/905430 +https://github.com/linuxmint/cjs/issues/115 +https://gitlab.gnome.org/GNOME/gjs/-/issues/514 +https://gitlab.gnome.org/GNOME/gjs/-/commit/9b11ed0ba70718a8b1983126563cea58658a808f + +From f93880c356108cfdbc8f9ebe318d18f256d7128d Mon Sep 17 00:00:00 2001 +From: Philip Chimento +Date: Sat, 5 Nov 2022 18:01:36 -0700 +Subject: [PATCH] tests: Avoid using char type in uniform_int_distribution + template + +This is undefined behaviour. GCC and pre-15.x Clang accept it, so we +didn't notice it before. + +Closes: #514 +--- a/test/gjs-tests.cpp ++++ b/test/gjs-tests.cpp +@@ -55,12 +55,30 @@ static unsigned cpp_random_seed = 0; + + using Gjs::Test::assert_equal; + ++template ++struct is_char_helper : public std::false_type {}; ++template <> ++struct is_char_helper : public std::true_type {}; ++template <> ++struct is_char_helper : public std::true_type {}; ++template <> ++struct is_char_helper : public std::true_type {}; ++template <> ++struct is_char_helper : public std::true_type {}; ++template ++struct is_char : public is_char_helper>::type {}; ++template ++inline constexpr bool is_char_v = is_char::value; ++ + template + T get_random_number() { + std::mt19937_64 gen(cpp_random_seed); + + if constexpr (std::is_same_v) { + return g_random_boolean(); ++ } else if constexpr (is_char_v) { ++ return std::char_traits::to_char_type( ++ get_random_number::int_type>()); + } else if constexpr (std::is_integral_v) { + T lowest_value = std::numeric_limits::lowest(); + +-- +GitLab