diff options
Diffstat (limited to 'testing/ocaml-qtest/APKBUILD')
-rw-r--r-- | testing/ocaml-qtest/APKBUILD | 72 |
1 files changed, 48 insertions, 24 deletions
diff --git a/testing/ocaml-qtest/APKBUILD b/testing/ocaml-qtest/APKBUILD index dde91a61609..788f4022353 100644 --- a/testing/ocaml-qtest/APKBUILD +++ b/testing/ocaml-qtest/APKBUILD @@ -2,21 +2,26 @@ # Maintainer: Andy Li <andy@onthewings.net> pkgname=ocaml-qtest _pkgname=qtest -pkgver=2.10.1 -pkgrel=0 +pkgver=2.11.2 +pkgrel=3 pkgdesc="Lightweight inline test extraction from comments" url="https://github.com/vincent-hugot/qtest" -arch="all !x86 !armhf !armv7 !s390x !mips !mips64" # limited by ocaml aport +arch="all !riscv64 !loongarch64" # ocaml license="GPL-3.0-or-later" -depends="ocaml-runtime ocaml-qcheck" depends_dev="$pkgname=$pkgver-r$pkgrel" makedepends="dune ocaml ocaml-findlib ocaml-qcheck-dev ocaml-ounit-dev" subpackages="$pkgname-dev" -source="$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/vincent-hugot/qtest/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" +# 32-bit archs +case "$CARCH" in + arm*|x86) options="$options textrels" ;; +esac + build() { - dune build @install -p qtest -j1 --no-buffer --verbose + export OCAMLPATH=/usr/lib/ocaml + dune build @install --no-buffer --verbose } check() { @@ -24,19 +29,13 @@ check() { } package() { - mkdir -p "$pkgdir"/usr/lib/ocaml - dune install --destdir="$pkgdir" + dune install \ + --destdir="$pkgdir" \ + --prefix=/usr \ + --libdir=/usr/lib/ocaml # There's just a README and LICENSE. rm -Rf "$pkgdir"/usr/doc - - # Remove annotation files and sources. - find "$pkgdir"/usr/lib/ocaml \ - \( \ - -name '*.cmt' \ - -o -name '*.ml' \ - \) \ - -exec rm "{}" \; } dev() { @@ -44,13 +43,38 @@ dev() { cd "$pkgdir" - find usr/lib/ocaml \ - \( \ - -name '*.cmx' \ - -o -name '*.cmxa' \ - -o -name '*.mli' \ - \) \ - -exec sh -c 'mkdir -p "$(dirname $1)" && mv "$1" "$subpkgdir/$(dirname $1)/"' _ {} \; + 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="838ff1951b8da35f0551b1db4d36a03ad803a57ba8b85816a51e6b1bc2ad7778299a7fd026a062437252b40c0de1c83b6171605b19f01e3874274b2676341bf0 ocaml-qtest-2.10.1.tar.gz" +sha512sums=" +3edb8471b29c9eb2f6ba11b157abf7ca43ef965d4b1500aaaf1acaeb261972a61c9b104887ada6ca63dc85e06b1d27e34f391885b2fbeb7ea5646323d3be08d0 ocaml-qtest-2.11.2.tar.gz +" |