freebsd-ports/lang/sml-nj-devel/files/do-patch-src-installml
Joseph Koshy 924e43a646 Upgrade to SML/NJ v110.34. Add a number of nifty configurability options.
PR:		ports/29656
Submitted by:	Johannes 5 Joemann <joemann@beefree.free.de>
2001-08-24 09:12:43 +00:00

48 lines
1 KiB
Text

--- src/system/installml.orig Thu Jun 1 20:33:57 2000
+++ 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.$$
-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`
@@ -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 +56,7 @@
fi
}
-HEAP_FILE=$STEM.$ARCH-$OPSYS
+HEAP_FILE=$STEM.$HEAP_SUFFIX
LIB_DIR=$STEM.lib
if [ ! -f $HEAP_FILE ] ; then
@@ -68,7 +70,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 +96,5 @@
END { for (i in mapping) print i, mapping[i] }' \
| sort >$pcfile
+rm -f $tmpfile
rm -r $LIB_DIR