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="${filespath}/c-wrapper" \ |
---|
37 | CXX="${filespath}/c++-wrapper" \ |
---|
38 | F77="${filespath}/f-wrapper" \ |
---|
39 | F90="${filespath}/f-wrapper" |
---|
40 | |
---|
41 | destroot.env-append ATLAS=${prefix}/lib \ |
---|
42 | LAPACK=${prefix}/lib \ |
---|
43 | BLAS=${prefix}/lib \ |
---|
44 | CC="${filespath}/c-wrapper" \ |
---|
45 | CXX="${filespath}/c++-wrapper" \ |
---|
46 | F77="${filespath}/f-wrapper" \ |
---|
47 | F90="${filespath}/f-wrapper" |
---|
48 | |
---|
49 | ui_debug ("Generating wrappers") |
---|
50 | file copy -force ${filespath}/wrapper ${filespath}/c-wrapper |
---|
51 | file copy -force ${filespath}/wrapper ${filespath}/c++-wrapper |
---|
52 | file copy -force ${filespath}/wrapper ${filespath}/f-wrapper |
---|
53 | |
---|
54 | xinstall -m 755 ${filespath}/c-wrapper ${filespath} |
---|
55 | xinstall -m 755 ${filespath}/c++-wrapper ${filespath} |
---|
56 | xinstall -m 755 ${filespath}/f-wrapper ${filespath} |
---|
57 | |
---|
58 | reinplace "s|+++|\\\\.c|" ${filespath}/c-wrapper |
---|
59 | reinplace "s/+++/(\\\\.cxx|\\\\.C|\\\\.cc)/" ${filespath}/c++-wrapper |
---|
60 | reinplace "s|+++|\\\\.f|" ${filespath}/f-wrapper |
---|
61 | |
---|
62 | reinplace "s|___|${prefix}|" ${filespath}/c-wrapper |
---|
63 | reinplace "s|___|${prefix}|" ${filespath}/c++-wrapper |
---|
64 | reinplace "s|___|${prefix}|" ${filespath}/f-wrapper |
---|
65 | |
---|
66 | # Variants |
---|
67 | |
---|
68 | variant no_gcc description {No gcc compiler (disables fortran code)} { |
---|
69 | |
---|
70 | } |
---|
71 | |
---|
72 | if {![variant_isset gcc45] && \ |
---|
73 | ![variant_isset gcc44] && \ |
---|
74 | ![variant_isset gcc43] && |
---|
75 | ![variant_isset no_gcc]} { default_variants +gcc44 } |
---|
76 | |
---|
77 | variant gcc45 conflicts gcc43 gcc44 description {Uses gcc45} { |
---|
78 | depends_lib-append port:gcc45 |
---|
79 | configure.compiler macports-gcc-4.5 |
---|
80 | reinplace "s|@@@|gcc-mp-4.5|" ${filespath}/c-wrapper |
---|
81 | reinplace "s|@@@|g++-mp-4.5|" ${filespath}/c++-wrapper |
---|
82 | reinplace "s|@@@|gfortran-mp-4.5|" ${filespath}/f-wrapper |
---|
83 | } |
---|
84 | |
---|
85 | variant gcc44 conflicts gcc43 gcc45 description {Uses gcc44 (default)} { |
---|
86 | depends_lib-append port:gcc44 |
---|
87 | configure.compiler macports-gcc-4.4 |
---|
88 | reinplace "s|@@@|gcc-mp-4.4|" ${filespath}/c-wrapper |
---|
89 | reinplace "s|@@@|g++-mp-4.4|" ${filespath}/c++-wrapper |
---|
90 | reinplace "s|@@@|gfortran-mp-4.4|" ${filespath}/f-wrapper |
---|
91 | } |
---|
92 | |
---|
93 | variant gcc43 conflicts gcc44 gcc45 description {uses gcc43} { |
---|
94 | depends_lib-append port:gcc43 |
---|
95 | configure.compiler macports-gcc-4.3 |
---|
96 | reinplace "s|@@@|gcc-mp-4.3|" ${filespath}/c-wrapper |
---|
97 | reinplace "s|@@@|g++-mp-4.3|" ${filespath}/c++-wrapper |
---|
98 | reinplace "s|@@@|gfortran-mp-4.3|" ${filespath}/f-wrapper |
---|
99 | } |
---|
100 | |
---|
101 | variant no_atlas description {Do not use the macports atlas libs} { |
---|
102 | build.env-delete ATLAS=${prefix}/lib \ |
---|
103 | LAPACK=${prefix}/lib \ |
---|
104 | BLAS=${prefix}/lib |
---|
105 | |
---|
106 | destroot.env-delete ATLAS=${prefix}/lib \ |
---|
107 | LAPACK=${prefix}/lib \ |
---|
108 | BLAS=${prefix}/lib |
---|
109 | depends_lib-delete port:atlas |
---|
110 | } |
---|
111 | |
---|
112 | variant universal { |
---|
113 | patchfiles-append patch-setup.py.diff |
---|
114 | } |
---|
115 | |
---|
116 | post-patch { |
---|
117 | reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" \ |
---|
118 | ${worksrcpath}/numpy/f2py/setup.py |
---|
119 | } |
---|
120 | |
---|
121 | post-destroot { |
---|
122 | file delete -force ${filespath}/c-wrapper |
---|
123 | file delete -force ${filespath}/c++-wrapper |
---|
124 | file delete -force ${filespath}/f-wrapper |
---|
125 | } |
---|
126 | |
---|
127 | livecheck.type regex |
---|
128 | livecheck.url http://sourceforge.net/projects/numpy/files/ |
---|
129 | livecheck.regex "files\/NumPy\/(\\d+(?:\\.\\d+)*)\/numpy" |
---|