aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-lwt
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-06 20:26:02 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-06 21:07:47 +0100
commit4a439f6d4b917e4a7553547fb58002870e29ccf7 (patch)
tree67f402eb9c4a4acac60278c35f0497623f844153 /testing/ocaml-lwt
parent9643ab347b3df4d02e05b00659e499855c982417 (diff)
downloadaports-4a439f6d4b917e4a7553547fb58002870e29ccf7.tar.bz2
aports-4a439f6d4b917e4a7553547fb58002870e29ccf7.tar.xz
testing/ocaml-lwt: new aport
https://github.com/ocsigen/lwt OCaml promises and concurrent I/O
Diffstat (limited to 'testing/ocaml-lwt')
-rw-r--r--testing/ocaml-lwt/APKBUILD83
1 files changed, 83 insertions, 0 deletions
diff --git a/testing/ocaml-lwt/APKBUILD b/testing/ocaml-lwt/APKBUILD
new file mode 100644
index 0000000000..dc26b7fd3d
--- /dev/null
+++ b/testing/ocaml-lwt/APKBUILD
@@ -0,0 +1,83 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-lwt
+_pkgname=lwt
+pkgver=3.2.1
+pkgrel=0
+pkgdesc="OCaml promises and concurrent I/O"
+url="https://github.com/ocsigen/lwt"
+arch="all !x86 !armhf !s390x !ppc64le" # limited by ocaml and ocaml-cppo aports
+license="LGPL-2.1-or-later-WITH-linking-exception BSD-3-Clause"
+makedepends="
+ dune
+ libev-dev
+ ocaml
+ ocaml-cppo-dev
+ ocaml-findlib
+ ocaml-migrate-parsetree-dev
+ ocaml-react-dev
+ ocaml-result-dev
+ ocaml-ppx_tools_versioned-dev
+ opam
+ "
+subpackages="$pkgname-dev $pkgname-doc $pkgname-react"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ocsigen/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ ocaml src/util/configure.ml \
+ -use-libev true \
+ -use-camlp4 false
+
+ jbuilder build -p lwt,lwt_react @install
+}
+
+check() {
+ cd "$builddir"
+
+ jbuilder runtest -p lwt,lwt_react
+}
+
+package() {
+ cd "$builddir"
+
+ ocaml src/util/install_filter.ml
+
+ 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
+ done
+
+ # Remove annotation files.
+ rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname*/*.cmt*
+
+ # Remove sources (all have corresponding .mli file).
+ rm -Rf "$pkgdir"/usr/lib/ocaml/$_pkgname*/*.ml
+}
+
+react() {
+ pkgdesc="$pkgdesc (for FRP)"
+ depends="$pkgname=$pkgver-r$pkgrel"
+
+ mkdir -p "$subpkgdir"/usr/lib/ocaml
+ mv "$pkgdir"/usr/lib/ocaml/${_pkgname}_react "$subpkgdir"/usr/lib/ocaml/
+}
+
+dev() {
+ default_dev
+ depends="$pkgname=$pkgver-r$pkgrel"
+ local sitelib="usr/lib/ocaml/$_pkgname"
+
+ cd "$pkgdir"/$sitelib
+
+ mkdir -p "$subpkgdir"/$sitelib
+ mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
+}
+
+sha512sums="ddea7561c12b0c7f1ee557462766c2f04d08b9e452fac14a906c17aba643be90299a6aa0aee20dfc16031eca4f557bfc0e7f6779643eeaee2337129f77da836d ocaml-lwt-3.2.1.tar.gz"