Ticket #42867: root.diff

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

    old new  
    44PortSystem          1.0
    55
    66name                root
    7 version             5.34.17
     7version             5.34.18
    88
    99categories          science
    1010maintainers         gmail.com:mattiafrancescomoro hep.phy.cam.ac.uk:jonesc
     
    1919master_sites        http://root.cern.ch/download/ \
    2020                    ftp://root.cern.ch/root/
    2121
    22 checksums           rmd160  0770aeb370699162c0f02c561060ee5388dd5ddb \
    23                     sha256  8e7e13d41e13b6837a3bc784f86e491bed2ee37c157a3be8c74ead9b33c2be8a
     22checksums           rmd160  2fbaff8f831611779b42480fcb86cbde34ef72bd \
     23                    sha256  9196dce7d76b31e5bcabd985bd31bc4d9b7c8c4d0c7ce84f730efa4ef82a3567
    2424
    2525worksrcdir          root
    2626
     
    389389variant cocoa conflicts x11 description {Enables native OSX graphical backend} {
    390390    # Force a compatible clang compiler
    391391    PortGroup compiler_blacklist_versions 1.0
    392     compiler.blacklist-append {clang < 425} *gcc* macports-clang-3.3 macports-clang-2.9 macports-clang-3.0
    393     compiler.fallback-append macports-clang-3.2 macports-clang-3.1
     392    compiler.blacklist-append {clang < 425} *gcc* macports-clang-3.2 macports-clang-3.1 macports-clang-3.0 macports-clang-2.9
     393    compiler.fallback-append macports-clang-3.4 macports-clang-3.3
    394394    # Enable cocoa support in configure
    395395    configure.args-delete --disable-cocoa
    396396    configure.args-append --enable-cocoa
     
    410410    default_variants-append ${default_gui_variant}
    411411}
    412412
    413 variant clang31 conflicts clang32 clang33 description {Compile using MacPorts clang 3.1} {
    414     configure.compiler      macports-clang-3.1
    415 }
    416 if {[string match macports-clang-3.1 ${configure.compiler}]} {
    417     configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config-mp-3.1"
    418     depends_run-append      port:clang-3.1
    419 }
     413# ========================================================================================
     414# Setup various clang variants, to provide alternative C++ compilers that support cocoa
     415# ========================================================================================
    420416
    421 variant clang32 conflicts clang31 clang33 description {Compile using MacPorts clang 3.2} {
    422     configure.compiler      macports-clang-3.2
    423 }
    424 if {[string match macports-clang-3.2 ${configure.compiler}]} {
    425     configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config-mp-3.2"
    426     depends_run-append      port:clang-3.2
    427 }
     417# List of possible clang versions that work
     418set clang_versions { 3.3 3.4 3.5 }
    428419
    429 variant clang33 conflicts clang31 clang32 description {Compile using MacPorts clang 3.3} {
    430     configure.compiler      macports-clang-3.3
     420# Define the available variants
     421foreach ver ${clang_versions} {
     422    set ver_no_dot [join [split ${ver} "."] ""]
     423    set variant_line {variant clang${ver_no_dot} description "Compile using MacPorts clang ${ver}"}
     424    foreach over ${clang_versions} {
     425        if { ${ver} == ${over} } { continue }
     426        set over_no_dot [join [split ${over} "."] ""]
     427        append variant_line " conflicts clang${over_no_dot}"
     428    }
     429    append variant_line { { } }
     430    eval $variant_line
    431431}
    432 if {[string match macports-clang-3.3 ${configure.compiler}]} {
    433     configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config-mp-3.3"
    434     depends_run-append      port:clang-3.3
     432
     433# Is a variant active ?
     434set active_clang_variant ""
     435foreach ver ${clang_versions} {
     436    set ver_no_dot [join [split ${ver} "."] ""]
     437    if {[variant_isset clang${ver_no_dot}]} {
     438        set active_clang_variant ${ver}
     439    }
    435440}
    436441
    437 if {[variant_isset qt_mac]} {
    438     PortGroup qt4 1.0
     442# If so, set it up.
     443if { ${active_clang_variant} != "" } {
     444    configure.compiler      macports-clang-${active_clang_variant}
     445    configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config-mp-"${active_clang_variant}
     446    depends_run-append      port:clang-${active_clang_variant}
    439447}
    440448
     449# ========================================================================================
     450
    441451variant qt_mac description {Build with Qt support via Mac UI} {
    442452    post-patch {
    443453        # fix where "qglobal.h" is found in all files that use or reference it
     
    469479    }
    470480}
    471481
     482if {[variant_isset qt_mac]} {
     483    PortGroup qt4 1.0
     484}
     485
    472486# ========================================================================================
    473487# Following is for fortran support
    474488# Might eventually move to a portgroup, or similar, so could be simplified.