Changeset 119871


Ignore:
Timestamp:
May 8, 2014, 8:29:26 PM (5 years ago)
Author:
mojca@…
Message:

root: new ports root5, root6, root_select

  • root: replaced by root5
  • root6: new CMake-based installation of ROOT 6
  • root_select: easy switching between ROOT5 and 6
  • revbump iAIDA
Location:
trunk/dports
Files:
12 added
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/dports/science/iAIDA/Portfile

    r108071 r119871  
    77
    88github.setup        apfeiffer1 iAIDA 1.1.2 iAIDA-
     9revision            1
    910
    1011name                iAIDA
     
    2728                    port:grace \
    2829                    port:boost \
    29                     port:root \
     30                    port:root5 \
    3031                    port:openssl \
    3132                    port:expat \
     
    3940}
    4041
     42configure.args-append -DROOT_CONFIG_EXECUTABLE=${prefix}/libexec/root5/bin/root-config
    4143configure.post_args ${worksrcpath}/${name}
  • trunk/dports/science/root5/Portfile

    r118376 r119871  
    44PortSystem          1.0
    55
    6 name                root
     6PortGroup           active_variants 1.1
     7PortGroup           select 1.0
     8
     9name                root5
    710version             5.34.18
     11set version_major   5
    812
    913categories          science
     
    1620homepage            http://root.cern.ch/
    1721platforms           darwin
    18 distname            ${name}_v${version}.source
     22distname            root_v${version}.source
    1923master_sites        http://root.cern.ch/download/ \
    2024                    ftp://root.cern.ch/root/
     
    3337                    port:tiff \
    3438                    port:gmp \
    35                     port:expat
     39                    port:expat \
     40                    port:lzma
    3641                  # port:freetype
     42
     43depends_run         port:root_select
     44
     45# TODO: the file ${filespath}/${name} would have to be generated on the fly instead
     46select.group        root
     47select.file         ${filespath}/${name}
    3748
    3849post-patch {
     
    4354    reinplace "s|\"/usr/lib\"|\"${prefix}/lib /usr/lib\"|g" ${worksrcpath}/configure
    4455}
     56
     57# port specific location
     58set install_prefix ${prefix}/libexec/root${version_major}
    4559
    4660pre-configure {
     
    5266    # the build type (32 or 64 bit) -must- be for first argument
    5367    if {${build_arch} eq "i386" || ${build_arch} eq "ppc"} {
    54         configure.pre_args macosx --prefix=${prefix}
     68        configure.pre_args macosx --prefix=${install_prefix}
    5569    } else {
    56         configure.pre_args macosx64 --prefix=${prefix}
    57     }
    58 }
    59 
    60 configure.args      --docdir=${prefix}/share/doc/${name} \
    61                     --libdir=${prefix}/lib/${name} \
    62                     --testdir=${prefix}/share/${name}/test \
    63                     --tutdir=${prefix}/share/${name}/tutorials \
    64                     --etcdir=${prefix}/etc/${name} \
     70        configure.pre_args macosx64 --prefix=${install_prefix}
     71    }
     72}
     73
     74configure.args      --etcdir=${install_prefix}/etc/root \
    6575                    --disable-builtin-glew \
    6676                    --disable-builtin-pcre \
     
    96106                    --disable-c++11 \
    97107                    --disable-xrootd \
     108                    --disable-oracle \
    98109                    --enable-builtin-ftgl \
    99110                    --enable-mathmore \
     
    128139}
    129140
     141post-destroot {
     142    # create versioned symlinks for the content of libexec
     143    # bin dir
     144    foreach f [glob -directory ${destroot}${install_prefix}/bin *] {
     145        set filename  [file tail $f]
     146        set extension [file extension $filename]
     147        set base      [file rootname $filename]
     148        set versioned_filename ${base}${version_major}${extension}
     149        ln -s ${install_prefix}/bin/${filename} ${destroot}${prefix}/bin/${versioned_filename}
     150    }
     151    # lib dir
     152    ln -s ${install_prefix}/lib/root ${destroot}${prefix}/lib/root${version_major}
     153    # include dir
     154    ln -s ${install_prefix}/include/root ${destroot}${prefix}/include/root${version_major}
     155    # etc dir
     156    ln -s ${install_prefix}/etc/root ${destroot}${prefix}/etc/root${version_major}
     157    # share dir
     158    ln -s ${install_prefix}/share ${destroot}${prefix}/share/root${version_major}
     159    # 'Fix' genreflex
     160    reinplace "s|lib/python/genreflex|lib/root${version_major}/python/genreflex|g" ${destroot}${install_prefix}/bin/genreflex
     161    # Compress manpages in custom location (borrowed from mariadb)
     162    set manpath ${install_prefix}/share/man
     163    set gzip [findBinary gzip ${portutil::autoconf::gzip_path}]
     164    foreach manpage [glob -type f ${destroot}${manpath}/man1/*] {
     165        # Zip the man file
     166        system "$gzip -9vf ${manpage}"
     167        # Create man pages for versioned files
     168        set filename  [file tail $manpage]
     169        set extension [file extension $filename]
     170        set base      [file rootname $filename]
     171        set versioned_filename ${base}${version_major}${extension}.gz
     172        set d [file tail $manpage]
     173        ln -s ${manpath}/man1/${d}.gz ${destroot}${prefix}/share/man/man1/${versioned_filename}
     174    }
     175}
     176
     177set run_port_select "No"
     178pre-activate {
     179  if { ![file exists ${prefix}/bin/root]  &&
     180       ![file exists ${prefix}/bin/root5] &&
     181       ![file exists ${prefix}/bin/root6] } {
     182     set run_port_select "Yes"
     183  }
     184}
     185
     186post-activate {
     187  ui_msg "======================================================================================"
     188  if { ${run_port_select} == "Yes" } {
     189      ui_msg "  Making root${version_major} your default root version. To change this run 'sudo port select root'"
     190      catch { system "port select root root${version_major}" }
     191  } else {
     192      ui_msg "  To make root${version_major} your default root version, run 'sudo port select root root${version_major}'"
     193  }
     194  ui_msg "======================================================================================"
     195}
     196
    130197universal_variant   no
    131198
     
    140207}
    141208
    142 post-destroot {
    143     reinplace "s|lib/python/genreflex|lib/root/python/genreflex|g" ${destroot}${prefix}/bin/genreflex
    144 }
    145 
    146209variant debug description {Enable a debug build} {
    147210    configure.args-append --build=debug
     
    226289    configure.args-append   --enable-tmva
    227290    post-destroot {
    228         set tmvaTuts ${destroot}${prefix}/share/${name}/tutorials/tmva
     291        set tmvaTuts ${destroot}${install_prefix}/share/root/tutorial/tmva
    229292        file mkdir ${tmvaTuts}
    230293        foreach f [glob ${worksrcpath}/tmva/test/*] { file copy $f ${tmvaTuts}/ }
     
    259322        append variant_line " conflicts python${over_no_dot}"
    260323    }
    261     append variant_line { {} }
     324    append variant_line { { } }
    262325    eval $variant_line
    263326}
     
    275338if { ${active_python_variant} != "" } {
    276339    set ver_no_dot [join [split ${active_python_variant} "."] ""]
     340    if {![catch {set result [active_variants root6 python${ver_no_dot}]}]} {
     341        if {$result} {
     342            ui_error "Cannot install ${name} with +python${ver_no_dot} variant"
     343            return -code error "root6 port is already installed with +python${ver_no_dot} and both cannot be active at once. Pick a different python variant."
     344        }
     345    }
    277346    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_variant}
    278347    configure.args-delete   --disable-python
     
    285354        set mypysitedir ${mypylibdir}/site-packages/
    286355        file mkdir ${destroot}${mypysitedir}
    287         foreach pyfile [glob ${destroot}${prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir} }
    288         ln -sf ${prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
    289     }
    290 }
    291 
    292 # ========================================================================================
    293 
    294 variant ruby description {Build with ruby support} {
    295     configure.args-delete   --disable-ruby
    296     configure.args-append   --enable-ruby
    297     depends_lib-append      port:ruby
    298 }
     356        foreach pyfile [glob ${destroot}${install_prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir}/ }
     357        ln -sf ${install_prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
     358    }
     359}
     360
     361# ========================================================================================
    299362
    300363variant ssl description {Build with ssl support} {
     
    379442}
    380443
     444# variant oracle description {Build with Oracle support} {
     445#     configure.args-replace --disable-oracle --enable-oracle
     446#     configure.args-append  --with-oracle-incdir="${prefix}/lib/oracle/sdk/include" \
     447#                            --with-oracle-libdir="${prefix}/lib/oracle"
     448#     depends_lib-append     port:oracle-instantclient
     449# }
     450
    381451variant pythia description {Pythia 8 support for root} {
    382452    configure.args-delete   --disable-pythia8
     
    387457}
    388458
    389 # The cocoa variant doesn't work on 10.6; source code uses functions first introduced in 10.7,
    390 # but fixing the code is doable if someone had sufficient motivation
    391459variant cocoa conflicts x11 description {Enables native OSX graphical backend} {
    392460    # Force a compatible clang compiler
    393461    PortGroup compiler_blacklist_versions 1.0
    394     # it works with clang 3.0 and later (clang < 425 might not be exact)
    395462    compiler.blacklist-append {clang < 425} *gcc* macports-clang-2.9
    396     # compiler fallback is probably only relevant on 10.6 (where +cocoa doesn't work at all)
    397     compiler.fallback-append macports-clang-3.2 macports-clang-3.1 macports-clang-3.4 macports-clang-3.3
     463    compiler.fallback-append macports-clang-3.4 macports-clang-3.3 macports-clang-3.2
    398464    # Enable cocoa support in configure
    399465    configure.args-delete --disable-cocoa
     
    420486
    421487# List of possible clang versions that work
    422 set clang_versions { 3.0 3.1 3.2 3.3 3.4 3.5 }
     488set clang_versions { 3.3 3.4 3.5 }
    423489
    424490# Define the available variants
     
    495561# ========================================================================================
    496562
    497 set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
     563set gcc_versions { 4.3 4.4 4.5 4.6 4.7 4.8 4.9 }
    498564set default_fortran_variant +gcc48
    499565
     
    511577        append variant_line " conflicts gcc${over_no_dot}"
    512578    }
    513     append variant_line { {}}
     579    append variant_line { { } }
    514580
    515581    eval $variant_line
     
    543609livecheck.type              regex
    544610livecheck.url               [lindex ${master_sites} 0]
    545 livecheck.regex             ${name}_v(\[0-9a-z.\]+)\\.source
     611livecheck.regex             root_v(\[0-9a-z.\]+)\\.source
    546612
    547613# ========================================================================================
    548614# The following have build issues, are obsolete or experimental.
    549615# ========================================================================================
     616
     617# Problems finding includes ...
     618# variant ruby description {Build with ruby support} {
     619#     configure.args-delete   --disable-ruby
     620#     configure.args-append   --enable-ruby \
     621#                             --with-ruby-incdir="${prefix}/include/ruby-1.9.1" \
     622#                             --with-ruby-libdir="${prefix}/lib"
     623#     depends_lib-append      port:ruby19
     624# }
    550625
    551626# Intefers with builtin freetype build (enforced by cocoa variant)
Note: See TracChangeset for help on using the changeset viewer.