[arch-commits] Commit in c2hs/repos (2 files)

Felix Yan felixonmars at archlinux.org
Fri May 10 15:56:11 UTC 2019


    Date: Friday, May 10, 2019 @ 15:56:11
  Author: felixonmars
Revision: 464920

archrelease: copy trunk to community-staging-x86_64

Added:
  c2hs/repos/community-staging-x86_64/
  c2hs/repos/community-staging-x86_64/PKGBUILD
    (from rev 464919, c2hs/trunk/PKGBUILD)

----------+
 PKGBUILD |   40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

Copied: c2hs/repos/community-staging-x86_64/PKGBUILD (from rev 464919, c2hs/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2019-05-10 15:56:11 UTC (rev 464920)
@@ -0,0 +1,40 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+pkgname=c2hs
+pkgver=0.28.6
+pkgrel=28
+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' 'haskell-test-framework' 'haskell-test-framework-hunit' 'haskell-hunit'
+             'haskell-shelly')
+source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('848693ddf787244cc0f100f533030889a1efcef283f06ef609574d9cd0005679fab373172a949408ce6d4b9c97d15a56b0ec11fe39b466ad3f84aa527d2ab1c9')
+
+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" --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