glog: gflags compatibility fix
Closes Homebrew/homebrew#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 Homebrew/homebrew#34451. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
14d63ff8cc
commit
cbb9f56169
1 changed files with 24 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue