aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-dtoa
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-07 18:56:13 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-07 18:54:35 +0200
commite91fef413761fc45151da5a05192f7c666762e62 (patch)
treea08a83142808e437b1f7d8fce003e160809f6272 /testing/ocaml-dtoa
parentf7d5a5e31ff4f606a1abd27cde00a42e81e724f4 (diff)
downloadaports-e91fef413761fc45151da5a05192f7c666762e62.tar.bz2
aports-e91fef413761fc45151da5a05192f7c666762e62.tar.xz
testing/ocaml-dtoa: new aport
https://github.com/flowtype/ocaml-dtoa double-to-ascii ocaml implementation
Diffstat (limited to 'testing/ocaml-dtoa')
-rw-r--r--testing/ocaml-dtoa/APKBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/ocaml-dtoa/APKBUILD b/testing/ocaml-dtoa/APKBUILD
new file mode 100644
index 0000000000..fe176a2dae
--- /dev/null
+++ b/testing/ocaml-dtoa/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-dtoa
+_pkgname=dtoa
+pkgver=0.3.1
+pkgrel=0
+pkgdesc="double-to-ascii ocaml implementation"
+url="https://github.com/flowtype/ocaml-dtoa"
+arch="all !x86 !armhf !s390x" # limited by ocaml aport
+license="MIT"
+depends="ocaml-runtime"
+checkdepends="ocaml-ounit-dev"
+makedepends="dune ocaml ocaml-findlib opam"
+subpackages="$pkgname-dev"
+source="https://github.com/flowtype/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ jbuilder build @install
+}
+
+check() {
+ cd "$builddir"
+ jbuilder runtest
+}
+
+package() {
+ cd "$builddir"
+
+ mkdir -p "$pkgdir"/usr/lib/ocaml
+ jbuilder install \
+ --destdir="$pkgdir"/usr \
+ --libdir="$pkgdir"/usr/lib/ocaml
+
+ # There's just a readme and changelog.
+ rm -Rf "$pkgdir"/usr/doc
+
+ # Remove annotation files and sources.
+ cd "$pkgdir"/usr/lib/ocaml/$_pkgname
+ rm -f *.cmt* *.ml
+}
+
+dev() {
+ default_dev
+
+ depends="$pkgname=$pkgver-r$pkgrel"
+ local sitelib="usr/lib/ocaml/$_pkgname"
+
+ mkdir -p "$subpkgdir"/$sitelib
+
+ cd "$pkgdir"/$sitelib
+ mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/
+}
+
+sha512sums="25eb4f867759a37b42352ca43d5afeecf9baf9b2d9aa8c763dbae3e89581e960bd93ac02e497ac2053d56c1f851d5a8566a65652f9fd9fc6d2c66c525bd60fd2 ocaml-dtoa-0.3.1.tar.gz"