[arch-commits] Commit in haskell-clash-prelude/repos (2 files)

Felix Yan felixonmars at archlinux.org
Sat Apr 25 13:47:13 UTC 2020


    Date: Saturday, April 25, 2020 @ 13:47:12
  Author: felixonmars
Revision: 620689

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-clash-prelude/repos/community-staging-x86_64/
  haskell-clash-prelude/repos/community-staging-x86_64/PKGBUILD
    (from rev 620688, haskell-clash-prelude/trunk/PKGBUILD)

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

Copied: haskell-clash-prelude/repos/community-staging-x86_64/PKGBUILD (from rev 620688, haskell-clash-prelude/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2020-04-25 13:47:12 UTC (rev 620689)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=clash-prelude
+pkgname=haskell-clash-prelude
+pkgver=1.2.1
+pkgrel=2
+pkgdesc="CAES Language for Synchronous Hardware - Prelude library"
+url="https://github.com/clash-lang/clash-prelude"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-bifunctors' 'haskell-constraints' 'haskell-data-binary-ieee754'
+         'haskell-data-default-class' 'haskell-ghc-typelits-extra' 'haskell-ghc-typelits-knownnat'
+         'haskell-ghc-typelits-natnormalise' 'haskell-half' 'haskell-hashable' 'haskell-lens'
+         'haskell-quickcheck' 'haskell-recursion-schemes' 'haskell-reflection' 'haskell-singletons'
+         'haskell-th-abstraction' 'haskell-th-lift' 'haskell-text-show' 'haskell-th-orphans'
+         'haskell-type-errors' 'haskell-vector')
+makedepends=('ghc' 'haskell-cabal-doctest' 'haskell-doctest' 'haskell-hint' 'haskell-quickcheck-classes-base'
+             'haskell-tasty' 'haskell-tasty-hunit' 'haskell-tasty-quickcheck')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz
+        $_hkgname-ghc-8.10.patch::https://github.com/clash-lang/clash-compiler/commit/58bf6af404e454077ebefd4d8ed7906348e23e88.patch)
+sha512sums=('737b76d2b4a55b278f5903e467dc81a7304001cba8f9ba5fb116192d250bae07e36e74e75f0566d679d6072b7138e5fbdc267e7e66c83d5d1c01fccf26bbc7cf'
+            '9b852633a5daea4e3c4338e46fae03babba2a255c388eb6dd7561f2b3b5656342bc514950895889872cf1e1a9743a664e3c73204819229f5594398dda0c1529f')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p2 -i ../$_hkgname-ghc-8.10.patch || :
+    sed -i -e 's/< *0.4/<1/;s/< *0.6/<1/;s/< *2.14/<3/' $_hkgname.cabal
+    sed -i '/import Warning/d' Setup.hs
+}
+
+build() {
+    cd $_hkgname-$pkgver
+    
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
+    runhaskell Setup build
+    runhaskell Setup register --gen-script
+    runhaskell Setup unregister --gen-script
+    sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+    sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+    cd $_hkgname-$pkgver
+    # TODO
+    runhaskell Setup test || warning "Tests failed"
+}
+
+package() {
+    cd $_hkgname-$pkgver
+    
+    install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
+    install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
+    runhaskell Setup copy --destdir="$pkgdir"
+    install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+    rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}



More information about the arch-commits mailing list