aboutsummaryrefslogtreecommitdiffstats
path: root/community/neko/APKBUILD
blob: 969650c3b23adcc7544da82df246bcca5faac6c3 (plain) (blame)
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
# Contributor: Jon Ong <jonongjs@rottenmage.com>
# Maintainer: Andy Li <andy@onthewings.net>
pkgname=neko
pkgver=2.2.0
pkgrel=3
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 ninja 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"

builddir="$srcdir/$pkgname-${pkgver//./-}"
build() {
	cd "$builddir"

	mkdir -p build || return 1
	cd build || return 1

	cmake "../" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DNEKO_JIT_DISABLE=ON -GNinja || return 1
	ninja || return 1
}

check() {
	cd "$builddir"
	ninja -C build test || return 1
}

package() {
	cd "$builddir"
	DESTDIR="$pkgdir" ninja -C build install || return 1
}

_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="4bc89fddf4a5ae94e73843b06a3b6fe8de59d72922764276a5bd9d56daf6570525e842039bf704598b41e1de4a5fe08931adc4ca9730fe3333be0beb7a1ccaed  neko-2.2.0.tar.gz"