# Contributor: Clayton Craft # Maintainer: Clayton Craft pkgname=mercury pkgver=22.01.5 pkgrel=0 pkgdesc="Compiler for the Mercury language" url="http://www.mercurylang.org" arch="all !riscv64" # hangs on configure tests license="GPL-2.0-only" makedepends="autoconf automake bison flex" depends="$pkgname-libs" subpackages="$pkgname-doc $pkgname-libs" source=" http://dl.mercurylang.org/release/mercury-srcdist-$pkgver.tar.gz 0001-disable-gcc-label-support-on-arm.patch 0002-always-build-shared-libs.patch " options="!check" # tests are unstable / flaky builddir="$srcdir"/mercury-srcdist-"$pkgver" build() { ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --enable-shared-libs \ --enable-libgrades="hlc.gc" make PARALLEL="$MAKEFLAGS" } package() { make DESTDIR="$pkgdir" \ INSTALL_PREFIX="$pkgdir"/usr \ INSTALL_MAN_DIR="$pkgdir"/usr/share/man \ INSTALL_INFO_DIR="$pkgdir"/usr/share/info \ MERCURY_COMPILER="$pkgdir"/usr/bin/mercury_compile \ MERCURY_CONFIG_DIR="$pkgdir"/usr/lib/mercury \ PARALLEL="$MAKEFLAGS" \ install rm "$pkgdir"/usr/lib/mercury/lib/hlc.gc/libmer_*.a rm "$pkgdir"/usr/lib/mercury/lib/libgc.a rm "$pkgdir"/usr/bin/*.bat } libs() { pkgdesc="Mercury shared library" default_libs amove usr/lib/mercury/lib/*/*.so amove usr/lib/mercury/lib/*.so } sha512sums=" 5d62b3e8e4e35233949e85cacb7e72efa4735be18850e682740509e7587fb3dee77421d8e9d1274556670d3cab71232b3a7402a86c0ceb4ced678b6990caf89d mercury-srcdist-22.01.5.tar.gz 57af805aa1a4bb7e7b471ffd5c2311138385ec76107568a0f7846e50922a8aca7604889be1f181b86fb5b04f68225bb588184746962757a1d3b59133d9280b0a 0001-disable-gcc-label-support-on-arm.patch e8c546928d4872d386a754e9d5289939577b32ed16a9f2e0b3cce5b36cd3aeee113265d2435188ab9bbc7f57bd355ea7dc9837be935b877488d44f5e67783332 0002-always-build-shared-libs.patch "