aboutsummaryrefslogtreecommitdiffstats
path: root/lang/qscheme
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2017-06-27 23:34:17 +0800
committertobik <tobik@FreeBSD.org>2017-06-27 23:34:17 +0800
commit34f89cc476297f68587adbc67fe0c65f2e9c8e54 (patch)
treeff1581915cc0ce3d275f2b36c62a088ff48576a6 /lang/qscheme
parent4cf1be2768af64e3d61cd7f31f58f3da3e1778bd (diff)
downloadfreebsd-ports-gnome-34f89cc476297f68587adbc67fe0c65f2e9c8e54.tar.gz
freebsd-ports-gnome-34f89cc476297f68587adbc67fe0c65f2e9c8e54.tar.zst
freebsd-ports-gnome-34f89cc476297f68587adbc67fe0c65f2e9c8e54.zip
- Fix build with clang and remove USE_GCC
- Link dynamically with libavcall, libpcre and libgmp and fix build on amd64 (and optimistically sparc64 too) - Remove the devel/libgetline dependency and don't link with libgetline: While libgetline provides getline() it has an entirely different signature than getline(3). This make the fgetline builtin function unusable and causes e.g. the cat.scm example to segfault. Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D11352
Diffstat (limited to 'lang/qscheme')
-rw-r--r--lang/qscheme/Makefile27
-rw-r--r--lang/qscheme/files/patch-asm.c29
2 files changed, 36 insertions, 20 deletions
diff --git a/lang/qscheme/Makefile b/lang/qscheme/Makefile
index 006531685d0d..9db92ca40dbc 100644
--- a/lang/qscheme/Makefile
+++ b/lang/qscheme/Makefile
@@ -3,7 +3,7 @@
PORTNAME= qscheme
PORTVERSION= 0.5.1
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= lang scheme
MASTER_SITES= http://www.sof.ch/dan/qscheme/files/
@@ -12,34 +12,21 @@ COMMENT= Small and fast Scheme interpreter
LICENSE= GPLv2
-BUILD_DEPENDS= ${LOCALBASE}/lib/libavcall.a:devel/ffcall \
- ${LOCALBASE}/lib/libpcre.a:devel/pcre \
- ${LOCALBASE}/lib/libgmp.a:math/gmp
-LIB_DEPENDS= libgetline.so:devel/libgetline
+LIB_DEPENDS= libavcall.so:devel/ffcall \
+ libgmp.so:math/gmp \
+ libpcre.so:devel/pcre
-USES= gmake perl5 shebangfix
+USES= gmake localbase perl5 shebangfix
USE_PERL5= build
SHEBANG_FILES= mkoptable
-USE_GCC= any
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-pcre-dir=${LOCALBASE}/lib \
- --with-pcre-inc=${LOCALBASE}/include \
- --with-avcall-dir=${LOCALBASE}/lib \
- --with-avcall-inc=${LOCALBASE}/include \
- --with-gmp-dir=${LOCALBASE}/lib \
- --with-gmp-inc=${LOCALBASE}/include
-CFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -lgetline
+CFLAGS+= -fPIC
+MAKE_ARGS= PCRE_LIB="-L${LOCALBASE}/lib -lpcre"
PLIST_SUB= VERSION="${PORTVERSION}"
PORTDOCS= *
-# because it uses static pcre lib, which is compiled without -fPIC.
-# pcre problem likely.
-BROKEN_amd64= Does not build on ${ARCH}
-BROKEN_sparc64= Does not build on ${ARCH}
-
OPTIONS_DEFINE= DOCS
post-patch:
diff --git a/lang/qscheme/files/patch-asm.c b/lang/qscheme/files/patch-asm.c
new file mode 100644
index 000000000000..8a78fe2ec29c
--- /dev/null
+++ b/lang/qscheme/files/patch-asm.c
@@ -0,0 +1,29 @@
+Fix build with clang
+
+asm.c:1343:21: error: function definition is not allowed here
+ SOBJ prim(char *x) {
+ ^
+--- asm.c.orig 2017-06-24 19:10:34 UTC
++++ asm.c
+@@ -1334,16 +1334,17 @@ static SOBJ scm_compile_quote(SOBJ icode, SOBJ argl, S
+ return(icode);
+ }
+
++static SOBJ prim(char *x) {
++ int dummy;
++ return(SCM_SYM_VALUE(lookup_atom(scm_mkatom(x),NULL,&dummy,FALSE)));
++}
++
+ /*-- KKK: should try to compile parial constant list */
+ SOBJ backquotify(SOBJ ic, SOBJ l, SOBJ env, int level)
+ {
+ static SOBJ sym_cons, sym_append, sym_list2, sym_list2vec;
+
+ if (sym_cons == NULL) {
+- SOBJ prim(char *x) {
+- int dummy;
+- return(SCM_SYM_VALUE(lookup_atom(scm_mkatom(x),NULL,&dummy,FALSE)));
+- }
+ sym_cons = prim("cons");
+ sym_list2 = prim("list2");
+ sym_append = prim("qq-append2");