class Weechat < Formula desc "Extensible IRC client" homepage "https://www.weechat.org" url "https://weechat.org/files/src/weechat-1.2.tar.gz" sha256 "0f9b00e3fe4d0a4e864111d4231e1756f7be5c1b2b6d17da43bd785ab9f035d8" head "https://github.com/weechat/weechat.git" bottle do sha256 "76442d9f00e028e17d4188bd7c9e48fce5092f13dc200ac6644da5484e539151" => :yosemite sha256 "7a45ae6e8e6f40a3fe7acc71b694cfbee64db8d525d5d439eed6edc80b94aef5" => :mavericks sha256 "e93668032407955e73e3fea60ce79d6f4a00fe39f98e8e5a1b862951f6146caf" => :mountain_lion end option "with-perl", "Build the perl module" option "with-ruby", "Build the ruby module" option "with-curl", "Build with brewed curl" depends_on "cmake" => :build depends_on "gnutls" depends_on "libgcrypt" depends_on "gettext" depends_on "guile" => :optional depends_on "aspell" => :optional depends_on "lua" => :optional depends_on :python => :optional depends_on "curl" => :optional def install args = std_cmake_args args << "-DENABLE_LUA=OFF" if build.without? "lua" args << "-DENABLE_PERL=OFF" if build.without? "perl" args << "-DENABLE_RUBY=OFF" if build.without? "ruby" args << "-DENABLE_ASPELL=OFF" if build.without? "aspell" args << "-DENABLE_GUILE=OFF" if build.without? "guile" args << "-DENABLE_PYTHON=OFF" if build.without? "python" args << "-DENABLE_JAVASCRIPT=OFF" mkdir "build" do system "cmake", "..", *args system "make", "install" end end def caveats; <<-EOS.undent 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 ENV["TERM"] = "xterm" system "weechat", "-r", "/quit" end end