checking for variant behaviour

Ryan Schmidt ryandesign at macports.org
Tue Aug 19 22:58:26 PDT 2014


On Aug 17, 2014, at 3:03 PM, Mark Brethen wrote:
> 
> I need info on subport creation if it is done this way.
> 
> For example, the post-build would be common to both. How do you handle this without duplication?

Everything in the portfile is common to the primary port and all subports; you have to explicitly move code into the subport block if you want it to apply only to that subport, or into an "if {${name} eq ${subport}}" block if you want it to apply only to the primary port. Subports were invented so that similar ports can easily share code. Often this is used for different installables that can be created out of a single distfile, or different versions of the same software.



More information about the macports-dev mailing list