[MacPorts] PortfileRecipes modified

MacPorts noreply at macports.org
Tue Jan 24 10:45:38 PST 2012


Changed page "PortfileRecipes" by ryandesign at macports.org from 66.69.204.66*
Page URL: <https://trac.macports.org/wiki/PortfileRecipes>
Diff URL: <https://trac.macports.org/wiki/PortfileRecipes?action=diff&version=35>
Revision 35
Comment: rewrite gcc-4.2 compiler selection block

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: PortfileRecipes
=========================================================================
--- PortfileRecipes (version: 34)
+++ PortfileRecipes (version: 35)
@@ -275,22 +275,22 @@
 }
 }}}
 
-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.
-
-{{{
-if {${configure.compiler} == "clang" ||
-    ${configure.compiler} == "llvm-gcc-4.2"} {
-    configure.compiler gcc-4.2
-    if {![file executable ${configure.cc}]} {
-        depends_build-append port:apple-gcc42
-        configure.compiler apple-gcc-4.2
-        # base (as of 2.0.3) doesn't set cxx for apple-gcc-4.2
-        configure.cxx ${prefix}/bin/g++-apple-4.2
-    }
-}
-}}}
-
 These snippets are taken from [http://lists.macosforge.org/pipermail/macports-dev/2011-July/015263.html this message on macports-dev].
+
+If 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.
+
+{{{
+if {${configure.compiler} == "llvm-gcc-4.2"} {
+   configure.compiler gcc-4.2
+} elseif {${configure.compiler} == "clang"} {
+   depends_build-append port:apple-gcc42
+   configure.compiler apple-gcc-4.2
+   # base (as of 2.0.3) doesn't set cxx for apple-gcc-4.2
+   configure.cxx ${prefix}/bin/g++-apple-4.2
+}
+}}}
+
+This snippet is taken from [http://lists.macosforge.org/pipermail/macports-dev/2012-January/017515.html this message on macports-dev].
 
 == Providing compiler variants == #gcc
 

-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on PortfileRecipes. If it was not you, please
report to .


More information about the macports-changes mailing list