Changes between Version 34 and Version 35 of PortfileRecipes


Ignore:
Timestamp:
Jan 24, 2012, 6:45:37 PM (12 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

rewrite gcc-4.2 compiler selection block

Legend:

Unmodified
Added
Removed
Modified
  • PortfileRecipes

    v34 v35  
    276276}}}
    277277
    278 If your port works with neither clang nor llvm-gcc-4.2, use gcc-4.2 and add a fallback to apple-gcc-4.2. This 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.
    279 
    280 {{{
    281 if {${configure.compiler} == "clang" ||
    282     ${configure.compiler} == "llvm-gcc-4.2"} {
    283     configure.compiler gcc-4.2
    284     if {![file executable ${configure.cc}]} {
    285         depends_build-append port:apple-gcc42
    286         configure.compiler apple-gcc-4.2
    287         # base (as of 2.0.3) doesn't set cxx for apple-gcc-4.2
    288         configure.cxx ${prefix}/bin/g++-apple-4.2
    289     }
    290 }
    291 }}}
    292 
    293278These snippets are taken from [http://lists.macosforge.org/pipermail/macports-dev/2011-July/015263.html this message on macports-dev].
     279
     280If 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.
     281
     282{{{
     283if {${configure.compiler} == "llvm-gcc-4.2"} {
     284   configure.compiler gcc-4.2
     285} elseif {${configure.compiler} == "clang"} {
     286   depends_build-append port:apple-gcc42
     287   configure.compiler apple-gcc-4.2
     288   # base (as of 2.0.3) doesn't set cxx for apple-gcc-4.2
     289   configure.cxx ${prefix}/bin/g++-apple-4.2
     290}
     291}}}
     292
     293This snippet is taken from [http://lists.macosforge.org/pipermail/macports-dev/2012-January/017515.html this message on macports-dev].
    294294
    295295== Providing compiler variants == #gcc