aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-integers/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-integers/APKBUILD')
-rw-r--r--testing/ocaml-integers/APKBUILD77
1 files changed, 77 insertions, 0 deletions
diff --git a/testing/ocaml-integers/APKBUILD b/testing/ocaml-integers/APKBUILD
new file mode 100644
index 00000000000..53b4709dab8
--- /dev/null
+++ b/testing/ocaml-integers/APKBUILD
@@ -0,0 +1,77 @@
+# Contributor: rubicon <rubicon@mailo.com>
+# Maintainer: Celeste <cielesti@protonmail.com>
+pkgname=ocaml-integers
+pkgver=0.7.0
+pkgrel=2
+pkgdesc="Various signed and unsigned integer types for OCaml"
+url="https://github.com/ocamllabs/ocaml-integers"
+arch="all !riscv64 !loongarch64" # ocaml
+license="MIT"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="dune ocaml ocaml-compiler-libs ocaml-stdlib-shims"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ocamllabs/ocaml-integers/archive/$pkgver.tar.gz"
+
+# 32-bit archs
+case "$CARCH" in
+ arm*|x86) options="$options textrels" ;;
+esac
+
+build() {
+ export OCAMLPATH=/usr/lib/ocaml
+ dune build --root . @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; 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="
+f71bf73af2e4e0dd5bd039b28bce1fdabfb199ada1836d694814aa6d0c1c2d205531fbfc05581082b2dbb1e9cc0948e594915d5ad6a1cfa1dbffa9e44a7a7450 ocaml-integers-0.7.0.tar.gz
+"