smlnj stable port information

Package: smlnj
Version: 110.71
Revision: 1
Description: Standard ML compiler, tools, & libraries
Maintainer: Likai Liu
Homepage: http://www.smlnj.org/
License: BSD
Provides: smlnj-burg, smlnj-ckit, smlnj-cml, smlnj-runtime
Conflicts: smlnj-burg, smlnj-ckit, smlnj-cml, smlnj-runtime
Replaces: smlnj-burg, smlnj-ckit, smlnj-cml, smlnj-runtime
Suggests: sml-mode
CustomMirror: <<
Primary: http://smlnj.cs.uchicago.edu/dist/working/
<<

SourceDirectory: config
Source: mirror:custom:%v/config.tgz
Source-MD5: 33334c69b5f3eff1f4f65377551a89e5
SourceRename: %n-%v-config.tgz
Source2: mirror:custom:%v/boot.ppc-unix.tgz
Source2-MD5: 6982ad84c495578f8aabffba31acf73b
Source2Rename: %n-%v-boot.ppc-unix.tgz
Source3: mirror:custom:%v/boot.x86-unix.tgz
Source3-MD5: 753c50345fcd3b97aecd5c4743388de4
Source3Rename: %n-%v-boot.x86-unix.tgz
Source4: mirror:custom:%v/cm.tgz
Source4-MD5: ba5b37522aff8726935203582fc5cca8
Source4Rename: %n-%v-cm.tgz
Source5: mirror:custom:%v/compiler.tgz
Source5-MD5: 2cb77c40207fa7490f8d9d5e0daa7e5a
Source5Rename: %n-%v-compiler.tgz
Source6: mirror:custom:%v/runtime.tgz
Source6-MD5: 5b017473a817163587fb36e4c3921259
Source6Rename: %n-%v-runtime.tgz
Source7: mirror:custom:%v/system.tgz
Source7-MD5: 22574eb475fbb3a7d8c345ad1e9dbe04
Source7Rename: %n-%v-system.tgz
Source8: mirror:custom:%v/MLRISC.tgz
Source8-MD5: a38d4c283ed619295278cda6db054e07
Source8Rename: %n-%v-MLRISC.tgz
Source9: mirror:custom:%v/smlnj-lib.tgz
Source9-MD5: 49631e6a648afedb9e29454c4052704a
Source9Rename: %n-%v-smlnj-lib.tgz
Source10: mirror:custom:%v/ckit.tgz
Source10-MD5: de846fecaade7454db0f3a7aabbf3651
Source10Rename: %n-%v-ckit.tgz
Source11: mirror:custom:%v/nlffi.tgz
Source11-MD5: 92e156c6623b92040c1011c7384ebf3b
Source11Rename: %n-%v-nlffi.tgz
Source12: mirror:custom:%v/cml.tgz
Source12-MD5: 559fc31cae3f8b0808f991029ee04199
Source12Rename: %n-%v-cml.tgz
Source13: mirror:custom:%v/eXene.tgz
Source13-MD5: 2e24fac128d1e29250c94425a6613f2b
Source13Rename: %n-%v-eXene.tgz
Source14: mirror:custom:%v/ml-lex.tgz
Source14-MD5: 004919c1e1658299bce52e17e7efa260
Source14Rename: %n-%v-ml-lex.tgz
Source15: mirror:custom:%v/ml-yacc.tgz
Source15-MD5: f49b7a70f126d25aaf32a09e68185799
Source15Rename: %n-%v-ml-yacc.tgz
Source16: mirror:custom:%v/ml-burg.tgz
Source16-MD5: 9e968edfa8f03155401c304c004445b4
Source16Rename: %n-%v-ml-burg.tgz
Source17: mirror:custom:%v/ml-lpt.tgz
Source17-MD5: ec612fde778f7ee0742321b7f414b160
Source17Rename: %n-%v-ml-lpt.tgz
Source18: mirror:custom:%v/pgraph.tgz
Source18-MD5: bb4a20cdca80e3be06b016d1b2ecd3a2
Source18Rename: %n-%v-pgraph.tgz
Source19: mirror:custom:%v/trace-debug-profile.tgz
Source19-MD5: 0ae3fc7bd1523080a809128cc37d8c6f
Source19Rename: %n-%v-trace-debug-profile.tgz
Source20: mirror:custom:%v/heap2asm.tgz
Source20-MD5: edee3a9c1d565b399b9bbe6a21254855
Source20Rename: %n-%v-heap2asm.tgz
Source21: mirror:custom:%v/smlnj-c.tgz
Source21-MD5: afaa63b6871387ad4d78bd831d132748
Source21Rename: %n-%v-smlnj-c.tgz

DocFiles: LICENSE
PatchScript: <<
#!/bin/sh -ve

echo Setting up build directory ...

# setting up a plain text version of LICENSE
cat < LICENSE
STANDARD ML OF NEW JERSEY COPYRIGHT NOTICE, LICENSE AND DISCLAIMER.
http://www.smlnj.org/license.html

Copyright (c) 1989-1998 by Lucent Technologies

Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all
copies and that both the copyright notice and this permission
notice and warranty disclaimer appear in supporting documentation,
and that the name of Lucent Technologies, Bell Labs or any Lucent
entity not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.

Lucent disclaims all warranties with regard to this software,
including all implied warranties of merchantability and fitness. In
no event shall Lucent be liable for any special, indirect or
consequential damages or any damages whatsoever resulting from loss
of use, data or profits, whether in an action of contract,
negligence or other tortious action, arising out of or in
connection with the use or performance of this software.

EOF

# move the directories already unpacked by fink to where smlnj installer
# expects them. we're in build directory specified by SourceDirectory right
# now (%b).

# WARNING: double check with "%b/config/unpack" for where each directory goes.
# The following are the ones that happen to rest in $ROOT/base by coincidence.
dirs="runtime compiler cm system"

mkdir ../base

for d in $dirs; do
[ -d "../$d" ] && mv ../$d ../base/$d
done

targets="ml-yacc lexgen ml-lex ml-burg smlnj-lib pgraph-util cml cml-lib eXene mlrisc ckit mlrisc-tools ml-nlffigen ml-nlffi-lib heap2asm"

echo Selecting targets: $targets

# enable the packages we need. leave already enabled ones enabled.
for t in $targets; do
perl -pi -e "s,#request $t\\s*\$,request $t," targets
done
<<
UseMaxBuildJobs: false
CompileScript: (cd .. && config/install.sh)
InstallScript: <<
#!/bin/sh -ve
# heap and run go to %i/lib/smlnj/bin, library goes to %i/lib/smlnj/lib

echo Making directories: %i/bin %i/lib/smlnj
mkdir -p %i/bin
mkdir -p %i/lib/smlnj

echo Install heaps and executable images ...
mv ../bin %i/lib/smlnj/bin

echo Install smlnj-script in %i/bin ...

# architecture suffix and alloc size only needs to be determined once
ARCH_N_OPSYS=`%i/lib/smlnj/bin/.arch-n-opsys`
if [ "$?" != "0" ]; then
echo "unable to determine architecture/operating system"
exit 1
fi
eval $ARCH_N_OPSYS

cat < %i/bin/smlnj-script
#!/bin/sh
export SMLNJ_HOME=%p/lib/smlnj
export CM_PATHCONFIG=\$SMLNJ_HOME/lib/pathconfig
HEAPDIR=\$SMLNJ_HOME/bin/.heap
RUNDIR=\$SMLNJ_HOME/bin/.run

ALLOC=512k
APP=\`basename -- \$0\`
case \$APP in
smlnj-script)
echo "Please do not run \"smlnj-script\" directly."
echo "It should be symlinked to an application name."
exit 1
;;
esac

RUN="\$RUNDIR/run.$ARCH-$OPSYS"
exec \$RUN @SMLcmdname=\$0 @SMLload=\$HEAPDIR/\$APP @SMLalloc=\$ALLOC "\$@"
EOF

chmod 0755 %i/bin/smlnj-script

apps="lexgen ml-burg ml-lex ml-yacc ml-nlffigen sml"

echo Install symlinks for the executables: $apps

cd %i/bin
for run in $apps; do
ln -sf smlnj-script $run
done

## smlnj 110.53 seems to have fixed this.
#echo Fix absolute symlinks in \$SMLNJ_HOME/bin ...
#
#cd %i/lib/smlnj/bin
#for run in $apps; do
# rm $run; ln -sf ./.run-sml $run
#done

echo Install smlnj libraries ...
cd %b
mv ../lib %i/lib/smlnj/lib
<<
DescDetail: <<
SML/NJ is an implementation of the Standard ML programming language,
produced and maintained by researchers at Bell Labs, Princeton, Yale,
and AT&T Research. Standard ML has many features, including type
safety, algebraic data types with pattern matching, higher-order
functions, and a sophisticated module system. It is especially
well-suited for writing compilers and other language processors.

This package includes the interactive compiler (sml), the compilation
manager (CM), compiler generation tools (ml-lex, ml-yacc), the Basis
library, and the SML/NJ library.

Install this package if you want to program in SML.
<<
DescPackaging: <<
Based on Christopher League's smlnj*.info package info.

Command line programs are placed under %p/bin, symlinked to smlnj-script, a
launcher based on Christopher League's packaging. The launcher executes smlnj
runtime with a given application's heap image. You can also find command line
programs in %p/lib/smlnj/bin, where the symlinks are made to a launcher script
generated by the smlnj installer. These symlinks are provided so Compilation
Manager can find them. They're not used directly by the user. The heap images
and runtime are placed in %p/lib/smlnj/bin/{.heap|.run} respectively. Heap
images and runtime executables are placed with the usual ARCH-OS extension.

SML/NJ libraries are placed in %p/lib/smlnj/lib, so "pathconfig" should be
updated when new libraries are installed.

eXene does not depend on X11R6 development files to compile or run. It is
completely implemented in SML.

When the source package builds, PatchScript moves the sub-packages that are
already unpacked by Fink to where SML/NJ installer can find them. However, the
locations are arbitrary. Package maintainer needs to double check with
%b/config/unpack to find out where exactly each package goes.

TODO: maybe someday do a spilt package?
<<