diff options
| author | Nibbles 2bits | 2011-11-16 19:36:53 -0800 |
|---|---|---|
| committer | Charlie Sharpsteen | 2011-11-17 12:15:41 -0800 |
| commit | bdbfd5278e868122f92b62b574bdddb1fe2e01d6 (patch) | |
| tree | baa3cf04b66b8eb7a77a465a73e8b63618f248fd /Library/Formula/pkg-config.rb | |
| parent | cbcaa4d247a234e440e73228fdf2d3b8592d7f2c (diff) | |
| download | homebrew-bdbfd5278e868122f92b62b574bdddb1fe2e01d6.tar.bz2 | |
pkg-config: Add gnu89 fixes Lion + Clang
pkg-config append to cflags -std=gnu89 on Lion fixes duplicate
symbols linking libglib when compiling with Clang-3.0 from
XCode-4.2 (4D199). Add make check to confirm success, given the
critical nature of the software. The flag is appended only on
Lion, though it successfully tests on Snow Leopard in 64bit, too.
EDIT: checks if lion and if clang before switching to gnu89.
Closes #8631.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Diffstat (limited to 'Library/Formula/pkg-config.rb')
| -rw-r--r-- | Library/Formula/pkg-config.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Formula/pkg-config.rb b/Library/Formula/pkg-config.rb index fe0b4278c..5f340994b 100644 --- a/Library/Formula/pkg-config.rb +++ b/Library/Formula/pkg-config.rb @@ -10,6 +10,9 @@ class PkgConfig < Formula md5 'a3270bab3f4b69b7dc6dbdacbcae9745' def install + # fixes compile error on Lion with Clang duplicate symbols in libglib + ENV.append_to_cflags '-std=gnu89' if MacOS.lion? and ENV.compiler == :clang + paths = %W[ #{HOMEBREW_PREFIX}/lib/pkgconfig /usr/local/lib/pkgconfig @@ -19,6 +22,8 @@ class PkgConfig < Formula system "./configure", "--disable-debug", "--prefix=#{prefix}", "--with-pc-path=#{paths*':'}" + system "make" + system "make check" system "make install" end end |
