1 | # -*- coding: utf-8; mode: tcl; 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 66966 2010-04-27 01:48:39Z ram@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup python26 1.0 |
---|
6 | |
---|
7 | name py26-numpy |
---|
8 | epoch 20100319 |
---|
9 | version 1.4.1 |
---|
10 | revision 1 |
---|
11 | categories python |
---|
12 | platforms darwin |
---|
13 | maintainers mcalhoun openmaintainer |
---|
14 | description Core utilities for the scientific library scipy |
---|
15 | long_description ${description} |
---|
16 | |
---|
17 | homepage http://numpy.scipy.org/ |
---|
18 | master_sites sourceforge:numpy |
---|
19 | distname numpy-${version} |
---|
20 | |
---|
21 | checksums md5 5c7b5349dc3161763f7f366ceb96516b \ |
---|
22 | sha1 ec6078aa09acbcca3d90f9f36353fc83e7e1daa0 \ |
---|
23 | rmd160 a0bbebd1138ffc93517095e3c06459cd9744a9d6 |
---|
24 | |
---|
25 | patchfiles patch-f2py_setup.py.diff \ |
---|
26 | patch-system_info.py.diff \ |
---|
27 | patch-fcompiler_g95.diff |
---|
28 | |
---|
29 | depends_lib-append port:fftw-3 \ |
---|
30 | port:py26-nose \ |
---|
31 | port:atlas |
---|
32 | |
---|
33 | build.env-append ATLAS=${prefix}/lib \ |
---|
34 | LAPACK=${prefix}/lib \ |
---|
35 | BLAS=${prefix}/lib \ |
---|
36 | CC="${worksrcpath}/c-wrapper" \ |
---|
37 | CXX="${worksrcpath}/c++-wrapper" \ |
---|
38 | F77="${worksrcpath}/f-wrapper" \ |
---|
39 | F90="${worksrcpath}/f-wrapper" |
---|
40 | |
---|
41 | destroot.env-append ATLAS=${prefix}/lib \ |
---|
42 | LAPACK=${prefix}/lib \ |
---|
43 | BLAS=${prefix}/lib \ |
---|
44 | CC="${worksrcpath}/c-wrapper" \ |
---|
45 | CXX="${worksrcpath}/c++-wrapper" \ |
---|
46 | F77="${worksrcpath}/f-wrapper" \ |
---|
47 | F90="${worksrcpath}/f-wrapper" |
---|
48 | |
---|
49 | # Variants |
---|
50 | |
---|
51 | variant no_gcc description {No gcc compiler (disables fortran code)} { |
---|
52 | |
---|
53 | } |
---|
54 | |
---|
55 | if {![variant_isset gcc45] && \ |
---|
56 | ![variant_isset gcc44] && \ |
---|
57 | ![variant_isset gcc43] && |
---|
58 | ![variant_isset no_gcc]} { default_variants +gcc44 } |
---|
59 | |
---|
60 | variant gcc45 conflicts gcc43 gcc44 description {Uses gcc45} { |
---|
61 | depends_lib-append port:gcc45 |
---|
62 | configure.compiler macports-gcc-4.5 |
---|
63 | } |
---|
64 | |
---|
65 | variant gcc44 conflicts gcc43 gcc45 description {Uses gcc44 (default)} { |
---|
66 | depends_lib-append port:gcc44 |
---|
67 | configure.compiler macports-gcc-4.4 |
---|
68 | } |
---|
69 | |
---|
70 | variant gcc43 conflicts gcc44 gcc45 description {uses gcc43} { |
---|
71 | depends_lib-append port:gcc43 |
---|
72 | configure.compiler macports-gcc-4.3 |
---|
73 | } |
---|
74 | |
---|
75 | variant no_atlas description {Do not use the macports atlas libs} { |
---|
76 | build.env-delete ATLAS=${prefix}/lib \ |
---|
77 | LAPACK=${prefix}/lib \ |
---|
78 | BLAS=${prefix}/lib |
---|
79 | |
---|
80 | destroot.env-delete ATLAS=${prefix}/lib \ |
---|
81 | LAPACK=${prefix}/lib \ |
---|
82 | BLAS=${prefix}/lib |
---|
83 | depends_lib-delete port:atlas |
---|
84 | } |
---|
85 | |
---|
86 | variant universal { |
---|
87 | patchfiles-append patch-setup.py.diff |
---|
88 | } |
---|
89 | |
---|
90 | pre-patch { |
---|
91 | ui_debug ("Generating wrappers") |
---|
92 | file copy -force ${filespath}/wrapper ${worksrcpath}/c-wrapper |
---|
93 | file copy -force ${filespath}/wrapper ${worksrcpath}/c++-wrapper |
---|
94 | file copy -force ${filespath}/wrapper ${worksrcpath}/f-wrapper |
---|
95 | |
---|
96 | reinplace "s|+++|\\\\.c|" ${worksrcpath}/c-wrapper |
---|
97 | reinplace "s/+++/(\\\\.cxx|\\\\.C|\\\\.cc)/" ${worksrcpath}/c++-wrapper |
---|
98 | reinplace "s|+++|\\\\.f|" ${worksrcpath}/f-wrapper |
---|
99 | |
---|
100 | reinplace "s|___|${prefix}|" ${worksrcpath}/c-wrapper |
---|
101 | reinplace "s|___|${prefix}|" ${worksrcpath}/c++-wrapper |
---|
102 | reinplace "s|___|${prefix}|" ${worksrcpath}/f-wrapper |
---|
103 | |
---|
104 | if {[variant_isset gcc45]} { |
---|
105 | reinplace "s|@@@|gcc-mp-4.5|" ${worksrcpath}/c-wrapper |
---|
106 | reinplace "s|@@@|g++-mp-4.5|" ${worksrcpath}/c++-wrapper |
---|
107 | reinplace "s|@@@|gfortran-mp-4.5|" ${worksrcpath}/f-wrapper |
---|
108 | } elseif {[variant_isset gcc44]} { |
---|
109 | reinplace "s|@@@|gcc-mp-4.4|" ${worksrcpath}/c-wrapper |
---|
110 | reinplace "s|@@@|g++-mp-4.4|" ${worksrcpath}/c++-wrapper |
---|
111 | reinplace "s|@@@|gfortran-mp-4.4|" ${worksrcpath}/f-wrapper |
---|
112 | } elseif {[variant_isset gcc43]} { |
---|
113 | reinplace "s|@@@|gcc-mp-4.3|" ${worksrcpath}/c-wrapper |
---|
114 | reinplace "s|@@@|g++-mp-4.3|" ${worksrcpath}/c++-wrapper |
---|
115 | reinplace "s|@@@|gfortran-mp-4.3|" ${worksrcpath}/f-wrapper |
---|
116 | } |
---|
117 | xinstall -m 755 ${worksrcpath}/c-wrapper ${worksrcpath} |
---|
118 | xinstall -m 755 ${worksrcpath}/c++-wrapper ${worksrcpath} |
---|
119 | xinstall -m 755 ${worksrcpath}/f-wrapper ${worksrcpath} |
---|
120 | } |
---|
121 | |
---|
122 | post-patch { |
---|
123 | reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" \ |
---|
124 | ${worksrcpath}/numpy/f2py/setup.py |
---|
125 | } |
---|
126 | |
---|
127 | livecheck.type regex |
---|
128 | livecheck.url http://sourceforge.net/projects/numpy/files/ |
---|
129 | livecheck.regex "files\/NumPy\/(\\d+(?:\\.\\d+)*)\/numpy" |
---|