homebrew-core/Formula/irssi.rb
2017-10-22 09:17:46 -07:00

66 lines
1.8 KiB
Ruby

class Irssi < Formula
desc "Modular IRC client"
homepage "https://irssi.org/"
url "https://github.com/irssi/irssi/releases/download/1.0.5/irssi-1.0.5.tar.xz"
sha256 "c2556427e12eb06cabfed40839ac6f57eb8b1aa6365fab6dfcd331b7a04bb914"
bottle do
sha256 "aaf7dab311191fe1793881ad9ce67fb33d48b073cbb669c8c2623fe845f1f80f" => :high_sierra
sha256 "80016b24698e45413d6cfc23ec93add1cce3deec4c8466d591c04bf348e77dae" => :sierra
sha256 "3497c7e2e878c921f02c4c5a8a3e2a012f466dc3becfd4cd9341d6cab2d7d24a" => :el_capitan
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