Ticket #27356: Portfile

File Portfile, 3.9 KB (added by marshall.perrin@…, 13 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# $Id: Portfile 72229 2010-10-08 00:58:37Z jmr@macports.org $
3
4PortSystem              1.0
5PortGroup python27 1.0
6
7name                    py27-scipy
8version                 0.8.0
9categories              python
10platforms               darwin
11license                 BSD
12maintainers             jmr ram openmaintainer
13description             An opensource library of scientific tools for Python
14long_description        ${description}.
15
16homepage                http://www.scipy.org/
17master_sites            sourceforge:scipy
18distname                scipy-${version}
19
20checksums               md5 f0bfc6141b90e6a31555b31486602251 \
21                        sha1 d7a84e5dc440d05e4d198411a2e0c6b8ec9adfc5 \
22                        rmd160 cce915a5760f9bcf4cc39381cb01d1a5726a57f3
23
24depends_lib-append      port:py27-numpy \
25                        port:py27-nose \
26                        port:SuiteSparse \
27                        port:swig-python \
28                        port:atlas
29
30worksrcdir              ${distname}
31
32build.env-append        CCFLAGS="-I${prefix}/include -L${prefix}/lib" \
33                        ATLAS=${prefix}/lib \
34                        LAPACK=${prefix}/lib \
35                        BLAS=${prefix}/lib
36
37destroot.env-append     CCFLAGS="-I${prefix}/include -L${prefix}/lib" \
38                        ATLAS=${prefix}/lib \
39                        LAPACK=${prefix}/lib \
40                        BLAS=${prefix}/lib
41
42post-patch {
43  reinplace "s|include <\\(umfpack\.*.h\\)>|include <${prefix}/include/ufsparse/\\1>|g" ${worksrcpath}/scipy/sparse/linalg/dsolve/umfpack/umfpack.i
44}
45
46variant no_atlas description "Do not use macports atlas libraries" {
47    depends_lib-delete      port:atlas
48
49    build.env-delete        ATLAS=${prefix}/lib \
50                            LAPACK=${prefix}/lib \
51                            BLAS=${prefix}/lib
52
53    destroot.env-delete     ATLAS=${prefix}/lib \
54                            LAPACK=${prefix}/lib \
55                            BLAS=${prefix}/lib
56}
57
58variant gcc42 conflicts gcc43 gcc44 description "Use gfortran-mp-4.2 as fortran compiler" {
59  configure.compiler    macports-gcc-4.2
60  depends_lib-append    port:gcc42
61  set fc_options        "config_fc --fcompiler gnu95 --f77exec ${prefix}/bin/gfortran-mp-4.2 --f90exec ${prefix}/bin/gfortran-mp-4.2"
62  build.cmd-append      ${fc_options}
63  destroot.cmd-append   ${fc_options}
64}
65
66variant gcc43 conflicts gcc42 gcc44 description "Use gcc 4.3 tool chain for building" {
67  configure.compiler    macports-gcc-4.3
68  depends_lib-append    port:gcc43
69  set fc_options        "config_fc --fcompiler gnu95 --f77exec ${prefix}/bin/gfortran-mp-4.3 --f90exec ${prefix}/bin/gfortran-mp-4.3"
70  set config_options    "config --cc ${prefix}/bin/gcc-mp-4.3 --include-dirs ${prefix}/include --library-dirs ${prefix}/lib"
71  build.cmd-append      ${fc_options} ${config_options}
72  destroot.cmd-append   ${fc_options} ${config_options}
73
74  destroot.env-append   CC="${prefix}/bin/gcc-mp-4.3" \
75                        CXX="${prefix}/bin/g++-mp-4.3"
76  build.env-append      CC="${prefix}/bin/gcc-mp-4.3" \
77                        CXX="${prefix}/bin/g++-mp-4.3"
78}
79
80variant gcc44 conflicts gcc42 gcc43 description "Use gfortran-mp-4.4 as fortran compiler" {
81  configure.compiler    macports-gcc-4.4
82  depends_lib-append    port:gcc44
83  set fc_options        "config_fc --fcompiler gnu95 --f77exec ${prefix}/bin/gfortran-mp-4.4 --f90exec ${prefix}/bin/gfortran-mp-4.4"
84  build.cmd-append      ${fc_options}
85  destroot.cmd-append   ${fc_options}
86}
87
88if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] } {
89  default_variants      +gcc44
90}
91
92python.add_archflags    no
93universal_variant       no
94
95livecheck.type          regex
96livecheck.url           http://sourceforge.net/projects/scipy/files/
97livecheck.regex         "files\/scipy\/(\\d+(?:\\.\\d+)*)\/scipy"