summaryrefslogtreecommitdiff
path: root/lang/scm
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2007-08-02 14:47:24 +0000
committerobache <obache@pkgsrc.org>2007-08-02 14:47:24 +0000
commit730ba9ab469afc9a6521b37ab985faa2395b2ded (patch)
tree3ab865398ae263f9309e81c6f277e1350e3d8427 /lang/scm
parentcf307199f5795d555fe94ab9ef8321ce7e1e3940 (diff)
downloadpkgsrc-730ba9ab469afc9a6521b37ab985faa2395b2ded.tar.gz
Update scm to 5.5.3 a.k.a 5e3.
Based on patch provided by Aleksej Saushev in PR 36471. pkgsrc changes: Enable to build x11 feature (optional, default=on). Previously, depend on x11, but not build x11 feature. scm5e3 news: Richard Harke ported SCM to the Linux-ia64. SRFI-94 Type-Restricted Numerical Functions. SRFI-63 uniform array type support expanded to: A:floC64b inexact 64.bit binary flonum complex A:floC32b inexact 32.bit binary flonum complex A:floC16b inexact 16.bit binary flonum complex A:floR64b inexact 64.bit binary flonum real A:floR32b inexact 32.bit binary flonum real A:floR16b inexact 16.bit binary flonum real A:fixZ32b exact 32.bit binary fixnum A:fixZ16b exact 16.bit binary fixnum A:fixZ8b exact 8.bit binary fixnum A:fixN32b exact 32.bit nonnegative binary fixnum A:fixN16b exact 16.bit nonnegative binary fixnum A:fixN8b exact 8.bit nonnegative binary fixnum A:bool boolean string char Radey Shouman has changed LETREC to behave like LETREC*: * eval.c (ceval_1): Change LETREC behavior to that of LETREC*: initializers are run in left to right order, and may use previously evaluated variables bound in the same contour. This change also applies to LETRECs resulting from internal DEFINE. * eval.c (macroexp1): Add #ifdef to switch case handling line numbers in ceval_1 so that they are safely discarded when MEMOIZE_LOCALS is not #defined. Perhaps line number generation should be disabled in that case. * scl.c: Changes to allow compilation with MinGW (gnu-win32); asinh, acosh, and atanh are not yet supported. From Aubrey Jaffer: * indexes.texi (Indexes): Give each index its own node when not in info mode. Moved index stuff here so it doesn't break texinfo-every-node-update. * scm.texi (Index): Replaced nodes under Indexes with node Index when in info mode; fixes indexing in Emacs 21.4.1. Converted to use @copying. (Indexes): Reorganized. (Data Type Representations): Corrected pattern for specfun and cclo. * byte.c (subbytes): Added. (scm_subbytes_read, scm_subbytes_write): Renamed from substring. * Makefile (dscm4, dscm5): != is string operator in shell. "mv -f" for previous scm, slibcat, and implcat. * Init5e2.scm (boot-tail): Don't load ScmInit.scm if *script*. (string-index, read-line): Defined for login->home-directory, which may be called before REQUIRE is defined. * Makefile (dscm4, dscm5): Added randomize_va_space machinations. (dvi, pdf): New tetex-3.0(-20.FC5) broke them -- fixed. (SETARCH): Workarounds allow dumping in recent Linux. * time.c (linux): defined CLKTCK to (sysconf(_SC_CLK_TCK)). * repl.c (scm_read_numbered): Don't #ifndef MEMOIZED_LOCALS. * build.scm (dont-memoize-locals): Added feature. (stack-limit): Removed feature. * scmfig.h (STACK_LIMIT): Always defined. (CHECK_STACK): Condition on scm_verbose. * sys.c (stack_check): Always present. * Makefile (docs): Added target to make all documentation files; then invoke xdvi. * ugsetjmp.s (_setjump, _longjump): For Ultrix VAX circa 1997. * subr.c (mkbig, adjbig): Improved overflow message. * mkimpcat.scm (wbtab, rwb-isam): moved to "Simple associations". (add-source): Use 'source form and check file's existence. * scl.c (scm_magnitude): Extend dynamic range by eliminating intermediate expression swell. (divide): Use "Smith's formula" to extend dynamic range; but makes an insignificant difference when compiled with -O3. (atanh, acosh, asinh): define if #ifndef HAVE_ATANH. * scmfig.h (HAVE_ATANH): Decides whether atanh, asinh, and acosh are supported. * r4rstest.scm (5 2 1): Expose Bigloo tprint redefinition bug. (test-bignum): Convert test bignums from strings. (have-bignums?): Check bignum arithmetic works. (test-inexact): Do complex tests only if non-real numbers are supported. (test-inexact): Added equal? tests. (test-inexact): Test for -0.0 lossage. (test-inexact): Check that / and magnitude work for very large and very small complex numbers (1e300; 1e-300);
Diffstat (limited to 'lang/scm')
-rw-r--r--lang/scm/Makefile41
-rw-r--r--lang/scm/PLIST6
-rw-r--r--lang/scm/distinfo12
-rw-r--r--lang/scm/files/buildscm.sh8
-rw-r--r--lang/scm/options.mk15
-rw-r--r--lang/scm/patches/patch-aa36
-rw-r--r--lang/scm/patches/patch-ab14
7 files changed, 87 insertions, 45 deletions
diff --git a/lang/scm/Makefile b/lang/scm/Makefile
index 61007dda8b1..ad4eae496ad 100644
--- a/lang/scm/Makefile
+++ b/lang/scm/Makefile
@@ -1,29 +1,36 @@
-# $NetBSD: Makefile,v 1.18 2007/02/22 19:01:21 wiz Exp $
+# $NetBSD: Makefile,v 1.19 2007/08/02 14:47:24 obache Exp $
#
# Convert the version number as follows 2d2 -> 2.4.2, where the d is
# changed to a 4, representing the 4th letter.
-# Thus, 5e1 -> 5.5.1
+# Thus, 5e3 -> 5.5.3
#
# Do not forget to update InitXXX.scm in files/buildscm.scm
-DISTNAME= scm5e1
-PKGNAME= scm-5.5.1
-PKGREVISION= 1
+DISTNAME= scm5e3
+PKGNAME= scm-5.5.3
CATEGORIES= lang
MASTER_SITES= http://swissnet.ai.mit.edu/ftpdir/scm/
EXTRACT_SUFX= .zip
MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://www.swiss.ai.mit.edu/~jaffer/SCM.html
+HOMEPAGE= http://www.swiss.ai.mit.edu/~jaffer/SCM
COMMENT= Portable scheme interpreter
DEPENDS+= slib>=3.1.1:../../devel/slib
-USE_TOOLS+= gmake
-
WRKSRC= ${WRKDIR}/scm
EVAL_PREFIX+= SLIB_PREFIX=slib
-INFO_FILES= # PLIST
+INFO_FILES= yes
+
+SCM_MODULES+= sc2 ramap dynl edline gsubr ioext posix record rgx socket
+SCM_MODULES+= unix continue scm scmmain findexec script time repl scl eval
+SCM_MODULES+= sys subr debug unif rope unexelf
+COMPILED_INITS+=init_edline
+
+.include "options.mk"
+
+SRCS= ${SCM_MODULES:=.c}
+OBJS= ${SCM_MODULES:=.o}
BUILD_TARGET= scmlit libscm.a
INSTALL_TARGET= install installlib
@@ -32,19 +39,19 @@ INSTALL_MAKE_FLAGS= ${MAKE_FLAGS} mandir=${PREFIX:Q}/${PKGMANDIR:Q}/
INSTALLATION_DIRS= ${PKGINFODIR} share/scm
-.include "../../devel/ncurses/buildlink3.mk"
-.include "../../mk/x11.buildlink3.mk"
+.include "../../devel/readline/buildlink3.mk"
-do-configure:
+post-extract:
${SED} -e "s|@SLIB_PREFIX@|"${SLIB_PREFIX:Q}"|g" \
${FILESDIR}/require.scm > ${WRKSRC}/require.scm
- ${SED} -e "s|@CC@|"${CC:Q}"|g" \
- -e "s|@CFLAGS@|"${CFLAGS:Q}"|g" \
- -e "s|@PREFIX@|"${PREFIX:Q}"|g" \
- ${FILESDIR}/buildscm.sh > ${WRKSRC}/buildscm.sh
+ ${SED} -e "s|@PREFIX@|"${PREFIX:Q}"|g" \
+ -e "s|@COMPILED_INITS@|${COMPILED_INITS:=();}|g" \
+ ${FILESDIR}/buildscm.sh > ${WRKSRC}/buildscm.sh
post-build:
- cd ${WRKSRC} && ${SH} ./buildscm.sh
+ cd ${WRKSRC} && env ${MAKE_ENV} LIBS=${LIBS:Q} \
+ SRCS=${SRCS:Q} OBJS=${OBJS:Q} \
+ ${SH} ./buildscm.sh
post-install:
${INSTALL_DATA} ${WRKSRC}/slibcat ${PREFIX}/share/scm
diff --git a/lang/scm/PLIST b/lang/scm/PLIST
index 88273e2cd7d..f8d88bb5583 100644
--- a/lang/scm/PLIST
+++ b/lang/scm/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2006/04/05 06:27:42 jlam Exp $
+@comment $NetBSD: PLIST,v 1.6 2007/08/02 14:47:24 obache Exp $
bin/scm
bin/scmlit
include/patchlvl.h
@@ -14,7 +14,7 @@ man/man1/scm.1
share/scm/COPYING
share/scm/Idiffer.scm
share/scm/Iedline.scm
-share/scm/Init5e1.scm
+share/scm/Init5e3.scm
share/scm/Link.scm
share/scm/Macexp.scm
share/scm/Macro.scm
@@ -28,8 +28,10 @@ share/scm/keysymdef.scm
share/scm/mkimpcat.scm
share/scm/r4rstest.scm
share/scm/require.scm
+share/scm/rwb-isam.scm
share/scm/scmhob.scm
share/scm/slibcat
+share/scm/wbtab.scm
share/scm/x11.scm
share/scm/xatoms.scm
share/scm/xevent.scm
diff --git a/lang/scm/distinfo b/lang/scm/distinfo
index 91873d4974b..99fdfaaa217 100644
--- a/lang/scm/distinfo
+++ b/lang/scm/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.5 2006/02/19 17:50:11 joerg Exp $
+$NetBSD: distinfo,v 1.6 2007/08/02 14:47:24 obache Exp $
-SHA1 (scm5e1.zip) = 20bb517f1b6229644a1f3873d7607cac3569a5fa
-RMD160 (scm5e1.zip) = 2f4c2d05061db2f0929053b0c565631c7a4806e2
-Size (scm5e1.zip) = 868500 bytes
-SHA1 (patch-aa) = be890f81fdd284cfd04c39841a06117ac63d3c04
-SHA1 (patch-ab) = d6c19134cb99d6f4d847ff53c2d73f7ba847becd
+SHA1 (scm5e3.zip) = 3d7a0160357840c6a96ef9ded6fb31d92507561d
+RMD160 (scm5e3.zip) = 91f97bf4efd6bf734fe3e789762a90f20ad7b9b2
+Size (scm5e3.zip) = 901866 bytes
+SHA1 (patch-aa) = 456277f5bbce1fd90c0683a6fa66d7946aa84d07
+SHA1 (patch-ab) = 9b3b078bdebad4bc12bd52d6a2db202d5cf88f89
SHA1 (patch-ac) = 248981dd6fe1e099dc747d2dfca14671e60a9897
SHA1 (patch-ad) = 8f5a993d4adcb053884985f966ceb2092999ff70
SHA1 (patch-ae) = dc6691615dced4295ce1fa21dff5c1b955de858b
diff --git a/lang/scm/files/buildscm.sh b/lang/scm/files/buildscm.sh
index 5e2e859cd88..9d3be7546c7 100644
--- a/lang/scm/files/buildscm.sh
+++ b/lang/scm/files/buildscm.sh
@@ -2,9 +2,9 @@
# unix (unix) script created by SLIB/batch Thu Jul 17 21:20:04 2003
# ================ Write file with C defines
rm -f scmflags.h
-echo '#define IMPLINIT "@PREFIX@/share/scm/Init5e1.scm"'>>scmflags.h
+echo '#define IMPLINIT "@PREFIX@/share/scm/Init5e3.scm"'>>scmflags.h
echo '#define INITS init_sc2();init_ramap();init_gsubr();init_ioext();init_posix();init_record();init_rgx();init_socket();init_unix();'>>scmflags.h
-echo '#define COMPILED_INITS init_edline();'>>scmflags.h
+echo '#define COMPILED_INITS @COMPILED_INITS@'>>scmflags.h
echo '#define ARRAYS'>>scmflags.h
echo '#define BIGNUMS'>>scmflags.h
echo '#define CAUTIOUS'>>scmflags.h
@@ -16,7 +16,7 @@ echo '#define MACRO'>>scmflags.h
echo '#define CCLO'>>scmflags.h
echo '#define TICKS'>>scmflags.h
# ================ Compile C source files
-@CC@ @CFLAGS@ -c -Wall sc2.c ramap.c dynl.c edline.c gsubr.c ioext.c posix.c record.c rgx.c socket.c unix.c continue.c scm.c scmmain.c findexec.c script.c time.c repl.c scl.c eval.c sys.c subr.c debug.c unif.c rope.c unexelf.c
+${CC} ${CFLAGS} -c -Wall ${SRCS}
# ================ Link C object files
mv -f scm scm~
-@CC@ -o scm sc2.o ramap.o dynl.o edline.o gsubr.o ioext.o posix.o record.o rgx.o socket.o unix.o continue.o scm.o scmmain.o findexec.o script.o time.o repl.o scl.o eval.o sys.o subr.o debug.o unif.o rope.o unexelf.o -lm -ledit -ltermcap
+${CC} ${LDFLAGS} -o scm ${OBJS} -lm -lreadline ${LIBS}
diff --git a/lang/scm/options.mk b/lang/scm/options.mk
new file mode 100644
index 00000000000..c0fd77faa81
--- /dev/null
+++ b/lang/scm/options.mk
@@ -0,0 +1,15 @@
+# $NetBSD: options.mk,v 1.1 2007/08/02 14:47:24 obache Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.scm
+PKG_SUPPORTED_OPTIONS= x11
+PKG_SUGGESTED_OPTIONS= x11
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mx11)
+.include "../../x11/libX11/buildlink3.mk"
+SCM_MODULES+= x
+COMPILED_INITS+=init_x
+CFLAGS+= -DX11 -I${X11BASE:Q}/include
+LIBS+= -L${X11BASE:Q}/lib -lX11
+.endif
diff --git a/lang/scm/patches/patch-aa b/lang/scm/patches/patch-aa
index de45641556c..45e4d9b8667 100644
--- a/lang/scm/patches/patch-aa
+++ b/lang/scm/patches/patch-aa
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.3 2006/02/19 17:50:11 joerg Exp $
+$NetBSD: patch-aa,v 1.4 2007/08/02 14:47:25 obache Exp $
---- Makefile.orig 2005-06-24 01:20:35.000000000 +0000
+--- Makefile.orig 2006-10-25 01:47:17.000000000 +0000
+++ Makefile
@@ -44,7 +44,7 @@
SHELL = /bin/sh
@@ -11,20 +11,38 @@ $NetBSD: patch-aa,v 1.3 2006/02/19 17:50:11 joerg Exp $
#LD = $(CC) -g
LD = $(CC)
SCMLIT = ./scmlit
-@@ -97,7 +97,9 @@ ofiles = scm.o time.o repl.o scl.o sys.o
- # ramap.o
+@@ -86,7 +86,7 @@ srcdir.mk: Makefile
+ echo "srcdir=`pwd`/" >> srcdir.mk
+ #srcdir=$(HOME)/scm/
+ #srcdir=/usr/local/src/scm/
+-include srcdir.mk
++#include srcdir.mk
+
+ # directory where COPYING and InitXXX.scm reside.
+ #IMPLPATH = /usr/local/src/scm/
+@@ -110,7 +110,9 @@ ofiles = scm.o time.o repl.o scl.o sys.o
+ # continue-ia64.o
ifiles = Init$(VERSION).scm Transcen.scm Link.scm Macro.scm Macexp.scm \
Tscript.scm compile.scm Iedline.scm Idiffer.scm
-hobfiles = hobbit.scm scmhob.scm scmhob.h
+hobsrcs = hobbit.scm scmhob.scm
+hobincs = scmhob.h
+hobfiles = $(hobsrcs) $(hobincs)
+ turfiles = turtlegr.c turtle grtest.scm
xafiles = xatoms.scm x11.scm xevent.scm keysymdef.scm
xfiles = x.c x.h xgen.scm xevent.h inc2scm $(xafiles)
+@@ -249,7 +251,7 @@ libscm.opt:
+ echo "-F engineering-notation" >> libscm.opt
+ echo "-F dynamic-linking" >> libscm.opt
+ mylib: libscm.a
+-libscm.a: libscm.opt
++libscm.a: libscm.opt scmlit
+ $(BUILD) -t lib -f libscm.opt
+ libtest: libscm.a libtest.c
+ $(LD) -o libtest libtest.c libscm.a -ldl -lm -lc
+@@ -420,12 +422,12 @@ $(PREVDOCS)scm.info: srcdir.mk Makefile
-@@ -396,12 +398,12 @@ $(PREVDOCS)scm.info: srcdir.mk Makefile
-
- rpm_prefix=/usr/src/redhat/
+ rpm_prefix=$(HOME)/rpmbuild/
-prefix = /usr/local/
+prefix = $(PREFIX)/
@@ -37,7 +55,7 @@ $NetBSD: patch-aa,v 1.3 2006/02/19 17:50:11 joerg Exp $
# directory where `make install' will put manual page.
mandir = $(prefix)man/
man1dir = $(mandir)man1/
-@@ -453,7 +455,7 @@ $(infodir)Xlibscm.info.gz: $(infodir)Xli
+@@ -477,7 +479,7 @@ $(infodir)Xlibscm.info.gz: $(infodir)Xli
$(infodir)hobbit.info.gz: $(infodir)hobbit.info
gzip -f $(infodir)hobbit.info
@@ -46,7 +64,7 @@ $NetBSD: patch-aa,v 1.3 2006/02/19 17:50:11 joerg Exp $
test -d $(bindir) || mkdir $(bindir)
test -d $(mandir) || mkdir $(mandir)
test -d $(man1dir) || mkdir $(man1dir)
-@@ -462,16 +464,16 @@ install: scm.1 db.so wbtab.scm rwb-isam.
+@@ -486,16 +488,16 @@ install: scm.1 db.so wbtab.scm rwb-isam.
-cp scm.1 $(man1dir)
test -d $(libdir) || mkdir $(libdir)
test -d $(libscmdir) || mkdir $(libscmdir)
diff --git a/lang/scm/patches/patch-ab b/lang/scm/patches/patch-ab
index 99548dcf44a..d5ea982bf24 100644
--- a/lang/scm/patches/patch-ab
+++ b/lang/scm/patches/patch-ab
@@ -1,13 +1,13 @@
-$NetBSD: patch-ab,v 1.1.1.1 2003/10/04 20:31:23 agc Exp $
+$NetBSD: patch-ab,v 1.2 2007/08/02 14:47:25 obache Exp $
---- socket.c.orig 2003-01-02 11:44:31.000000000 -0800
+--- socket.c.orig 2006-01-07 02:17:38.000000000 +0000
+++ socket.c
-@@ -146,7 +146,7 @@ SCM l_hostinfo(name)
+@@ -149,7 +149,7 @@ SCM l_hostinfo(name)
struct in_addr inad;
- char **argv;
+ const char **argv;
int i = 0;
--#ifndef linux
-+#if !(defined(linux) || defined(__NetBSD__))
- if UNBNDP(name) {
+-# ifndef linux
++# if !(defined(linux) || defined(__NetBSD__))
+ if (UNBNDP(name)) {
DEFER_INTS;
SYSCALL(entry = gethostent(););