diff options
Diffstat (limited to 'testing/ocaml-uucp/APKBUILD')
-rw-r--r-- | testing/ocaml-uucp/APKBUILD | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/testing/ocaml-uucp/APKBUILD b/testing/ocaml-uucp/APKBUILD new file mode 100644 index 00000000000..d3751330845 --- /dev/null +++ b/testing/ocaml-uucp/APKBUILD @@ -0,0 +1,89 @@ +# Contributor: rubicon <rubicon@mailo.com> +# Maintainer: Celeste <cielesti@protonmail.com> +pkgname=ocaml-uucp +_pkgname=uucp +pkgver=14.0.0 +pkgrel=2 +pkgdesc="Unicode character properties for OCaml" +url="https://erratique.ch/software/uucp" +arch="all !riscv64 !loongarch64" # ocaml +license="ISC" +depends_dev="$pkgname=$pkgver-r$pkgrel" +makedepends=" + ocaml + ocaml-compiler-libs + ocaml-findlib + ocamlbuild + ocaml-topkg + ocaml-uucd-dev + ocaml-uunf-dev + ocaml-uutf-dev + ocaml-cmdliner-dev + cmd:opam-installer + " +options="!check" # no tests provided +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/uucp/releases/uucp-$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-uunf 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 +} + +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=" +2d0224aed5d5accbb121624898f08598e8c74a2415942f159a54221c0cdac62ed64fc70a039c833e50110cefce77754ada9ac2d58f79a6fc9331135326fe6899 ocaml-uucp-14.0.0.tar.bz2 +" |