diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2007-09-01 22:24:30 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2007-09-01 22:24:30 +0000 |
commit | 175b96a711e290ecb0531e7b46228c2d05303c26 (patch) | |
tree | 7d3f0e2ce3d1a48125c0ec2a11609597c56ab9fc /dev-python/numeric | |
parent | fixed dependence on numpy-1.0.3.1 (diff) | |
download | gentoo-2-175b96a711e290ecb0531e7b46228c2d05303c26.tar.gz gentoo-2-175b96a711e290ecb0531e7b46228c2d05303c26.tar.bz2 gentoo-2-175b96a711e290ecb0531e7b46228c2d05303c26.zip |
fixed a lot of patches, and added a fix for python-2.5 thanks to dsd, closing bug #176914
(Portage version: 2.1.2.12)
Diffstat (limited to 'dev-python/numeric')
-rw-r--r-- | dev-python/numeric/ChangeLog | 13 | ||||
-rw-r--r-- | dev-python/numeric/files/digest-numeric-24.2-r5 (renamed from dev-python/numeric/files/digest-numeric-24.2-r3) | 0 | ||||
-rw-r--r-- | dev-python/numeric/files/digest-numeric-24.2-r6 (renamed from dev-python/numeric/files/digest-numeric-24.2-r4) | 0 | ||||
-rw-r--r-- | dev-python/numeric/files/numeric-24.2-arrayobject.patch | 32 | ||||
-rw-r--r-- | dev-python/numeric/files/numeric-24.2-dotblas.patch | 107 | ||||
-rw-r--r-- | dev-python/numeric/files/numeric-24.2-lapack.patch | 5 | ||||
-rw-r--r-- | dev-python/numeric/files/numeric-24.2-python25.patch | 223 | ||||
-rw-r--r-- | dev-python/numeric/numeric-24.2-r5.ebuild (renamed from dev-python/numeric/numeric-24.2-r3.ebuild) | 18 | ||||
-rw-r--r-- | dev-python/numeric/numeric-24.2-r6.ebuild (renamed from dev-python/numeric/numeric-24.2-r4.ebuild) | 54 |
9 files changed, 390 insertions, 62 deletions
diff --git a/dev-python/numeric/ChangeLog b/dev-python/numeric/ChangeLog index f1af8daf47eb..812d371a159e 100644 --- a/dev-python/numeric/ChangeLog +++ b/dev-python/numeric/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for dev-python/numeric # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numeric/ChangeLog,v 1.31 2007/05/25 11:08:56 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numeric/ChangeLog,v 1.32 2007/09/01 22:24:30 bicatali Exp $ + +*numeric-24.2-r5 (01 Sep 2007) + + 01 Sep 2007; Sébastien Fabbro <bicatali@gentoo.org> + files/numeric-24.2-arrayobject.patch, +files/numeric-24.2-dotblas.patch, + files/numeric-24.2-lapack.patch, files/numeric-24.2-python25.patch, + -numeric-24.2-r3.ebuild, -numeric-24.2-r4.ebuild, + +numeric-24.2-r5.ebuild, +numeric-24.2-r6.ebuild, + Fixed various patches. + Added fix for python-2.5 on amd64 thanks to dsd, cleaned ebuild, remove + buggy revisions. Closing bug #176914. 25 May 2007; Sébastien Fabbro <bicatali@gentoo.org> numeric-24.2-r4.ebuild: diff --git a/dev-python/numeric/files/digest-numeric-24.2-r3 b/dev-python/numeric/files/digest-numeric-24.2-r5 index 44098727615d..44098727615d 100644 --- a/dev-python/numeric/files/digest-numeric-24.2-r3 +++ b/dev-python/numeric/files/digest-numeric-24.2-r5 diff --git a/dev-python/numeric/files/digest-numeric-24.2-r4 b/dev-python/numeric/files/digest-numeric-24.2-r6 index 44098727615d..44098727615d 100644 --- a/dev-python/numeric/files/digest-numeric-24.2-r4 +++ b/dev-python/numeric/files/digest-numeric-24.2-r6 diff --git a/dev-python/numeric/files/numeric-24.2-arrayobject.patch b/dev-python/numeric/files/numeric-24.2-arrayobject.patch index b17fc7a8a7a2..bc78b0aa59dd 100644 --- a/dev-python/numeric/files/numeric-24.2-arrayobject.patch +++ b/dev-python/numeric/files/numeric-24.2-arrayobject.patch @@ -1,20 +1,22 @@ ---- Numeric-24.2/Src/arrayobject.c 2005-11-11 07:30:18.000000000 +0000 -+++ Numeric-24.2.new/Src/arrayobject.c 2007-02-08 12:12:01.000000000 +0000 -@@ -1866,7 +1866,7 @@ +--- Numeric-24.2.orig/Src/arrayobject.c 2005-11-11 07:30:18.000000000 +0000 ++++ Numeric-24.2/Src/arrayobject.c 2006-03-10 04:55:59.000000000 +0000 +@@ -12,7 +12,7 @@ + performance for heterogeneity. + */ + +-/* $Id: numeric-24.2-arrayobject.patch,v 1.3 2007/09/01 22:24:30 bicatali Exp $ */ ++/* $Id: numeric-24.2-arrayobject.patch,v 1.3 2007/09/01 22:24:30 bicatali Exp $ */ + + #include "Python.h" + #include <stddef.h> +@@ -1866,9 +1866,7 @@ for (i=0; i<sz; i++) { v=array_item((PyArrayObject *)self, i); PyList_SetItem(lp, i, PyArray_ToList(v)); - if (((PyArrayObject *)self)->nd>1){ -+ if (((PyArrayObject *)self)->nd>0){ - Py_DECREF(v); - } +- Py_DECREF(v); +- } ++ Py_DECREF(v); } -@@ -2877,7 +2877,7 @@ - PyArrayObject *ret=NULL; - PyArray_Descr *descr; - char *data; -- int buffer_len; -+ ssize_t buffer_len; - int res, i, n; - int dims[MAX_DIMS], strides[MAX_DIMS]; - int swap; + + return lp; diff --git a/dev-python/numeric/files/numeric-24.2-dotblas.patch b/dev-python/numeric/files/numeric-24.2-dotblas.patch new file mode 100644 index 000000000000..d7f707163f34 --- /dev/null +++ b/dev-python/numeric/files/numeric-24.2-dotblas.patch @@ -0,0 +1,107 @@ +--- Numeric-24.2/Packages/dotblas/dotblas/_dotblas.c.orig 2005-04-07 06:15:47.000000000 +0100 ++++ Numeric-24.2/Packages/dotblas/dotblas/_dotblas.c 2007-05-25 17:39:30.382025500 +0100 +@@ -52,7 +52,7 @@ + static PyObject *dotblas_matrixproduct(PyObject *dummy, PyObject *args) { + PyObject *op1, *op2; + PyArrayObject *ap1, *ap2, *ret; +- int i, j, l, lda, ldb, matchDim = -1, otherDim = -1; ++ int i, j, l, lda, ldb, ldc, matchDim = -1, otherDim = -1; + int typenum; + int dimensions[MAX_DIMS], nd; + static const float oneF[2] = {1.0, 0.0}; +@@ -248,33 +248,34 @@ + /* Matrix matrix multiplication -- Level 3 BLAS */ + lda = (ap1->dimensions[1] > 1 ? ap1->dimensions[1] : 1); + ldb = (ap2->dimensions[1] > 1 ? ap2->dimensions[1] : 1); ++ ldc = (ret->dimensions[1] > 1 ? ret->dimensions[1] : 1); + if (typenum == PyArray_DOUBLE) { + cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, + ap1->dimensions[0], ap2->dimensions[1], ap2->dimensions[0], + 1.0, (double *)ap1->data, lda, + (double *)ap2->data, ldb, +- 0.0, (double *)ret->data, ldb); ++ 0.0, (double *)ret->data, ldc); + } + else if (typenum == PyArray_FLOAT) { + cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, + ap1->dimensions[0], ap2->dimensions[1], ap2->dimensions[0], + 1.0, (float *)ap1->data, lda, + (float *)ap2->data, ldb, +- 0.0, (float *)ret->data, ldb); ++ 0.0, (float *)ret->data, ldc); + } + else if (typenum == PyArray_CDOUBLE) { + cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, + ap1->dimensions[0], ap2->dimensions[1], ap2->dimensions[0], + oneD, (double *)ap1->data, lda, + (double *)ap2->data, ldb, +- zeroD, (double *)ret->data, ldb); ++ zeroD, (double *)ret->data, ldc); + } + else if (typenum == PyArray_CFLOAT) { + cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, + ap1->dimensions[0], ap2->dimensions[1], ap2->dimensions[0], + oneF, (float *)ap1->data, lda, + (float *)ap2->data, ldb, +- zeroF, (float *)ret->data, ldb); ++ zeroF, (float *)ret->data, ldc); + } + } + else { +@@ -334,7 +335,7 @@ + static PyObject *dotblas_innerproduct(PyObject *dummy, PyObject *args) { + PyObject *op1, *op2; + PyArrayObject *ap1, *ap2, *ret; +- int i, j, l, lda, ldb; ++ int i, j, l, lda, ldb, ldc; + int typenum; + int dimensions[MAX_DIMS], nd; + static const float oneF[2] = {1.0, 0.0}; +@@ -525,33 +526,34 @@ + /* Matrix matrix multiplication -- Level 3 BLAS */ + lda = (ap1->dimensions[1] > 1 ? ap1->dimensions[1] : 1); + ldb = (ap2->dimensions[1] > 1 ? ap2->dimensions[1] : 1); ++ ldc = (ret->dimensions[1] > 1 ? ret->dimensions[1] : 1); + if (typenum == PyArray_DOUBLE) { + cblas_dgemm(CblasRowMajor, CblasNoTrans, CblasTrans, + ap1->dimensions[0], ap2->dimensions[0], ap1->dimensions[1], + 1.0, (double *)ap1->data, lda, + (double *)ap2->data, ldb, +- 0.0, (double *)ret->data, ldb); ++ 0.0, (double *)ret->data, ldc); + } + else if (typenum == PyArray_FLOAT) { + cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasTrans, + ap1->dimensions[0], ap2->dimensions[0], ap1->dimensions[1], + 1.0, (float *)ap1->data, lda, + (float *)ap2->data, ldb, +- 0.0, (float *)ret->data, ldb); ++ 0.0, (float *)ret->data, ldc); + } + else if (typenum == PyArray_CDOUBLE) { + cblas_zgemm(CblasRowMajor, CblasNoTrans, CblasTrans, + ap1->dimensions[0], ap2->dimensions[0], ap1->dimensions[1], + oneD, (double *)ap1->data, lda, + (double *)ap2->data, ldb, +- zeroD, (double *)ret->data, ldb); ++ zeroD, (double *)ret->data, ldc); + } + else if (typenum == PyArray_CFLOAT) { + cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasTrans, + ap1->dimensions[0], ap2->dimensions[0], ap1->dimensions[1], + oneF, (float *)ap1->data, lda, + (float *)ap2->data, ldb, +- zeroF, (float *)ret->data, ldb); ++ zeroF, (float *)ret->data, ldc); + } + } + else { +@@ -703,7 +705,7 @@ + /* Add some symbolic constants to the module */ + d = PyModule_GetDict(m); + +- s = PyString_FromString("$Id: numeric-24.2-dotblas.patch,v 1.1 2007/09/01 22:24:30 bicatali Exp $"); ++ s = PyString_FromString("$Id: numeric-24.2-dotblas.patch,v 1.1 2007/09/01 22:24:30 bicatali Exp $"); + PyDict_SetItemString(d, "__version__", s); + Py_DECREF(s); + diff --git a/dev-python/numeric/files/numeric-24.2-lapack.patch b/dev-python/numeric/files/numeric-24.2-lapack.patch index 926deb6d9a3a..2ad651fa6104 100644 --- a/dev-python/numeric/files/numeric-24.2-lapack.patch +++ b/dev-python/numeric/files/numeric-24.2-lapack.patch @@ -1,5 +1,6 @@ ---- customize.py.orig 2007-02-13 22:56:17.000000000 +0000 -+++ customize.py 2007-02-13 22:59:20.000000000 +0000 +diff -Nur Numeric-24.2.orig/customize.py Numeric-24.2/customize.py +--- Numeric-24.2.orig/customize.py 2005-11-13 02:40:14.000000000 +0000 ++++ Numeric-24.2/customize.py 2007-09-01 22:11:50.123312885 +0100 @@ -13,9 +13,9 @@ # will be used, except on Mac OS X, where the vecLib framework will be used # if found. diff --git a/dev-python/numeric/files/numeric-24.2-python25.patch b/dev-python/numeric/files/numeric-24.2-python25.patch index 8f29e60fe709..6a44612024fa 100644 --- a/dev-python/numeric/files/numeric-24.2-python25.patch +++ b/dev-python/numeric/files/numeric-24.2-python25.patch @@ -1,10 +1,219 @@ ---- Numeric-24.2/Packages/RNG/Src/RNGmodule.c 2005-04-22 11:54:38.000000000 +0100 -+++ Numeric-24.2.new/Packages/RNG/Src/RNGmodule.c 2007-02-13 20:06:07.000000000 +0000 -@@ -93,6 +93,7 @@ - { - Py_XDECREF(self->parameters); - PyMem_DEL(self); -+ PyObject_FREE(self); +diff -Nur Numeric-24.2/Src/arrayobject.c Numeric-24.2.new/Src/arrayobject.c +--- Numeric-24.2/Src/arrayobject.c 2007-05-25 18:34:55.000000000 +0100 ++++ Numeric-24.2.new/Src/arrayobject.c 2007-05-25 18:34:04.000000000 +0100 +@@ -12,7 +12,7 @@ + performance for heterogeneity. + */ + +-/* $Id: numeric-24.2-python25.patch,v 1.2 2007/09/01 22:24:30 bicatali Exp $ */ ++/* $Id: numeric-24.2-python25.patch,v 1.2 2007/09/01 22:24:30 bicatali Exp $ */ + + #include "Python.h" + #include <stddef.h> +@@ -491,7 +491,8 @@ + + static PyObject * PyArray_Resize(PyArrayObject *self, PyObject *shape) { + size_t oldsize, newsize; +- int new_nd, k, sd, n, elsize; ++ int sd, n, elsize; ++ Py_ssize_t new_nd, k; + int refcnt; + int new_dimensions[MAX_DIMS]; + int new_strides[MAX_DIMS]; +@@ -776,7 +777,7 @@ + + if ((item = index2ptr(self, i)) == NULL) return -1; + +- if(self->descr->type_num != PyArray_OBJECT && PyString_Check(v) && PyObject_Length(v) == 1) { ++ if(self->descr->type_num != PyArray_OBJECT && PyString_Check(v) && PyObject_Length(v) == (Py_ssize_t)1) { + char *s; + if ((s=PyString_AsString(v)) == NULL) return -1; + if(self->descr->type == 'c') { +@@ -823,7 +824,7 @@ + + /* This is basically PySlice_GetIndicesEx, but with our coercion + * of indices to integers (plus, that function is new in Python 2.3) */ +-static int ++static Py_ssize_t + slice_GetIndices(PySliceObject *r, int length, + int *start, int *stop, int *step, + int *slicelength) +@@ -925,8 +926,8 @@ + + static int parse_index(PyArrayObject *self, PyObject *op, + int *dimensions, int *strides, int *offset_ptr) { +- int i, j, n; +- int nd_old, nd_new, start, offset, n_add, n_pseudo; ++ Py_ssize_t i, n, j, n_add, n_pseudo; ++ int nd_old, nd_new, start, offset; + int step_size, n_steps; + PyObject *op1=NULL; + int is_slice; +@@ -1098,7 +1099,7 @@ + } + + static PyMappingMethods array_as_mapping = { +- (inquiry)array_length, /*mp_length*/ ++ (lenfunc)array_length, /*mp_length*/ + (binaryfunc)array_subscript_nice, /*mp_subscript*/ + (objobjargproc)array_ass_sub, /*mp_ass_subscript*/ + }; +@@ -1183,10 +1184,10 @@ } + static PyBufferProcs array_as_buffer = { +- (getreadbufferproc)array_getreadbuf, /*bf_getreadbuffer*/ +- (getwritebufferproc)array_getwritebuf, /*bf_getwritebuffer*/ +- (getsegcountproc)array_getsegcount, /*bf_getsegcount*/ +- (getcharbufferproc)array_getcharbuf, /*bf_getcharbuffer*/ ++ (readbufferproc)array_getreadbuf, /*bf_getreadbuffer*/ ++ (writebufferproc)array_getwritebuf, /*bf_getwritebuffer*/ ++ (segcountproc)array_getsegcount, /*bf_getsegcount*/ ++ (charbufferproc)array_getcharbuf, /*bf_getcharbuffer*/ + }; + /* End methods added by Scott N. Gunyan for buffer extension */ + +@@ -1595,7 +1596,7 @@ + (unaryfunc)array_negative, + (unaryfunc)PyArray_Copy, /*nb_pos*/ + (unaryfunc)array_absolute, /*(unaryfunc)array_abs,*/ +- (inquiry)array_nonzero, /*nb_nonzero*/ ++ (lenfunc)array_nonzero, /*nb_nonzero*/ + (unaryfunc)array_invert, /*nb_invert*/ + (binaryfunc)array_left_shift, /*nb_lshift*/ + (binaryfunc)array_right_shift, /*nb_rshift*/ +@@ -1634,13 +1635,13 @@ + }; + + static PySequenceMethods array_as_sequence = { +- (inquiry)array_length, /*sq_length*/ ++ (lenfunc)array_length, /*sq_length*/ + (binaryfunc)NULL, /*nb_add, concat is numeric add*/ +- (intargfunc)NULL, /*nb_multiply, repeat is numeric multiply*/ +- (intargfunc)array_item_nice, /*sq_item*/ +- (intintargfunc)array_slice, /*sq_slice*/ +- (intobjargproc)array_ass_item, /*sq_ass_item*/ +- (intintobjargproc)array_ass_slice, /*sq_ass_slice*/ ++ (ssizeargfunc)NULL, /*nb_multiply, repeat is numeric multiply*/ ++ (ssizeargfunc)array_item_nice, /*sq_item*/ ++ (ssizessizeargfunc)array_slice, /*sq_slice*/ ++ (ssizeobjargproc)array_ass_item, /*sq_ass_item*/ ++ (ssizessizeobjargproc)array_ass_slice, /*sq_ass_slice*/ + }; + + /* -------------------------------------------------------------- */ +@@ -2426,7 +2427,7 @@ + + #if PY_VERSION_HEX >= 0x02010000 + (traverseproc)0L, +- (inquiry)0L, ++ (lenfunc)0L, + (richcmpfunc)array_richcompare, /*tp_richcompfunc*/ + offsetof(PyArrayObject, weakreflist), /*tp_weaklistoffset */ + #endif +@@ -2463,7 +2464,8 @@ + static int discover_dimensions(PyObject *s, int nd, int *d, int check_it) { + PyObject *e; +- int r, n, i, n_lower; ++ int r, n_lower; ++ Py_ssize_t i, n; + + n=PyObject_Length(s); + *d = n; +@@ -2501,7 +2503,7 @@ + static int + array_objecttype(PyObject *op, int minimum_type, int savespaceflag, int max) + { +- int l; ++ Py_ssize_t l; + PyObject *ip; + int result; + PyArray_Descr* descr; +@@ -2593,7 +2595,9 @@ + + static int Assign_Array(PyArrayObject *self, PyObject *v) { + PyObject *e; +- int l, r; ++ int r; ++ Py_ssize_t l; ++ + + if (!PySequence_Check(v)) { + PyErr_SetString(PyExc_ValueError,"assignment from non-sequence"); +diff -Nur Numeric-24.2/Src/multiarraymodule.c Numeric-24.2.new/Src/multiarraymodule.c +--- Numeric-24.2/Src/multiarraymodule.c 2005-08-16 06:20:25.000000000 +0100 ++++ Numeric-24.2.new/Src/multiarraymodule.c 2007-05-25 18:28:35.000000000 +0100 +@@ -36,7 +36,8 @@ + extern PyObject *PyArray_Concatenate(PyObject *op) { + PyArrayObject *ret, **mps; + PyObject *otmp; +- int i, n, type_num, tmp, nd=0, new_dim; ++ int type_num, tmp, nd=0, new_dim; ++ Py_ssize_t i, n; + char *data; + + n = PySequence_Length(op); +@@ -284,7 +285,8 @@ + + + extern PyObject *PyArray_Choose(PyObject *ip, PyObject *op) { +- int i, n, *sizes, m, offset, elsize, type_num; ++ int *sizes, elsize, type_num; ++ Py_ssize_t i, n, m, offset; + char *ret_data; + PyArrayObject **mps, *ap, *ret; + PyObject *otmp; +@@ -1139,7 +1141,8 @@ + static char *kwlist[] = {"shape", "typecode", "savespace", NULL}; + PyObject *op; + PyArray_Descr *descr; +- int i, nd, n, dims[MAX_DIMS]; ++ int dims[MAX_DIMS]; ++ Py_ssize_t i, nd, n; + int sd; + char *data; + +@@ -1217,7 +1220,8 @@ + PyArrayObject *ret; + char type_char='l'; + char *type = &type_char, *dptr; +- int i, nd, n, dimensions[MAX_DIMS]; ++ int dimensions[MAX_DIMS]; ++ Py_ssize_t i, nd, n; + int savespace=0; + static char all_zero[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + static char *kwlist[] = {"shape", "typecode", "savespace", NULL}; +diff -Nur Numeric-24.2/Src/ufuncobject.c Numeric-24.2.new/Src/ufuncobject.c +--- Numeric-24.2/Src/ufuncobject.c 2005-08-16 06:20:25.000000000 +0100 ++++ Numeric-24.2.new/Src/ufuncobject.c 2007-05-25 18:28:35.000000000 +0100 +@@ -272,7 +272,7 @@ + + int setup_matrices(PyUFuncObject *self, PyObject *args, PyUFuncGenericFunction *function, void **data, + PyArrayObject **mps, char *arg_types) { +- int nargs, i; ++ Py_ssize_t nargs, i; + + nargs = PyTuple_Size(args); + if ((nargs != self->nin) && (nargs != self->nin+self->nout)) { + +From: Daniel Drake <d.drake@mmm.com> + +Fix list slicing on python 2.5 + +Numeric.arange(0,10) was working fine but Numeric.arange(0,10)[:] was +returning nonsense. Using the correct data type fixes the problem. + +Index: Numeric-24.2/Src/arrayobject.c +=================================================================== +--- Numeric-24.2.orig/Src/arrayobject.c ++++ Numeric-24.2/Src/arrayobject.c +@@ -708,7 +708,7 @@ extern PyObject *PyArray_Return(PyArrayO + } + + static PyObject * +-array_slice(PyArrayObject *self, int ilow, int ihigh) ++array_slice(PyArrayObject *self, Py_ssize_t ilow, Py_ssize_t ihigh) + { + PyArrayObject *r; + int l; diff --git a/dev-python/numeric/numeric-24.2-r3.ebuild b/dev-python/numeric/numeric-24.2-r5.ebuild index f81371bfadef..878b5eef85e3 100644 --- a/dev-python/numeric/numeric-24.2-r3.ebuild +++ b/dev-python/numeric/numeric-24.2-r5.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/numeric/numeric-24.2-r3.ebuild,v 1.1 2007/02/23 23:43:05 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numeric/numeric-24.2-r5.ebuild,v 1.1 2007/09/01 22:24:30 bicatali Exp $ NEED_PYTHON=2.3 @@ -15,7 +15,7 @@ SRC_URI="mirror://sourceforge/numpy/${MY_P}.tar.gz LICENSE="as-is" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +KEYWORDS="~arm ~mips ~s390" IUSE="doc" S=${WORKDIR}/${MY_P} @@ -23,8 +23,6 @@ S=${WORKDIR}/${MY_P} src_unpack() { unpack ${A} - use doc && cp "${DISTDIR}"/numpy.pdf ${S}/ - # fix list problem epatch "${FILESDIR}"/${P}-arrayobject.patch # fix skips of acosh, asinh @@ -33,8 +31,11 @@ src_unpack() { epatch "${FILESDIR}"/${P}-eigen.patch # fix a bug in the test epatch "${FILESDIR}"/${P}-test.patch - # fix for python-2.5 - epatch "${FILESDIR}"/${P}-python25.patch + # fix only for python-2.5 + distutils_python_version + [[ "${PYVER}" == 2.5 ]] && epatch "${FILESDIR}"/${P}-python25.patch + # fix for dotblas from uncommited cvs + epatch "${FILESDIR}"/${P}-dotblas.patch } src_test() { @@ -45,7 +46,6 @@ src_test() { src_install() { distutils_src_install - distutils_python_version # install various README from packages newdoc Packages/MA/README README.MA @@ -54,7 +54,7 @@ src_install() { # install tutorial and docs if use doc; then insinto /usr/share/doc/${PF} - doins -r Test Demo/NumTut || die - newins "${S}"/numpy.pdf numeric.pdf || die + doins -r Test Demo/NumTut || die "install tutorial failed" + newins "${DISTDIR}"/numpy.pdf numeric.pdf || die "install doc failed" fi } diff --git a/dev-python/numeric/numeric-24.2-r4.ebuild b/dev-python/numeric/numeric-24.2-r6.ebuild index 85f7bff2191c..ff39bf97f7a1 100644 --- a/dev-python/numeric/numeric-24.2-r4.ebuild +++ b/dev-python/numeric/numeric-24.2-r6.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/numeric/numeric-24.2-r4.ebuild,v 1.3 2007/05/25 11:08:56 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numeric/numeric-24.2-r6.ebuild,v 1.1 2007/09/01 22:24:30 bicatali Exp $ NEED_PYTHON=2.3 @@ -13,24 +13,24 @@ HOMEPAGE="http://numeric.scipy.org/" SRC_URI="mirror://sourceforge/numpy/${MY_P}.tar.gz doc? ( http://numpy.scipy.org/numpy.pdf )" -# numeric does not work yet with other cblas implementations -# than cblas-reference or blas-atlas (work in progress) +# numeric needs cblas (virtual/cblas work in progress) +# and lapack. needs fortran to get the proper fortran to C library. RDEPEND="lapack? ( || ( >=sci-libs/blas-atlas-3.7.11-r1 - >=sci-libs/cblas-reference-20030223-r3 ) - virtual/lapack )" + >=sci-libs/cblas-reference-20030223-r3 ) + virtual/lapack )" DEPEND="${RDEPEND} lapack? ( app-admin/eselect-cblas )" LICENSE="as-is" SLOT="0" -KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" IUSE="doc lapack" S=${WORKDIR}/${MY_P} pkg_setup() { if use lapack; then - FORTRAN="gfortran g77" + FORTRAN="gfortran g77 ifc" fortran_pkg_setup for d in $(eselect cblas show); do mycblas=${d}; done if [[ -z "${mycblas/reference/}" ]] && [[ -z "${mycblas/atlas/}" ]]; then @@ -43,12 +43,7 @@ pkg_setup() { } src_unpack() { - if use lapack; then - fortran_src_unpack - else - unpack ${A} - fi - use doc && cp "${DISTDIR}"/numpy.pdf ${S}/ + unpack ${A} # fix list problem epatch "${FILESDIR}"/${P}-arrayobject.patch @@ -58,28 +53,32 @@ src_unpack() { epatch "${FILESDIR}"/${P}-eigen.patch # fix a bug in the test epatch "${FILESDIR}"/${P}-test.patch - # fix for python-2.5 - epatch "${FILESDIR}"/${P}-python25.patch + # fix only for python-2.5 + distutils_python_version + [[ "${PYVER}" == 2.5 ]] && epatch "${FILESDIR}"/${P}-python25.patch + # fix for dotblas from uncommited cvs + epatch "${FILESDIR}"/${P}-dotblas.patch # adapt lapack support if use lapack; then epatch "${FILESDIR}"/${P}-lapack.patch + local flib= if [[ "${FORTRANC}" == gfortran ]]; then - sed -i -e 's:g2c:gfortran:g' customize.py + flib=gfortran + elif [[ "${FORTRANC}" == if* ]]; then + flib=imf fi - [[ "${mycblas}" == reference ]] && \ + if [[ "${mycblas}" == reference ]]; then sed -i \ - -e "s:'atlas',::g" \ - -e "s:include/atlas:include/cblas:g" \ - customize.py + -e "s:g2c:${flib}:g" \ + -e "s:'atlas',::g" \ + -e "s:include/atlas:include/cblas:g" \ + "${S}"/customize.py \ + || die "sed for lapack failed" + fi fi } -#src_compile() { -# use lapack && unset LDFLAGS -# distutils_src_compile -#} - src_test() { cd build/lib* PYTHONPATH=. "${python}" "${S}"/Test/test.py \ @@ -88,7 +87,6 @@ src_test() { src_install() { distutils_src_install - distutils_python_version # install various README from packages newdoc Packages/MA/README README.MA @@ -104,7 +102,7 @@ src_install() { # install tutorial and docs if use doc; then insinto /usr/share/doc/${PF} - doins -r Test Demo/NumTut || die - newins "${S}"/numpy.pdf numeric.pdf || die + doins -r Test Demo/NumTut || die "install tutorial failed" + newins "${DISTDIR}"/numpy.pdf numeric.pdf || die "install doc failed" fi } |