aports/testing/haxe/APKBUILD

97 lines
3.1 KiB
Plaintext

# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=haxe
_haxelib_commit=f17fffa97554b1bdba37750e3418051f017a5bc2
pkgver=4.3.6
_luv_version=0.5.14
_extlib_version=1.7.8
_hx3compat_commit=f1f18201e5c0479cb5adf5f6028788b37f37b730
pkgrel=0
pkgdesc="The Cross-Platform Toolkit"
url="https://haxe.org"
#arch="all !riscv64 !loongarch64" # limited by community/ocaml
arch="" # fails to build
license="GPL-2.0-or-later"
depends="musl mbedtls pcre2 zlib"
makedepends="
aspcud
bash
m4
make
mbedtls-dev
musl-dev
neko
neko-dev
ocaml
ocaml-compiler-libs
ocaml-ocamldoc
opam
patch
pcre2-dev
perl-ipc-system-simple
perl-string-shellquote
pkgconf
rsync
unzip
zlib-dev
"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/HaxeFoundation/haxe/archive/refs/tags/$pkgver.tar.gz
haxelib-$_haxelib_commit.tar.gz::https://github.com/HaxeFoundation/haxelib/archive/$_haxelib_commit.tar.gz
hx3compat-$_hx3compat_commit.tar.gz::https://github.com/HaxeFoundation/hx3compat/archive/$_hx3compat_commit.tar.gz
haxe.opam.locked
luv0.5.13.patch
mbedtls3.patch
"
options="!strip" # enabling stripping removes core libraries needed to build snikket-sdk
export OPAMROOT="${OPAMROOT:-"$srcdir/opam-root"}"
prepare() {
rm -rf extra/haxelib_src
cp -rv "$srcdir/haxelib-$_haxelib_commit" extra/haxelib_src
rm -rf extra/haxelib_src/hx3compat
cp -rv "$srcdir/hx3compat-$_hx3compat_commit" extra/haxelib_src/hx3compat
default_prepare
opam init -a --disable-sandboxing --compiler=ocaml-system
eval "$(opam env)"
opam pin add luv $_luv_version --no-action
opam pin add extlib $_extlib_version --no-action
opam install -y --deps-only "$srcdir"/haxe.opam.locked
}
build() {
# Prepare opam and ocamlfind before building
eval "$(opam env --switch=ocaml-system)"
export OCAMLPARAM="_,w=-a"
make
}
check() {
./haxe -version
./haxelib version
}
package() {
install -d "$pkgdir/usr/bin/"
install -d "$pkgdir/usr/share/$pkgname/"
cp -rf std "$pkgdir/usr/share/$pkgname/"
install -Dm755 haxe -t "$pkgdir"/usr/bin/
install -Dm755 haxelib -t "$pkgdir"/usr/bin/
install -Dm644 extra/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
sha512sums="
56d4e1583787c8923dc2ea8816005059d272ab853e94f51c91a680cfbeec0e83f25cf8fe3f896ba5fbb69c3f1dcc2200e0cd28146ef279bf20446d968548ce06 haxe-4.3.6.tar.gz
adc80c20833062a6639f352861a950a4289a06ba97dcc57e327186cec8aa7988e17b5f4df518ced9a371ae4f0fd7d065bd79f400aa48045081066fa784c6b837 haxelib-f17fffa97554b1bdba37750e3418051f017a5bc2.tar.gz
d3df767744c073715a5deb9e1b602006aded8335d7afe28686e9440c4d9fabe6eb29314beb7b929bb7a76de68a815a9a7c7a49d2a92183e9a5331923f70249ff hx3compat-f1f18201e5c0479cb5adf5f6028788b37f37b730.tar.gz
54bf8945d329d4202412e10ade40cef684bcf292c69be39d247f954e836819047d12b00b5d08912b490b7a868187af491d5f236c7f7a992601a08ab3497e5cbe haxe.opam.locked
779cd88a3ba859287c4db1d640ea32b58649154fe14f3e72f15193b655fee1aacce897813d677c871cebb6600d3a368841c89ffc34926639630849b96d1dce35 luv0.5.13.patch
b8691ebf06c1a37f3a9b89fd5b6b73fa59a93577ba46208bc9a87ca1f5a02a6dfed072773aaebe2d7961e4c054cddcdce0441ce17c14b61e4025d2d56754017c mbedtls3.patch
"