summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2007-05-29 15:33:57 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2007-05-29 15:33:57 +0000
commit4345a31f683258f4924adf13b912b704bd3b5605 (patch)
tree4c41d39308a0f9b6d6f290e45beb14e59e1dbdb9 /dev-python
parentStable on sparc wrt #171107 (diff)
downloadgentoo-2-4345a31f683258f4924adf13b912b704bd3b5605.tar.gz
gentoo-2-4345a31f683258f4924adf13b912b704bd3b5605.tar.bz2
gentoo-2-4345a31f683258f4924adf13b912b704bd3b5605.zip
Added a patch for freebsd, thanks to Joe Peterson <joe@skyrush.com> . Removed array_protocol tests, buggy with various numeric/numpy versions. Thanks to Diego Pettenò <flameeyes@gentoo.org> for reporting.
(Portage version: 2.1.2.7)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/numarray/ChangeLog8
-rw-r--r--dev-python/numarray/files/numarray-1.5.2-freebsd.patch23
-rw-r--r--dev-python/numarray/numarray-1.5.2-r1.ebuild35
3 files changed, 55 insertions, 11 deletions
diff --git a/dev-python/numarray/ChangeLog b/dev-python/numarray/ChangeLog
index 462d48303399..562640ccf6d6 100644
--- a/dev-python/numarray/ChangeLog
+++ b/dev-python/numarray/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/numarray
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/ChangeLog,v 1.25 2007/05/24 16:29:22 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/ChangeLog,v 1.26 2007/05/29 15:33:57 bicatali Exp $
+
+ 29 May 2007; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/numarray-1.5.2-freebsd.patch, numarray-1.5.2-r1.ebuild:
+ Added a patch for freebsd, thanks to Joe Peterson <joe@skyrush.com> .
+ Removed array_protocol tests, buggy with various numeric/numpy versions.
+ Thanks to Diego Pettenò <flameeyes@gentoo.org> for reporting.
24 May 2007; Diego Pettenò <flameeyes@gentoo.org>
numarray-1.5.2-r1.ebuild:
diff --git a/dev-python/numarray/files/numarray-1.5.2-freebsd.patch b/dev-python/numarray/files/numarray-1.5.2-freebsd.patch
new file mode 100644
index 000000000000..a9cec5527bb4
--- /dev/null
+++ b/dev-python/numarray/files/numarray-1.5.2-freebsd.patch
@@ -0,0 +1,23 @@
+--- numarray-1.5.2/Src/libnumarray.ch~ 2007-05-24 14:21:43 -0600
++++ numarray-1.5.2/Src/libnumarray.ch 2007-05-24 14:22:58 -0600
+@@ -1920,9 +1920,9 @@
+ return retstatus;
+ }
+
+-#elif defined(linux) || defined(darwin) || defined(__CYGWIN__)
++#elif defined(linux) || defined(__FreeBSD__) || defined(darwin) || defined(__CYGWIN__)
+
+-#if defined(__GLIBC__) || defined(darwin) || defined(__MINGW32__)
++#if defined(__GLIBC__) || defined(__FreeBSD__) || defined(darwin) || defined(__MINGW32__)
+ #include <fenv.h>
+ #elif defined(__CYGWIN__)
+ #include <mingw/fenv.h>
+@@ -3886,7 +3886,7 @@
+ }
+
+ /* Likewise for Integer overflows */
+-#if defined(linux)
++#if defined(linux) || defined(__FreeBSD__)
+ static int int_overflow_error(Float64 value) { /* For x86_64 */
+ feraiseexcept(FE_OVERFLOW);
+ return (int) value;
diff --git a/dev-python/numarray/numarray-1.5.2-r1.ebuild b/dev-python/numarray/numarray-1.5.2-r1.ebuild
index f5f3f22d9ce1..2f75633ed684 100644
--- a/dev-python/numarray/numarray-1.5.2-r1.ebuild
+++ b/dev-python/numarray/numarray-1.5.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/numarray-1.5.2-r1.ebuild,v 1.5 2007/05/24 16:29:22 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/numarray-1.5.2-r1.ebuild,v 1.6 2007/05/29 15:33:57 bicatali Exp $
NEED_PYTHON=2.3
@@ -27,8 +27,8 @@ LICENSE="BSD"
DOCS="LICENSE.txt Doc/*.txt Doc/release_notes/ANNOUNCE-${PV:0:3}"
-# test with lapack buggy
-RESTRICT="lapack? ( test )"
+# test with lapack buggy on amd64 (at least)
+RESTRICT="amd64? ( lapack? ( test ) )"
pkg_setup() {
if use lapack; then
@@ -58,10 +58,24 @@ src_unpack() {
# fix refcount problem from a debian bug
epatch "${FILESDIR}"/${P}-refcount.patch
+ # Fix missing exceptions (e.g. divide by zero, overflow) in FreeBSD
+ # (i.e. need to include "__FreeBSD__" in pre-processor conditionals)
+ epatch "${FILESDIR}"/${P}-freebsd.patch
+
+ # fix array_protocol tests with numpy
+ #sed -i \
+ # -e 's/True/ True/g' \
+ # Lib/array_protocol.py || die "sed array_protocol failed"
+
+ # array_protocol tests are buggy with various numeric/numpy versions
+ sed -i \
+ -e '/array_protocol/d' \
+ Lib/testall.py || die "sed testall failed"
+
# fix hard-coded path in numinclude
sed -i \
-e "s:/home/jmiller/work/debug/include/python2.5:/usr/include/python${PYVER}:" \
- Lib/numinclude.py || die "sed failed"
+ Lib/numinclude.py || die "sed numinclude failed"
# configure cfg_packages.py for lapack
if use lapack; then
@@ -70,18 +84,19 @@ src_unpack() {
-e 's:/usr/local/include/atlas:/usr/include/atlas:g' \
-e "s:/usr/local/lib/atlas:/usr/$(get_libdir):g" \
-e 's:f77blas:blas:g' \
- cfg_packages.py
+ cfg_packages.py || die "sed for lapack failed"
# fix gfortran for > gcc-4
if [[ "${FORTRANC}" == gfortran ]]; then
sed -i \
-e "s:g2c:gfortran:g" \
- cfg_packages.py
+ cfg_packages.py || die "sed for gfortran failed"
fi
- [[ "${mycblas}" == reference ]] && \
+ if [[ "${mycblas}" == reference ]]; then
sed -i \
- -e "s:'atlas',::g" \
- -e "s:include/atlas:include/cblas:g" \
- cfg_packages.py
+ -e "s:'atlas',::g" \
+ -e "s:include/atlas:include/cblas:g" \
+ cfg_packages.py || die "sed for reference lapack failed"
+ fi
fi
${python} setup.py config --gencode || die "API code generation failed"
}