diff --git a/Formula/freediameter.rb b/Formula/freediameter.rb index abc3196a9ce0..78c949a39ac8 100644 --- a/Formula/freediameter.rb +++ b/Formula/freediameter.rb @@ -1,10 +1,8 @@ class Freediameter < Formula desc "Open source Diameter (Authentication) protocol implementation" homepage "http://www.freediameter.net" - url "http://www.freediameter.net/hg/freeDiameter/archive/1.2.0.tar.gz" - sha256 "0601a7f559af6596dff8e18f5c9b17bc66de50d8e05640aa64a3403a841cb228" - revision 3 - + url "http://www.freediameter.net/hg/freeDiameter/archive/1.2.1.tar.gz" + sha256 "bd7f105542e9903e776aa006c6931c1f5d3d477cb59af33a9162422efa477097" head "http://www.freediameter.net/hg/freeDiameter", :using => :hg bottle do @@ -28,22 +26,32 @@ class Freediameter < Formula end def install + # Support libidn 2.x. Upstream Trac is DOA. + # Emailed help@freediameter.net on 26/04/2017 with patch. + %w[ + cmake/Modules/FindIDNA.cmake + include/freeDiameter/CMakeLists.txt + libfdproto/ostr.c + ].each { |f| inreplace f, "idna.h", "idn2.h" } + inreplace "cmake/Modules/FindIDNA.cmake", "NAMES idn", "NAMES idn2" + args = std_cmake_args + %W[ -DDEFAULT_CONF_PATH=#{etc} -DDISABLE_SCTP=ON + -DIDNA_INCLUDE_DIR=#{Formula["libidn"].opt_include} ] - args << "-DALL_EXTENSIONS=ON" if build.with? "all-extensions" - args << ".." mkdir "build" do - system "cmake", *args + system "cmake", "..", *args system "make" system "make", "install" end prefix.install "doc", "contrib" + end + def post_install unless File.exist?(etc/"freeDiameter.conf") cp prefix/"doc/freediameter.conf.sample", etc/"freeDiameter.conf" end @@ -52,12 +60,12 @@ def install def caveats; <<-EOS.undent To configure freeDiameter, edit #{etc}/freeDiameter.conf to taste. - Sample configuration files can be found in #{prefix}/doc + Sample configuration files can be found in #{opt_prefix}/doc For more information about freeDiameter configuration options, read: http://www.freediameter.net/trac/wiki/Configuration - Other potentially useful files can be found in #{prefix}/contrib + Other potentially useful files can be found in #{opt_prefix}/contrib EOS end @@ -83,4 +91,8 @@ def plist; <<-EOS.undent EOS end + + test do + assert_match version.to_s, shell_output("#{bin}/freeDiameterd --version") + end end diff --git a/Formula/getdns.rb b/Formula/getdns.rb index 5ad9065d2eac..f0bff8c2a0e4 100644 --- a/Formula/getdns.rb +++ b/Formula/getdns.rb @@ -1,9 +1,8 @@ class Getdns < Formula desc "Modern asynchronous DNS API" homepage "https://getdnsapi.net" - url "https://getdnsapi.net/releases/getdns-1-0-0/getdns-1.0.0.tar.gz" - sha256 "a0460269c6536501a7c0af9bc97f9339e05a012f8191d5c10f79042aa62f9e96" - head "https://github.com/getdnsapi/getdns.git", :branch => "develop" + url "https://getdnsapi.net/releases/getdns-1-1-0/getdns-1.1.0.tar.gz" + sha256 "aa47bca275b97f623dc6799cee97d3465fa46521d94bd9892e08e8d5d88f09c3" bottle do sha256 "eb0a9afe598e9611814d9ca21ff7e897dd4b2182df29797f2624a22ed661a892" => :sierra @@ -11,36 +10,34 @@ class Getdns < Formula sha256 "0c372cc5b79342c227df9ab8dc678a064f2ffd351409d8aa5536d6522d7012aa" => :yosemite end - devel do - url "https://getdnsapi.net/releases/getdns-1-1-0-rc1/getdns-1.1.0-rc1.tar.gz" - sha256 "d91ec104b33880ac901f36b8cc01b22f9086fcf7d4ab94c0cbc56336d1f6bec0" + head do + url "https://github.com/getdnsapi/getdns.git", :branch => "develop" + depends_on "libtool" => :build + depends_on "autoconf" => :build + depends_on "automake" => :build end depends_on "openssl" depends_on "unbound" => :recommended - depends_on "libidn" => :recommended depends_on "libevent" => :recommended depends_on "libuv" => :optional depends_on "libev" => :optional - if build.head? - depends_on "libtool" - depends_on "autoconf" - depends_on "automake" - end - def install if build.head? system "glibtoolize", "-ci" system "autoreconf", "-fi" end - args = [ - "--with-ssl=#{Formula["openssl"].opt_prefix}", - "--with-trust-anchor=#{etc}/getdns-root.key", + args = %W[ + --prefix=#{prefix} + --with-ssl=#{Formula["openssl"].opt_prefix} + --with-trust-anchor=#{etc}/getdns-root.key ] + # stringprep support was seemingly dropped in libidn2. + args << "--without-libidn" + args << "--enable-stub-only" if build.without? "unbound" - args << "--without-libidn" if build.without? "libidn" args << "--with-libevent" if build.with? "libevent" args << "--with-libuv" if build.with? "libuv" args << "--with-libev" if build.with? "libev" @@ -49,7 +46,7 @@ def install # https://github.com/getdnsapi/getdns/issues/166 ENV.deparallelize - system "./configure", "--prefix=#{prefix}", *args + system "./configure", *args system "make", "install" end diff --git a/Formula/git-annex.rb b/Formula/git-annex.rb index 11f8a0b5a91f..0fdf86339ff2 100644 --- a/Formula/git-annex.rb +++ b/Formula/git-annex.rb @@ -7,6 +7,7 @@ class GitAnnex < Formula homepage "https://git-annex.branchable.com/" url "https://hackage.haskell.org/package/git-annex-6.20170321/git-annex-6.20170321.tar.gz" sha256 "f86351a99bbfff0285914c4639d2bc68ffcc172a6dacdef164254261cf1f0795" + head "git://git-annex.branchable.com/" bottle do @@ -21,9 +22,7 @@ class GitAnnex < Formula depends_on "cabal-install" => :build depends_on "pkg-config" => :build depends_on "gsasl" - depends_on "libidn" depends_on "libmagic" - depends_on "gnutls" depends_on "quvi" depends_on "xdot" => :recommended diff --git a/Formula/hesiod.rb b/Formula/hesiod.rb index 810fe74b76e8..1b0645969c35 100644 --- a/Formula/hesiod.rb +++ b/Formula/hesiod.rb @@ -15,11 +15,25 @@ class Hesiod < Formula depends_on "libtool" => :build depends_on "libidn" + # Upstream patch for configure.ac, ensures later patch applies cleanly. + patch do + url "https://github.com/achernya/hesiod/commit/0f7999db.patch" + sha256 "3f70b537e2345672b31d2a7f2f50cf3bd794063dde3d24757afd93e7656b563e" + end + + # Adds libidn2 support. + patch do + url "https://github.com/achernya/hesiod/pull/13.patch" + sha256 "a339e1e4d9b825cd248eea641f3fc13239a60b95442a9d9e1d9556becfca174f" + end + def install system "autoreconf", "-fvi" system "./configure", "--disable-dependency-tracking", "--disable-silent-rules", - "--prefix=#{prefix}" + "--prefix=#{prefix}", + "--with-libidn2", + "--without-libidn" system "make", "install" end diff --git a/Formula/libidn.rb b/Formula/libidn.rb index a4e980123693..e9a0e797795f 100644 --- a/Formula/libidn.rb +++ b/Formula/libidn.rb @@ -1,9 +1,9 @@ class Libidn < Formula - desc "International domain name library" - homepage "https://www.gnu.org/software/libidn/" - url "https://ftp.gnu.org/gnu/libidn/libidn-1.33.tar.gz" - mirror "https://ftpmirror.gnu.org/libidn/libidn-1.33.tar.gz" - sha256 "44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19" + desc "International domain name library (IDNA2008, Punycode and TR46)" + homepage "https://www.gnu.org/software/libidn/#libidn2" + url "https://ftp.gnu.org/gnu/libidn/libidn2-2.0.2.tar.gz" + mirror "https://ftpmirror.gnu.org/libidn/libidn2-2.0.2.tar.gz" + sha256 "8cd62828b2ab0171e0f35a302f3ad60c3a3fffb45733318b3a8205f9d187eeab" bottle do cellar :any @@ -13,18 +13,39 @@ class Libidn < Formula sha256 "07e19d25263d77030cccc3899967c4505dcf0c771da90a658b4f27de136a326b" => :mavericks end + head do + url "https://gitlab.com/libidn/libidn2.git" + depends_on "automake" => :build + depends_on "autoconf" => :build + depends_on "libtool" => :build + depends_on "gettext" => :build + depends_on "gengetopt" => :build + end + depends_on "pkg-config" => :build + depends_on "libunistring" def install + system "./bootstrap" if build.head? system "./configure", "--disable-dependency-tracking", + "--disable-silent-rules", "--prefix=#{prefix}", - "--disable-csharp", - "--with-lispdir=#{elisp}" + "--with-packager=Homebrew" system "make", "install" end test do ENV["CHARSET"] = "UTF-8" - system bin/"idn", "räksmörgås.se", "blåbærgrød.no" + system bin/"idn2", "räksmörgås.se", "blåbærgrød.no" + + # Compatibility test for libidn 1.x functions. + (testpath/"test.c").write <<-EOS.undent + #include + int main() { + return idna_to_ascii_lz(NULL, NULL, 0); + } + EOS + system ENV.cc, "test.c", "-lidn2", "-o", "test" + system "./test" end end