qtN-kde port(s)

René J.V. Bertin rjvbertin at gmail.com
Wed Jul 8 07:30:27 PDT 2015


Hi,

I think we'd be looking at a qt5-1.0.tcl (Qt5 portgroup) payload that boils down to this:

- check the pre-existing context (installed Qt5 port):
-- check for presence of the non-default flavour/port, use that one if found
-- check for presence of the default flavour/port, use that one if found

- No Qt5 installed => check which flavour/port has to be installed
-- check if the calling port indicated a preference for the non-default flavour/port, if so use that one
-- otherwise use the default flavour/port

{{{
# Check what Qt5 installation flavour already exists, or if not if the port calling us
# indicated a preference. If not, use the default/mainstream port:qt5-mac .
if {[file exists ${prefix}/include/qt5/QtCore/QtCore]} {
    # Qt5 has been installed through port:qt5-kde
    PortGroup   qt5-kde 1.0
} elseif {[file exists ${prefix}/libexec/qt5-mac/include/QtCore/QtCore]} {
    # Qt5 has been installed through port:qt5-mac
    PortGroup   qt5-mac 1.0
} elseif {[info exists qt5.prefer_kde]} {
    # The calling port has indicated a preference for port:qt5-kde and
    # Qt5 has hopefully not been installed through the outdated, exclusive port:qt5-mac (5.3.2)
    PortGroup   qt5-kde 1.0
} else {
    # default fall-back to mainstream port:qt5-mac
    PortGroup   qt5-mac 1.0
}
}}}

If I haven't overlooked anything there should be no need to complicate the path:-style dependency declarations in the actual PortGroup files when doing things like this.

R.


More information about the macports-dev mailing list