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 130702 2015-01-02 08:26:28Z larryv@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python 1.0 |
---|
6 | PortGroup github 1.0 |
---|
7 | |
---|
8 | github.setup pymc-devs pymc 2.3.6 v |
---|
9 | revision 1 |
---|
10 | name py-pymc |
---|
11 | maintainers hum openmaintainer |
---|
12 | license {AFL-3 BSD} |
---|
13 | |
---|
14 | description Bayesian statistical models and fitting algorithms for python |
---|
15 | long_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 | |
---|
22 | platforms darwin |
---|
23 | |
---|
24 | python.versions 26 27 33 34 |
---|
25 | |
---|
26 | # stealth update |
---|
27 | dist_subdir ${name}/${version}_1 |
---|
28 | |
---|
29 | if {${name} ne ${subport}} { |
---|
30 | depends_lib-append port:py${python.version}-numpy |
---|
31 | |
---|
32 | checksums rmd160 b4eac13ae502bb3e8ec3f314deb73750edcb6a8a |
---|
33 | |
---|
34 | set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9 5} |
---|
35 | set default_fortran_variant +gcc5 |
---|
36 | set g95_conflicts {} |
---|
37 | |
---|
38 | foreach ver ${gcc_versions} { |
---|
39 | set ver_no_dot [join [split ${ver} "."] ""] |
---|
40 | |
---|
41 | set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95} |
---|
42 | |
---|
43 | foreach over ${gcc_versions} { |
---|
44 | if {${ver} == ${over}} { |
---|
45 | continue |
---|
46 | } |
---|
47 | |
---|
48 | set over_no_dot [join [split ${over} "."] ""] |
---|
49 | append variant_line " conflicts gcc${over_no_dot}" |
---|
50 | } |
---|
51 | append variant_line { {}} |
---|
52 | |
---|
53 | eval $variant_line |
---|
54 | |
---|
55 | append g95_conflicts " conflicts gcc${ver_no_dot}" |
---|
56 | |
---|
57 | if {[variant_isset gcc${ver_no_dot}]} { |
---|
58 | if {${default_fortran_variant} != "+gcc${ver_no_dot}"} { |
---|
59 | set default_fortran_variant "" |
---|
60 | } |
---|
61 | } |
---|
62 | } |
---|
63 | |
---|
64 | eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}] |
---|
65 | |
---|
66 | if {[variant_isset g95]} { |
---|
67 | if {${default_fortran_variant} != "+g95"} { |
---|
68 | set default_fortran_variant "" |
---|
69 | } |
---|
70 | } |
---|
71 | |
---|
72 | if {${default_fortran_variant} != ""} { |
---|
73 | default_variants-append "${default_fortran_variant}" |
---|
74 | } |
---|
75 | |
---|
76 | foreach ver ${gcc_versions} { |
---|
77 | set ver_no_dot [join [split ${ver} "."] ""] |
---|
78 | |
---|
79 | if {[variant_isset gcc${ver_no_dot}]} { |
---|
80 | depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc |
---|
81 | depends_build-append port:gcc${ver_no_dot} |
---|
82 | |
---|
83 | build.cmd "${build.cmd} config_fc --fcompiler gfortran" |
---|
84 | |
---|
85 | configure.fc ${prefix}/bin/gfortran-mp-${ver} |
---|
86 | configure.f77 ${prefix}/bin/gfortran-mp-${ver} |
---|
87 | configure.f90 ${prefix}/bin/gfortran-mp-${ver} |
---|
88 | } |
---|
89 | } |
---|
90 | |
---|
91 | if {[variant_isset g95]} { |
---|
92 | depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc |
---|
93 | depends_build-append port:g95 |
---|
94 | |
---|
95 | build.cmd "${build.cmd} config_fc --fcompiler g95" |
---|
96 | |
---|
97 | configure.fc ${prefix}/bin/g95 |
---|
98 | configure.f77 ${prefix}/bin/g95 |
---|
99 | configure.f90 ${prefix}/bin/g95 |
---|
100 | } |
---|
101 | |
---|
102 | # Insert my own archflags, so I can edit LDFLAGS |
---|
103 | python.add_archflags no |
---|
104 | |
---|
105 | if {[variant_exists universal] && [variant_isset universal]} { |
---|
106 | build.env-append CFLAGS="${configure.universal_cflags}" \ |
---|
107 | OBJCFLAGS="${configure.universal_cflags}" \ |
---|
108 | CXXFLAGS="${configure.universal_cxxflags}" \ |
---|
109 | LDFLAGS="-undefined dynamic_lookup -bundle ${configure.universal_ldflags}" |
---|
110 | } else { |
---|
111 | build.env-append CFLAGS="${configure.cc_archflags}" \ |
---|
112 | OBJCFLAGS="${configure.objc_archflags}" \ |
---|
113 | CXXFLAGS="${configure.cxx_archflags}" \ |
---|
114 | FFLAGS="${configure.f77_archflags}" \ |
---|
115 | F90FLAGS="${configure.f90_archflags}" \ |
---|
116 | FCFLAGS="${configure.fc_archflags}" \ |
---|
117 | LDFLAGS="-undefined dynamic_lookup -bundle ${configure.ld_archflags}" |
---|
118 | } |
---|
119 | |
---|
120 | livecheck.type none |
---|
121 | } |
---|