aboutsummaryrefslogtreecommitdiffstats
path: root/main/luajit/APKBUILD
blob: ed8afe715c95d57c7b1bced1bd2865010b40241e (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
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
pkgname=luajit
_pkgname=moonjit
pkgver=5.1.20190925
_pkgver=fedora-${pkgver##*.}
_compatver=2.1.0-beta3
pkgrel=0
pkgdesc="Integration fork of the original LuaJIT"
url="https://github.com/siddhesh/LuaJIT"
arch="all"
license="MIT"
provides="lua"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/siddhesh/luajit/archive/luajit-$_pkgver.tar.gz
	module-paths.patch"
builddir="$srcdir/$_pkgname-$pkgname-$_pkgver"

build() {
	make amalg PREFIX=/usr
}

check() {
	# tests fail
	sed -i -e '/redir.lua/d' test/lib/ffi/index
	case $CARCH in
		ppc64le|s390x) sed -i -e '/math_special.lua/d' test/unportable/index;;
		armv7|armhf)
			sed -i -e '/math_special.lua/d' test/unportable/index
			sed -i -e '/bit.lua/d' test/lib/index
			;;
	esac
	make check
}

package() {
	make install DESTDIR="$pkgdir" PREFIX=/usr

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

sha512sums="d7c256a0865c266e99c8899f10bdb9d8f205dd37a36dcf4bf2cfcd917f2df8fa0e77f8f8dbda06ff371fd1ec834a74128b97ce09de05fe10c88ace8cd9cef515  luajit-fedora-20190925.tar.gz
9c6c410e142838c5128c70570e66beb53cc5422df5ecfb8ab0b5f362637b21ab5978c00f19bc1759165df162fd6438a2ed43e25020400011b7bb14014d87c62e  module-paths.patch"