homebrew-core/Formula/irssi.rb
2019-06-22 17:20:53 +02:00

66 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.0/irssi-1.2.0.tar.xz"
sha256 "1643fca1d8b35e5a5d7b715c9c889e1e9cdb7e578e06487901ea959e6ab3ebe5"
bottle do
sha256 "bcc1f0f13f33161ec3ac039cec7df341636a4923da58a292d924df9fb540face" => :mojave
sha256 "d0143dc3131ad05473157945903e05890819b8faad0a5dba7fa63334b6c4c6fe" => :high_sierra
sha256 "3cb81c8c608243eb6f8639a06b03bd2e7e7007e72ddce310b9914351112bc398" => :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
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