Ticket #34854: root.Portfile.3.diff

File root.Portfile.3.diff, 15.1 KB (added by cjones051073 (Chris Jones), 12 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 92837 2012-05-09 00:51:48Z ryandesign@macports.org $
     2# $Id: Portfile 90551 2012-03-08 21:13:31Z dports@macports.org $
    33
    44PortSystem          1.0
    55
    66name                root
    7 version             5.32.02
    8 revision            1
     7version             5.34.00
     8revision            0
    99categories          science
    1010maintainers         gmail.com:mattiafrancescomoro hep.phy.cam.ac.uk:jonesc
    1111license             LGPL-2.1+
     
    1919master_sites        http://root.cern.ch/download/ \
    2020                    ftp://root.cern.ch/root/
    2121
    22 checksums           rmd160  0700dbb56adebd07c4e667fa9f78f7a75f59e511 \
    23                     sha256  5f14f50e4489cd74b3c5bdfbfff8379c6aaaf83d3ace3318c62964be6fdc38a2
     22checksums           rmd160  6089493c70f94a1c4edd87ebe79adb9f3570f903 \
     23                    sha256  808e04876dbc9cfbfea54ee11ba35e90382e8ff4219dbdbe2d2236a9dadf7df1
    2424
    2525worksrcdir          root
    2626
     
    2929                    port:pcre \
    3030                    port:Xft2 \
    3131                    port:xorg-libX11 \
    32                     port:xpm \
    3332                    port:zlib \
    3433                    port:jpeg \
    3534                    port:libpng \
    3635                    port:giflib \
    3736                    port:tiff \
    38                     port:gmp
     37                    port:gmp \
     38                    port:xpm \
     39                    port:expat
    3940
    4041patchfiles          patch-configure.diff
    4142
    42 # Clang seems OK now, with the new --with-clang option below
    43 # if {${configure.compiler} == "clang"} {
    44 #      configure.compiler llvm-gcc-4.2
    45 # }
    46 
    4743post-patch {
    4844    reinplace "s|-lfreetype| \`freetype-config --libs\`|g" ${worksrcpath}/config/root-config.in
    4945    reinplace "s|\"/usr/include\"|\"${prefix}/include/\" \"/usr/include\"|g" ${worksrcpath}/configure
     
    5349}
    5450
    5551pre-configure {
    56     if {${configure.compiler} == "clang"} {
     52    configure.args-append \
     53          --with-cc=${configure.cc} \
     54          --with-cxx=${configure.cxx} \
     55          --with-ld=${configure.cxx}
     56    if { [string match "*clang*" ${configure.compiler}] } {
    5757        configure.args-append --with-clang
    58     } else {
    59         if {${configure.compiler} == "macports-clang-3.1"} {
    60             configure.args-append --with-clang
    61         } else {
    62             configure.args-append \
    63              --with-cc=${configure.cc} \
    64              --with-cxx=${configure.cxx} \
    65              --with-ld=${configure.cxx} \
    66              --with-f77=${configure.f77}
    67         }
     58    }
     59    if { ${configure.f77} != "" } {
     60        configure.args-append --with-f77=${configure.f77}
    6861    }
    6962    # the build type (32 or 64 bit) -must- be for first argument
    7063    if {${build_arch} == "i386" || ${build_arch} == "ppc"} {
     
    111104                    --disable-bonjour \
    112105                    --disable-gviz \
    113106                    --disable-soversion \
    114                     --with-x11-libdir=${prefix}/lib \
    115                     --with-xpm-libdir=${prefix}/lib \
     107                    --disable-c++11 \
     108                    --disable-fink \
    116109                    --enable-builtin-ftgl \
    117110                    --enable-mathmore \
    118111                    --enable-genvector \
    119112                    --enable-memstat \
    120113                    --enable-unuran \
    121114                    --enable-reflex \
    122                     --enable-table
     115                    --enable-table \
     116                    --enable-fink
     117
     118# Seem to cause build problems with FTGL ...
     119#                    --with-x11-libdir=${prefix}/lib \
     120#                    --with-xpm-libdir=${prefix}/lib \
    123121
    124122pre-build {
    125123    build.args      CC=${configure.cc} \
     
    235233variant python27 conflicts python32 python31 python26 description {Builds port with python 2.7 support} {
    236234    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/2.7
    237235    configure.args-delete   --disable-python
    238     configure.args-append   --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}"
     236    configure.args-append   --enable-python \
     237                            --with-python-incdir="${mypydir}/Headers" \
     238                            --with-python-libdir="${mypydir}"
    239239    depends_lib-append      port:python27
    240240    post-destroot {
    241241        set mypysitedir ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/
     
    261261variant python32 conflicts python31 python27 python26 description {Builds port with python 3.2 support} {
    262262    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/3.2
    263263    configure.args-delete   --disable-python
    264     configure.args-append   --enable-python --with-python-incdir="${mypydir}/Headers" --with-python-libdir="${mypydir}"
     264    configure.args-append   --enable-python \
     265                            --with-python-incdir="${mypydir}/Headers" \
     266                            --with-python-libdir="${mypydir}"
    265267    depends_lib-append      port:python32
    266268    post-destroot {
    267269        set mypysitedir ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/
     
    294296    depends_lib-append      port:libxml2
    295297}
    296298
    297 variant qt_x11 conflicts qt_mac description {Builds port with Qt support via X11 UI} {
    298     # fix where "qglobal.h" is found in all files that use or reference it
    299     post-patch {
    300         foreach tpf { configure graf2d/qt/src/TGQt.cxx } {
    301             reinplace "s@Qt/qglobal\\.h@QtCore/qglobal\\.h@g" \
    302                 ${worksrcpath}/${tpf}
    303         }
    304         reinplace "/qttestdir/s@Qt@QtCore@g" ${worksrcpath}/configure
    305     }
    306 
    307     configure.env-append    QTDIR=${prefix}/libexec/qt4-x11
    308     configure.args-delete   --disable-qt
    309     configure.args-delete   --disable-qtgsi
    310     configure.args-append   --enable-qt --enable-qtgsi \
    311                             --with-qt-incdir="${prefix}/include" \
    312                             --with-qt-libdir="${prefix}/lib"
    313     depends_lib-append      port:qt4-x11
    314 }
    315 
    316 if {[variant_isset qt_mac]} {
    317     PortGroup qt4 1.0
    318 }
    319 
    320 variant qt_mac conflicts qt_x11 description {Builds port with Qt support via Mac UI} {
    321     post-patch {
    322         # fix where "qglobal.h" is found in all files that use or reference it
    323         foreach tpf { configure graf2d/qt/src/TGQt.cxx } {
    324             reinplace "s@Qt/qglobal\\.h@QtCore/qglobal\\.h@g" \
    325                 ${worksrcpath}/${tpf}
    326         }
    327         reinplace "/qttestdir/s@Qt@QtCore@g" ${worksrcpath}/configure
    328 
    329         # fix library search extensions to include ".la"
    330         # for Qt framework libraries (only)
    331         reinplace "s@\\(\\.so \\.sl \\.dylib \\.dll\\.a\\)@\\1 \\.la@g" \
    332             ${worksrcpath}/configure
    333     }
    334 
    335     configure.args-delete   --disable-qt
    336     configure.args-delete   --disable-qtgsi
    337     configure.args-append   --enable-qt --enable-qtgsi \
    338                             --with-qt-incdir="${prefix}/include" \
    339                             --with-qt-libdir="${prefix}/lib"
    340     depends_lib-append      port:qt4-mac
    341 
    342     post-configure {
    343         # patch up the Makefile.config to handle the QTLIB frameworks correctly
    344         reinplace "/QTLIB\[ \]/s@:= @:= -F${qt_libs_dir} @" \
    345             ${worksrcpath}/config/Makefile.config
    346         reinplace "/QTLIB\[ \]/s@\\(Qt\[^ \]*\\).la@-framework \\1@g" \
    347             ${worksrcpath}/config/Makefile.config
    348     }
    349 }
    350 
    351299variant mysql description {Builds port with mysql support} {
    352300    configure.args-delete   --disable-mysql
    353301    configure.args-append   --enable-mysql \
    354                             --with-mysql-incdir="${prefix}/include" \
    355                             --with-mysql-libdir="${prefix}/lib"
     302                            --with-mysql-incdir="${prefix}/include/mysql5/mysql" \
     303                            --with-mysql-libdir="${prefix}/lib/mysql5/mysql"
    356304    depends_lib-append      port:mysql5
    357305}
    358306
    359 variant postgresql90 description {Builds port with PostgreSQL support} {
     307variant postgresql90 conflicts postgresql92 description {Builds port with PostgreSQL 9.2 support} {
    360308    configure.args-delete   --disable-pgsql
    361309    configure.args-append   --enable-pgsql \
    362310                            --with-pgsql-incdir="${prefix}/include/postgresql90" \
     
    364312    depends_lib-append      port:libpqxx port:postgresql90
    365313}
    366314
     315variant postgresql92 conflicts postgresql90 description {Builds port with PostgreSQL 9.0 support} {
     316    configure.args-delete   --disable-pgsql
     317    configure.args-append   --enable-pgsql \
     318                            --with-pgsql-incdir="${prefix}/include/postgresql92" \
     319                            --with-pgsql-libdir="${prefix}/lib/postgresql92"
     320    depends_lib-append      port:libpqxx port:postgresql92
     321}
     322
    367323variant pythia description {Pythia 8 support for root} {
    368324    configure.args-delete   --disable-pythia8
    369325    configure.args-append   --enable-pythia8 \
     
    372328    depends_lib-append      port:pythia
    373329}
    374330
    375 variant gcc43 conflicts gcc44 gcc45 gcc46 description {Compile using MacPorts gcc 4.3} {
    376     configure.compiler      macports-gcc-4.3
    377     depends_lib-append      port:gcc43
    378 }
    379 
    380 variant gcc44 conflicts gcc43 gcc45 gcc46 description {Compile using MacPorts gcc 4.4} {
    381     configure.compiler      macports-gcc-4.4
    382     depends_lib-append      port:gcc44
     331variant cocoa description {Enables a native OSX cocoa graphical backend instead of using X11} {
     332    # Check we are using a clang compiler
     333    pre-fetch {
     334        if { ![string match "*clang*" ${configure.compiler}] } {
     335            ui_error "The cocoa variant is experimental and can currently only be built"
     336            ui_error "using a clang compiler. Your current compiler is ${configure.compiler}."
     337            ui_error "Please try again using either the clang31 variant, or the system"
     338            ui_error "clang compiler using configure.compiler=clang"
     339            return -code error "Unsupported compiler for cocoa support"
     340        }
     341    }
     342    configure.args-append --enable-cocoa
     343    # Fix a small issue with the cocoa backend where the 'root' command is not created ...
     344    post-destroot {
     345        system "( cd ${destroot}${prefix}/bin ; ln -s root.exe root )"
     346    }
    383347}
    384348
    385 variant gcc45 conflicts gcc43 gcc44 gcc46 description {Compile using MacPorts gcc 4.5} {
     349variant gcc45 conflicts gcc46 gcc47 clang31 description {Compile using MacPorts gcc 4.5} {
    386350    configure.compiler      macports-gcc-4.5
    387351    depends_lib-append      port:gcc45
    388352}
    389353
    390 variant gcc46 conflicts gcc43 gcc44 gcc45 description {Compile using MacPorts gcc 4.6} {
     354variant gcc46 conflicts gcc45 gcc47 clang31 description {Compile using MacPorts gcc 4.6} {
    391355    configure.compiler      macports-gcc-4.6
    392356    depends_lib-append      port:gcc46
    393357}
    394358
    395 # variant clang31 conflicts gcc43 gcc44 gcc45 gcc46 description {EXPERIMENTAL - Compile using MacPorts clang 3.1} {
    396 #     configure.compiler      macports-clang-3.1
    397 #     depends_lib-append      port:clang-3.1
    398 #     configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config"
    399 # }
     359variant gcc47 conflicts gcc45 gcc46 clang31 description {Compile using MacPorts gcc 4.7} {
     360    configure.compiler      macports-gcc-4.7
     361    depends_lib-append      port:gcc47
     362}
     363
     364variant clang31 conflicts gcc47 gcc46 gcc45 description {Compile using MacPorts clang 3.1} {
     365     configure.compiler      macports-clang-3.1
     366     depends_lib-append      port:clang-3.1
     367     configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config-mp-3.1"
     368}
     369
     370livecheck.type              regex
     371livecheck.url               [lindex ${master_sites} 0]
     372livecheck.regex             ${name}_v(\[0-9a-z.\]+)\\.source
     373
     374# ========================================================================================
     375# The following have build issues or are obsolete. Keep just for reference for the moment
     376# ========================================================================================
    400377
    401378# variant cling requires clang31 description {EXPERIMENTAL - Enable cling interpreter backend} {
    402 #     configure.args-append --enable-cling
     379#       configure.args-append --enable-cling
    403380# }
    404381
    405 # Build issues.
    406382# variant kerberos5 description {Builds port with kerberos5 support} {
    407383#     configure.args-delete   --disable-krb5
    408384#     configure.args-append   --enable-krb5 \
     
    411387#      depends_lib-append      port:kerberos5
    412388# }
    413389
    414 # Build issues.
    415390# variant ftgl description {Builds port with ftgl support} {
    416391#     configure.args-delete   --enable-builtin-ftgl
    417392#     configure.args-append   --disable-builtin-ftgl \
     
    420395#     depends_lib-append      port:ftgl
    421396# }
    422397
    423 livecheck.type              regex
    424 livecheck.url               [lindex ${master_sites} 0]
    425 livecheck.regex             ${name}_v(\[0-9a-z.\]+)\\.source
     398# variant qt_x11 conflicts qt_mac description {Builds port with Qt support via X11 UI} {
     399#     # fix where "qglobal.h" is found in all files that use or reference it
     400#     post-patch {
     401#         foreach tpf { configure graf2d/qt/src/TGQt.cxx } {
     402#             reinplace "s@Qt/qglobal\\.h@QtCore/qglobal\\.h@g" \
     403#                 ${worksrcpath}/${tpf}
     404#         }
     405#         reinplace "/qttestdir/s@Qt@QtCore@g" ${worksrcpath}/configure
     406#     }
     407
     408#     configure.env-append    QTDIR=${prefix}/libexec/qt4-x11
     409#     configure.args-delete   --disable-qt
     410#     configure.args-delete   --disable-qtgsi
     411#     configure.args-append   --enable-qt --enable-qtgsi \
     412#                             --with-qt-incdir="${prefix}/include" \
     413#                             --with-qt-libdir="${prefix}/lib"
     414#     depends_lib-append      port:qt4-x11
     415# }
     416
     417# if {[variant_isset qt_mac]} {
     418#     PortGroup qt4 1.0
     419# }
     420
     421# variant qt_mac conflicts qt_x11 description {Builds port with Qt support via Mac UI} {
     422#     post-patch {
     423#         # fix where "qglobal.h" is found in all files that use or reference it
     424#         foreach tpf { configure graf2d/qt/src/TGQt.cxx } {
     425#             reinplace "s@Qt/qglobal\\.h@QtCore/qglobal\\.h@g" \
     426#                 ${worksrcpath}/${tpf}
     427#         }
     428#         reinplace "/qttestdir/s@Qt@QtCore@g" ${worksrcpath}/configure
     429
     430#         # fix library search extensions to include ".la"
     431#         # for Qt framework libraries (only)
     432#         reinplace "s@\\(\\.so \\.sl \\.dylib \\.dll\\.a\\)@\\1 \\.la@g" \
     433#             ${worksrcpath}/configure
     434#     }
     435
     436#     configure.args-delete   --disable-qt
     437#     configure.args-delete   --disable-qtgsi
     438#     configure.args-append   --enable-qt --enable-qtgsi \
     439#                             --with-qt-incdir="${prefix}/include" \
     440#                             --with-qt-libdir="${prefix}/lib"
     441#     depends_lib-append      port:qt4-mac
     442
     443#     post-configure {
     444#         # patch up the Makefile.config to handle the QTLIB frameworks correctly
     445#         reinplace "/QTLIB\[ \]/s@:= @:= -F${qt_libs_dir} @" \
     446#             ${worksrcpath}/config/Makefile.config
     447#         reinplace "/QTLIB\[ \]/s@\\(Qt\[^ \]*\\).la@-framework \\1@g" \
     448#             ${worksrcpath}/config/Makefile.config
     449#     }
     450# }