<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">&lt;<a href="mailto:sebastien.maret@icloud.com" target="_blank">sebastien.maret@icloud.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; Le 15 févr. 2016 à 19:24, Ryan Schmidt &lt;<a href="mailto:ryandesign@macports.org">ryandesign@macports.org</a>&gt; a écrit :<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Feb 15, 2016, at 2:07 AM, Sébastien Maret &lt;<a href="mailto:sebastien.maret@icloud.com">sebastien.maret@icloud.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Le 11 févr. 2016 à 16:19, Ryan Schmidt &lt;<a href="mailto:ryandesign@macports.org">ryandesign@macports.org</a>&gt; a écrit :<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On Feb 11, 2016, at 2:00 AM, Sébastien Maret wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Le 10 févr. 2016 à 16:23, Ryan Schmidt &lt;<a href="mailto:ryandesign@macports.org">ryandesign@macports.org</a>&gt; a écrit :<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Feb 10, 2016, at 8:52 AM, Sébastien Maret wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; 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>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="https://trac.macports.org/ticket/50543" rel="noreferrer" target="_blank">https://trac.macports.org/ticket/50543</a><br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; 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>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; The require_active_variants procedure in the active_variants 1.1 port group.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Thanks. I’ve added the cfitsio +gcc5 in require_active_variants and this solves the problem on Yosemite:<br>
&gt;&gt;&gt;&gt; <a href="https://trac.macports.org/changeset/145605" rel="noreferrer" target="_blank">https://trac.macports.org/changeset/145605</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; However the compilation fails on older MacOS versions because the +gcc5 variant is not available.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Why isn&#39;t the gcc5 variant available on older Mac OS versions?<br>
&gt;&gt;<br>
&gt;&gt; I don’t know. The build bot log for Mountain Lion says:<br>
&gt;&gt;<br>
&gt;&gt; DEBUG: cfitsio is installed with the following variants:<br>
&gt;&gt; DEBUG:   required: gcc5, forbidden:<br>
&gt;&gt; DEBUG:   rejected, because required variant gcc5 is missing<br>
&gt;&gt; Error: org.macports.configure for port gildas returned: cfitsio must be installed with +gcc5.<br>
&gt;&gt;<br>
&gt;&gt; <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>
&gt;&gt;<br>
&gt;&gt; so I thought that the cfitsio +gcc5 variant was missing on that platform. But perhaps I misunderstand the build bot log?<br>
&gt;<br>
&gt; 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>