aboutsummaryrefslogtreecommitdiffstats
path: root/community/happy/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/happy/APKBUILD')
-rw-r--r--community/happy/APKBUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/community/happy/APKBUILD b/community/happy/APKBUILD
new file mode 100644
index 00000000000..1e85ffbf2ef
--- /dev/null
+++ b/community/happy/APKBUILD
@@ -0,0 +1,38 @@
+# Contributor: River Dillon <oss@outerpassage.net>
+# Maintainer: River Dillon <oss@outerpassage.net>
+pkgname=happy
+pkgver=1.21.0
+pkgrel=1
+pkgdesc="parser generator for Haskell"
+url="https://www.haskell.org/happy/"
+arch="x86_64 aarch64" # limited by ghc
+license="BSD-2-Clause"
+makedepends="ghc libffi-dev"
+[ "$CARCH" = "aarch64" ] && options="!check" # tests broken on aarch64 due to https://github.com/llvm/llvm-project/issues/52844
+source="
+ https://hackage.haskell.org/package/happy-$pkgver/happy-$pkgver.tar.gz
+ "
+
+build() {
+ # ghc version path
+ export PATH="$PATH:/usr/lib/llvm14/bin"
+ runhaskell Setup.hs configure \
+ "--prefix=/usr" \
+ "--datasubdir=$pkgname" \
+ "--docdir=\$datadir/doc/$pkgname" \
+ "--enable-tests" \
+ -f -bootstrap
+ runhaskell Setup.hs build -j "--ghc-options=-j -O1"
+}
+
+check() {
+ runhaskell Setup.hs test
+}
+
+package() {
+ runhaskell Setup.hs copy "--destdir=$pkgdir"
+}
+
+sha512sums="
+d63e33fe958865c560eed01e54f3384d09b6b2b2282480db302366492d18a7fd67f530d92206f8ff19e0842942f608a8d226ea66cd947583c78e800f6d580fec happy-1.21.0.tar.gz
+"