66 lines
1.8 KiB
Ruby
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.1.0/irssi-1.1.0.tar.xz"
|
|
sha256 "109bab173d046391212b330de1f86611ed72af247e6886c18bee73265c2d5f02"
|
|
|
|
bottle do
|
|
sha256 "6e0726a3a7b1518ec5aa3ef01586a0a94d6b85e83500f55aff56a407ff71634c" => :high_sierra
|
|
sha256 "4ca64721a3d8a3d11fa32ec0a17a75159a65d2eb7e3ec36cf5cac2398609db2c" => :sierra
|
|
sha256 "5813b30eb66687e618ff78e7270b71b1b6d22541034f12d0e5619c9b3d968578" => :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
|