commit:     5d6b66d8c11339660690afce73716a5a72c4658c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  4 03:14:00 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov  4 03:25:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d6b66d8

dev-lang/tcl: fix configure w/ clang 16

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../tcl/files/tcl-8.6.12-configure-clang16.patch   | 31 ++++++++++++++++++++++
 .../{tcl-8.6.12.ebuild => tcl-8.6.12-r1.ebuild}    |  1 +
 2 files changed, 32 insertions(+)

diff --git a/dev-lang/tcl/files/tcl-8.6.12-configure-clang16.patch 
b/dev-lang/tcl/files/tcl-8.6.12-configure-clang16.patch
new file mode 100644
index 000000000000..8714faccbe1b
--- /dev/null
+++ b/dev-lang/tcl/files/tcl-8.6.12-configure-clang16.patch
@@ -0,0 +1,31 @@
+https://github.com/tcltk/tcl/commit/5eb33c5c7e9d6b703275b680f337691ecfe38f2a
+
+From 5eb33c5c7e9d6b703275b680f337691ecfe38f2a Mon Sep 17 00:00:00 2001
+From: "jan.nijtmans" <nijtm...@users.sourceforge.net>
+Date: Sun, 7 Nov 2021 21:34:08 +0000
+Subject: [PATCH] Fix [15845d9fd8]: unix/tcl.m4: implicit declaration of exit()
+ in timezone variable checks
+
+--- a/unix/tcl.m4
++++ b/unix/tcl.m4
+@@ -2349,7 +2349,8 @@ AC_DEFUN([SC_TIME_HANDLER], [
+     # (like convex) have timezone functions, etc.
+     #
+     AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
+-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
++      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>
++#include <stdlib.h>]],
+       [[extern long timezone;
+           timezone += 1;
+           exit (0);]])],
+@@ -2361,7 +2362,8 @@ AC_DEFUN([SC_TIME_HANDLER], [
+       # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+       #
+       AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [
+-          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]],
++          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>
++#include <stdlib.h>]],
+           [[extern time_t timezone;
+               timezone += 1;
+               exit (0);]])],
+

diff --git a/dev-lang/tcl/tcl-8.6.12.ebuild b/dev-lang/tcl/tcl-8.6.12-r1.ebuild
similarity index 98%
rename from dev-lang/tcl/tcl-8.6.12.ebuild
rename to dev-lang/tcl/tcl-8.6.12-r1.ebuild
index 35226b4ca7ca..c7bd860d3075 100644
--- a/dev-lang/tcl/tcl-8.6.12.ebuild
+++ b/dev-lang/tcl/tcl-8.6.12-r1.ebuild
@@ -28,6 +28,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-8.6.10-multilib.patch
        "${FILESDIR}"/${PN}-8.6.8-conf.patch # Bug 125971
        "${FILESDIR}"/${PN}-8.6.9-include-spec.patch # Bug 731120
+       "${FILESDIR}"/${P}-configure-clang16.patch
 )
 
 src_prepare() {

Reply via email to