From 5508e8f05b7eab9e15d4fc9eb6fda4bbe0af265a Mon Sep 17 00:00:00 2001 From: rubicon <5662-rubicon@users.gitlab.alpinelinux.org> Date: Sun, 15 May 2022 19:04:34 +0800 Subject: [PATCH] testing/ocaml-logs: new aport needed by ocaml-alcotest-lwt --- testing/ocaml-logs/APKBUILD | 73 +++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 testing/ocaml-logs/APKBUILD diff --git a/testing/ocaml-logs/APKBUILD b/testing/ocaml-logs/APKBUILD new file mode 100644 index 000000000000..564f42a3cd44 --- /dev/null +++ b/testing/ocaml-logs/APKBUILD @@ -0,0 +1,73 @@ +# Contributor: rubicon <rubicon@mailo.com> +# Maintainer: +pkgname=ocaml-logs +_pkgname=logs +pkgver=0.7.0 +pkgrel=0 +pkgdesc="Logging infrastructure for OCaml" +url="https://erratique.ch/software/logs" +arch="all !riscv64" # restricted by ocaml +license="ISC" +depends="ocaml-runtime" +depends_dev="$pkgname=$pkgver-r$pkgrel" +makedepends=" + ocaml + ocamlbuild + ocaml-compiler-libs + ocaml-findlib + ocaml-topkg + ocaml-fmt-dev + ocaml-cmdliner-dev + ocaml-lwt-dev + ocaml-seq-dev + cmd:opam-installer + " +options="!check" # require mtime +subpackages="$pkgname-dev" +source="$pkgname-$pkgver.tar.bz2::https://erratique.ch/software/logs/releases/logs-$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-fmt true \ + --with-cmdliner true \ + --with-lwt true \ + --with-base-threads true \ + --with-js_of_ocaml false +} + +package() { + opam-installer -i \ + --prefix="$pkgdir/usr" \ + --libdir="$pkgdir/$_ocamldir" \ + --docdir="$builddir/.omit" \ + $_pkgname.install +} + +dev() { + default_dev + + cd "$pkgdir" + + local path; for path in $(find $_ocamldir \( \ + -name '*.cmt' -o \ + -name '*.cmti' -o \ + -name '*.cmx' -o \ + -name '*.cmxa' -o \ + -name '*.ml' -o \ + -name '*.mli' \ + \)) + do + amove "$path" + done +} + +sha512sums=" +657f66eeaf5788947a3ff4b2a179f7e192ad4ce086fc8968286066d4b83af476523b3befce50ee58abf2d9b8c8dc65573ba8ed62f9c5e7933db29a7fb769646a ocaml-logs-0.7.0.tar.bz2 +" -- GitLab