Subject: pkg/18678: Update of lang/sml-nj to version 110.42
To: None <gnats-bugs@gnats.netbsd.org>
From: None <richards+netbsd@CS.Princeton.EDU>
List: netbsd-bugs
Date: 10/17/2002 04:32:24
>Number:         18678
>Category:       pkg
>Synopsis:       Update of lang/sml-nj to version 110.42
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 17 01:33:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Christopher Richards
>Release:        NetBSD 1.6_STABLE
>Organization:
>Environment:
	
	
System: NetBSD zembla.Princeton.EDU 1.6_STABLE NetBSD 1.6_STABLE (ZEMBLA) #1: Wed Oct 9 21:53:20 EDT 2002 richards@zembla.Princeton.EDU:/home/richards/src/kern i386
Architecture: i386
Machine: i386
>Description:
	Quoting from the SML/NJ website, this release "fixes a few
	important bugs, most importantly a memory leak in
	CML. Moreover, it now works on MacOS X 10.2 (Jaguar)." See
	<http://www.smlnj.org/NEWS/110.42-README.html> for details.

	Also, some pkgsrc-related improvements:
	* Honor the value of CFLAGS when building the runtime system.
	* Patch the driver scripts at patch/configure time, not
          install time.
	
>How-To-Repeat:
	
>Fix:
	
	Patch follows:

diff -u -ruN sml-nj/Makefile sml-nj.NEW/Makefile
--- sml-nj/Makefile	Sun Sep 29 20:13:10 2002
+++ sml-nj.NEW/Makefile	Thu Oct 17 04:08:45 2002
@@ -27,7 +27,7 @@
 HOMEPAGE=	http://cm.bell-labs.com/cm/cs/what/smlnj/index.html
 COMMENT=	Popular functional language from Bell Labs
 
-SML_VERSION=	110.41
+SML_VERSION=	110.42
 
 # sml-nj also supports hppa, sparc, ppc, mlrisc & alpha
 # pkg support for those platforms, and say, solaris-x86
@@ -46,6 +46,7 @@
 SML_BASE=	${PREFIX}/lib/sml-nj
 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"
 
@@ -79,28 +80,35 @@
 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}/* .)
 
 .include "../../mk/bsd.pkg.mk"
diff -u -ruN sml-nj/distinfo sml-nj.NEW/distinfo
--- sml-nj/distinfo	Sun Sep 29 20:13:13 2002
+++ sml-nj.NEW/distinfo	Thu Oct 17 03:47:46 2002
@@ -1,42 +1,47 @@
 $NetBSD: distinfo,v 1.6 2002/09/29 15:03:19 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 (sml-nj-110.42/MLRISC.tgz) = 55055ed06f7dd2ef178ef365c018f0f38f740528
+Size (sml-nj-110.42/MLRISC.tgz) = 1173187 bytes
+SHA1 (sml-nj-110.42/boot.x86-unix.tgz) = 7e85b25459886179be0bcb949cd489f62c0a5424
+Size (sml-nj-110.42/boot.x86-unix.tgz) = 5147025 bytes
+SHA1 (sml-nj-110.42/ckit.tgz) = f47599df014c9c6dcd02c0bfcc0fad5d1409451b
+Size (sml-nj-110.42/ckit.tgz) = 168000 bytes
+SHA1 (sml-nj-110.42/cm.tgz) = c102131e974e91426bab1cc30005f8e02f7622b6
+Size (sml-nj-110.42/cm.tgz) = 202633 bytes
+SHA1 (sml-nj-110.42/cml.tgz) = 61f20116032d284a0d2eecd5f14de5378ff4ea6d
+Size (sml-nj-110.42/cml.tgz) = 128485 bytes
+SHA1 (sml-nj-110.42/compiler.tgz) = fbde2959e05c04333131450d152a6ac5890b2867
+Size (sml-nj-110.42/compiler.tgz) = 704669 bytes
+SHA1 (sml-nj-110.42/config.tgz) = 8d0501b1d582556ad3d652d295cc662285f86218
+Size (sml-nj-110.42/config.tgz) = 13671 bytes
+SHA1 (sml-nj-110.42/eXene.tgz) = e213539308047636da34a82fbcc7d59a8f03ea7a
+Size (sml-nj-110.42/eXene.tgz) = 695431 bytes
+SHA1 (sml-nj-110.42/ml-burg.tgz) = 8c69fd51f7eb86b941883fa7c309b7e54baf28ea
+Size (sml-nj-110.42/ml-burg.tgz) = 31696 bytes
+SHA1 (sml-nj-110.42/ml-lex.tgz) = 524714f95cd014e55624e9d1b270a77100f28cd1
+Size (sml-nj-110.42/ml-lex.tgz) = 32108 bytes
+SHA1 (sml-nj-110.42/ml-nlffi-lib.tgz) = 5222ccdc1d9737360a0ce60b05137b476282e9f3
+Size (sml-nj-110.42/ml-nlffi-lib.tgz) = 33645 bytes
+SHA1 (sml-nj-110.42/ml-nlffigen.tgz) = d3e0e064dfd0fd3c12bda72e098224ebea180a6a
+Size (sml-nj-110.42/ml-nlffigen.tgz) = 28836 bytes
+SHA1 (sml-nj-110.42/ml-yacc.tgz) = ff4a077099a6f8d2bb8b32a64c9ef45e89358346
+Size (sml-nj-110.42/ml-yacc.tgz) = 95608 bytes
+SHA1 (sml-nj-110.42/runtime.tgz) = 3d11c024ba78cb009b71b8f86fe3b7439fcea2ff
+Size (sml-nj-110.42/runtime.tgz) = 313095 bytes
+SHA1 (sml-nj-110.42/smlnj-lib.tgz) = c48a8e19d4a14799d7596ce896f4a2040fe1c2bf
+Size (sml-nj-110.42/smlnj-lib.tgz) = 251230 bytes
+SHA1 (sml-nj-110.42/system.tgz) = 0b9f61052a6413ac1d391a6b7ddf903875d192ff
+Size (sml-nj-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 -u -ruN sml-nj/patches/patch-aa sml-nj.NEW/patches/patch-aa
--- sml-nj/patches/patch-aa	Sun Sep 29 20:13:15 2002
+++ sml-nj.NEW/patches/patch-aa	Thu Oct 17 02:00:23 2002
@@ -1,6 +1,6 @@
-$NetBSD: patch-aa,v 1.2 2002/09/29 15:03:20 wiz Exp $
+$NetBSD$
 
---- 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 @@
  
  # 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 @@
  
  # 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 @@
  
  # 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 @@
  
  # 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 @@
  
  # 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 -u -ruN sml-nj/patches/patch-ag sml-nj.NEW/patches/patch-ag
--- sml-nj/patches/patch-ag	Sun Sep 29 11:03:33 2002
+++ sml-nj.NEW/patches/patch-ag	Thu Oct 17 03:46:56 2002
@@ -11,7 +11,7 @@
 +MAKE =		gmake
 +GCC =		gcc
 +ARFLAGS =	Trcv
-+CFLAGS =	-O2 -Wall 
++CFLAGS =	@CFLAGS@ 
 +LDFLAGS=
 +CPP =		$(GCC) -x c -E -P
 +
diff -u -ruN sml-nj/patches/patch-ah sml-nj.NEW/patches/patch-ah
--- sml-nj/patches/patch-ah	Wed Dec 31 19:00:00 1969
+++ sml-nj.NEW/patches/patch-ah	Thu Oct 17 03:16:01 2002
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- 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 -u -ruN sml-nj/patches/patch-ai sml-nj.NEW/patches/patch-ai
--- sml-nj/patches/patch-ai	Wed Dec 31 19:00:00 1969
+++ sml-nj.NEW/patches/patch-ai	Thu Oct 17 03:16:21 2002
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- 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 -u -ruN sml-nj/patches/patch-aj sml-nj.NEW/patches/patch-aj
--- sml-nj/patches/patch-aj	Wed Dec 31 19:00:00 1969
+++ sml-nj.NEW/patches/patch-aj	Thu Oct 17 03:16:42 2002
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- 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 -u -ruN sml-nj/patches/patch-ak sml-nj.NEW/patches/patch-ak
--- sml-nj/patches/patch-ak	Wed Dec 31 19:00:00 1969
+++ sml-nj.NEW/patches/patch-ak	Thu Oct 17 03:16:56 2002
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- 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 -u -ruN sml-nj/patches/patch-al sml-nj.NEW/patches/patch-al
--- sml-nj/patches/patch-al	Wed Dec 31 19:00:00 1969
+++ sml-nj.NEW/patches/patch-al	Thu Oct 17 03:30:10 2002
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- 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 -u -ruN sml-nj/patches/patch-am sml-nj.NEW/patches/patch-am
--- sml-nj/patches/patch-am	Wed Dec 31 19:00:00 1969
+++ sml-nj.NEW/patches/patch-am	Thu Oct 17 03:45:27 2002
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- 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 -u -ruN sml-nj/patches/patch-an sml-nj.NEW/patches/patch-an
--- sml-nj/patches/patch-an	Wed Dec 31 19:00:00 1969
+++ sml-nj.NEW/patches/patch-an	Thu Oct 17 03:45:27 2002
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- 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
>Release-Note:
>Audit-Trail:
>Unformatted: