aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-uuseg/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-uuseg/APKBUILD')
-rw-r--r--testing/ocaml-uuseg/APKBUILD93
1 files changed, 93 insertions, 0 deletions
diff --git a/testing/ocaml-uuseg/APKBUILD b/testing/ocaml-uuseg/APKBUILD
new file mode 100644
index 00000000000..e2935f71294
--- /dev/null
+++ b/testing/ocaml-uuseg/APKBUILD
@@ -0,0 +1,93 @@
+# Contributor: rubicon <rubicon@mailo.com>
+# Maintainer: Celeste <cielesti@protonmail.com>
+pkgname=ocaml-uuseg
+_pkgname=uuseg
+pkgver=14.0.0
+pkgrel=2
+pkgdesc="Unicode text segmentation for OCaml"
+url="https://erratique.ch/software/uuseg"
+arch="all !riscv64 !loongarch64" # ocaml
+license="ISC"
+depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-uucp-dev ocaml-uutf-dev"
+makedepends="
+ $depends_dev
+ ocaml
+ ocamlbuild
+ ocaml-compiler-libs
+ ocaml-cmdliner-dev
+ ocaml-findlib
+ ocaml-topkg
+ cmd:opam-installer
+ "
+options="!check" # no tests provided
+subpackages="$pkgname-dev $pkgname-tools"
+source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/uuseg/releases/uuseg-$pkgver.tbz"
+builddir="$srcdir/$_pkgname-$pkgver"
+_ocamldir=usr/lib/ocaml
+
+# 32-bit archs
+case "$CARCH" in
+ arm*|x86) options="$options textrels" ;;
+esac
+
+build() {
+ ocaml pkg/pkg.ml build \
+ --with-uutf true \
+ --with-cmdliner true
+}
+
+package() {
+ opam-installer -i \
+ --prefix="$pkgdir"/usr \
+ --libdir="$pkgdir/$_ocamldir" \
+ --docdir="$builddir"/.omit \
+ $_pkgname.install
+}
+
+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
+}
+
+tools() {
+ pkgdesc="$pkgdesc (command line utilities)"
+ depends=""
+
+ amove usr/bin
+}
+
+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="
+3f089baf95f010663a0c2f060b2911395d9b396f478efb10fd979815f527c9e61e0a70b3192f2e921f59287bfde0da6e25109d4a1825554e2e4a50c0535e97aa ocaml-uuseg-14.0.0.tar.bz2
+"