2011-03-10 05:11:03 +00:00
|
|
|
class CAres < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
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"
|
2009-09-03 17:18:48 +00:00
|
|
|
|
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
|
|
|
|
|
2015-10-07 01:47:25 +00:00
|
|
|
head do
|
|
|
|
url "https://github.com/bagder/c-ares.git"
|
|
|
|
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
end
|
|
|
|
|
2009-09-03 17:18:48 +00:00
|
|
|
def install
|
2015-10-07 01:47:25 +00:00
|
|
|
system "./buildconf" if build.head?
|
2012-04-28 21:05:50 +00:00
|
|
|
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"
|
2009-09-03 17:18:48 +00:00
|
|
|
end
|
|
|
|
end
|