glog: install pkg-config file

The Autotools build installs a .pc file but the CMake build doesn't,
which causes build failure for e.g. supersonic.

Closes #21800.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2017-12-16 05:21:14 -08:00
parent ebca44d8af
commit 427e3602cd

View file

@ -3,7 +3,7 @@ class Glog < Formula
homepage "https://github.com/google/glog" homepage "https://github.com/google/glog"
url "https://github.com/google/glog/archive/v0.3.5.tar.gz" url "https://github.com/google/glog/archive/v0.3.5.tar.gz"
sha256 "7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0" sha256 "7580e408a2c0b5a89ca214739978ce6ff480b5e7d8d7698a2aa92fadc484d1e0"
revision 2 revision 3
head "https://github.com/google/glog.git" head "https://github.com/google/glog.git"
bottle do bottle do
@ -21,6 +21,21 @@ class Glog < Formula
system "cmake", "..", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args system "cmake", "..", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args
system "make", "install" system "make", "install"
end end
# Upstream PR from 30 Aug 2017 "Produce pkg-config file under cmake"
# See https://github.com/google/glog/pull/239
(lib/"pkgconfig/libglog.pc").write <<~EOS
prefix=#{prefix}
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libglog
Description: Google Log (glog) C++ logging framework
Version: #{stable.version}
Libs: -L${libdir} -lglog
Cflags: -I${includedir}
EOS
end end
test do test do