Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions Formula/freediameter.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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

Expand All @@ -83,4 +91,8 @@ def plist; <<-EOS.undent
</plist>
EOS
end

test do
assert_match version.to_s, shell_output("#{bin}/freeDiameterd --version")
end
end
33 changes: 15 additions & 18 deletions Formula/getdns.rb
Original file line number Diff line number Diff line change
@@ -1,46 +1,43 @@
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
sha256 "db7b5abcbb815b325cf60a334b31eee7f65485bf037895d61b24fb368200ea13" => :el_capitan
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"
Expand All @@ -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

Expand Down
3 changes: 1 addition & 2 deletions Formula/git-annex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
16 changes: 15 additions & 1 deletion Formula/hesiod.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
37 changes: 29 additions & 8 deletions Formula/libidn.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 <idn2.h>
int main() {
return idna_to_ascii_lz(NULL, NULL, 0);
}
EOS
system ENV.cc, "test.c", "-lidn2", "-o", "test"
system "./test"
end
end