# Contributor: Curt Tilmes # Maintainer: Curt Tilmes pkgname=moarvm pkgver=2018.08 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="048fe4f333b017f21dbac34eb385f0569f566ec5ebba9f0e9ee217d325b61fc3542e39e0f1db6fc2cbfa48b09b1acb16c79f02fbe34ed8a5a1946927528c0570 MoarVM-2018.08.tar.gz"