1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

Add lang/newlisp-devel, tracking development versions of lang/newlisp.

This commit is contained in:
Jimmy Olgeni 2013-03-09 22:59:34 +00:00
parent 66bcd1093b
commit 1f6c5ec12f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=313772
11 changed files with 419 additions and 0 deletions

View File

@ -179,6 +179,7 @@
SUBDIR += neko
SUBDIR += nesasm
SUBDIR += newlisp
SUBDIR += newlisp-devel
SUBDIR += nhc98
SUBDIR += nickle
SUBDIR += nml

177
lang/newlisp-devel/Makefile Normal file
View File

@ -0,0 +1,177 @@
# Created by: Stanislav Sedov <ssedov@mbsd.msk.ru>
# $FreeBSD$
PORTNAME= newlisp
PORTVERSION= 10.4.7
CATEGORIES= lang
MASTER_SITES= http://www.newlisp.org/downloads/development/
PKGNAMESUFFIX= -devel
EXTRACT_SUFX= .tgz
MAINTAINER= olgeni@FreeBSD.org
COMMENT= LISP like scripting language
LIB_DEPENDS= ffi:${PORTSDIR}/devel/libffi
CONFLICTS= newlisp-[0-9]*
HAS_CONFIGURE= yes
ALL_TARGET= default
MAN1= newlisp.1 newlispdoc.1
REINPLACE_ARGS= -i ""
MODULES= canvas cgi crypto ftp getopts infix macro odbc plot pop3 \
postscript smtp smtpx stat unix xmlrpc-client zlib
DOCS= CHANGES CodePatterns.html ExpressionEvaluation.html \
MemoryManagement.html newLISP-10.5.0-Release.html \
manual_frame.html newLISPdoc.html \
newlisp_index.html newlisp_manual.html \
OPTIONS_DEFINE= GMP GSL MYSQL PGSQL SQLITE GUISERV
GSL_DESC= GSL (GNU Scientific Library)
GUISERV_DESC= Install GUI server (in Java)
.include <bsd.port.options.mk>
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.if ${ARCH} == "amd64" || ${ARCH} == "sparc64" || ${ARCH} == "ia64"
CFLAGS+= -DNEWLISP64
.endif
.if ${PORT_OPTIONS:MGMP}
LIB_DEPENDS+= gmp:${PORTSDIR}/math/gmp
MODULES+= gmp
PLIST_SUB+= GMP=""
.else
PLIST_SUB+= GMP="@comment "
.endif
.if ${PORT_OPTIONS:MGSL}
LIB_DEPENDS+= gsl:${PORTSDIR}/math/gsl
MODULES+= gsl
PLIST_SUB+= GSL=""
.else
PLIST_SUB+= GSL="@comment "
.endif
.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= yes
MODULES+= mysql
PLIST_SUB+= MYSQL=""
.else
PLIST_SUB+= MYSQL="@comment "
.endif
.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL= yes
MODULES+= postgres
PLIST_SUB+= PGSQL=""
.else
PLIST_SUB+= PGSQL="@comment "
.endif
.if ${PORT_OPTIONS:MSQLITE}
USE_SQLITE= 3
MODULES+= sqlite3
PLIST_SUB+= SQLITE=""
.else
PLIST_SUB+= SQLITE="@comment "
.endif
.if ${PORT_OPTIONS:MGUISERV}
PLIST_SUB+= GUISERV=""
.else
PLIST_SUB+= GUISERV="@comment "
.endif
post-patch:
@${REINPLACE_CMD} -E -e "s,install -m 644, \$${BSD_INSTALL_DATA},g" \
-e "s,install -m 755, \$${BSD_INSTALL_SCRIPT},g" \
-e "s,^(datadir=).*,\1${PREFIX}/share,g" \
-e "s,^(bindir=).*,\1${PREFIX}/bin,g" \
${WRKSRC}/Makefile
@${REINPLACE_CMD} -E \
-e "s,/usr/(local/)?bin/newlisp,${PREFIX}/bin/newlisp,g" \
-e "s,/usr/(local/)?share/newlisp,${DATADIR},g" \
-e "s,/usr/(local/)?lib/newlisp.so,${PREFIX}/lib/newlisp.so,g"\
-e "s,/usr/bin,${PREFIX}/bin,g" \
-e "s,/usr/local/bin/vi,/usr/bin/vi,g" \
${WRKSRC}/examples/* \
${WRKSRC}/doc/* \
${WRKSRC}/guiserver/*.lsp \
${WRKSRC}/modules/* \
${WRKSRC}/newlisp.c
@${REINPLACE_CMD} -E -e \
"s,/usr/local/mysql/lib/(libmysqlclient.)dylib,${LOCALBASE}/lib/mysql/\1so.${MYSQL${MYSQL_VER}_LIBVER}," \
${WRKSRC}/modules/mysql.lsp
@${REINPLACE_CMD} -E -e \
"s,/usr/local/lib/(libsqlite)3.so,${LOCALBASE}/lib/\1${_SQLITE_VER}.so," \
${WRKSRC}/modules/sqlite3.lsp
@${REINPLACE_CMD} -E -e \
"s,/usr/local/lib/libgmp.so,${LOCALBASE}/lib/libgmp.so," \
${WRKSRC}/modules/gmp.lsp
@${REINPLACE_CMD} -E -e \
"s,/usr/local/lib/libgsl.so,${LOCALBASE}/lib/libgsl.so," \
${WRKSRC}/modules/gsl.lsp
@${REINPLACE_CMD} -E -e \
"s,/usr/local/lib/libpq.so.5.1,${LOCALBASE}/lib/libpq.so.5," \
${WRKSRC}/modules/postgres.lsp
@${REINPLACE_CMD} -E -e \
"s,/usr/share/newlisp,${LOCALBASE}/share/newlisp," \
${WRKSRC}/newlisp.h
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/newlisp ${PREFIX}/bin/
${INSTALL_SCRIPT} ${WRKSRC}/util/newlispdoc ${PREFIX}/bin/
${MKDIR} ${DATADIR}/util/
${INSTALL_DATA} ${WRKSRC}/util/syntax.cgi \
${WRKSRC}/util/newlisp.vim \
${WRKSRC}/util/link.lsp \
${WRKSRC}/util/httpd-conf.lsp \
${WRKSRC}/util/newlisp.jsf \
${WRKSRC}/util/nanorc \
${DATADIR}/util/
${MKDIR} ${DATADIR}/modules/
${INSTALL_DATA} ${MODULES:S,^,${WRKSRC}/modules/,:S,$,.lsp,} \
${DATADIR}/modules/
${INSTALL_MAN} ${WRKSRC}/doc/newlisp.1 ${PREFIX}/man/man1/
${INSTALL_MAN} ${WRKSRC}/doc/newlispdoc.1 ${PREFIX}/man/man1/
.if ${PORT_OPTIONS:MGUISERV}
${MKDIR} ${DATADIR}/guiserver
@(cd ${WRKSRC}/guiserver/ && ${COPYTREE_SHARE} \*.lsp \
${DATADIR}/guiserver/ \
"! -name guiserver.lsp ! -name newlisp-edit.lsp")
${INSTALL_DATA} ${WRKSRC}/guiserver/guiserver.jar ${DATADIR}/
${INSTALL_DATA} ${WRKSRC}/guiserver/guiserver.lsp ${DATADIR}/
${INSTALL_SCRIPT} ${WRKSRC}/guiserver/newlisp-edit.lsp \
${PREFIX}/bin/newlisp-edit
.endif
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${DOCSDIR}/
${MKDIR} ${EXAMPLESDIR}/
${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR}/
${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/doc/,} ${DOCSDIR}/
.if ${PORT_OPTIONS:MGUISERV}
${MKDIR} ${DOCSDIR}/guiserver
${INSTALL_DATA} ${WRKSRC}/guiserver/index.html \
${WRKSRC}/guiserver/guiserver.lsp.html \
${DOCSDIR}/guiserver/
.endif
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (newlisp-10.4.7.tgz) = 6fd716f9f6f983ab37c31a006540664afd9780008391970f9ee314527578e425
SIZE (newlisp-10.4.7.tgz) = 1569634

View File

@ -0,0 +1,22 @@
$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 -DFFI
# or without readline lib
#CFLAGS = -m32 -Wall -Wno-uninitialized -Wno-strict-aliasing -O2 -c -g -D_BSD
-CC = gcc
-
default: $(OBJS)
- $(CC) $(OBJS) -m32 -g -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

View File

@ -0,0 +1,22 @@
$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 += -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

View File

@ -0,0 +1,22 @@
$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 += -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
-CC = gcc
-
default: $(OBJS)
- $(CC) $(OBJS) -m32 -g -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

View File

@ -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*"

View File

@ -0,0 +1,27 @@
$FreeBSD$
--- newlisp.c.orig
+++ newlisp.c
@@ -515,16 +515,16 @@
else if(getenv("DOCUMENT_ROOT"))
strncpy(initFile, getenv("DOCUMENT_ROOT"), PATH_MAX - 16);
- strncat(initFile, "/.", 2);
- strncat(initFile, INIT_FILE, 8);
+ strlcat(initFile, "/.", sizeof(initFile));
+ strlcat(initFile, INIT_FILE, sizeof(initFile));
if(loadFile(initFile, 0, 0, mainContext) == NULL)
{
envPtr = getenv("NEWLISPDIR");
if(envPtr)
{
- strncpy(initFile, envPtr, PATH_MAX - 16);
- strncat(initFile, "/", 1);
- strncat(initFile, INIT_FILE, 8);
+ strlcpy(initFile, envPtr, sizeof(initFile));
+ strlcat(initFile, "/", sizeof(initFile));
+ strlcat(initFile, INIT_FILE, sizeof(initFile));
loadFile(initFile, 0, 0, mainContext);
}
}

View File

@ -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 ""

View File

@ -0,0 +1,6 @@
The newLISP is a scripting language for developing web applications and
programs in general and in the domains of artificial intelligence (AI) and
statistics.
Author: Lutz Mueller
WWW: http://www.newlisp.org/

View File

@ -0,0 +1,103 @@
bin/newlisp
%%GUISERV%%bin/newlisp-edit
bin/newlispdoc
%%GUISERV%%%%PORTDOCS%%%%DOCSDIR%%/guiserver/guiserver.lsp.html
%%GUISERV%%%%PORTDOCS%%%%DOCSDIR%%/guiserver/index.html
%%PORTDOCS%%%%DOCSDIR%%/CHANGES
%%PORTDOCS%%%%DOCSDIR%%/CodePatterns.html
%%PORTDOCS%%%%DOCSDIR%%/ExpressionEvaluation.html
%%PORTDOCS%%%%DOCSDIR%%/MemoryManagement.html
%%PORTDOCS%%%%DOCSDIR%%/manual_frame.html
%%PORTDOCS%%%%DOCSDIR%%/newLISP-10.5.0-Release.html
%%PORTDOCS%%%%DOCSDIR%%/newLISPdoc.html
%%PORTDOCS%%%%DOCSDIR%%/newlisp_index.html
%%PORTDOCS%%%%DOCSDIR%%/newlisp_manual.html
%%PORTDOCS%%%%EXAMPLESDIR%%/async
%%PORTDOCS%%%%EXAMPLESDIR%%/client
%%PORTDOCS%%%%EXAMPLESDIR%%/env.cgi
%%PORTDOCS%%%%EXAMPLESDIR%%/finger
%%PORTDOCS%%%%EXAMPLESDIR%%/form.cgi
%%PORTDOCS%%%%EXAMPLESDIR%%/form.html
%%PORTDOCS%%%%EXAMPLESDIR%%/newLISP-Excel-Import.xls
%%PORTDOCS%%%%EXAMPLESDIR%%/observer
%%PORTDOCS%%%%EXAMPLESDIR%%/opengl-demo-ffi.lsp
%%PORTDOCS%%%%EXAMPLESDIR%%/opengl-demo.lsp
%%PORTDOCS%%%%EXAMPLESDIR%%/prodcons.lsp
%%PORTDOCS%%%%EXAMPLESDIR%%/query
%%PORTDOCS%%%%EXAMPLESDIR%%/scan
%%PORTDOCS%%%%EXAMPLESDIR%%/server
%%PORTDOCS%%%%EXAMPLESDIR%%/sniff
%%PORTDOCS%%%%EXAMPLESDIR%%/tcltk.lsp
%%PORTDOCS%%%%EXAMPLESDIR%%/udp-client.lsp
%%PORTDOCS%%%%EXAMPLESDIR%%/udp-server.lsp
%%PORTDOCS%%%%EXAMPLESDIR%%/upload.cgi
%%PORTDOCS%%%%EXAMPLESDIR%%/upload.html
%%PORTDOCS%%%%EXAMPLESDIR%%/win32demo.lsp
%%PORTDOCS%%%%EXAMPLESDIR%%/xmlrpc.cgi
%%GUISERV%%%%DATADIR%%/guiserver.jar
%%GUISERV%%%%DATADIR%%/guiserver.lsp
%%GUISERV%%%%DATADIR%%/guiserver/allfonts-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/animation-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/border-layout-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/button-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/clipboard-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/cursor-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/drag-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/font-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/frameless-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/html-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/image-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/midi-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/midi2-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/mouse-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/move-resize-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/pinballs-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/properties-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/rotation-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/shapes-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/sound-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/stroke-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/table-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/tabs-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/textfield-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/textrot-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/uppercase.lsp
%%GUISERV%%%%DATADIR%%/guiserver/widgets-demo-jp.lsp
%%GUISERV%%%%DATADIR%%/guiserver/widgets-demo-ru.lsp
%%GUISERV%%%%DATADIR%%/guiserver/widgets-demo.lsp
%%GUISERV%%%%DATADIR%%/guiserver/word-count.lsp
%%DATADIR%%/modules/canvas.lsp
%%DATADIR%%/modules/cgi.lsp
%%DATADIR%%/modules/crypto.lsp
%%DATADIR%%/modules/ftp.lsp
%%DATADIR%%/modules/getopts.lsp
%%GMP%%%%DATADIR%%/modules/gmp.lsp
%%GSL%%%%DATADIR%%/modules/gsl.lsp
%%DATADIR%%/modules/infix.lsp
%%DATADIR%%/modules/macro.lsp
%%MYSQL%%%%DATADIR%%/modules/mysql.lsp
%%DATADIR%%/modules/odbc.lsp
%%DATADIR%%/modules/plot.lsp
%%DATADIR%%/modules/pop3.lsp
%%PGSQL%%%%DATADIR%%/modules/postgres.lsp
%%DATADIR%%/modules/postscript.lsp
%%DATADIR%%/modules/smtp.lsp
%%DATADIR%%/modules/smtpx.lsp
%%SQLITE%%%%DATADIR%%/modules/sqlite3.lsp
%%DATADIR%%/modules/stat.lsp
%%DATADIR%%/modules/unix.lsp
%%DATADIR%%/modules/xmlrpc-client.lsp
%%DATADIR%%/modules/zlib.lsp
%%DATADIR%%/util/httpd-conf.lsp
%%DATADIR%%/util/link.lsp
%%DATADIR%%/util/nanorc
%%DATADIR%%/util/newlisp.jsf
%%DATADIR%%/util/newlisp.vim
%%DATADIR%%/util/syntax.cgi
@dirrm %%DATADIR%%/util
@dirrm %%DATADIR%%/modules
%%GUISERV%%@dirrm %%DATADIR%%/guiserver
@dirrm %%DATADIR%%
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
%%GUISERV%%%%PORTDOCS%%@dirrm %%DOCSDIR%%/guiserver
%%PORTDOCS%%@dirrm %%DOCSDIR%%