From e5a1a52bf902022cf0765bb717230f1efac27edc Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 9 Feb 2013 11:21:42 -0800 Subject: irssi: allow opting out of perl support Closes #15389. --- Library/Formula/irssi.rb | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/irssi.rb b/Library/Formula/irssi.rb index 8a60560cd..e049d1246 100644 --- a/Library/Formula/irssi.rb +++ b/Library/Formula/irssi.rb @@ -5,22 +5,34 @@ class Irssi < Formula url 'http://irssi.org/files/irssi-0.8.15.tar.bz2' sha1 'b79ce8c2c98a76b004f63706e7868cd363000d89' + option "without-perl", "Build without perl support." + depends_on 'pkg-config' => :build depends_on 'glib' # Fix Perl build flags and paths in man page - def patches; DATA; end + def patches; DATA; end unless build. def install - system "./configure", "--prefix=#{prefix}", - "--sysconfdir=#{etc}", - "--with-perl=yes", - "--with-perl-lib=#{lib}/perl5/site_perl", - "--with-bot", - "--with-proxy", - "--enable-ssl", - "--enable-ipv6", - "--with-socks" + args =%W[ + --prefix=#{prefix} + --sysconfdir=#{etc} + --with-bot + --with-proxy + --enable-ssl + --enable-ipv6 + --with-socks + ] + + if build.with? "perl" + args << "--with-perl=yes" + args << "--with-perl-lib=#{lib}/perl5/site_perl" + else + args << "--with-perl=no" + end + + system "./configure", *args + # 'make' and 'make install' must be done separately on some systems system "make" system "make install" -- cgit v1.2.3