forked from lotia/homebrew-versions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathperl518.rb
50 lines (41 loc) · 1.46 KB
/
perl518.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
class Perl518 < Formula
desc "Highly capable, feature-rich programming language"
homepage "https://www.perl.org/"
url "http://www.cpan.org/src/5.0/perl-5.18.2.tar.gz"
sha256 "7cbed5ef11900e8f68041215eea0de5e443d53393f84c41d5c9c69c150a4982f"
bottle do
sha256 "5dd29dc3db33fef36b20f65846097c6baf8b3bd52733d0de39b97dc333089a9c" => :yosemite
sha256 "6f668e0501e54013a4dc1483aeed25b3c9ecd60976fc78b198c0e8f27d3d4842" => :mavericks
sha256 "301f4d292b2936d97de340e691d86ad541f8dcc7eb56db8d0785df288494d194" => :mountain_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"
deprecated_option "use-dtrace" => "with-dtrace"
def install
args = [
"-des",
"-Dprefix=#{prefix}",
"-Dman1dir=#{man1}",
"-Dman3dir=#{man3}",
"-Duseshrplib",
"-Duselargefiles",
"-Dusethreads",
]
args << "-Dusedtrace" if build.with? "dtrace"
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