Requiring a specific variant in depends_lib

Ryan Schmidt ryandesign at macports.org
Sun Dec 18 01:28:57 CET 2016


On Dec 17, 2016, at 09:06, Akim Demaille <akim at lrde.epita.fr> wrote:
> 
> Hi!
> 
> I (try to) maintain the package for vcsn, and there are failures
> on the build farm.  For instance on:
> 
> https://build.macports.org/builders/ports-10.7_x86_64_legacy-watcher/builds/3533
> 
> which leads to
> 
> https://build.macports.org/builders/ports-10.7_x86_64_legacy-builder/builds/18172/steps/install-port/logs/stdio
> 
> which fails with:
> 
> --->  Fetching archive for vcsn
> 
> DEBUG: Executing proc-pre-org.macports.archivefetch-archivefetch-0
> DEBUG: Active variants check for archivefetch-type install considers depends_lib depends_run: boost ccache gmp python35 graphviz py35-ipython
> DEBUG: boost is installed with the following variants: +no_single+no_static+python27
> DEBUG:   required: python35, forbidden: 
> DEBUG:   rejected, because required variant python35 is missing
> Error: org.macports.archivefetch for port vcsn returned: boost must be installed with +python35.
> 
> 
> So my question is: how can I specify that requirement in the Portfile?
> Currently it reads:
> 
> depends_lib         port:boost \
>                   path:bin/ccache:ccache \
>                   port:gmp \
>                   port:python${python_version}
> 
> and I’d like to have something like "port:boost + python${python_version}",
> but it does not work.

Correct, MacPorts base doesn't have this controversial feature. You can fake it using the active_variants portgroup, which you're already doing. It prints the above error telling the user how to resolve the problem manually by installing the correct variant of the dependency, but it cannot be resolved automatically. 


> Or if I can’t say that, what can I do so that vcsn is properly built
> on your buildfarm?

You can't, unless you can eliminate the dependency variant requirement. 


More information about the macports-dev mailing list