aboutsummaryrefslogtreecommitdiff
path: root/unmaintained
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-05-30 16:17:49 +0200
committerJakub Jirutka <jakub@jirutka.cz>2020-05-30 16:17:49 +0200
commit2573f71c90de3050bb18f92be094359510e99794 (patch)
treeea80cdbc5aa3dc2fef5bfc09355d43e82d84333f /unmaintained
parenta70b364f6c8d803d319955d6aa29d6dcffde883d (diff)
downloadalpine_aports-2573f71c90de3050bb18f92be094359510e99794.tar.bz2
alpine_aports-2573f71c90de3050bb18f92be094359510e99794.tar.xz
alpine_aports-2573f71c90de3050bb18f92be094359510e99794.zip
unmaintained/ocaml-migrate-parsetree: move from testing - fails to build
(cd _build/default/src && /usr/bin/ocaml config/gen.ml 4.08.1) Unkown OCaml version 4.08.1
Diffstat (limited to 'unmaintained')
-rw-r--r--unmaintained/ocaml-migrate-parsetree/APKBUILD80
1 files changed, 80 insertions, 0 deletions
diff --git a/unmaintained/ocaml-migrate-parsetree/APKBUILD b/unmaintained/ocaml-migrate-parsetree/APKBUILD
new file mode 100644
index 0000000000..d6d1d229b2
--- /dev/null
+++ b/unmaintained/ocaml-migrate-parsetree/APKBUILD
@@ -0,0 +1,80 @@
1# Contributor: Jakub Jirutka <jakub@jirutka.cz>
2# Maintainer:
3pkgname=ocaml-migrate-parsetree
4pkgver=1.0.11
5pkgrel=1
6pkgdesc="Convert OCaml parsetrees between different major versions"
7url="https://github.com/ocaml-ppx/ocaml-migrate-parsetree"
8arch="all !x86 !armhf !armv7 !s390x !mips !mips64" # limited by ocaml
9license="LGPL-2.1-only-WITH-linking-exception"
10depends="ocaml-result ocaml-runtime"
11depends_dev="ocaml-result-dev"
12makedepends="$depends_dev dune ocaml ocaml-compiler-libs ocaml-findlib
13 ocaml-ocamlbuild-dev opam"
14options="textrels" # ppc64le (?!)
15subpackages="$pkgname-dev $pkgname-ocamlbuild"
16source="$pkgname-$pkgver.tar.gz::https://github.com/ocaml-ppx/$pkgname/archive/v$pkgver.tar.gz"
17builddir="$srcdir/$pkgname-$pkgver"
18
19build() {
20 cd "$builddir"
21 jbuilder build @install
22}
23
24check() {
25 cd "$builddir"
26 jbuilder runtest
27}
28
29package() {
30 cd "$builddir"
31
32 mkdir -p "$pkgdir"/usr/lib/ocaml
33 jbuilder install \
34 --destdir="$pkgdir/usr" \
35 --libdir="$pkgdir/usr/lib/ocaml"
36
37 cd "$pkgdir"
38
39 find usr/lib/ocaml -name '*.cmxs' -exec chmod 0755 {} \;
40
41 # Remove annotation files, sources and some generated code (?).
42 find usr/lib/ocaml \( \
43 -name '*.cmt' -o \
44 -name '*.cmti' -o \
45 -name '*.ml' -o \
46 -name '*.ml-gen' \) -delete
47
48 # There's just a readme, changelog etc.
49 rm -Rf usr/doc
50}
51
52ocamlbuild() {
53 pkgdesc="$pkgdesc (ocamlbuild plugin)"
54 depends="$pkgname=$pkgver-r$pkgrel ocaml-ocamlbuild"
55
56 mkdir -p "$subpkgdir"/usr/lib/ocaml
57 mv "$pkgdir"/usr/lib/ocaml/$pkgname-ocamlbuild "$subpkgdir"/usr/lib/ocaml/
58}
59
60dev() {
61 default_dev
62
63 depends="$depends_dev
64 $pkgname=$pkgver-r$pkgrel
65 $pkgname-ocamlbuild=$pkgver-r$pkgrel"
66
67 cd "$pkgdir"
68
69 local path; for path in $(find usr/lib/ocaml/$pkgname*/ \
70 -name '*.cmx' -o \
71 -name '*.cmxa' -o \
72 -name '*.mli')
73 do
74 mkdir -p "${path%/*}"
75 mv "$path" "$subpkgdir"/${path%/*}/
76 rmdir "$path" 2>/dev/null || true
77 done
78}
79
80sha512sums="37d877ab00e6ff6c93916da49a6bdeb0af16f4ce9cc32fe1c41438c7e344bc5a5400432f11edc44b73c8308bc509d0b393344f9d2a626677a658801655276821 ocaml-migrate-parsetree-1.0.11.tar.gz"