summaryrefslogtreecommitdiff
path: root/development/mlton
diff options
context:
space:
mode:
authorScot Doyle <mlton837@scotdoyle.com>2018-05-17 07:06:46 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-05-17 07:09:26 +0700
commit93b9db3396c30f650377cd2cf799a43f18d23238 (patch)
tree287bc65b6c45e2ab0f0aa09afc1c267c81f911d4 /development/mlton
parent954fc74b8a01504fad68a8e97f118bb94b99c036 (diff)
downloadslackbuilds-93b9db3396c30f650377cd2cf799a43f18d23238.tar.gz
development/mlton: Updated for version 20180207 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/mlton')
-rw-r--r--development/mlton/README14
-rw-r--r--development/mlton/mlton.SlackBuild72
-rw-r--r--development/mlton/mlton.info18
-rw-r--r--development/mlton/slack-desc14
4 files changed, 61 insertions, 57 deletions
diff --git a/development/mlton/README b/development/mlton/README
index df57f0fd72..362c652165 100644
--- a/development/mlton/README
+++ b/development/mlton/README
@@ -1,7 +1,9 @@
-MLton is an open-source, whole-program, optimizing Standard ML compiler. It
-aims to produce fast executables, and to encourage rapid prototyping and
-modular programming by eliminating performance penalties often associated with
-the use of high-level language features.
+MLton is a whole-program, ahead-of-time Standard ML compiler featuring
+excellent application performance and partial Successor ML support.
-This is a prebuilt binary package to shorten overwhelmingly long time of local
-compilation.
+This build script uses a pre-built version of MLton from mlton.org to
+compile the MLton package. This pre-built compiler is only available
+for x86_64. Builds usually require 2GB of memory.
+
+For extra documentation in /usr/share/doc, invoke with a "docs" flag:
+./mlton.SlackBuild -docs
diff --git a/development/mlton/mlton.SlackBuild b/development/mlton/mlton.SlackBuild
index 3fdbef1bae..c399bb907b 100644
--- a/development/mlton/mlton.SlackBuild
+++ b/development/mlton/mlton.SlackBuild
@@ -1,9 +1,10 @@
#!/bin/sh
+# Slackware build script for MLton
# Slackware build script for mlton
# Originally by Jockey S. Kyd (jockey dot kyd at gmail dot com)
-
# Modified by Ryan P.C. McQuen, WA, ryanpcmcquen@member.fsf.org
+# Copyright 2018, Scot Doyle
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,17 +24,16 @@
# along with this program (most likely, a file named COPYING). If
# not, see <http://www.gnu.org/licenses/>.
-
PRGNAM=mlton
-VERSION=${VERSION:-20130715}
+VERSION=${VERSION:-20180207}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PREBUILT=$PRGNAM-$VERSION-$BUILD.amd64-linux
if [ -z "$ARCH" ]; then
- case "$(uname -m)" in
- i?86) ARCH=i486 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$(uname -m) ;;
+ case "$( uname -m )" in
+ x86_64) ARCH=x86_64 ;;
+ *) printf "This script only supports x86_64.\n" 1>&2; exit 1 ;;
esac
fi
@@ -42,42 +42,42 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-case "$ARCH" in
- i?86) LIBDIRSUFFIX=""
- TARARCH="x86" ;;
- x86_64) LIBDIRSUFFIX="64"
- TARARCH="amd64" ;;
- *) printf "$ARCH is not supported.\n" 1>&2
- exit 1 ;;
-esac
-
-DIST=$PRGNAM-$VERSION-1.$TARARCH-linux
-
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $PKG
-tar xvf $CWD/$DIST.tgz
-chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+cd $TMP
+rm -rf $PREBUILT $PRGNAM-$VERSION
-[ "$LIBDIRSUFFIX" = "64" ] && mv $PKG/usr/lib{,64}
-sed -i "s|^lib=.*$|lib='/usr/lib$LIBDIRSUFFIX/mlton'|" $PKG/usr/bin/mlton
+tar xvf $CWD/$PREBUILT.tgz
+tar xvf $CWD/$PRGNAM-$VERSION.src.tgz
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+cd $PRGNAM-$VERSION
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-mv $PKG/usr/share/doc/mlton/* $PKG/usr/doc/$PRGNAM-$VERSION/
-rm -rf $PKG/usr/share
+# Permissions are already set
+chown -R root:root .
+
+# Prefer the pre-built compiler
+PATH=$TMP/$PREBUILT/bin:$PATH
+make all
+make PREFIX="$PKG" install
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
+# Binaries are already stripped
cd $PKG
+mkdir -p usr
+mv share/man usr
+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
+fi
+rm -rf share
+
+mv lib usr/lib64
+mv bin usr
+sed -i "s:^lib=.*:lib=/usr/lib64/mlton:" usr/bin/mlton
+
+mkdir install
+cat $CWD/slack-desc > install/slack-desc
+
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/development/mlton/mlton.info b/development/mlton/mlton.info
index cbb5878658..3df87be025 100644
--- a/development/mlton/mlton.info
+++ b/development/mlton/mlton.info
@@ -1,10 +1,12 @@
PRGNAM="mlton"
-VERSION="20130715"
-HOMEPAGE="http://mlton.org/"
-DOWNLOAD="http://sourceforge.net/projects/mlton/files/mlton/20130715/mlton-20130715-1.x86-linux.tgz"
-MD5SUM="154211021262403bcc535a408e46c2d9"
-DOWNLOAD_x86_64="http://sourceforge.net/projects/mlton/files/mlton/20130715/mlton-20130715-1.amd64-linux.tgz"
-MD5SUM_x86_64="8f81fd906ee17a2893c2e7b6f5c6b702"
+VERSION="20180207"
+HOMEPAGE="http://mlton.org"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://downloads.sourceforge.net/project/mlton/mlton/20180207/mlton-20180207-1.amd64-linux.tgz \
+ https://downloads.sourceforge.net/project/mlton/mlton/20180207/mlton-20180207.src.tgz"
+MD5SUM_x86_64="e318ea7d87cb1996c921810e278cb717 \
+ efa5a6b70d964daefefe4b2581173ad9"
REQUIRES=""
-MAINTAINER="orphaned - no maintainer"
-EMAIL="nobody@nowhere"
+MAINTAINER="Scot Doyle"
+EMAIL="mlton837@scotdoyle.com"
diff --git a/development/mlton/slack-desc b/development/mlton/slack-desc
index b3ffd09a9d..b9357bd329 100644
--- a/development/mlton/slack-desc
+++ b/development/mlton/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
-mlton: mlton (MLton Standard ML Compiler)
+mlton: mlton (MLton Standard ML compiler)
+mlton:
+mlton: MLton is a whole-program, ahead-of-time Standard ML compiler featuring
+mlton: excellent application performance and partial Successor ML support.
+mlton:
+mlton:
+mlton:
mlton:
-mlton: MLton is an open-source, whole-program, optimizing Standard ML
-mlton: compiler. It aims to produce fast executables, and to encourage rapid
-mlton: prototyping and modular programming by eliminating performance
-mlton: penalties often associated with the use of high-level language
-mlton: features.
mlton:
-mlton: http://mlton.org/
mlton:
mlton: