Date: Saturday, April 29, 2023 @ 13:14:43
  Author: felixonmars
Revision: 1452475

archrelease: copy trunk to community-staging-x86_64

Added:
  agda/repos/community-staging-x86_64/
  agda/repos/community-staging-x86_64/PKGBUILD
    (from rev 1452471, agda/trunk/PKGBUILD)

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

Copied: agda/repos/community-staging-x86_64/PKGBUILD (from rev 1452471, 
agda/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2023-04-29 13:14:43 UTC (rev 1452475)
@@ -0,0 +1,58 @@
+# Maintainer: Felix Yan <[email protected]>
+# Contributor: Arch Haskell Team <[email protected]>
+
+_hkgname=Agda
+pkgname=agda
+pkgver=2.6.3
+pkgrel=5
+pkgdesc="A dependently typed functional programming language and proof 
assistant"
+url="https://wiki.portal.chalmers.se/agda/";
+license=("custom")
+arch=('x86_64')
+depends=('ghc-libs' 'ghc' 'haskell-stmonadtrans' 'haskell-aeson' 
'haskell-async'
+         'haskell-blaze-html' 'haskell-boxes' 'haskell-case-insensitive' 
'haskell-cpphs'
+         'haskell-data-hash' 'haskell-dlist' 'haskell-edit-distance' 
'haskell-equivalence'
+         'haskell-gitrev' 'haskell-hashable' 'haskell-monad-control' 
'haskell-murmur-hash'
+         'haskell-parallel' 'haskell-regex-tdfa' 'haskell-split' 
'haskell-strict'
+         'haskell-time-compat' 'haskell-unordered-containers' 
'haskell-uri-encode' 'haskell-vector'
+         'haskell-vector-hashtables' 'haskell-zlib')
+optdepends=('agda-stdlib: for standard library')
+makedepends=('alex' 'happy' 'ghc')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz";)
+sha512sums=('005152c19b05d858a54d146b75c9a88bf87e7d1cbcaee237ea92f273c8c59e9cf7177d6d553ddf6246a74c7ab318ceac909c0bb981599fc5bb156a7b79d1234d')
+
+prepare() {
+    cd $_hkgname-$pkgver
+    sed -i '/fno-warn-overlapping-patterns/a \        , "-dynamic"' 
src/full/Agda/Compiler/MAlonzo/Compiler.hs
+}
+
+build() {
+    cd $_hkgname-$pkgver
+
+    # -fllvm is disabled because ghc+llc hangs since LLVM 13
+    # https://gitlab.haskell.org/ghc/ghc/-/issues/20559
+    runhaskell Setup configure -O --enable-shared --enable-executable-dynamic 
--disable-library-vanilla \
+        --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
+        --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid 
--ghc-option=-fasm \
+            -fcpphs -f-debug -f-enable-cluster-counting
+    LC_CTYPE=en_US.UTF-8 runhaskell Setup build $MAKEFLAGS
+    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
+}
+
+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"
+    LD_LIBRARY_PATH="$PWD/dist/build" runhaskell Setup copy 
--destdir="${pkgdir}"
+
+    # Symlink to avoid writing to this place when agda-lib is present
+    install -dm755 "$pkgdir"/usr/share/agda/lib/_build/$pkgver/agda
+    ln -s ../../../prim "$pkgdir"/usr/share/agda/lib/_build/$pkgver/agda/
+
+    install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+    rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}

Reply via email to