2014-10-03 04:23:23 +00:00
|
|
|
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"
|
|
|
|
|
2014-10-07 02:55:07 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "32ebb39f0504b9454e15a59db5fd4f7503748b58" => :mavericks
|
|
|
|
sha1 "423764b0a176cda78ccae5b7b6cb473822bd8bd9" => :mountain_lion
|
|
|
|
sha1 "3b76970b4fef0112a441473aaaceb817c05ed333" => :lion
|
|
|
|
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
|
|
|
|
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"
|
2014-10-12 15:18:52 +00:00
|
|
|
system "make", "test" if build.with? "tests"
|
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:
|
|
|
|
#{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
|