Changes between Version 40 and Version 41 of PortfileRecipes


Ignore:
Timestamp:
Sep 9, 2012, 6:05:33 PM (12 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

rewrite first two compiler override blocks to use compiler.blacklist instead

Legend:

Unmodified
Added
Removed
Modified
  • PortfileRecipes

    v40 v41  
    258258== Specifying which compiler to use based on the version of Xcode == #compiler
    259259
    260 As of MacPorts 2, the default value of configure.compiler is chosen based on Xcode version instead of OS X version. If a certain compiler won't build your port, test whether that compiler has been chosen, and then set a different compiler that does work. When choosing an alternate compiler, keep in mind that as of Xcode 4, we would prefer ports build with clang. If that's not possible, use llvm-gcc-4.2. If neither work, use gcc-4.2, but provide a fallback to apple-gcc-4.2.
     260As of MacPorts 2, the default value of configure.compiler is chosen based on Xcode version instead of OS X version.
     261If a certain compiler won't build your port, blacklist it, and MacPorts will select the next-best compiler.
    261262
    262263If your port works with clang but not llvm-gcc-4.2, do this:
    263264
    264265{{{
    265 if {${configure.compiler} == "llvm-gcc-4.2"} {
    266     configure.compiler clang
    267 }
     266compiler.blacklist llvm-gcc-4.2
    268267}}}
    269268
     
    271270
    272271{{{
    273 if {${configure.compiler} == "clang"} {
    274     configure.compiler llvm-gcc-4.2
    275 }
    276 }}}
    277 
    278 These snippets are taken from [http://lists.macosforge.org/pipermail/macports-dev/2011-July/015263.html this message on macports-dev].
     272compiler.blacklist clang
     273}}}
    279274
    280275If your port works with neither clang nor llvm-gcc-4.2, use gcc-4.2; since on Xcode 4.2 and up (i.e. where the default compiler is clang) there is no included version of gcc-4.2, use apple-gcc-4.2 in that case. Use of this block should be considered a temporary stopgap measure. Please file a bug report with the upstream developers of the software so they can fix it to work with clang and llvm-gcc-4.2. Put a reference to the upstream bug report in the Portfile.