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