aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-tyxml/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-03-11 20:38:26 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-03-11 21:37:43 +0100
commite3428832a355f789b419ddc7a4e64047b5172fe7 (patch)
treea1b96f165f436037145083ba70efcc6ab2472000 /testing/ocaml-tyxml/APKBUILD
parent914ed43c2d51081a0d2272846ee6dee4c93e1f12 (diff)
downloadaports-e3428832a355f789b419ddc7a4e64047b5172fe7.tar.bz2
aports-e3428832a355f789b419ddc7a4e64047b5172fe7.tar.xz
testing/ocaml-tyxml: new aport
https://ocsigen.org/tyxml/ OCaml library for building statically correct HTML and SVG documents
Diffstat (limited to 'testing/ocaml-tyxml/APKBUILD')
-rw-r--r--testing/ocaml-tyxml/APKBUILD78
1 files changed, 78 insertions, 0 deletions
diff --git a/testing/ocaml-tyxml/APKBUILD b/testing/ocaml-tyxml/APKBUILD
new file mode 100644
index 0000000000..6cff662147
--- /dev/null
+++ b/testing/ocaml-tyxml/APKBUILD
@@ -0,0 +1,78 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ocaml-tyxml
+_pkgname=tyxml
+pkgver=4.2.0
+pkgrel=0
+pkgdesc="OCaml library for building statically correct HTML and SVG documents"
+url="https://ocsigen.org/tyxml/"
+arch="all !x86 !armhf !s390x" # limited by ocaml aport
+license="LGPL-2.1-or-later"
+depends="ocaml-runtime ocaml-re ocaml-uchar ocaml-uutf"
+depends_dev="$pkgname=$pkgver-r$pkgrel $pkgname-ppx=$pkgver-r$pkgrel"
+makedepends="
+ ocaml
+ ocaml-compiler-libs
+ ocaml-ocamldoc
+ ocaml-findlib
+ ocaml-markup-dev
+ ocaml-migrate-parsetree-dev
+ ocaml-ocamlbuild-dev
+ ocaml-ppx_tools_versioned-dev
+ ocaml-re-dev
+ ocaml-result-dev
+ ocaml-uchar-dev
+ ocaml-uutf-dev
+ ocamlbuild
+ "
+options="!check" # requires additional dependencies
+subpackages="$pkgname-dev $pkgname-ppx"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ocsigen/$_pkgname/archive/$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+_sitelib="usr/lib/ocaml/$_pkgname"
+
+build() {
+ cd "$builddir"
+
+ # --disable-syntax - Camlp4-based syntax is deprecated
+ ./configure \
+ --destdir="$pkgdir" \
+ --prefix=/usr \
+ --disable-syntax \
+ --disable-tests
+ make
+}
+
+package() {
+ cd "$builddir"
+
+ mkdir -p "$pkgdir"/usr/lib/ocaml
+ make install OCAMLFIND_DESTDIR="$pkgdir/usr/lib/ocaml"
+
+ # Remove annotation files and sources.
+ cd "$pkgdir"/usr/lib/ocaml/$_pkgname
+ rm -f *.annot *.cmt* *.ml
+}
+
+dev() {
+ default_dev
+
+ cd "$pkgdir"/$_sitelib
+ _mv *.cmx *.cmxa *.mli "$subpkgdir"/$_sitelib/
+}
+
+ppx() {
+ pkgdesc="$pkgdesc (ppx syntax extension)"
+ depends="$pkgname=$pkgver-r$pkgrel ocaml-markup ocaml-ppx_tools_versioned"
+
+ _mv "$pkgdir"/$_sitelib/ppx_* "$subpkgdir"/$_sitelib/
+}
+
+_mv() {
+ local dest; for dest; do true; done # get last argument
+ mkdir -p "$dest"
+ mv "$@"
+}
+
+sha512sums="555df1fdf5eb30592a3bd93b7d08345964b1cd6e16c2f746ef777cb3c5fc9a31dddf316432e0457d317eaf7728c5d1156982956169a7b1eb9b660eedcf89ca58 ocaml-tyxml-4.2.0.tar.gz"