homebrew-core/Formula/pkg-config.rb
Jack Nagel 902f483c9f pkg-config: add share/pkgconfig to pc-path
According to the pkg-config docs, share/pkgconfig is also a valid
location for pc files, and a few packages in Homebrew insist on sticking
them there. Rather than patch these packages individually, just add
HOMEBREW_PREFIX/share/pkgconfig to the default pc file search path.

Fixes Homebrew/homebrew#10182.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-14 17:39:37 -06:00

30 lines
968 B
Ruby

require 'formula'
class PkgConfig < Formula
homepage 'http://pkg-config.freedesktop.org'
# yes we know pkg-config 0.26 is now out, however it depends on glib
# this is totally ridiculous dependency and we refuse to upgrade until
# someone can prove we must.
url 'http://pkg-config.freedesktop.org/releases/pkg-config-0.25.tar.gz'
md5 'a3270bab3f4b69b7dc6dbdacbcae9745'
def install
# fixes compile error on Lion with Clang duplicate symbols in libglib
ENV.append_to_cflags '-std=gnu89' if ENV.compiler == :clang
paths = %W[
#{HOMEBREW_PREFIX}/lib/pkgconfig
#{HOMEBREW_PREFIX}/share/pkgconfig
/usr/local/lib/pkgconfig
/usr/lib/pkgconfig
/usr/X11/lib/pkgconfig
].uniq
system "./configure", "--disable-debug",
"--prefix=#{prefix}",
"--with-pc-path=#{paths*':'}"
system "make"
system "make check"
system "make install"
end
end