source: trunk/dports/science/raxml/Portfile

Last change on this file was 121955, checked in by sean@…, 3 years ago

mpi-1.0: move setup call in all ports to after setting of name

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# -*- 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 121955 2014-07-12 05:25:40Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           github 1.0
6PortGroup           mpi 1.0
7
8github.setup        stamatak standard-RAxML 7.7.6 v
9checksums           sha256  7562b307bc50e38162f104271793a1c8f98f866c2342bea21afe6df6a982fd82 \
10                    rmd160  da76d6623515b7d8f78a69aaf4eec713508789af
11name                raxml
12description         Estimation of phylogenetic trees
13long_description    RAxML is a program for sequential and parallel \
14                    estimation of phylogenetic trees written by \
15                    Alexandros Stamatakis.
16license             GPL-2+
17maintainers         gmail.com:mattoates
18categories          science biology
19homepage            http://www.exelixis-lab.org/
20platforms           darwin
21
22compilers.choose    cc
23mpi.setup
24
25use_configure       no
26
27#Strings used by the variant options
28set HPCm ""
29set HPCb ""
30set EXTm ""
31set EXTb ""
32
33#Use the HYBRID implementation
34
35variant hybrid conflicts pthreads description {Hybrid MPI implementation} {
36    if {![mpi_variant_isset]} {
37        return -code error "$name: Variant hybrid requires an mpi variant"
38    }
39    set HPCm ".HYBRID"
40    set HPCb "-HYBRID"
41}
42
43#Use the MPI implementation if hybrid is not selected
44if {[mpi_variant_isset] && ![variant_isset hybrid]} {
45    set HPCm ".MPI"
46    set HPCb "-MPI"
47}
48
49#Use the pthreads implementation (default)
50variant pthreads conflicts hybrid description {Pthreads implementation} {
51    if {[mpi_variant_isset]} {
52        return -code error "$name: Variant pthreads conflicts with mpi"
53    }
54    set HPCm ".PTHREADS"
55    set HPCb "-PTHREADS"
56}
57
58if {![mpi_variant_isset]} {
59    default_variants    +pthreads
60}
61
62#For Intel machines add SSE and AVX as a variant and use it by default with pthreads
63if {${build_arch} eq "i386" || ${build_arch} eq "x86_64"} {
64    variant sse3 conflicts avx description {Use the SSE3 extended instruction set from Intel since 2004} {
65        set EXTm ".SSE3"
66        set EXTb "-SSE3"
67    }
68
69    variant avx conflicts sse3 description {Use the AVX extended instruction set from Intel i7 (sandy bridge) and AMD Bulldozer} {
70        pre-fetch {
71            if {![avx_compiler_isset]} {
72                return -code error "$name: Variant avx needs a clang-derived compiler"
73            }
74        }
75        set EXTm ".AVX"
76        set EXTb "-AVX"
77    }
78
79    if {![catch {sysctl hw.optional.sse3} result] && ${result} == 1} {
80        if {![catch {sysctl hw.optional.avx1_0} result] && ${result} == 1} {
81            default_variants-append +avx
82        } else {
83            default_variants-append  +sse3
84        }
85    }
86} else {
87    post-patch {
88        reinplace "s/-msse//" ${worksrcpath}/Makefile.gcc \
89                              ${worksrcpath}/Makefile.PTHREADS.gcc \
90                              ${worksrcpath}/Makefile.MPI.gcc
91    }
92}
93
94#Make sure we are using the correct Makefile for this variant combo
95pre-build {
96    build.pre_args      -f Makefile${EXTm}${HPCm}.gcc
97    build.args-append   CC="${configure.cc}"
98}
99
100#We only need the single raxml binary
101destroot {
102    copy ${worksrcpath}/raxmlHPC${HPCb}${EXTb} ${destroot}${prefix}/bin/raxml
103}
Note: See TracBrowser for help on using the repository browser.