aboutsummaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMikko Värri <vmj@linuxbox.fi>2010-07-16 15:10:40 -0500
committerErik Hanson <erik@slackbuilds.org>2010-07-21 01:42:41 -0500
commit7e4f9ab33777d9aba17d8885ad9e605ef2e45f84 (patch)
tree4842a50c13e563b28647459e554cbc523e713b11 /desktop
parenta977d27257a405d3da286f567eb0182c45ec540f (diff)
desktop/xmonad: Build bump, various changes.
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/xmonad/doinst.sh4
-rw-r--r--desktop/xmonad/xmonad.SlackBuild27
-rw-r--r--desktop/xmonad/xmonad.info4
-rw-r--r--desktop/xmonad/xmonad_cabal.patch25
4 files changed, 44 insertions, 16 deletions
diff --git a/desktop/xmonad/doinst.sh b/desktop/xmonad/doinst.sh
index 87825cdcca9a..2a44817807a7 100644
--- a/desktop/xmonad/doinst.sh
+++ b/desktop/xmonad/doinst.sh
@@ -1,4 +1,2 @@
-chroot . sh /install/register.sh
-rm -f install/register.sh
-rmdir install 2>/dev/null
+chroot . /usr/bin/ghc-pkg recache
diff --git a/desktop/xmonad/xmonad.SlackBuild b/desktop/xmonad/xmonad.SlackBuild
index 073ad2103312..d968cb1221cb 100644
--- a/desktop/xmonad/xmonad.SlackBuild
+++ b/desktop/xmonad/xmonad.SlackBuild
@@ -2,20 +2,20 @@
# Slackware build script for xmonad
-# Written by Mikko Varri (vmj@linuxbox.fi)
+# Written by Mikko Värri (vmj@linuxbox.fi)
# Public domain.
PRGNAM=xmonad
VERSION=${VERSION:-0.9.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
+GHC_VERSION=$(ghc --numeric-version)
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -54,6 +54,9 @@ 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
+patch -p0 <$CWD/xmonad_cabal.patch
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
runghc Setup.lhs configure \
@@ -61,12 +64,17 @@ runghc Setup.lhs configure \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-shared \
- --flags="-threaded -dynamic"
+ --flags="threaded dynamic"
runghc Setup.lhs build
runghc Setup.lhs haddock
runghc Setup.lhs copy --destdir=$PKG
-runghc Setup.lhs register --gen-script
+runghc Setup.lhs register --gen-pkg-config
+
+PKGCONFD=/usr/lib${LIBDIRSUFFIX}/ghc-${GHC_VERSION}/package.conf.d
+PKGID=$( grep -E "^id: " $PRGNAM-$VERSION.conf | cut -d" " -f2 )
+mkdir -p $PKG/$PKGCONFD
+mv $PRGNAM-$VERSION.conf $PKG/$PKGCONFD/$PKGID.conf
# Move the example config file
mv $PKG/usr/share/$PRGNAM-$VERSION/man $PKG/usr/doc/$PRGNAM-$VERSION/man
@@ -87,10 +95,8 @@ chmod 0755 $PKG/etc/X11/xinit/xinitrc.xmonad
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( 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
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
cp -a CONFIG README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -98,7 +104,6 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
-mv register.sh $PKG/install/register.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/desktop/xmonad/xmonad.info b/desktop/xmonad/xmonad.info
index e33cb849a02f..deb5ee042c93 100644
--- a/desktop/xmonad/xmonad.info
+++ b/desktop/xmonad/xmonad.info
@@ -5,6 +5,6 @@ DOWNLOAD="http://hackage.haskell.org/packages/archive/xmonad/0.9.1/xmonad-0.9.1.
MD5SUM="3d0dd5cf77768b10e1b7f3a47e32b09e"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-MAINTAINER="Mikko Varri"
+MAINTAINER="Mikko Värri"
EMAIL="vmj@linuxbox.fi"
-APPROVED="rworkman"
+APPROVED="Erik Hanson"
diff --git a/desktop/xmonad/xmonad_cabal.patch b/desktop/xmonad/xmonad_cabal.patch
new file mode 100644
index 000000000000..1d2d419191c3
--- /dev/null
+++ b/desktop/xmonad/xmonad_cabal.patch
@@ -0,0 +1,25 @@
+--- xmonad.cabal.orig 2010-06-24 04:07:24.000000000 +0300
++++ xmonad.cabal 2010-06-24 04:09:57.000000000 +0300
+@@ -32,6 +32,14 @@
+ 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
+@@ -77,3 +85,7 @@
+ ghc-options: -Werror
+ if flag(testing) && flag(small_base)
+ build-depends: random
++ if flag(threaded)
++ ghc-options: -threaded
++ if flag(dynamic)
++ ghc-options: -dynamic