diff options
Diffstat (limited to 'Library/Formula/hiredis.rb')
| -rw-r--r-- | Library/Formula/hiredis.rb | 19 | 
1 files changed, 14 insertions, 5 deletions
| diff --git a/Library/Formula/hiredis.rb b/Library/Formula/hiredis.rb index 9edfa47a1..a1d5a95f5 100644 --- a/Library/Formula/hiredis.rb +++ b/Library/Formula/hiredis.rb @@ -1,14 +1,23 @@ -require 'formula' -  class Hiredis < Formula -  homepage 'https://github.com/redis/hiredis' -  url 'https://github.com/redis/hiredis/archive/v0.11.0.tar.gz' -  sha1 '694b6d7a6e4ea7fb20902619e9a2423c014b37c1' +  homepage "https://github.com/redis/hiredis" +  url "https://github.com/redis/hiredis/archive/v0.13.0.tar.gz" +  sha256 "416d6cded4795d2223d8703dd9687259cb8c68445b3f73652eb15887297b15bb" + +  head "https://github.com/redis/hiredis.git"    def install      # Architecture isn't detected correctly on 32bit Snow Leopard without help      ENV["OBJARCH"] = "-arch #{MacOS.preferred_arch}"      system "make", "install", "PREFIX=#{prefix}" +    share.install "examples" +  end + +  test do +    # running `./test` requires a database to connect to, so just make +    # sure it compiles +    system ENV.cc, "-I#{include}/hiredis", "-L#{lib}", "-lhiredis", +           share/"examples/example.c", "-o", testpath/"test" +    File.exist? testpath/"test"    end  end | 
