dnsmasq: add optional IDN support
Depends on libidn only if the option is supplied. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
6f40986163
commit
e21059ea24
1 changed files with 11 additions and 0 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue