aports/testing/ocaml-qcheck/APKBUILD
Celeste b5e51e2da2 testing/ocaml-*: take over maintainership
Email for maintainer of ocaml-num (alpine-mips-patches) bounced.

Permission has been obtained from the other 2 maintainers involved.
2025-01-18 13:58:50 +00:00

85 lines
1.9 KiB
Text

# Contributor: Andy Li <andy@onthewings.net>
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=ocaml-qcheck
_pkgname=qcheck
pkgver=0.18.1
pkgrel=3
pkgdesc="QuickCheck inspired property-based testing for OCaml"
url="https://github.com/c-cube/qcheck"
arch="all !riscv64 !loongarch64" # ocaml
license="BSD-2-Clause"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="dune ocaml ocaml-findlib ocaml-ounit-dev ocaml-seq-dev ocaml-stdlib-shims"
options="!check" # requires alcotest
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/c-cube/qcheck/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
# 32-bit archs
case "$CARCH" in
arm*|x86) options="$options textrels" ;;
esac
build() {
export OCAMLPATH=/usr/lib/ocaml
dune build @install \
-p qcheck,qcheck-core,qcheck-ounit \
--no-buffer --verbose
}
check() {
dune runtest --no-buffer
}
package() {
dune install \
--destdir="$pkgdir" \
--prefix=/usr \
--libdir=/usr/lib/ocaml \
qcheck qcheck-core qcheck-ounit
# There's just a readme and changelog.
rm -Rf "$pkgdir"/usr/doc
}
dev() {
default_dev
cd "$pkgdir"
local path; find usr/lib/ocaml \( \
-name '*.cmt' -o \
-name '*.cmti' -o \
-name '*.ml' -o \
-name '*.mli' \
\) | while read -r path
do
amove "$path"
done
}
prepare_py_provides() {
local datadir="${subpkgdir:-$pkgdir}"
local pkgbasedir=${pkgbasedir:-"$startdir/pkg"}
local controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname}
options_has "!tracedeps" && return 0
ocaml4-abuild-find provides \
"$datadir"/usr/lib/ocaml \
"$controldir" \
"$pkgver-r$pkgrel"
}
scan_python3_dependency() {
local controldir="$2" datadir="$3"
ocaml4-abuild-find requires \
"$datadir"/usr/lib/ocaml \
"$controldir"
}
sha512sums="
6fd5fd4348ed6a48a8f64a466fedd07374eaf23d516b3c250ebad2a32ddbca3ae4ad9c84fe1112858075df46c119cd6550205a4228a553b014d135581f024ded ocaml-qcheck-0.18.1.tar.gz
"