68 lines
2 KiB
Ruby
68 lines
2 KiB
Ruby
class Irssi < Formula
|
|
desc "Modular IRC client"
|
|
homepage "https://irssi.org/"
|
|
url "https://github.com/irssi/irssi/releases/download/1.2.1/irssi-1.2.1.tar.xz"
|
|
sha256 "5466a1ed9612cfa707d9a37d60b29d027b4ac7d83c74ceb1a410e2b59edba92c"
|
|
revision 1
|
|
|
|
bottle do
|
|
sha256 "515d731ba57b70dd50db71e6f58527d5540afb94c7ecc6ed28f0b779fd1242ee" => :mojave
|
|
sha256 "7ea476cbdff2b6cd379e4ebb31c9c77f4a6b09c32b1875996eb6fc252092f8b9" => :high_sierra
|
|
sha256 "0c1e08b5493df96f1d793c09110552ee6fca7c7ebff7a9a37ec2d93db16d2cd1" => :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@1.1"
|
|
uses_from_macos "perl"
|
|
|
|
def install
|
|
ENV.delete "HOMEBREW_SDKROOT" if MacOS.version == :high_sierra
|
|
|
|
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
|
|
|
|
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.
|
|
# To debug a Perl problem copy the following test at the end of the install
|
|
# block to surface the relevant information from the build warnings.
|
|
ENV["PERL5LIB"] = lib/"perl5/site_perl"
|
|
system "perl", "-e", "use Irssi"
|
|
end
|
|
end
|