2014-10-03 04:23:23 +00:00
|
|
|
class Perl < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Highly capable, feature-rich programming language"
|
2014-10-03 04:23:23 +00:00
|
|
|
homepage "https://www.perl.org/"
|
2015-07-07 03:53:35 +00:00
|
|
|
url "http://www.cpan.org/src/5.0/perl-5.22.0.tar.xz"
|
|
|
|
mirror "https://mirrors.kernel.org/debian/pool/main/p/perl/perl_5.22.0.orig.tar.xz"
|
|
|
|
sha256 "be83ead0c5c26cbbe626fa4bac1a4beabe23a9eebc15d35ba49ccde11878e196"
|
2014-10-03 04:23:23 +00:00
|
|
|
|
2015-07-07 09:31:29 +00:00
|
|
|
head "https://perl5.git.perl.org/perl.git", :branch => "blead"
|
2014-10-03 04:23:23 +00:00
|
|
|
|
2014-10-07 02:55:07 +00:00
|
|
|
bottle do
|
2015-11-21 22:47:39 +00:00
|
|
|
revision 1
|
|
|
|
sha256 "ebb13b34c8f16e00bc2c1f27b58e1429ffed46ab62fc985daba01995cb634718" => :el_capitan
|
|
|
|
sha256 "f856738f95e476155e396ce666aa03daeb02d8b69584310b089e5ad2ba16dfd6" => :yosemite
|
|
|
|
sha256 "54ae891865a973f2f8cea6639eb52fa2bad39ad7a31d9c04f255de52bc85ae58" => :mavericks
|
2014-10-07 02:55:07 +00:00
|
|
|
end
|
|
|
|
|
2014-10-24 03:41:05 +00:00
|
|
|
keg_only :provided_by_osx,
|
|
|
|
"OS X ships Perl and overriding that can cause unintended issues"
|
2014-10-03 04:23:23 +00:00
|
|
|
|
|
|
|
option "with-dtrace", "Build with DTrace probes"
|
2014-10-12 15:18:52 +00:00
|
|
|
option "with-tests", "Build and run the test suite"
|
2014-10-03 04:23:23 +00:00
|
|
|
|
|
|
|
def install
|
2015-11-21 21:42:24 +00:00
|
|
|
args = %W[
|
|
|
|
-des
|
|
|
|
-Dprefix=#{prefix}
|
|
|
|
-Dman1dir=#{man1}
|
|
|
|
-Dman3dir=#{man3}
|
|
|
|
-Duseshrplib
|
|
|
|
-Duselargefiles
|
|
|
|
-Dusethreads
|
2014-10-03 04:23:23 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
args << "-Dusedtrace" if build.with? "dtrace"
|
|
|
|
args << "-Dusedevel" if build.head?
|
|
|
|
|
|
|
|
system "./Configure", *args
|
|
|
|
system "make"
|
2015-11-21 21:42:24 +00:00
|
|
|
|
|
|
|
# OS X El Capitan's SIP feature prevents DYLD_LIBRARY_PATH from being passed to child
|
|
|
|
# processes, which causes the make test step to fail.
|
|
|
|
# https://rt.perl.org/Ticket/Display.html?id=126706
|
|
|
|
# https://github.com/Homebrew/homebrew/issues/41716
|
|
|
|
if MacOS.version < :el_capitan
|
|
|
|
system "make", "test" if build.with?("tests") || build.bottle?
|
|
|
|
end
|
|
|
|
|
2014-10-03 04:23:23 +00:00
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
By default Perl installs modules in your HOME dir. If this is an issue run:
|
2015-05-20 23:48:35 +00:00
|
|
|
`#{bin}/cpan o conf init`
|
2014-10-03 04:23:23 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.pl").write "print 'Perl is not an acronym, but JAPH is a Perl acronym!';"
|
|
|
|
system "#{bin}/perl", "test.pl"
|
|
|
|
end
|
|
|
|
end
|