diff options
Diffstat (limited to 'development/mlton/mlton.SlackBuild')
-rw-r--r-- | development/mlton/mlton.SlackBuild | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/development/mlton/mlton.SlackBuild b/development/mlton/mlton.SlackBuild index c399bb907b9a..823ca65d83cd 100644 --- a/development/mlton/mlton.SlackBuild +++ b/development/mlton/mlton.SlackBuild @@ -28,14 +28,13 @@ PRGNAM=mlton VERSION=${VERSION:-20180207} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -PREBUILT=$PRGNAM-$VERSION-$BUILD.amd64-linux +PREBUILT=${PREBUILT:-$PRGNAM-$VERSION-1.amd64-linux} -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - x86_64) ARCH=x86_64 ;; +ARCH=${ARCH:-$(uname -m)} +case "$ARCH" in + x86_64) : ;; *) printf "This script only supports x86_64.\n" 1>&2; exit 1 ;; - esac -fi +esac CWD=$(pwd) TMP=${TMP:-/tmp/SBo} @@ -51,22 +50,29 @@ rm -rf $PREBUILT $PRGNAM-$VERSION tar xvf $CWD/$PREBUILT.tgz tar xvf $CWD/$PRGNAM-$VERSION.src.tgz -cd $PRGNAM-$VERSION - # Permissions are already set -chown -R root:root . +chown -R root:root $PREBUILT $PRGNAM-$VERSION + +cd $PRGNAM-$VERSION # Prefer the pre-built compiler PATH=$TMP/$PREBUILT/bin:$PATH -make all + +# Without any ulimit, "amd64 code gen" uses all available memory. +ulimit -v 4000000 + +make -j1 all make PREFIX="$PKG" install +# Fix ownership of stuff from 'make install' +chown -R root:root $PKG + # Binaries are already stripped cd $PKG mkdir -p usr mv share/man usr -if [ "$1" == "-docs" ]; then +if [ "$1" = "-docs" ]; then mkdir -p usr/share/doc mv share/doc/$PRGNAM usr/share/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > usr/share/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |