Ticket #24942: py26-numpy_svn.diff
File py26-numpy_svn.diff, 6.0 KB (added by michaelld (Michael Dickens), 14 years ago) |
---|
-
files/patch-numpy_linalg_setup.py.diff
1 --- numpy/linalg/setup.py.orig 2010-09-14 11:44:21.000000000 -0400 2 +++ numpy/linalg/setup.py 2010-09-14 11:45:01.000000000 -0400 3 @@ -27,6 +27,7 @@ 4 'zlapack_lite.c', 'dlapack_lite.c', 5 'blas_lite.c', 'dlamch.c', 6 'f2c_lite.c','f2c.h'], 7 + extra_link_args=['-undefined dynamic_lookup -bundle'], 8 extra_info = lapack_info 9 ) 10 -
Portfile
7 7 name py26-numpy 8 8 epoch 20100319 9 9 version 1.5.0 10 revision 1 10 11 categories python 11 12 platforms darwin 12 13 maintainers mcalhoun openmaintainer … … 26 27 patch-fcompiler_g95.diff 27 28 28 29 depends_lib-append port:fftw-3 \ 29 port:py26-nose \ 30 port:atlas 30 port:py26-nose 31 31 32 build.env-append ATLAS=${prefix}/lib \ 32 post-patch { 33 reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" \ 34 ${worksrcpath}/numpy/f2py/setup.py 35 36 # disallow searching for any fortran executable except what is 37 # specified in this Portfile. 38 reinplace "/possible_executables/s|\\\[.*\\\]|\[\]|g" \ 39 ${worksrcpath}/numpy/distutils/fcompiler/gnu.py 40 } 41 42 variant atlas \ 43 description {Use the MacPorts' ATLAS libraries \ 44 instead of Apple's Accelerate framework} { 45 build.env-append ATLAS=${prefix}/lib \ 33 46 LAPACK=${prefix}/lib \ 34 47 BLAS=${prefix}/lib 35 36 destroot.env-append ATLAS=${prefix}/lib \ 48 destroot.env-append ATLAS=${prefix}/lib \ 37 49 LAPACK=${prefix}/lib \ 38 50 BLAS=${prefix}/lib 51 depends_lib-append port:atlas 52 } 39 53 40 post-patch { 41 reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" ${worksrcpath}/numpy/f2py/setup.py 54 # use ALTAS by default; if MacPorts' ATLAS is not used, numpy will 55 # link with that supplied by Apple's Accelerate framework. 56 if {![variant_isset atlas]} { 57 default_variants +atlas 42 58 } 43 59 44 variant gcc43 conflicts gcc44 description {Use the gcc43 compiler (enables fortran code)} { 45 depends_lib-append port:gcc43 46 configure.compiler macports-gcc-4.3 47 build.env-append CC="${prefix}/bin/gcc-mp-4.3" \ 48 CXX="${prefix}/bin/g++-mp-4.3" 60 # when using ATLAS (whether by default or specified by the user via 61 # the +atlas variant) ... 62 if {[variant_isset atlas]} { 63 # see if the user has set -gcc4X to disable using MacPorts' 64 # compiler; if not, either use what the user set (as +gcc4X) or 65 # default to gcc44. 49 66 50 destroot.env-append CC="${prefix}/bin/gcc-mp-4.3" \ 51 CXX="${prefix}/bin/g++-mp-4.3" 52 } 67 variant gcc43 conflicts gcc44 gcc45 \ 68 description {Use the gcc43 compiler (enables fortran linking)} {} 53 69 54 variant gcc44 conflicts gcc43 description {Use the gcc44 compiler (enables fortran code)} { 55 depends_lib-append port:gcc44 56 configure.compiler macports-gcc-4.4 57 build.env-append CC="${prefix}/bin/gcc-mp-4.4" \ 58 CXX="${prefix}/bin/g++-mp-4.4" 70 variant gcc44 conflicts gcc43 gcc45 \ 71 description {Use the gcc44 compiler (enables fortran linking)} {} 59 72 60 destroot.env-append CC="${prefix}/bin/gcc-mp-4.4" \ 61 CXX="${prefix}/bin/g++-mp-4.4" 62 } 73 variant gcc45 conflicts gcc43 gcc44 \ 74 description {Use the gcc45 compiler (enables fortran linking)} {} 63 75 64 if {![variant_isset gcc43]} { 65 default_variants +gcc44 66 } 76 set gcc_version "" 77 if {![variant_isset gcc43] && 78 ![variant_isset gcc44] && 79 ![variant_isset gcc45]} { 80 default_variants +gcc44 81 } 82 if {[variant_isset gcc43]} { 83 set gcc_version "4.3" 84 } 85 if {[variant_isset gcc44]} { 86 set gcc_version "4.4" 87 } 88 if {[variant_isset gcc45]} { 89 set gcc_version "4.5" 90 } 67 91 68 variant no_atlas description {Do not use the macports atlas libs} { 69 build.env-delete ATLAS=${prefix}/lib \ 70 LAPACK=${prefix}/lib \ 71 BLAS=${prefix}/lib 92 if {${gcc_version} != ""} { 93 # when using non-Apple GCC for universal install, it can 94 # create binaries only for the native OS architecture, at 95 # either 32 or 64 bits. Restrict the supported archs 96 # accordingly. 97 if {[variant_exists universal] && [variant_isset universal]} { 98 if { ${os.arch}=="i386" } { 99 set universal_archs_supported { i386 x86_64 } 100 } else { 101 set universal_archs_supported { ppc ppc64 } 102 } 103 } 72 104 73 destroot.env-delete ATLAS=${prefix}/lib \ 74 LAPACK=${prefix}/lib \ 75 BLAS=${prefix}/lib 76 depends_lib-delete port:atlas 105 # include all the correct GCC4X port 106 depends_lib-append port:gcc[join [split ${gcc_version} "."] ""] 107 108 # set environment variable that's recognized by the setup.py script 109 build.env-append F90="${prefix}/bin/gfortran-mp-${gcc_version}" 110 111 # force LDFLAGS for correct linking of the linalg module 112 # for non-Apple GCC compilers 113 patchfiles-append patch-numpy_linalg_setup.py.diff 114 115 } else { 116 # user specified -gcc4X but +atlas (either as default or 117 # explicitly); do not allow since it might lead to 118 # undetermined runtime execution. 119 return -code error \ 120 "\n\nWhen using the +atlas variant (either as the default or setting 121 explicitly), one of the +gcc4X variants must be selected.\n" 122 } 77 123 } 78 124 79 125 variant universal {