aboutsummaryrefslogtreecommitdiffstats
path: root/testing/flow
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-07-07 21:49:16 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-07-07 21:46:59 +0200
commit59eeb44d5d0fb28d87b85e0c7e54c9868819c111 (patch)
tree53698ca945ed9f2c4197bc3f7c3bdcb18a7a4a73 /testing/flow
parentb32f93271626ebd7c98407057024935c166cb614 (diff)
downloadaports-59eeb44d5d0fb28d87b85e0c7e54c9868819c111.tar.bz2
aports-59eeb44d5d0fb28d87b85e0c7e54c9868819c111.tar.xz
testing/flow: new aport
https://flow.org/ A static typechecker for JavaScript
Diffstat (limited to 'testing/flow')
-rw-r--r--testing/flow/APKBUILD81
-rw-r--r--testing/flow/makefile-tag-thread.patch15
2 files changed, 96 insertions, 0 deletions
diff --git a/testing/flow/APKBUILD b/testing/flow/APKBUILD
new file mode 100644
index 0000000000..9407c56da8
--- /dev/null
+++ b/testing/flow/APKBUILD
@@ -0,0 +1,81 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=flow
+pkgver=0.76.0
+pkgrel=0
+pkgdesc="A static typechecker for JavaScript"
+url="https://flow.org"
+arch="all !x86 !armhf !s390x" # limited by ocaml aport
+license="MIT"
+checkdepends="bash diffutils js_of_ocaml nodejs yarn"
+makedepends="
+ linux-headers
+ ocaml
+ ocaml-compiler-libs
+ ocaml-dtoa-dev
+ ocaml-findlib
+ ocaml-gen-dev
+ ocaml-lwt-dev
+ ocaml-lwt_log-dev
+ ocaml-lwt_ppx-dev
+ ocaml-result-dev
+ ocaml-sedlex-dev
+ ocaml-wtf8-dev
+ ocamlbuild
+ opam
+ zip
+ "
+subpackages="libflowparser-dev:_parser"
+source="https://github.com/facebook/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz
+ makefile-tag-thread.patch
+ "
+builddir="$srcdir/$pkgname-$pkgver"
+
+prepare() {
+ default_prepare
+ cd "$builddir"
+
+ msg "Installing JS packages needed for running tests..."
+ yarn install \
+ --ignore-scripts \
+ --frozen-lockfile \
+ --non-interactive \
+ --cache-folder "$srcdir"/.yarn
+}
+
+build() {
+ cd "$builddir"
+
+ rm -Rf _build
+
+ make FLOW_RELEASE=1
+ mkdir dist
+ cp -a bin dist/
+
+ make -C src/parser js
+ make -C src/parser dist/libflowparser.zip
+ cp -ar src/parser/dist/libflowparser dist/
+}
+
+check() {
+ cd "$builddir"
+ make do-test FLOW_RELEASE=1
+}
+
+package() {
+ cd "$builddir"
+
+ install -m 755 -D dist/bin/flow "$pkgdir"/usr/bin/flow
+}
+
+_parser() {
+ pkgdesc="The Flow Parser"
+
+ cd "$builddir"
+
+ mkdir -p "$subpkgdir"/usr
+ cp -r dist/libflowparser/* "$subpkgdir"/usr/
+}
+
+sha512sums="cde120c8176420087ef9a1c708dd3abc42aefbd3be2580166512b00f120ccb73d30966dcddccf627909bc93215651201a54a2522bc22e87a95b78444203a43b7 flow-0.76.0.tar.gz
+d300dec1b7925fbba691701e10f68727ef20c06430eab8f746aeebe5ba591569f3430fdc9a8a69815860ab9fc6cf5795a7a509e752922685778d9fa6ae7ca7c2 makefile-tag-thread.patch"
diff --git a/testing/flow/makefile-tag-thread.patch b/testing/flow/makefile-tag-thread.patch
new file mode 100644
index 0000000000..f19535fa95
--- /dev/null
+++ b/testing/flow/makefile-tag-thread.patch
@@ -0,0 +1,15 @@
+To get rid of warnings:
+
+ ocamlfind: [WARNING] Package `threads': Linking problems may arise because of the missing -thread or -vmthread switch
+
+--- a/Makefile
++++ b/Makefile
+@@ -199,7 +199,7 @@
+
+ RELEASE_TAGS=$(if $(FLOW_RELEASE),-tag warn_a,)
+
+-OCB=ocamlbuild -use-ocamlfind -no-links
++OCB=ocamlbuild -use-ocamlfind -no-links -tag thread
+
+ all: bin/flow$(EXE)
+