Is it possible to specify variant as part of depends_lib?
Craig Treleaven
ctreleaven at cogeco.ca
Thu Apr 19 01:12:43 UTC 2018
> On Apr 18, 2018, at 7:52 PM, Edward Maros <emaros at ligo.caltech.edu> wrote:
>
> On 4/18/18 3:39 PM, Ryan Schmidt wrote:
>> On Apr 18, 2018, at 12:39, Edward Maros wrote:
>>
>>> I have a package (gds) that has a build requirement on port root5 with
>>> the variant +python27.
>>>
>>> Currently the buildbot system will not build the gds package because it
>>> installs the root5 package with only default variants.
>>>
>>> Any ideas on how to get the variant passed (at least for the buildbot
>>> system) so I can address any issues related to the gds package?
>>
>> You can't specify variants in dependencies.
>> See https://trac.macports.org/ticket/126
>>
>> You can use the require_active_variants procedure from the
>> active_variants 1.1 portgroup. There are many portfiles using this
>> procedure that you can use as examples, and take a look at the
>> documentation in the comments at the top of this file:
>>
>> https://github.com/macports/macports-ports/blob/master/_resources/port1.0/group/active_variants-1.1.tcl
> This allows me to check if the variant is active, but does not force the
> buildbot to install the package with the required variant. I may be
> misunderstanding things and if there is a solution I would like to be
> pointed in the direction.
You understand correctly; it isn’t an ideal situation. The buildbots can’t help you as they are presently implemented. This also means that binary archives of gds will not be available. Nor of root5 since a non-default variant is needed.
Note that you can suggest ‘sudo port install gds +python27’ to your users. Even though gds doesn’t use the specified variant, it will be passed down to dependencies as they are installed and thus should be picked up by root5.
Craig
PS The mailing lists are hosted at lists.macports.org now.
More information about the macports-dev
mailing list