Ticket #37642: Portfile.2

File Portfile.2, 3.7 KB (added by mf2k (Frank Schima), 12 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: $
3
4PortSystem              1.0
5PortGroup               python 1.0
6
7name                    py-scikits-bvp_solver
8version                 1.1
9categories-append       science
10license                 BSD
11platforms               darwin
12
13maintainers             macsforever2000 openmaintainer
14
15description             bvp_solver is a Python package for solving two-point boundary value problems.
16
17long_description        scikits.bvp_solver is a python package for solving two point boundary value \
18                        problems which is based on a modified version of the BVP_SOLVER Fortran package.
19
20homepage                http://packages.python.org/scikits.bvp_solver/
21master_sites            http://pypi.python.org/packages/source/s/scikits.bvp_solver/
22
23distname                scikits.bvp_solver-${version}
24
25# md5 checksum comes from the source site
26checksums               md5     894a566a3080ea6fe0e0b0c17fc628a7 \
27                        rmd160  903e53a0b4bf40d864abbdb83dc5d008a3e1c874 \
28                        sha256  3de71a39d97cdd61fea5693f7dd01b3820310d755f8e6669a3694b01eb787f1d
29
30# Only tested on python 2.7.
31python.versions         27
32
33if {$subport != $name} {
34        patchfiles                      patch-setup_py.diff
35
36    depends_lib-append  port:py${python.version}-numpy
37
38    variant gcc45 conflicts gcc46 gcc47 gcc48 description {Use the gcc45 compiler (enables fortran code)} {
39        depends_lib-append  port:gcc45
40        configure.compiler  macports-gcc-4.5
41        configure.fc        ${prefix}/bin/gfortran-mp-4.5
42        configure.f77       ${prefix}/bin/gfortran-mp-4.5
43        configure.f90       ${prefix}/bin/gfortran-mp-4.5
44    }
45   
46    variant gcc46 conflicts gcc45 gcc47 gcc48 description {Use the gcc46 compiler (enables fortran code)} {
47        depends_lib-append  port:gcc46
48        configure.compiler  macports-gcc-4.6
49        configure.fc        ${prefix}/bin/gfortran-mp-4.6
50        configure.f77       ${prefix}/bin/gfortran-mp-4.6
51        configure.f90       ${prefix}/bin/gfortran-mp-4.6
52    }
53   
54    variant gcc47 conflicts gcc45 gcc46 gcc48 description {Use the gcc47 compiler (enables fortran code)} {
55        depends_lib-append  port:gcc47
56        configure.compiler  macports-gcc-4.7
57        configure.fc        ${prefix}/bin/gfortran-mp-4.7
58        configure.f77       ${prefix}/bin/gfortran-mp-4.7
59        configure.f90       ${prefix}/bin/gfortran-mp-4.7
60    }
61   
62    variant gcc48 conflicts gcc45 gcc46 gcc47 description {Use the gcc48 compiler (enables fortran code)} {
63        depends_lib-append  port:gcc48
64        configure.compiler  macports-gcc-4.8
65        configure.fc        ${prefix}/bin/gfortran-mp-4.8
66        configure.f77       ${prefix}/bin/gfortran-mp-4.8
67        configure.f90       ${prefix}/bin/gfortran-mp-4.8
68    }
69   
70    if {![variant_isset gcc46] && ![variant_isset gcc47] && ![variant_isset gcc48]} {
71        default_variants +gcc45
72    }
73
74#    build.args          config_fc \
75#                        --fcompiler=${configure.f90}
76#                        --noarch
77        post-patch {
78                set pyver [join [split ${python.version} {}] {.}]
79                set pyfwk ${frameworks_dir}/Python.framework/Versions/
80#               reinplace -E "s|XXX|-L${pyfwk}${pyver}/lib -lpython${pyver} -Wl,-dylib|" \
81                reinplace -E "s|XXX|-L${pyfwk}${pyver}/lib -lpython${pyver} -Xlinker -dylib|" \
82                                         ${worksrcpath}/setup.py
83        }
84   
85    build.env-append    CC=${configure.cc} \
86                        F90=${configure.f90}
87
88    livecheck.type      none
89} else {
90    livecheck.type      regex
91    livecheck.url       ${master_sites}
92    livecheck.regex     "bvp_solver-(\\d+(?:\\.\\d+)*)${extract.suffix}"
93}