[121860] trunk/dports/science/root6/Portfile

mf2k at macports.org mf2k at macports.org
Wed Jul 9 08:24:07 PDT 2014


Revision: 121860
          https://trac.macports.org/changeset/121860
Author:   mf2k at macports.org
Date:     2014-07-09 08:24:07 -0700 (Wed, 09 Jul 2014)
Log Message:
-----------
root6: Fix parse problem with python27 variant. (#44267)

Modified Paths:
--------------
    trunk/dports/science/root6/Portfile

Modified: trunk/dports/science/root6/Portfile
===================================================================
--- trunk/dports/science/root6/Portfile	2014-07-09 15:21:25 UTC (rev 121859)
+++ trunk/dports/science/root6/Portfile	2014-07-09 15:24:07 UTC (rev 121860)
@@ -344,12 +344,17 @@
     set py_ver_no_dot [join [split ${py_ver} "."] ""]
     if {[variant_isset python${py_ver_no_dot}]} {
 
+        set active_python_version        ${py_ver}
+        set active_python_version_no_dot ${py_ver_no_dot}
+
         # Check root5 variants
-        set portname root5
-        if {![catch {set result [active_variants ${portname} python${py_ver_no_dot}]}]} {
-            if {$result} {
-                ui_error "Cannot install ${name} with +python${py_ver_no_dot} variant"
-                return -code error "${portname} port is already installed with +python${py_ver_no_dot} and both cannot be active at once. Pick a different python variant."
+        pre-activate {
+            set portname root5
+            if {![catch {set result [active_variants ${portname} python${active_python_version_no_dot}]}]} {
+                if {$result} {
+                    ui_error "Cannot install ${name} with +python${active_python_version_no_dot} variant"
+                    return -code error "${portname} port is already installed with +python${active_python_version_no_dot} and both cannot be active at once. Pick a different python variant."
+                }
             }
         }
 
@@ -360,7 +365,7 @@
                                 -DPYTHON_LIBRARY="${prefix}/lib/libpython${py_ver}.dylib" \
                                 -DPYTHON_EXECUTABLE="${prefix}/bin/python${py_ver}"
         depends_lib-append      port:python${py_ver_no_dot}
-        set active_python_version ${py_ver}
+        
         post-destroot {
             set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_version}/lib/python${active_python_version}
             set mypysitedir ${mypylibdir}/site-packages/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140709/924ed236/attachment.html>


More information about the macports-changes mailing list