76 lines
2.5 KiB
Ruby
76 lines
2.5 KiB
Ruby
class Weechat < Formula
|
|
desc "Extensible IRC client"
|
|
homepage "https://www.weechat.org"
|
|
url "https://weechat.org/files/src/weechat-2.1.tar.xz"
|
|
sha256 "cda0f81ff8243fd25cca76c8e490e2fdb5b8fbb2554d7aa87cb3b0beda16ed38"
|
|
head "https://github.com/weechat/weechat.git"
|
|
|
|
bottle do
|
|
sha256 "7aa5f3fe12d6d3480110a5f6da0b5db854be8b867a0a07c94e7f350b62f9d18b" => :high_sierra
|
|
sha256 "75a32256d8605e51838172c82ce845f94740da23a0cfff440026e152c61f9cc3" => :sierra
|
|
sha256 "28381b3e219908e19860b10d5dd680f8e25efb3145da6164df51d6d9070a6739" => :el_capitan
|
|
end
|
|
|
|
option "with-perl", "Build the perl module"
|
|
option "with-ruby", "Build the ruby module"
|
|
option "with-curl", "Build with brewed curl"
|
|
option "with-debug", "Build with debug information"
|
|
option "without-tcl", "Do not build the tcl module"
|
|
|
|
deprecated_option "with-python" => "with-python@2"
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "pkg-config" => :build
|
|
depends_on "gnutls"
|
|
depends_on "libgcrypt"
|
|
depends_on "gettext"
|
|
depends_on "aspell" => :optional
|
|
depends_on "lua" => :optional
|
|
depends_on "perl" => :optional
|
|
depends_on "python@2" => :optional
|
|
depends_on "ruby" => :optional if MacOS.version <= :sierra
|
|
depends_on "curl" => :optional
|
|
|
|
def install
|
|
args = std_cmake_args + %W[
|
|
-DENABLE_GUILE=OFF
|
|
-DCA_FILE=#{etc}/openssl/cert.pem
|
|
-DENABLE_JAVASCRIPT=OFF
|
|
]
|
|
if build.with? "debug"
|
|
args -= %w[-DCMAKE_BUILD_TYPE=Release]
|
|
args << "-DCMAKE_BUILD_TYPE=Debug"
|
|
end
|
|
|
|
if build.without? "ruby"
|
|
args << "-DENABLE_RUBY=OFF"
|
|
elsif build.with?("ruby") && MacOS.version >= :sierra
|
|
args << "-DRUBY_EXECUTABLE=/usr/bin/ruby"
|
|
args << "-DRUBY_LIB=/usr/lib/libruby.dylib"
|
|
end
|
|
|
|
args << "-DENABLE_LUA=OFF" if build.without? "lua"
|
|
args << "-DENABLE_PERL=OFF" if build.without? "perl"
|
|
args << "-DENABLE_ASPELL=OFF" if build.without? "aspell"
|
|
args << "-DENABLE_TCL=OFF" if build.without? "tcl"
|
|
args << "-DENABLE_PYTHON=OFF" if build.without? "python@2"
|
|
|
|
mkdir "build" do
|
|
system "cmake", "..", *args
|
|
system "make", "install", "VERBOSE=1"
|
|
end
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
Weechat can depend on Aspell if you choose the --with-aspell option, but
|
|
Aspell should be installed manually before installing Weechat so that
|
|
you can choose the dictionaries you want. If Aspell was installed
|
|
automatically as part of weechat, there won't be any dictionaries.
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/weechat", "-r", "/quit"
|
|
end
|
|
end
|