diff options
| author | Cameron Walters | 2011-12-28 01:47:05 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-01-28 20:40:35 -0800 |
| commit | 327de8cab667c49f8ec729713f8ce9fd36163dbe (patch) | |
| tree | 1ee77fc9e8006c02090f4808962b62a5fce169bb /Library/Formula | |
| parent | d6de7218c2bd7ec2ab116fe56e669953924e8784 (diff) | |
| download | homebrew-327de8cab667c49f8ec729713f8ce9fd36163dbe.tar.bz2 | |
dnsmasq: add optional IDN support
Depends on libidn only if the option is supplied.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/dnsmasq.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Formula/dnsmasq.rb b/Library/Formula/dnsmasq.rb index 36a040915..f0e53ade4 100644 --- a/Library/Formula/dnsmasq.rb +++ b/Library/Formula/dnsmasq.rb @@ -5,12 +5,23 @@ class Dnsmasq < Formula homepage 'http://www.thekelleys.org.uk/dnsmasq/doc.html' md5 'd10faeb409717eae94718d7716ca63a4' + def options + [['--with-idn', "Compile with IDN support"]] + end + + depends_on "libidn" if ARGV.include? '--with-idn' + def install ENV.deparallelize # Fix etc location inreplace "src/config.h", "/etc/dnsmasq.conf", "#{etc}/dnsmasq.conf" + # Optional IDN support + if ARGV.include? '--with-idn' + inreplace "src/config.h", "/* #define HAVE_IDN */", "#define HAVE_IDN" + end + # Fix compilation on Lion ENV.append_to_cflags "-D__APPLE_USE_RFC_3542" if 10.7 <= MACOS_VERSION inreplace "Makefile" do |s| |
