diff options
| author | Adam Vandenberg | 2014-05-15 20:01:05 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2014-05-15 20:13:17 -0700 |
| commit | d963e45ecdefdd0bbdb6d786aabcff4336024118 (patch) | |
| tree | 70c32f11aedd79c7207f1cafda81e3c7a753e365 /Library/Formula | |
| parent | 8bff98e3fc08747ba5a64c03ef963548e33d360f (diff) | |
| download | homebrew-d963e45ecdefdd0bbdb6d786aabcff4336024118.tar.bz2 | |
suricata: optional geoip support
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/suricata.rb | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Library/Formula/suricata.rb b/Library/Formula/suricata.rb index 1fb1ced9f..03d90a1df 100644 --- a/Library/Formula/suricata.rb +++ b/Library/Formula/suricata.rb @@ -10,6 +10,7 @@ class Suricata < Formula depends_on "libnet" depends_on "libyaml" depends_on "pcre" + depends_on "geoip" => :optional # Use clang provided strl* functions. Reported upstream: # https://redmine.openinfosecfoundation.org/issues/1192 @@ -17,12 +18,21 @@ class Suricata < Formula def install libnet = Formula["libnet"] - system "./configure", "--disable-debug", - "--disable-dependency-tracking", - "--disable-silent-rules", - "--prefix=#{prefix}", - "--with-libnet-includes=#{libnet.opt_include}", - "--with-libnet-libs=#{libnet.opt_lib}" + args = ["--disable-debug", + "--disable-dependency-tracking", + "--disable-silent-rules", + "--prefix=#{prefix}", + "--with-libnet-includes=#{libnet.opt_include}", + "--with-libnet-libs=#{libnet.opt_lib}"] + + if build.with? "geoip" + geoip = Formula["geoip"] + args << "--enable-geoip" + args << "--with-libgeoip-includes=#{geoip.opt_include}" + args << "--with-libgeoip-libs=#{geoip.opt_lib}" + end + + system "./configure", *args system "make", "install" end end |
