aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-ptmap/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-ptmap/APKBUILD')
-rw-r--r--testing/ocaml-ptmap/APKBUILD86
1 files changed, 64 insertions, 22 deletions
diff --git a/testing/ocaml-ptmap/APKBUILD b/testing/ocaml-ptmap/APKBUILD
index 8907cb4d1de..f99d3ec1cc3 100644
--- a/testing/ocaml-ptmap/APKBUILD
+++ b/testing/ocaml-ptmap/APKBUILD
@@ -2,43 +2,85 @@
# Maintainer: Andy Li <andy@onthewings.net>
pkgname=ocaml-ptmap
_pkgname=ptmap
-pkgver=2.0.4
-pkgrel=0
+pkgver=2.0.5
+pkgrel=3
pkgdesc="Maps over integers implemented as Patricia trees"
url="https://github.com/backtracking/ptmap"
-arch="all !x86 !armhf !armv7 !s390x !mips !mips64 !riscv64" # limited by ocaml aport
-license="LGPL-2.1-or-later WITH OCaml-linking-exception"
-depends="ocaml-runtime"
+arch="all !riscv64 !loongarch64" # ocaml
+license="LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception"
depends_dev="$pkgname=$pkgver-r$pkgrel"
-makedepends="ocaml ocaml-findlib ocaml-obuild ocaml-qtest ocaml-qcheck-dev ocaml-ounit-dev"
+makedepends="
+ dune
+ ocaml
+ ocaml-findlib
+ ocaml-stdlib-shims
+ ocaml-seq-dev
+ "
subpackages="$pkgname-dev"
-options="!check" # no tests provided
-source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/backtracking/ptmap/archive/$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
+# 32-bit archs
+case "$CARCH" in
+ arm*|x86) options="$options textrels" ;;
+esac
+
build() {
- obuild configure
- obuild build
- obuild build lib-ptmap
+ export OCAMLPATH=/usr/lib/ocaml
+ make all
+}
+
+check() {
+ make test
}
package() {
- obuild install --destdir "$pkgdir/usr/lib/ocaml"
+ dune install \
+ --destdir="$pkgdir" \
+ --prefix=/usr \
+ --libdir=/usr/lib/ocaml
- # Remove annotation files and sources.
- rm \
- "$pkgdir"/usr/lib/ocaml/ptmap/*.cmt \
- "$pkgdir"/usr/lib/ocaml/ptmap/*.cmti
+ # There's just a readme and changelog.
+ rm -Rf "$pkgdir"/usr/doc
}
dev() {
default_dev
- mkdir -p "$subpkgdir"/usr/lib/ocaml/ptmap
- mv \
- "$pkgdir"/usr/lib/ocaml/ptmap/*.cmx \
- "$pkgdir"/usr/lib/ocaml/ptmap/*.cmxa \
- "$subpkgdir"/usr/lib/ocaml/ptmap/
+ 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="3f11664f926244a212e2d782d338982826e608463eec22e91cd77350836cbab9d4aed7542fa9c5f3c1df572552a3797a149618ad370d1b47b4e03cf497100356 ocaml-ptmap-2.0.4.tar.gz"
+sha512sums="
+6815ee977cb9a4c5088af8dfb7d8055c8d35870ceb4e95f658fbdc50405495bea75a8755442dc6f7345d2e9021c3b96d14883603759baf267feced9cd5ba5202 ocaml-ptmap-2.0.5.tar.gz
+"