[MacPorts] PortfileRecipes modified

MacPorts noreply at macports.org
Mon Mar 25 01:07:04 PDT 2013


Page "PortfileRecipes" was changed by larryv at macports.org
Diff URL: <https://trac.macports.org/wiki/PortfileRecipes?action=diff&version=61>
Revision 61
Comment: re-break lines for better diffs
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: PortfileRecipes
=========================================================================
--- PortfileRecipes (version: 60)
+++ PortfileRecipes (version: 61)
@@ -307,9 +307,23 @@
 
 == Providing compiler variants == #gcc
 
-By default, a port will compile using Apple's Clang or GCC compiler. For most ports this is fine, but some require a recent version of GCC, or are for some reason incompatible with Apple's version. In these cases you can use `configure.compiler` to specify an alternate compiler, for example one provided by a MacPorts GCC port. More commonly, a port specifies such a compiler because it needs GCJ or GFortran, which Apple does not provide. The software may also install a library or use a library built with a different GCC; subtle and difficult-to-find errors can occur if a library and the program using it are not both compiled with the same compiler.
-
-So on the one hand, all such ports should default to using a particular common version of GCC; the version we are currently using as the default version in MacPorts is `gcc47`. On the other hand, a user may want to choose their GCC version. Therefore, ports that need to use a GCC port, but aren't picky about exactly which one, are encouraged to offer variants:
+By default, a port will compile using Apple's Clang or GCC compiler. For
+most ports this is fine, but some require a recent version of GCC, or
+are for some reason incompatible with Apple's version. In these cases
+you can use `configure.compiler` to specify an alternate compiler, for
+example one provided by a MacPorts GCC port. More commonly, a port
+specifies such a compiler because it needs GCJ or GFortran, which Apple
+does not provide. The software may also install a library or use
+a library built with a different GCC; subtle and difficult-to-find
+errors can occur if a library and the program using it are not both
+compiled with the same compiler.
+
+So on the one hand, all such ports should default to using a particular
+common version of GCC; the version we are currently using as the default
+version in MacPorts is `gcc47`. On the other hand, a user may want to
+choose their GCC version. Therefore, ports that need to use a GCC port,
+but aren't picky about exactly which one, are encouraged to offer
+variants:
 
 {{{
 variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 gcc48 description {Compile with gcc 4.3} {
@@ -349,9 +363,21 @@
 }
 }}}
 
-Note that the variants are all marked as conflicting with one another, and that one is chosen by default if the user has not picked one. Note also that the dependencies are library dependencies because programs compiled using these compilers will generally end up linked to at least one of the compiler's libraries (i.e. `libgcc_s.dylib`, `libgfortran.dylib`, etc.).
-
-Setting `configure.compiler` changes the values MacPorts puts in variables like `configure.cc`, `configure.cxx`, `configure.f77`, etc., which MacPorts automatically sets as environment variables during the configure phase. If the software in question doesn't use the configure phase, and you therefore need to pass these variables to the build phase, you must do so in a `pre-build` block; if you try to do so directly in the portfile body, you'll pick up the original values, before the variant changed them.
+Note that the variants are all marked as conflicting with one another,
+and that one is chosen by default if the user has not picked one. Note
+also that the dependencies are library dependencies because programs
+compiled using these compilers will generally end up linked to at least
+one of the compiler's libraries (i.e. `libgcc_s.dylib`,
+`libgfortran.dylib`, etc.).
+
+Setting `configure.compiler` changes the values MacPorts puts in
+variables like `configure.cc`, `configure.cxx`, `configure.f77`, etc.,
+which MacPorts automatically sets as environment variables during the
+configure phase. If the software in question doesn't use the configure
+phase, and you therefore need to pass these variables to the build
+phase, you must do so in a `pre-build` block; if you try to do so
+directly in the portfile body, you'll pick up the original values,
+before the variant changed them.
 
 {{{
 pre-build {
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/PortfileRecipes>
MacPorts <http://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'PortfileRecipes' page.
If it was not you, please report to .


More information about the macports-changes mailing list