2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class PkgConfig < Formula
|
2012-04-28 02:56:56 +00:00
|
|
|
homepage 'http://pkgconfig.freedesktop.org'
|
2011-08-21 13:29:38 +00:00
|
|
|
|
|
|
|
# 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.
|
2012-04-28 02:56:56 +00:00
|
|
|
url 'http://pkgconfig.freedesktop.org/releases/pkg-config-0.25.tar.gz'
|
2011-08-12 23:19:27 +00:00
|
|
|
md5 'a3270bab3f4b69b7dc6dbdacbcae9745'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
|
|
|
def install
|
2011-11-17 03:36:53 +00:00
|
|
|
# fixes compile error on Lion with Clang duplicate symbols in libglib
|
2012-02-14 18:26:00 +00:00
|
|
|
ENV.append_to_cflags '-std=gnu89' if ENV.compiler == :clang
|
2011-11-17 03:36:53 +00:00
|
|
|
|
2010-09-06 18:43:49 +00:00
|
|
|
paths = %W[
|
|
|
|
#{HOMEBREW_PREFIX}/lib/pkgconfig
|
2012-02-14 23:39:37 +00:00
|
|
|
#{HOMEBREW_PREFIX}/share/pkgconfig
|
2010-09-06 18:43:49 +00:00
|
|
|
/usr/local/lib/pkgconfig
|
|
|
|
/usr/lib/pkgconfig
|
|
|
|
/usr/X11/lib/pkgconfig
|
|
|
|
].uniq
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--with-pc-path=#{paths*':'}"
|
2011-11-17 03:36:53 +00:00
|
|
|
system "make"
|
|
|
|
system "make check"
|
2009-06-04 18:21:19 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2011-03-10 05:11:03 +00:00
|
|
|
end
|