qt5: Remove the saved superenv pkg-config setup.

- Qt saves the pkg-config setup from compile time (PKG_CONFIG_LIBDIR). Remove
   this after in `install`. This way pkg-config called from with qmake will be
   controlled by the user's setup.
 - Adresses second half of https://github.com/Homebrew/homebrew/issues/27184
This commit is contained in:
Nikolaus Demmel 2014-04-08 16:32:07 +02:00 committed by Mike McQuaid
parent 78d99121b7
commit 4651a7e875

View file

@ -104,6 +104,11 @@ class Qt5 < Formula
include.install_symlink path => path.parent.basename(".framework")
end
# configure saved the PKG_CONFIG_LIBDIR set up by superenv; remove it
# see: https://github.com/Homebrew/homebrew/issues/27184
inreplace prefix/"mkspecs/qconfig.pri", /\n\n# pkgconfig/, ""
inreplace prefix/"mkspecs/qconfig.pri", /\nPKG_CONFIG_.*=.*$/, ""
Pathname.glob("#{bin}/*.app") { |app| mv app, prefix }
end