On Sunday February 15 2015 15:04:50 Bradley Giesbrecht wrote: > >On Feb 15, 2015, at 10:33 AM, Marko Käning <[email protected]> wrote: > >>> I *think* that the mechanism that's currently in place to let client ports >>> accept qt5-mac-devel instead of qt5-mac should also let them accept >>> qt5-mac[-devel]-kde instead of qt5-mac, but that remains to be confirmed. >> >> Which mechanism is used there? I guess it won’t be as simple >> anymore as using depends_lib: >> --- >> depends_lib-append path:lib/libaqbanking.dylib:aqbanking5 >> --- >> since now the various qt5-mac-* installs will all have very >> different paths... > >I imagine if needed the "path" dependency could be extended to allow multiple >paths: >--- > depends_lib-append > path:lib/qt4-mac/lib.dylib:lib/qt5-mac-kde/lib.dylib:lib/qt5-mac-devel/lib.dylib:qt5-mac
Probably, and yes, that's exactly what's in place. As long as the different variants/subports retain common files in common places the mechanism will continue to suffice. I realise I could have called my proposed "alternative_to" keyword simply "variant_of", an explicit version of the already existing implicit keyword that each port variant uses I cannot recall exactly all the reasons why it's intended that ports cannot depend on another port's variant, but I suspect that the combinatorial nightmare of conflicting variants has something to do with .it. Not so (I think) with a "variant_of" (or alternative_to) keyword: here it's up to the port maintainer to indicate all conflicts, dependencies etc. appropriately. The mechanism should be easy enough to implement in its basic form: the known variants are registered with the "target" port when an alternative port is installed. Then, when port foo declares to depend on port:bar, the system checks to see if bar is installed or any registered alternatives - if not, bar is installed. If multiple alternatives are installed, it's left to port:foo to know how to handle that. The port-dependency that gets recorded for foo is bar (unless a preferred_variant is indicated?) I realise there's more to it than could seem on first sight, but it should be possible to work up something. R. _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
