aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-mew_vi/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-mew_vi/APKBUILD')
-rw-r--r--testing/ocaml-mew_vi/APKBUILD78
1 files changed, 78 insertions, 0 deletions
diff --git a/testing/ocaml-mew_vi/APKBUILD b/testing/ocaml-mew_vi/APKBUILD
new file mode 100644
index 00000000000..acb72641993
--- /dev/null
+++ b/testing/ocaml-mew_vi/APKBUILD
@@ -0,0 +1,78 @@
+# Contributor: rubicon <rubicon@mailo.com>
+# Maintainer: Celeste <cielesti@protonmail.com>
+pkgname=ocaml-mew_vi
+_pkgname=mew_vi
+pkgver=0.5.0
+pkgrel=3
+pkgdesc="Modal editing witch (VI interpreter)"
+url="https://github.com/kandu/mew_vi"
+arch="all !riscv64 !loongarch64" # ocaml
+license="MIT"
+depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-mew-dev ocaml-react-dev"
+makedepends="$depends_dev dune ocaml"
+options="!check" # needs ppx_expect
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/kandu/mew_vi/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="
+f6ee1375ceee60ccae1799d07a8bc55684fdbffc2275147ef19cf3c7d242663764e6630b9423287a78efacba17f410971e3fc397d202effb331f94dc00797eb0 ocaml-mew_vi-0.5.0.tar.gz
+"