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

qwt: designer plugin fix and new build options #26152

Closed

Conversation

dakcarto
Copy link
Contributor

Designer plugin now works. Added option to build as libs instead of framework. Added qwtmathml option, which is now not built by default.

# update designer plugin linking back to qwt framework/lib
# this is specific to Homebrew and probably (?) doesn't need patched upstream
def patches
DATA
Copy link
Member

Choose a reason for hiding this comment

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

Should use inreplace in that case.

@dakcarto
Copy link
Contributor Author

Updated as per recommendations.

@dakcarto
Copy link
Contributor Author

Any other edits needed?

depends_on 'qt'

def install
inreplace 'qwtconfig.pri' do |s|
# change_make_var won't work because there are leading spaces
s.gsub! /^\s*QWT_INSTALL_PREFIX\s*=(.*)$/, "QWT_INSTALL_PREFIX=#{prefix}"
s.sub! /#(QWT_CONFIG\s*\+= QwtMathML)/, "\\1" if build.with? "qwtmathml"
Copy link
Member

Choose a reason for hiding this comment

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

Is editing files the only way to enable such things? You should be able to set this argument from the command-line (if I remember my QMake correctly).

@adamv
Copy link
Contributor

adamv commented Mar 5, 2014

Any updates here?

@jacknagel
Copy link
Contributor

What needs to be done to move this (and also #26153 and #27692) forward?

@dakcarto
Copy link
Contributor Author

Sorry about the delayed work on these. I started on creating a shared location for Qt4 plugins, but am unsure if that is the best approach.

I guess the questions are:

  • Is HOMEBREW_PREFIX/lib/qt4-plugins the right place (or should it be in share)?
  • Best way to persist the plugin directory structure (accessible, bearer, codecs, designer, etc.) when unlinking/upgrading qt?
  • Best way to ensure other formulae only install symlinks in HOMEBREW_PREFIX/lib/qt4-plugins?

The same issue for qscintilla2's missing Designer plugin as well. There are also possibilities for doing post-bottle-install of extra SQL drivers (or any other plugin type), via separate formulae, where a shared plugin location is again beneficial.

@dakcarto
Copy link
Contributor Author

dakcarto commented Aug 6, 2014

@jacknagel @adamv Updated the branch.

@MikeMcQuaid wrote:

Is editing files the only way to enable such things? You should be able to set this argument from the command-line (if I remember my QMake correctly).

Since QWT_CONFIG += QwtMathML was commented out, I was able to add its config to the command line option for qmake. However, I was not able to find a functional way to do that for anything already defined in qwtconfig.pri, e.g. QwtDesigner.

I tried using the -after option, but this did not work. I think once a config option is hard-coded in an included config file, it needs to be edited there. I may be wrong about this, but I could not find any way to override such configurations via the command line.

Same quandary for #26153 as well.

end

args = ['-config', 'release', '-spec']
args = %W[-config release -spec]
Copy link
Member

Choose a reason for hiding this comment

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

Please don't change stuff like this; I think the previous version is far more readable to people less experienced with Ruby. I've been writing Ruby daily for a few years now and I still forget what most of these do.

@dakcarto
Copy link
Contributor Author

dakcarto commented Aug 6, 2014

Concerning symlinking the Qt Designer plugin to qt's Cellar, which I agree is not ideal at all, could someone please review the possible solution put forth above?

If that is a reasonable approach, I will draft a PR related to it.

@MikeMcQuaid
Copy link
Member

@dakcarto Yeh, you could just create that directory, set up the symlinks in Qt itself and let the various formulae link into it.

@MikeMcQuaid
Copy link
Member

Sorry about the delay with this and thanks!

@MikeMcQuaid MikeMcQuaid closed this Aug 6, 2014
@MikeMcQuaid MikeMcQuaid reopened this Aug 6, 2014
@dakcarto dakcarto deleted the qwt_as-libs_designerplugin branch August 6, 2014 18:13
@apjanke apjanke mentioned this pull request Oct 14, 2015
@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants