specifying needs for qt ports

Ken Cunningham ken.cunningham.webuse at gmail.com
Wed Sep 6 15:27:55 UTC 2017


Hmm. Bit confusing, and these qt PortGroups are a little thin on documentation.


I am working on a port that can build with qt4 or qt5 (any version).

Looking through the PortGroups:

the qmake 1.0 PortGroup sets up the build and calls the qt4 PortGroup
the qt4 PortGroup sets up the proper dependency for qt4-mac

the qmake5 1.0 PortGroup sets up the build and calls the qt5 PortGroup.
the qt5 PortGroup specifies the exact version of qt5 the system can use and sets up the dependencies


So to specify this properly, the correct way appears to be to do only the following, and not add any other dependencies or PortGroups:

===========
if {${os.platform} eq "darwin" && ${os.major} < 11} {
   default_variants-append +qt4
}

variant qt4 description "Enable qt4 instead of qt5" {}

if {[variant_isset qt4]} {
   PortGroup             qmake 1.0
} else {
   PortGroup             qmake5 1.0
}
===============


1. Does that look correct and sufficient? Will it pull in every component of qt5 on each system?

2. What if the Port needs qt56 or greater, say? How would you do that?

3. I don't even want to think about kde - that whole area totally loses me.

Thanks,


Ken






More information about the macports-dev mailing list