mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-10 14:56:44 +02:00
testing/reason: upgrade to 3.8.0
This commit is contained in:
parent
f88eb718a7
commit
1515f01a49
@ -1,150 +1,132 @@
|
||||
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||
# Maintainer:
|
||||
pkgname=reason
|
||||
pkgver=3.0.4
|
||||
pkgrel=2
|
||||
pkgver=3.8.0
|
||||
pkgrel=0
|
||||
pkgdesc="Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems"
|
||||
url="https://reasonml.github.io/"
|
||||
# x86, armhf, s390x: limited by ocaml aport
|
||||
arch="all !x86 !armhf !armv7 !s390x !riscv64"
|
||||
arch="all !riscv64" # restricted by ocaml
|
||||
license="MIT"
|
||||
checkdepends="nodejs utop-full"
|
||||
_menhirver=20171013
|
||||
makedepends="
|
||||
bash
|
||||
dune
|
||||
ocaml
|
||||
ocaml-compiler-libs
|
||||
ocaml-cppo-dev
|
||||
ocaml-findlib-dev
|
||||
ocaml-menhir-dev=~$_menhirver
|
||||
ocaml-fix-dev
|
||||
ocaml-menhir
|
||||
ocaml-menhir-dev
|
||||
ocaml-merlin-extend-dev
|
||||
ocaml-migrate-parsetree-dev
|
||||
ocaml-ocamlbuild-dev
|
||||
ocaml-ppx_derivers-dev
|
||||
ocaml-result-dev
|
||||
ocaml-seq-dev
|
||||
ocaml-utop-dev
|
||||
ocamlbuild
|
||||
opam
|
||||
ocaml-bigarray-compat-dev
|
||||
ocaml-camomile-dev
|
||||
ocaml-charinfo_width-dev
|
||||
ocaml-csexp-dev
|
||||
ocaml-lambda-term-dev
|
||||
ocaml-lwt-dev
|
||||
ocaml-lwt_log-dev
|
||||
ocaml-lwt_react
|
||||
ocaml-mew-dev
|
||||
ocaml-mew_vi-dev
|
||||
ocaml-mmap-dev
|
||||
ocaml-ocplib-endian-dev
|
||||
ocaml-react-dev
|
||||
ocaml-trie-dev
|
||||
ocaml-zed-dev
|
||||
"
|
||||
options="!check" # FIXME: tests cannot find reason's modules
|
||||
provides="$pkgname-reactjs=$pkgver-r$pkgrel"
|
||||
subpackages="
|
||||
ocaml-$pkgname-dev:_libdev
|
||||
$pkgname-merlin
|
||||
$pkgname-reactjs
|
||||
$pkgname-rebuild
|
||||
$pkgname-rtop
|
||||
ocaml-$pkgname:_lib
|
||||
"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/facebook/$pkgname/archive/$pkgver.tar.gz
|
||||
rtop.sh.patch"
|
||||
builddir="$srcdir/$pkgname-$pkgver"
|
||||
source="$pkgname-$pkgver.tar.bz2::https://github.com/reasonml/reason/releases/download/$pkgver/reason-$pkgver.tbz"
|
||||
|
||||
# 32-bit archs
|
||||
case "$CARCH" in
|
||||
arm*|x86) options="$options textrels" ;;
|
||||
esac
|
||||
|
||||
build() {
|
||||
cd "$builddir"
|
||||
jbuilder build @install
|
||||
export OCAMLPATH=/usr/lib/ocaml
|
||||
dune build --root . @install --no-buffer --verbose
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$builddir"
|
||||
jbuilder runtest
|
||||
dune runtest --no-buffer --verbose
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"
|
||||
|
||||
opam-installer -i \
|
||||
--prefix="$pkgdir/usr" \
|
||||
--libdir="$pkgdir/usr/lib/ocaml" \
|
||||
--docdir="$pkgdir/doc" \
|
||||
--mandir="$pkgdir/usr/share/man" \
|
||||
$pkgname.install
|
||||
dune install \
|
||||
--destdir="$pkgdir" \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib/ocaml \
|
||||
--mandir="$pkgdir/usr/share/man"
|
||||
|
||||
cd "$pkgdir"
|
||||
|
||||
# There's just a readme and changelog.
|
||||
rm -Rf doc
|
||||
|
||||
# Remove annotation files and sources.
|
||||
find usr/lib/ocaml \
|
||||
-name '*.cmt' -delete \
|
||||
-o -name '*.cmti' -delete \
|
||||
-o -name '*.ml' -delete
|
||||
rm -Rf usr/doc
|
||||
|
||||
# Just for internal tests.
|
||||
rm usr/bin/testOprint
|
||||
|
||||
# This is probably used only to generate parser (?).
|
||||
rm usr/bin/menhir_error_processor
|
||||
|
||||
mkdir -p usr/share/$pkgname-rtop
|
||||
mv usr/bin/rtop_init.ml usr/share/$pkgname-rtop/
|
||||
rm -fv usr/bin/testOprint
|
||||
}
|
||||
|
||||
_libdev() {
|
||||
pkgdesc="$pkgdesc (development files)"
|
||||
depends="ocaml-$pkgname=$pkgver-r$pkgrel"
|
||||
local sitelib="usr/lib/ocaml/$pkgname"
|
||||
|
||||
default_dev
|
||||
|
||||
cd "$pkgdir"
|
||||
|
||||
local path; for path in $(find $sitelib/ \
|
||||
-name '*.a' \
|
||||
-o -name '*.cmx' \
|
||||
-o -name '*.cmxa' \
|
||||
-o -name '*.mli')
|
||||
local path; for path in $(find usr/lib/ocaml/$pkgname \( \
|
||||
-name '*.cmt' -o \
|
||||
-name '*.cmti' -o \
|
||||
-name '*.cmx' -o \
|
||||
-name '*.cmxa' -o \
|
||||
-name '*.ml' -o \
|
||||
-name '*.mli' \
|
||||
\))
|
||||
do
|
||||
mkdir -p "$subpkgdir"/${path%/*}
|
||||
mv "$path" "$subpkgdir"/${path%/*}/
|
||||
amove "$path"
|
||||
done
|
||||
rmdir "$subpkgdir"/$sitelib 2>/dev/null || true
|
||||
}
|
||||
|
||||
merlin() {
|
||||
pkgdesc="Reason extension to Merlin - context sensitive completion"
|
||||
depends="ocaml-merlin"
|
||||
depends="merlin"
|
||||
|
||||
_submv usr/bin/ocamlmerlin-reason
|
||||
}
|
||||
|
||||
reactjs() {
|
||||
pkgdesc="ReactJS interop that translates Reason JSX to JS"
|
||||
|
||||
_submv usr/bin/ppx_react
|
||||
_submv usr/bin/reactjs_jsx_ppx_v2
|
||||
_submv usr/bin/reactjs_jsx_ppx_v3
|
||||
}
|
||||
|
||||
rebuild() {
|
||||
pkgdesc="Simple build system for Reason based on OCamlbuild"
|
||||
depends="$pkgname ocaml ocaml-ocamlbuild"
|
||||
|
||||
_submv usr/bin/rebuild
|
||||
amove usr/bin/ocamlmerlin-reason
|
||||
}
|
||||
|
||||
rtop() {
|
||||
pkgdesc="REPL for Reason based on Utop"
|
||||
depends="$pkgname=$pkgver-r$pkgrel
|
||||
ocaml-$pkgname=$pkgver-r$pkgrel
|
||||
ocaml-menhir-dev=~$_menhirver
|
||||
ocaml-menhir-dev
|
||||
utop-full"
|
||||
|
||||
_submv usr/bin/rtop
|
||||
_submv usr/lib/ocaml/$pkgname/rtop
|
||||
_submv usr/share/$pkgname-rtop
|
||||
amove usr/bin/rtop
|
||||
amove usr/lib/ocaml/rtop
|
||||
}
|
||||
|
||||
_lib() {
|
||||
pkgdesc="$pkgdesc (library)"
|
||||
depends="ocaml-runtime ocaml-menhir=~$_menhirver ocaml-migrate-parsetree"
|
||||
depends="ocaml-runtime ocaml-menhir ocaml-ppx_derivers"
|
||||
|
||||
_submv usr/lib/ocaml/$pkgname
|
||||
amove usr/lib/ocaml/$pkgname
|
||||
}
|
||||
|
||||
_submv() {
|
||||
local path="$1"
|
||||
mkdir -p "$subpkgdir"/${path%/*}
|
||||
mv "$pkgdir"/$path "$subpkgdir"/${path%/*}/
|
||||
rmdir -p "$pkgdir"/${path%/*} 2>/dev/null || true
|
||||
}
|
||||
|
||||
sha512sums="ba21920b7320841b08cf0684aeb6718be92b175e2ab71d3b96b317f047c9726b656088cf1a4770766335d4f8a54194b84173e2d7458eabb9e2c0b89a78b1eb95 reason-3.0.4.tar.gz
|
||||
5a658798a27fa69cc2685353cf0c26dfd95ea6a1d8d5c53c6476500b37b86c18b7b1d26fecac13c5ab0aa91e07f4aa5a7087934e9faca0002dad8f6b8fafd876 rtop.sh.patch"
|
||||
sha512sums="
|
||||
c5dcec810a1981b78b19271a8a255f4087628514725d6818419b141be6346a62b28fe8d0f10855efe420ede2839bfe562aa5abf21f29d66250e5c0d02323d6d8 reason-3.8.0.tar.bz2
|
||||
"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user