[104382] trunk/dports/python/py-numpy/Portfile
stromnov at macports.org
stromnov at macports.org
Sun Mar 24 04:27:23 PDT 2013
Revision: 104382
https://trac.macports.org/changeset/104382
Author: stromnov at macports.org
Date: 2013-03-24 04:27:23 -0700 (Sun, 24 Mar 2013)
Log Message:
-----------
py-numpy: fix whitespaces
Modified Paths:
--------------
trunk/dports/python/py-numpy/Portfile
Modified: trunk/dports/python/py-numpy/Portfile
===================================================================
--- trunk/dports/python/py-numpy/Portfile 2013-03-24 08:07:32 UTC (rev 104381)
+++ trunk/dports/python/py-numpy/Portfile 2013-03-24 11:27:23 UTC (rev 104382)
@@ -22,175 +22,169 @@
python.versions 24 25 26 27 31 32 33
-if {${subport} != ${name}} {
+if {$subport != $name} {
+ patchfiles patch-f2py_setup.py.diff \
+ patch-fcompiler_g95.diff
-patchfiles patch-f2py_setup.py.diff \
- patch-fcompiler_g95.diff
-
-if {${python.version} == 33} {
- patchfiles-append patch-python33-unicode.diff \
- patch-python33-mtrand.diff \
- patch-python33-shape.diff \
- patch-python33-methods.diff
-}
-
-depends_lib-append port:fftw-3 \
- port:py${python.version}-nose
-
-if {[variant_isset universal]} {
- build.env-append ARCHFLAGS="${configure.universal_ldflags}"
- destroot.env-append ARCHFLAGS="${configure.universal_ldflags}"
-} else {
- pre-build {
- build.env-append ARCHFLAGS="${configure.cc_archflags}"
+ if {${python.version} == 33} {
+ patchfiles-append patch-python33-unicode.diff \
+ patch-python33-mtrand.diff \
+ patch-python33-shape.diff \
+ patch-python33-methods.diff
}
- pre-destroot {
- destroot.env-append ARCHFLAGS="${configure.cc_archflags}"
- }
-}
-variant atlas \
-description {Use the MacPorts' ATLAS libraries \
- instead of Apple's Accelerate framework} {
- build.env-append ATLAS=${prefix}/lib \
- LAPACK=${prefix}/lib \
- BLAS=${prefix}/lib
- destroot.env-append ATLAS=${prefix}/lib \
- LAPACK=${prefix}/lib \
- BLAS=${prefix}/lib
- depends_lib-append port:atlas
+ depends_lib-append port:fftw-3 \
+ port:py${python.version}-nose
if {[variant_isset universal]} {
- python.set_compiler no
+ build.env-append ARCHFLAGS="${configure.universal_ldflags}"
+ destroot.env-append ARCHFLAGS="${configure.universal_ldflags}"
+ } else {
+ pre-build {
+ build.env-append ARCHFLAGS="${configure.cc_archflags}"
+ }
+ pre-destroot {
+ destroot.env-append ARCHFLAGS="${configure.cc_archflags}"
+ }
}
-}
-# when using ATLAS (whether by default or specified by the user via
-# the +atlas variant) ...
-set gcc_version ""
-if {[variant_isset atlas]} {
+ variant atlas description {Use the MacPorts' ATLAS libraries \
+ instead of Apple's Accelerate framework} {
+ build.env-append ATLAS=${prefix}/lib \
+ LAPACK=${prefix}/lib \
+ BLAS=${prefix}/lib
+ destroot.env-append ATLAS=${prefix}/lib \
+ LAPACK=${prefix}/lib \
+ BLAS=${prefix}/lib
+ depends_lib-append port:atlas
- # see if the user has set -gcc4X to disable using MacPorts'
- # compiler; if not, either use what the user set (as +gcc4X) or
- # default to gcc45.
-
- variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 \
- description {Use the gcc43 compiler (enables fortran linking)} {
- configure.compiler macports-gcc-4.3
+ if {[variant_isset universal]} {
+ python.set_compiler no
+ }
}
- variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 \
- description {Use the gcc44 compiler (enables fortran linking)} {
- configure.compiler macports-gcc-4.4
- }
+ # when using ATLAS (whether by default or specified by the user via
+ # the +atlas variant) ...
+ set gcc_version ""
+ if {[variant_isset atlas]} {
- variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 \
- description {Use the gcc45 compiler (enables fortran linking)} {
- configure.compiler macports-gcc-4.5
- }
+ # see if the user has set -gcc4X to disable using MacPorts'
+ # compiler; if not, either use what the user set (as +gcc4X) or
+ # default to gcc45.
- variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 \
- description {Use the gcc46 compiler (enables fortran linking)} {
- configure.compiler macports-gcc-4.6
- }
+ variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 \
+ description {Use the gcc43 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.3
+ }
- variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 \
- description {Use the gcc47 compiler (enables fortran linking)} {
- configure.compiler macports-gcc-4.7
- }
+ variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 \
+ description {Use the gcc44 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.4
+ }
+ variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 \
+ description {Use the gcc45 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.5
+ }
- if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc46] && ![variant_isset gcc47]} {
- default_variants +gcc45
- }
- if {[variant_isset gcc43]} {
- set gcc_version "4.3"
- } elseif {[variant_isset gcc44]} {
- set gcc_version "4.4"
- } elseif {[variant_isset gcc45]} {
- set gcc_version "4.5"
- } elseif {[variant_isset gcc46]} {
- set gcc_version "4.6"
- } elseif {[variant_isset gcc47]} {
- set gcc_version "4.7"
- }
+ variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 \
+ description {Use the gcc46 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.6
+ }
+ variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 \
+ description {Use the gcc47 compiler (enables fortran linking)} {
+ configure.compiler macports-gcc-4.7
+ }
- # when using non-Apple GCC for universal install, it can
- # create binaries only for the native OS architecture, at
- # either 32 or 64 bits. Restrict the supported archs
- # accordingly.
- if {${os.arch} == "i386"} {
- supported_archs i386 x86_64
- } elseif {${os.arch} == "powerpc"} {
- supported_archs ppc ppc64
- }
+ if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc46] && ![variant_isset gcc47]} {
+ default_variants +gcc45
+ }
- # include all the correct GCC4X port
- depends_lib-append port:gcc[join [split ${gcc_version} "."] ""]
+ if {[variant_isset gcc43]} {
+ set gcc_version "4.3"
+ } elseif {[variant_isset gcc44]} {
+ set gcc_version "4.4"
+ } elseif {[variant_isset gcc45]} {
+ set gcc_version "4.5"
+ } elseif {[variant_isset gcc46]} {
+ set gcc_version "4.6"
+ } elseif {[variant_isset gcc47]} {
+ set gcc_version "4.7"
+ }
- # force LDFLAGS for correct linking of the linalg module
- # for non-Apple GCC compilers
- patchfiles-append patch-numpy_linalg_setup.py.diff
+ # when using non-Apple GCC for universal install, it can
+ # create binaries only for the native OS architecture, at
+ # either 32 or 64 bits. Restrict the supported archs
+ # accordingly.
+ if {${os.arch} == "i386"} {
+ supported_archs i386 x86_64
+ } elseif {${os.arch} == "powerpc"} {
+ supported_archs ppc ppc64
+ }
- if {${gcc_version} == ""} {
- # user specified -gcc4X but +atlas (either as default or
- # explicitly); do not allow since it might lead to
- # undetermined runtime execution.
- return -code error \
+ # include all the correct GCC4X port
+ depends_lib-append port:gcc[join [split ${gcc_version} "."] ""]
+
+ # force LDFLAGS for correct linking of the linalg module
+ # for non-Apple GCC compilers
+ patchfiles-append patch-numpy_linalg_setup.py.diff
+
+ if {${gcc_version} == ""} {
+ # user specified -gcc4X but +atlas (either as default or
+ # explicitly); do not allow since it might lead to
+ # undetermined runtime execution.
+ return -code error \
"\n\nWhen using the +atlas variant (either as the default or setting
explicitly), one of the +gcc4X variants must be selected.\n"
+ }
+ } else {
+ variant universal {
+ patchfiles-append patch-setup.py.diff
+ }
}
-} else {
- variant universal {
- patchfiles-append patch-setup.py.diff
- }
-}
-post-patch {
- reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" \
- ${worksrcpath}/numpy/f2py/setup.py
+ post-patch {
+ reinplace "s|@@MPORTS_PYTHON@@|${python.bin}|" \
+ ${worksrcpath}/numpy/f2py/setup.py
- if {[variant_isset universal] && [variant_isset atlas]} {
- # Prepare wrappers
- file copy -force ${filespath}/wrapper-template \
- ${worksrcpath}/c-wrapper
- file copy -force ${filespath}/wrapper-template \
- ${worksrcpath}/f-wrapper
- file copy -force ${filespath}/wrapper-template \
- ${worksrcpath}/cxx-wrapper
+ if {[variant_isset universal] && [variant_isset atlas]} {
+ # Prepare wrappers
+ file copy -force ${filespath}/wrapper-template \
+ ${worksrcpath}/c-wrapper
+ file copy -force ${filespath}/wrapper-template \
+ ${worksrcpath}/f-wrapper
+ file copy -force ${filespath}/wrapper-template \
+ ${worksrcpath}/cxx-wrapper
- reinplace "s|@@@|${configure.cc}|" ${worksrcpath}/c-wrapper
- reinplace "s|---|\\\\.c|" ${worksrcpath}/c-wrapper
- reinplace "s|&&&|${prefix}|" ${worksrcpath}/c-wrapper
+ reinplace "s|@@@|${configure.cc}|" ${worksrcpath}/c-wrapper
+ reinplace "s|---|\\\\.c|" ${worksrcpath}/c-wrapper
+ reinplace "s|&&&|${prefix}|" ${worksrcpath}/c-wrapper
- reinplace "s|@@@|${configure.cxx}|" ${worksrcpath}/cxx-wrapper
- reinplace "s#---#(\\\\.C|\\\\.cpp|\\\\.cc)#" \
- ${worksrcpath}/cxx-wrapper
- reinplace "s|&&&|${prefix}|" ${worksrcpath}/cxx-wrapper
+ reinplace "s|@@@|${configure.cxx}|" ${worksrcpath}/cxx-wrapper
+ reinplace "s#---#(\\\\.C|\\\\.cpp|\\\\.cc)#" \
+ ${worksrcpath}/cxx-wrapper
+ reinplace "s|&&&|${prefix}|" ${worksrcpath}/cxx-wrapper
- reinplace "s|@@@|${configure.f90}|" ${worksrcpath}/f-wrapper
- reinplace "s|---|\\\\.f|" ${worksrcpath}/f-wrapper
- reinplace "s|&&&|${prefix}|" ${worksrcpath}/f-wrapper
+ reinplace "s|@@@|${configure.f90}|" ${worksrcpath}/f-wrapper
+ reinplace "s|---|\\\\.f|" ${worksrcpath}/f-wrapper
+ reinplace "s|&&&|${prefix}|" ${worksrcpath}/f-wrapper
- build.env-append CC="${worksrcpath}/c-wrapper" \
- CXX="${worksrcpath}/cxx-wrapper" \
- F77="${worksrcpath}/f-wrapper" \
- F90="${worksrcpath}/f-wrapper"
+ build.env-append CC="${worksrcpath}/c-wrapper" \
+ CXX="${worksrcpath}/cxx-wrapper" \
+ F77="${worksrcpath}/f-wrapper" \
+ F90="${worksrcpath}/f-wrapper"
- destroot.env-append CC="${worksrcpath}/c-wrapper" \
- CXX="${worksrcpath}/cxx-wrapper" \
- F77="${worksrcpath}/f-wrapper" \
- F90="${worksrcpath}/f-wrapper"
+ destroot.env-append CC="${worksrcpath}/c-wrapper" \
+ CXX="${worksrcpath}/cxx-wrapper" \
+ F77="${worksrcpath}/f-wrapper" \
+ F90="${worksrcpath}/f-wrapper"
+ }
}
-}
-}
-
-if {${name} == ${subport}} {
- livecheck.regex archive/[join ${github.tag_prefix} ""](\[\\d+(?:\\.\\d+)*"\]+)${extract.suffix}"
-} else {
livecheck.type none
+} else {
+ livecheck.regex archive/[join ${github.tag_prefix} ""](\[\\d+(?:\\.\\d+)*"\]+)${extract.suffix}"
}
subport py32-numpy {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130324/f9346823/attachment.html>
More information about the macports-changes
mailing list