aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2014-11-25 21:31:11 +0000
committerMike McQuaid2014-11-28 18:40:55 +0000
commitd12fcb69b9f8aaa29552195baec4c8099fcef32f (patch)
tree44554ddd2725bb74b1e1dd7d6e91e7cde47702cb /Library
parentd62d82ecfff42d23598d2c08223bd347dae6e323 (diff)
downloadhomebrew-d12fcb69b9f8aaa29552195baec4c8099fcef32f.tar.bz2
glog: gflags compatibility fix
Closes #34416. The upstream issue tracker for Glog is pretty dead, and gflags development seems to be outpacing it considerably, so vendoring the old version of gflags is a workaround. Closes #34451. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/glog.rb30
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