homebrew-core/Formula/bind.rb
Jack Nagel 53473b6bf5 Clean up MacOS version method usage
The MacOS.version? family of methods (other than "leopard?") are poorly
defined and lead to confusing code. Replace them in formulae with more
explicit comparisons.

"MacOS.version" is a special version object that can be compared to
numerics, symbols, and strings using the standard Ruby comparison
methods.

The old methods were moved to compat when the version comparison code
was merged, and they must remain there "forever", but they should not be
used in new code.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-10 16:16:54 -05:00

35 lines
947 B
Ruby

require 'formula'
class Bind < Formula
homepage 'http://www.isc.org/software/bind/'
url 'ftp://ftp.isc.org/isc/bind9/9.9.1-P2/bind-9.9.1-P2.tar.gz'
version '9.9.1-p2'
sha1 '449b12c32682b5bef64c7b53cd0fc0c6b731c8a7'
depends_on "openssl" if MacOS.version == :leopard
def install
ENV.libxml2
# libxml2 appends one inc dir to CPPFLAGS but bind ignores CPPFLAGS
ENV.append 'CFLAGS', ENV['CPPFLAGS']
ENV['STD_CDEFINES'] = '-DDIG_SIGCHASE=1'
args = [
"--prefix=#{prefix}",
"--enable-threads",
"--enable-ipv6",
]
# For Xcode-only systems we help a bit to find openssl.
# If CLT.installed?, it evaluates to "/usr", which works.
args << "--with-openssl=#{MacOS.sdk_path.to_s}/usr" unless MacOS.version == :leopard
system "./configure", *args
# From the bind9 README: "Do not use a parallel 'make'."
ENV.deparallelize
system "make"
system "make install"
end
end