homebrew-core/Formula/irssi.rb
2017-01-06 06:34:12 -08:00

67 lines
1.9 KiB
Ruby

class Irssi < Formula
desc "Modular IRC client"
homepage "https://irssi.org/"
url "https://github.com/irssi/irssi/releases/download/1.0.0/irssi-1.0.0.tar.xz"
mirror "https://mirrors.ocf.berkeley.edu/debian/pool/main/i/irssi/irssi_1.0.0.orig.tar.xz"
sha256 "6a8a3c1fc6a021a2c02a693877b2e19cbceb3eccd78fce49e44f596f4bae4fb8"
bottle do
sha256 "b863efe197d8cba9fb5c1ca13f552ab98123c567270a91a3912f89d30911e3ff" => :sierra
sha256 "09cf4ed04eb3ab19f8f8c5a14e1c87ce866226068912c68d0abbbe4794b43c33" => :el_capitan
sha256 "5eb503b3ac4d7ae39ea172e8bfe9204c0d64e93ae74fbff93662f188c3e1c6c5" => :yosemite
end
head do
url "https://github.com/irssi/irssi.git"
depends_on "automake" => :build
depends_on "autoconf" => :build
depends_on "libtool" => :build
depends_on "lynx" => :build
end
option "with-dante", "Build with SOCKS support"
option "without-perl", "Build without perl support"
depends_on "pkg-config" => :build
depends_on "glib"
depends_on "openssl" => :recommended
depends_on "dante" => :optional
def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--sysconfdir=#{etc}
--with-bot
--with-proxy
--enable-true-color
--with-socks=#{build.with?("dante") ? "yes" : "no"}
--with-ncurses=#{MacOS.sdk_path}/usr
]
if build.with? "perl"
args << "--with-perl=yes"
args << "--with-perl-lib=#{lib}/perl5/site_perl"
else
args << "--with-perl=no"
end
args << "--disable-ssl" if build.without? "openssl"
if build.head?
system "./autogen.sh", *args
else
system "./configure", *args
end
# "make" and "make install" must be done separately on some systems
system "make"
system "make", "install"
end
test do
IO.popen("#{bin}/irssi --connect=irc.freenode.net", "w") do |pipe|
pipe.puts "/quit\n"
pipe.close_write
end
end
end