summaryrefslogtreecommitdiff
path: root/community/haskell-cairo
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-07-20 04:21:08 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-07-20 04:21:08 +0000
commit29c4d88cb6f67caf6164909e0fe2185d46fc5093 (patch)
treefa25c2395883a60b0ce3cc3a87ddb2bc52e0bb6b /community/haskell-cairo
parente326eefd3e4853a3b36ef72eba0b21d21170de31 (diff)
Sun Jul 20 04:10:18 UTC 2014
Diffstat (limited to 'community/haskell-cairo')
-rw-r--r--community/haskell-cairo/PKGBUILD18
1 files changed, 13 insertions, 5 deletions
diff --git a/community/haskell-cairo/PKGBUILD b/community/haskell-cairo/PKGBUILD
index 70a16fb52..694b15389 100644
--- a/community/haskell-cairo/PKGBUILD
+++ b/community/haskell-cairo/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 110610 2014-05-04 13:54:50Z td123 $
+# $Id: PKGBUILD 115967 2014-07-19 16:04:51Z td123 $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=haskell-cairo
pkgver=0.12.5.3
-pkgrel=2
+pkgrel=3
pkgdesc="Binding to the cairo library for Gtk2Hs."
url="http://hackage.haskell.org/package/cairo"
license=('LGPL2.1')
@@ -31,10 +31,18 @@ build() {
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
+_update_deps() {
+ _ver=`pacman -Q $1 | cut -f2 -d\ | cut -f1 -d-`
+ for i in `seq 0 $(expr ${#depends[@]} - 1)`; do
+ if [ ${depends[$i]} == $1 ]; then
+ depends[$i]="$1=${_ver}"
+ fi
+ done
+}
+
package() {
- _ghcver=`pacman -Q ghc | cut -f2 -d\ | cut -f1 -d-`
- _hmtlver=`pacman -Q haskell-mtl | cut -f2 -d\ | cut -f1 -d-`
- depends=("ghc=${_ghcver}" "cairo" "haskell-mtl=${_hmtlver}" 'haskell-utf8-string')
+ _update_deps ghc
+ _update_deps haskell-mtl
cd ${srcdir}/cairo-${pkgver}
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/gtk2hs-cairo/register.sh