dnsmasq: remove options.

Closes #36067.

Signed-off-by: Chongyu Zhu <i@lembacon.com>
This commit is contained in:
Mike McQuaid 2019-01-16 17:01:29 +00:00 committed by Chongyu Zhu
parent c4d80ec6e0
commit af0ccb5f8c
No known key found for this signature in database
GPG key ID: 1A43E3C9100B38F5

View file

@ -10,15 +10,7 @@ class Dnsmasq < Formula
sha256 "c5aedeadca97702f5c0e4beb335f4e3f93de4ef6e3522fbd2399bc084cc78512" => :sierra
end
option "with-libidn", "Compile with IDN support"
option "with-dnssec", "Compile with DNSSEC support"
deprecated_option "with-idn" => "with-libidn"
depends_on "pkg-config" => :build
depends_on "nettle" if build.with? "dnssec"
depends_on "libidn" => :optional
depends_on "gettext" if build.with? "libidn"
def install
ENV.deparallelize
@ -36,23 +28,6 @@ class Dnsmasq < Formula
s.gsub! "/usr/sbin/dnsmasq", HOMEBREW_PREFIX/"sbin/dnsmasq", false
end
# Optional IDN support
if build.with? "libidn"
inreplace "src/config.h", "/* #define HAVE_IDN */", "#define HAVE_IDN"
ENV.append_to_cflags "-I#{Formula["gettext"].opt_include}"
ENV.append "LDFLAGS", "-L#{Formula["gettext"].opt_lib} -lintl"
end
# Optional DNSSEC support
if build.with? "dnssec"
inreplace "src/config.h", "/* #define HAVE_DNSSEC */", "#define HAVE_DNSSEC"
inreplace "dnsmasq.conf.example" do |s|
s.gsub! "#conf-file=%%PREFIX%%/share/dnsmasq/trust-anchors.conf",
"conf-file=#{opt_pkgshare}/trust-anchors.conf"
s.gsub! "#dnssec", "dnssec"
end
end
# Fix compilation on Lion
ENV.append_to_cflags "-D__APPLE_USE_RFC_3542" if MacOS.version >= :lion
inreplace "Makefile" do |s|
@ -60,13 +35,8 @@ class Dnsmasq < Formula
s.change_make_var! "LDFLAGS", ENV.ldflags
end
if build.with? "libidn"
system "make", "install-i18n", "PREFIX=#{prefix}"
else
system "make", "install", "PREFIX=#{prefix}"
end
system "make", "install", "PREFIX=#{prefix}"
pkgshare.install "trust-anchors.conf" if build.with? "dnssec"
etc.install "dnsmasq.conf.example" => "dnsmasq.conf"
end
@ -77,12 +47,6 @@ class Dnsmasq < Formula
(etc/"dnsmasq.d/dhcpc").mkpath
end
def caveats; <<~EOS
To configure dnsmasq, take the default example configuration at
#{etc}/dnsmasq.conf and edit to taste.
EOS
end
plist_options :startup => true
def plist; <<~EOS