summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lang/snobol/Makefile31
-rw-r--r--lang/snobol/files/md53
-rw-r--r--lang/snobol/files/patch-sum8
-rw-r--r--lang/snobol/patches/patch-aa20
-rw-r--r--lang/snobol/patches/patch-ab78
-rw-r--r--lang/snobol/patches/patch-ac12
-rw-r--r--lang/snobol/patches/patch-ad21
-rw-r--r--lang/snobol/pkg/DESCR33
-rw-r--r--lang/snobol/pkg/PLIST3
9 files changed, 156 insertions, 53 deletions
diff --git a/lang/snobol/Makefile b/lang/snobol/Makefile
index a63ebb6fde0..c169530a303 100644
--- a/lang/snobol/Makefile
+++ b/lang/snobol/Makefile
@@ -1,26 +1,41 @@
-# $NetBSD: Makefile,v 1.1.1.1 2000/03/11 06:01:55 wiz Exp $
+# $NetBSD: Makefile,v 1.2 2001/02/06 18:13:51 wiz Exp $
#
DISTNAME= snobol-0.99.4
CATEGORIES= lang
MASTER_SITES= ftp://ftp.snobol4.com/ \
ftp://alpha.gnu.org/budne/snobol/
+DISTFILES= vanilla.zip snobol-0.99.4.tar.gz
-MAINTAINER= packages@netbsd.org
+MAINTAINER= refling@comet.lbl.gov
HOMEPAGE= http://people.ne.mediaone.net/philbudne/snobol.html
+BUILD_DEPENDS= unzip:../../archivers/unzip
+
+EXTRACT_ONLY= snobol-0.99.4.tar.gz
+
ALL_TARGET= it
USE_CONFIGURE= NO
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/xsnobol4 ${PREFIX}/bin/snobol4
- ${INSTALL_MAN} ${WRKSRC}/doc/snobol4.1 ${PREFIX}/man/man1
- ${INSTALL_DATA_DIR} ${PREFIX}/lib/snobol4
- cd ${WRKSRC} && ${INSTALL_DATA} snolib.a snolib/bq.sno \
+ @${CP} ${WRKSRC}/doc/head ${WRKSRC}/doc/tutorial
+ @unzip -d ${WRKSRC} -joqqLC ${DISTDIR}/vanilla.zip pm.exe
+ @unzip -p -opaaqqLC ${WRKSRC}/pm.exe >> ${WRKSRC}/doc/tutorial
+ @${GZIP_CMD} ${WRKSRC}/doc/tutorial
+ @${INSTALL_PROGRAM} ${WRKSRC}/xsnobol4 ${PREFIX}/bin/snobol4
+ @${INSTALL_MAN} ${WRKSRC}/doc/snobol4.1 ${PREFIX}/man/man1
+ @${INSTALL_DATA_DIR} ${PREFIX}/lib/snobol4
+ @cd ${WRKSRC} && ${INSTALL_DATA} snolib.a snolib/bq.sno \
${PREFIX}/lib/snobol4
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/snobol4
- cd ${WRKSRC}/doc && ${INSTALL_DATA} load.doc design.doc \
+ @${INSTALL_DATA_DIR} ${PREFIX}/share/doc/snobol4
+ @cd ${WRKSRC}/doc && ${INSTALL_DATA} load.doc design.doc tutorial.gz \
${PREFIX}/share/doc/snobol4
+ @${ECHO} ''
+ @${ECHO} '***********************************************************'
+ @${ECHO} '* A helpful tutorial is at share/doc/snobol4/tutorial.gz *'
+ @${ECHO} '* within your package tree. *'
+ @${ECHO} '***********************************************************'
+ @${ECHO} ''
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/snobol/files/md5 b/lang/snobol/files/md5
index c1941d58bbe..e9e18f3dc49 100644
--- a/lang/snobol/files/md5
+++ b/lang/snobol/files/md5
@@ -1,3 +1,4 @@
-$NetBSD: md5,v 1.1.1.1 2000/03/11 06:01:56 wiz Exp $
+$NetBSD: md5,v 1.2 2001/02/06 18:13:52 wiz Exp $
+MD5 (vanilla.zip) = 36b28ca78fc10ca2a3fa44d72928c329
MD5 (snobol-0.99.4.tar.gz) = 187e141405e4dd4a2da681090cbf396a
diff --git a/lang/snobol/files/patch-sum b/lang/snobol/files/patch-sum
index 5ad27cc946a..c3c9c6c57eb 100644
--- a/lang/snobol/files/patch-sum
+++ b/lang/snobol/files/patch-sum
@@ -1,4 +1,6 @@
-$NetBSD: patch-sum,v 1.1.1.1 2000/03/11 06:01:56 wiz Exp $
+$NetBSD: patch-sum,v 1.2 2001/02/06 18:13:52 wiz Exp $
-MD5 (patch-aa) = 6c648332547d1f5e4ab64e2eb097a20f
-MD5 (patch-ab) = 459f65cc92144cf49c1df36fcf3bc18f
+MD5 (patch-aa) = f79a8ccbe39910ec8d5478ca6b5685b5
+MD5 (patch-ab) = 187924dc6c8d31ef1828d27708c96ca8
+MD5 (patch-ac) = 22b13fbaa276eca08896a44d5c24b81c
+MD5 (patch-ad) = d7c0d7126cf75233c7c362b4f6a6267e
diff --git a/lang/snobol/patches/patch-aa b/lang/snobol/patches/patch-aa
index 06971db1560..c3af099fec9 100644
--- a/lang/snobol/patches/patch-aa
+++ b/lang/snobol/patches/patch-aa
@@ -1,12 +1,10 @@
-$NetBSD: patch-aa,v 1.1.1.1 2000/03/11 06:01:56 wiz Exp $
+$NetBSD: patch-aa,v 1.2 2001/02/06 18:13:52 wiz Exp $
---- ./configure.orig Fri Jul 18 23:43:30 1997
-+++ ./configure Sat Mar 11 03:56:00 2000
-@@ -1,6 +1,6 @@
- #!/bin/sh
-
--if autoconf "$@" > config.m4.tmp; then
-+if ./autoconf "$@" > config.m4.tmp; then
- rm -f config.m4
- mv config.m4.tmp config.m4
- else
+--- ./doc/head.orig Thu Jan 25 07:23:12 2001
++++ ./doc/head Thu Jan 25 07:22:50 2001
+@@ -0,0 +1,5 @@
++[This document is publically posted at ftp://ftp.snobol4.com/vanilla.zip
++ and zipped within PM.EXE as SNOBOL4.MAN. This is actually for the MSDOS
++ version of SNOBOL4, but is a very good starting point to learn the Unix
++ version. Pardon the references to DOS. References to code snippets may
++ be found in vanilla.zip. This is a NetBSD package, John Refling, 2001.]
diff --git a/lang/snobol/patches/patch-ab b/lang/snobol/patches/patch-ab
index 0008bddc98b..3b0e61a5a3a 100644
--- a/lang/snobol/patches/patch-ab
+++ b/lang/snobol/patches/patch-ab
@@ -1,21 +1,63 @@
-$NetBSD: patch-ab,v 1.1.1.1 2000/03/11 06:01:56 wiz Exp $
+$NetBSD: patch-ab,v 1.2 2001/02/06 18:13:52 wiz Exp $
---- ./Makefile2.m4.orig Thu Aug 7 07:34:47 1997
-+++ ./Makefile2.m4 Sat Mar 11 04:24:21 2000
-@@ -48,13 +48,13 @@
- SNOLIB_FILE=snolib.a
+--- ./lib/bsd/mstime.c.orig Wed Oct 30 12:39:40 1996
++++ ./lib/bsd/mstime.c Thu Jan 25 07:08:41 2001
+@@ -12,11 +12,56 @@
+ * (and you don't need to know HZ)
+ */
- # directory name for default SNOLIB (used by -INCLUDE and LOAD())
--SNOLIB_DIR=/usr/local/lib/snobol4
-+SNOLIB_DIR=${PREFIX}/lib/snobol4
++/* Added by refling@comet.lbl.gov to compensate for the fact that the usec
++ value can go backwards within the same sec on NetBSD. Problem has been
++ noted on sparc and i386. It really only appears in the test routine
++ where times are differenced, causing negative numbers to be generated.
++ This WILL cause the build to fail consistently on my sparc LX, but not
++ on the i386, even though the problem can be demonstrated there. See
++ NetBSD PR bin/10201.
++
++ The simple solution here is to have a persistent variable, and if the
++ usec value returned from getrusage() is LESS than the previous one
++ (stored in the persistent variable), use the previous one. This is
++ only when the second counter is the same between the previous and
++ current usec. This will make time stand still, but at least it
++ won't go backwards!
++
++ This could also be added to the definition of the NetBSD getrusage()
++ function to prevent it from returning bogus values in the first place,
++ if the real cause of the problem can't be tracked down.
++
++ Note that the patch to snobol4 (in this file) will not need to be
++ changed even if/when getrusage() is ultimately fixed. The only expense
++ is a few extra numerical comparisons. Typically, one doesn't take time
++ measurements too often. */
++
++static long prev_sec = 0;
++static long prev_usec = 0;
++
+ int_t
+ mstime() {
+ struct rusage ru;
++ long cur_usec, cur_sec;
- # default name for installed binary
--BINDEST=/usr/local/bin/snobol4
-+BINDEST=${PREFIX}/bin/snobol4
-
- # default name for installed man page
--MANDEST=/usr/local/man/man1/snobol4.1
-+MANDEST=${PREFIX}/man/man1/snobol4.1
-
- ########
- # default lib source files
+ getrusage( RUSAGE_SELF, &ru ); /* XXX check return? */
+- return(ru.ru_utime.tv_sec * 1000 +
+- ru.ru_utime.tv_usec / 1000);
++ cur_usec = ru.ru_utime.tv_usec;
++ cur_sec = ru.ru_utime.tv_sec;
++ if (prev_usec > cur_usec && prev_sec == cur_sec) {
++ cur_usec = prev_usec;
++// prev_sec = cur_sec; /* this is redundant in this case, since == */
++// prev_usec = cur_usec; /* this is also redundant */
++// system("echo a >> /tmp/caught_problem");
++ }
++ else {
++ prev_sec = cur_sec;
++ prev_usec = cur_usec;
++ }
++ return(cur_sec * 1000 +
++ cur_usec / 1000);
++
++// this is what it was....
++// getrusage( RUSAGE_SELF, &ru ); /* XXX check return? */
++// return(ru.ru_utime.tv_sec * 1000 +
++// ru.ru_utime.tv_usec / 1000);
+ }
diff --git a/lang/snobol/patches/patch-ac b/lang/snobol/patches/patch-ac
new file mode 100644
index 00000000000..8d8c5fd5c9c
--- /dev/null
+++ b/lang/snobol/patches/patch-ac
@@ -0,0 +1,12 @@
+$NetBSD: patch-ac,v 1.1 2001/02/06 18:13:53 wiz Exp $
+
+--- ./configure.orig Fri Jul 18 14:43:30 1997
++++ ./configure Thu Jan 25 07:08:41 2001
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+
+-if autoconf "$@" > config.m4.tmp; then
++if ./autoconf "$@" > config.m4.tmp; then
+ rm -f config.m4
+ mv config.m4.tmp config.m4
+ else
diff --git a/lang/snobol/patches/patch-ad b/lang/snobol/patches/patch-ad
new file mode 100644
index 00000000000..6e3efaa7f42
--- /dev/null
+++ b/lang/snobol/patches/patch-ad
@@ -0,0 +1,21 @@
+$NetBSD: patch-ad,v 1.1 2001/02/06 18:13:53 wiz Exp $
+
+--- ./Makefile2.m4.orig Wed Aug 6 22:34:47 1997
++++ ./Makefile2.m4 Thu Jan 25 07:08:42 2001
+@@ -48,13 +48,13 @@
+ SNOLIB_FILE=snolib.a
+
+ # directory name for default SNOLIB (used by -INCLUDE and LOAD())
+-SNOLIB_DIR=/usr/local/lib/snobol4
++SNOLIB_DIR=${PREFIX}/lib/snobol4
+
+ # default name for installed binary
+-BINDEST=/usr/local/bin/snobol4
++BINDEST=${PREFIX}/bin/snobol4
+
+ # default name for installed man page
+-MANDEST=/usr/local/man/man1/snobol4.1
++MANDEST=${PREFIX}/man/man1/snobol4.1
+
+ ########
+ # default lib source files
diff --git a/lang/snobol/pkg/DESCR b/lang/snobol/pkg/DESCR
index 7377388a81c..1e8f3229f2c 100644
--- a/lang/snobol/pkg/DESCR
+++ b/lang/snobol/pkg/DESCR
@@ -1,11 +1,22 @@
-This is a free port of the original SIL (SNOBOL4 Implementation
-Language) "macro" version of SNOBOL4 (developed at Bell Labs) with the
-`C' language as a target.
-
-SNOBOL4, while known primarily as a string language excels at any task
-involving symbolic manipulations. It provides run time typing,
-garbage collection, user data types, on the fly compilation. It's
-primary weakness is it's simple syntax, and lack of "structured
-programming" constructs. However some consider the spareness of
-SNOBOL4 syntax a strength when compared to some "modern"
-agglomerations such as perl.
+This is a C implementation of the original Macro SIL (SNOBOL4 Implementation
+Language) version of SNOBOL4, originally developed at ATT Bell Labs.
+
+SNOBOL4, primarily known as a string processing language, excels at any task
+involving symbolic manipulations. The interpreter provides run-time typing,
+garbage collection, user defined data types, and on-the-fly sub-interpretation
+within a running program. Its primary weakness is a simple syntax, and a lack
+of "structured" constructs, although many would consider these to be strengths
+when compared to some "modern" and ever-changing agglomerations such as Perl.
+
+While not computationally speedy, it is handy for minimizing development time
+and effort when creating data conversion tools. This is because of its data
+manipulation functions, associative memory data structures, and an extensive
+set of sophisticated built-in string pattern matching primatives.
+
+SNOBOL4 consists of one relatively small executable file, without the scads
+of associated libraries and modules that make package management difficult.
+
+Although developed in the early 1960s (the SNOBOL3 primer was published by the
+MIT press in 1967), some feel that it is still ahead of its time today. While
+it is fully functional and extensively tested, it is no longer evolving, having
+reached the desirable stable plateau in any programming language's life cycle.
diff --git a/lang/snobol/pkg/PLIST b/lang/snobol/pkg/PLIST
index 3f3354ef597..2aa0411fced 100644
--- a/lang/snobol/pkg/PLIST
+++ b/lang/snobol/pkg/PLIST
@@ -1,9 +1,10 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2000/03/11 06:01:55 wiz Exp $
+@comment $NetBSD: PLIST,v 1.2 2001/02/06 18:13:53 wiz Exp $
bin/snobol4
man/man1/snobol4.1
lib/snobol4/snolib.a
lib/snobol4/bq.sno
share/doc/snobol4/load.doc
share/doc/snobol4/design.doc
+share/doc/snobol4/tutorial.gz
@dirrm lib/snobol4
@dirrm share/doc/snobol4