aboutsummaryrefslogtreecommitdiffstats
path: root/main/luajit/APKBUILD
blob: 34ea3b3c7c7f1a328ed9da4f02db75efda3cc45c (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
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
pkgname=luajit
_pkgname=LuaJIT
pkgver=2.1.0_beta3
_pkgver=${pkgver/_/-}
pkgrel=1
pkgdesc='Just-in-time compiler and replacement for Lua 5.1'
url='http://luajit.org'
arch="all !s390x"
license="MIT"
makedepends="$depends_dev paxmark"
subpackages="$pkgname-dev $pkgname-doc"
source="http://luajit.org/download/$_pkgname-$_pkgver.tar.gz
	enable-support-for-ppc64le.patch"
builddir="$srcdir/$_pkgname-$_pkgver"

build() {
	cd "$builddir"

	make amalg PREFIX=/usr
}

check() {
	cd "$builddir"

	./src/luajit -v
	./src/luajit -e 'print("Hello, world!")'
}

package() {
	cd "$builddir"

	make install DESTDIR="$pkgdir" PREFIX=/usr

	local paxflags="-m"
	[ "$CARCH" = "x86" ] && paxflags="-msp"
	paxmark $paxflags "$pkgdir"/usr/bin/luajit-$_pkgver

	ln -s luajit-$_pkgver "$pkgdir"/usr/bin/luajit

	install -Dm644 COPYRIGHT \
		"$pkgdir"/usr/share/licenses/$pkgname/COPYRIGHT
}

sha512sums="c44e967a0f671ed32b55aee810bc8b3b63737a2d7363b8984ae1949b24f98dbb3f9be7c1e10239fdeb96a3e3c836f606342cbd61838cf9bcadb077443eb5bc12  LuaJIT-2.1.0-beta3.tar.gz
c2b1a39fe19dfe1817811015ef1fea24b0966ff791fcbde1090527331c2b9ceab9b923960c01cfb8aa81bab40aa437eb0f285385378e7eaa83016abf36beae27  enable-support-for-ppc64le.patch"