[143452] trunk/dports/_resources/port1.0/group/python-1.0.tcl

mcalhoun at macports.org mcalhoun at macports.org
Sat Dec 12 11:00:10 PST 2015


Revision: 143452
          https://trac.macports.org/changeset/143452
Author:   mcalhoun at macports.org
Date:     2015-12-12 10:02:13 -0800 (Sat, 12 Dec 2015)
Log Message:
-----------
python-1.0.tcl: give Portfiles the option of not modifying destroot.env (see #49948,#34562)

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/python-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/python-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/python-1.0.tcl	2015-12-12 17:53:18 UTC (rev 143451)
+++ trunk/dports/_resources/port1.0/group/python-1.0.tcl	2015-12-12 18:02:13 UTC (rev 143452)
@@ -42,6 +42,7 @@
 #   always set this (even if you have your own subport blocks)
 # python.default_version: which version will be installed if the user asks
 #   for py-foo rather than pyXY-foo
+# python.consistent_destroot: set consistent environment values in build and destroot phases
 #
 # Note: setting these options requires name to be set beforehand
 
@@ -69,6 +70,10 @@
 default python.default_version {[python_get_default_version]}
 default python.version {[python_get_version]}
 
+# see #34562
+options python.consistent_destroot
+default python.consistent_destroot yes
+
 proc python_get_version {} {
     if {[string match py-* [option name]]} {
         return [string range [option subport] 2 3]
@@ -146,7 +151,7 @@
             }
         }
         pre-destroot {
-            if {${python.add_archflags}} {
+            if {${python.add_archflags} && ${python.consistent_destroot}} {
                 if {[variant_exists universal] && [variant_isset universal]} {
                     destroot.env-append CFLAGS="${configure.universal_cflags}" \
                                         OBJCFLAGS="${configure.universal_cflags}" \
@@ -162,7 +167,7 @@
                                         LDFLAGS="${configure.ld_archflags}"
                 }
             }
-            if {${python.set_compiler}} {
+            if {${python.set_compiler} && ${python.consistent_destroot}} {
                 foreach var {cc objc cxx fc f77 f90} {
                     if {[set configure.${var}] ne ""} {
                         destroot.env-append [string toupper $var]="[set configure.${var}]"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/e9430b31/attachment.html>


More information about the macports-changes mailing list