-
Notifications
You must be signed in to change notification settings - Fork 249
/
perl.rb
40 lines (35 loc) · 824 Bytes
/
perl.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
require 'formula'
class Perl < Formula
homepage 'http://www.perl.org/'
url 'http://www.cpan.org/src/5.0/perl-5.14.2.tar.gz'
md5 '3306fbaf976dcebdcd49b2ac0be00eb9'
def options
[['--use-threads', 'Enable perl threads']]
end
def threads?
ARGV.include? '--use-threads'
end
def install
system("rm -f config.sh Policy.sh")
args = [
'-des',
"-Dprefix=#{prefix}",
"-Dman1dir=#{man1}",
"-Dman3dir=#{man3}",
'-Duseshrplib',
'-Duselargefiles',
]
if threads?
args << '-Dusethreads'
end
system './Configure', *args
system "make"
system "make test"
system "make install"
end
def caveats; <<-EOS.undent
Builds without threads by default. Use --use-threads to build with
threads.
EOS
end
end