[arch-commits] Commit in c2hs/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Wed Nov 29 14:13:05 UTC 2017


    Date: Wednesday, November 29, 2017 @ 14:13:04
  Author: felixonmars
Revision: 270706

upgpkg: c2hs 0.28.3-1

rebuild with language-c,0.7.1 c2hs,0.28.3

Modified:
  c2hs/trunk/PKGBUILD

----------+
 PKGBUILD |   24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-11-29 14:12:54 UTC (rev 270705)
+++ PKGBUILD	2017-11-29 14:13:04 UTC (rev 270706)
@@ -3,26 +3,38 @@
 # Contributor: Arch Haskell Team <arch-haskell at haskell.org>
 
 pkgname=c2hs
-pkgver=0.28.2
-pkgrel=7
+pkgver=0.28.3
+pkgrel=1
 pkgdesc="C->Haskell FFI tool that gives some cross-language type safety"
 url="https://github.com/haskell/c2hs"
 license=("GPL2")
 arch=('x86_64')
 depends=('ghc-libs' "haskell-dlist" "haskell-language-c")
-makedepends=('ghc')
+makedepends=('ghc' 'haskell-test-framework' 'haskell-test-framework-hunit' 'haskell-hunit'
+             'haskell-shelly' 'haskell-text')
 source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
-sha256sums=('f4171478cafe9f4906735763c2e0bc1ca0a9f56b50e9d59aac07520434920f9e')
+sha512sums=('17306b6ee41623d1c017581ed7aef6118a66c30a4698fa95d588b30ac625a6571906bb1fffecf7b86296667390d18cfe5ee2ade85098075f2ca982922b358b3a')
 
+prepare() {
+    sed -i 's/cmd "ghc"/cmd "ghc" "-dynamic"/' c2hs-$pkgver/tests/test-*.hs
+    sed -i 's/HC=ghc/HC="ghc -dynamic"/' c2hs-$pkgver/tests/system/Makefile
+    sed -i 's/"ghc", \["-/"ghc", ["-dynamic", "-/' c2hs-$pkgver/tests/test-*.hs
+}
+
 build() {
     cd "${srcdir}/${pkgname}-${pkgver}"
-    
+
     runhaskell Setup configure -O --enable-executable-dynamic --prefix=/usr \
-        --docdir="/usr/share/doc/${pkgname}" --datasubdir="$pkgname" \
+        --docdir="/usr/share/doc/${pkgname}" --datasubdir="$pkgname" --enable-tests \
             -f-regression -fbase3
     runhaskell Setup build
 }
 
+check() {
+    cd $pkgname-$pkgver
+    runhaskell Setup test
+}
+
 package() {
     cd "${srcdir}/${pkgname}-${pkgver}"
     runhaskell Setup copy --destdir="${pkgdir}"


More information about the arch-commits mailing list