diff --git a/haskell/haskell-platform/haskell-platform.SlackBuild b/haskell/haskell-platform/haskell-platform.SlackBuild index b119e9a8b0..5204ecaa88 100644 --- a/haskell/haskell-platform/haskell-platform.SlackBuild +++ b/haskell/haskell-platform/haskell-platform.SlackBuild @@ -4,11 +4,8 @@ # # Written by Jockey S. Kyd (jockey dot kyd at gmail dot com) # Public domain - -# 20120712 Christoph Willing -# - 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 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 diff --git a/haskell/haskell-platform/honour_libdir.diff b/haskell/haskell-platform/honour_libdir.diff new file mode 100644 index 0000000000..0270e89dc4 --- /dev/null +++ b/haskell/haskell-platform/honour_libdir.diff @@ -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} \