homebrew-core/Formula/pdnsrec.rb

69 lines
1.9 KiB
Ruby

class Pdnsrec < Formula
desc "Non-authoritative/recursing DNS server"
homepage "https://www.powerdns.com/recursor.html"
url "https://downloads.powerdns.com/releases/pdns-recursor-4.5.1.tar.bz2"
sha256 "3721a1d0e438a683735f518db1e91da6ace1b90fbfdb9c588adabdf164114e79"
license "GPL-2.0-only"
livecheck do
url "https://downloads.powerdns.com/releases/"
regex(/href=.*?pdns-recursor[._-]v?(\d+(?:\.\d+)+)\.t/i)
end
bottle do
sha256 arm64_big_sur: "31bbebfa2aa6ed5f7345c57154ae25d887780d4df370f20663ce804fc654f4a8"
sha256 big_sur: "7e8f5d78e02e7b1b8ccbcc6ce48b13d1c3c8e7d3afaad732dea7845f5605a14d"
sha256 catalina: "9bca064b267700534483628226e27cdd72fce306c1192e5baaf419a3b9221c97"
sha256 mojave: "a259bd76eb77f13e463a88f2fef1b52d6de05a83ee7a102e7b5d223262388f54"
end
depends_on "pkg-config" => :build
depends_on "boost"
depends_on "lua"
depends_on "openssl@1.1"
on_macos do
depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1100
end
on_linux do
depends_on "gcc"
end
fails_with :clang do
build 1100
cause <<-EOS
Undefined symbols for architecture x86_64:
"MOADNSParser::init(bool, std::__1::basic_string_view<char, std::__1::char_traits<char> > const&)"
EOS
end
fails_with gcc: "5"
def install
ENV.cxx11
ENV.remove "HOMEBREW_LIBRARY_PATHS", Formula["llvm"].opt_lib
on_macos do
ENV.llvm_clang if DevelopmentTools.clang_build_version <= 1100
end
args = %W[
--prefix=#{prefix}
--sysconfdir=#{etc}/powerdns
--disable-silent-rules
--with-boost=#{Formula["boost"].opt_prefix}
--with-libcrypto=#{Formula["openssl@1.1"].opt_prefix}
--with-lua
--without-net-snmp
]
system "./configure", *args
system "make", "install"
end
test do
output = shell_output("#{sbin}/pdns_recursor --version 2>&1")
assert_match "PowerDNS Recursor #{version}", output
end
end