[113567] trunk/dports/science/root/Portfile

ryandesign at macports.org ryandesign at macports.org
Tue Nov 19 16:49:24 PST 2013


Revision: 113567
          https://trac.macports.org/changeset/113567
Author:   ryandesign at macports.org
Date:     2013-11-19 16:49:24 -0800 (Tue, 19 Nov 2013)
Log Message:
-----------
root: maintainer update to 5.34.12, clean up python variants, add python33 and python34 variants (#41451)

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

Modified: trunk/dports/science/root/Portfile
===================================================================
--- trunk/dports/science/root/Portfile	2013-11-20 00:47:14 UTC (rev 113566)
+++ trunk/dports/science/root/Portfile	2013-11-20 00:49:24 UTC (rev 113567)
@@ -4,8 +4,7 @@
 PortSystem          1.0
 
 name                root
-version             5.34.11
-revision            1
+version             5.34.12
 
 categories          science
 maintainers         gmail.com:mattiafrancescomoro hep.phy.cam.ac.uk:jonesc
@@ -20,8 +19,8 @@
 master_sites        http://root.cern.ch/download/ \
                     ftp://root.cern.ch/root/
 
-checksums           rmd160  d94732b7a40fceb7600be62964bd8497f2a037a9 \
-                    sha256  212b5a34367ba111b3c14ccfdb1e7c99720243482661f0d96794785c177eb648
+checksums           rmd160  551a6373adbc915e4a8740427c1d71f00ebf77ec \
+                    sha256  b471def39ef2ce032a820e46b4c7a699ca0a7f123f4d975a7bf151b49831e802
 
 worksrcdir          root
 
@@ -235,59 +234,46 @@
     configure.args-append   --enable-opengl --enable-builtin-glew
 }
 
-variant python26 conflicts python32 python31 python27 description {Build with python 2.6 support} {
-    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/2.6
-    configure.args-delete   --disable-python
-    configure.args-append   --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}"
-    depends_lib-append      port:python26
-    post-destroot {
-        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
-        set mypysitedir ${mypylibdir}/site-packages/
-        file mkdir ${destroot}${mypysitedir}
-        foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
-        ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
-    }
-}
+# ========================================================================================
+# Setup various python variants
+# ========================================================================================
 
-variant python27 conflicts python32 python31 python26 description {Build with python 2.7 support} {
-    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/2.7
-    configure.args-delete   --disable-python
-    configure.args-append   --enable-python \
-                            --with-python-incdir="${mypydir}/Headers" \
-                            --with-python-libdir="${mypydir}"
-    depends_lib-append      port:python27
-    post-destroot {
-        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
-        set mypysitedir ${mypylibdir}/site-packages/
-        file mkdir ${destroot}${mypysitedir}
-        foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
-        ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
+# List of possible python versions
+set python_versions { 2.6 2.7 3.1 3.2 3.3 3.4 }
+
+# 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}"
     }
+    append variant_line { {} }
+    eval $variant_line
 }
 
-variant python31 conflicts python32 python27 python26 description {Build with python 3.1 support} {
-    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/3.1
-    configure.args-delete   --disable-python
-    configure.args-append   --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}"
-    depends_lib-append      port:python31
-    post-destroot {
-        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1
-        set mypysitedir ${mypylibdir}/site-packages/
-        file mkdir ${destroot}${mypysitedir}
-        foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
-        ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
+# Is a variant active ?
+set active_python_variant ""
+foreach ver ${python_versions} {
+    set ver_no_dot [join [split ${ver} "."] ""]
+    if {[variant_isset python${ver_no_dot}]} {
+        set active_python_variant ${ver} 
     }
 }
 
-variant python32 conflicts python31 python27 python26 description {Build with python 3.2 support} {
-    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/3.2
+# If so, set it up.
+if { ${active_python_variant} != "" } {
+    set ver_no_dot [join [split ${active_python_variant} "."] ""]
+    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_variant}
     configure.args-delete   --disable-python
     configure.args-append   --enable-python \
                             --with-python-incdir="${mypydir}/Headers" \
                             --with-python-libdir="${mypydir}"
-    depends_lib-append      port:python32
+    depends_lib-append      port:python${ver_no_dot}
     post-destroot {
-        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
+        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_variant}/lib/python${active_python_variant}
         set mypysitedir ${mypylibdir}/site-packages/
         file mkdir ${destroot}${mypysitedir}
         foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
@@ -295,6 +281,8 @@
     }
 }
 
+# ========================================================================================
+
 variant ruby description {Build with ruby support} {
     configure.args-delete   --disable-ruby
     configure.args-append   --enable-ruby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131119/d66a7879/attachment.html>


More information about the macports-changes mailing list