Skip to content
Browse files

perl: updated to 5.14.2, made threads optional

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information...
1 parent 3dca61e commit 0fd609e08de9573b7b546728ef118472c8b8c1b1 @garymonson garymonson committed with adamv Feb 16, 2012
Showing with 31 additions and 4 deletions.
  1. +31 −4 duplicates/perl.rb
View
35 duplicates/perl.rb
@@ -1,13 +1,40 @@
require 'formula'
class Perl < Formula
- url 'http://www.cpan.org/src/5.0/perl-5.14.1.tar.gz'
+ url 'http://www.cpan.org/src/5.0/perl-5.14.2.tar.gz'
homepage 'http://www.perl.org/'
- md5 '0b74cffa3a10aee08442f950aecbaeec'
+ 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");
- system "sh Configure -de -Dprefix=#{prefix} -Dusethreads -Duseshrplib -Duselargefiles"
+ system("rm -f config.sh Policy.sh")
+ args = [
+ '-des',
+ "-Dprefix=#{prefix}",
+ "-Dman1dir=#{prefix}/share/man/man1",
+ "-Dman3dir=#{prefix}/share/man/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

0 comments on commit 0fd609e

Please sign in to comment.
Something went wrong with that request. Please try again.