From 4651a7e87533a37fbf169ff74f56945836d92d71 Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Tue, 8 Apr 2014 16:32:07 +0200 Subject: [PATCH] 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 --- Formula/qt5.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Formula/qt5.rb b/Formula/qt5.rb index e5634c27f1..bc8a5cbeb0 100644 --- a/Formula/qt5.rb +++ b/Formula/qt5.rb @@ -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