multiple platform statements

Bryan Blackburn blb at macports.org
Sat Aug 29 14:05:01 PDT 2009


On Sat, Aug 29, 2009 at 03:51:11PM -0500, Adam Mercer said:
> Hi
> 
> In looking into ticket #20868 I have found that the py25-numpy port
> installs the f2py binary into the destroot as f2py2.5 on SL whereas on
> Leopard and Tiger installs it as f2py which I then need to rename in a
> post-destoot section to avoid conflicts. I therefore need to ensure
> that the post-destroot section is not run when using SL. Is there a
> syntax that you can say run this if the platform isn't darwin 10? Or
> do I have to have multiple platform statements for darwin 8 and 9 like
> the following:

You can instead add an if statement into the global post-destroot:

if {${os.major} < 10} {
   move ...
}

Or something similar, tailored to your needs.  Though we may want to still
vaguely seem to support non-darwin, in which case you need to also check
os.platform:

if {${os.platform} == "darwin" && ${os.major} < 10} ...


Bryan

[...]

> 
> Cheers
> 
> Adam


More information about the macports-users mailing list