diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-07 18:36:44 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-07 18:41:29 +0200 |
commit | 0e23be4ba03773bea2a0cb6e97e12bd0d7d7441e (patch) | |
tree | 8cf5f7543a99373314341d478ad13df4299e2cdf /testing/ocaml-lwt | |
parent | 30b8ce58306e9e1c384a77477e9ee4bcf21ff7e6 (diff) | |
download | aports-0e23be4ba03773bea2a0cb6e97e12bd0d7d7441e.tar.bz2 aports-0e23be4ba03773bea2a0cb6e97e12bd0d7d7441e.tar.xz |
testing/ocaml-lwt: upgrade to 4.1.0
Diffstat (limited to 'testing/ocaml-lwt')
-rw-r--r-- | testing/ocaml-lwt/APKBUILD | 94 |
1 files changed, 57 insertions, 37 deletions
diff --git a/testing/ocaml-lwt/APKBUILD b/testing/ocaml-lwt/APKBUILD index c23100bc7d..e03f7384be 100644 --- a/testing/ocaml-lwt/APKBUILD +++ b/testing/ocaml-lwt/APKBUILD @@ -2,17 +2,13 @@ # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=ocaml-lwt _pkgname=lwt -pkgver=3.3.0 -pkgrel=1 +pkgver=4.1.0 +pkgrel=0 pkgdesc="OCaml promises and concurrent I/O" url="https://github.com/ocsigen/lwt" arch="all !x86 !armhf !s390x" # limited by ocaml aport license="LGPL-2.1-or-later-WITH-linking-exception BSD-3-Clause" -depends="ocaml-runtime - ocaml-migrate-parsetree - ocaml-ppx_tools_versioned - ocaml-result - " +depends="ocaml-runtime ocaml-result" depends_dev="libev-dev" makedepends="$depends_dev dune @@ -26,7 +22,8 @@ makedepends="$depends_dev ocaml-result-dev opam " -subpackages="$pkgname-dev $pkgname-doc ${pkgname}_react:_react" +options="!check" # FIXME: tests hang +subpackages="$pkgname-dev ${pkgname}_ppx:_ppx ${pkgname}_react:_react" source="$pkgname-$pkgver.tar.gz::https://github.com/ocsigen/$_pkgname/archive/$pkgver.tar.gz result_lseek_noinline.patch" builddir="$srcdir/$_pkgname-$pkgver" @@ -35,57 +32,80 @@ build() { cd "$builddir" ocaml src/util/configure.ml \ - -use-libev true \ - -use-camlp4 false + -use-libev true - jbuilder build -p lwt,lwt_react @install + jbuilder build @install } check() { cd "$builddir" - jbuilder runtest -p lwt,lwt_react + jbuilder runtest } package() { + local libdir="$pkgdir/usr/lib/ocaml" cd "$builddir" - ocaml src/util/install_filter.ml + mkdir -p "$libdir" + jbuilder install \ + --destdir="$pkgdir"/usr \ + --libdir="$libdir" + + find "$libdir" -name '*.cmxs' -exec chmod 0755 {} \; + + # There's just a readme and changelog. + rm -Rf "$pkgdir"/usr/doc - local name; for name in lwt lwt_react; do - opam-installer -i \ - --prefix="$pkgdir/usr" \ - --libdir="$pkgdir/$(ocamlc -where)" \ - --docdir="$pkgdir/usr/share/doc/$pkgname" \ - --mandir="$pkgdir/usr/share/man" \ - $name.install + # Remove annotation files and sources. + find "$libdir"/$_pkgname* \( \ + -name '*.cmt' -o \ + -name '*.cmti' -o \ + -name '*.ml' \) -delete +} + +dev() { + default_dev + depends="$depends_dev + $pkgname=$pkgver-r$pkgrel + ${pkgname}_ppx=$pkgver-r$pkgrel + ${pkgname}_react=$pkgver-r$pkgrel" + provides="${pkgname}_ppx-dev ${pkgname}_react-dev" + + cd "$pkgdir" + + local path; for path in $(find usr/lib/ocaml/$_pkgname*/ \ + -name '*.cmx' \ + -o -name '*.cmxa' \ + -o -name '*.mli') + do + mkdir -p "${path%/*}" + mv "$path" "$subpkgdir"/${path%/*}/ done +} - # Remove annotation files. - rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname*/*.cmt* +_ppx() { + pkgdesc="$pkgdesc (PPX syntax)" + depends="$pkgname=$pkgver-r$pkgrel + ocaml-runtime + ocaml-migrate-parsetree + ocaml-ppx_tools_versioned" - # Remove sources (all have corresponding .mli file). - rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname*/*.ml + _submv usr/lib/ocaml/lwt_ppx } _react() { pkgdesc="$pkgdesc (for FRP)" - depends="$pkgname=$pkgver-r$pkgrel ocaml-react" + depends="$pkgname=$pkgver-r$pkgrel ocaml-runtime ocaml-react" - mkdir -p "$subpkgdir"/usr/lib/ocaml - mv "$pkgdir"/usr/lib/ocaml/${_pkgname}_react "$subpkgdir"/usr/lib/ocaml/ + _submv usr/lib/ocaml/lwt_react } -dev() { - default_dev - depends="$depends $pkgname=$pkgver-r$pkgrel ${pkgname}_react=$pkgver-r$pkgrel" - local sitelib="usr/lib/ocaml/$_pkgname" - - cd "$pkgdir"/$sitelib - - mkdir -p "$subpkgdir"/$sitelib - mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/ +_submv() { + local path="$1" + mkdir -p "$subpkgdir"/${path%/*} + mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/ } -sha512sums="452425c8c0cddd53463da658b1bb8edb0c5ead2e0de0f733dbf624d373fec94c3121e77cc285427770388e16106fae84c32805b6642d1797200660fed91d0f29 ocaml-lwt-3.3.0.tar.gz +sha512sums="28bc51e75d5e4c74171f17aaba86fdefad70f57f9f2023680044d5bf65250d8531501adc85d0422e644c1e318dcee0a4d53f7841c82d9dca9854e8fbb09987f2 ocaml-lwt-4.1.0.tar.gz dc3abce70b3ad022066e8023a9b37346df0ecbbc6351186cc24b569189142ad3e7e32f27c33a4378f11ec8c40df5c96f4c37190ca4797bc228ca8943f53cf5bf result_lseek_noinline.patch" |