On Sun, Dec 12, 2021 at 3:03 AM Joshua Root <[email protected]> wrote:
> On 2021-12-12 11:54 , Jason Liu wrote: > >> On Sat, Dec 11, 2021 at 6:41 PM Chris Jones <[email protected] >> <mailto:[email protected]>> wrote: >> >>> >>> No, because that would render the port non functional on non darwin >>> OSes. You should only specify the darwin platform when it is >>> actually required, e.g. when then making a os.major conditional that >>> inly makes sense in darwin platforms. >> >> >> >> Wait a minute, didn't Ryan say that "We don't really expect many ports >> to be installable on other operating systems or for maintainers to test >> anything on other operating systems"? So we /should/ worry about the >> port being non-functional on non-Darwin OSes? I'm confused now.... > > > Ports need to be "functional" on non-darwin platforms to the extent that > things like portindex, 'port mirror', and 'port info' work. They don't > need to be actually installable. 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 `platform darwin {`), 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 `platform darwin {` 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? -- Jason Liu On Sun, Dec 12, 2021 at 3:03 AM Joshua Root <[email protected]> wrote: > On 2021-12-12 11:54 , Jason Liu wrote: > > On Sat, Dec 11, 2021 at 6:41 PM Chris Jones <[email protected] > > <mailto:[email protected]>> wrote: > > > > No, because that would render the port non functional on non darwin > > OSes. You should only specify the darwin platform when it is > > actually required, e.g. when then making a os.major conditional that > > inly makes sense in darwin platforms. > > > > > > Wait a minute, didn't Ryan say that "We don't really expect many ports > > to be installable on other operating systems or for maintainers to test > > anything on other operating systems"? So we /should/ worry about the > > port being non-functional on non-Darwin OSes? I'm confused now.... > > Ports need to be "functional" on non-darwin platforms to the extent that > things like portindex, 'port mirror', and 'port info' work. They don't > need to be actually installable. > > > That's why I originally thought that `platforms darwin` implied that the > > portfile was only intended to be valid on Darwin. Now that I've learned > > that `platforms darwin` doesn't actually do anything, I'm just... > confused. > > It means the port is expected to only be installable on darwin. Ports > need to be more or less "valid" anywhere. The platforms option "doesn't > actually do anything" in precisely the same way that statement is true > for the description, i.e. what it does is simply make that information > known to users. > > - Josh >
