Index: Portfile
===================================================================
--- Portfile	(revision 121665)
+++ Portfile	(working copy)
@@ -13,6 +13,7 @@
 # don't forget to update both the git tag and the version
 github.setup        root-mirror root 6-00-02 v
 version             6.00.02
+revision            1
 # this could be a better way to set the version (unless we use a sha sum for the git tag ;)
 # version           [string map {- .} $version]
 set version_major   [lindex [split ${version} .] 0]
@@ -316,18 +317,18 @@
 set default_python_variant +python27
 
 # Define the available variants
-foreach ver ${python_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-    set variant_line {variant python${ver_no_dot} description "Build with python ${ver} support"}
-    foreach over ${python_versions} {
-        if { ${ver} == ${over} } { continue }
-        set over_no_dot [join [split ${over} "."] ""]
-        append variant_line " conflicts python${over_no_dot}"
+foreach py_ver ${python_versions} {
+    set py_ver_no_dot [join [split ${py_ver} "."] ""]
+    set variant_line {variant python${py_ver_no_dot} description "Build with python ${py_ver} support"}
+    foreach py_over ${python_versions} {
+        if { ${py_ver} == ${py_over} } { continue }
+        set py_over_no_dot [join [split ${py_over} "."] ""]
+        append variant_line " conflicts python${py_over_no_dot}"
     }
     append variant_line { { } }
     eval $variant_line
-    if {[variant_isset python${ver_no_dot}]} {
-        if {${default_python_variant} != "+python${ver_no_dot}"} {
+    if {[variant_isset python${py_ver_no_dot}]} {
+        if {${default_python_variant} != "+python${py_ver_no_dot}"} {
             set default_python_variant ""
         }
     }
@@ -338,28 +339,30 @@
 }
 
 # If a python variant is enabled, activate it
-foreach ver ${python_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-    if {[variant_isset python${ver_no_dot}]} {
+set active_python_version ""
+foreach py_ver ${python_versions} {
+    set py_ver_no_dot [join [split ${py_ver} "."] ""]
+    if {[variant_isset python${py_ver_no_dot}]} {
 
         # Check root5 variants
         set portname root5
-        if {![catch {set result [active_variants ${portname} python${ver_no_dot}]}]} {
+        if {![catch {set result [active_variants ${portname} python${py_ver_no_dot}]}]} {
             if {$result} {
-                ui_error "Cannot install ${name} with +python${ver_no_dot} variant"
-                return -code error "${portname} port is already installed with +python${ver_no_dot} and both cannot be active at once. Pick a different python variant."
+                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."
             }
         }
 
         # Setup python
-        set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/${ver}
+        set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/${py_ver}
         configure.args-replace  -Dpython=OFF -Dpython=ON
         configure.args-append   -DPYTHON_INCLUDE_DIR="${mypydir}/Headers" \
-                                -DPYTHON_LIBRARY="${prefix}/lib/libpython${ver}.dylib" \
-                                -DPYTHON_EXECUTABLE="${prefix}/bin/python${ver}"
-        depends_lib-append      port:python${ver_no_dot}
+                                -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/${ver}/lib/python${ver}
+            set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_version}/lib/python${active_python_version}
             set mypysitedir ${mypylibdir}/site-packages/
             file mkdir ${destroot}${mypysitedir}
             foreach pyfile [glob ${destroot}${install_prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir}/ }
@@ -488,13 +491,13 @@
 set clang_versions { 3.3 3.4 3.5 }
 
 # Define the available variants
-foreach ver ${clang_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-    set variant_line {variant clang${ver_no_dot} description "Compile using MacPorts clang ${ver}"}
-    foreach over ${clang_versions} {
-        if { ${ver} == ${over} } { continue }
-        set over_no_dot [join [split ${over} "."] ""]
-        append variant_line " conflicts clang${over_no_dot}"
+foreach clang_ver ${clang_versions} {
+    set clang_ver_no_dot [join [split ${clang_ver} "."] ""]
+    set variant_line {variant clang${clang_ver_no_dot} description "Compile using MacPorts clang ${clang_ver}"}
+    foreach clang_over ${clang_versions} {
+        if { ${clang_ver} == ${clang_over} } { continue }
+        set clang_over_no_dot [join [split ${clang_over} "."] ""]
+        append variant_line " conflicts clang${clang_over_no_dot}"
     }
     append variant_line { { } }
     eval $variant_line
@@ -514,10 +517,10 @@
 
 # Is a variant active ?
 set active_clang_variant ""
-foreach ver ${clang_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-    if {[variant_isset clang${ver_no_dot}]} {
-        set active_clang_variant ${ver}
+foreach clang_ver ${clang_versions} {
+    set clang_ver_no_dot [join [split ${clang_ver} "."] ""]
+    if {[variant_isset clang${clang_ver_no_dot}]} {
+        set active_clang_variant ${clang_ver}
     }
 }
 
@@ -539,25 +542,25 @@
 set gcc_versions { 4.7 4.8 4.9 }
 set default_fortran_variant +gcc48
 
-foreach ver ${gcc_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
+foreach gcc_ver ${gcc_versions} {
+    set gcc_ver_no_dot [join [split ${gcc_ver} "."] ""]
 
-    set variant_line {variant gcc${ver_no_dot} description "Build with gfortran from gcc${ver_no_dot}"}
+    set variant_line {variant gcc${gcc_ver_no_dot} description "Build with gfortran from gcc${gcc_ver_no_dot}"}
 
-    foreach over ${gcc_versions} {
-        if {${ver} == ${over}} {
+    foreach gcc_over ${gcc_versions} {
+        if {${gcc_ver} == ${gcc_over}} {
             continue
         }
+        set gcc_over_no_dot [join [split ${gcc_over} "."] ""]
+        append variant_line " conflicts gcc${gcc_over_no_dot}"
+    }
 
-        set over_no_dot [join [split ${over} "."] ""]
-        append variant_line " conflicts gcc${over_no_dot}"
-    }
     append variant_line { {} }
 
     eval $variant_line
 
-    if {[variant_isset gcc${ver_no_dot}]} {
-        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
+    if {[variant_isset gcc${gcc_ver_no_dot}]} {
+        if {${default_fortran_variant} != "+gcc${gcc_ver_no_dot}"} {
             set default_fortran_variant ""
         }
     }
@@ -567,16 +570,16 @@
     default_variants-append "${default_fortran_variant}"
 }
 
-foreach ver ${gcc_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
+foreach gcc_ver ${gcc_versions} {
+    set gcc_ver_no_dot [join [split ${gcc_ver} "."] ""]
 
-    if {[variant_isset gcc${ver_no_dot}]} {
+    if {[variant_isset gcc${gcc_ver_no_dot}]} {
         depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-        depends_build-append port:gcc${ver_no_dot}
+        depends_build-append port:gcc${gcc_ver_no_dot}
 
-        configure.fc  ${prefix}/bin/gfortran-mp-${ver}
-        configure.f77 ${prefix}/bin/gfortran-mp-${ver}
-        configure.f90 ${prefix}/bin/gfortran-mp-${ver}
+        configure.fc  ${prefix}/bin/gfortran-mp-${gcc_ver}
+        configure.f77 ${prefix}/bin/gfortran-mp-${gcc_ver}
+        configure.f90 ${prefix}/bin/gfortran-mp-${gcc_ver}
 
         configure.args-replace -Dfortran=OFF -Dfortran=ON
     }
