homebrew-core/Formula/c-ares.rb

48 lines
1.4 KiB
Ruby
Raw Normal View History

2011-03-10 05:11:03 +00:00
class CAres < Formula
desc "Asynchronous DNS library"
2015-07-19 10:14:11 +00:00
homepage "http://c-ares.haxx.se/"
url "http://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz"
mirror "https://github.com/bagder/c-ares/archive/cares-1_10_0.tar.gz"
sha256 "3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db"
2015-01-08 03:36:46 +00:00
bottle do
cellar :any
2015-09-14 14:51:15 +00:00
sha256 "68d6374d5665448f947c8cfb2090171c0c865e239a786139f108979138d03a68" => :el_capitan
2015-11-19 15:45:31 +00:00
sha256 "759c64eb8eb50bb4358c13b8ca5a7091156a1dd7a2b97784a641702ae27da2cc" => :yosemite
sha256 "d1619087a66468b5615f630cc9ae09bf666efaf9f7085890f0a951a6359f4bd2" => :mavericks
sha256 "7e3f3e15e8bf502da0f0acc4d57bf296553df15d5fe8f305e6b2adb94ece6c67" => :mountain_lion
2015-01-08 03:36:46 +00:00
end
head do
url "https://github.com/bagder/c-ares.git"
depends_on "automake" => :build
depends_on "autoconf" => :build
depends_on "libtool" => :build
end
def install
system "./buildconf" if build.head?
system "./configure", "--prefix=#{prefix}",
2015-07-19 10:14:11 +00:00
"--disable-dependency-tracking",
"--disable-debug"
system "make", "install"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <stdio.h>
#include <ares.h>
int main()
{
ares_library_init(ARES_LIB_INIT_ALL);
ares_library_cleanup();
return 0;
}
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lcares", "-o", "test"
system "./test"
end
end