Ticket #39715: Portfile-raxml.diff

File Portfile-raxml.diff, 4.0 KB (added by mattoates@…, 11 years ago)

updated with second checksum

  • Portfile

    old new  
    22# $Id$
    33
    44PortSystem      1.0
     5PortGroup       github 1.0
    56
    67name            raxml
    7 version         7.2.9
     8version         7.6.6
     9github.setup    stamatak standard-RAxML 88d5f2bb66f4a5177aa52bc77ca3fc951da99ea8
    810description     Estimation of phylogenetic trees
    911long_description        RAxML is a program for sequential and parallel estimation of\
    1012        phylogenetic trees written by Alexandros Stamatakis. By default the Pthreads\
    11         implementation will be installed, use -pthreads +mpi for the MPI variant.
     13        implementation will be installed, use -pthreads +mpi for the MPI variant. The\
     14        SSE3 and AVX capability of your CPU will be detected and set automatically.
     15
    1216license         GPL-2+
    1317maintainers     gmail.com:mattoates
    14 categories      science
    15 homepage        http://sco.h-its.org/exelixis
     18categories      science biology
     19homepage        http://www.exelixis-lab.org/
    1620platforms       darwin
    17 master_sites    ${homepage}/software/
    18 distfiles       RAxML-${version}.tar.bz2
    19 checksums       md5     028b70c7c96900e1f70cdc2c2acab449 \
    20                 sha1    a038b72e197434d7fa8a7c35687b70adb4b0750b
    21 use_bzip2       yes
    2221
    23 patchfiles      Makefiles.patch
     22checksums       sha256  15ee8094370872f8ed0292544fdadaeedf4e7c43c25dc96a1815f289243f2211 \
     23                rmd160  88c41e384cfaba128065cb1e99686223061573b9
    2424
    2525use_configure   no
    2626
    2727#Strings used by the variant options
    2828set HPCm ""
    2929set HPCb ""
    30 set SSEm ""
    31 set SSEb ""
     30set EXTm ""
     31set EXTb ""
     32
     33#Use the HYBRID implementation
     34variant hybrid conflicts pthreads,mpi description {Hybrid MPI implementation} {
     35        depends_lib-append port:openmpi
     36        set HPCm ".HYBRID"
     37        set HPCb "-HYBRID"
     38        configure.cc    ${prefix}/bin/openmpicc
     39}
    3240
    3341#Use the MPI implementation
    34 variant mpi conflicts pthreads description {MPI implementation} {
    35         depends_lib port:openmpi
     42variant mpi conflicts pthreads,hybrid description {MPI implementation} {
     43        depends_lib-append port:openmpi
    3644        set HPCm ".MPI"
    3745        set HPCb "-MPI"
    3846        configure.cc    ${prefix}/bin/openmpicc
    3947}
    4048
    4149#Use the pthreads implementation (default)
    42 variant pthreads conflicts mpi description {Pthreads implementation} {
     50variant pthreads conflicts hybrid,mpi description {Pthreads implementation} {
    4351        set HPCm ".PTHREADS"
    4452        set HPCb "-PTHREADS"
    4553}
     
    4856    default_variants        +pthreads
    4957}
    5058
    51 #For Intel machines add SSE as a variant and use it by default with pthreads
     59#For Intel machines add SSE and AVX as a variant and use it by default with pthreads
    5260if {$build_arch == "i386" || $build_arch == "x86_64"} {
    5361
    54 variant sse3 description {Use the SSE3 extended instruction set from Intel since 2004} {
    55         set SSEm ".SSE3"
    56         set SSEb "-SSE3"
     62variant sse3 conflicts avx description {Use the SSE3 extended instruction set from Intel since 2004} {
     63        set EXTm ".SSE3"
     64        set EXTb "-SSE3"
     65}
     66
     67variant avx conflicts sse3 description {Use the ATX extended instruction set from Intel i7 (sandy bridge) and AMD Bulldozer} {
     68        set EXTm ".AVX"
     69        set EXTb "-AVX"
    5770}
    5871
    5972if {![catch {sysctl hw.optional.sse3} result] && $result == 1} {
    60     default_variants-append  +sse3
     73    if {![catch {sysctl hw.optional.avx1_0} result] && $result == 1} {
     74        default_variants-append  +avx
     75    } else {
     76        default_variants-append  +sse3
     77    }
    6178}
     79
    6280} else {
    6381    post-patch {
    6482        reinplace "s/-msse//" ${worksrcpath}/Makefile.gcc \
     
    7391
    7492#Make sure we are using the correct Makefile for this variant combo
    7593pre-build {
    76         build.pre_args  -f Makefile${SSEm}${HPCm}.gcc
     94        build.pre_args  -f Makefile${EXTm}${HPCm}.gcc
    7795        build.args-append CC="${configure.cc}"
    7896}
    7997
    8098#We only need the single raxml binary
    8199destroot {
    82         copy ${worksrcpath}/raxmlHPC${HPCb}${SSEb} ${destroot}${prefix}/bin/raxml
     100        copy ${worksrcpath}/raxmlHPC${HPCb}${EXTb} ${destroot}${prefix}/bin/raxml
    83101}