summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2003-03-21 22:54:38 +0000
committerwiz <wiz@pkgsrc.org>2003-03-21 22:54:38 +0000
commit452db341150bd2edfb9a4722b568345fb6345fe7 (patch)
tree6ac5a634c59eb6a42cecec8931dae4a8bf19b2bb
parente9602f1ccb8a58e8f7232574df0e77961633c132 (diff)
downloadpkgsrc-452db341150bd2edfb9a4722b568345fb6345fe7.tar.gz
Update to 110.42, from Christopher Richards in connection with PR 18678.
Changes: A number of small, but important bug fixes.
-rw-r--r--lang/smlnj/Makefile65
-rw-r--r--lang/smlnj/Makefile.common25
-rw-r--r--lang/smlnj/distinfo79
-rw-r--r--lang/smlnj/patches/patch-aa28
-rw-r--r--lang/smlnj/patches/patch-ag4
-rw-r--r--lang/smlnj/patches/patch-ah12
-rw-r--r--lang/smlnj/patches/patch-ai12
-rw-r--r--lang/smlnj/patches/patch-aj12
-rw-r--r--lang/smlnj/patches/patch-ak12
-rw-r--r--lang/smlnj/patches/patch-al13
-rw-r--r--lang/smlnj/patches/patch-am13
-rw-r--r--lang/smlnj/patches/patch-an13
12 files changed, 191 insertions, 97 deletions
diff --git a/lang/smlnj/Makefile b/lang/smlnj/Makefile
index 393b1f5ec6c..e37c911ef9d 100644
--- a/lang/smlnj/Makefile
+++ b/lang/smlnj/Makefile
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.1.1.1 2003/03/21 22:20:55 wiz Exp $
+# $NetBSD: Makefile,v 1.2 2003/03/21 22:54:38 wiz Exp $
#
DISTNAME= boot.${BOX}-unix
PKGNAME= smlnj-${SML_VERSION}
CATEGORIES= lang
-MASTER_SITES= ftp://ftp.research.bell-labs.com/dist/smlnj/working/${SML_VERSION}/ \
+MASTER_SITES= http://www.smlnj.org/dist/working/${SML_VERSION}/ \
+ http://smlnj.cs.uchicago.edu/dist/working/${SML_VERSION}/ \
ftp://flint.cs.yale.edu/pub/smlnj/working/${SML_VERSION}/
DISTFILES= MLRISC.tgz \
boot.${BOX}-unix.tgz \
@@ -23,23 +24,18 @@ DISTFILES= MLRISC.tgz \
smlnj-lib.tgz \
system.tgz
-MAINTAINER= packages@netbsd.org
-HOMEPAGE= http://cm.bell-labs.com/cm/cs/what/smlnj/index.html
+MAINTAINER= richards+netbsd@CS.Princeton.EDU
+HOMEPAGE= http://www.smlnj.org/index.html
COMMENT= Popular functional language from Bell Labs
-SML_VERSION= 110.41
-
-# smlnj also supports hppa, sparc, ppc, mlrisc & alpha
-# pkg support for those platforms, and say, solaris-x86
-# is left as an (easy) exercise for the reader.
-ONLY_FOR_PLATFORM= NetBSD-*-i386 SunOS-*-sparc NetBSD-*-sparc
+SML_VERSION= 110.42
# 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/
-DIST_SUBDIR= sml-nj-${SML_VERSION}
+DIST_SUBDIR= smlnj-${SML_VERSION}
WRKSRC= ${WRKDIR}
USE_GMAKE= yes
@@ -49,21 +45,9 @@ CONFLICTS= sml-nj-[0-9]*
SML_BASE= ${PREFIX}/lib/smlnj
SML_LIBDIR= ${SML_BASE}/lib
SML_BINDIR= ${SML_BASE}/bin
+SML_SCRIPTS= _link-sml _run-sml _ml-build _ml-makedepend
-.include "../../mk/bsd.prefs.mk"
-
-.if ${OPSYS} == "SunOS" && ${MACHINE_ARCH} == "sparc"
-BOX= sparc
-OS= ${LOWER_OPSYS}
-.elif ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "i386"
-BOX= x86
-OS= bsd
-.elif ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "sparc"
-BOX= sparc
-OS= bsd
-.endif
-
-PLIST_SUBST+= BOX=${BOX} OS=${OS}
+.include "../../lang/smlnj/Makefile.common"
# create parent directory for the runtime system
pre-extract:
@@ -82,28 +66,35 @@ do-extract:
post-extract:
cd ${WRKDIR} && ${LN} -sf ${_DISTDIR}/* .
+# resolve definition of SML_BASE, CFLAGS in patched files
+do-configure:
+ cd ${WRKDIR}/config; \
+ for f in ${SML_SCRIPTS}; do \
+ ${CP} "$${f}" "$${f}.tmp"; \
+ ${SED} -e 's|@SML_BASE@|${SML_BASE}|g' \
+ < "$${f}.tmp" > "$${f}"; \
+ done; \
+ cd ${WRKDIR}/src/runtime/objs; \
+ for f in *; do \
+ ${CP} "$${f}" "$${f}.tmp"; \
+ ${SED} -e 's|@CFLAGS@|${CFLAGS}|g' \
+ < "$${f}.tmp" > "$${f}"; \
+ done
+
# 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
+ SMLNJ_HOME="${WRKDIR}" ./config/install.sh
# install target
# (see ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.38/INSTALL)
# 1. create installation directories
# 2. copy the ./bin and ./lib directories across
-# 3. edit scripts to override BIN_DIR and CM_PATHCONFIG
-# 4. install links to executables in $PREFIX/bin
+# 3. install links to executables in $PREFIX/bin
do-install:
${INSTALL_DATA_DIR} ${SML_BASE}
- (cd ${WRKDIR} && ${PAX} -rw -pam bin lib ${SML_BASE})
-.for script in .link-sml .run-sml ml-build ml-makedepend
- ${RM} -f ${SML_BINDIR}/${script}
- ${SED} -e "s,^BIN_DIR=.*\$$,BIN_DIR=${SML_BINDIR}," \
- -e "s,^exec,CM_PATHCONFIG=${SML_LIBDIR}/pathconfig exec," \
- ${WRKDIR}/bin/${script} > ${SML_BINDIR}/${script}
- ${CHMOD} ${BINMODE} ${SML_BINDIR}/${script}
-.endfor
- (cd ${PREFIX}/bin && ${LN} -sf ${SML_BINDIR}/* .)
+ cd ${WRKDIR} && ${PAX} -rw -pam bin lib ${SML_BASE}
+ cd ${PREFIX}/bin && ${LN} -sf ../lib/smlnj/bin/* .
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/smlnj/Makefile.common b/lang/smlnj/Makefile.common
new file mode 100644
index 00000000000..206703db08e
--- /dev/null
+++ b/lang/smlnj/Makefile.common
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile.common,v 1.1 2003/03/21 22:55:01 wiz Exp $
+
+# smlnj also supports hppa, sparc, ppc, mlrisc & alpha
+# pkg support for those platforms, and say, solaris-x86
+# is left as an (easy) exercise for the reader.
+ONLY_FOR_PLATFORM= NetBSD-*-i386 SunOS-*-sparc NetBSD-*-sparc
+
+.include "../../mk/bsd.prefs.mk"
+
+# Possible values of BOX and OS must be kept in sync with the
+# currently ported platforms.
+
+.if ${OPSYS} == "SunOS"
+OS= ${LOWER_OPSYS}
+.elif ${OPSYS} == "NetBSD"
+OS= bsd
+.endif
+
+.if ${MACHINE_ARCH} == "i386"
+BOX= x86
+.elif ${MACHINE_ARCH} == "sparc"
+BOX= ${MACHINE_ARCH}
+.endif
+
+PLIST_SUBST+= BOX=${BOX} OS=${OS}
diff --git a/lang/smlnj/distinfo b/lang/smlnj/distinfo
index 16f975ac5cc..798caa48c36 100644
--- a/lang/smlnj/distinfo
+++ b/lang/smlnj/distinfo
@@ -1,42 +1,47 @@
-$NetBSD: distinfo,v 1.1.1.1 2003/03/21 22:20:55 wiz Exp $
+$NetBSD: distinfo,v 1.2 2003/03/21 22:54:38 wiz Exp $
-SHA1 (sml-nj-110.41/MLRISC.tgz) = 7cb136457ceca0365619df974112344e1d7d3788
-Size (sml-nj-110.41/MLRISC.tgz) = 1170598 bytes
-SHA1 (sml-nj-110.41/boot.x86-unix.tgz) = 03807189ee8d591062a8c0ce9cbb065af4568653
-Size (sml-nj-110.41/boot.x86-unix.tgz) = 5072569 bytes
-SHA1 (sml-nj-110.41/boot.sparc-unix.tgz) = 0a353b1274f76b8f8f96262d43ceef0d80019460
-Size (sml-nj-110.41/boot.sparc-unix.tgz) = 5213967 bytes
-SHA1 (sml-nj-110.41/ckit.tgz) = bacd7cc348860eb3e8f6f7d9a770adb29fc50580
-Size (sml-nj-110.41/ckit.tgz) = 168118 bytes
-SHA1 (sml-nj-110.41/cm.tgz) = 25d2848798a25519f0154326e86d4cb0bb46c8bf
-Size (sml-nj-110.41/cm.tgz) = 201685 bytes
-SHA1 (sml-nj-110.41/cml.tgz) = 04b1e8cfd73291c353080ded420c2ac6ae9831cd
-Size (sml-nj-110.41/cml.tgz) = 127079 bytes
-SHA1 (sml-nj-110.41/compiler.tgz) = 1cef17d18d7763fea5431893dbf5981c5001c750
-Size (sml-nj-110.41/compiler.tgz) = 703537 bytes
-SHA1 (sml-nj-110.41/config.tgz) = a05d2c98ea4e7fa9650af5817a4fa4e02c38fe8d
-Size (sml-nj-110.41/config.tgz) = 13413 bytes
-SHA1 (sml-nj-110.41/eXene.tgz) = c89eecbeddd7f772ac1b327405690c8694e1e738
-Size (sml-nj-110.41/eXene.tgz) = 693018 bytes
-SHA1 (sml-nj-110.41/ml-burg.tgz) = 9fe9f305bd18b7c5c9f8a9952d81a310b64be48f
-Size (sml-nj-110.41/ml-burg.tgz) = 31719 bytes
-SHA1 (sml-nj-110.41/ml-lex.tgz) = 3008bd1bdd7ca2cfae19ca70b5123a8e84465b82
-Size (sml-nj-110.41/ml-lex.tgz) = 32010 bytes
-SHA1 (sml-nj-110.41/ml-nlffi-lib.tgz) = 48c39a8e27e7de6b0b48dbdea84001baadedeafd
-Size (sml-nj-110.41/ml-nlffi-lib.tgz) = 33913 bytes
-SHA1 (sml-nj-110.41/ml-nlffigen.tgz) = 0e9ce4f4c49f7dd37f1d2adc0bc5d61a21fc1418
-Size (sml-nj-110.41/ml-nlffigen.tgz) = 28800 bytes
-SHA1 (sml-nj-110.41/ml-yacc.tgz) = 29e03b707ca539d20385d220e3752d0e002f6ee5
-Size (sml-nj-110.41/ml-yacc.tgz) = 95493 bytes
-SHA1 (sml-nj-110.41/runtime.tgz) = 8060d52c55db7961fb7a7c3c5b347082ebfab7e2
-Size (sml-nj-110.41/runtime.tgz) = 311920 bytes
-SHA1 (sml-nj-110.41/smlnj-lib.tgz) = c7db78fa45fac689bb2e2e472d2bc5394f63d0ce
-Size (sml-nj-110.41/smlnj-lib.tgz) = 250010 bytes
-SHA1 (sml-nj-110.41/system.tgz) = fa69034cd2b06a052609280c8523a08a41c2770b
-Size (sml-nj-110.41/system.tgz) = 177127 bytes
-SHA1 (patch-aa) = 21e488442554b0970e11d4bdcc19639d3579e962
+SHA1 (smlnj-110.42/MLRISC.tgz) = 55055ed06f7dd2ef178ef365c018f0f38f740528
+Size (smlnj-110.42/MLRISC.tgz) = 1173187 bytes
+SHA1 (smlnj-110.42/boot.x86-unix.tgz) = 7e85b25459886179be0bcb949cd489f62c0a5424
+Size (smlnj-110.42/boot.x86-unix.tgz) = 5147025 bytes
+SHA1 (smlnj-110.42/ckit.tgz) = f47599df014c9c6dcd02c0bfcc0fad5d1409451b
+Size (smlnj-110.42/ckit.tgz) = 168000 bytes
+SHA1 (smlnj-110.42/cm.tgz) = c102131e974e91426bab1cc30005f8e02f7622b6
+Size (smlnj-110.42/cm.tgz) = 202633 bytes
+SHA1 (smlnj-110.42/cml.tgz) = 61f20116032d284a0d2eecd5f14de5378ff4ea6d
+Size (smlnj-110.42/cml.tgz) = 128485 bytes
+SHA1 (smlnj-110.42/compiler.tgz) = fbde2959e05c04333131450d152a6ac5890b2867
+Size (smlnj-110.42/compiler.tgz) = 704669 bytes
+SHA1 (smlnj-110.42/config.tgz) = f7c1b75019c274872d599b9f5a42ce0ee1926c24
+Size (smlnj-110.42/config.tgz) = 13660 bytes
+SHA1 (smlnj-110.42/eXene.tgz) = e213539308047636da34a82fbcc7d59a8f03ea7a
+Size (smlnj-110.42/eXene.tgz) = 695431 bytes
+SHA1 (smlnj-110.42/ml-burg.tgz) = 8c69fd51f7eb86b941883fa7c309b7e54baf28ea
+Size (smlnj-110.42/ml-burg.tgz) = 31696 bytes
+SHA1 (smlnj-110.42/ml-lex.tgz) = 524714f95cd014e55624e9d1b270a77100f28cd1
+Size (smlnj-110.42/ml-lex.tgz) = 32108 bytes
+SHA1 (smlnj-110.42/ml-nlffi-lib.tgz) = 5222ccdc1d9737360a0ce60b05137b476282e9f3
+Size (smlnj-110.42/ml-nlffi-lib.tgz) = 33645 bytes
+SHA1 (smlnj-110.42/ml-nlffigen.tgz) = d3e0e064dfd0fd3c12bda72e098224ebea180a6a
+Size (smlnj-110.42/ml-nlffigen.tgz) = 28836 bytes
+SHA1 (smlnj-110.42/ml-yacc.tgz) = ff4a077099a6f8d2bb8b32a64c9ef45e89358346
+Size (smlnj-110.42/ml-yacc.tgz) = 95608 bytes
+SHA1 (smlnj-110.42/runtime.tgz) = 913b2c4ca3edea2fd7fcc09c482665fb92e5f540
+Size (smlnj-110.42/runtime.tgz) = 313057 bytes
+SHA1 (smlnj-110.42/smlnj-lib.tgz) = c48a8e19d4a14799d7596ce896f4a2040fe1c2bf
+Size (smlnj-110.42/smlnj-lib.tgz) = 251230 bytes
+SHA1 (smlnj-110.42/system.tgz) = 0b9f61052a6413ac1d391a6b7ddf903875d192ff
+Size (smlnj-110.42/system.tgz) = 177548 bytes
+SHA1 (patch-aa) = 370fc94462f60fcf1b28ddad2266311b19d92eca
SHA1 (patch-ac) = b010b0fd5b923ed954023a72dc763e20f8f1b213
SHA1 (patch-ad) = c05aa7e345ca4827efb1b8de99dee9fb17e1770e
SHA1 (patch-ae) = 5796401418fd91a795fdfe75060cf654dd315ac1
SHA1 (patch-af) = 7bb089fbfc11e62f0a78d6cf48b6f0d855a462d8
-SHA1 (patch-ag) = c8a98f30e07ceb6ae3df42b3e5db11d97e1a1f5b
+SHA1 (patch-ag) = dae9c89ccc7ada96bd3ac4b2bae1da6427902fb4
+SHA1 (patch-ah) = 4d1f861cf18424db18fbcd19fd2e123b9a0a5247
+SHA1 (patch-ai) = dfb45b2c7d59bcd9230edb30d5dfffd4dab5782e
+SHA1 (patch-aj) = 24bbb65b02e97bec7673dccbf07fce9853c94984
+SHA1 (patch-ak) = 55738c10e5adc6b99d909a784f256b24e250990e
+SHA1 (patch-al) = f2492a36e670dcf2332b01b5769d51dc33a9f609
+SHA1 (patch-am) = 06d8cb145217c46ada440e0d3e7420ea99651064
+SHA1 (patch-an) = d6e1a75d5fb68423ce3181622de919c2337db2e7
diff --git a/lang/smlnj/patches/patch-aa b/lang/smlnj/patches/patch-aa
index bb747d47cf7..0b1cf7ffa9b 100644
--- a/lang/smlnj/patches/patch-aa
+++ b/lang/smlnj/patches/patch-aa
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $
+$NetBSD: patch-aa,v 1.2 2003/03/21 22:54:39 wiz Exp $
---- config/targets.orig Fri Feb 22 21:42:15 2002
+--- config/targets.orig Thu Oct 10 12:02:10 2002
+++ config/targets
@@ -41,7 +41,7 @@ request ml-lex
@@ -11,7 +11,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $
# pre-compile and install the remaining components of the SML/NJ library
# (everything except smlnj-lib.cm, aka Util, itself)
-@@ -50,27 +50,27 @@ request smlnj-lib
+@@ -50,7 +50,7 @@ request smlnj-lib
# pre-compile and install CM "portable graph" utility library
#
@@ -20,16 +20,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $
# pre-compile and install Concurrent ML, which is a library for message-passing
# concurrency.
- #
--#request cml
-+request cml
-
- # pre-compile and install the CML Library, which provides some useful CML
- # modules.
- #
--#request cml-lib
-+request cml-lib
-
+@@ -65,12 +65,12 @@ request cml-lib
# pre-compile and install eXene, which is a library for X-Windows programming.
# EXene requires CML.
#
@@ -44,7 +35,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $
# pre-compile and install the ML-NLFFI Library, which is the core of
# a new foreign function interface (where "foreign" functions are
-@@ -79,7 +79,7 @@ request smlnj-lib
+@@ -79,7 +79,7 @@ request cml-lib
# the new FFI.
# This preview release currently works only under X86/Linux.
#
@@ -53,7 +44,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $
# build ML-NLFFI-Gen, a program generator tool used in conjunction with
# the new "NLFFI" foreign function interface. The tool generates ML
-@@ -87,13 +87,13 @@ request smlnj-lib
+@@ -87,13 +87,13 @@ request cml-lib
# (Requires ckit!)
# This preview release currently works only under X86/Linux.
#
@@ -69,17 +60,12 @@ $NetBSD: patch-aa,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $
# Build and install the 'nowhere' program translator.
# This tool translates programs with conditional patterns (where clauses)
-@@ -101,11 +101,11 @@ request smlnj-lib
+@@ -101,7 +101,7 @@ request cml-lib
# (bad) documentation.
# (Requires the mlrisc-tools library!)
#
-#request nowhere
+request nowhere
- # unpack and install the documentation directory.
- #
--#request doc
-+request doc
-
# Note: autoloading is always enabled.
# In order to customize what is being pre-registered for autoloading
diff --git a/lang/smlnj/patches/patch-ag b/lang/smlnj/patches/patch-ag
index 7975946adca..764cf294cf8 100644
--- a/lang/smlnj/patches/patch-ag
+++ b/lang/smlnj/patches/patch-ag
@@ -1,4 +1,4 @@
-$NetBSD: patch-ag,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $
+$NetBSD: patch-ag,v 1.2 2003/03/21 22:54:39 wiz Exp $
--- src/runtime/objs/mk.sparc-netbsd.orig Thu Sep 19 03:54:01 2002
+++ src/runtime/objs/mk.sparc-netbsd
@@ -11,7 +11,7 @@ $NetBSD: patch-ag,v 1.1.1.1 2003/03/21 22:20:56 wiz Exp $
+MAKE = gmake
+GCC = gcc
+ARFLAGS = Trcv
-+CFLAGS = -O2 -Wall
++CFLAGS = @CFLAGS@
+LDFLAGS=
+CPP = $(GCC) -x c -E -P
+
diff --git a/lang/smlnj/patches/patch-ah b/lang/smlnj/patches/patch-ah
new file mode 100644
index 00000000000..1b02b90a330
--- /dev/null
+++ b/lang/smlnj/patches/patch-ah
@@ -0,0 +1,12 @@
+$NetBSD: patch-ah,v 1.1 2003/03/21 22:54:40 wiz Exp $
+
+--- config/_link-sml.orig Thu Oct 17 02:44:32 2002
++++ config/_link-sml
+@@ -17,6 +17,7 @@ unset ENV
+ #
+ # SITE SPECIFIC CONFIGURATION INFO
+ #
++SMLNJ_HOME="${SMLNJ_HOME:-@SML_BASE@}"
+
+ # the path of the directory in which executables (like this file) are kept.
+ if [ x${SMLNJ_HOME} = x ] ; then
diff --git a/lang/smlnj/patches/patch-ai b/lang/smlnj/patches/patch-ai
new file mode 100644
index 00000000000..8cc829b6443
--- /dev/null
+++ b/lang/smlnj/patches/patch-ai
@@ -0,0 +1,12 @@
+$NetBSD: patch-ai,v 1.1 2003/03/21 22:54:40 wiz Exp $
+
+--- config/_ml-build.orig Thu Oct 17 02:44:32 2002
++++ config/_ml-build
+@@ -1,5 +1,7 @@
+ #!@SHELL@
+
++SMLNJ_HOME="${SMLNJ_HOME:-@SML_BASE@}"
++
+ if [ x${SMLNJ_HOME} = x ] ; then
+ BIN_DIR=@BINDIR@
+ else
diff --git a/lang/smlnj/patches/patch-aj b/lang/smlnj/patches/patch-aj
new file mode 100644
index 00000000000..a7a17d7a436
--- /dev/null
+++ b/lang/smlnj/patches/patch-aj
@@ -0,0 +1,12 @@
+$NetBSD: patch-aj,v 1.1 2003/03/21 22:54:41 wiz Exp $
+
+--- config/_ml-makedepend.orig Thu Oct 17 02:44:32 2002
++++ config/_ml-makedepend
+@@ -1,5 +1,7 @@
+ #!@SHELL@
+
++SMLNJ_HOME="${SMLNJ_HOME:-@SML_BASE@}"
++
+ if [ x${SMLNJ_HOME} = x ] ; then
+ BIN_DIR=@BINDIR@
+ else
diff --git a/lang/smlnj/patches/patch-ak b/lang/smlnj/patches/patch-ak
new file mode 100644
index 00000000000..9ee9184fc87
--- /dev/null
+++ b/lang/smlnj/patches/patch-ak
@@ -0,0 +1,12 @@
+$NetBSD: patch-ak,v 1.1 2003/03/21 22:54:41 wiz Exp $
+
+--- config/_run-sml.orig Thu Oct 17 02:44:32 2002
++++ config/_run-sml
+@@ -19,6 +19,7 @@ unset ENV
+ #
+ # SITE SPECIFIC CONFIGURATION INFO
+ #
++SMLNJ_HOME="${SMLNJ_HOME:-@SML_BASE@}"
+
+ # the path of the directory in which executables (like this file) are kept.
+ if [ x${SMLNJ_HOME} = x ] ; then
diff --git a/lang/smlnj/patches/patch-al b/lang/smlnj/patches/patch-al
new file mode 100644
index 00000000000..8eedd40b24a
--- /dev/null
+++ b/lang/smlnj/patches/patch-al
@@ -0,0 +1,13 @@
+$NetBSD: patch-al,v 1.1 2003/03/21 22:54:42 wiz Exp $
+
+--- src/runtime/objs/mk.x86-netbsd.orig Mon Nov 6 16:41:04 2000
++++ src/runtime/objs/mk.x86-netbsd
+@@ -9,7 +9,7 @@ MAKE = gmake
+
+ ARFLAGS = Trcv
+ CC = gcc -ansi
+-CFLAGS = -O2
++CFLAGS = @CFLAGS@
+ CPP = gcc -x c -E -P -ansi
+ #CPP = /usr/bin/cpp -P
+
diff --git a/lang/smlnj/patches/patch-am b/lang/smlnj/patches/patch-am
new file mode 100644
index 00000000000..b64363ea087
--- /dev/null
+++ b/lang/smlnj/patches/patch-am
@@ -0,0 +1,13 @@
+$NetBSD: patch-am,v 1.1 2003/03/21 22:54:42 wiz Exp $
+
+--- src/runtime/objs/mk.sparc-solaris.orig Fri Jun 15 15:05:19 2001
++++ src/runtime/objs/mk.sparc-solaris
+@@ -8,7 +8,7 @@ AS = /usr/ccs/bin/as
+ AR = /usr/ccs/bin/ar
+ GCC = gcc
+ CC = $(GCC)
+-CFLAGS = -O3
++CFLAGS = @CFLAGS@
+ #CFLAGS = -g
+ CPP = $(GCC) -x c -E -P
+ RANLIB = $(AR) ts
diff --git a/lang/smlnj/patches/patch-an b/lang/smlnj/patches/patch-an
new file mode 100644
index 00000000000..05118673b69
--- /dev/null
+++ b/lang/smlnj/patches/patch-an
@@ -0,0 +1,13 @@
+$NetBSD: patch-an,v 1.1 2003/03/21 22:54:43 wiz Exp $
+
+--- src/runtime/objs/mk.sparc-sunos.orig Thu Jun 1 14:33:52 2000
++++ src/runtime/objs/mk.sparc-sunos
+@@ -4,7 +4,7 @@
+ SHELL = /bin/sh
+
+ CC = gcc -ansi
+-CFLAGS = -O2
++CFLAGS = @CFLAGS@
+ CPP = gcc -x c -E -P -ansi
+ #XOBJS = xmonitor.o
+ #LD_LIBS = -lX11