<div dir="ltr">Hi Sébastien and Ryan,<div><br></div><div>The solution discussed here will solve the problem but is unnecessarily restrictive by using only +gcc5. What you should do is this line instead:</div><div><br></div><div>compilers.enforce_some_fortran cfitsio</div><div><br></div><div>Then any of the Fortran variants gcc5, g95, gcc49 etc. will be accepted. This is part of the compilers portgroup. <br><div><br></div><div>David</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 16, 2016 at 4:09 AM, Sébastien Maret <span dir="ltr"><<a href="mailto:sebastien.maret@icloud.com" target="_blank">sebastien.maret@icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> Le 15 févr. 2016 à 19:24, Ryan Schmidt <<a href="mailto:ryandesign@macports.org">ryandesign@macports.org</a>> a écrit :<br>
><br>
>><br>
>> On Feb 15, 2016, at 2:07 AM, Sébastien Maret <<a href="mailto:sebastien.maret@icloud.com">sebastien.maret@icloud.com</a>> wrote:<br>
>><br>
>>><br>
>>> Le 11 févr. 2016 à 16:19, Ryan Schmidt <<a href="mailto:ryandesign@macports.org">ryandesign@macports.org</a>> a écrit :<br>
>>><br>
>>> On Feb 11, 2016, at 2:00 AM, Sébastien Maret wrote:<br>
>>>><br>
>>>>> Le 10 févr. 2016 à 16:23, Ryan Schmidt <<a href="mailto:ryandesign@macports.org">ryandesign@macports.org</a>> a écrit :<br>
>>>>><br>
>>>>> On Feb 10, 2016, at 8:52 AM, Sébastien Maret wrote:<br>
>>>>><br>
>>>>>> I am maintaining the Gildas port which depends on the CFITSIO library. CFITSIO has a Fortran interface but it is not built by default: one need to select a specific variant (e.g. +gcc 5) for this. This is a problem for the Gildas because the compilation fails without the Fortran interface:<br>
>>>>>> <a href="https://trac.macports.org/ticket/50543" rel="noreferrer" target="_blank">https://trac.macports.org/ticket/50543</a><br>
>>>>>><br>
>>>>>> Is there a way for a port to depend on a specific variant of another port? If not then how can I solve this?<br>
>>>>><br>
>>>>> The require_active_variants procedure in the active_variants 1.1 port group.<br>
>>>><br>
>>>> Thanks. I’ve added the cfitsio +gcc5 in require_active_variants and this solves the problem on Yosemite:<br>
>>>> <a href="https://trac.macports.org/changeset/145605" rel="noreferrer" target="_blank">https://trac.macports.org/changeset/145605</a><br>
>>>><br>
>>>> However the compilation fails on older MacOS versions because the +gcc5 variant is not available.<br>
>>><br>
>>> Why isn't the gcc5 variant available on older Mac OS versions?<br>
>><br>
>> I don’t know. The build bot log for Mountain Lion says:<br>
>><br>
>> DEBUG: cfitsio is installed with the following variants:<br>
>> DEBUG: required: gcc5, forbidden:<br>
>> DEBUG: rejected, because required variant gcc5 is missing<br>
>> Error: org.macports.configure for port gildas returned: cfitsio must be installed with +gcc5.<br>
>><br>
>> <a href="https://build.macports.org/builders/buildports-mtln-x86_64/builds/27804/steps/compile/logs/stdio/text" rel="noreferrer" target="_blank">https://build.macports.org/builders/buildports-mtln-x86_64/builds/27804/steps/compile/logs/stdio/text</a><br>
>><br>
>> so I thought that the cfitsio +gcc5 variant was missing on that platform. But perhaps I misunderstand the build bot log?<br>
><br>
> I think you misunderstand. This message is generated by the active_variants 1.1 portgroup. It means that gildas requires the cfitsio port to be installed with the +gcc5 variant, but the user (in this case, the buildbot) did not do that (in this case, because it is not a default variant, and the buildbot only builds default variants). So, nothing about this situation should really be OS X-version-specific.<br>
<br>
</span>OK, thanks for the clarifications.<br>
<span class="HOEnZb"><font color="#888888"><br>
Sébastien<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
macports-dev mailing list<br>
<a href="mailto:macports-dev@lists.macosforge.org">macports-dev@lists.macosforge.org</a><br>
<a href="https://lists.macosforge.org/mailman/listinfo/macports-dev" rel="noreferrer" target="_blank">https://lists.macosforge.org/mailman/listinfo/macports-dev</a><br>
</div></div></blockquote></div><br></div>