<div dir="ltr"><div dir="ltr"><div dir="ltr" class="gmail_attr">On Sun, Dec 12, 2021 at 3:03 AM Joshua Root <<a href="mailto:jmr@macports.org">jmr@macports.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On 2021-12-12 11:54 , Jason Liu wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Sat, Dec 11, 2021 at 6:41 PM Chris Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk" target="_blank">jonesc@hep.phy.cam.ac.uk</a><span class="gmail-Apple-converted-space"> <br></span><mailto:<a href="mailto:jonesc@hep.phy.cam.ac.uk" target="_blank">jonesc@hep.phy.cam.ac.uk</a>>> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="gmail-Apple-converted-space"><br></span>    No, because that would render the port non functional on non darwin<br>    OSes. You should only specify the darwin platform when it is<br>    actually required, e.g. when then making a os.major conditional that<br>    inly makes sense in darwin platforms.</blockquote><span class="gmail-Apple-converted-space"><br></span><span class="gmail-Apple-converted-space"><br></span>Wait a minute, didn't Ryan say that "We don't really expect many ports<span class="gmail-Apple-converted-space"> <br></span>to be installable on other operating systems or for maintainers to test<span class="gmail-Apple-converted-space"> <br></span>anything on other operating systems"? So we /should/ worry about the<span class="gmail-Apple-converted-space"> <br></span>port being non-functional on non-Darwin OSes? I'm confused now....</blockquote><br>Ports need to be "functional" on non-darwin platforms to the extent that<span class="gmail-Apple-converted-space"> </span><br>things like portindex, 'port mirror', and 'port info' work. They don't<span class="gmail-Apple-converted-space"> </span><br>need to be actually installable.</blockquote></div><div dir="ltr"><br></div><div>Ah, so it seems like you're saying that the metadata-related stuff that we typically place near the top of the portfiles (e.g. name, version, categories, description, etc.) should all still be "functional" outside of any sort of specific platform context (and thus shouldn't be wrapped inside of a `<font face="monospace">platform darwin {</font>`), but that it would be alright to wrap the stuff related to the build phases (i.e. fetch, extract, patch, configure, build, destroot, etc.) inside of a `<font face="monospace">platform darwin {</font>` to hide it from other platforms, because the build phases only relate to the "installable" part? Am I getting that right? Or am I still confused?</div><div dir="ltr"><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-- </div><div>Jason Liu</div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 12, 2021 at 3:03 AM Joshua Root <<a href="mailto:jmr@macports.org">jmr@macports.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On 2021-12-12 11:54 , Jason Liu wrote:<br>
> On Sat, Dec 11, 2021 at 6:41 PM Chris Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk" target="_blank">jonesc@hep.phy.cam.ac.uk</a> <br>
> <mailto:<a href="mailto:jonesc@hep.phy.cam.ac.uk" target="_blank">jonesc@hep.phy.cam.ac.uk</a>>> wrote:<br>
> <br>
>     No, because that would render the port non functional on non darwin<br>
>     OSes. You should only specify the darwin platform when it is<br>
>     actually required, e.g. when then making a os.major conditional that<br>
>     inly makes sense in darwin platforms.<br>
> <br>
> <br>
> Wait a minute, didn't Ryan say that "We don't really expect many ports <br>
> to be installable on other operating systems or for maintainers to test <br>
> anything on other operating systems"? So we /should/ worry about the <br>
> port being non-functional on non-Darwin OSes? I'm confused now....<br>
<br>
Ports need to be "functional" on non-darwin platforms to the extent that <br>
things like portindex, 'port mirror', and 'port info' work. They don't <br>
need to be actually installable.<br>
<br>
> That's why I originally thought that `platforms darwin` implied that the <br>
> portfile was only intended to be valid on Darwin. Now that I've learned <br>
> that `platforms darwin` doesn't actually do anything, I'm just... confused.<br>
<br>
It means the port is expected to only be installable on darwin. Ports <br>
need to be more or less "valid" anywhere. The platforms option "doesn't <br>
actually do anything" in precisely the same way that statement is true <br>
for the description, i.e. what it does is simply make that information <br>
known to users.<br>
<br>
- Josh<br>
</blockquote></div></div>