dev-scheme/guile: fix configure w/ clang 16 (3.0.x)

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2023-01-04 04:13:57 +00:00
parent ddfb19b4eb
commit bb73d2900a
2 changed files with 48 additions and 6 deletions

View File

@@ -0,0 +1,32 @@
https://src.fedoraproject.org/rpms/guile30/c/47f608ff4988547350e722606890698e3ec59e95?branch=rawhide
Avoid implicit ints in the guile_cv_localtime_cache check. It cause
the check to always fail with strict(er) C99 compilers that do not
support implicit int.
Submitted upstream:
<https://lists.gnu.org/archive/html/bug-guile/2022-12/msg00017.html>
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60022>
--- a/configure.ac
+++ b/configure.ac
@@ -1086,7 +1086,7 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>
# include <stdlib.h>
#endif
extern char **environ;
-unset_TZ ()
+int unset_TZ ()
{
char **from, **to;
for (to = from = environ; (*to = *from); from++)
@@ -1095,7 +1095,7 @@ unset_TZ ()
}
char TZ_GMT0[] = "TZ=GMT0";
char TZ_PST8[] = "TZ=PST8";
-main()
+int main()
{
time_t now = time ((time_t *) 0);
int hour_GMT0, hour_unset;

View File

@@ -1,8 +1,10 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
MAJOR="3.0"
DESCRIPTION="GNU Ubiquitous Intelligent Language for Extensions"
HOMEPAGE="https://www.gnu.org/software/guile/"
@@ -31,16 +33,24 @@ BDEPEND="
sys-devel/libtool
sys-devel/gettext"
PATCHES=(
"${FILESDIR}/${PN}-2.2.3-gentoo-sandbox.patch"
)
# guile generates ELF files without use of C or machine code
# It's a portage's false positive. bug #677600
# It's false positive. bug #677600
QA_PREBUILT='*[.]go'
DOCS=( GUILE-VERSION HACKING README )
PATCHES=(
"${FILESDIR}/${PN}-2.2.3-gentoo-sandbox.patch"
"${FILESDIR}/${P}-configure-clang16.patch"
)
src_prepare() {
default
# Can drop once guile-3.0.8-configure-clang16.patch merged
eautoreconf
}
src_configure() {
# see bug #676468
mv prebuilt/32-bit-big-endian{,.broken} || die