aboutsummaryrefslogtreecommitdiffstats
path: root/testing/nqp/APKBUILD
blob: d1e15514ee9b99f2e038856d5d6ebed7856d363e (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
# Contributor: Curt Tilmes <Curt.Tilmes@nasa.gov>
# Maintainer: Curt Tilmes <Curt.Tilmes@nasa.gov>
pkgname=nqp
pkgver=2018.04
pkgrel=0
pkgdesc="Not Quite Perl"
url="https://github.com/perl6/nqp"
arch="all !x86"
options="!archcheck" # Arch dependencies are embedded
license="Artistic-2.0"
depends="moarvm"
makedepends="perl-utils moarvm-dev"
install=""
subpackages="$pkgname-doc"
source="${pkgname}-${pkgver}.tar.gz::https://github.com/perl6/nqp/archive/${pkgver}.tar.gz"
builddir="$srcdir"/"$pkgname"-"$pkgver"

# FIXME: some tests fail on armhf and x86, need to investigate more
case "$CARCH" in
	armhf | x86) options="$options !check";;
esac

build() {
	cd "$builddir"
	perl Configure.pl --prefix=/usr --backends=moar
	make
}

check() {
	cd "$builddir"
	make test
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

doc() {
	cd "$builddir"
	mkdir -p "$subpkgdir"/usr/share/doc/"$pkgname"
	for file in CREDITS LICENSE README.pod VERSION docs examples; do
		cp -r $file "$subpkgdir"/usr/share/doc/"$pkgname"
	done
}

sha512sums="30ee26176f1834c528c0b4bdddc8df08c50f6504cb1626b912a050ab5199f3c1000eb9c884c4031771d6f88429c8fbd23457b73aaa8ee7d937c9f29ad1a46429  nqp-2018.04.tar.gz"