59 lines
2.1 KiB
Ruby
59 lines
2.1 KiB
Ruby
class RakudoStar < Formula
|
|
desc "Rakudo compiler and commonly used packages"
|
|
homepage "https://rakudo.org/"
|
|
url "https://rakudo.org/dl/star/rakudo-star-2021.02.1.tar.gz"
|
|
sha256 "1c9546fe115d49bf115cdb15b89bce27c5d24e2c1fd95a03c8853a46cc87e2a0"
|
|
license "Artistic-2.0"
|
|
|
|
livecheck do
|
|
url "https://rakudo.org/dl/star/"
|
|
regex(/".*?rakudo-star[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 arm64_big_sur: "84f51d0d28836b4f2f0fb229d2f430ed61dc62bf09dbdef11441518903ff3d95"
|
|
sha256 big_sur: "d75aee60ff1ad43d4136597cc397479b9e92c03ffe604d6f317fd9d5636a9205"
|
|
sha256 catalina: "540c25480053a98c4551ed7313693d27852f5492698400caa4369563dd8f9363"
|
|
sha256 mojave: "26c6eda9839e94506bcd19894e52b5067e1f22e7457db05e3952e59e79f7ddf4"
|
|
end
|
|
|
|
depends_on "bash" => :build
|
|
depends_on "gmp"
|
|
depends_on "icu4c"
|
|
depends_on "libffi"
|
|
depends_on "pcre"
|
|
depends_on "readline"
|
|
|
|
conflicts_with "moarvm", "nqp", because: "rakudo-star currently ships with moarvm and nqp included"
|
|
conflicts_with "parrot"
|
|
conflicts_with "rakudo"
|
|
|
|
def install
|
|
libffi = Formula["libffi"]
|
|
ENV.remove "CPPFLAGS", "-I#{libffi.include}"
|
|
ENV.prepend "CPPFLAGS", "-I#{libffi.lib}/libffi-#{libffi.version}/include"
|
|
|
|
ENV.deparallelize # An intermittent race condition causes random build failures.
|
|
|
|
# make install runs tests that can hang on sierra
|
|
# set this variable to skip those tests
|
|
ENV["NO_NETWORK_TESTING"] = "1"
|
|
system "bin/rstar", "install", "-p", prefix.to_s
|
|
|
|
# Installed scripts are now in share/perl/{site|vendor}/bin, so we need to symlink it too.
|
|
bin.install_symlink Dir[share/"perl6/vendor/bin/*"]
|
|
bin.install_symlink Dir[share/"perl6/site/bin/*"]
|
|
|
|
# Move the man pages out of the top level into share.
|
|
# Not all backends seem to generate man pages at this point (moar does not, parrot does),
|
|
# so we need to check if the directory exists first.
|
|
mv "#{prefix}/man", share if File.directory?("#{prefix}/man")
|
|
end
|
|
|
|
test do
|
|
out = `#{bin}/raku -e 'loop (my $i = 0; $i < 10; $i++) { print $i }'`
|
|
assert_equal "0123456789", out
|
|
assert_equal 0, $CHILD_STATUS.exitstatus
|
|
end
|
|
end
|