aboutsummaryrefslogtreecommitdiff
path: root/lang/guile2
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2017-12-30 19:12:39 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2017-12-30 19:12:39 +0000
commitf9ff44556b07884bea2734e165719f63c74c35f7 (patch)
tree3ad7c134b78e49db117c8a23271f974f3a321a0f /lang/guile2
parent49a2de1519a9fa434957ac835e8014c86969ee64 (diff)
downloadports-f9ff44556b07884bea2734e165719f63c74c35f7.tar.gz
ports-f9ff44556b07884bea2734e165719f63c74c35f7.zip
Unbreak the build on architectures which still use GCC 4.2.1 as system
compiler. Guile attempts to redefine _Static_assert (in `lib/verify.h') based on compiler support, but its overrides do not play nice with our /usr/include/complex.h header file. Simply do not include `lib/verify.h' in `libguile/numbers.c' to avoid the problem. Be conservative and conditionally inhibit including this header only when building with older versions of GCC (before 4.6.0). While here, move INFO knob where it logically belongs in the Makefile and add a couple of extra linefeeds to improve readability thereof. Tested on: i386, powerpc, sparc64
Notes
Notes: svn path=/head/; revision=457632
Diffstat (limited to 'lang/guile2')
-rw-r--r--lang/guile2/Makefile8
-rw-r--r--lang/guile2/files/patch-libguile_numbers.c16
2 files changed, 18 insertions, 6 deletions
diff --git a/lang/guile2/Makefile b/lang/guile2/Makefile
index e58f6dbb1fa6..206e2868e491 100644
--- a/lang/guile2/Makefile
+++ b/lang/guile2/Makefile
@@ -21,8 +21,6 @@ LIB_DEPENDS= libgmp.so:math/gmp \
CONFLICTS_INSTALL= guile-[0-9]*
MAKE_JOBS_UNSAFE= yes
-BROKEN_powerpc64= does not build: error: expected declaration specifiers or ... before __builtin_choose_expr
-BROKEN_sparc64= fails to compile: errors in complex.h
USES= charsetfix gmake libtool makeinfo ncurses pathfix pkgconfig \
readline
@@ -32,13 +30,17 @@ CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib
INSTALL_TARGET= install-strip
+INFO= guile r5rs
+
PLIST_SUB= GUILE_VER=${PORTVERSION:R}
OPTIONS_DEFINE= NLS THREADS
OPTIONS_DEFAULT=THREADS
OPTIONS_SUB= yes
+
NLS_CONFIGURE_ENABLE= nls
NLS_USES= gettext
+
THREADS_CONFIGURE_WITH= threads
THREADS_LIB_DEPENDS= libgc-threaded.so:devel/boehm-gc-threaded
THREADS_LIB_DEPENDS_OFF= libgc.so:devel/boehm-gc
@@ -47,8 +49,6 @@ REINPLACE_FILES= libguile/smob.c libguile/filesys.c libguile/gc.c \
libguile/mallocs.c libguile/eval.c \
libguile/gc-malloc.c libguile/ports.c
-INFO= guile r5rs
-
post-patch:
@cd ${WRKSRC} ; \
${REINPLACE_CMD} -e 's|<malloc\.h>|<stdlib.h>|g' ${REINPLACE_FILES}
diff --git a/lang/guile2/files/patch-libguile_numbers.c b/lang/guile2/files/patch-libguile_numbers.c
index ea13cc1c21c3..ebf0a522ff1b 100644
--- a/lang/guile2/files/patch-libguile_numbers.c
+++ b/lang/guile2/files/patch-libguile_numbers.c
@@ -1,6 +1,18 @@
---- libguile/numbers.c.orig 2014-03-12 13:24:54 UTC
+--- libguile/numbers.c.orig 2016-12-15 00:03:33 UTC
+++ libguile/numbers.c
-@@ -183,7 +183,7 @@ static double atanh (double x) { return
+@@ -45,7 +45,11 @@
+ # include <config.h>
+ #endif
+
++/* With old GCC, do not override _Static_assert: it conflicts with
++ #include <complex.h> below. */
++#if __clang__ || (__GNUC__ >= 4 && __GNUC_MINOR__ >= 6)
+ #include <verify.h>
++#endif
+ #include <assert.h>
+
+ #include <math.h>
+@@ -183,7 +187,7 @@ static double atanh (double x) { return 0.5 * log ((1
#if defined (GUILE_I)