[54368] trunk/base/src/port1.0

mcalhoun at macports.org mcalhoun at macports.org
Sat Jul 25 10:03:12 PDT 2009


Revision: 54368
          http://trac.macports.org/changeset/54368
Author:   mcalhoun at macports.org
Date:     2009-07-25 10:03:12 -0700 (Sat, 25 Jul 2009)
Log Message:
-----------
Some ports assume that any necessary header and library files are found by default by the compiler (e.g. in /usr/include or /usr/local/include).
Changing -I${prefix}/include to -isystem{prefix}/include usually fixes the problem (See r49050, r42207, r49018, r39803, and r47699).
Setting environmental variables CPATH and LIBRARY_PATH should make setting -isystem unnecessary.
Deleting -I${prefix}/include is only required.

Modified Paths:
--------------
    trunk/base/src/port1.0/portmain.tcl
    trunk/base/src/port1.0/portutil.tcl

Modified: trunk/base/src/port1.0/portmain.tcl
===================================================================
--- trunk/base/src/port1.0/portmain.tcl	2009-07-25 16:52:18 UTC (rev 54367)
+++ trunk/base/src/port1.0/portmain.tcl	2009-07-25 17:03:12 UTC (rev 54368)
@@ -48,6 +48,7 @@
 options long_description description homepage license provides conflicts
 options worksrcdir filesdir distname portdbpath libpath distpath sources_conf os.platform os.version os.major os.arch os.endian platforms default_variants install.user install.group macosx_deployment_target
 options universal_variant os.universal_supported
+options compiler.cpath compiler.library_path
 
 # Export options via PortInfo
 options_export name version revision epoch categories maintainers platforms description long_description homepage license provides conflicts
@@ -113,6 +114,9 @@
 
 default universal_variant yes
 
+default compiler.cpath {${prefix}/include}
+default compiler.library_path {${prefix}/lib}
+
 # Select implicit variants
 if {[info exists os.platform] && ![info exists variations(${os.platform})]} { variant_set ${os.platform}}
 if {[info exists os.arch] && ![info exists variations(${os.arch})]} { variant_set ${os.arch} }

Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl	2009-07-25 16:52:18 UTC (rev 54367)
+++ trunk/base/src/port1.0/portutil.tcl	2009-07-25 17:03:12 UTC (rev 54368)
@@ -358,6 +358,12 @@
     if {[option macosx_deployment_target] ne ""} {
         set ${command}.env_array(MACOSX_DEPLOYMENT_TARGET) [option macosx_deployment_target]
     }
+    if {[option compiler.cpath] ne ""} {
+        set ${command}.env_array(CPATH) [join [option compiler.cpath] :]
+    }
+    if {[option compiler.library_path] ne ""} {
+        set ${command}.env_array(LIBRARY_PATH) [join [option compiler.library_path] :]
+    }
 
     # Debug that.
     ui_debug "Environment: [environment_array_to_string ${command}.env_array]"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090725/204ca1a3/attachment.html>


More information about the macports-changes mailing list