summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikko Värri <vmj@linuxbox.fi>2011-03-05 17:11:25 -0300
committerNiels Horn <niels.horn@slackbuilds.org>2011-03-05 17:11:25 -0300
commit9e77fcce5df3f4ad0bd88f83d0c73cbbf4ec9907 (patch)
tree0a437a81985a44cc94bc8ef616a4a27f1ce528cb
parent549378e50fd40e8d9002d360385f981b9d76870d (diff)
downloadslackbuilds-9e77fcce5df3f4ad0bd88f83d0c73cbbf4ec9907.tar.gz
development/darcs: Added (revision control system in Haskell)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
-rw-r--r--development/darcs/README18
-rw-r--r--development/darcs/darcs.SlackBuild103
-rw-r--r--development/darcs/darcs.info10
-rw-r--r--development/darcs/darcs_cabal_dynamic.patch22
-rw-r--r--development/darcs/darcs_cabal_parsec.patch38
-rw-r--r--development/darcs/doinst.sh1
-rw-r--r--development/darcs/slack-desc19
7 files changed, 211 insertions, 0 deletions
diff --git a/development/darcs/README b/development/darcs/README
new file mode 100644
index 0000000000..b287017f39
--- /dev/null
+++ b/development/darcs/README
@@ -0,0 +1,18 @@
+Darcs is a free, open source revision control system written in
+Haskell.
+
+This requires ghc, haskell-transformers, haskell-syb, haskell-binary,
+haskell-dataenc, haskell-mmap, haskell-zlib, haskell-terminfo,
+haskell-utf8-string, haskell-html, haskell-tar, haskell-deepseq,
+haskell-mtl, haskell-text, haskell-parsec, haskell-hashed-storage,
+haskell-haskeline, haskell-regex-base, haskell-network,
+haskell-regex-posix, haskell-HTTP, and haskell-regex-compat.
+
+To run the test suite, additionally haskell-HUnit,
+haskell-ansi-terminal, haskell-hostname, haskell-xml,
+haskell-ansi-wl-pprint, haskell-QuickCheck, haskell-test-framework,
+haskell-test-framework-hunit, and haskell-test-framework-quickcheck2
+are required.
+
+After uninstalling, run this command to unregister the package from
+the ghc package database: ghc-pkg recache
diff --git a/development/darcs/darcs.SlackBuild b/development/darcs/darcs.SlackBuild
new file mode 100644
index 0000000000..d7a1da22dd
--- /dev/null
+++ b/development/darcs/darcs.SlackBuild
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+# Slackware build script for darcs
+
+# Written by Mikko Värri (vmj@linuxbox.fi)
+# Public domain.
+
+PRGNAM=darcs
+VERSION=${VERSION:-2.5.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+GHC_VERSION=$(ghc --numeric-version)
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Lift upper bound on parsec3 dependency
+patch -p0 <$CWD/darcs_cabal_parsec.patch
+
+# Link darcs binary dynamically
+patch -p0 <$CWD/darcs_cabal_dynamic.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+runghc Setup.lhs configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --libsubdir=ghc-${GHC_VERSION}/$PRGNAM-$VERSION \
+ --enable-shared \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --flags="dynamic -curl http mmap terminfo"
+
+runghc Setup.lhs build
+runghc Setup.lhs haddock
+runghc Setup.lhs copy --destdir=$PKG
+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
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# manual is missplaced, and Cabal does not support --mandir
+mv $PKG/usr/share/man $PKG/usr/man
+rmdir $PKG/usr/share
+
+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
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
+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
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
diff --git a/development/darcs/darcs.info b/development/darcs/darcs.info
new file mode 100644
index 0000000000..80151b63ad
--- /dev/null
+++ b/development/darcs/darcs.info
@@ -0,0 +1,10 @@
+PRGNAM="darcs"
+VERSION="2.5.1"
+HOMEPAGE="http://darcs.net/"
+DOWNLOAD="http://darcs.net/releases/darcs-2.5.1.tar.gz"
+MD5SUM="247151771f6dd39db697c586069cb1c9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Mikko Värri"
+EMAIL="vmj@linuxbox.fi"
+APPROVED="Niels Horn"
diff --git a/development/darcs/darcs_cabal_dynamic.patch b/development/darcs/darcs_cabal_dynamic.patch
new file mode 100644
index 0000000000..e87b2f4b42
--- /dev/null
+++ b/development/darcs/darcs_cabal_dynamic.patch
@@ -0,0 +1,22 @@
+--- darcs.cabal.orig 2011-02-11 23:36:22.000000000 +0200
++++ darcs.cabal 2011-02-11 23:50:05.000000000 +0200
+@@ -84,6 +84,10 @@
+ description: Build static binary
+ default: False
+
++flag dynamic
++ description: Link darcs executable dynamically
++ default: False
++
+ flag terminfo
+ description: Use the terminfo package for enhanced console support.
+
+@@ -499,6 +503,8 @@
+
+ if flag(static)
+ ghc-options: -static -optl-static -optl-pthread
++ if flag(dynamic)
++ ghc-options: -dynamic
+
+ if flag(hpc)
+ ghc-prof-options: -fhpc
diff --git a/development/darcs/darcs_cabal_parsec.patch b/development/darcs/darcs_cabal_parsec.patch
new file mode 100644
index 0000000000..bd0718c067
--- /dev/null
+++ b/development/darcs/darcs_cabal_parsec.patch
@@ -0,0 +1,38 @@
+--- darcs.cabal.orig 2011-02-11 23:36:22.000000000 +0200
++++ darcs.cabal 2011-02-11 23:37:16.000000000 +0200
+@@ -172,7 +172,7 @@
+ extensible-exceptions >= 0.1 && < 0.2,
+ regex-compat >= 0.71 && < 0.94,
+ mtl >= 1.0 && < 2.1,
+- parsec >= 2.0 && < 3.1,
++ parsec >= 2.0 && < 3.2,
+ html == 1.0.*,
+ filepath >= 1.1.0.0 && < 1.3.0.0,
+ haskeline >= 0.6.2.2 && < 0.7,
+@@ -377,7 +377,7 @@
+ extensible-exceptions >= 0.1 && < 0.2,
+ regex-compat >= 0.71 && < 0.94,
+ mtl >= 1.0 && < 2.1,
+- parsec >= 2.0 && < 3.1,
++ parsec >= 2.0 && < 3.2,
+ html == 1.0.*,
+ filepath >= 1.1.0.0 && < 1.3.0.0,
+ haskeline >= 0.6.2.2 && < 0.7,
+@@ -525,7 +525,7 @@
+ extensible-exceptions >= 0.1 && < 0.2,
+ regex-compat >= 0.71 && < 0.94,
+ mtl >= 1.0 && < 2.1,
+- parsec >= 2.0 && < 3.1,
++ parsec >= 2.0 && < 3.2,
+ html == 1.0.*,
+ filepath >= 1.1.0.0 && < 1.3.0.0,
+ haskeline >= 0.6.2.2 && < 0.7,
+@@ -621,7 +621,7 @@
+ extensible-exceptions >= 0.1 && < 0.2,
+ regex-compat >= 0.71 && < 0.94,
+ mtl >= 1.0 && < 2.1,
+- parsec >= 2.0 && < 3.1,
++ parsec >= 2.0 && < 3.2,
+ html == 1.0.*,
+ filepath >= 1.1.0.0 && < 1.3.0.0,
+ QuickCheck >= 2.1.0.0,
diff --git a/development/darcs/doinst.sh b/development/darcs/doinst.sh
new file mode 100644
index 0000000000..3268c238bf
--- /dev/null
+++ b/development/darcs/doinst.sh
@@ -0,0 +1 @@
+chroot . /usr/bin/ghc-pkg recache
diff --git a/development/darcs/slack-desc b/development/darcs/slack-desc
new file mode 100644
index 0000000000..91d2aa3514
--- /dev/null
+++ b/development/darcs/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+darcs: darcs (a distributed, interactive, smart revision control system)
+darcs:
+darcs: Darcs is a free, open source revision control system written in
+darcs: Haskell.
+darcs:
+darcs: http://darcs.net/
+darcs:
+darcs:
+darcs:
+darcs:
+darcs: