diff options
Diffstat (limited to 'testing/ocaml-sedlex/APKBUILD')
-rw-r--r-- | testing/ocaml-sedlex/APKBUILD | 92 |
1 files changed, 54 insertions, 38 deletions
diff --git a/testing/ocaml-sedlex/APKBUILD b/testing/ocaml-sedlex/APKBUILD index cea3e7eb6b2..04d60305023 100644 --- a/testing/ocaml-sedlex/APKBUILD +++ b/testing/ocaml-sedlex/APKBUILD @@ -1,63 +1,79 @@ # Contributor: Jakub Jirutka <jakub@jirutka.cz> -# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Celeste <cielesti@protonmail.com> pkgname=ocaml-sedlex _pkgname=sedlex -pkgver=1.99.4 +pkgver=3.2 pkgrel=0 pkgdesc="An OCaml lexer generator for Unicode" -url="https://github.com/alainfrisch/sedlex" -arch="all !x86 !armhf !armv7 !s390x" # limited by ocaml aport +url="https://github.com/ocaml-community/sedlex" +arch="all !riscv64 !loongarch64" # ocaml license="MIT" -depends="ocaml-gen - ocaml-migrate-parsetree - ocaml-ppx_tools_versioned - ocaml-runtime - " -makedepends=" - ocaml - ocaml-compiler-libs - ocaml-findlib - ocaml-gen-dev - ocaml-migrate-parsetree-dev - ocaml-ppx_tools_versioned-dev - " +depends_dev="$pkgname=$pkgver-r$pkgrel ocaml-gen-dev ocaml-ppxlib-dev" +makedepends="$depends_dev dune ocaml" +checkdepends="cmd:curl" +options="!check" subpackages="$pkgname-dev" -source="https://github.com/alainfrisch/sedlex/archive/v$pkgver/$_pkgname-$pkgver.tar.gz - dont-build-doc.patch - " +source="$_pkgname-$pkgver.tar.gz::https://github.com/ocaml-community/sedlex/archive/v$pkgver.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" +_ocamldir=usr/lib/ocaml + +# 32-bit archs +case "$CARCH" in + arm*|x86) options="$options textrels" ;; +esac build() { - cd "$builddir" - make all opt + dune build --release --verbose } check() { - cd "$builddir"/examples - make test + dune runtest --verbose } package() { - cd "$builddir" - - export DESTDIR="$pkgdir" - export OCAMLFIND_DESTDIR="$pkgdir/usr/lib/ocaml" - - mkdir -p "$OCAMLFIND_DESTDIR" - make install + dune install \ + --destdir="$pkgdir" \ + --docdir=/.omit + rm -Rf "$pkgdir"/.omit } dev() { default_dev - depends="$pkgname=$pkgver-r$pkgrel" - local sitelib="usr/lib/ocaml/$_pkgname" + 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" +} - mkdir -p "$subpkgdir"/$sitelib +scan_python3_dependency() { + local controldir="$2" datadir="$3" - cd "$pkgdir"/$sitelib - mv *.cmx *.cmxa "$subpkgdir"/$sitelib/ + ocaml4-abuild-find requires \ + "$datadir"/usr/lib/ocaml \ + "$controldir" } -sha512sums="83bddb03e25b015bc71fb59e3b0e0e097e899c681c8033663c17936f28fde8599a82eaab9c26eafd645c401c106e65fcf173d9fb889eb8999eb1b064ff8b6149 sedlex-1.99.4.tar.gz -c74c51dc02596e9fbdcb18ab3aa1e0ea1bbd2361d445c74e4dea4fceb0310435bda00772272bbded338d2afb35adb819753ddd87c3b4ada28b7c77ea7414f5a5 dont-build-doc.patch" +sha512sums=" +00e257d1b97e99d49028d2e38b20a05c6aa151c362991c37c17522bf58c19e273b762ea39dd9783ed9ecc60d11dadeabb0487e16b4af91536e45e7e18c86cfe9 sedlex-3.2.tar.gz +" |