haskell/haskell-platform: Use proper libdir in packaging

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Christoph Willing 2012-09-20 23:24:29 -05:00 committed by Robby Workman
parent e13e83029c
commit 2979588139
2 changed files with 18 additions and 20 deletions

View file

@ -4,11 +4,8 @@
#
# Written by Jockey S. Kyd (jockey dot kyd at gmail dot com)
# Public domain
# 20120712 Christoph Willing <c.willing@uq.edu.au>
# - bump version to 2012.2.0.0
# - add configure option --enable-unsupported-ghc-version
# (to allow latest ghc version used in current SBo)
#
# From 20120712, Christoph Willing <c.willing@uq.edu.au>
PRGNAM=haskell-platform
VERSION=${VERSION:-2012.2.0.0}
@ -56,32 +53,23 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# If using freeflut, the libs may have been
# named either libglut.* (replacing mesa's libglut.*) or libfreeglut.*
strings /usr/lib${LIBDIRSUFFIX}/libglut.so |grep glEnd >/dev/null 2>/dev/null
if [ $? -eq 0 ]; then
GLUTFLAGS="-lglut "
else
GLUTFLAGS="-lfreeglut "
fi
# Ensure libdir is passed to each package
patch -p0 < $CWD/honour_libdir.diff
# get path and version of ghc
GHC_VERSION=$(ghc --numeric-version)
# Recommended ghc version for this haskell-platform is ghc-7.4.1 but
# to allow for other ghc versions (current SBo is ghc-7.4.2),
# configure needs the --enable-unsupported-ghc-version option.
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="$GLUTFLAGS" \
./configure \
--enable-unsupported-ghc-version \
--prefix=/usr \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--libdir=/usr/lib${LIBDIRSUFFIX}
# get path and version of ghc
eval $(grep '^GHC=' scripts/config)
eval $(grep '^GHC_PKG=' scripts/config)
GHC_VERSION=$($GHC --numeric-version)
--libdir=/usr/lib${LIBDIRSUFFIX}/ghc-${GHC_VERSION}
make

View file

@ -0,0 +1,10 @@
--- scripts/build.sh.orig 2012-05-28 04:26:48.000000000 +1000
+++ scripts/build.sh 2012-09-20 11:12:27.131353968 +1000
@@ -86,6 +86,7 @@
fi
tell ./Setup configure --package-db="../../${PACKAGE_DB}" --prefix="${prefix}" \
+ --libdir=${libdir} --libsubdir=$PKG \
--with-compiler=${GHC} --with-hc-pkg=${GHC_PKG} --with-hsc2hs=${HSC2HS} \
${HAPPY_FLAG1} ${HAPPY_FLAG2} ${ALEX_FLAG} \
${CABAL_INSTALL_FLAG} ${CABAL_PROFILING_FLAG} \