desktop/xmonad: 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 16:25:01 -04:00 committed by dsomero
parent 8863badc72
commit bffbaabf9c
4 changed files with 23 additions and 14 deletions

View File

@ -14,3 +14,6 @@ To get you started, the most basic key bindings are:
mod-shift-return Launch xterm
mod-shift-q Quit xmonad
For a guided tour, see http://www.xmonad.org/tour.html
After uninstalling, run this command to unregister the package from
the ghc package database: ghc-pkg recache

View File

@ -24,7 +24,7 @@
PRGNAM=xmonad
VERSION=${VERSION:-0.10}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
GHC_VERSION=$(ghc --numeric-version)
@ -71,7 +71,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# Enable -threaded -dynamic GHC options only for the binary, not for the libs
# Enable -threaded GHC option only for the binary, not for the libs.
# And raise haskell-X11 version.
patch -p0 <$CWD/xmonad_cabal.patch
CFLAGS="$SLKCFLAGS" \
@ -81,8 +82,10 @@ runghc Setup configure \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--libsubdir=ghc-${GHC_VERSION}/$PRGNAM-$VERSION \
--enable-shared \
--enable-library-profiling \
--enable-executable-dynamic \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--flags="threaded dynamic"
--flags="threaded"
runghc Setup build
runghc Setup haddock

View File

@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Mikko Värri"
EMAIL="vmj@linuxbox.fi"
APPROVED="rworkman"
APPROVED="dsomero"

View File

@ -1,25 +1,28 @@
--- xmonad.cabal.orig 2011-11-19 01:14:36.000000000 +0200
+++ xmonad.cabal 2012-01-05 14:57:48.000000000 +0200
@@ -32,6 +32,14 @@
--- xmonad.cabal.orig 2012-05-16 01:04:06.426000004 +0300
+++ xmonad.cabal 2012-05-16 01:04:39.336999960 +0300
@@ -32,6 +32,10 @@
description: Testing mode, only build minimal components
default: False
+flag threaded
+ description: Use threaded runtime for xmonad binary
+ default: False
+
+flag dynamic
+ description: Link xmonad binary dynamically
+ default: False
+
library
exposed-modules: XMonad
XMonad.Main
@@ -88,3 +96,7 @@
@@ -46,7 +54,7 @@
build-depends: base < 5 && >=3, containers, directory, process, filepath, extensible-exceptions
else
build-depends: base < 3
- build-depends: X11>=1.5.0.0 && < 1.6, mtl, unix,
+ build-depends: X11>=1.5.0.0 && < 1.7, mtl, unix,
utf8-string >= 0.3 && < 0.4
if true
@@ -88,3 +96,5 @@
ghc-options: -Werror
if flag(testing) && flag(small_base)
build-depends: filepath, process, directory, mtl, unix, X11, base, containers, random, extensible-exceptions
+ if flag(threaded)
+ ghc-options: -threaded
+ if flag(dynamic)
+ ghc-options: -dynamic