haskell/haskell-cgi: Adjust build for ghc 7.4.x.

Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
Mikko Värri 2012-06-27 15:49:16 -04:00 committed by dsomero
parent c34c51b654
commit f744cbba09

View file

@ -2,7 +2,7 @@
# Slackware build script for cgi
# Copyright 2011 Mikko Värri, Finland
# Copyright 2012 Mikko Värri, Finland
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -24,7 +24,7 @@
PRGNAM=haskell-cgi
VERSION=${VERSION:-3001.1.8.2}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
SRCNAM="$( echo $PRGNAM | cut -d- -f2- )"
@ -75,24 +75,25 @@ find . \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
runghc Setup.hs configure \
runghc Setup configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--libsubdir=ghc-${GHC_VERSION}/$SRCNAM-$VERSION \
--enable-shared \
--enable-library-profiling \
--docdir=/usr/doc/$PRGNAM-$VERSION
runghc Setup.hs build
runghc Setup.hs haddock
runghc Setup.hs copy --destdir=$PKG
runghc Setup.hs register --gen-pkg-config
runghc Setup build
runghc Setup haddock
runghc Setup copy --destdir=$PKG
runghc Setup register --gen-pkg-config
PKGCONFD=/usr/lib${LIBDIRSUFFIX}/ghc-${GHC_VERSION}/package.conf.d
PKGID=$( grep -E "^id: " $SRCNAM-$VERSION.conf | cut -d" " -f2 )
mkdir -p $PKG/$PKGCONFD
mv $SRCNAM-$VERSION.conf $PKG/$PKGCONFD/$PKGID.conf
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION