# Maintainer: George Rawlinson # Contributor: Armin Preiml pkgname=hare pkgver=0.24.0 pkgrel=1 pkgdesc='The Hare programming language' arch=('x86_64' 'aarch64') url='https://harelang.org/' license=('MPL-2.0 AND GPL-3.0-only') depends=('qbe' 'harec') makedepends=('scdoc') source=("$pkgname-$pkgver.tar.gz::https://git.sr.ht/~sircmpwn/${pkgname}/archive/${pkgver}.tar.gz") b2sums=('4e1e706a7e0623ebe71803dc591b362527dd140f025cb3529e95d9bec8bea464bc008d512e4981f1dcd34f770b8831a0d6dd37cb453ee54e01e900c1cd52c159') prepare() { cd "${pkgname}-${pkgver}" # configure prefix directory & architecture sed \ -e 's:/usr/local:/usr:' \ -e "s/^ARCH = .*/ARCH = $CARCH/" \ configs/linux.mk > config.mk } build() { cd "${pkgname}-${pkgver}" # remove '-Wl,' prefix if present, since it is only required when # the linker is invoked indirectly. Keeping it will cause the linker to # fail. export LDFLAGS=${LDFLAGS#"-Wl,"} # XXX: parallel build driver builds are broken. LOCALVER=arch make -j1 } check() { cd "${pkgname}-${pkgver}" # XXX: see above, in build(). # # Currently one test fails on glibc # https://lists.sr.ht/~sircmpwn/hare-dev/%3C2I5P65667M8XC.2AAFMEP64ZWLL%40mforney.org%3E make check -j1 } package() { cd "${pkgname}-${pkgver}" make DESTDIR="$pkgdir" install }