From joemann@beefree.free.de  Sun Aug 12 19:24:43 2001
Return-Path: <joemann@beefree.free.de>
Received: from beefree.free.de (offshore.free.de [194.77.83.2])
	by hub.freebsd.org (Postfix) with SMTP id 4DF7937B407
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 12 Aug 2001 19:24:41 -0700 (PDT)
	(envelope-from joemann@beefree.free.de)
Received: (qmail 41159 invoked by uid 23); 13 Aug 2001 02:24:34 -0000
Message-Id: <20010813022434.41158.qmail@beefree.free.de>
Date: 13 Aug 2001 02:24:34 -0000
From: joemann@beefree.free.de (Johannes 5 Joemann)
Reply-To: joemann@beefree.free.de
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Upgrade port lang/sml-nj-devel to 110.34
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         29656
>Category:       ports
>Synopsis:       Upgrade port lang/sml-nj-devel to 110.34
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jkoshy
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 12 19:30:01 PDT 2001
>Closed-Date:    Fri Aug 24 02:32:47 PDT 2001
>Last-Modified:  Fri Aug 24 02:50:01 PDT 2001
>Originator:     Johannes 5 Joemann
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
Friends of the typed lamba calculi:-)
>Environment:
System: FreeBSD beefree.free.de 4.3-STABLE FreeBSD 4.3-STABLE #0: Tue Apr 24 04:57:05 CEST 2001 joemann@beefree.free.de:/usr/src/sys/compile/BEEFREE i386

>Description:

The patches below make the sml-nj-devel port work with version 110.34 and
implement suggestions for making the port more configurable.

In SML/NJ 110.34 CML and eXene are finally back home, so I added knobs
(WITH_CML, WITH_EXENE) to install them, too.

People might be interested in the sources and/or the documentation/examples
of (parts of) SML/NJ, hence there is a knob WITH_SRC. Maybe someone finds
the time to make the scattered docs/examples being installed properly in
.../share/...

Since SML/NJ has a very interesting compiler infrastructure, I added
WITH_RECOMPILE and WITH_FLINT knobs to give interested hackers/academics
a start in studying/modifying it. FLINT ist the typed intermediate
language used within the compiler, and it deserves some evangelism:-) 

Removed:
- files/extra-patch-global-names
  Obsolete, fixed in this version.
- files/targets.customized
  Replaced by using sed in Makefile to apply any combination of
  modifications to the config/targets file.

Added:
- files/plist-cml
  This is merged with pkg-plist if CML is installed.
- files/plist-eXene
  This is merged with pkg-plist if eXene is installed.
- files/do-patch-src-installml
  Necessary bugfix because src/system/installml as distributed uses
  wrong heap filenames on *BSD.
  Modification of installml so it does not exit 1 even if all went well.
  Finally installml now takes the target install directory as an additional
  (optional) command line parameter, used in the port's install phase.

Modified:
- Makefile
  Prepare for building on alpha (any takers?-).
  Use seperate configure/build/install steps.
  Add all the WITH_* knobs mentioned above.
  (The Makefile has become a bit complex, but testing all the 12
  combinations of the knobs gave me the confidence that it's OK;-)
- distinfo
  Now includes all the available .tgz's (except boot files for non-i386).
- files/patch-ab
  Add hook in config/install.sh for not cleaning src/runtime (useful when
  splitting the build and install phases).
  Apply do-patch-src-installml after extracting the compiler sources.
- pkg-plist
  It's modification is not strictly necessary; but files and directories
  are alphabetically sorted now (find -s -d).

>How-To-Repeat:

>Fix:

--- Makefile	Mon Jun 18 12:34:11 2001
+++ Makefile	Sun Aug 12 18:21:53 2001
@@ -6,21 +6,63 @@
 #
 
 PORTNAME=	smlnj
-PORTVERSION=	110.33
+PORTVERSION=	110.34
 CATEGORIES=	lang
-MASTER_SITES=	ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.33/ \
-		ftp://ftp.diku.dk/pub/smlnj/working/110.33/ \
-		ftp://sunsite.doc.ic.ac.uk/computing/programming/languages/ml/smlnj/working/110.33/ \
-		ftp://compiler.kaist.ac.kr/pub/sml/working/110.33/
-DISTFILES=	boot.x86-unix.tgz compiler.tgz cm.tgz ckit.tgz config.tgz  \
+MASTER_SITES=	ftp://ftp.research.bell-labs.com/dist/smlnj/working/${PORTVERSION}/ \
+		ftp://flint.cs.yale.edu/pub/smlnj/working/${PORTVERSION}/ \
+		ftp://sunsite.doc.ic.ac.uk/computing/programming/languages/ml/smlnj/working/${PORTVERSION}/ \
+		ftp://ftp.diku.dk/pub/smlnj/working/${PORTVERSION}/
+#		ftp://compiler.kaist.ac.kr/pub/sml/working/${PORTVERSION}/
+.if (${MACHINE_ARCH} == "i386")
+DISTFILES=	boot.x86-unix.tgz config.tgz runtime.tgz
+.elif (${MACHINE_ARCH} == "alpha")
+DISTFILES=	boot.alpha32-unix.tgz config.tgz runtime.tgz
+.endif
+DISTFILES+=	cm.tgz ckit.tgz \
 		ml-burg.tgz ml-lex.tgz \
 		ml-nlffi-lib.tgz ml-nlffigen.tgz \
-		ml-yacc.tgz runtime.tgz \
-		smlnj-lib.tgz system.tgz
+		ml-yacc.tgz smlnj-lib.tgz
+.if defined(WITH_SRC) || defined(WITH_RECOMPILE) || defined(WITH_FLINT)
+DISTFILES+=	compiler.tgz system.tgz MLRISC.tgz
+.endif
+.if defined(WITH_CML) || defined(WITH_EXENE)
+DISTFILES+=	cml.tgz
+.endif
+.if defined(WITH_EXENE)
+DISTFILES+=	eXene.tgz
+.endif
 EXTRACT_ONLY=	config.tgz
 
 MAINTAINER=	jkoshy@freebsd.org
 
+.if (${MACHINE_ARCH} == "i386")
+MLARCH=		x86
+.else
+BROKEN=		currently no ${MACHINE_ARCH} available for porting
+.endif
+
+MLTARGETS=	ml-burg ckit ml-nlffi-lib ml-nlffigen
+MLEXE=		ml-build ml-makedepend sml ml-yacc ml-lex ml-burg ml-nlffigen
+.if defined(WITH_CML) || defined(WITH_EXENE) || defined(WITH_SRC) || defined(WITH_RECOMPILE) || defined(WITH_FLINT)
+PLIST=		${WRKDIR}/.PLIST
+MLPLISTFILES=	${.CURDIR}/pkg-plist
+MLSRCPLIST=	${WRKDIR}/.PLIST.src
+.endif
+
+.if defined(WITH_SRC) || defined(WITH_RECOMPILE) || defined(WITH_FLINT)
+# the pkg-plist for sources is large, so we'll generate it on the fly (during do-install)
+MLPLISTFILES+=	${MLSRCPLIST}
+MLTARGETS+=	src-smlnj
+.endif
+.if defined(WITH_CML) || defined(WITH_EXENE)
+MLPLISTFILES+=	${FILESDIR}/plist-cml
+MLTARGETS+=	cml cml-lib
+.endif
+.if defined(WITH_EXENE)
+MLPLISTFILES+=	${FILESDIR}/plist-eXene
+MLTARGETS+=	eXene
+.endif
+
 # 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/
@@ -31,25 +73,120 @@
 DIST_SUBDIR=	sml-nj/${PORTVERSION}
 NO_WRKSUBDIR=	yes
 USE_GMAKE=	yes
-NO_BUILD=	yes
 
 NO_LATEST_LINK=	yes
 
-MLEXE=	ml-build ml-makedepend sml ml-yacc ml-lex ml-burg ml-nlffigen
+pre-fetch:
+	@${ECHO}
+.if !defined(WITH_EXENE)
+.if !defined(WITH_CML)
+	@${ECHO} 'Use make WITH_CML=yes to build CML (Concurrent ML).'
+.endif
+	@${ECHO} 'Use make WITH_EXENE=yes to build eXene (X Windows toolkit),'
+	@${ECHO} ' this implies WITH_CML.'
+.endif
+.if !defined(WITH_FLINT)
+.if !defined(WITH_RECOMPILE)
+.if !defined(WITH_SRC)
+	@${ECHO} 'Use make WITH_SRC=yes to have the sources installed.'
+.endif
+	@${ECHO} 'Use make WITH_RECOMPILE=yes to recompile the compiler,'
+	@${ECHO} ' this implies WITH_SRC.'
+.endif
+	@${ECHO} 'Use make WITH_FLINT=yes to build sml with the FLINT'
+	@${ECHO} ' structures accessible (see http://flint.cs.yale.edu),'
+	@${ECHO} ' this implies WITH_RECOMPILE.'
+.endif
+	@${ECHO}
 
 # make symlinks to the dist files
+
 post-extract:
 	cd ${WRKDIR} && ${LN} -sf ${_DISTDIR}/*  .
-	${CP} ${FILESDIR}/targets.customized ${WRKDIR}/config/targets.customized
 
-# The install target attempts to build and install the system
+# Configuring is done by uncommenting the appropriate #TARGETS="$TARGETS xxx"
+# lines of config/targets
+
+do-configure:
+	test -f "${WRKDIR}/config/targets.orig" || \
+	${MV} "${WRKDIR}/config/targets" "${WRKDIR}/config/targets.orig"
+	${ECHO} -n > ${WRKDIR}/.tmp.sed
+.for t in ${MLTARGETS}
+	${ECHO} '/^#TARGETS="\$$TARGETS[ 	]+${t}"$$/s/#//' >> ${WRKDIR}/.tmp.sed
+.endfor
+	${SED} -E -f ${WRKDIR}/.tmp.sed "${WRKDIR}/config/targets.orig" \
+	> "${WRKDIR}/config/targets"
+
+# The build target builds and installs the system within the WRKDIR.
+# The src/runtime is not cleaned afterwards to avoid recompilation during
+# a subsequent make install.
+# See src/system/README for information on recompiling the compiler.
+
+.if defined(WITH_FLINT)
+MLFLINTPATCH=	optional-patch-flint-access
+.endif
+
+do-build:
+	cd ${WRKDIR} && unset PWD && \
+	FILESDIR="$(FILESDIR)" PATCH="$(PATCH)" PATCH_ARGS="$(PATCH_ARGS)" \
+	MLNORUNTIMECLEAN=yes	./config/install.sh
+.if defined(WITH_FLINT)
+	test -f "${WRKDIR}/.patch.${MLFLINTPATCH}" || \
+	( cd ${WRKDIR} && \
+	${PATCH} < "${FILESDIR}/${MLFLINTPATCH}" && \
+	${TOUCH} "${WRKDIR}/.patch.${MLFLINTPATCH}" )
+.endif
+.if defined(WITH_RECOMPILE) || defined(WITH_FLINT)
+	cd ${WRKDIR}/src/system && ( \
+	${ECHO} 'CM.autoload "$$smlnj/cmb.cm";' ; \
+	${ECHO} 'CMB.make ();' ) | \
+	../../bin/sml && \
+	./makeml && \
+	./installml sml  &&
+.endif
+
+# The install target installs the heaps and libraries to their final
+# location in ${PREFIX}/smlnj.
+# In case of recompilation, installml installs the sml heap and the
+# libraries built during compiler bootstrap to ${PREFIX}/smlnj.
+
+.if defined(WITH_SRC) || defined(WITH_RECOMPILE) || defined(WITH_FLINT)
+MLNOINSTALL=	CM
+.if defined(WITH_RECOMPILE) || defined(WITH_FLINT)
+MLNOINSTALL+=	sml.boot.${MLARCH}-unix sml.bin.${MLARCH}-unix
+.endif
+MLSRCEXCLUDES=
+.for excl in ${MLNOINSTALL}
+MLSRCEXCLUDES+=	--exclude "${excl}"
+.endfor
+.endif
+
 do-install:
-	${MKDIR} ${PREFIX}/smlnj
+	${MKDIR} "${PREFIX}/smlnj"
 	cd ${WRKDIR} && unset PWD && \
 	FILESDIR="$(FILESDIR)" PATCH="$(PATCH)" PATCH_ARGS="$(PATCH_ARGS)" \
 	INSTALLDIR="$(PREFIX)/smlnj"	./config/install.sh
+.if defined(WITH_RECOMPILE) || defined(WITH_FLINT)
+	cd ${WRKDIR}/src/system && \
+	./makeml && \
+	./installml sml "$(PREFIX)/smlnj"
+.endif
+.if defined(WITH_SRC) || defined(WITH_RECOMPILE) || defined(WITH_FLINT)
+	cd ${WRKDIR}/src/runtime/objs && ${GMAKE} clean
+	@${ECHO} -n 'Installing sources into ${PREFIX}/smlnj ...'
+	@cd ${WRKDIR} && tar -cf - ${MLSRCEXCLUDES} ckit src | tar -xf - -C "${PREFIX}/smlnj"
+	@${ECHO} ' done.'
+	cd "${PREFIX}" && ( find -s -d smlnj/src smlnj/ckit \! -type d ; \
+	( find -s -d smlnj/src smlnj/ckit -type d | ${AWK} '{ printf "@dirrm "; print }' ) \
+	) > ${MLSRCPLIST}
+.endif
+.if defined(WITH_CML) || defined(WITH_EXENE) || defined(WITH_SRC) || defined(WITH_RECOMPILE) || defined(WITH_FLINT)
+	${GREP} -h ^[^@] ${MLPLISTFILES} | sort -u > ${PLIST}
+	${GREP} -h ^@dirrm ${MLPLISTFILES} | sort -r -u >> ${PLIST}
+.endif
 
 post-install:
+	${MKDIR} $(PREFIX)/bin
 .for f in $(MLEXE)
 	${LN} -s $(PREFIX)/smlnj/bin/$f $(PREFIX)/bin/$f
 .endfor
--- distinfo	Mon Jun 18 12:34:11 2001
+++ distinfo	Wed Aug  1 13:52:49 2001
@@ -1,13 +1,16 @@
-MD5 (sml-nj/110.33/boot.x86-unix.tgz) = 8ca6ca8b5981fbfb55fb1ed4a10a87a3
-MD5 (sml-nj/110.33/compiler.tgz) = e90432d37da70ab391df70292797909a
-MD5 (sml-nj/110.33/cm.tgz) = 94cfe559204fc783dad5b893ce956f3b
-MD5 (sml-nj/110.33/ckit.tgz) = 61b8c2c05ead8a58860ed4c5f80cf0cf
-MD5 (sml-nj/110.33/config.tgz) = febbec9ae82ad5dae2648b3bf6b28ab3
-MD5 (sml-nj/110.33/ml-burg.tgz) = 395ac54fa03a15df0564865b7854069f
-MD5 (sml-nj/110.33/ml-lex.tgz) = 3da0a002f667e29d2781aa99fdd99122
-MD5 (sml-nj/110.33/ml-nlffi-lib.tgz) = 6edd48687ceb3cfdcfc7cae832f9b24a
-MD5 (sml-nj/110.33/ml-nlffigen.tgz) = 9cb4b36ddf6d50c280267d964c17ebad
-MD5 (sml-nj/110.33/ml-yacc.tgz) = 4e440198a7db006fd76cbad72e699149
-MD5 (sml-nj/110.33/runtime.tgz) = 94294f70cc2e6c27edf3705925aff291
-MD5 (sml-nj/110.33/smlnj-lib.tgz) = 99080e52a31b197cd08e6fb807089871
-MD5 (sml-nj/110.33/system.tgz) = f9144d57279853f60163c1c8ce850120
+MD5 (sml-nj/110.34/MLRISC.tgz) = 57c6f8868baa3d7f4efead0734eeeeeb
+MD5 (sml-nj/110.34/boot.x86-unix.tgz) = 419904d21e9bba8931697179aed7854e
+MD5 (sml-nj/110.34/ckit.tgz) = c0ea9ce9fc6b05aca87d6acd75870bf3
+MD5 (sml-nj/110.34/cm.tgz) = c5db753384209b6329b170d800457315
+MD5 (sml-nj/110.34/cml.tgz) = c32e6801d7bad2ca5ea0b10bc4a12a18
+MD5 (sml-nj/110.34/compiler.tgz) = ab17f4dee4504bb0239f9d378e024bbb
+MD5 (sml-nj/110.34/config.tgz) = f81d3edd47f7a90e22bda437f097d106
+MD5 (sml-nj/110.34/eXene.tgz) = 96f4e89eec9ab01eaa873a2b3ebd11fc
+MD5 (sml-nj/110.34/ml-burg.tgz) = 2dd6317954e2e1bac4ae509d8aa335bc
+MD5 (sml-nj/110.34/ml-lex.tgz) = dcf53a5f50cd0522c88ae81e81f23d0b
+MD5 (sml-nj/110.34/ml-nlffi-lib.tgz) = c29f3a603570f9fba1cf6bb892050718
+MD5 (sml-nj/110.34/ml-nlffigen.tgz) = e2dec108191b4ccb563aa320534d5097
+MD5 (sml-nj/110.34/ml-yacc.tgz) = dafc62097309b63c108b25a1bb499eb2
+MD5 (sml-nj/110.34/runtime.tgz) = 518ba48de2d611af1d00e2e60a045e1e
+MD5 (sml-nj/110.34/smlnj-lib.tgz) = 44049319612188dc026745f0ee3b7f89
+MD5 (sml-nj/110.34/system.tgz) = 3c10db33bf5d1ea06081d5eb7aa6758b
--- files/do-patch-src-installml	Thu Jan  1 01:00:00 1970
+++ files/do-patch-src-installml	Sat Aug 11 20:47:39 2001
@@ -0,0 +1,54 @@
+--- src/system/installml.orig	Thu Jun  1 20:33:57 2000
++++ src/system/installml	Sat Aug 11 20:41:48 2001
+@@ -3,16 +3,21 @@
+ # The tmpfile is for pathconfig editing (see below).
+ tmpfile=pathconfig.tmp.$$
+ 
+-trap 'rm -f $tmpfile; exit 1' 0 1 2 3 15
++trap 'rm -f $tmpfile; exit 1' 1 2 3 15
+ 
+ this=$0
+ here=`pwd`
+-cd ../..
+-twoup=`pwd`
+-cd $here
++if [ "$2" ]
++then
++	INSTALLROOT="$2"
++else
++	cd ../..
++	INSTALLROOT=`pwd`
++	cd $here
++fi
+ 
+-MAIN_HEAP_DIR=$twoup/bin/.heap
+-MAIN_LIB_DIR=$twoup/lib
++MAIN_HEAP_DIR=$INSTALLROOT/bin/.heap
++MAIN_LIB_DIR=$INSTALLROOT/lib
+ 
+ if [ $# -gt 0 ] ; then
+     STEM=$1
+@@ -54,7 +59,7 @@
+     fi
+ }
+ 
+-HEAP_FILE=$STEM.$ARCH-$OPSYS
++HEAP_FILE=$STEM.$HEAP_SUFFIX
+ LIB_DIR=$STEM.lib
+ 
+ if [ ! -f $HEAP_FILE ] ; then
+@@ -68,7 +73,7 @@
+ fi
+ 
+ # Moving the heap image to its place
+-mv $HEAP_FILE $MAIN_HEAP_DIR/sml.$ARCH-$OPSYS
++mv $HEAP_FILE $MAIN_HEAP_DIR/sml.$HEAP_SUFFIX
+ 
+ # Moving each individual library...
+ cd $LIB_DIR
+@@ -94,4 +99,5 @@
+ END { for (i in mapping) print i, mapping[i] }' \
+  | sort >$pcfile
+ 
++rm -f $tmpfile
+ rm -r $LIB_DIR
Only in ../sml-nj-devel.110.33/files: extra-patch-global-names
--- files/optional-patch-flint-access	Thu Jan  1 01:00:00 1970
+++ files/optional-patch-flint-access	Thu Aug  9 02:06:44 2001
@@ -0,0 +1,29 @@
+--- src/compiler/viscomp-core.cm.orig	Tue May  8 23:25:14 2001
++++ src/compiler/viscomp-core.cm	Thu Aug  9 00:06:53 2001
+@@ -69,6 +69,26 @@
+ 
+ 	functor DummyCCallsFn
+ 	structure ClusterAnnotation
++
++      	(* export of structures required to use FLINT directly -5- *)
++	structure Types
++	structure Translate
++	(* in 110.27 already exported above: structure FLINT *)
++	structure LtyKernel
++	structure PrimTyc  
++	structure LtyDef
++	structure LtyExtern
++	structure PPFlint
++	structure LContract
++	(* currently unused?: structure FContract *)
++	structure Specialize
++	structure PrimOp
++	structure LambdaVar
++	structure ChkFlint
++	(* accessible via GenericVC: structure Symbol *)
++	structure Access
++	structure DebIndex
++
+ is
+ 
+ TopLevel/batch/batchconfig.sml
--- files/patch-ab	Mon Jun 18 12:34:12 2001
+++ files/patch-ab	Wed Aug  8 18:48:10 2001
@@ -1,5 +1,5 @@
---- config/install.sh.orig	Wed May 23 03:36:12 2001
-+++ config/install.sh	Mon Jun 18 14:40:02 2001
+--- config/install.sh.orig	Wed Jun 20 22:39:12 2001
++++ config/install.sh	Wed Aug  8 18:23:50 2001
 @@ -408,6 +408,28 @@
  }
  
@@ -29,11 +29,20 @@
  # create the various sub directories
  #
  for dir in $BINDIR $HEAPDIR $RUNDIR $LIBDIR $SRCDIR ; do
-@@ -519,6 +541,7 @@
- # build the run-time system
- #
- unpack "run-time" $SRCDIR runtime runtime
-+do_patch extra-patch-global-names
- if [ -x $RUNDIR/run.$ARCH-$OPSYS ]; then
-     echo $this: Run-time system already exists.
- else
+@@ -527,7 +549,7 @@
+     $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
+     if [ -x run.$ARCH-$OPSYS ]; then
+ 	mv run.$ARCH-$OPSYS $RUNDIR
+-	$MAKE MAKE=$MAKE clean
++	[ "$MLNORUNTIMECLEAN" ] || $MAKE MAKE=$MAKE clean
+     else
+ 	echo "$this: !!! Run-time system build failed for some reason."
+ 	exit 1
+@@ -594,6 +616,7 @@
+ 	do
+ 	    unpack $src $ROOT/src $src $src
+         done
++	do_patch do-patch-src-installml
+ 	;;
+       ml-yacc)
+ 	standalone ml-yacc ML-Yacc src
--- files/plist-cml	Thu Jan  1 01:00:00 1970
+++ files/plist-cml	Wed Aug  8 03:14:30 2001
@@ -0,0 +1,12 @@
+smlnj/lib/cml/CM/x86-unix/basis.cm
+smlnj/lib/cml/CM/x86-unix/cml-internal.cm
+smlnj/lib/cml/CM/x86-unix/cml.cm
+smlnj/lib/cml/CM/x86-unix/core-cml.cm
+smlnj/lib/cml-lib/CM/x86-unix/smlnj-lib.cm
+smlnj/lib/cml-lib/CM/x86-unix/trace-cml.cm
+@dirrm smlnj/lib/cml/CM/x86-unix
+@dirrm smlnj/lib/cml/CM
+@dirrm smlnj/lib/cml
+@dirrm smlnj/lib/cml-lib/CM/x86-unix
+@dirrm smlnj/lib/cml-lib/CM
+@dirrm smlnj/lib/cml-lib
--- files/plist-eXene	Thu Jan  1 01:00:00 1970
+++ files/plist-eXene	Wed Aug  8 03:32:42 2001
@@ -0,0 +1,4 @@
+smlnj/lib/eXene.cm/CM/x86-unix/eXene.cm
+@dirrm smlnj/lib/eXene.cm/CM/x86-unix
+@dirrm smlnj/lib/eXene.cm/CM
+@dirrm smlnj/lib/eXene.cm
Only in ../sml-nj-devel.110.33/files: targets.customized
--- pkg-plist	Mon Jun 18 12:34:11 2001
+++ pkg-plist	Mon Aug  6 23:41:55 2001
@@ -1,27 +1,26 @@
 bin/ml-build
-bin/ml-makedepend
-bin/ml-yacc
-bin/ml-lex
 bin/ml-burg
+bin/ml-lex
+bin/ml-makedepend
 bin/ml-nlffigen
+bin/ml-yacc
 bin/sml
-smlnj/bin/.heap/sml.x86-bsd
-smlnj/bin/.heap/ml-yacc.x86-bsd
-smlnj/bin/.heap/ml-lex.x86-bsd
+smlnj/bin/.arch-n-opsys
 smlnj/bin/.heap/ml-burg.x86-bsd
+smlnj/bin/.heap/ml-lex.x86-bsd
 smlnj/bin/.heap/ml-nlffigen.x86-bsd
+smlnj/bin/.heap/ml-yacc.x86-bsd
+smlnj/bin/.heap/sml.x86-bsd
+smlnj/bin/.link-sml
 smlnj/bin/.run/run.x86-freebsd
-smlnj/bin/.arch-n-opsys
 smlnj/bin/.run-sml
-smlnj/bin/.link-sml
 smlnj/bin/ml-build
-smlnj/bin/ml-makedepend
-smlnj/bin/sml
-smlnj/bin/ml-yacc
-smlnj/bin/ml-lex
 smlnj/bin/ml-burg
+smlnj/bin/ml-lex
+smlnj/bin/ml-makedepend
 smlnj/bin/ml-nlffigen
-smlnj/lib/pathconfig
+smlnj/bin/ml-yacc
+smlnj/bin/sml
 smlnj/lib/SMLNJ-MLRISC/CM/x86-unix/ALPHA.cm
 smlnj/lib/SMLNJ-MLRISC/CM/x86-unix/Control.cm
 smlnj/lib/SMLNJ-MLRISC/CM/x86-unix/HPPA.cm
@@ -33,19 +32,27 @@
 smlnj/lib/SMLNJ-MLRISC/CM/x86-unix/SPARC.cm
 smlnj/lib/basis.cm/CM/x86-unix/basis.cm
 smlnj/lib/burg-ext.cm/CM/x86-unix/burg-ext.cm
+smlnj/lib/c-int.cm/CM/x86-unix/c-int.cm
+smlnj/lib/c.cm/CM/x86-unix/c.cm
+smlnj/lib/ckit-lib.cm/CM/x86-unix/ckit-lib.cm
 smlnj/lib/dir-tool.cm/CM/x86-unix/dir-tool.cm
 smlnj/lib/grm-ext.cm/CM/x86-unix/grm-ext.cm
 smlnj/lib/html-lib.cm/CM/x86-unix/html-lib.cm
+smlnj/lib/inet-lib.cm/CM/x86-unix/inet-lib.cm
 smlnj/lib/lex-ext.cm/CM/x86-unix/lex-ext.cm
 smlnj/lib/make-tool.cm/CM/x86-unix/make-tool.cm
+smlnj/lib/memory.cm/CM/x86-unix/memory.cm
 smlnj/lib/ml-yacc-lib.cm/CM/x86-unix/ml-yacc-lib.cm
 smlnj/lib/mlburg-tool.cm/CM/x86-unix/mlburg-tool.cm
 smlnj/lib/mllex-tool.cm/CM/x86-unix/mllex-tool.cm
 smlnj/lib/mlyacc-tool.cm/CM/x86-unix/mlyacc-tool.cm
 smlnj/lib/noweb-tool.cm/CM/x86-unix/noweb-tool.cm
 smlnj/lib/nw-ext.cm/CM/x86-unix/nw-ext.cm
+smlnj/lib/pathconfig
 smlnj/lib/pickle-lib.cm/CM/x86-unix/pickle-lib.cm
 smlnj/lib/pp-lib.cm/CM/x86-unix/pp-lib.cm
+smlnj/lib/reactive-lib.cm/CM/x86-unix/reactive-lib.cm
+smlnj/lib/regexp-lib.cm/CM/x86-unix/regexp-lib.cm
 smlnj/lib/shell-tool.cm/CM/x86-unix/shell-tool.cm
 smlnj/lib/smlnj/CM/x86-unix/cm.cm
 smlnj/lib/smlnj/CM/x86-unix/cmb.cm
@@ -90,13 +97,6 @@
 smlnj/lib/smlnj/viscomp/CM/x86-unix/x86.cm
 smlnj/lib/smlnj-lib.cm/CM/x86-unix/smlnj-lib.cm
 smlnj/lib/unix-lib.cm/CM/x86-unix/unix-lib.cm
-smlnj/lib/inet-lib.cm/CM/x86-unix/inet-lib.cm
-smlnj/lib/regexp-lib.cm/CM/x86-unix/regexp-lib.cm
-smlnj/lib/reactive-lib.cm/CM/x86-unix/reactive-lib.cm
-smlnj/lib/ckit-lib.cm/CM/x86-unix/ckit-lib.cm
-smlnj/lib/memory.cm/CM/x86-unix/memory.cm
-smlnj/lib/c-int.cm/CM/x86-unix/c-int.cm
-smlnj/lib/c.cm/CM/x86-unix/c.cm
 @dirrm smlnj/bin/.heap
 @dirrm smlnj/bin/.run
 @dirrm smlnj/bin
@@ -109,6 +109,15 @@
 @dirrm smlnj/lib/burg-ext.cm/CM/x86-unix
 @dirrm smlnj/lib/burg-ext.cm/CM
 @dirrm smlnj/lib/burg-ext.cm
+@dirrm smlnj/lib/c-int.cm/CM/x86-unix
+@dirrm smlnj/lib/c-int.cm/CM
+@dirrm smlnj/lib/c-int.cm
+@dirrm smlnj/lib/c.cm/CM/x86-unix
+@dirrm smlnj/lib/c.cm/CM
+@dirrm smlnj/lib/c.cm
+@dirrm smlnj/lib/ckit-lib.cm/CM/x86-unix
+@dirrm smlnj/lib/ckit-lib.cm/CM
+@dirrm smlnj/lib/ckit-lib.cm
 @dirrm smlnj/lib/dir-tool.cm/CM/x86-unix
 @dirrm smlnj/lib/dir-tool.cm/CM
 @dirrm smlnj/lib/dir-tool.cm
@@ -118,12 +127,18 @@
 @dirrm smlnj/lib/html-lib.cm/CM/x86-unix
 @dirrm smlnj/lib/html-lib.cm/CM
 @dirrm smlnj/lib/html-lib.cm
+@dirrm smlnj/lib/inet-lib.cm/CM/x86-unix
+@dirrm smlnj/lib/inet-lib.cm/CM
+@dirrm smlnj/lib/inet-lib.cm
 @dirrm smlnj/lib/lex-ext.cm/CM/x86-unix
 @dirrm smlnj/lib/lex-ext.cm/CM
 @dirrm smlnj/lib/lex-ext.cm
 @dirrm smlnj/lib/make-tool.cm/CM/x86-unix
 @dirrm smlnj/lib/make-tool.cm/CM
 @dirrm smlnj/lib/make-tool.cm
+@dirrm smlnj/lib/memory.cm/CM/x86-unix
+@dirrm smlnj/lib/memory.cm/CM
+@dirrm smlnj/lib/memory.cm
 @dirrm smlnj/lib/ml-yacc-lib.cm/CM/x86-unix
 @dirrm smlnj/lib/ml-yacc-lib.cm/CM
 @dirrm smlnj/lib/ml-yacc-lib.cm
@@ -148,6 +163,12 @@
 @dirrm smlnj/lib/pp-lib.cm/CM/x86-unix
 @dirrm smlnj/lib/pp-lib.cm/CM
 @dirrm smlnj/lib/pp-lib.cm
+@dirrm smlnj/lib/reactive-lib.cm/CM/x86-unix
+@dirrm smlnj/lib/reactive-lib.cm/CM
+@dirrm smlnj/lib/reactive-lib.cm
+@dirrm smlnj/lib/regexp-lib.cm/CM/x86-unix
+@dirrm smlnj/lib/regexp-lib.cm/CM
+@dirrm smlnj/lib/regexp-lib.cm
 @dirrm smlnj/lib/shell-tool.cm/CM/x86-unix
 @dirrm smlnj/lib/shell-tool.cm/CM
 @dirrm smlnj/lib/shell-tool.cm
@@ -181,26 +202,5 @@
 @dirrm smlnj/lib/unix-lib.cm/CM/x86-unix
 @dirrm smlnj/lib/unix-lib.cm/CM
 @dirrm smlnj/lib/unix-lib.cm
-@dirrm smlnj/lib/inet-lib.cm/CM/x86-unix
-@dirrm smlnj/lib/inet-lib.cm/CM
-@dirrm smlnj/lib/inet-lib.cm
-@dirrm smlnj/lib/regexp-lib.cm/CM/x86-unix
-@dirrm smlnj/lib/regexp-lib.cm/CM
-@dirrm smlnj/lib/regexp-lib.cm
-@dirrm smlnj/lib/reactive-lib.cm/CM/x86-unix
-@dirrm smlnj/lib/reactive-lib.cm/CM
-@dirrm smlnj/lib/reactive-lib.cm
-@dirrm smlnj/lib/ckit-lib.cm/CM/x86-unix
-@dirrm smlnj/lib/ckit-lib.cm/CM
-@dirrm smlnj/lib/ckit-lib.cm
-@dirrm smlnj/lib/memory.cm/CM/x86-unix
-@dirrm smlnj/lib/memory.cm/CM
-@dirrm smlnj/lib/memory.cm
-@dirrm smlnj/lib/c-int.cm/CM/x86-unix
-@dirrm smlnj/lib/c-int.cm/CM
-@dirrm smlnj/lib/c-int.cm
-@dirrm smlnj/lib/c.cm/CM/x86-unix
-@dirrm smlnj/lib/c.cm/CM
-@dirrm smlnj/lib/c.cm
 @dirrm smlnj/lib
 @dirrm smlnj
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->jkoshy 
Responsible-Changed-By: okazaki 
Responsible-Changed-When: Sun Aug 12 22:20:28 PDT 2001 
Responsible-Changed-Why:  
over to maintainer 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29656 

From: jkoshy@FreeBSD.ORG (Joseph Koshy)
To: joemann@beefree.free.de
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: ports/29656: Upgrade port lang/sml-nj-devel to 110.34
Date: Mon, 13 Aug 2001 04:36:10 -0700 (PDT)

 Thanks for the extensive configurability changes!  I will be adding
 this to the port soon.
 
 Were you able to actually get eXene / CML to work on FreeBSD though?
 When I tried apps would compile fine, but not run at all.  I didn't
 get around to debugging the problems though.
 
 Regards,
 Koshy
 
 
 

From: Johannes 5 Joemann <joemann@beefree.free.de>
To: Joseph Koshy <jkoshy@FreeBSD.ORG>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: ports/29656: Upgrade port lang/sml-nj-devel to 110.34
Date: Mon, 13 Aug 2001 17:21:09 +0200 (CEST)

 
 Hi!
 
 On 13 Aug, (Joseph Koshy) wrote:
 > Thanks for the extensive configurability changes!  I will be adding
 > this to the port soon.
 > 
 That would be nice!
 Maybe one could argue that such knobs are featurism, but I think it's OK
 if people are not forced to waste their resources.
 I would appreciate if the esoteric knob WITH_FLINT could make it into
 the port, because it would save me time:-) since I need it on severeal
 machines here, and, more importantly, it might help to get people have a
 look at FLINT (http://flint.cs.yale.edu/flint/publications/tcif.html is
 an introduction), which IMHO is relevant in times of .NET and dotGNU ...
 
 > Were you able to actually get eXene / CML to work on FreeBSD though?
 
 I tested the eXene examples basicwin, bounce and calc before submitting.
 Using a remote X server also worked.
 It works on 4-STABLE machines with buildworlds between January and July
 and XFree86-4 (built from the ports) as X server from January.
 
 > When I tried apps would compile fine, but not run at all.  I didn't
 > get around to debugging the problems though.
 > 
 Just in case: there are different "conventions" for starting up apps:
 Bla.doit (); [server string taken vom DISPLAY environment variable]
 Bla.doit ""; Main.run ""; [where "" is short for the local server]
 So here's my walk through of the eXene/examples directory:
 
 add         does not compile
 basicwin    OK
 bitmap      does not compile (even with a suitable sources.cm added)
 bounce      runs, but ball doesn't move, and window doesn't close
 bricks      OK
 calc        OK
 explode     ???
 mixer       OK
 ml-viewer   does not compile out of the box
 nbody       OK
 plaid       window comes up, then hangs
 triangle    OK
 widgets     OK: SimpleWithMenu
 	    OK, but does not exit: LabelSlider
 	    [000007] uncaught exception SysErr: Simple
 
 Hope that helps.
 
 If you have any remarks concerning my patch, please let me know. Since
 this was my first effort at porting something, I certainly missed a lot.
 
 Thanx
 Johannes
 
 

From: Johannes 5 Joemann <joemann@beefree.free.de>
To: Joseph Koshy <jkoshy@FreeBSD.ORG>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: ports/29656: Upgrade port lang/sml-nj-devel to 110.34
Date: Thu, 16 Aug 2001 15:34:06 +0200

 Oops, I forgot to patch src/system/makeml as well. Without doing so,
 the default CM pathconfig is wrong in the installed sml heap after
 recompiling. It still points to (e.g.)
 	/usr/ports/lang/sml-nj-devel/work/lib/pathconfig
 The problem didn't show up during my tests (on different machines!)
 because I always hadn't (re)moved the working directory:-(
 OK, so here's the patch to fix this problem, it should be applied
 after applying the initial patch above. There's a version to do both
 patches in one go available at:
 	ftp://offshore.free.de/pub/patch/sml-nj-devel.patch.20010816
 Sorry!
 Johannes
 
 
 --- Makefile	Thu Aug 16 11:45:16 2001
 +++ Makefile	Thu Aug 16 11:48:09 2001
 @@ -142,7 +142,7 @@
  	${ECHO} 'CMB.make ();' ) | \
  	../../bin/sml && \
  	./makeml && \
 -	./installml sml  &&
 +	./installml &&
  .endif
  
  # The install target installs the heaps and libraries to their final
 @@ -168,8 +168,8 @@
  	INSTALLDIR="$(PREFIX)/smlnj"	./config/install.sh
  .if defined(WITH_RECOMPILE) || defined(WITH_FLINT)
  	cd ${WRKDIR}/src/system && \
 -	./makeml && \
 -	./installml sml "$(PREFIX)/smlnj"
 +	INSTALLROOT="${PREFIX}/smlnj" ./makeml && \
 +	INSTALLROOT="${PREFIX}/smlnj" ./installml
  .endif
  .if defined(WITH_SRC) || defined(WITH_RECOMPILE) || defined(WITH_FLINT)
  	cd ${WRKDIR}/src/runtime/objs && ${GMAKE} clean
 --- files/do-patch-src-installml	Thu Aug 16 11:45:16 2001
 +++ files/do-patch-src-installml	Thu Aug 16 11:48:09 2001
 @@ -1,6 +1,6 @@
  --- src/system/installml.orig	Thu Jun  1 20:33:57 2000
 -+++ src/system/installml	Sat Aug 11 20:41:48 2001
 -@@ -3,16 +3,21 @@
 ++++ src/system/installml	Wed Aug 15 18:49:56 2001
 +@@ -3,7 +3,7 @@
   # The tmpfile is for pathconfig editing (see below).
   tmpfile=pathconfig.tmp.$$
   
 @@ -9,26 +9,20 @@
   
   this=$0
   here=`pwd`
 --cd ../..
 --twoup=`pwd`
 --cd $here
 -+if [ "$2" ]
 -+then
 -+	INSTALLROOT="$2"
 -+else
 -+	cd ../..
 -+	INSTALLROOT=`pwd`
 -+	cd $here
 -+fi
 +@@ -11,8 +11,10 @@
 + twoup=`pwd`
 + cd $here
   
  -MAIN_HEAP_DIR=$twoup/bin/.heap
  -MAIN_LIB_DIR=$twoup/lib
 ++INSTALLROOT=${INSTALLROOT:-$twoup}
 ++
  +MAIN_HEAP_DIR=$INSTALLROOT/bin/.heap
  +MAIN_LIB_DIR=$INSTALLROOT/lib
   
   if [ $# -gt 0 ] ; then
       STEM=$1
 -@@ -54,7 +59,7 @@
 +@@ -54,7 +56,7 @@
       fi
   }
   
 @@ -37,7 +31,7 @@
   LIB_DIR=$STEM.lib
   
   if [ ! -f $HEAP_FILE ] ; then
 -@@ -68,7 +73,7 @@
 +@@ -68,7 +70,7 @@
   fi
   
   # Moving the heap image to its place
 @@ -46,7 +40,7 @@
   
   # Moving each individual library...
   cd $LIB_DIR
 -@@ -94,4 +99,5 @@
 +@@ -94,4 +96,5 @@
   END { for (i in mapping) print i, mapping[i] }' \
    | sort >$pcfile
   
 --- files/do-patch-src-makeml	Thu Jan  1 01:00:00 1970
 +++ files/do-patch-src-makeml	Thu Aug 16 11:48:09 2001
 @@ -0,0 +1,31 @@
 +--- src/system/makeml.orig	Wed Apr 18 17:43:09 2001
 ++++ src/system/makeml	Wed Aug 15 18:36:30 2001
 +@@ -6,7 +6,9 @@
 + twoup=`pwd`
 + cd $here
 + 
 +-LINK=$twoup/bin/.link-sml
 ++INSTALLROOT=${INSTALLROOT:-$twoup}
 ++
 ++LINK=$INSTALLROOT/bin/.link-sml
 + 
 + if [ ! -x $LINK ] ; then
 +     echo $this: link script $LINK is not operational.
 +@@ -47,14 +49,14 @@
 + # ... unless it was already set at the time we run this script.
 + #
 + 
 +-CM_PATHCONFIG_DEFAULT=${CM_PATHCONFIG_DEFAULT:-$twoup/lib/pathconfig}
 ++CM_PATHCONFIG_DEFAULT=${CM_PATHCONFIG_DEFAULT:-$INSTALLROOT/lib/pathconfig}
 + export CM_PATHCONFIG_DEFAULT
 + 
 + #
 + # use the arch-n-opsys script to determine the ARCH/OS if possible
 + #
 +-if [ -f $twoup/bin/.arch-n-opsys ]; then
 +-    ARCH_N_OPSYS=`$twoup/bin/.arch-n-opsys`
 ++if [ -f $INSTALLROOT/bin/.arch-n-opsys ]; then
 ++    ARCH_N_OPSYS=`$INSTALLROOT/bin/.arch-n-opsys`
 +     if [ "$?" = "0" ]; then
 + 	eval $ARCH_N_OPSYS
 + 	echo $this: architecture = $ARCH
 --- files/patch-ab	Thu Aug 16 11:45:16 2001
 +++ files/patch-ab	Thu Aug 16 11:48:09 2001
 @@ -1,5 +1,5 @@
  --- config/install.sh.orig	Wed Jun 20 22:39:12 2001
 -+++ config/install.sh	Wed Aug  8 18:23:50 2001
 ++++ config/install.sh	Wed Aug 15 19:16:18 2001
  @@ -408,6 +408,28 @@
   }
   
 @@ -38,10 +38,11 @@
       else
   	echo "$this: !!! Run-time system build failed for some reason."
   	exit 1
 -@@ -594,6 +616,7 @@
 +@@ -594,6 +616,8 @@
   	do
   	    unpack $src $ROOT/src $src $src
           done
 ++	do_patch do-patch-src-makeml
  +	do_patch do-patch-src-installml
   	;;
         ml-yacc)
State-Changed-From-To: open->closed 
State-Changed-By: jkoshy 
State-Changed-When: Fri Aug 24 02:32:47 PDT 2001 
State-Changed-Why:  
Patch committed, thanks. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=29656 

From: jkoshy@FreeBSD.ORG (Joseph Koshy)
To: Johannes 5 Joemann <joemann@beefree.free.de>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: ports/29656: Upgrade port lang/sml-nj-devel to 110.34 
Date: Fri, 24 Aug 2001 02:46:51 -0700 (PDT)

 Johannes,
 
 I have committed your patch to `sml-nj-devel' essentially unchanged as
 I wanted your changes to appear in the upcoming release.
 
 I am currently inclined to reduce the amount of configurability supported:
 building and testing 12 versions of the package on 2 architectures can get
 to be quite a pain :).
 
 FLINT can be optional purely on account of the sheer time it takes to build
 the system when enabled.  It is really neat stuff though :).  I think that
 all the other options could be made mandatory: SML/NJ v110.34 is a
 developers release and as such its users are likely to want to look at the
 internals. 
 
 Thanks again for your contribution,
 
 Koshy
 <jkoshy@freebsd.org>
 
>Unformatted:
