Permalink
Browse files

irssi: allow opting out of perl support

Closes #15389.
  • Loading branch information...
1 parent 40d0e8c commit 0643315be4fb0f28ffc3f972ae840b5e5d7f5b85 @adamv adamv committed with n1k0 Feb 9, 2013
Showing with 22 additions and 10 deletions.
  1. +22 −10 Library/Formula/irssi.rb
View
@@ -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"

0 comments on commit 0643315

Please sign in to comment.