Browse files

qt: add shared 'plugins' path for use by formulae

This path is located in `lib/qt4/plugins` in the Homebrew prefix, thus
formulae wishing to make their plug-ins available to Qt Designer can
install them in `lib/qt4/plugins` inside their formula prefix. These
will be later symlinked into the Homebrew prefix.

This new path is only searched by Qt Designer and in addition to the
path that contains the plug-ins distributed with Qt.
  • Loading branch information...
UniqMartin committed Dec 27, 2015
1 parent c407ef9 commit 80be187665ec72374ed246617fbad0ae5adb62cf
Showing with 11 additions and 1 deletion.
  1. +11 −1 Formula/qt.rb
@@ -1,7 +1,7 @@
class Qt < Formula
desc "Cross-platform application and UI framework"
homepage ""
revision 1
revision 2
head "", :branch => "4.8"
@@ -125,12 +125,22 @@ def install
include.install_symlink path => path.parent.basename(".framework")
# Make `HOMEBREW_PREFIX/lib/qt4/plugins` an additional plug-in search path
# for Qt Designer to support formulae that provide Qt Designer plug-ins.
system "/usr/libexec/PlistBuddy",
"-c", "Add :LSEnvironment:QT_PLUGIN_PATH string \"#{HOMEBREW_PREFIX}/lib/qt4/plugins\"",
Pathname.glob("#{bin}/*.app") { |app| mv app, prefix }
def caveats; <<-EOS.undent
We agreed to the Qt opensource license for you.
If this is unacceptable you should uninstall.
Qt Designer no longer picks up changes to the QT_PLUGIN_PATH environment
variable as it was tweaked to search for plug-ins provided by formulae in

0 comments on commit 80be187

Please sign in to comment.