Ticket #35241: Portfile

File Portfile, 3.4 KB (added by g5pw (Aljaž Srebrnič), 11 years ago)
Line 
1# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 110143 2013-08-27 15:39:45Z jeremyhu@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           github 1.0
7
8github.setup        pymc-devs pymc 2.2 v
9name                py-pymc
10version             2.2
11maintainers         mnick
12license             BSD
13
14description         Bayesian statistical models and fitting algorithms for python
15long_description    PyMC is a python module that implements Bayesian statistical models \
16                    and fitting algorithms, including Markov chain Monte Carlo. \
17                    Its flexibility makes it applicable to a large suite of problems as well \
18                    as easily extensible. Along with core sampling functionality, \
19                    PyMC includes methods for summarizing output, plotting, goodness-of-fit and \
20                    convergence diagnostics.
21
22platforms           darwin
23
24
25python.versions     26 27 32 33 34
26
27if {$subport ne $name} {
28    depends_lib-append  port:py${python.version}-numpy
29
30    checksums           rmd160  af845c54c8e4474ca0512800bb4cca9ff33fe453 \
31                        sha256  f618ebb9f075219b1aad5c06156f46fcd5ac543f391de4fa3752f311e9965278
32
33    set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
34    set default_fortran_variant +gcc48
35    set g95_conflicts {}
36
37    foreach ver ${gcc_versions} {
38        set ver_no_dot [join [split ${ver} "."] ""]
39
40        set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
41
42        foreach over ${gcc_versions} {
43            if {${ver} == ${over}} {
44                continue
45            }
46
47            set over_no_dot [join [split ${over} "."] ""]
48            append variant_line " conflicts gcc${over_no_dot}"
49        }
50        append variant_line { {}}
51
52        eval $variant_line
53
54        append g95_conflicts " conflicts gcc${ver_no_dot}"
55
56        if {[variant_isset gcc${ver_no_dot}]} {
57            if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
58                set default_fortran_variant ""
59            }
60        }
61    }
62
63    eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
64
65    if {[variant_isset g95]} {
66        if {${default_fortran_variant} != "+g95"} {
67            set default_fortran_variant ""
68        }
69    }
70
71    if {${default_fortran_variant} != ""} {
72        default_variants-append "${default_fortran_variant}"
73    }
74
75    foreach ver ${gcc_versions} {
76        set ver_no_dot [join [split ${ver} "."] ""]
77
78        if {[variant_isset gcc${ver_no_dot}]} {
79            depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
80            depends_build-append port:gcc${ver_no_dot}
81
82            build.cmd "${build.cmd} config_fc --fcompiler gfortran"
83
84            configure.fc  ${prefix}/bin/gfortran-mp-${ver}
85            configure.f77 ${prefix}/bin/gfortran-mp-${ver}
86            configure.f90 ${prefix}/bin/gfortran-mp-${ver}
87        }
88    }
89
90    if {[variant_isset g95]} {
91        depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
92        depends_build-append port:g95
93
94        build.cmd "${build.cmd} config_fc --fcompiler g95"
95
96        configure.fc ${prefix}/bin/g95
97        configure.f77 ${prefix}/bin/g95
98        configure.f90 ${prefix}/bin/g95
99    }
100
101    build.env-append    FFLAGS="-static -ff2c"
102
103    livecheck.type          none
104}