aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorDominyk Tiller2014-10-03 05:23:23 +0100
committerTim D. Smith2014-10-09 13:08:17 -0700
commitc59b8c7c7f94864f90e42306ff5de817bdabb785 (patch)
tree8223eeccae028fa90d44c16b53b609763552a2a6 /Library/Formula
parentb992b39c94b1be310bdb6775ce6338777c04dbed (diff)
downloadhomebrew-c59b8c7c7f94864f90e42306ff5de817bdabb785.tar.bz2
perl 5.20.1 (new formula)
Houston, We have Perl. Closes #32820.
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/perl.rb45
1 files changed, 45 insertions, 0 deletions
diff --git a/Library/Formula/perl.rb b/Library/Formula/perl.rb
new file mode 100644
index 000000000..c2a112f4b
--- /dev/null
+++ b/Library/Formula/perl.rb
@@ -0,0 +1,45 @@
+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"
+
+ keg_only "OS X ships Perl and overriding that can cause unintended issues"
+
+ option "with-dtrace", "Build with DTrace probes"
+
+ 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"
+ 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