aboutsummaryrefslogtreecommitdiffstats
path: root/community/neko/APKBUILD
blob: 158cbd782e21fd7bf9a108bd48320a55762d9866 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Contributor: Jon Ong <jonongjs@rottenmage.com>
# Maintainer: Andy Li <andy@onthewings.net>
pkgname=neko
pkgver=2.3.0
pkgrel=2
pkgdesc="High-level dynamically typed programming language"
url="https://nekovm.org/"
arch="all"
license="LGPL"
depends=""
depends_dev="neko"
makedepends="apache2-dev cmake gc-dev gtk+2.0-dev linux-headers mariadb-connector-c-dev
	mbedtls-dev samurai sqlite-dev"
options=""
install=""
subpackages="$pkgname-dev $pkgname-libs $pkgname-mysql $pkgname-ui
$pkgname-apache2"
source="$pkgname-$pkgver.tar.gz::https://github.com/HaxeFoundation/neko/archive/v${pkgver//./-}.tar.gz
	remove-git-dependent-targets.patch
	"
builddir="$srcdir/$pkgname-${pkgver//./-}"

build() {
	cmake -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None \
		-DNEKO_JIT_DISABLE=ON \
		-GNinja
	ninja -C build
}

check() {
	ninja -C build test
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
}

_mv_ndll() {
	local _ndlldir="usr/lib/neko"
	mkdir -p "$subpkgdir"/$_ndlldir
	for ndll in "$@"
	do
		mv "$pkgdir"/$_ndlldir/"$ndll".ndll "$subpkgdir"/$_ndlldir
	done
}

mysql() {
	pkgdesc="Neko Virtual Machine - MySQL database support"
	depends=
	_mv_ndll mysql mysql5
}

ui() {
	pkgdesc="Neko Virtual Machine - UI support"
	depends=
	_mv_ndll ui
}

apache2() {
	pkgdesc="Neko Virtual Machine - Apache2 modules"
	depends=
	_mv_ndll mod_neko2 mod_tora2
}

sha512sums="fec51bed0c5500561635656c7456f3da0599aa6a47a25efe739b3c51f9cdded4a8824ed14ab67bab0905d9082cf6f06b3a76c868cb1b61d440957bcd9fd3f3d2  neko-2.3.0.tar.gz
ed1aa657b385df7764b8e3a36edd56e7844ba0d326f79a48ab48f1b88868f3e4529e0e84f0dc9eeaae03e6b00fb2e7253afa10b2d56d677844cdbe9c72b81cc3  remove-git-dependent-targets.patch"