aboutsummaryrefslogtreecommitdiffstats
path: root/main/luajit/APKBUILD
blob: 77bd453dd21c6bb2e815e8509eb9533ee71882f8 (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
# Maintainer: Cameron Banta <cbanta@gmail.com>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>

pkgname=luajit
pkgver=2.1.0_beta2
_realver=${pkgver/_/-}
pkgrel=3
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/LuaJIT-$_realver.tar.gz
        enable-support-for-ppc64le.patch"
	
builddir=$srcdir/LuaJIT-$_realver

build() {
	cd "$builddir"
	if [ "$CARCH" = "ppc64le" ]; then
		local LDFLAGS="-no-pie"
	fi
	make amalg PREFIX=/usr || return 1
}

package() {
	cd "$builddir"
	make install DESTDIR="$pkgdir" PREFIX=/usr || return 1

	local paxflags="-m"
	[ "$CARCH" = "x86" ] && paxflags="-msp"
	paxmark "$paxflags" "$pkgdir"/usr/bin/luajit-$_realver || return 1

	cd "$pkgdir"/usr/bin && ln -s luajit-$_realver luajit || return 1

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

sha512sums="ef04db5bee66a6e24da8d488df2c035c9593792dca4cb49955d673281a7c7b00ab40f4a63e699959461da7fb0732cf81ec46808c33b66ae1eaca4ef94d0b61e3  LuaJIT-2.1.0-beta2.tar.gz
f9823c3a5091338961e1e70a47e30d0d3e592cdf8d085405d3201a1739cb1ebaaca02eec8ee9a88eab3d80466f5f4227a847553b15f9dbb209fe789ae3b37b67  enable-support-for-ppc64le.patch"