aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-bigstringaf/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-bigstringaf/APKBUILD')
-rw-r--r--testing/ocaml-bigstringaf/APKBUILD79
1 files changed, 79 insertions, 0 deletions
diff --git a/testing/ocaml-bigstringaf/APKBUILD b/testing/ocaml-bigstringaf/APKBUILD
new file mode 100644
index 00000000000..3f67f25a426
--- /dev/null
+++ b/testing/ocaml-bigstringaf/APKBUILD
@@ -0,0 +1,79 @@
+# Contributor: rubicon <rubicon@mailo.com>
+# Maintainer: Celeste <cielesti@protonmail.com>
+pkgname=ocaml-bigstringaf
+_pkgname=bigstringaf
+pkgver=0.9.0
+pkgrel=2
+pkgdesc="Bigstring intrinsics and fast blits based on memcpy/memmove"
+url="https://github.com/inhabitedtype/bigstringaf"
+arch="all !riscv64 !loongarch64" # ocaml
+license="BSD-3-Clause"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="dune ocaml"
+checkdepends="ocaml-alcotest-dev"
+options="!check"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/inhabitedtype/bigstringaf/archive/$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+_ocamldir=usr/lib/ocaml
+
+# 32-bit archs
+case "$CARCH" in
+ arm*|x86) options="$options textrels" ;;
+esac
+
+build() {
+ dune build --release --verbose
+}
+
+check() {
+ dune runtest --verbose
+}
+
+package() {
+ dune install \
+ --destdir="$pkgdir" \
+ --docdir=/.omit
+ rm -Rf "$pkgdir"/.omit
+}
+
+dev() {
+ default_dev
+
+ cd "$pkgdir"
+
+ local path; find $_ocamldir \( \
+ -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="
+c5148d967beef15bba21a706009cb8443fe6afd76b949d6a6bcf4fc6c6d410bd0ca4c86b4ef6897cad73c51449e5387ee0173347b8d43c49f1a62024a8aa4db5 ocaml-bigstringaf-0.9.0.tar.gz
+"