[87257] trunk/dports/lang/erlang/Portfile

Joshua Root jmr at macports.org
Tue Nov 15 22:51:49 PST 2011


On 2011-11-16 15:16 , Brent Fulgham wrote:
> 
> On Nov 15, 2011, at 10:34 AM, Ryan Schmidt wrote:
> 
>>
>> On Nov 15, 2011, at 00:06, bfulgham at macports.org wrote:
>>>
>>> +    # Erlang seems to have an on-again/off-again relationship with Clang.
>>> +    # As of XCode 4.2, it's off again.
>>> +    if {${configure.compiler} == "clang"} { 
>>> +        configure.compiler llvm-gcc-4.2 
>>> +    } 
>>
>> This block should probably not be restricted to platform darwin 11; Xcode 4.2 exists for darwin 10 too (for paid Apple developer program members).
> 
> Is it possible to have a stanza like this apply to both darwin 10 and 11 in a common area? Or do I need to copy/paste the code in both places?

That would be something like:

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

or: if {${os.platform} == "darwin" && (${os.major} == 10 || ${os.major}
== 11)} { ... }

You don't actually care about the OS version here though, just the Xcode
version. So you'd want either:

if {[rpm-vercomp $xcodeversion 4.2] >= 0} { ... }

or: if {[lrange [split $xcodeversion .] 0 1] == {4 2}} { ... }

depending on how confident you are that this will be fixed in 4.2.1, or
conversely how much you want to have to adjust the check when it is
released.

- Josh


More information about the macports-dev mailing list