diff options
Diffstat (limited to 'testing/ocaml-merlin-extend/APKBUILD')
-rw-r--r-- | testing/ocaml-merlin-extend/APKBUILD | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/testing/ocaml-merlin-extend/APKBUILD b/testing/ocaml-merlin-extend/APKBUILD new file mode 100644 index 00000000000..59144b2cda5 --- /dev/null +++ b/testing/ocaml-merlin-extend/APKBUILD @@ -0,0 +1,86 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Celeste <cielesti@protonmail.com> +pkgname=ocaml-merlin-extend +_pkgname=merlin-extend +pkgver=0.6.1 +pkgrel=2 +pkgdesc="SDK to extend Merlin" +url="https://github.com/let-def/merlin-extend" +arch="all !riscv64" # limited by ocaml aport +license="MIT" +depends_dev="$pkgname=$pkgver-r$pkgrel" +makedepends=" + dune + ocaml + ocaml-compiler-libs + ocaml-cppo + ocaml-findlib + " +options="!check" # no tests provided +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.bz2::https://github.com/let-def/merlin-extend/releases/download/v$pkgver/merlin-extend-$pkgver.tbz" +builddir="$srcdir/$_pkgname-$pkgver" + +# 32-bit archs +case "$CARCH" in + arm*|x86) options="$options textrels" ;; +esac + +build() { + export OCAMLPATH=/usr/lib/ocaml + dune build --root . @install --no-buffer --verbose +} + +check() { + dune runtest --no-buffer --verbose +} + +package() { + dune install \ + --destdir="$pkgdir" \ + --prefix=/usr \ + --libdir=/usr/lib/ocaml + + rm -Rf "$pkgdir"/usr/doc +} + +dev() { + default_dev + + 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=" +631fc96aab2f35e12a078c9b4907ca7b0db9f1e3a4026040e6c23b82e0171c256a89fb5d4c887f1d156eb9e3152783cdf7a546b2496051007a1bcf5777417396 ocaml-merlin-extend-0.6.1.tar.bz2 +" |