24 lines
714 B
Ruby
24 lines
714 B
Ruby
|
class Rakudo < Formula
|
||
|
desc "Perl 6 compiler targeting MoarVM"
|
||
|
homepage "https://rakudo.org"
|
||
|
url "https://rakudo.perl6.org/downloads/rakudo/rakudo-2018.12.tar.gz"
|
||
|
sha256 "67bb02b9afd4f2a2a8542e25ce2691bc2d77864668f0fc82e1d39dea31a584fa"
|
||
|
|
||
|
depends_on "nqp"
|
||
|
|
||
|
def install
|
||
|
system "perl", "Configure.pl",
|
||
|
"--backends=moar",
|
||
|
"--prefix=#{prefix}",
|
||
|
"--with-nqp=#{Formula["nqp"].bin}/nqp"
|
||
|
system "make"
|
||
|
system "make", "install"
|
||
|
bin.install "tools/install-dist.p6" => "perl6-install-dist"
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
out = shell_output("#{bin}/perl6 -e 'loop (my $i = 0; $i < 10; $i++) { print $i }'")
|
||
|
assert_equal "0123456789", out
|
||
|
end
|
||
|
end
|