aboutsummaryrefslogtreecommitdiffstats
path: root/main/luajit/APKBUILD
blob: a7d14e0ecfe78e19a3aa097cac06396497475c5e (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
# 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=6
pkgdesc='Just-in-time compiler and replacement for Lua 5.1'
url='https://luajit.org/'
arch="all"
license="MIT"
makedepends="$depends_dev paxmark"
provides="lua"
subpackages="$pkgname-dev $pkgname-doc"
source="http://luajit.org/download/$_pkgname-$_pkgver.tar.gz
	0004-Add-ppc64-support-based-on-koriakin-GitHub-patchset.patch
	module-paths.patch
	s390x.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
2e4a4416ad60f6463b2f4ce2c5b8f0519dfb7bfd85e377fed8423477088c5ac9143d0c30a772e65f492317da63bcd06ab01dabe85933c2bd32d6f061167e5515  0004-Add-ppc64-support-based-on-koriakin-GitHub-patchset.patch
9c6c410e142838c5128c70570e66beb53cc5422df5ecfb8ab0b5f362637b21ab5978c00f19bc1759165df162fd6438a2ed43e25020400011b7bb14014d87c62e  module-paths.patch
56d74d37d703e6b30839c751937d15a3a48d4062cf71f1fc837893b0f05a5befc3734a349168eec490c2d6f66eda028e3738bf57946eb64e8c2407d9c69ada72  s390x.patch"