aboutsummaryrefslogtreecommitdiffstats
path: root/testing/moarvm/APKBUILD
blob: 51bc666ba7903998cd8eceb7aafd0063c547e003 (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
53
54
55
# Contributor: Curt Tilmes <Curt.Tilmes@nasa.gov>
# Maintainer: Curt Tilmes <Curt.Tilmes@nasa.gov>
pkgname=moarvm
pkgver=2018.09
pkgrel=0
pkgdesc="A VM for NQP And Rakudo Perl 6"
url="http://moarvm.org/"
arch="all"
license="Artistic-2.0"
depends=""
makedepends="perl libffi-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc"
source="http://moarvm.org/releases/MoarVM-$pkgver.tar.gz"
builddir="$srcdir"/MoarVM-"$pkgver"

build() {
	cd "$builddir"
	unset CPPFLAGS CFLAGS
	perl Configure.pl --prefix=/usr --has-libffi
	make
}

check() {
	cd "$builddir"
	LD_LIBRARY_PATH=. ./moar --version
}

package() {
	cd "$builddir"
	install -Dm755 moar "$pkgdir"/usr/bin/moar
	install -Dm755 libmoar.so "$pkgdir"/usr/lib/libmoar.so
}

dev() {
	cd "$builddir"
	make DESTDIR="$builddir"/install install
	for file in $(find install/usr/include/ -type f); do
		install -Dm644 ${file} "$subpkgdir"/usr/include/moar/${file#install/usr/include}
	done
	for file in $(find install/usr/share/nqp -type f); do
		install -Dm644 ${file} "$subpkgdir"/usr/share/nqp/${file#install/usr/share/nqp}
	done
	install -Dm644 install/usr/share/pkgconfig/moar.pc "$subpkgdir"/usr/share/pkgconfig/moar.pc
}

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

sha512sums="14d5ca1f6a8c77ee89fd05d66057b640b1e222391fded17631a4e11801de25e1fb3eb6b8b4dd977990e64952f7067482bf405a9ef5ebb6fdacdfa7c11bee21b1  MoarVM-2018.09.tar.gz"