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

Felix Yan felixonmars at archlinux.org
Fri Dec 25 10:43:43 UTC 2020


    Date: Friday, December 25, 2020 @ 10:43:43
  Author: felixonmars
Revision: 790050

archrelease: copy trunk to community-staging-x86_64

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

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

Copied: c2hs/repos/community-staging-x86_64/PKGBUILD (from rev 790049, c2hs/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-12-25 10:43:43 UTC (rev 790050)
@@ -0,0 +1,46 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+pkgname=c2hs
+pkgver=0.28.7
+pkgrel=9
+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"
+        https://github.com/haskell/c2hs/archive/fbb4c2fa6ec5528aa068512f1b691298db420321.tar.gz)
+sha512sums=('69c877349ae4864763d20664edae07a67aa1c55f5d4fccc3fcb6d06e94eb14d6b4b0201fc2840a9ebbc45a2a21ab55ad0e79f9cd88c00003df67abf5c1fd62d6'
+            '2953a07fecc95cfd5086b973a0d12b7407417f16bf73ad0f7d261e9e1884cf14b18663c15d86c8bf047dff05de70d4f01195e5d70c3225c86695fc57c8cf70e9')
+
+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
+
+    # Missing test files
+    cp -r c2hs-fbb4c2fa6ec5528aa068512f1b691298db420321/tests/bugs/issue-242 c2hs-$pkgver/tests/bugs/
+    cp -r c2hs-fbb4c2fa6ec5528aa068512f1b691298db420321/tests/system/interruptible c2hs-$pkgver/tests/system/
+}
+
+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 --ghc-option='-pie'
+    runhaskell Setup build $MAKEFLAGS
+}
+
+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