diff options
author | Zhang Le <r0bertz@gentoo.org> | 2010-06-13 22:36:53 +0800 |
---|---|---|
committer | Zhang Le <r0bertz@gentoo.org> | 2010-06-13 22:36:53 +0800 |
commit | 559f42b08c4fa4becff02950779a4454313d1fe9 (patch) | |
tree | 54d667b2b0ca180e57efa40384985b72bc5d47b4 | |
parent | fixed manifest of tcl (diff) | |
download | loongson-559f42b08c4fa4becff02950779a4454313d1fe9.tar.gz loongson-559f42b08c4fa4becff02950779a4454313d1fe9.tar.bz2 loongson-559f42b08c4fa4becff02950779a4454313d1fe9.zip |
added numpy-1.4.1.ebuild
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
-rw-r--r-- | dev-python/numpy/Manifest | 11 | ||||
-rw-r--r-- | dev-python/numpy/files/numpy-1.3.0-darwin-no-arch.patch | 83 | ||||
-rw-r--r-- | dev-python/numpy/files/numpy-1.3.0-fenv-freebsd.patch | 28 | ||||
-rw-r--r-- | dev-python/numpy/files/numpy-1.4.0-interix.patch | 15 | ||||
-rw-r--r-- | dev-python/numpy/files/numpy-1.4.1-loongson.patch | 59 | ||||
-rw-r--r-- | dev-python/numpy/numpy-1.4.1.ebuild (renamed from dev-python/numpy/numpy-1.3.0-r1.ebuild) | 79 |
6 files changed, 240 insertions, 35 deletions
diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest index 51b9829..2474c76 100644 --- a/dev-python/numpy/Manifest +++ b/dev-python/numpy/Manifest @@ -4,7 +4,14 @@ AUX numpy-1.0.4-freebsd.patch 3084 RMD160 9ec6841d9b8205d584f33356fcafc30047134d AUX numpy-1.1.0-f2py.patch 1123 RMD160 ff90313cbe8282ac37b0cb98effa0ff6a03760c2 SHA1 5c37ea9be68782e533c7c2d64ca00e8e8ae648ea SHA256 cc67bc8ab7dba2febb91ba15cc51933021743a286c980e0068afd6fabdd065e7 AUX numpy-1.3.0-alpha.patch 1210 RMD160 d92ca3fa7d671da1ff8e3e2e1a6b64469cf7142b SHA1 0a8740710d7b2e40b1a8899771b641999440558b SHA256 ea0da717e694338a1bca72f1b635309be15af2cdee206b50de4b38ce95701c64 AUX numpy-1.3.0-arm-sh.patch 2166 RMD160 cc60f574ab7fe29968ebc56f9018c2427f01f6cc SHA1 59b4751c26abf837a69d8bd637bd9abb89344f72 SHA256 9b373c5b8886df971c350c44766ccdf165ffec6c2082f68704121965ad7a2f37 +AUX numpy-1.3.0-darwin-no-arch.patch 3016 RMD160 a35968a68fac400e14d5eeafb44e058825c17ed5 SHA1 35b3fa3b0ed149f2f9f906e7a81d7f3cd0260d58 SHA256 9058cb30c54314e4e8dc5e4c0e4be3178664067d1ae71b0bee9576293f8cd71d +AUX numpy-1.3.0-fenv-freebsd.patch 1177 RMD160 78a84e18836472bd9c657771c43a44e417ec3e19 SHA1 4dba898255df4784eac9e52633307991c12029de SHA256 2fa3ed9fdeb9dc529d51da4ba8a3a7ea4cc4bb9998fffa66426b1606f2c637b5 AUX numpy-1.3.0-loongson.patch 1487 RMD160 f18bcd18593b3a5596c1cde500087c7a83614317 SHA1 c39593d1675666806a3a4998c9b6cec6d5ffc067 SHA256 6bc7a0268cbb13b6bda2a250ac635f6996aad7b03becef396f74f6fa02892a62 AUX numpy-1.3.0-parisc.patch 474 RMD160 682971d65894aeb2e87de5f8eac717a8f7803318 SHA1 da6067bd782604119111d69fce06b7536d59f6ca SHA256 413af76d3b5518d2f544c4497110a3401d40a7ea713a7449ea8826facddbf225 -DIST numpy-1.3.0.tar.gz 1995868 RMD160 a75155d2014204e16c59857b92356353505c39b9 SHA1 c04998a1fbf7d990c9a2b99a7b62486012c570ac SHA256 7524687cce85aa78103046db5e617c626b0ef871a203a049159f88f35647c90d -EBUILD numpy-1.3.0-r1.ebuild 3995 RMD160 8de2d92cac50b42b9430872097a82ddf331693ee SHA1 cc64f10a534891e8c5943e98064700a024c48ead SHA256 24390839b6c40e56b1a866754b8cbc075fe41a31aaa9d4a1ac6cf2935d039c3f +AUX numpy-1.4.0-interix.patch 478 RMD160 9a0290253238e09b824069d0026a5d2f00c90a8f SHA1 261e45c3feb068f033eed9b6468f5115ea418ca5 SHA256 4d6adcc1c66aa1399871c37f57e94ae7138c157ee5575945e83224a36c98c142 +AUX numpy-1.4.1-loongson.patch 2033 RMD160 c61ffd492cb8bcaba727f106c3c01c79dacd7778 SHA1 b56c8f48ee932b5d1a21b9e8abf6a259dc3cc2a3 SHA256 6bc5b640ca97855b5fab2342100f6eef2c7a153c9cbec6e27a321597865ea337 +DIST numpy-1.3-html.zip 3303495 RMD160 bd35c66c78574e6225de59a47cf161f3623c5119 SHA1 10799530be334cd7b1120a0b46f3c6f5deae5110 SHA256 933724b83300c9fc0779a579dad212ca8dcee230f1d892a56b977f3854d87c7e +DIST numpy-1.3-ref.pdf 3907485 RMD160 54fe28c711b49ccc160dceed05bafa4e605aec36 SHA1 1edc6a3467bb36c5f395c2ed4dc066394180c6f8 SHA256 c8420df5d25e7fd76e7662477787184d068f43fc340b6975fa1db9ec06c773e7 +DIST numpy-1.3-user.pdf 461480 RMD160 a8aa36e6a0c03784fa3147cc0f0967c7f3c726d6 SHA1 059eee01d65ea401e47f978e2d5ebf5f67973723 SHA256 ab99f999d33eb1d1100ddb5c995ba525edaa64efce51a1f06b65a8285779d636 +DIST numpy-1.4.1.tar.gz 2201795 RMD160 a0bbebd1138ffc93517095e3c06459cd9744a9d6 SHA1 ec6078aa09acbcca3d90f9f36353fc83e7e1daa0 SHA256 2e7bb84573e5123e07f3c919fd433bc09b78d606252b6b719e385c2a981d8e06 +EBUILD numpy-1.4.1.ebuild 4652 RMD160 5667e4af540fa620b5660b4d46d6e66f8fd6bb0e SHA1 91bbf8508403a078495df79fa86a66d4fd495302 SHA256 02f5f6f5f05a5c360a5ecc1faa1e2503bae8b35c9e34e5b3e8bca672168283fb diff --git a/dev-python/numpy/files/numpy-1.3.0-darwin-no-arch.patch b/dev-python/numpy/files/numpy-1.3.0-darwin-no-arch.patch new file mode 100644 index 0000000..e96611d --- /dev/null +++ b/dev-python/numpy/files/numpy-1.3.0-darwin-no-arch.patch @@ -0,0 +1,83 @@ +gfortran -v happily accepts any -arch X argument, but also happily dies +during compilation that it doesn't understand -arch argument. Hence, +testing if -arch is supported like this is kind of not working well. + +Since Apple does not officially ship fortran support (any), I wonder how +universal support could have crept into this piece of code all. They +don't even have an Apple GCC compiler with fortran support (like we do +with Gentoo Prefix). + +http://projects.scipy.org/numpy/ticket/1087 + + +--- numpy/distutils/fcompiler/gnu.py ++++ numpy/distutils/fcompiler/gnu.py +@@ -12,13 +12,6 @@ + + TARGET_R = re.compile("Target: ([a-zA-Z0-9_\-]*)") + +-# XXX: do we really need to check for target ? If the arch is not supported, +-# the return code should be != 0 +-_R_ARCHS = {"ppc": r"^Target: (powerpc-.*)$", +- "i686": r"^Target: (i686-.*)$", +- "x86_64": r"^Target: (i686-.*)$", +- "ppc64": r"^Target: (powerpc-.*)$",} +- + class GnuFCompiler(FCompiler): + compiler_type = 'gnu' + compiler_aliases = ('g77',) +@@ -215,6 +208,7 @@ + # OS X: GNU Fortran 95 (GCC) 4.1.0 + # GNU Fortran 95 (GCC) 4.2.0 20060218 (experimental) + # GNU Fortran (GCC) 4.3.0 20070316 (experimental) ++ # GNU Fortran (GCC) 4.2.1 (Apple Inc. build 5574) + + possible_executables = ['gfortran', 'f95'] + executables = { +@@ -241,46 +235,6 @@ + + g2c = 'gfortran' + +- # Note that this is here instead of GnuFCompiler as gcc < 4 uses a +- # different output format (which isn't as useful) than gcc >= 4, +- # and we don't have to worry about g77 being universal (as it can't be). +- def _can_target(self, cmd, arch): +- """Return true is the compiler support the -arch flag for the given +- architecture.""" +- newcmd = cmd[:] +- newcmd.extend(["-arch", arch, "-v"]) +- st, out = exec_command(" ".join(newcmd)) +- if st == 0: +- for line in out.splitlines(): +- m = re.search(_R_ARCHS[arch], line) +- if m: +- return True +- return False +- +- def _universal_flags(self, cmd): +- """Return a list of -arch flags for every supported architecture.""" +- if not sys.platform == 'darwin': +- return [] +- arch_flags = [] +- for arch in ["ppc", "i686"]: +- if self._can_target(cmd, arch): +- arch_flags.extend(["-arch", arch]) +- return arch_flags +- +- def get_flags(self): +- flags = GnuFCompiler.get_flags(self) +- arch_flags = self._universal_flags(self.compiler_f90) +- if arch_flags: +- flags[:0] = arch_flags +- return flags +- +- def get_flags_linker_so(self): +- flags = GnuFCompiler.get_flags_linker_so(self) +- arch_flags = self._universal_flags(self.linker_so) +- if arch_flags: +- flags[:0] = arch_flags +- return flags +- + def get_library_dirs(self): + opt = GnuFCompiler.get_library_dirs(self) + if sys.platform == 'win32': diff --git a/dev-python/numpy/files/numpy-1.3.0-fenv-freebsd.patch b/dev-python/numpy/files/numpy-1.3.0-fenv-freebsd.patch new file mode 100644 index 0000000..629fc76 --- /dev/null +++ b/dev-python/numpy/files/numpy-1.3.0-fenv-freebsd.patch @@ -0,0 +1,28 @@ +--- numpy/core/include/numpy/ufuncobject.h.orig 2009-07-28 15:04:42 -0400 ++++ numpy/core/include/numpy/ufuncobject.h 2009-07-28 15:05:58 -0400 +@@ -318,8 +318,10 @@ + + #elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + +-#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || defined(__FreeBSD__) ++#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) + #include <fenv.h> ++#elif defined(__FreeBSD__) ++#include "fenv/fenv.h" + #elif defined(__CYGWIN__) + #include "fenv/fenv.c" + #endif +--- numpy/numarray/_capi.c.orig 2009-07-28 15:18:13 -0400 ++++ numpy/numarray/_capi.c 2009-07-28 15:19:04 -0400 +@@ -8,8 +8,10 @@ + #include <sys/param.h> + #endif + +-#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) ++#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) + #include <fenv.h> ++#elif (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) ++#include "numpy/fenv/fenv.h" + #elif defined(__CYGWIN__) + #include "numpy/fenv/fenv.h" + #include "numpy/fenv/fenv.c" diff --git a/dev-python/numpy/files/numpy-1.4.0-interix.patch b/dev-python/numpy/files/numpy-1.4.0-interix.patch new file mode 100644 index 0000000..b755867 --- /dev/null +++ b/dev-python/numpy/files/numpy-1.4.0-interix.patch @@ -0,0 +1,15 @@ +Reported [2010.01.18]: http://projects.scipy.org/numpy/ticket/1365 + +diff -ru numpy-1.4.0.orig/numpy/core/setup.py numpy-1.4.0/numpy/core/setup.py +--- numpy-1.4.0.orig/numpy/core/setup.py 2010-01-15 16:49:14 +0100 ++++ numpy-1.4.0/numpy/core/setup.py 2010-01-15 17:02:27 +0100 +@@ -169,6 +169,9 @@ + priv = [] + pub = [] + ++ if os.uname()[0] == "Interix": ++ return priv, pub ++ + # Check for complex support + st = config.check_header('complex.h') + if st: diff --git a/dev-python/numpy/files/numpy-1.4.1-loongson.patch b/dev-python/numpy/files/numpy-1.4.1-loongson.patch new file mode 100644 index 0000000..b49107a --- /dev/null +++ b/dev-python/numpy/files/numpy-1.4.1-loongson.patch @@ -0,0 +1,59 @@ +From 0244066d28838d8e7cb5680253186e036abe87f5 Mon Sep 17 00:00:00 2001 +From: Zhang Le <r0bertz@gentoo.org> +Date: Sun, 13 Jun 2010 21:37:39 +0800 +Subject: [PATCH] define layout for HAVE_LDOUBLE_IEEE_QUAD_LE + +Signed-off-by: Zhang Le <r0bertz@gentoo.org> +--- + numpy/core/src/npymath/npy_math_private.h | 35 +++++++++++++++++++++++++++++ + 1 files changed, 35 insertions(+), 0 deletions(-) + +diff --git a/numpy/core/src/npymath/npy_math_private.h b/numpy/core/src/npymath/npy_math_private.h +index 5a63872..b56f916 100644 +--- a/numpy/core/src/npymath/npy_math_private.h ++++ b/numpy/core/src/npymath/npy_math_private.h +@@ -361,6 +361,41 @@ do { \ + typedef npy_uint64 ldouble_man_t; + typedef npy_uint64 ldouble_exp_t; + typedef npy_uint32 ldouble_sign_t; ++#elif defined(HAVE_LDOUBLE_IEEE_QUAD_LE) ++ /* ++ * IEEE quad precision, Big Endian. Bit representation is ++ * | s |eeeeeeeeeee|mmmmmmmm................mmmmmmm| ++ * |1 bit| 15 bits | 112 bits | ++ * | a[1] | a[0] | ++ */ ++ typedef npy_uint64 IEEEl2bitsrep_part; ++ ++ union IEEEl2bitsrep { ++ npy_longdouble e; ++ IEEEl2bitsrep_part a[2]; ++ }; ++ ++ #define LDBL_MANL_INDEX 0 ++ #define LDBL_MANL_MASK 0xFFFFFFFFFFFFFFFF ++ #define LDBL_MANL_SHIFT 0 ++ ++ #define LDBL_MANH_INDEX 1 ++ #define LDBL_MANH_MASK 0x0000FFFFFFFFFFFF ++ #define LDBL_MANH_SHIFT 0 ++ ++ #define LDBL_EXP_INDEX 1 ++ #define LDBL_EXP_MASK 0x7FFF000000000000 ++ #define LDBL_EXP_SHIFT 48 ++ ++ #define LDBL_SIGN_INDEX 1 ++ #define LDBL_SIGN_MASK 0x8000000000000000 ++ #define LDBL_SIGN_SHIFT 63 ++ ++ #define LDBL_NBIT 0 ++ ++ typedef npy_uint64 ldouble_man_t; ++ typedef npy_uint64 ldouble_exp_t; ++ typedef npy_uint32 ldouble_sign_t; + #endif + + /* Get the sign bit of x. x should be of type IEEEl2bitsrep */ +-- +1.7.1 + diff --git a/dev-python/numpy/numpy-1.3.0-r1.ebuild b/dev-python/numpy/numpy-1.4.1.ebuild index 2e3e626..4b8c7d4 100644 --- a/dev-python/numpy/numpy-1.3.0-r1.ebuild +++ b/dev-python/numpy/numpy-1.4.1.ebuild @@ -1,38 +1,42 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.3.0-r1.ebuild,v 1.2 2009/08/29 19:07:57 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.4.1.ebuild,v 1.1 2010/04/22 19:26:48 bicatali Exp $ EAPI="2" - -NEED_PYTHON="2.4" SUPPORT_PYTHON_ABIS="1" -inherit distutils eutils flag-o-matic toolchain-funcs +inherit distutils eutils flag-o-matic toolchain-funcs versionator + +NP="${PN}-1.3" DESCRIPTION="Fast array and numerical python library" -SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz" -HOMEPAGE="http://numpy.scipy.org/" +HOMEPAGE="http://numpy.scipy.org/ http://pypi.python.org/pypi/numpy" +SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz + doc? ( + http://docs.scipy.org/doc/${NP}.x/numpy-html.zip -> ${NP}-html.zip + http://docs.scipy.org/doc/${NP}.x/numpy-ref.pdf -> ${NP}-ref.pdf + http://docs.scipy.org/doc/${NP}.x/numpy-user.pdf -> ${NP}-user.pdf + )" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 -ppc -ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +IUSE="doc lapack test" RDEPEND="dev-python/setuptools lapack? ( virtual/cblas virtual/lapack )" DEPEND="${RDEPEND} lapack? ( dev-util/pkgconfig ) - test? ( >=dev-python/nose-0.10 )" - -IUSE="lapack test" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" -LICENSE="BSD" - -RESTRICT_PYTHON_ABIS="3*" + test? ( >=dev-python/nose-0.10 ) + doc? ( app-arch/unzip )" +RESTRICT_PYTHON_ABIS="3.*" pkg_setup() { - # whatever LDFLAGS set will break linking - # see progress in http://projects.scipy.org/scipy/numpy/ticket/573 - if [[ -n "${LDFLAGS}" ]]; then + # See progress in http://projects.scipy.org/scipy/numpy/ticket/573 + # with the subtle difference that we don't want to break Darwin where + # -shared is not a valid linker argument + if [[ ${CHOST} != *-darwin* ]] ; then append-ldflags -shared - else - LDFLAGS="-shared" fi # only one fortran to link with: @@ -45,14 +49,16 @@ pkg_setup() { export NUMPY_FCONFIG="config_fc --noopt --noarch" } +src_unpack() { + unpack ${P}.tar.gz + if use doc; then + unzip -qo "${DISTDIR}"/${NP}-html.zip -d html || die + fi +} + src_prepare() { - # Fix some paths and docs in f2py epatch "${FILESDIR}"/${PN}-1.1.0-f2py.patch - - epatch "${FILESDIR}/${P}-parisc.patch" # bug 277438 - epatch "${FILESDIR}/${P}-alpha.patch" # bug 277438 - epatch "${FILESDIR}/${P}-arm-sh.patch" - epatch "${FILESDIR}/${P}-loongson.patch" + epatch "${FILESDIR}"/${PN}-1.3.0-fenv-freebsd.patch # bug 279487 # Gentoo patch for ATLAS library names sed -i \ @@ -66,13 +72,13 @@ src_prepare() { if use lapack; then append-ldflags "$(pkg-config --libs-only-other cblas lapack)" sed -i -e '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py || die + local libdir="${EPREFIX}"/usr/$(get_libdir) cat >> site.cfg <<-EOF [atlas] include_dirs = $(pkg-config --cflags-only-I \ cblas | sed -e 's/^-I//' -e 's/ -I/:/g') library_dirs = $(pkg-config --libs-only-L \ - cblas blas lapack | sed -e \ - 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):/usr/$(get_libdir) + cblas blas lapack | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir} atlas_libs = $(pkg-config --libs-only-l \ cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g') lapack_libs = $(pkg-config --libs-only-l \ @@ -81,20 +87,21 @@ src_prepare() { include_dirs = $(pkg-config --cflags-only-I \ cblas | sed -e 's/^-I//' -e 's/ -I/:/g') library_dirs = $(pkg-config --libs-only-L \ - cblas blas | sed -e 's/^-L//' -e 's/ -L/:/g' \ - -e 's/ //g'):/usr/$(get_libdir) + cblas blas | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir} libraries = $(pkg-config --libs-only-l \ cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g') [lapack_opt] library_dirs = $(pkg-config --libs-only-L \ - lapack | sed -e 's/^-L//' -e 's/ -L/:/g' \ - -e 's/ //g'):/usr/$(get_libdir) + lapack | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir} libraries = $(pkg-config --libs-only-l \ lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g') EOF else export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None fi + + epatch "${FILESDIR}"/${PN}-1.4.0-interix.patch + epatch "${FILESDIR}"/${P}-loongson.patch } src_compile() { @@ -115,10 +122,16 @@ src_test() { } src_install() { + [[ -z ${ED} ]] && local ED=${D} distutils_src_install ${NUMPY_FCONFIG} dodoc THANKS.txt DEV_README.txt COMPATIBILITY - rm -f "${D}"/usr/lib/python*/site-packages/numpy/*.txt || die + rm -f "${ED}"/usr/lib/python*/site-packages/numpy/*.txt || die docinto f2py dodoc numpy/f2py/docs/*.txt || die "dodoc f2py failed" doman numpy/f2py/f2py.1 || die "doman failed" + if use doc; then + insinto /usr/share/doc/${PF} + doins -r "${WORKDIR}"/html || die + doins "${DISTDIR}"/${NP}*pdf || die + fi } |