Ticket #37687: root.diff

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

    old new  
    11# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    2 # $Id: Portfile 101697 2013-01-17 14:09:59Z g5pw@macports.org $
     2# $Id: Portfile 99189 2012-10-29 07:10:25Z ryandesign@macports.org $
    33
    44PortSystem          1.0
    55
    66name                root
    77version             5.34.04
    8 revision            0
     8revision            1
    99categories          science
    1010maintainers         gmail.com:mattiafrancescomoro hep.phy.cam.ac.uk:jonesc
    1111license             LGPL-2.1+
     
    5353        --with-cc=${configure.cc} \
    5454        --with-cxx=${configure.cxx} \
    5555        --with-ld=${configure.cxx}
    56     if { [string match "*clang*" ${configure.compiler}] } {
    57         configure.args-append --with-clang
    58     }
    5956    if { ${configure.f77} != "" } {
    6057        configure.args-append --with-f77=${configure.f77}
    6158    }
     
    206203    configure.args-append   --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}"
    207204    depends_lib-append      port:python26
    208205    post-destroot {
    209         set mypysitedir ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
    210         file mkdir ${mypysitedir}
    211         foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${mypysitedir} }
    212         move ${destroot}${prefix}/lib/root/python/genreflex ${mypysitedir}
     206        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
     207        set mypysitedir ${mypylibdir}/site-packages/
     208        file mkdir ${destroot}${mypysitedir}
     209        foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
     210        move ${destroot}${prefix}/lib/root/python/genreflex ${destroot}${mypysitedir}
     211        reinplace "s|/opt/local/lib/root|${mypysitedir}|g" ${destroot}${prefix}/bin/genreflex
     212        reinplace "s|python/genreflex/genreflex.py|genreflex/genreflex.py|g" ${destroot}${prefix}/bin/genreflex
     213        ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
    213214    }
    214215}
    215216
     
    221222                            --with-python-libdir="${mypydir}"
    222223    depends_lib-append      port:python27
    223224    post-destroot {
    224         set mypysitedir ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
    225         file mkdir ${mypysitedir}
    226         foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${mypysitedir} }
    227         move ${destroot}${prefix}/lib/root/python/genreflex ${mypysitedir}
     225        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
     226        set mypysitedir ${mypylibdir}/site-packages/
     227        file mkdir ${destroot}${mypysitedir}
     228        foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
     229        move ${destroot}${prefix}/lib/root/python/genreflex ${destroot}${mypysitedir}
     230        reinplace "s|/opt/local/lib/root|${mypysitedir}|g" ${destroot}${prefix}/bin/genreflex
     231        reinplace "s|python/genreflex/genreflex.py|genreflex/genreflex.py|g" ${destroot}${prefix}/bin/genreflex
     232        ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
    228233    }
    229234}
    230235
     
    234239    configure.args-append   --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}"
    235240    depends_lib-append      port:python31
    236241    post-destroot {
    237         set mypysitedir ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/site-packages/
    238         file mkdir ${mypysitedir}
    239         foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${mypysitedir} }
    240         move ${destroot}${prefix}/lib/root/python/genreflex ${mypysitedir}
     242        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1
     243        set mypysitedir ${mypylibdir}/site-packages/
     244        file mkdir ${destroot}${mypysitedir}
     245        foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
     246        move ${destroot}${prefix}/lib/root/python/genreflex ${destroot}${mypysitedir}
     247        reinplace "s|/opt/local/lib/root|${mypysitedir}|g" ${destroot}${prefix}/bin/genreflex
     248        reinplace "s|python/genreflex/genreflex.py|genreflex/genreflex.py|g" ${destroot}${prefix}/bin/genreflex
     249        ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
    241250    }
    242251}
    243252
     
    249258                            --with-python-libdir="${mypydir}"
    250259    depends_lib-append      port:python32
    251260    post-destroot {
    252         set mypysitedir ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/
    253         file mkdir ${mypysitedir}
    254         foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${mypysitedir} }
    255         move ${destroot}${prefix}/lib/root/python/genreflex ${mypysitedir}
     261        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2
     262        set mypysitedir ${mypylibdir}/site-packages/
     263        file mkdir ${destroot}${mypysitedir}
     264        foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
     265        move ${destroot}${prefix}/lib/root/python/genreflex ${destroot}${mypysitedir}
     266        reinplace "s|/opt/local/lib/root|${mypysitedir}|g" ${destroot}${prefix}/bin/genreflex
     267        reinplace "s|python/genreflex/genreflex.py|genreflex/genreflex.py|g" ${destroot}${prefix}/bin/genreflex
     268        ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
    256269    }
    257270}
    258271
     
    438451#                    F77=${configure.f77}
    439452#}
    440453
    441 # variant cling requires clang31 description {EXPERIMENTAL - Enable cling interpreter backend} {
    442 #       configure.args-append --enable-cling
    443 # }
    444 
    445454# variant kerberos5 description {Build with kerberos5 support} {
    446455#     configure.args-delete   --disable-krb5
    447456#     configure.args-append   --enable-krb5 \