about alternative ports and the build bots

René J.V. Bertin rjvbertin at gmail.com
Mon Sep 28 06:59:29 PDT 2015


Hi,

I'd like to bring up something related to alternative ports and the build bots. It concerns my qt5-kde port (submitted on trac), but the principle is more generic.

In short, consider 2 ports that are supposed to be alternatives like port:foo and port:foo-devel, but that are different enough in where they install libraries that their binary forms are not drop-in replacements, and that cannot of course be installed concurrently. To keep this generic, let's assume there's a port:foo-mac which adheres to a Mac-inspired install layout and port:foo-xdg which adheres to a layout that's compatible with the ones used on Linux and other Unixes. Let's also assume that there as always been a foo PortGroup that takes care of defining variables for the various install locations, and that sets up a path: style dependency on port:foo (or one of its alternatives). This PortGroup has been split into foo-mac, foo-kde PortGroups and a general foo PortGroup that can include the appropriate foo "sub PortGroup" as a function of what the user has installed or a preference declared by a dependent port.

So when building a port that depends on foo:
- if foo-xdg is installed and foo.prefer_mac isn't defined, use the foo-xdg PortGroup
- else if foo-mac is installed and foo.prefer_xdg isn't defined, use the foo-mac PortGroup
- else if foo.prefer_xdg is defined, use the foo-xdg PortGroup
- else use the foo-mac PortGroup



More information about the macports-dev mailing list