From 6d777ea939fbe162d00cb1d6cb7c3ad3ebbf5b3c Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Fri, 20 Feb 2015 09:48:32 +0000 Subject: [PATCH] znc: add icu4c support Closes Homebrew/homebrew#36982. Closes Homebrew/homebrew#36990. Signed-off-by: Mike McQuaid --- Formula/znc.rb | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Formula/znc.rb b/Formula/znc.rb index d4bf202fd4..b04c9e8555 100644 --- a/Formula/znc.rb +++ b/Formula/znc.rb @@ -1,5 +1,3 @@ -require "formula" - class Znc < Formula homepage "http://wiki.znc.in/ZNC" url "http://znc.in/releases/archive/znc-1.6.0.tar.gz" @@ -19,19 +17,23 @@ class Znc < Formula sha1 "83597cccd275a3a4bf8fcc5d8dd5c9048403869a" => :mountain_lion end - option "enable-debug", "Compile ZNC with --enable-debug" + option "with-debug", "Compile ZNC with debug support" + option "with-icu4c", "Build with icu4c for charset support" + + deprecated_option "enable-debug" => "with-debug" depends_on "pkg-config" => :build depends_on "openssl" + depends_on "icu4c" => :optional def install ENV.cxx11 args = ["--prefix=#{prefix}"] - args << "--enable-debug" if build.include? "enable-debug" + args << "--enable-debug" if build.with? "debug" system "./autogen.sh" if build.head? system "./configure", *args - system "make install" + system "make", "install" end plist_options :manual => "znc --foreground" @@ -60,4 +62,10 @@ class Znc < Formula EOS end + + test do + mkdir ".znc" + system bin/"znc", "--makepem" + assert File.exist?(".znc/znc.pem") + end end