summaryrefslogtreecommitdiff
path: root/lang/tinyscheme/patches
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2002-10-28 09:04:02 +0000
committeragc <agc@pkgsrc.org>2002-10-28 09:04:02 +0000
commit89efaa53275dbfd4b094c6e05b0e3f6091a5bfcd (patch)
tree6c717e06f378d55002ed6c37bb3b65fb0f67bda1 /lang/tinyscheme/patches
parent6e77c48bb24503598ed3fbc5af01d2ad52a90b43 (diff)
downloadpkgsrc-89efaa53275dbfd4b094c6e05b0e3f6091a5bfcd.tar.gz
Import tinyscheme-1.31, a small, embeddable BSD-licensed scheme
interpreter, into the NetBSD Packages Collection. TinyScheme is a lightweight Scheme interpreter that implements as large a subset of R5RS as was possible without getting very large and complicated. It is meant to be used as an embedded scripting interpreter for other programs. As such, it does not offer IDEs or extensive toolkits although it does sport a small top-level loop, included conditionally. A lot of functionality in TinyScheme is included conditionally, to allow developers freedom in balancing features and footprint. As an embedded interpreter, it allows multiple interpreter states to coexist in the same program, without any interference between them. Programmatically, foreign functions in C can be added and values can be defined in the Scheme environment. Being quite a small program, it is easy to comprehend, get to grips with, and use.
Diffstat (limited to 'lang/tinyscheme/patches')
-rw-r--r--lang/tinyscheme/patches/patch-aa68
-rw-r--r--lang/tinyscheme/patches/patch-ab22
2 files changed, 90 insertions, 0 deletions
diff --git a/lang/tinyscheme/patches/patch-aa b/lang/tinyscheme/patches/patch-aa
new file mode 100644
index 00000000000..2f757cc94bf
--- /dev/null
+++ b/lang/tinyscheme/patches/patch-aa
@@ -0,0 +1,68 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/10/28 09:04:02 agc Exp $
+
+--- makefile 2002/10/24 09:41:47 1.1
++++ makefile 2002/10/24 09:42:36
+@@ -18,7 +18,7 @@
+ #AR= echo
+
+ # Unix, generally
+-CC = gcc -fpic
++CC = gcc
+ DEBUG=-g -Wall -Wno-char-subscripts -O
+ Osuf=o
+ SOsuf=so
+@@ -28,12 +28,13 @@
+ OUT = -o $@
+ RM= -rm -f
+ AR= ar crs
++SYS_LIBS= -lm
+
+ # Linux
+ LD = gcc
+ LDFLAGS = -shared
+ DEBUG=-g -Wno-char-subscripts -O
+-SYS_LIBS= -ldl
++#SYS_LIBS= -ldl
+ PLATFORM_FEATURES= -DSUN_DL=1
+
+
+@@ -47,26 +48,30 @@
+ #LIBPREFIX = lib
+ #OUT = -o $@
+
+-FEATURES = $(PLATFORM_FEATURES) -DUSE_DL=1 -DUSE_MATH=0 -DUSE_ASCII_NAMES=0
++DIRS= -DTINYSCHEMEPREFIX='"${PREFIX}"' -DTINYSCHEMEDIR='"/share/tinyscheme/"'
++FEATURES = ${DIRS} $(PLATFORM_FEATURES) -DUSE_DL=1 -DUSE_MATH=0 -DUSE_ASCII_NAMES=0
+
+ OBJS = scheme.$(Osuf) dynload.$(Osuf)
+
+ LIBTARGET = $(LIBPREFIX)tinyscheme.$(SOsuf)
+ STATICLIBTARGET = $(LIBPREFIX)tinyscheme.$(LIBsuf)
+
+-all: $(LIBTARGET) $(STATICLIBTARGET) scheme$(EXE_EXT)
++all: $(STATICLIBTARGET) scheme$(EXE_EXT)
+
+-%.$(Osuf): %.c
+- $(CC) -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
+-
+-$(LIBTARGET): $(OBJS)
+- $(LD) $(LDFLAGS) $(OUT) $(OBJS) $(SYS_LIBS)
++.c.o:
++ ${LIBTOOL} --mode=compile ${CC} -I. -c $(DEBUG) $(FEATURES) $(DL_FLAGS) $<
+
+ scheme$(EXE_EXT): $(OBJS)
+- $(CC) -o $@ $(DEBUG) $(OBJS) $(SYS_LIBS)
++ ${LIBTOOL} --mode=link ${CC} -o $@ ${DEBUG} ${OBJS} ${SYS_LIBS} ${LIBS:.a=.la} -o scheme${EXE_EXT}
+
+ $(STATICLIBTARGET): $(OBJS)
+- $(AR) $@ $(OBJS)
++ ${LIBTOOL} --mode=link ${CC} -o ${.TARGET:.a=.la} ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 1:31
++
++install: all
++ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} ${STATICLIBTARGET:.a=.la} ${PREFIX}/lib
++ ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} scheme${EXE_EXT} ${PREFIX}/bin/tinyscheme
++ ${BSD_INSTALL_DATA_DIR} ${PREFIX}/share/tinyscheme
++ ${BSD_INSTALL_DATA} init.scm ${PREFIX}/share/tinyscheme
+
+ $(OBJS): scheme.h scheme-private.h opdefines.h
+ dynload.$(Osuf): dynload.h
diff --git a/lang/tinyscheme/patches/patch-ab b/lang/tinyscheme/patches/patch-ab
new file mode 100644
index 00000000000..5cbcf119a30
--- /dev/null
+++ b/lang/tinyscheme/patches/patch-ab
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1.1.1 2002/10/28 09:04:02 agc Exp $
+
+--- scheme.c 2002/10/24 11:01:22 1.1
++++ scheme.c 2002/10/24 11:03:17
+@@ -91,8 +91,16 @@
+ # define prompt "> "
+ #endif
+
++#ifndef TINYSCHEMEPREFIX
++# define TINYSCHEMEPREFIX ""
++#endif
++
++#ifndef TINYSCHEMEDIR
++# define TINYSCHEMEDIR ""
++#endif
++
+ #ifndef InitFile
+-# define InitFile "init.scm"
++# define InitFile TINYSCHEMEPREFIX TINYSCHEMEDIR "init.scm"
+ #endif
+
+ #ifndef FIRST_CELLSEGS