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 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python27 1.0 |
---|
6 | |
---|
7 | name py27-scipy |
---|
8 | version 0.8.0 |
---|
9 | categories python |
---|
10 | platforms darwin |
---|
11 | license BSD |
---|
12 | maintainers jmr ram openmaintainer |
---|
13 | description An opensource library of scientific tools for Python |
---|
14 | long_description ${description}. |
---|
15 | |
---|
16 | homepage http://www.scipy.org/ |
---|
17 | master_sites sourceforge:scipy |
---|
18 | distname scipy-${version} |
---|
19 | |
---|
20 | checksums md5 f0bfc6141b90e6a31555b31486602251 \ |
---|
21 | sha1 d7a84e5dc440d05e4d198411a2e0c6b8ec9adfc5 \ |
---|
22 | rmd160 cce915a5760f9bcf4cc39381cb01d1a5726a57f3 |
---|
23 | |
---|
24 | depends_lib-append port:py27-numpy \ |
---|
25 | port:py27-nose \ |
---|
26 | port:SuiteSparse \ |
---|
27 | port:swig-python \ |
---|
28 | port:atlas |
---|
29 | |
---|
30 | worksrcdir ${distname} |
---|
31 | |
---|
32 | build.env-append CCFLAGS="-I${prefix}/include -L${prefix}/lib" \ |
---|
33 | ATLAS=${prefix}/lib \ |
---|
34 | LAPACK=${prefix}/lib \ |
---|
35 | BLAS=${prefix}/lib |
---|
36 | |
---|
37 | destroot.env-append CCFLAGS="-I${prefix}/include -L${prefix}/lib" \ |
---|
38 | ATLAS=${prefix}/lib \ |
---|
39 | LAPACK=${prefix}/lib \ |
---|
40 | BLAS=${prefix}/lib |
---|
41 | |
---|
42 | post-patch { |
---|
43 | reinplace "s|include <\\(umfpack\.*.h\\)>|include <${prefix}/include/ufsparse/\\1>|g" ${worksrcpath}/scipy/sparse/linalg/dsolve/umfpack/umfpack.i |
---|
44 | } |
---|
45 | |
---|
46 | variant 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 | |
---|
58 | variant 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 | |
---|
66 | variant 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 | |
---|
80 | variant 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 | |
---|
88 | if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] } { |
---|
89 | default_variants +gcc44 |
---|
90 | } |
---|
91 | |
---|
92 | python.add_archflags no |
---|
93 | universal_variant no |
---|
94 | |
---|
95 | livecheck.type regex |
---|
96 | livecheck.url http://sourceforge.net/projects/scipy/files/ |
---|
97 | livecheck.regex "files\/scipy\/(\\d+(?:\\.\\d+)*)\/scipy" |
---|