diff options
Diffstat (limited to 'development/ocaml/ocaml.SlackBuild')
-rw-r--r-- | development/ocaml/ocaml.SlackBuild | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/development/ocaml/ocaml.SlackBuild b/development/ocaml/ocaml.SlackBuild index 5951b728aa..7fb57a6d95 100644 --- a/development/ocaml/ocaml.SlackBuild +++ b/development/ocaml/ocaml.SlackBuild @@ -25,7 +25,7 @@ PRGNAM=ocaml VERSION=3.10.2 ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -35,8 +35,13 @@ OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" fi set -e @@ -50,15 +55,24 @@ cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . -./configure --prefix /usr +./configure \ + --prefix /usr \ + --libdir /usr/lib${LIBDIRSUFFIX}/ocaml \ + --host $ARCH-slackware-linux + sed -i -e "s/\\(BYTECCCOMPOPTS=.*\\)/\\1 ${SLKCFLAGS}/" config/Makefile sed -i -e "s/\\(NATIVECCCOMPOPTS=.*\\)/\\1 ${SLKCFLAGS}/" config/Makefile + make world.opt -make PREFIX=$PKG/usr install +make install \ + PREFIX=$PKG/usr \ + LIBDIR=$PKG/usr/lib${LIBDIRSUFFIX}/ocaml ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null ) ( cd $PKG/usr/man |