summaryrefslogtreecommitdiff
path: root/development/ghc/ghc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/ghc/ghc.SlackBuild')
-rw-r--r--development/ghc/ghc.SlackBuild37
1 files changed, 19 insertions, 18 deletions
diff --git a/development/ghc/ghc.SlackBuild b/development/ghc/ghc.SlackBuild
index 2aba3baa2c..6238dc6cb2 100644
--- a/development/ghc/ghc.SlackBuild
+++ b/development/ghc/ghc.SlackBuild
@@ -6,8 +6,8 @@
# Public domain.
PRGNAM=ghc
-VERSION=${VERSION:-6.10.1}
-ARCH=${ARCH:-i386}
+VERSION=${VERSION:-6.12.1}
+ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -16,12 +16,20 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
+TARARCH=i386
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$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"
+ TARARCH="x86_64"
fi
set -e
@@ -30,7 +38,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION-$ARCH-unknown-linux.tar.bz2
+tar xvf $CWD/$PRGNAM-$VERSION-$TARARCH-unknown-linux-n.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
@@ -42,10 +50,10 @@ find . \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --prefix=/usr
-
-# docs/ext-core/Makefile is missing DESTDIR
-patch -p0 < $CWD/docs_ext-core_Makefile.patch
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --libdir=/usr/lib${LIBDIRSUFFIX}
make install DESTDIR=$PKG
@@ -53,26 +61,19 @@ make install DESTDIR=$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
+ xargs strip --strip-unneeded 2> /dev/null || true
)
-# Fix paths
-mv $PKG/usr/share/man $PKG/usr/man
-mv $PKG/usr/share/doc $PKG/usr/doc
-mv $PKG/usr/doc/ghc $PKG/usr/doc/ghc-$VERSION
-( cd $PKG/usr/doc ; ln -s ghc-$VERSION ghc )
-rmdir $PKG/usr/share 2>/dev/null # Should be empty now
-
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
-cp -a ANNOUNCE INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a INSTALL LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}