platform

Joshua Root jmr at macports.org
Wed Oct 28 16:20:22 PDT 2015


On 2015-10-29 08:40 , Sterling Smith wrote:
> On Oct 28, 2015, at 2:13PM, Joshua Root <jmr at macports.org> wrote:
> 
>> On 2015-10-29 06:02 , David Strubbe wrote:
>>> Hi all,
>>>
>>> Can someone explain what the meaning of the possible values of the
>>> 'platforms' variable are in a Portfile? Most ports seem to list 'darwin'
>>> but I have seen some that say 'macosx' or even 'puredarwin'. I
>>> understand the meaning of clearly different operating system
>>> designations such as freebsd, linux, sunos, netbsd. But what is the
>>> meaning of these similar 'darwin' and 'macosx' labels? The guide is not
>>> very illuminating on this point.
>>
>> Puredarwin is an OS based on Apple's open source Darwin releases and
>> doesn't include any of Apple's proprietary bits. Whereas 'macosx' is
>> what most of us use, OS X. Darwin in this context is the union of
>> puredarwin and macosx (i.e. in 'platforms' it means the port will work
>> on both of them, and in 'platform' statements the body will be executed
>> on both of them).
>>
>> Cf. the os.platform and os.subplatform variables.
>>
>> - Josh
> Is platforms required?  It seems like there is some ambiguity.  Should I put macosx, because I have tried it there?  Or should I put all platforms and then when someone reports that it broke on their system, I can indicate all other systems where it hasn’t yet broken?

The platforms variable is not interpreted in any way by the software at
this time, it is purely informational for users. So don't worry too much
about getting it wrong.

If you know a port requires Apple proprietary frameworks or the like,
use 'macosx' in platforms. Otherwise you would usually just use
'darwin'. You wouldn't usually list 'puredarwin' in platforms because
anything that runs there would also run on OS X. You should only list
platforms that you have tested the port on in any case.

Platforms is currently required in all portfiles, but it would probably
make sense to change that and give it an implicit default of 'darwin'.

- Josh


More information about the macports-dev mailing list