diff options
author | proff <proff@pkgsrc.org> | 1999-12-08 15:48:15 +0000 |
---|---|---|
committer | proff <proff@pkgsrc.org> | 1999-12-08 15:48:15 +0000 |
commit | 5e6d6e6d9a4519dbaa9b0e0b7093a736e01bed28 (patch) | |
tree | 61b34aa3d22474f0ce9be6b836aa3731a1bd0e5f /lang/sml-nj | |
parent | 2566cb0668a8b15c1c8c04a1027933443434c55c (diff) | |
download | pkgsrc-5e6d6e6d9a4519dbaa9b0e0b7093a736e01bed28.tar.gz |
A Standard ML implementation from Bell-Labs. Implements the SML '97 definition
including the new Basis library with a few minor omissions and discrepancies.
WWW: http://cm.bell-labs.com/cm/cs/what/smlnj/index.html
If you are interested in a lighter weight implementation of ML,
the Moscow-ML port is recommended.
Diffstat (limited to 'lang/sml-nj')
-rw-r--r-- | lang/sml-nj/Makefile | 79 | ||||
-rw-r--r-- | lang/sml-nj/files/md5 | 11 | ||||
-rw-r--r-- | lang/sml-nj/files/patch-global-names | 11 | ||||
-rw-r--r-- | lang/sml-nj/patches/patch-ab | 15 | ||||
-rw-r--r-- | lang/sml-nj/pkg/COMMENT | 1 | ||||
-rw-r--r-- | lang/sml-nj/pkg/DESCR | 10 | ||||
-rw-r--r-- | lang/sml-nj/pkg/PLIST | 161 | ||||
-rwxr-xr-x | lang/sml-nj/scripts/get-cm | 81 |
8 files changed, 369 insertions, 0 deletions
diff --git a/lang/sml-nj/Makefile b/lang/sml-nj/Makefile new file mode 100644 index 00000000000..08f2263442e --- /dev/null +++ b/lang/sml-nj/Makefile @@ -0,0 +1,79 @@ +# New ports collection makefile for: sml/nj +# Version required: 110 +# Date created: 7 July 1998 +# Whom: jkoshy +# +# $FreeBSD: ports/lang/sml-nj/Makefile,v 1.9 1999/08/25 06:35:27 obrien Exp $ +# + +DISTNAME= 110.9.1-bin.x86-unix +PKGNAME= smlnj-110.9.1 +CATEGORIES= lang +MASTER_SITES= ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.9.1/ \ + ftp://ftp.diku.dk/pub/smlnj/working/110.9.1/ \ + ftp://sunsite.doc.ic.ac.uk/computing/programming/languages/ml/smlnj/working/110.9.1/ \ + ftp://compiler.kaist.ac.kr/pub/sml/working/110.9.1/ +DISTFILES= 110.9.1-bin.x86-unix.tar.Z 110.9.1-cm.tar.Z 110.9.1-cml.tar.Z \ + 110.9.1-config.tar.Z 110.9.1-eXene.tar.Z \ + 110.9.1-ml-burg.tar.Z 110.9.1-ml-lex.tar.Z 110.9.1-ml-yacc.tar.Z \ + 110.9.1-runtime.tar.Z 110.9.1-smlnj-c.tar.Z \ + 110.9.1-smlnj-lib.tar.Z + +MAINTAINER= jkoshy@freebsd.org + +# Other mirror sites that generally carry only released versions of SML +# ftp://rodin.stanford.edu/pub/smlnj/release/ +# ftp://ftp.cl.cam.ac.uk/MIRRORED/smlnj/release/ +# ftp://ftp.ntua.gr/pub/lang/smlnj/release/ +# Mirror sites that keep files around in gzipped format +# ftp://flint.cs.yale.edu/pub/smlnj/working/110.9.1/ + +DIST_SUBDIR= sml-nj +NO_WRKSUBDIR= yes +EXTRACT_ONLY= 110.9.1-config.tar.Z +USE_GMAKE= yes + +SML_BASE= ${PREFIX}/lib/sml-nj +SML_LIBDIR= ${SML_BASE}/lib +SML_BINDIR= ${SML_BASE}/bin +SML_SRCDIR= ${SML_BASE}/src +SML_EXES= ml-burg ml-lex ml-yacc sml + +# make symlinks to the dist files +post-extract: + cd ${WRKDIR} && ${LN} -sf ${_DISTDIR}/* . + +# The build target needs to run $WRKDIR/config/install.sh +do-build: + cd ${WRKDIR} && unset PWD && \ + FILESDIR="$(FILESDIR)" PATCH="$(PATCH)" PATCH_ARGS="$(PATCH_ARGS)" \ + ./config/install.sh + +# install target +# 1. create installation directories +# 2. copy the ./bin directory across +# 3. edit bin/.run_sml to override BIN_DIR +# 4. copy all .stable files in CM/ directories +# 5. find all .cm files reachable from $WRKDIR/lib and copy them across +# 6. copy the aliases in ./lib changing WRKDIR to SML_LIBDIR +# 7. install links to executables in $PREFIX/bin +do-install: + ${MKDIR} ${SML_BASE} ${SML_BINDIR} ${SML_LIBDIR} + tar -C ${WRKDIR} -cf - bin | tar -C ${SML_BASE} -xf - + ${RM} -f ${SML_BINDIR}/.run-sml + ${SED} -e "s,^BIN_DIR=.*\$$,BIN_DIR=${SML_BINDIR}," \ + < ${WRKDIR}/bin/.run-sml > ${SML_BINDIR}/.run-sml + ${CHMOD} 755 ${SML_BINDIR}/.run-sml + cd ${WRKDIR} && tar -cf - `find . -name '*.stable' | ${GREP} CM` | \ + tar -C ${SML_BASE} -xf - + cd ${WRKDIR} && tar -cf - `${SCRIPTDIR}/get-cm ${WRKDIR}` | \ + tar -C ${SML_BASE} -xf - + for file in ${WRKDIR}/lib/*; do\ + ${SED} -e "s,${WRKDIR},${SML_BASE}," < $$file > \ + ${SML_LIBDIR}/`${BASENAME} $$file`; \ + done +.for file in ${SML_EXES} + -${LN} -s ${SML_BINDIR}/${file} ${PREFIX}/bin/${file} +.endfor + +.include <bsd.port.mk> diff --git a/lang/sml-nj/files/md5 b/lang/sml-nj/files/md5 new file mode 100644 index 00000000000..7b0f4172554 --- /dev/null +++ b/lang/sml-nj/files/md5 @@ -0,0 +1,11 @@ +MD5 (sml-nj/110.9.1-bin.x86-unix.tar.Z) = a8d2a792ef392a0ddd8ece325fd4b892 +MD5 (sml-nj/110.9.1-cm.tar.Z) = ee3987dbee99b5f0b59cb09c1a956a0d +MD5 (sml-nj/110.9.1-cml.tar.Z) = 8c33edee5e75fd18600ef9f0b5b253ae +MD5 (sml-nj/110.9.1-config.tar.Z) = 7a386efc49ca847745f818dcbe5a36bf +MD5 (sml-nj/110.9.1-eXene.tar.Z) = 33f16b9d64f2c02f36172e434f29f136 +MD5 (sml-nj/110.9.1-ml-burg.tar.Z) = c25007873fbe1dd6ae68a2f0a54e7089 +MD5 (sml-nj/110.9.1-ml-lex.tar.Z) = acd4a503f087fb0a4a044d3ff6da5d24 +MD5 (sml-nj/110.9.1-ml-yacc.tar.Z) = 478430b7bcaa41f1d3f1cc66055078d7 +MD5 (sml-nj/110.9.1-runtime.tar.Z) = b73c165b4cf445601926f53566a1a589 +MD5 (sml-nj/110.9.1-smlnj-c.tar.Z) = c15c3295fd1a9afd9eb5aa67ae34543f +MD5 (sml-nj/110.9.1-smlnj-lib.tar.Z) = 53f49d01d3f6c3b4eb175ce07a7c8759 diff --git a/lang/sml-nj/files/patch-global-names b/lang/sml-nj/files/patch-global-names new file mode 100644 index 00000000000..85d10136ce4 --- /dev/null +++ b/lang/sml-nj/files/patch-global-names @@ -0,0 +1,11 @@ +--- src/runtime/include/asm-base.h-- Thu Aug 6 13:40:30 1998 ++++ src/runtime/include/asm-base.h Mon Feb 1 15:33:00 1999 +@@ -16,7 +16,7 @@ + #define FALSE 0 + #define TRUE 1 + +-#if (!defined(GLOBALS_HAVE_UNDERSCORE)) && (defined(OPSYS_SUNOS) || defined(OPSYS_FREEBSD) || defined(OPSYS_NETBSD) || defined(OPSYS_NEXTSTEP) || defined(OPSYS_WIN32)) ++#if (!defined(GLOBALS_HAVE_UNDERSCORE)) && (defined(OPSYS_SUNOS) || (defined(OPSYS_FREEBSD) && !defined(__ELF__)) || defined(OPSYS_NETBSD) || defined(OPSYS_NEXTSTEP) || defined(OPSYS_WIN32)) + # define GLOBALS_HAVE_UNDERSCORE + #endif + diff --git a/lang/sml-nj/patches/patch-ab b/lang/sml-nj/patches/patch-ab new file mode 100644 index 00000000000..122da2bf99a --- /dev/null +++ b/lang/sml-nj/patches/patch-ab @@ -0,0 +1,15 @@ +--- config/install.sh.orig Wed Aug 5 13:43:43 1998 ++++ config/install.sh Tue Feb 2 12:57:13 1999 +@@ -181,6 +181,12 @@ + if [ "$?" != "0" ]; then + exit $? + fi ++# we need to patch just before build ++patch_file="${FILESDIR}/patch-global-names" ++if [ -f $patch_file ]; then ++ echo "applying source patches" ++ $PATCH $PATCH_ARGS < $patch_file ++fi + if [ ! -x $RUNDIR/run.$ARCH-$OPSYS ]; then + cd $SRCDIR/runtime/objs + echo "compiling the run-time system" diff --git a/lang/sml-nj/pkg/COMMENT b/lang/sml-nj/pkg/COMMENT new file mode 100644 index 00000000000..b609878dcf2 --- /dev/null +++ b/lang/sml-nj/pkg/COMMENT @@ -0,0 +1 @@ +A popular functional language from Bell Labs diff --git a/lang/sml-nj/pkg/DESCR b/lang/sml-nj/pkg/DESCR new file mode 100644 index 00000000000..4d44ff2f2c0 --- /dev/null +++ b/lang/sml-nj/pkg/DESCR @@ -0,0 +1,10 @@ +A Standard ML implementation from Bell-Labs. Implements the SML '97 definition +including the new Basis library with a few minor omissions and discrepancies. + +WWW: http://cm.bell-labs.com/cm/cs/what/smlnj/index.html + +If you are interested in a lighter weight implementation of ML, +the Moscow-ML port is recommended. + +- Joseph Koshy + <jkoshy@freebsd.org> diff --git a/lang/sml-nj/pkg/PLIST b/lang/sml-nj/pkg/PLIST new file mode 100644 index 00000000000..6fec3f1eab4 --- /dev/null +++ b/lang/sml-nj/pkg/PLIST @@ -0,0 +1,161 @@ +bin/ml-burg +bin/ml-lex +bin/ml-yacc +bin/sml +lib/sml-nj/bin/.heap/sml.x86-bsd +lib/sml-nj/bin/.heap/ml-yacc.x86-bsd +lib/sml-nj/bin/.heap/ml-lex.x86-bsd +lib/sml-nj/bin/.heap/ml-burg.x86-bsd +lib/sml-nj/bin/.run/run.x86-freebsd +lib/sml-nj/bin/.arch-n-opsys +lib/sml-nj/bin/.run-sml +lib/sml-nj/bin/ml-burg +lib/sml-nj/bin/ml-lex +lib/sml-nj/bin/ml-yacc +lib/sml-nj/bin/sml +lib/sml-nj/lib/cml-lib.cm +lib/sml-nj/lib/cml.cm +lib/sml-nj/lib/eXene.cm +lib/sml-nj/lib/html-lib.cm +lib/sml-nj/lib/ml-yacc-lib.cm +lib/sml-nj/lib/pp-lib.cm +lib/sml-nj/lib/reactive-lib.cm +lib/sml-nj/lib/regexp-lib.cm +lib/sml-nj/lib/smlnj-lib.cm +lib/sml-nj/lib/unix-lib.cm +lib/sml-nj/src/ml-yacc/lib/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/ml-yacc/lib/sources.cm +lib/sml-nj/src/smlnj-lib/HTML/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/smlnj-lib/HTML/sources.cm +lib/sml-nj/src/smlnj-lib/PP/devices/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/smlnj-lib/PP/devices/sources.cm +lib/sml-nj/src/smlnj-lib/PP/src/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/smlnj-lib/PP/src/sources.cm +lib/sml-nj/src/smlnj-lib/PP/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/smlnj-lib/PP/sources.cm +lib/sml-nj/src/smlnj-lib/Reactive/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/smlnj-lib/Reactive/sources.cm +lib/sml-nj/src/smlnj-lib/RegExp/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/smlnj-lib/RegExp/sources.cm +lib/sml-nj/src/smlnj-lib/Unix/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/smlnj-lib/Unix/sources.cm +lib/sml-nj/src/smlnj-lib/Util/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/smlnj-lib/Util/sources.cm +lib/sml-nj/src/cml/cml-lib/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/cml/cml-lib/CM/x86-unix/trace-cml.cm.stable +lib/sml-nj/src/cml/cml-lib/sources.cm +lib/sml-nj/src/cml/cml-lib/trace-cml.cm +lib/sml-nj/src/cml/src/IO/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/cml/src/IO/sources.cm +lib/sml-nj/src/cml/src/OS/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/cml/src/OS/sources.cm +lib/sml-nj/src/cml/src/Sockets/CM/x86-unix/layer2.cm.stable +lib/sml-nj/src/cml/src/Sockets/CM/x86-unix/layer3.cm.stable +lib/sml-nj/src/cml/src/Sockets/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/cml/src/Sockets/CM/x86-unix/layer1.cm.stable +lib/sml-nj/src/cml/src/Sockets/layer1.cm +lib/sml-nj/src/cml/src/Sockets/layer2.cm +lib/sml-nj/src/cml/src/Sockets/layer3.cm +lib/sml-nj/src/cml/src/Sockets/sources.cm +lib/sml-nj/src/cml/src/Unix/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/cml/src/Unix/CM/x86-unix/os.cm.stable +lib/sml-nj/src/cml/src/Unix/os.cm +lib/sml-nj/src/cml/src/Unix/sources.cm +lib/sml-nj/src/cml/src/core-cml/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/cml/src/core-cml/sources.cm +lib/sml-nj/src/cml/src/glue/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/cml/src/glue/sources.cm +lib/sml-nj/src/cml/src/util/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/cml/src/util/sources.cm +lib/sml-nj/src/cml/src/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/cml/src/sources.cm +lib/sml-nj/src/eXene/graph-util/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/eXene/graph-util/sources.cm +lib/sml-nj/src/eXene/lib/CM/x86-unix/base.cm.stable +lib/sml-nj/src/eXene/lib/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/eXene/lib/base.cm +lib/sml-nj/src/eXene/lib/sources.cm +lib/sml-nj/src/eXene/styles/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/eXene/styles/sources.cm +lib/sml-nj/src/eXene/widgets/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/eXene/widgets/sources.cm +lib/sml-nj/src/eXene/CM/x86-unix/sources.cm.stable +lib/sml-nj/src/eXene/sources.cm +@dirrm lib/sml-nj/bin/.heap +@dirrm lib/sml-nj/bin/.run +@dirrm lib/sml-nj/bin +@dirrm lib/sml-nj/lib +@dirrm lib/sml-nj/src/ml-yacc/lib/CM/x86-unix +@dirrm lib/sml-nj/src/ml-yacc/lib/CM +@dirrm lib/sml-nj/src/ml-yacc/lib +@dirrm lib/sml-nj/src/ml-yacc +@dirrm lib/sml-nj/src/smlnj-lib/HTML/CM/x86-unix +@dirrm lib/sml-nj/src/smlnj-lib/HTML/CM +@dirrm lib/sml-nj/src/smlnj-lib/HTML +@dirrm lib/sml-nj/src/smlnj-lib/PP/devices/CM/x86-unix +@dirrm lib/sml-nj/src/smlnj-lib/PP/devices/CM +@dirrm lib/sml-nj/src/smlnj-lib/PP/devices +@dirrm lib/sml-nj/src/smlnj-lib/PP/src/CM/x86-unix +@dirrm lib/sml-nj/src/smlnj-lib/PP/src/CM +@dirrm lib/sml-nj/src/smlnj-lib/PP/src +@dirrm lib/sml-nj/src/smlnj-lib/PP/CM/x86-unix +@dirrm lib/sml-nj/src/smlnj-lib/PP/CM +@dirrm lib/sml-nj/src/smlnj-lib/PP +@dirrm lib/sml-nj/src/smlnj-lib/Reactive/CM/x86-unix +@dirrm lib/sml-nj/src/smlnj-lib/Reactive/CM +@dirrm lib/sml-nj/src/smlnj-lib/Reactive +@dirrm lib/sml-nj/src/smlnj-lib/RegExp/CM/x86-unix +@dirrm lib/sml-nj/src/smlnj-lib/RegExp/CM +@dirrm lib/sml-nj/src/smlnj-lib/RegExp +@dirrm lib/sml-nj/src/smlnj-lib/Unix/CM/x86-unix +@dirrm lib/sml-nj/src/smlnj-lib/Unix/CM +@dirrm lib/sml-nj/src/smlnj-lib/Unix +@dirrm lib/sml-nj/src/smlnj-lib/Util/CM/x86-unix +@dirrm lib/sml-nj/src/smlnj-lib/Util/CM +@dirrm lib/sml-nj/src/smlnj-lib/Util +@dirrm lib/sml-nj/src/smlnj-lib +@dirrm lib/sml-nj/src/cml/cml-lib/CM/x86-unix +@dirrm lib/sml-nj/src/cml/cml-lib/CM +@dirrm lib/sml-nj/src/cml/cml-lib +@dirrm lib/sml-nj/src/cml/src/IO/CM/x86-unix +@dirrm lib/sml-nj/src/cml/src/IO/CM +@dirrm lib/sml-nj/src/cml/src/IO +@dirrm lib/sml-nj/src/cml/src/OS/CM/x86-unix +@dirrm lib/sml-nj/src/cml/src/OS/CM +@dirrm lib/sml-nj/src/cml/src/OS +@dirrm lib/sml-nj/src/cml/src/Sockets/CM/x86-unix +@dirrm lib/sml-nj/src/cml/src/Sockets/CM +@dirrm lib/sml-nj/src/cml/src/Sockets +@dirrm lib/sml-nj/src/cml/src/Unix/CM/x86-unix +@dirrm lib/sml-nj/src/cml/src/Unix/CM +@dirrm lib/sml-nj/src/cml/src/Unix +@dirrm lib/sml-nj/src/cml/src/core-cml/CM/x86-unix +@dirrm lib/sml-nj/src/cml/src/core-cml/CM +@dirrm lib/sml-nj/src/cml/src/core-cml +@dirrm lib/sml-nj/src/cml/src/glue/CM/x86-unix +@dirrm lib/sml-nj/src/cml/src/glue/CM +@dirrm lib/sml-nj/src/cml/src/glue +@dirrm lib/sml-nj/src/cml/src/util/CM/x86-unix +@dirrm lib/sml-nj/src/cml/src/util/CM +@dirrm lib/sml-nj/src/cml/src/util +@dirrm lib/sml-nj/src/cml/src/CM/x86-unix +@dirrm lib/sml-nj/src/cml/src/CM +@dirrm lib/sml-nj/src/cml/src +@dirrm lib/sml-nj/src/cml +@dirrm lib/sml-nj/src/eXene/graph-util/CM/x86-unix +@dirrm lib/sml-nj/src/eXene/graph-util/CM +@dirrm lib/sml-nj/src/eXene/graph-util +@dirrm lib/sml-nj/src/eXene/lib/CM/x86-unix +@dirrm lib/sml-nj/src/eXene/lib/CM +@dirrm lib/sml-nj/src/eXene/lib +@dirrm lib/sml-nj/src/eXene/styles/CM/x86-unix +@dirrm lib/sml-nj/src/eXene/styles/CM +@dirrm lib/sml-nj/src/eXene/styles +@dirrm lib/sml-nj/src/eXene/widgets/CM/x86-unix +@dirrm lib/sml-nj/src/eXene/widgets/CM +@dirrm lib/sml-nj/src/eXene/widgets +@dirrm lib/sml-nj/src/eXene/CM/x86-unix +@dirrm lib/sml-nj/src/eXene/CM +@dirrm lib/sml-nj/src/eXene +@dirrm lib/sml-nj/src +@dirrm lib/sml-nj diff --git a/lang/sml-nj/scripts/get-cm b/lang/sml-nj/scripts/get-cm new file mode 100755 index 00000000000..88992a05219 --- /dev/null +++ b/lang/sml-nj/scripts/get-cm @@ -0,0 +1,81 @@ +#!/bin/sh +# +# usage: get-cm work_dir +# +# Find all .cm Group and Library descriptions that are referenced +# from the top level alias files in $SML_BASE/lib/ + +# temp file +tmpfile="${TMP:-/tmp}/chomp$$" + +# attempt to change directory to work dir +cd $1 || exit 1 +work_dir=`pwd` # get the canonical name for the current directory + +trap "rm -f $tmpfile" 0 1 2 3 15 + +# hack to remove SML comments '(* ... *)' + +strip_comments() +{ + # caveat: the following assumes gcc is present ... + gcc -x c -E -P -ansi -DOPSYS_UNIX $1 | awk '{ + line = $0 + if (match(line, "\\(\\*")) { + while (match($0, "\\(\\*")) { + if (RSTART > 1) { + print substr($0, 0, RSTART-1); + } + sub("^.*\\(\\*", ""); + while (!match($0, "\\*\\)")) { + getline + } + $0 = substr($0, RSTART+RLENGTH); + } + } + print + }' +} + +# return canonical name for a path with embedded ..'s + +canonical() +{ + echo $(cd `dirname $1` && pwd)/`basename $1` +} + +# initial list of CM description files +global_cm_list="$(cat ./lib/*.cm | awk '{ print $2 }')" + +set -- $global_cm_list + +touch $tmpfile + +# process the global list +while [ $# -ge 1 ]; do + + cm_file="$1"; shift + global_cm_list="$*" + + echo $cm_file >> $tmpfile + + cm_dir=`dirname $cm_file` + cm_new=$(strip_comments $cm_file | grep '\.cm' | \ + awk '{ print $1 }') + + # append new CM files to current global list + for i in $cm_new; do + new_cm_file=$(canonical $cm_dir/$i) + if [ -r $new_cm_file ]; then + if ! grep "^$new_cm_file" $tmpfile > /dev/null; then + global_cm_list="$new_cm_file $global_cm_list" + echo $new_cm_file >> $tmpfile + fi + fi + done + + set -- $global_cm_list +done + +# output to stdout +sort -u < $tmpfile | sed -e "s,^$work_dir/,," |