Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

qscintilla2: Updated formula for Python3, Added QtDesigner Plugin #26601

Closed
wants to merge 3 commits into from

Conversation

daviewales
Copy link
Contributor

No description provided.

@daviewales
Copy link
Contributor Author

Hello? Is anyone there?

ENV.append_path "CPLUS_INCLUDE_PATH", "#{include}"
inreplace "designer.pro" do |s|
s.gsub! "$$[QT_INSTALL_LIBS]", lib
s.gsub! "$$[QT_INSTALL_PLUGINS]", "#{HOMEBREW_PREFIX}/Cellar/qt/4.8.5/plugins"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't hardcode the version here. Needs to be a symlink rather than install to this path.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the best way to determine the version of an installed formula?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"#{Formula.factory("qt").opt_prefix}/plugins"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind. I worked it out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it's better to link to the opt prefix than to the Cellar prefix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dakcarto I think you and I are doing similar things with the include path.

I used ENV.append_path "CPLUS_INCLUDE_PATH", "#{include}", rather than adding it to the args.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I completely remove the plugin code, or just comment it out?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeMcQuaid How about moving the ln_sf to post_install, then in the qt formula test for installation of formulae that install a plugin and run their post_install if found? That would re-establish the symlinks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daviewales Remove for now.
@dakcarto Nah, we really need to move plugins to a shared location instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeMcQuaid Yeah that makes more sense. Alternatively, only the third-party plugins could be installed in a shared location, and Qt may be able to be configured to append that directory, similar to the QT_PLUGIN_PATH env var. (Not sure that is possible on Qt's configure setup, though.)

@daviewales
Copy link
Contributor Author

I wonder if we could use qt.conf to set the plugin directory PATH.

@dakcarto
Copy link
Contributor

I think qt.conf is read only during runtime, per application/process. I don't think it can be read globally by Qt for all processes. (Can't find any data to verify this, though.)

@daviewales
Copy link
Contributor Author

I have done some quick tests, and I think you might be right.

Perhaps the easiest thing to do would be to install plugins to $(brew --prefix)/var/qt/plugins, or something similar. I'm not sure how you would set up qt to do that yet.

@dakcarto
Copy link
Contributor

By setting -plugindir <dir> on Qt's configure line, I believe.

Since we are (mostly) just referring to the installation of Qt Designer plugins, it is possible to add some code to the qt formula to define the QT_PLUGIN_PATH env var in the Info.plist of the Desinger.app bundle, under the LSEnvironment section. Here is how I have done this for qgis-20, which is recommend by Apple and skips the need for a launcher script. This would allow proper parsing of multiple directories for Designer, but not be very elegant for other plugin types that would be used by Qt developers, e.g. image or SQL plugins.

In those instances, and if those formulae even exist, the caveats could be updated with a notice about using QT_PLUGIN_PATH, much in the same manner as when using PYTHONPATH.

The separate, shared plugins directory sounds best, though, if it can be correctly managed on uninstall of any formulae.

@MikeMcQuaid
Copy link
Member

-plugindir sounds good.

@daviewales
Copy link
Contributor Author

I've removed the plugin code from this pull request now, by the way.

@adamv adamv added the python label Feb 12, 2014
@daviewales
Copy link
Contributor Author

I've updated this with a Requirement class. Unfortunately it will now fail brew audit, because it uses ARGV.

@daviewales
Copy link
Contributor Author

If we can merge pygobject3 with ARGV errors in brew audit, can we merge this?

spkane pushed a commit to spkane/homebrew that referenced this pull request Mar 3, 2014
Closes Homebrew#26601.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
ehershey pushed a commit to ehershey/homebrew that referenced this pull request Apr 4, 2014
Closes Homebrew#26601.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants