Qt4 as both framework and library

Michael Dickens michaelld at macports.org
Thu Sep 20 06:26:29 PDT 2012


On Sep 19, 2012, at 10:28 PM, Ryan Schmidt <ryandesign at macports.org>
wrote:
> As for moving to a framework-always install, that seems like a good idea to me. If there are a few ports that have problems with it hopefully they can be patched.

Well, the internals would be compiled as frameworks, and when QMake is
executed "qt_framework" is listed in "QT_CONFIG" -- this option would
not be listed if Qt is build as just libraries.  A very few ports (e.g.,
qwt) look for this variable to determine where to install themselves;
the vast majority use PKGCONFIG or CMake scripts.  CMake looks for
libraries and headers, not frameworks, and because each project tends to
provide its own unique FindQt4.cmake, I can't just patch the same-named
file installed by MacPorts' cmake port.  Hence, the need for sum-linking
libraries and headers so that they are easy to find by any configuration
system looking in the standard locations ( ${prefix}/lib and
${prefix}/include ).  None of the ports I've tried needed patching to
find Qt4 now; some didn't work for other reasons (e.g., "psi" is a mess
when it comes to +universal), but finding Qt4 seems to work well with
this new install.

On Sep 19, 2012, at 16:48, Frank Schima wrote:
> Ideally actually would be to move the +examples and +demos variants into sub-ports - qt4-mac-examples and qt4-mac-demos. 

I like the idea of having qt4-mac have no variants -- "qt4-mac" would
just provide the release frameworks, libraries, headers, and related
resources; no plugins except the minimum required.  All the other things
would be sub-ports or separate ports or whatever the correct term is. 
So, qt4-mac-demos, qt4-mac-debug, qt4-mac-examples,
qt4-mac-postgresql91-plugin, and so forth.  That would make dependencies
much cleaner.  We've started moving the plugins to separate ports,
though not without some issues that I'm looking into as I do the latest
qt4-mac update.  I haven't looked into building examples, demos, or docs
separately, but it seems reasonable that that might work.  So, I'll add
that to my queue once I get the latest qt4-mac out the door.

Good ideas! - MLD


More information about the macports-dev mailing list