diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/glog.rb | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/Library/Formula/glog.rb b/Library/Formula/glog.rb index bfdcdcf61..54d31864d 100644 --- a/Library/Formula/glog.rb +++ b/Library/Formula/glog.rb @@ -1,11 +1,15 @@ -require 'formula' +require "formula" class Glog < Formula - homepage 'http://code.google.com/p/google-glog/' - url 'https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz' - sha1 'ed40c26ecffc5ad47c618684415799ebaaa30d65' + homepage "https://code.google.com/p/google-glog/" + url "https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz" + sha1 "ed40c26ecffc5ad47c618684415799ebaaa30d65" - depends_on 'gflags' + # Vendor an older version of gflags as the new version makes compile = nope. + resource "gflags" do + url "https://gflags.googlecode.com/files/gflags-2.0.tar.gz" + sha1 "dfb0add1b59433308749875ac42796c41e824908" + end if MacOS.version >= :mavericks # Since 0.3.4 has not yet been released, manually apply @@ -24,8 +28,22 @@ class Glog < Formula end def install + resource("gflags").stage do + system "./configure", "--disable-dependency-tracking", "--prefix=#{libexec}/gflags" + system "make", "install" + end + + # Find our sandboxed gflags. + ENV.append_to_cflags "-I#{libexec}/gflags/include" + ENV.append "LDFLAGS", "-L#{libexec}/gflags/lib" + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make install" + system "make", "install" + end + + test do + assert_equal "#{libexec}/gflags/lib/libgflags.2.dylib (compatibility version 4.0.0, current version 4.0.0)", + shell_output("otool -L #{lib}/libglog.0.dylib | grep libgflags").strip end end |
