66 lines
1.9 KiB
Ruby
66 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.1.1/irssi-1.1.1.tar.xz"
|
|
sha256 "784807e7a1ba25212347f03e4287cff9d0659f076edfb2c6b20928021d75a1bf"
|
|
revision 1
|
|
|
|
bottle do
|
|
sha256 "ca5e86cee8f481f3a442ee91030236c16346f47dffe880526e4e6f1058cadb68" => :mojave
|
|
sha256 "0657e4d22b2265a3862d3ca53b0c822403cb6a23b70f49c148fb068483629320" => :high_sierra
|
|
sha256 "8fdd719eb442ac3e2c2ebcd097bd606682661b7830b116559f4c55164dbe6a68" => :sierra
|
|
end
|
|
|
|
head do
|
|
url "https://github.com/irssi/irssi.git"
|
|
depends_on "autoconf" => :build
|
|
depends_on "automake" => :build
|
|
depends_on "libtool" => :build
|
|
depends_on "lynx" => :build
|
|
end
|
|
|
|
depends_on "pkg-config" => :build
|
|
depends_on "glib"
|
|
depends_on "openssl"
|
|
|
|
def install
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{prefix}
|
|
--sysconfdir=#{etc}
|
|
--with-bot
|
|
--with-proxy
|
|
--enable-true-color
|
|
--with-socks=no
|
|
--with-ncurses=#{MacOS.sdk_path}/usr
|
|
--with-perl=yes
|
|
--with-perl-lib=#{lib}/perl5/site_perl
|
|
]
|
|
|
|
if build.head?
|
|
ENV["NOCONFIGURE"] = "yes"
|
|
system "./autogen.sh", *args
|
|
end
|
|
|
|
# https://github.com/irssi/irssi/pull/927
|
|
inreplace "configure", "^DUIfm", "^DUIifm"
|
|
|
|
system "./configure", *args
|
|
# "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
|
|
|
|
# This is not how you'd use Perl with Irssi but it is enough to be
|
|
# sure the Perl element didn't fail to compile, which is needed
|
|
# because upstream treats Perl build failures as non-fatal.
|
|
ENV["PERL5LIB"] = lib/"perl5/site_perl"
|
|
system "perl", "-e", "use Irssi"
|
|
end
|
|
end
|