homebrew-core/Formula/ldns.rb
Calle Dybedahl a5e40e3e0d ldns: add option to install with GOST support
By default, ldns is installed without support for the GOST family
of crypto algorithms, since that support requires a newer version
of OpenSSL than that included with OSX. This commit adds an
option to the recipe that turns on GOST support and adds a
dependency on Homebrew-provided OpenSSL.

Closes Homebrew/homebrew#25207.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-12-14 10:07:10 -08:00

39 lines
969 B
Ruby

require 'formula'
class Ldns < Formula
homepage 'http://nlnetlabs.nl/projects/ldns/'
url 'http://nlnetlabs.nl/downloads/ldns/ldns-1.6.16.tar.gz'
sha1 '5b4fc6c5c3078cd061905c47178478cb1015c62a'
option 'with-gost', 'Compile ldns with support for GOST algorithms in DNSSEC'
depends_on :python => :optional
depends_on 'swig' if build.with? 'python'
# gost requires OpenSSL >= 1.0.0
depends_on 'openssl' if build.with? 'gost'
def install
args = %W[
--prefix=#{prefix}
--with-drill
]
if build.with? 'gost'
args << "--with-ssl=#{HOMEBREW_PREFIX}/opt/openssl"
else
args << "--disable-gost"
args << "--with-ssl=#{MacOS.sdk_path}/usr"
end
if build.with? 'python'
args << "--with-pyldns"
ENV['PYTHON_SITE_PKG'] = python.site_packages
end
system "./configure", *args
system "make"
system "make install"
system "make", "install-pyldns" if build.with? 'python'
end
end