2023-04-01 16:39:15 +02:00

64 lines
1.4 KiB
Plaintext

# Contributor: rubicon <rubicon@mailo.com>
# Maintainer:
pkgname=ocaml-fix
_pkgname=fix
pkgver=20220121
_commit=a288f05de716bcc9e82527f4cf440f9aebe965ae
pkgrel=1
pkgdesc="Algorithmic building blocks for memoization, recursion, and more"
url="https://gitlab.inria.fr/fpottier/fix"
arch="all !riscv64" # restricted by ocaml
license="LGPL-2.0-only"
depends="ocaml-runtime"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="dune ocaml"
options="!check" # tests take a long time to run
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://gitlab.inria.fr/fpottier/fix/-/archive/$pkgver/archive.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver-$_commit"
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
export OCAMLPATH=/usr/lib/ocaml
dune build -p fix @install --no-buffer --verbose
}
check() {
dune runtest --no-buffer --verbose
}
package() {
dune install \
--destdir="$pkgdir" \
--prefix=/usr \
--libdir=/usr/lib/ocaml
rm -Rf "$pkgdir"/usr/doc
}
dev() {
default_dev
cd "$pkgdir"
local path; for path in $(find usr/lib/ocaml \( \
-name '*.cmt' -o \
-name '*.cmti' -o \
-name '*.cmx' -o \
-name '*.cmxa' -o \
-name '*.ml' -o \
-name '*.mli' \
\))
do
amove "$path"
done
}
sha512sums="
a851d8783c0c519c6e55359a5c471af433058872409c29a1a7bdfd0076813341ad2c0ebd1ce9e28bff4d4c729dfbc808c41c084fe12a42b45a2b5e391e77ccd2 ocaml-fix-20220121.tar.gz
"