homebrew-core/Formula/c-ares.rb

39 lines
1.1 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"
head "https://github.com/bagder/c-ares.git"
2015-01-08 03:36:46 +00:00
bottle do
cellar :any
sha1 "aa711a345bac4780f2e7737c212c1fb5f7862de8" => :yosemite
sha1 "c6851c662552524fa92e341869a23ea72dbc4375" => :mavericks
sha1 "27494a19ac612daedeb55356e911328771f94b19" => :mountain_lion
end
def install
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