aboutsummaryrefslogtreecommitdiffstats
path: root/community/rakudo/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/rakudo/APKBUILD')
-rw-r--r--community/rakudo/APKBUILD72
1 files changed, 72 insertions, 0 deletions
diff --git a/community/rakudo/APKBUILD b/community/rakudo/APKBUILD
new file mode 100644
index 00000000000..c10cfbaebe3
--- /dev/null
+++ b/community/rakudo/APKBUILD
@@ -0,0 +1,72 @@
+# Contributor: Curt Tilmes <Curt.Tilmes@nasa.gov>
+# Maintainer: Curt Tilmes <Curt.Tilmes@nasa.gov>
+pkgname=rakudo
+pkgver=2024.03
+pkgrel=0
+pkgdesc="Compiler for the Raku programming language"
+url="https://rakudo.org/"
+# ppc64le/s390x/riscv64 blocked by moarvm
+arch="all !ppc64le !s390x !riscv64"
+license="Artistic-2.0"
+depends="nqp~$pkgver"
+makedepends="perl-utils moarvm-dev~$pkgver"
+checkdepends="perl-test-harness"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://github.com/rakudo/rakudo/releases/download/$pkgver/rakudo-$pkgver.tar.gz"
+
+build() {
+ perl Configure.pl --prefix=/usr --backends=moar \
+ --rakudo-home=/usr/share/"$pkgname"
+ make -j"$JOBS"
+}
+
+check() {
+ # Failed 1 out of 42 subtests - Non-zero exit:
+ # "Dubious, test returned 1 (wstat 256, 0x100)"
+ # in t/06-telemetry/01-basic.t. These 3 archs
+ # also take about half an hour to finish building,
+ # skipping tests will make things a little faster.
+ # When running tests in parallel, the test
+ # t/02-rakudo/15-gh_1202.t also starts failing
+ # on armhf with the same "wstat 256" message.
+ case $CARCH in
+ arm*|x86)
+ ./rakudo-m -V
+ ;;
+ *)
+ export RAKUDO_RUN_TIMING_TESTS=0
+ export ROAST_TIMING_SCALE=15
+ export TEST_JOBS=$JOBS
+ export HARNESS_VERBOSE=1
+
+ msg "Running $TEST_JOBS parallel test jobs"
+ make test
+ ;;
+ esac
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+ ln -sv rakudo "$pkgdir"/usr/share/perl6
+
+ install -Dvm644 CONTRIBUTING.md CREDITS \
+ LICENSE README.md VERSION \
+ -t "$pkgdir"/usr/share/doc/"$pkgname"
+ cp -vr docs "$pkgdir"/usr/share/doc/"$pkgname"/
+}
+
+dev() {
+ default_dev
+ amove usr/bin/perl6-debug* usr/bin/perl6-gdb-m \
+ usr/bin/perl6-lldb-m usr/bin/perl6-valgrind-m \
+ usr/bin/rakudo-debug* usr/bin/rakudo-gdb-m \
+ usr/bin/rakudo-lldb-m usr/bin/rakudo-valgrind-m \
+ usr/bin/raku-debug
+
+ mkdir -vp "$subpkgdir"/usr/share/"$pkgname"
+ cp -vr "$builddir"/tools "$subpkgdir"/usr/share/"$pkgname"/
+}
+
+sha512sums="
+e4c1f4f88ca145ce2eec8a69d11789684d8ff898f2fabe05ac0c2f38c8589015a6893ea1a834554fe81b541d242622c0e72f014a4df46ed29620baf8aad3bac4 rakudo-2024.03.tar.gz
+"