class Irssi < Formula desc "Modular IRC client" homepage "https://irssi.org/" url "https://github.com/irssi/irssi/releases/download/1.0.6/irssi-1.0.6.tar.xz" sha256 "029e884f3ebf337f7266d8ed4e1a035ca56d9f85015d74c868b488f279de8585" bottle do sha256 "910ceed35709e0e8c47356346d4b375c7f4abf27b7ec5d8e6bf307caa9d8d2c6" => :high_sierra sha256 "2ddcf9bcc1243e07bdf3234368299d9b73b2e7c7f4ad4b403cce52591fb792ef" => :sierra sha256 "4826a99899e7a7b6c8022261353960eff865666f59ca1f97f7807cd4cfc9f04a" => :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