homebrew-core/Formula/perl.rb
Shaun Jackman ef0efe4729 perl 5.20.1: Add keg_only :provided_by_osx
Closes Homebrew/homebrew#33537.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-10-24 01:06:10 -05:00

53 lines
1.4 KiB
Ruby

require "formula"
class Perl < Formula
homepage "https://www.perl.org/"
url "http://www.cpan.org/src/5.0/perl-5.20.1.tar.bz2"
mirror "https://mirrors.kernel.org/debian/pool/main/p/perl/perl_5.20.1.orig.tar.bz2"
sha1 "cd424d1520ba2686fe5d4422565aaf880e9467f6"
head "git://perl5.git.perl.org/perl.git", :branch => "blead"
bottle do
sha1 "32ebb39f0504b9454e15a59db5fd4f7503748b58" => :mavericks
sha1 "423764b0a176cda78ccae5b7b6cb473822bd8bd9" => :mountain_lion
sha1 "3b76970b4fef0112a441473aaaceb817c05ed333" => :lion
end
keg_only :provided_by_osx,
"OS X ships Perl and overriding that can cause unintended issues"
option "with-dtrace", "Build with DTrace probes"
option "with-tests", "Build and run the test suite"
def install
args = [
"-des",
"-Dprefix=#{prefix}",
"-Dman1dir=#{man1}",
"-Dman3dir=#{man3}",
"-Duseshrplib",
"-Duselargefiles",
"-Dusethreads"
]
args << "-Dusedtrace" if build.with? "dtrace"
args << "-Dusedevel" if build.head?
system "./Configure", *args
system "make"
system "make", "test" if build.with? "tests"
system "make", "install"
end
def caveats; <<-EOS.undent
By default Perl installs modules in your HOME dir. If this is an issue run:
#{bin}/cpan o conf init
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