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 453DF158020 for ; Wed, 23 Nov 2022 00:48:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DAF8AE0BEB; Wed, 23 Nov 2022 00:48:44 +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 C2039E0BEA for ; Wed, 23 Nov 2022 00:48:44 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7DF8A341372 for ; Wed, 23 Nov 2022 00:48:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CBFD0757 for ; Wed, 23 Nov 2022 00:48:41 +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: <1669163348.62fd83e4fe0ed20c7228a06acc880dc5a8d39224.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-tcltk/tclreadline/files/, dev-tcltk/tclreadline/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-tcltk/tclreadline/files/tclreadline-2.3.8-configure-clang16.patch dev-tcltk/tclreadline/tclreadline-2.3.8-r1.ebuild dev-tcltk/tclreadline/tclreadline-2.3.8-r2.ebuild X-VCS-Directories: dev-tcltk/tclreadline/files/ dev-tcltk/tclreadline/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 62fd83e4fe0ed20c7228a06acc880dc5a8d39224 X-VCS-Branch: master Date: Wed, 23 Nov 2022 00:48:41 +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: e0c465d3-3cde-4f4f-a51a-842599d41c33 X-Archives-Hash: 06d6435cc803afdf6db1df40f0d7589f commit: 62fd83e4fe0ed20c7228a06acc880dc5a8d39224 Author: Sam James gentoo org> AuthorDate: Wed Nov 23 00:24:10 2022 +0000 Commit: Sam James gentoo org> CommitDate: Wed Nov 23 00:29:08 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62fd83e4 dev-tcltk/tclreadline: fix configure w/ clang 16 Signed-off-by: Sam James gentoo.org> .../tclreadline-2.3.8-configure-clang16.patch | 67 ++++++++++++++++++++++ ...2.3.8-r1.ebuild => tclreadline-2.3.8-r2.ebuild} | 23 ++++++-- 2 files changed, 84 insertions(+), 6 deletions(-) diff --git a/dev-tcltk/tclreadline/files/tclreadline-2.3.8-configure-clang16.patch b/dev-tcltk/tclreadline/files/tclreadline-2.3.8-configure-clang16.patch new file mode 100644 index 000000000000..1454cf54f698 --- /dev/null +++ b/dev-tcltk/tclreadline/files/tclreadline-2.3.8-configure-clang16.patch @@ -0,0 +1,67 @@ +https://github.com/flightaware/tclreadline/pull/46 + +From 8c75e01b814ac852167611f5edae9659a1f709d2 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Wed, 23 Nov 2022 00:19:55 +0000 +Subject: [PATCH 1/2] Fix configure.ac compatibility with Clang 16 + +Clang 16 makes -Wimplicit-function-declaration and -Wimplicit-int errors by default. + +Unfortunately, this can lead to misconfiguration or miscompilation of software as configure +tests may then return the wrong result. + +We also fix -Wstrict-prototypes while here as it's easy to do and it prepares +us for C23. + +For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki [2], +or the (new) c-std-porting mailing list [3]. + +[0] https://lwn.net/Articles/913505/ +[1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 +[2] https://wiki.gentoo.org/wiki/Modern_C_porting +[3] hosted at lists.linux.dev. + +Signed-off-by: Sam James +--- a/configure.ac ++++ b/configure.ac +@@ -245,7 +245,8 @@ AC_TRY_LINK(,[ + AC_MSG_CHECKING([for the readline version number]) + AC_TRY_RUN([ + #include +-int main () { ++#include ++int main (void) { + FILE *fp = fopen("conftestversion", "w"); + extern char *rl_library_version; + fprintf(fp, "%s", rl_library_version); + +From b64772750c7543fe66165fd7862b355d289412b6 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Wed, 23 Nov 2022 00:21:34 +0000 +Subject: [PATCH 2/2] Fix -Wint-conversion in readline configure test + +Fixes the following warning with Clang 16: +``` +configure:12873: clang-16 -o conftest -g -O2 conftest.c -lreadline >&5 +conftest.c:33:11: error: incompatible pointer to integer conversion passing 'FILE *' (aka 'struct _IO_FILE *') to parameter of type 'int' [-Wint-conversion] + close(fp); + ^~ +/usr/include/unistd.h:358:23: note: passing argument to parameter '__fd' here +extern int close (int __fd); +``` + +fopen should be paired with fclose. + +Signed-off-by: Sam James +--- a/configure.ac ++++ b/configure.ac +@@ -250,7 +250,7 @@ int main (void) { + FILE *fp = fopen("conftestversion", "w"); + extern char *rl_library_version; + fprintf(fp, "%s", rl_library_version); +- close(fp); ++ fclose(fp); + return 0; + }], + READLINE_VERSION=`cat conftestversion` + diff --git a/dev-tcltk/tclreadline/tclreadline-2.3.8-r1.ebuild b/dev-tcltk/tclreadline/tclreadline-2.3.8-r2.ebuild similarity index 74% rename from dev-tcltk/tclreadline/tclreadline-2.3.8-r1.ebuild rename to dev-tcltk/tclreadline/tclreadline-2.3.8-r2.ebuild index ff8d8154a93b..f19d330e2688 100644 --- a/dev-tcltk/tclreadline/tclreadline-2.3.8-r1.ebuild +++ b/dev-tcltk/tclreadline/tclreadline-2.3.8-r2.ebuild @@ -1,7 +1,9 @@ -# Copyright 2020-2021 Gentoo Authors +# Copyright 2020-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 + +inherit autotools DESCRIPTION="Readline extension to TCL" HOMEPAGE="https://github.com/flightaware/tclreadline" @@ -13,14 +15,23 @@ SLOT="0" KEYWORDS="~alpha amd64 ppc ~sparc x86 ~amd64-linux ~x86-linux" IUSE="tk" -DEPEND="dev-lang/tcl:0= - sys-libs/readline:0= - tk? ( dev-lang/tk:0= )" +DEPEND=" + dev-lang/tcl:= + sys-libs/readline:= + tk? ( dev-lang/tk:= ) +" RDEPEND="${DEPEND}" -BDEPEND="" + +PATCHES=( + "${FILESDIR}"/${PN}-2.3.8-configure-clang16.patch +) src_prepare() { default + + # Needed for Clang 16 patch, can drop once in a release + eautoreconf + sed -i \ -e "s|^\(TCLRL_LIBDIR\)=.*|\1=\"${EPREFIX}/usr/$(get_libdir)\"|" \ configure || die