[89248] trunk/dports/science/alliance/Portfile
Ryan Schmidt
ryandesign at macports.org
Sun Jan 22 14:20:38 PST 2012
On Jan 22, 2012, at 08:54, Andrea D'Amore wrote:
> On Sun, Jan 22, 2012 at 09:44, Ryan Schmidt wrote:
>> Yes, we should do that; I brought that up here:
>> http://lists.macosforge.org/pipermail/macports-dev/2012-January/017440.html
>
> Why fallback on gcc-4.2 has precedence over apple-gcc-4.2 ?
>
> Anyway I came up with this block:
>
> if {${configure.compiler} == "clang" ||
> ${configure.compiler} == "llvm-gcc-4.2"} {
> configure.compiler gcc-4.2
> if {[vercmp $xcodeversion 4.2] >= 0 || ![file executable ${configure.cc}]} {
> depends_build-append port:apple-gcc42
> configure.compiler apple-gcc-4.2
> }
> }
>
> that should handle our issue, it's falling back on gcc-4.2 before the
> if in order to be able to check $configure.cc on the second clause.
Your block adds the condition "|| ![file executable ${configure.cc}]". I can't think of any case where that would help. The only case where the default compiler was clang or llvm-gcc-4.2 is Xcode 4.x. If the Xcode version is 4.x but less than 4.2, then gcc-4.2 will be available, unless Xcode is not installed properly (solution: install Xcode properly).
Your block also removes the line "configure.cxx ${prefix}/bin/g++-apple-4.2". That line is still necessary until we release a version of MacPorts newer than 2.0.3. See ticket:31709.
Let's continue any further discussion of modifications to this sample code block in the above thread that I started for this.
>> We should update the instructions, then update all ports using that block.
>
> We're still talking about all ports having issues with compilers, right?
I was talking specifically about those ports having issues with both clang and llvm-gcc-4.2 and therefore falling back to gcc-4.2 or apple-gcc-4.2 -- those ports using the third block at wiki:PortfileRecipes#compiler, the block that we're discussing rewriting in the above thread.
More information about the macports-dev
mailing list