aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-erm_xml/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/ocaml-erm_xml/APKBUILD')
-rw-r--r--testing/ocaml-erm_xml/APKBUILD85
1 files changed, 85 insertions, 0 deletions
diff --git a/testing/ocaml-erm_xml/APKBUILD b/testing/ocaml-erm_xml/APKBUILD
new file mode 100644
index 00000000000..547f3f71e78
--- /dev/null
+++ b/testing/ocaml-erm_xml/APKBUILD
@@ -0,0 +1,85 @@
+# Contributor: rubicon <rubicon@mailo.com>
+# Maintainer: Celeste <cielesti@protonmail.com>
+pkgname=ocaml-erm_xml
+_pkgname=xml
+pkgver=0_git20211229
+_commit=a2b4db61ca93dc265ca47b51d01fa147d3b267c3
+pkgrel=2
+pkgdesc="XML stream parser for OCaml"
+url="https://github.com/hannesm/xml"
+arch="all !riscv64 !loongarch64" # ocaml
+license="BSD-3-Clause"
+depends_dev="$pkgname=$pkgver-r$pkgrel"
+makedepends="
+ ocaml
+ ocamlbuild
+ ocaml-findlib
+ ocaml-compiler-libs
+ "
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/hannesm/xml/archive/$_commit/xml-$_commit.tar.gz"
+builddir="$srcdir/$_pkgname-$_commit"
+_ocamldir=usr/lib/ocaml
+
+# 32-bit archs
+case "$CARCH" in
+ arm*|x86) options="$options textrels" ;;
+esac
+
+build() {
+ ocaml setup.ml -configure --prefix /usr
+ ocaml setup.ml -build
+}
+
+check() {
+ ocaml setup.ml -test
+}
+
+package() {
+ export OCAMLFIND_DESTDIR="$pkgdir/$_ocamldir"
+ export OCAMLFIND_LDCONF=ignore
+ mkdir -vp "$OCAMLFIND_DESTDIR"
+
+ ocaml setup.ml -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
+}
+
+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="
+ddb674fbd4e27aece25d4b288163ee7550591f8d23c7219dd212355cab9feedba847ae9990ac1219c834ec9620fcc5c4805013f99f1d5312a36c4a0c1d3f0536 ocaml-erm_xml-0_git20211229.tar.gz
+"