summaryrefslogtreecommitdiff
path: root/lang/newlisp/files
diff options
context:
space:
mode:
authorJimmy Olgeni <olgeni@FreeBSD.org>2013-03-09 21:28:49 +0000
committerJimmy Olgeni <olgeni@FreeBSD.org>2013-03-09 21:28:49 +0000
commite45341193944239158557611c72a9b6a609196ed (patch)
treed401251916e624215f8d490234ac641e09a96e12 /lang/newlisp/files
parentRemove some dead variables (diff)
Add support for the extended FFI, thus enabling the optional use
of the math/gsl interface. Also, cleanup Makefile patches.
Diffstat (limited to 'lang/newlisp/files')
-rw-r--r--lang/newlisp/files/patch-makefile_bsd11
-rw-r--r--lang/newlisp/files/patch-makefile_bsdLP64_utf819
-rw-r--r--lang/newlisp/files/patch-makefile_bsd_lib13
-rw-r--r--lang/newlisp/files/patch-makefile_bsd_utf811
-rw-r--r--lang/newlisp/files/patch-modules_gsl.lsp21
-rw-r--r--lang/newlisp/files/patch-newlisp.h16
6 files changed, 66 insertions, 25 deletions
diff --git a/lang/newlisp/files/patch-makefile_bsd b/lang/newlisp/files/patch-makefile_bsd
index 2c325c9a4221..7f13aa63789b 100644
--- a/lang/newlisp/files/patch-makefile_bsd
+++ b/lang/newlisp/files/patch-makefile_bsd
@@ -1,11 +1,14 @@
---- makefile_bsd.orig 2009-06-22 04:48:53.000000000 +0400
-+++ makefile_bsd 2009-07-02 14:37:54.000000000 +0400
+
+$FreeBSD$
+
+--- makefile_bsd.orig
++++ makefile_bsd
@@ -6,14 +6,12 @@
# the option -fno-strict-aliasing may not be available on some BSD versions
-CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD
-+CFLAGS = -m32 -c -DREADLINE -D_BSD
++CFLAGS += -m32 -c -DREADLINE -D_BSD -DFFI
# or without readline lib
#CFLAGS = -m32 -Wall -Wno-uninitialized -Wno-strict-aliasing -O2 -c -g -D_BSD
@@ -13,7 +16,7 @@
-
default: $(OBJS)
- $(CC) $(OBJS) -m32 -g -lm -lreadline -lncurses -o newlisp
-+ $(CC) $(OBJS) -m32 -lm -lreadline -lncurses -o newlisp
++ $(CC) $(LDFLAGS) $(OBJS) -m32 -lm -lreadline -lncurses -lffi -o newlisp
# or without readline lib
# $(CC) $(OBJS) -m32 -g -lm -o newlisp
strip newlisp
diff --git a/lang/newlisp/files/patch-makefile_bsdLP64_utf8 b/lang/newlisp/files/patch-makefile_bsdLP64_utf8
index 32d9a9c06edb..ab43c1715c14 100644
--- a/lang/newlisp/files/patch-makefile_bsdLP64_utf8
+++ b/lang/newlisp/files/patch-makefile_bsdLP64_utf8
@@ -1,11 +1,22 @@
---- makefile_bsdLP64_utf8.orig 2009-08-11 15:44:03.000000000 +0400
-+++ makefile_bsdLP64_utf8 2009-08-11 15:44:26.000000000 +0400
-@@ -6,7 +6,7 @@
+
+$FreeBSD$
+
+--- makefile_bsdLP64_utf8.orig
++++ makefile_bsdLP64_utf8
+@@ -6,14 +6,12 @@
# the option -fno-strict-aliasing may not be available on some BSD versions
-CFLAGS = -m64 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -DNEWLISP64 -DSUPPORT_UTF8 -D_BSD
-+CFLAGS += -c -DREADLINE -DNEWLISP64 -DSUPPORT_UTF8 -D_BSD
++CFLAGS += -m64 -c -DREADLINE -DNEWLISP64 -DSUPPORT_UTF8 -D_BSD -DFFI
# or without readline lib
#CFLAGS = -m64 -Wall -Wno-uninitialized -Wno-strict-aliasing -O2 -c -g -DNEWLISP64 -D_BSD
+-CC = gcc
+-
+ default: $(OBJS)
+- $(CC) $(OBJS) -m64 -g -lm -lreadline -lncurses -o newlisp
++ $(CC) $(LDFLAGS) $(OBJS) -m64 -lm -lreadline -lncurses -lffi -o newlisp
+ # or without readline lib
+ # $(CC) $(OBJS) -m64 -g -lm -o newlisp
+ strip newlisp
diff --git a/lang/newlisp/files/patch-makefile_bsd_lib b/lang/newlisp/files/patch-makefile_bsd_lib
deleted file mode 100644
index 5320fde41744..000000000000
--- a/lang/newlisp/files/patch-makefile_bsd_lib
+++ /dev/null
@@ -1,13 +0,0 @@
---- makefile_bsd_lib.orig 2011-09-21 07:21:04.000000000 -0700
-+++ makefile_bsd_lib 2011-11-13 21:18:47.000000000 -0800
-@@ -3,9 +3,7 @@
- OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o \
- nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o pcre.o unix-lib.o
-
--CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -D_BSD
--
--CC = gcc
-+CFLAGS = -m32 -c -D_BSD
-
- default: $(OBJS)
- $(CC) $(OBJS) -m32 -lm -shared -o newlisp.so
diff --git a/lang/newlisp/files/patch-makefile_bsd_utf8 b/lang/newlisp/files/patch-makefile_bsd_utf8
index b8de5757737b..73a27ac4b7b0 100644
--- a/lang/newlisp/files/patch-makefile_bsd_utf8
+++ b/lang/newlisp/files/patch-makefile_bsd_utf8
@@ -1,11 +1,14 @@
---- makefile_bsd_utf8.orig 2009-06-22 04:48:53.000000000 +0400
-+++ makefile_bsd_utf8 2009-07-03 14:32:08.000000000 +0400
+
+$FreeBSD$
+
+--- makefile_bsd_utf8.orig
++++ makefile_bsd_utf8
@@ -4,14 +4,12 @@
OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o \
nl-sock.o nl-import.o nl-xml.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
-CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -D_BSD -DSUPPORT_UTF8
-+CFLAGS += -c -DREADLINE -D_BSD -DSUPPORT_UTF8
++CFLAGS += -m32 -c -DREADLINE -D_BSD -DSUPPORT_UTF8 -DFFI
# or without readline lib
#CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -D_BSD -DSUPPORT_UTF8
@@ -13,7 +16,7 @@
-
default: $(OBJS)
- $(CC) $(OBJS) -m32 -g -lm -lreadline -lncurses -o newlisp
-+ $(CC) $(OBJS) -lm -lreadline -lncurses -o newlisp
++ $(CC) $(LDFLAGS) $(OBJS) -m32 -lm -lreadline -lncurses -lffi -o newlisp
# or without readline lib
# $(CC) $(OBJS) -m32 -g -lm -o newlisp
strip newlisp
diff --git a/lang/newlisp/files/patch-modules_gsl.lsp b/lang/newlisp/files/patch-modules_gsl.lsp
new file mode 100644
index 000000000000..817cc35f1e16
--- /dev/null
+++ b/lang/newlisp/files/patch-modules_gsl.lsp
@@ -0,0 +1,21 @@
+
+$FreeBSD$
+
+--- modules/gsl.lsp.orig
++++ modules/gsl.lsp
+@@ -169,6 +169,7 @@
+ (= ostype "Win32") "libgsl-0.dll" ; 32-bit
+ (= ostype "OSX") "libgsl.dylib" ; 32-bit
+ (= ostype "Linux") "/usr/local/lib/libgsl.so" ; 32-bit or 64-bit
++ (= ostype "BSD") "/usr/local/lib/libgsl.so" ; 32-bit or 64-bit
+ ))
+
+ ; load libgslcblas which contans functions referenced by libgsl
+@@ -179,6 +180,7 @@
+ (if
+ (= ostype "OSX") (import "libgslcblas.dylib" "cblas_sdsdot")
+ (= ostype "Linux") (import "/usr/local/lib/libgslcblas.so" "cblas_sdsdot")
++ (= ostype "BSD") (import "/usr/local/lib/libgslcblas.so" "cblas_sdsdot")
+ )
+
+ ; structs are defined but only needed for debugging, instead use "void*"
diff --git a/lang/newlisp/files/patch-newlisp.h b/lang/newlisp/files/patch-newlisp.h
new file mode 100644
index 000000000000..2d9613814c98
--- /dev/null
+++ b/lang/newlisp/files/patch-newlisp.h
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- newlisp.h.orig
++++ newlisp.h
+@@ -36,6 +36,10 @@
+ # include <ffi.h>
+ #endif
+
++#ifdef __FreeBSD__
++# include <ffi.h>
++#endif
++
+ #define LIBFFI " libffi"
+ #else /* not FFI */
+ #define LIBFFI ""