GithubHelp home page GithubHelp logo

Comments (11)

cartr avatar cartr commented on August 17, 2024

I patch configure to point most of the paths to /usr/local/, which should have all the Qt 4 files symlinked into them. This is necessary to allow qmake and cmake to find WebKit, since WebKit isn't installed in the same Cellar folder as Qt any more.

Is the only issue that _PLUGINS, _IMPORTS, _DATA, and _TRANSLATIONS should be changed?

from homebrew-qt4.

cartr avatar cartr commented on August 17, 2024

Also, do you have a public project/CMakeLists.txt file I could use to reproduce the issue? The file I was using to test stuff cmakes and builds fine on my machine.

from homebrew-qt4.

bblacey avatar bblacey commented on August 17, 2024

The problem seems to be with hardwired paths in the Qt4 formula.

from homebrew-qt4.

cartr avatar cartr commented on August 17, 2024

@bblacey Sorry, I'm not clear on which of the paths are currently wrong. All of them? Just the /usr/local/Cellar/ paths? Or all the paths except for the /usr/local/Cellar/ paths?

from homebrew-qt4.

bblacey avatar bblacey commented on August 17, 2024

Right now, the configure patching sets some of the paths to non-existant paths. At a minimum, they should point to valid paths that exist but ideally paths that work for keg-only installs. The two obvious paths are:

QT_INSTALL_PLUGINS:/usr/local/lib/qt4/plugins
QT_INSTALL_IMPORTS:/usr/local/lib/qt4/imports

Plugins should be /usr/local/Cellar/qt@4/4.8.7/plugins or /usr/local/opt/qt@4/plugins and imports should be /usr/local/Cellar/qt@4/4.8.7/imports or /usr/local/opt/qt@4/translations.

from homebrew-qt4.

bblacey avatar bblacey commented on August 17, 2024

@cartr - what happens if you don't patch those two paths? Will configure set them properly?

from homebrew-qt4.

bblacey avatar bblacey commented on August 17, 2024

@cartr - I also noticed that configure allows you to specify these paths as arguments to configure that seems a bit cleaner than using inreplace. You can see these options using ./configure --help.

 You may use these to separate different parts of the install:

    -bindir <dir> ......... Executables will be installed to <dir>
                            (default PREFIX/bin)
    -libdir <dir> ......... Libraries will be installed to <dir>
                            (default PREFIX/lib)
    -docdir <dir> ......... Documentation will be installed to <dir>
                            (default PREFIX/doc)
    -headerdir <dir> ...... Headers will be installed to <dir>
                            (default PREFIX/include)
    -plugindir <dir> ...... Plugins will be installed to <dir>
                            (default PREFIX/plugins)
    -importdir <dir> ...... Imports for QML will be installed to <dir>
                            (default PREFIX/imports)
    -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
                            (default PREFIX)
    -translationdir <dir> . Translations of Qt programs will be installed to <dir>
                            (default PREFIX/translations)
    -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
                            (default PREFIX/etc/settings)
    -examplesdir <dir> .... Examples will be installed to <dir>
                            (default PREFIX/examples)
    -demosdir <dir> ....... Demos will be installed to <dir>
                            (default PREFIX/demos)

from homebrew-qt4.

cartr avatar cartr commented on August 17, 2024

@bblacey If we don't patch these paths, the ./configure script will set them to /usr/local/Cellar/qt@4/4.8.7/[plugins, imports, bin, etc.]. For most of the paths, this is incorrect and we need to change them to /usr/local/[bin, lib, etc.] -- otherwise, build scripts won't find WebKit. But I think you're right that the Plugins and Imports paths are set incorrectly. In your opinion, would it be better to set them to /usr/local/Cellar/qt@4/4.8.7/[plugins, imports] or /usr/local/opt/qt@4/[plugins, imports]?

Also, the issue with using those ./configure flags is that the path we want Qt to install to (/usr/local/Cellar/qt@4/4.8.7/) and the path we want it to claim it's installed to when someone asks (/usr/local/) are different. So we need to patch ./configure to make qmake report the second path while being installed to the first.

from homebrew-qt4.

bblacey avatar bblacey commented on August 17, 2024

@cartr - either will work but given that the other paths point to the formula's prefix (i.e. /usr/local/Cellar/qt@4/4.8.7), I would probably use the same prefix for the plugins and translations.

from homebrew-qt4.

bblacey avatar bblacey commented on August 17, 2024

I "think" that if just remove the inreplace for those two paths, I think they might be set to the cellar prefix.

from homebrew-qt4.

cartr avatar cartr commented on August 17, 2024

@bblacey I just submitted a Pull Request that fixes this by going the other way: rather than removing the inreplace commands to change the path reported by qmake, it updates the configure arguments to install the plugins and imports in the places qmake currently reports.

I think this solution will be a bit better because it ensures that build scripts receive the same paths even when qt@4's version number changes. It also encourages people to install their plugins into /usr/local/lib/qt4 rather than qt@4's Cellar path which is changed every time the formula updates.

from homebrew-qt4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.