mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
lang/s7-nrepl: notcurses-based repl for lang/s7
This slave port has the s7-nrepl binary from lang/s7 so it can be installed independently by binary package users. s7-repl remains in lang/s7 as it's only ~6 kB in size and doesn't hurt to always install.
This commit is contained in:
parent
144ef4109c
commit
b8ade68801
6 changed files with 56 additions and 37 deletions
|
@ -340,6 +340,7 @@
|
||||||
SUBDIR += rust182
|
SUBDIR += rust182
|
||||||
SUBDIR += rustpython
|
SUBDIR += rustpython
|
||||||
SUBDIR += s7
|
SUBDIR += s7
|
||||||
|
SUBDIR += s7-nrepl
|
||||||
SUBDIR += sagittarius-scheme
|
SUBDIR += sagittarius-scheme
|
||||||
SUBDIR += sather-specification
|
SUBDIR += sather-specification
|
||||||
SUBDIR += sather-tutorial
|
SUBDIR += sather-tutorial
|
||||||
|
|
18
lang/s7-nrepl/Makefile
Normal file
18
lang/s7-nrepl/Makefile
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
PKGNAMESUFFIX= -nrepl
|
||||||
|
|
||||||
|
COMMENT= Notcurses REPL for s7
|
||||||
|
|
||||||
|
LIB_DEPENDS= libnotcurses-core.so:devel/notcurses \
|
||||||
|
libs7.so:lang/s7
|
||||||
|
|
||||||
|
MASTERDIR= ${.CURDIR}/../../lang/s7
|
||||||
|
|
||||||
|
PLIST_FILES= bin/s7-nrepl
|
||||||
|
|
||||||
|
do-build:
|
||||||
|
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o ${WRKDIR}/s7-nrepl ${WRKSRC}/nrepl.c -ls7 -lnotcurses-core
|
||||||
|
|
||||||
|
do-install:
|
||||||
|
${INSTALL_PROGRAM} ${WRKDIR}/s7-nrepl ${STAGEDIR}${PREFIX}/bin/
|
||||||
|
|
||||||
|
.include "${MASTERDIR}/Makefile.master"
|
5
lang/s7-nrepl/pkg-descr
Normal file
5
lang/s7-nrepl/pkg-descr
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Nrepl is a notcurses-based repl for S7.
|
||||||
|
|
||||||
|
Unlike repl, nrepl has support for the mouse, traversable, scrollable,
|
||||||
|
and resizable panes, built-in ties to lint.scm, debug.scm, and
|
||||||
|
profile.scm, and various other enhancements.
|
|
@ -1,49 +1,21 @@
|
||||||
PORTNAME= s7
|
|
||||||
# S7_MAJOR_VERSION / S7_MINOR_VERSION / S7_DATE from s7.h
|
|
||||||
PORTVERSION= 11.2.g20241220
|
|
||||||
CATEGORIES= lang lisp
|
|
||||||
|
|
||||||
MAINTAINER= fuz@FreeBSD.org
|
|
||||||
COMMENT= Scheme interpreter
|
COMMENT= Scheme interpreter
|
||||||
WWW= https://ccrma.stanford.edu/software/snd/snd/s7.html
|
|
||||||
|
|
||||||
LICENSE= BSD0CLAUSE
|
|
||||||
|
|
||||||
USES= localbase:ldflags
|
|
||||||
USE_GITLAB= yes
|
|
||||||
GL_SITE= https://cm-gitlab.stanford.edu
|
|
||||||
GL_ACCOUNT= bil
|
|
||||||
GL_TAGNAME= a5515d455f5aca49d5275a5a35ac88935f3ad401
|
|
||||||
USE_LDCONFIG= yes
|
USE_LDCONFIG= yes
|
||||||
|
|
||||||
CFLAGS+= -DS7_LOAD_PATH=\"${DATADIR}\" \
|
|
||||||
-DHAVE_COMPLEX_NUMBERS \
|
|
||||||
-DHAVE_COMPLEX_TRIG \
|
|
||||||
-DWITH_SYSTEM_EXTRAS \
|
|
||||||
-DWITH_C_LOADER \
|
|
||||||
-fno-math-errno \
|
|
||||||
-Wno-parentheses-equality
|
|
||||||
|
|
||||||
LDFLAGS+= -Wl,-export-dynamic
|
|
||||||
LIBS+= -lm
|
LIBS+= -lm
|
||||||
LIBS7= ${WRKDIR}/libs7.so.0
|
LIBS7= ${WRKDIR}/libs7.so.0
|
||||||
S7LIBS= c dl m
|
S7LIBS= c dl m
|
||||||
|
|
||||||
MAKE_ENV+= LD_LIBRARY_PATH=${WRKDIR}
|
|
||||||
|
|
||||||
PORTDOCS= s7.html s7-ffi.html s7-scm.html
|
PORTDOCS= s7.html s7-ffi.html s7-scm.html
|
||||||
|
|
||||||
OPTIONS_DEFINE= DOCS GMP REPL NREPL
|
OPTIONS_DEFINE= DOCS GMP REPL
|
||||||
OPTIONS_DEFAULT= GMP REPL
|
OPTIONS_DEFAULT= GMP REPL
|
||||||
OPTIONS_SUB= yes
|
OPTIONS_SUB= yes
|
||||||
NREPL_DESC= install notcurses repl (s7-nrepl)
|
|
||||||
REPL_DESC= install simple repl (s7-repl)
|
REPL_DESC= install simple repl (s7-repl)
|
||||||
GMP_LIB_DEPENDS= libgmp.so:math/gmp \
|
GMP_LIB_DEPENDS= libgmp.so:math/gmp \
|
||||||
libmpfr.so:math/mpfr \
|
libmpfr.so:math/mpfr \
|
||||||
libmpc.so:math/mpc
|
libmpc.so:math/mpc
|
||||||
GMP_CFLAGS= -DWITH_GMP
|
GMP_CFLAGS= -DWITH_GMP
|
||||||
GMP_LIBS= -lmpc -lmpfr -lgmp
|
GMP_LIBS= -lmpc -lmpfr -lgmp
|
||||||
NREPL_LIB_DEPENDS= libnotcurses-core.so:devel/notcurses
|
|
||||||
|
|
||||||
do-build:
|
do-build:
|
||||||
${CC} -fpic -shared ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--soname=libs7.so.0 \
|
${CC} -fpic -shared ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--soname=libs7.so.0 \
|
||||||
|
@ -53,9 +25,6 @@ do-build:
|
||||||
(cd ${WRKDIR} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${WRKDIR}/s7-repl ${WRKSRC}/lib$l.scm)
|
(cd ${WRKDIR} && ${SETENVI} ${WRK_ENV} ${MAKE_ENV} ${WRKDIR}/s7-repl ${WRKSRC}/lib$l.scm)
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
post-build-NREPL-on:
|
|
||||||
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o ${WRKDIR}/s7-nrepl ${WRKSRC}/nrepl.c ${LIBS7} -lnotcurses-core
|
|
||||||
|
|
||||||
do-install:
|
do-install:
|
||||||
${INSTALL_LIB} ${LIBS7} ${STAGEDIR}${PREFIX}/lib/libs7.so.0.0.0
|
${INSTALL_LIB} ${LIBS7} ${STAGEDIR}${PREFIX}/lib/libs7.so.0.0.0
|
||||||
${RLN} ${STAGEDIR}${PREFIX}/lib/libs7.so.0.0.0 ${STAGEDIR}${PREFIX}/lib/libs7.so.0
|
${RLN} ${STAGEDIR}${PREFIX}/lib/libs7.so.0.0.0 ${STAGEDIR}${PREFIX}/lib/libs7.so.0
|
||||||
|
@ -74,9 +43,6 @@ do-install-DOCS-on:
|
||||||
${INSTALL_DATA} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR}/
|
${INSTALL_DATA} ${WRKSRC}/$f ${STAGEDIR}${DOCSDIR}/
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
do-install-NREPL-on:
|
|
||||||
${INSTALL_PROGRAM} ${WRKDIR}/s7-nrepl ${STAGEDIR}${PREFIX}/bin/
|
|
||||||
|
|
||||||
do-install-REPL-on:
|
do-install-REPL-on:
|
||||||
${INSTALL_PROGRAM} ${WRKDIR}/s7-repl ${STAGEDIR}${PREFIX}/bin/
|
${INSTALL_PROGRAM} ${WRKDIR}/s7-repl ${STAGEDIR}${PREFIX}/bin/
|
||||||
|
|
||||||
|
@ -86,4 +52,4 @@ do-test:
|
||||||
${MKDIR} ${WRKDIR}/test
|
${MKDIR} ${WRKDIR}/test
|
||||||
(cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${WRKDIR}/s7-repl s7test.scm)
|
(cd ${WRKSRC} && ${SETENVI} ${WRK_ENV} ${TEST_ENV} ${WRKDIR}/s7-repl s7test.scm)
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include "Makefile.master"
|
||||||
|
|
30
lang/s7/Makefile.master
Normal file
30
lang/s7/Makefile.master
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
PORTNAME= s7
|
||||||
|
CATEGORIES= lang lisp
|
||||||
|
# S7_MAJOR_VERSION / S7_MINOR_VERSION / S7_DATE from s7.h
|
||||||
|
PORTVERSION= 11.2.g20241220
|
||||||
|
|
||||||
|
MAINTAINER?= fuz@FreeBSD.org
|
||||||
|
WWW= https://ccrma.stanford.edu/software/snd/snd/s7.html
|
||||||
|
|
||||||
|
LICENSE= BSD0CLAUSE
|
||||||
|
|
||||||
|
USES= localbase:ldflags
|
||||||
|
USE_GITLAB= yes
|
||||||
|
GL_SITE= https://cm-gitlab.stanford.edu
|
||||||
|
GL_ACCOUNT= bil
|
||||||
|
GL_TAGNAME= a5515d455f5aca49d5275a5a35ac88935f3ad401
|
||||||
|
|
||||||
|
CFLAGS+= -DS7_LOAD_PATH=\"${DATADIR}\" \
|
||||||
|
-DHAVE_COMPLEX_NUMBERS \
|
||||||
|
-DHAVE_COMPLEX_TRIG \
|
||||||
|
-DWITH_SYSTEM_EXTRAS \
|
||||||
|
-DWITH_C_LOADER \
|
||||||
|
-fno-math-errno \
|
||||||
|
-Wno-parentheses-equality
|
||||||
|
LDFLAGS+= -Wl,-export-dynamic
|
||||||
|
MAKE_ENV+= LD_LIBRARY_PATH=${WRKDIR}
|
||||||
|
|
||||||
|
DESCR?= ${.CURDIR}/pkg-descr
|
||||||
|
PLIST?= ${.CURDIR}/pkg-plist
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
|
@ -1,4 +1,3 @@
|
||||||
%%NREPL%%bin/s7-nrepl
|
|
||||||
%%REPL%%bin/s7-repl
|
%%REPL%%bin/s7-repl
|
||||||
include/s7.h
|
include/s7.h
|
||||||
lib/libs7.so
|
lib/libs7.so
|
||||||
|
|
Loading…
Add table
Reference in a new issue