openssh: restore ldns optional dependency (#23646)

This reverts commit ef4e9ee from #13488. (Feasible due to the merger of
https://github.com/Homebrew/homebrew-core/issues/13132#issuecomment-360605107.)
This commit is contained in:
Bryce Glover 2018-02-03 22:27:25 -05:00 committed by ilovezfs
parent 105bb8cbc5
commit 35c840b279

View file

@ -16,6 +16,8 @@ class Openssh < Formula
# https://github.com/Homebrew/homebrew-dupes/pull/482#issuecomment-118994372
depends_on "openssl"
depends_on "ldns" => :optional
depends_on "pkg-config" => :build if build.with? "ldns"
# Both these patches are applied by Apple.
patch do
@ -40,12 +42,18 @@ class Openssh < Formula
# We introduce this issue with patching, it's not an upstream bug.
inreplace "sandbox-darwin.c", "@PREFIX@/share/openssh", etc/"ssh"
system "./configure", "--with-libedit",
"--with-kerberos5",
"--prefix=#{prefix}",
"--sysconfdir=#{etc}/ssh",
"--with-pam",
"--with-ssl-dir=#{Formula["openssl"].opt_prefix}"
args = %W[
--with-libedit
--with-kerberos5
--prefix=#{prefix}
--sysconfdir=#{etc}/ssh
--with-pam
--with-ssl-dir=#{Formula["openssl"].opt_prefix}
]
args << "--with-ldns" if build.with? "ldns"
system "./configure", *args
system "make"
ENV.deparallelize
system "make", "install"