port:qt5 and (proposed) port:qt5-kde cohabitation

René J.V. Bertin rjvbertin at gmail.com
Fri Oct 7 08:31:40 PDT 2016


On Friday October 07 2016 00:12:41 René J.V. Bertin wrote:

Hi,

> >  - 5 port groups would have to be updated (see comments 30-34 in [1])
> That's a maximum, and this is the main point where we have to come to a consensus.

I've looked into this a bit more. Specifically, I've decided that the somewhat more evolved nature of my cmake PortGroup could justify a higher version number, which makes it possible to coinstall the 2 PortGroups and defer the discussion about what of the additional functionality is moved to the mainstream PortGroup, and how. Port:qt5-kde doesn't depend on cmake anyway so it's pointless to hold up the Qt5 discussion for it (but the KF5 ports do).

I should have another look at exactly how the mainstream *Qmake5* PortGroup interacts with port:qt5-kde . Currently my version of the qmake5 PortGroup just uses a simpler code-path when using the qt5-kde portgroup. 

Leaves the 3 Qt5 PortGroup files. These are harder to get around because of the significant differences. We could merge them into 1 single big file with 3 corresponding sections (common, qt5 "stock" and qt5-kde) but I think that'd be error-prone. I know I wouldn't be immune to edit the wrong section mistakingly.
So to summarise what I have already described elsewhere before:

- The current qt5-1.0.tcl file is renamed to become the "qt5 stock payload". I've called it qt5-mac-1.0.tcl for historical reasons but it could just as well be called qt5-stock-1.0.tcl
- A new qt5-kde-1.0.tcl file is provided which contains the metadata definitions and dependency declarations for port:qt5-kde

Ports that really only want to support one or the other Qt5 port can include those specific PortGroups directly and explicitly.

- A new qt5-1.0.tcl file is provided that is above all an entry point which decides which of the 2 other PortGroups must be included:
 * the user installed port:qt5-kde --> use the qt5-kde PortGroup
 * Qt5 is NOT installed AND the user is installed a port that has indicated a preference for qt5-kde (e.g. a KF5 port) --> use the qt5-kde PortGroup
 * all other cases (= the default) --> use the qt5-mac PortGroup

The qt5-1.0.tcl file also has some common code, notably a procedure through which dependent ports can declare dependencies on specific Qt5 components (QtBase, QtSVG, QtWebkit, etc) without having to worry about how to do this the right way depending on what Qt5 port is installed. That procedure will also make it a lot easier to introduce a port:qt5-devel (for Qt5 5.7) or port:qt5-lts (for 5.6) should there be demand for that one day.

R.


More information about the macports-dev mailing list