source: trunk/dports/python/py-pymc/Portfile @ 112672

Last change on this file since 112672 was 112672, checked in by g5pw@…, 7 years ago

python/py-pymc:

actually, python34 is still in alpha, and py34-numpy is missing, so remove
python34 support

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
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 112672 2013-10-29 11:34:09Z g5pw@macports.org $
3
4PortSystem          1.0
5PortGroup           python 1.0
6PortGroup           github 1.0
7
8github.setup        pymc-devs pymc 2.3
9name                py-pymc
10maintainers         mnick
11license             BSD
12
13description         Bayesian statistical models and fitting algorithms for python
14long_description    PyMC is a python module that implements Bayesian statistical models \
15                    and fitting algorithms, including Markov chain Monte Carlo. \
16                    Its flexibility makes it applicable to a large suite of problems as well \
17                    as easily extensible. Along with core sampling functionality, \
18                    PyMC includes methods for summarizing output, plotting, goodness-of-fit and \
19                    convergence diagnostics.
20
21platforms           darwin
22
23
24python.versions     26 27 32 33
25
26if {$subport ne $name} {
27    depends_lib-append  port:py${python.version}-numpy
28
29    checksums           rmd160  0c0d9f7ef37cbe0ff608a8e059cff6f8cdb6587e \
30                        sha256  506455fd0a4f27db4448fcf8343ffa60d1c16a1f2819c947edf52f0fe2f4070d
31
32    set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
33    set default_fortran_variant +gcc48
34    set g95_conflicts {}
35
36    foreach ver ${gcc_versions} {
37        set ver_no_dot [join [split ${ver} "."] ""]
38
39        set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
40
41        foreach over ${gcc_versions} {
42            if {${ver} == ${over}} {
43                continue
44            }
45
46            set over_no_dot [join [split ${over} "."] ""]
47            append variant_line " conflicts gcc${over_no_dot}"
48        }
49        append variant_line { {}}
50
51        eval $variant_line
52
53        append g95_conflicts " conflicts gcc${ver_no_dot}"
54
55        if {[variant_isset gcc${ver_no_dot}]} {
56            if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
57                set default_fortran_variant ""
58            }
59        }
60    }
61
62    eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
63
64    if {[variant_isset g95]} {
65        if {${default_fortran_variant} != "+g95"} {
66            set default_fortran_variant ""
67        }
68    }
69
70    if {${default_fortran_variant} != ""} {
71        default_variants-append "${default_fortran_variant}"
72    }
73
74    foreach ver ${gcc_versions} {
75        set ver_no_dot [join [split ${ver} "."] ""]
76
77        if {[variant_isset gcc${ver_no_dot}]} {
78            depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
79            depends_build-append port:gcc${ver_no_dot}
80
81            build.cmd "${build.cmd} config_fc --fcompiler gfortran"
82
83            configure.fc  ${prefix}/bin/gfortran-mp-${ver}
84            configure.f77 ${prefix}/bin/gfortran-mp-${ver}
85            configure.f90 ${prefix}/bin/gfortran-mp-${ver}
86        }
87    }
88
89    if {[variant_isset g95]} {
90        depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
91        depends_build-append port:g95
92
93        build.cmd "${build.cmd} config_fc --fcompiler g95"
94
95        configure.fc ${prefix}/bin/g95
96        configure.f77 ${prefix}/bin/g95
97        configure.f90 ${prefix}/bin/g95
98    }
99
100    # Insert my own archflags, so I can edit LDFLAGS
101    python.add_archflags no
102
103    if {[variant_exists universal] && [variant_isset universal]} {
104        build.env-append CFLAGS="${configure.universal_cflags}" \
105                        OBJCFLAGS="${configure.universal_cflags}" \
106                        CXXFLAGS="${configure.universal_cxxflags}" \
107                        LDFLAGS="-undefined dynamic_lookup -bundle ${configure.universal_ldflags}"
108    } else {
109        build.env-append CFLAGS="${configure.cc_archflags}" \
110                        OBJCFLAGS="${configure.objc_archflags}" \
111                        CXXFLAGS="${configure.cxx_archflags}" \
112                        FFLAGS="${configure.f77_archflags}" \
113                        F90FLAGS="${configure.f90_archflags}" \
114                        FCFLAGS="${configure.fc_archflags}" \
115                        LDFLAGS="-undefined dynamic_lookup -bundle ${configure.ld_archflags}"
116    }
117
118    livecheck.type          none
119}
Note: See TracBrowser for help on using the repository browser.