Ticket #35363: Portfile_py-assimulo

File Portfile_py-assimulo, 3.4 KB (added by jjstickel (Jonathan Stickel), 12 years ago)
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#
3
4PortSystem      1.0
5PortGroup       python 1.0
6
7name                py-assimulo
8version             2.2
9categories-append   math
10license             GPL
11maintainers         gmail.com:jjstickel openmaintainer
12
13description         A package for solving ordinary differential\
14                    equations and differential algebraic equations.
15
16long_description    Assimulo is a Cython / Python based simulation\
17                    package that allows for simulation of both\
18                    ordinary differential equations (ODEs), f(t,y),\
19                    and differential algebraic equations (DAEs),\
20                    f(t,y,yd). It combines a variety of different\
21                    solvers written in C, FORTRAN and Python via a\
22                    common high-level interface.
23
24platforms           darwin
25homepage            http://www.jmodelica.org/assimulo
26master_sites        http://pypi.python.org/packages/source/A/Assimulo
27distname            Assimulo-${version}
28
29checksums           sha256  94a09a404f0d523314635d4303947353bd09b57a78976ee84a354b82c39d04f2 \
30                    rmd160  621f5fd1b8ac463ba30b2ac19e01601f8faf91c4
31
32# have not tested with python-3x, but it might work, JJS 7/27/12
33python.versions        25 26 27
34python.default_version 27
35
36# I have not tested, but this library probably will not build
37# universal, JJS 7/27/12
38#universal_variant   no
39
40depends_lib-append  port:sundials
41
42if {$subport != $name} {
43    depends_build-append    port:py${python.version}-distribute
44    depends_lib-append      port:py${python.version}-numpy\
45                            port:py${python.version}-scipy\
46                            port:py${python.version}-matplotlib\
47                            port:py${python.version}-cython
48}
49
50variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {Use the gcc43 compiler} {
51    depends_lib-append  port:gcc43
52    configure.compiler  macports-gcc-4.3
53}
54variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {Use the gcc44 compiler} {
55    depends_lib-append  port:gcc44
56    configure.compiler  macports-gcc-4.4
57}
58variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {Use the gcc45 compiler} {
59    depends_lib-append  port:gcc45
60    configure.compiler  macports-gcc-4.5
61}
62variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {Use the gcc46 compiler} {
63    depends_lib-append  port:gcc46
64    configure.compiler  macports-gcc-4.6
65}
66variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {Use the gcc47 compiler} {
67    depends_lib-append  port:gcc47
68    configure.compiler  macports-gcc-4.7
69}
70if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc46] && ![variant_isset gcc47] } {
71        default_variants      +gcc45
72}
73
74variant atlas description {build with atlas} {
75    depends_lib-append port:atlas
76    build.args-append --blas-home=${prefix}/lib
77    build.args-append --lapack-home=${prefix}/lib
78    patch {
79        reinplace "s|lblas|ltatlas|g" ${worksrcpath}/setup.py
80        reinplace "s|llapack|ltatlas|g" ${worksrcpath}/setup.py
81    }
82}
83
84default_variants +atlas
85
86pre-build {
87    # suggested fix for undefined symbols during build
88    # http://www.jmodelica.org/4910
89    build.env-append LDFLAGS="-fPIC -undefined dynamic_lookup"
90}
91
92build.args-append --sundials-home=${prefix}