Ticket #41451: root.diff

File root.diff, 5.8 KB (added by cjones051073 (Chris Jones), 10 years ago)
  • science/root/Portfile

    old new  
    44PortSystem          1.0
    55
    66name                root
    7 version             5.34.11
    8 revision            1
     7version             5.34.12
    98
    109categories          science
    1110maintainers         gmail.com:mattiafrancescomoro hep.phy.cam.ac.uk:jonesc
     
    2019master_sites        http://root.cern.ch/download/ \
    2120                    ftp://root.cern.ch/root/
    2221
    23 checksums           rmd160  d94732b7a40fceb7600be62964bd8497f2a037a9 \
    24                     sha256  212b5a34367ba111b3c14ccfdb1e7c99720243482661f0d96794785c177eb648
     22checksums           rmd160  551a6373adbc915e4a8740427c1d71f00ebf77ec \
     23                    sha256  b471def39ef2ce032a820e46b4c7a699ca0a7f123f4d975a7bf151b49831e802
    2524
    2625worksrcdir          root
    2726
     
    235234    configure.args-append   --enable-opengl --enable-builtin-glew
    236235}
    237236
    238 variant python26 conflicts python32 python31 python27 description {Build with python 2.6 support} {
    239     set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/2.6
    240     configure.args-delete   --disable-python
    241     configure.args-append   --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}"
    242     depends_lib-append      port:python26
    243     post-destroot {
    244         set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
    245         set mypysitedir ${mypylibdir}/site-packages/
    246         file mkdir ${destroot}${mypysitedir}
    247         foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
    248         ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
    249     }
    250 }
     237# ========================================================================================
     238# Setup various python variants
     239# ========================================================================================
    251240
    252 variant python27 conflicts python32 python31 python26 description {Build with python 2.7 support} {
    253     set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/2.7
    254     configure.args-delete   --disable-python
    255     configure.args-append   --enable-python \
    256                             --with-python-incdir="${mypydir}/Headers" \
    257                             --with-python-libdir="${mypydir}"
    258     depends_lib-append      port:python27
    259     post-destroot {
    260         set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
    261         set mypysitedir ${mypylibdir}/site-packages/
    262         file mkdir ${destroot}${mypysitedir}
    263         foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
    264         ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
     241# List of possible python versions
     242set python_versions { 2.6 2.7 3.1 3.2 3.3 3.4 }
     243
     244# Define the available variants
     245foreach ver ${python_versions} {
     246    set ver_no_dot [join [split ${ver} "."] ""]
     247    set variant_line {variant python${ver_no_dot} description "Build with python ${ver} support"}
     248    foreach over ${python_versions} {
     249        if { ${ver} == ${over} } { continue }
     250        set over_no_dot [join [split ${over} "."] ""]
     251        append variant_line " conflicts python${over_no_dot}"
    265252    }
     253    append variant_line { {} }
     254    eval $variant_line
    266255}
    267256
    268 variant python31 conflicts python32 python27 python26 description {Build with python 3.1 support} {
    269     set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/3.1
    270     configure.args-delete   --disable-python
    271     configure.args-append   --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}"
    272     depends_lib-append      port:python31
    273     post-destroot {
    274         set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1
    275         set mypysitedir ${mypylibdir}/site-packages/
    276         file mkdir ${destroot}${mypysitedir}
    277         foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
    278         ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
     257# Is a variant active ?
     258set active_python_variant ""
     259foreach ver ${python_versions} {
     260    set ver_no_dot [join [split ${ver} "."] ""]
     261    if {[variant_isset python${ver_no_dot}]} {
     262        set active_python_variant ${ver}
    279263    }
    280264}
    281265
    282 variant python32 conflicts python31 python27 python26 description {Build with python 3.2 support} {
    283     set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/3.2
     266# If so, set it up.
     267if { ${active_python_variant} != "" } {
     268    set ver_no_dot [join [split ${active_python_variant} "."] ""]
     269    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_variant}
    284270    configure.args-delete   --disable-python
    285271    configure.args-append   --enable-python \
    286272                            --with-python-incdir="${mypydir}/Headers" \
    287273                            --with-python-libdir="${mypydir}"
    288     depends_lib-append      port:python32
     274    depends_lib-append      port:python${ver_no_dot}
    289275    post-destroot {
    290         set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
     276        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_variant}/lib/python${active_python_variant}
    291277        set mypysitedir ${mypylibdir}/site-packages/
    292278        file mkdir ${destroot}${mypysitedir}
    293279        foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
     
    295281    }
    296282}
    297283
     284# ========================================================================================
     285
    298286variant ruby description {Build with ruby support} {
    299287    configure.args-delete   --disable-ruby
    300288    configure.args-append   --enable-ruby