Andrew L. Moore slewsys at
Mon Jan 1 22:25:31 UTC 2018

I came across the discussion of using subports as dependencies rather than variants in MacPorts Trac #126 discussion (

Has splitting some ports into broad categories of subports, e.g., boost_gcc and boost_clang, been considered or even implemented?  I’m thinking that a ${prefix}/etc/macports/subports.conf that takes precedence over variants.conf  could be helpful.

My particular situation is that math/julia builds against gcc7, so that in variants.conf appears:

    +gcc7 +openmpi +openblas

But +gcc7 gets picked up when building devel/boost, and eventually source-highlight, which depends on boost, fails to build because its Portfile doesn't have a +gcc variant.

A workaround is to manually build source-highlight with gcc7, add a line to work/.macports.source-highlight.state:


then finally, run port install.  What I’d like to be able to do is add to a  ${prefix}/etc/macports/subports.conf something like:


which would override the variant +gcc7 in variants.conf.

This is, admittedly, a pretty narrow use case.  Just thought I’d throw it out...

More information about the macports-dev mailing list