diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2008-12-05 11:38:02 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2008-12-05 11:38:02 +0000 |
commit | 22c434c5aff8f3f221c971cb5b043b917a0a5d1d (patch) | |
tree | c0500070d136cfbbf7d979294d059e843092ddf2 /sci-libs/scipy | |
parent | Masked sci-libs/scipy-0.7.0_beta1 (diff) | |
download | gentoo-2-22c434c5aff8f3f221c971cb5b043b917a0a5d1d.tar.gz gentoo-2-22c434c5aff8f3f221c971cb5b043b917a0a5d1d.tar.bz2 gentoo-2-22c434c5aff8f3f221c971cb5b043b917a0a5d1d.zip |
Fixed for python-2.6 (bug #245100, thanks Christian Becke for his patch), now installs stsci packages, and beta version bump, still masked for testing only
(Portage version: 2.2_rc16/cvs/Linux 2.6.25-gentoo-r7 x86_64)
Diffstat (limited to 'sci-libs/scipy')
-rw-r--r-- | sci-libs/scipy/ChangeLog | 14 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.6.0-implicit.patch | 15 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.6.0-python-2.6-c_abs.patch | 309 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.6.0-stsci.patch | 55 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.7.0_beta1-implicit.patch | 28 | ||||
-rw-r--r-- | sci-libs/scipy/scipy-0.6.0-r5.ebuild | 156 | ||||
-rw-r--r-- | sci-libs/scipy/scipy-0.7.0_beta1.ebuild | 137 |
7 files changed, 704 insertions, 10 deletions
diff --git a/sci-libs/scipy/ChangeLog b/sci-libs/scipy/ChangeLog index f0aea94762f1..65aa0eee52d7 100644 --- a/sci-libs/scipy/ChangeLog +++ b/sci-libs/scipy/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for sci-libs/scipy # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.35 2008/10/28 12:51:14 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.36 2008/12/05 11:38:02 bicatali Exp $ + +*scipy-0.7.0_beta1 (05 Dec 2008) +*scipy-0.6.0-r5 (05 Dec 2008) + + 05 Dec 2008; Sébastien Fabbro <bicatali@gentoo.org> + files/scipy-0.6.0-implicit.patch, + +files/scipy-0.6.0-python-2.6-c_abs.patch, +files/scipy-0.6.0-stsci.patch, + +files/scipy-0.7.0_beta1-implicit.patch, +scipy-0.6.0-r5.ebuild, + +scipy-0.7.0_beta1.ebuild: + Fixed for python-2.6 (bug #245100, thanks Christian Becke for his patch), + now installs stsci packages, and beta version bump, still masked for + testing only 28 Oct 2008; Sébastien Fabbro <bicatali@gentoo.org> scipy-0.6.0-r4.ebuild: diff --git a/sci-libs/scipy/files/scipy-0.6.0-implicit.patch b/sci-libs/scipy/files/scipy-0.6.0-implicit.patch index 2c7614080c11..8c1181342505 100644 --- a/sci-libs/scipy/files/scipy-0.6.0-implicit.patch +++ b/sci-libs/scipy/files/scipy-0.6.0-implicit.patch @@ -1,6 +1,5 @@ -diff -aur scipy-0.6.0-orig/scipy/linsolve/SuperLU/SRC/dcomplex.c scipy-0.6.0/scipy/linsolve/SuperLU/SRC/dcomplex.c ---- scipy-0.6.0-orig/scipy/linsolve/SuperLU/SRC/dcomplex.c 2007-09-22 03:55:18.000000000 -0400 -+++ scipy-0.6.0/scipy/linsolve/SuperLU/SRC/dcomplex.c 2008-07-03 08:04:15.000000000 -0400 +--- scipy/linsolve/SuperLU/SRC/dcomplex.c 2007-09-22 03:55:18.000000000 -0400 ++++ scipy/linsolve/SuperLU/SRC/dcomplex.c 2008-07-03 08:04:15.000000000 -0400 @@ -11,6 +11,7 @@ */ #include <math.h> @@ -9,9 +8,8 @@ diff -aur scipy-0.6.0-orig/scipy/linsolve/SuperLU/SRC/dcomplex.c scipy-0.6.0/sci #include "dcomplex.h" -diff -aur scipy-0.6.0-orig/scipy/linsolve/SuperLU/SRC/scomplex.c scipy-0.6.0/scipy/linsolve/SuperLU/SRC/scomplex.c ---- scipy-0.6.0-orig/scipy/linsolve/SuperLU/SRC/scomplex.c 2007-09-22 03:55:18.000000000 -0400 -+++ scipy-0.6.0/scipy/linsolve/SuperLU/SRC/scomplex.c 2008-07-03 08:04:34.000000000 -0400 +--- scipy/linsolve/SuperLU/SRC/scomplex.c 2007-09-22 03:55:18.000000000 -0400 ++++ scipy/linsolve/SuperLU/SRC/scomplex.c 2008-07-03 08:04:34.000000000 -0400 @@ -11,6 +11,7 @@ */ #include <math.h> @@ -20,9 +18,8 @@ diff -aur scipy-0.6.0-orig/scipy/linsolve/SuperLU/SRC/scomplex.c scipy-0.6.0/sci #include "scomplex.h" -diff -aur scipy-0.6.0-orig/scipy/linsolve/SuperLU/SRC/xerbla.c scipy-0.6.0/scipy/linsolve/SuperLU/SRC/xerbla.c ---- scipy-0.6.0-orig/scipy/linsolve/SuperLU/SRC/xerbla.c 2007-09-22 03:55:18.000000000 -0400 -+++ scipy-0.6.0/scipy/linsolve/SuperLU/SRC/xerbla.c 2008-07-03 08:05:27.000000000 -0400 +--- scipy/linsolve/SuperLU/SRC/xerbla.c 2007-09-22 03:55:18.000000000 -0400 ++++ scipy/linsolve/SuperLU/SRC/xerbla.c 2008-07-03 08:05:27.000000000 -0400 @@ -1,3 +1,5 @@ +#include <stdio.h> + diff --git a/sci-libs/scipy/files/scipy-0.6.0-python-2.6-c_abs.patch b/sci-libs/scipy/files/scipy-0.6.0-python-2.6-c_abs.patch new file mode 100644 index 000000000000..569c108a5128 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.6.0-python-2.6-c_abs.patch @@ -0,0 +1,309 @@ +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cgsequ.c scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cgsequ.c +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cgsequ.c 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cgsequ.c 2008-11-11 17:32:10.000000000 +0100 +@@ -118,7 +118,7 @@ + for (j = 0; j < A->ncol; ++j) + for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) { + irow = Astore->rowind[i]; +- r[irow] = SUPERLU_MAX( r[irow], c_abs1(&Aval[i]) ); ++ r[irow] = SUPERLU_MAX( r[irow], slu_c_abs1(&Aval[i]) ); + } + + /* Find the maximum and minimum scale factors. */ +@@ -153,7 +153,7 @@ + for (j = 0; j < A->ncol; ++j) + for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; ++i) { + irow = Astore->rowind[i]; +- c[j] = SUPERLU_MAX( c[j], c_abs1(&Aval[i]) * r[irow] ); ++ c[j] = SUPERLU_MAX( c[j], slu_c_abs1(&Aval[i]) * r[irow] ); + } + + /* Find the maximum and minimum scale factors. */ +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cgsrfs.c scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cgsrfs.c +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cgsrfs.c 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cgsrfs.c 2008-11-11 17:32:10.000000000 +0100 +@@ -276,21 +276,21 @@ + than SAFE2, then SAFE1 is added to the i-th component of the + numerator and denominator before dividing. */ + +- for (i = 0; i < A->nrow; ++i) rwork[i] = c_abs1( &Bptr[i] ); ++ for (i = 0; i < A->nrow; ++i) rwork[i] = slu_c_abs1( &Bptr[i] ); + + /* Compute abs(op(A))*abs(X) + abs(B). */ + if (notran) { + for (k = 0; k < A->ncol; ++k) { +- xk = c_abs1( &Xptr[k] ); ++ xk = slu_c_abs1( &Xptr[k] ); + for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) +- rwork[Astore->rowind[i]] += c_abs1(&Aval[i]) * xk; ++ rwork[Astore->rowind[i]] += slu_c_abs1(&Aval[i]) * xk; + } + } else { + for (k = 0; k < A->ncol; ++k) { + s = 0.; + for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) { + irow = Astore->rowind[i]; +- s += c_abs1(&Aval[i]) * c_abs1(&Xptr[irow]); ++ s += slu_c_abs1(&Aval[i]) * slu_c_abs1(&Xptr[irow]); + } + rwork[k] += s; + } +@@ -298,9 +298,9 @@ + s = 0.; + for (i = 0; i < A->nrow; ++i) { + if (rwork[i] > safe2) +- s = SUPERLU_MAX( s, c_abs1(&work[i]) / rwork[i] ); ++ s = SUPERLU_MAX( s, slu_c_abs1(&work[i]) / rwork[i] ); + else +- s = SUPERLU_MAX( s, (c_abs1(&work[i]) + safe1) / ++ s = SUPERLU_MAX( s, (slu_c_abs1(&work[i]) + safe1) / + (rwork[i] + safe1) ); + } + berr[j] = s; +@@ -351,22 +351,22 @@ + inv(op(A)) * diag(W), + where W = abs(R) + NZ*EPS*( abs(op(A))*abs(X)+abs(B) ))) */ + +- for (i = 0; i < A->nrow; ++i) rwork[i] = c_abs1( &Bptr[i] ); ++ for (i = 0; i < A->nrow; ++i) rwork[i] = slu_c_abs1( &Bptr[i] ); + + /* Compute abs(op(A))*abs(X) + abs(B). */ + if ( notran ) { + for (k = 0; k < A->ncol; ++k) { +- xk = c_abs1( &Xptr[k] ); ++ xk = slu_c_abs1( &Xptr[k] ); + for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) +- rwork[Astore->rowind[i]] += c_abs1(&Aval[i]) * xk; ++ rwork[Astore->rowind[i]] += slu_c_abs1(&Aval[i]) * xk; + } + } else { + for (k = 0; k < A->ncol; ++k) { + s = 0.; + for (i = Astore->colptr[k]; i < Astore->colptr[k+1]; ++i) { + irow = Astore->rowind[i]; +- xk = c_abs1( &Xptr[irow] ); +- s += c_abs1(&Aval[i]) * xk; ++ xk = slu_c_abs1( &Xptr[irow] ); ++ s += slu_c_abs1(&Aval[i]) * xk; + } + rwork[k] += s; + } +@@ -374,9 +374,9 @@ + + for (i = 0; i < A->nrow; ++i) + if (rwork[i] > safe2) +- rwork[i] = c_abs(&work[i]) + (iwork[i]+1)*eps*rwork[i]; ++ rwork[i] = slu_c_abs(&work[i]) + (iwork[i]+1)*eps*rwork[i]; + else +- rwork[i] = c_abs(&work[i])+(iwork[i]+1)*eps*rwork[i]+safe1; ++ rwork[i] = slu_c_abs(&work[i])+(iwork[i]+1)*eps*rwork[i]+safe1; + kase = 0; + + do { +@@ -424,13 +424,13 @@ + lstres = 0.; + if ( notran && colequ ) { + for (i = 0; i < A->nrow; ++i) +- lstres = SUPERLU_MAX( lstres, C[i] * c_abs1( &Xptr[i]) ); ++ lstres = SUPERLU_MAX( lstres, C[i] * slu_c_abs1( &Xptr[i]) ); + } else if ( !notran && rowequ ) { + for (i = 0; i < A->nrow; ++i) +- lstres = SUPERLU_MAX( lstres, R[i] * c_abs1( &Xptr[i]) ); ++ lstres = SUPERLU_MAX( lstres, R[i] * slu_c_abs1( &Xptr[i]) ); + } else { + for (i = 0; i < A->nrow; ++i) +- lstres = SUPERLU_MAX( lstres, c_abs1( &Xptr[i]) ); ++ lstres = SUPERLU_MAX( lstres, slu_c_abs1( &Xptr[i]) ); + } + if ( lstres != 0. ) + ferr[j] /= lstres; +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/clacon.c scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon.c +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/clacon.c 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/clacon.c 2008-11-11 17:32:10.000000000 +0100 +@@ -106,14 +106,14 @@ + L20: + if (*n == 1) { + v[0] = x[0]; +- *est = c_abs(&v[0]); ++ *est = slu_c_abs(&v[0]); + /* ... QUIT */ + goto L150; + } + *est = scsum1_(n, x, &c__1); + + for (i = 0; i < *n; ++i) { +- d__1 = c_abs(&x[i]); ++ d__1 = slu_c_abs(&x[i]); + if (d__1 > safmin) { + d__1 = 1 / d__1; + x[i].r *= d__1; +@@ -158,7 +158,7 @@ + if (*est <= estold) goto L120; + + for (i = 0; i < *n; ++i) { +- d__1 = c_abs(&x[i]); ++ d__1 = slu_c_abs(&x[i]); + if (d__1 > safmin) { + d__1 = 1 / d__1; + x[i].r *= d__1; +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/clangs.c scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/clangs.c +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/clangs.c 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/clangs.c 2008-11-11 17:32:10.000000000 +0100 +@@ -72,7 +72,7 @@ + value = 0.; + for (j = 0; j < A->ncol; ++j) + for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++) +- value = SUPERLU_MAX( value, c_abs( &Aval[i]) ); ++ value = SUPERLU_MAX( value, slu_c_abs( &Aval[i]) ); + + } else if (lsame_(norm, "O") || *(unsigned char *)norm == '1') { + /* Find norm1(A). */ +@@ -80,7 +80,7 @@ + for (j = 0; j < A->ncol; ++j) { + sum = 0.; + for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++) +- sum += c_abs( &Aval[i] ); ++ sum += slu_c_abs( &Aval[i] ); + value = SUPERLU_MAX(value,sum); + } + +@@ -92,7 +92,7 @@ + for (j = 0; j < A->ncol; ++j) + for (i = Astore->colptr[j]; i < Astore->colptr[j+1]; i++) { + irow = Astore->rowind[i]; +- rwork[irow] += c_abs( &Aval[i] ); ++ rwork[irow] += slu_c_abs( &Aval[i] ); + } + value = 0.; + for (i = 0; i < A->nrow; ++i) +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cpivotgrowth.c scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cpivotgrowth.c +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cpivotgrowth.c 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cpivotgrowth.c 2008-11-11 17:32:10.000000000 +0100 +@@ -83,15 +83,15 @@ + maxaj = 0.; + oldcol = inv_perm_c[j]; + for (i = Astore->colptr[oldcol]; i < Astore->colptr[oldcol+1]; ++i) +- maxaj = SUPERLU_MAX( maxaj, c_abs1( &Aval[i]) ); ++ maxaj = SUPERLU_MAX( maxaj, slu_c_abs1( &Aval[i]) ); + + maxuj = 0.; + for (i = Ustore->colptr[j]; i < Ustore->colptr[j+1]; i++) +- maxuj = SUPERLU_MAX( maxuj, c_abs1( &Uval[i]) ); ++ maxuj = SUPERLU_MAX( maxuj, slu_c_abs1( &Uval[i]) ); + + /* Supernode */ + for (i = 0; i < nz_in_U; ++i) +- maxuj = SUPERLU_MAX( maxuj, c_abs1( &luval[i]) ); ++ maxuj = SUPERLU_MAX( maxuj, slu_c_abs1( &luval[i]) ); + + ++nz_in_U; + luval += nsupr; +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cpivotL.c scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cpivotL.c +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cpivotL.c 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cpivotL.c 2008-11-11 17:32:10.000000000 +0100 +@@ -106,7 +106,7 @@ + diag = EMPTY; + old_pivptr = nsupc; + for (isub = nsupc; isub < nsupr; ++isub) { +- rtemp = c_abs1 (&lu_col_ptr[isub]); ++ rtemp = slu_c_abs1 (&lu_col_ptr[isub]); + if ( rtemp > pivmax ) { + pivmax = rtemp; + pivptr = isub; +@@ -127,7 +127,7 @@ + + /* Choose appropriate pivotal element by our policy. */ + if ( *usepr ) { +- rtemp = c_abs1 (&lu_col_ptr[old_pivptr]); ++ rtemp = slu_c_abs1 (&lu_col_ptr[old_pivptr]); + if ( rtemp != 0.0 && rtemp >= thresh ) + pivptr = old_pivptr; + else +@@ -136,7 +136,7 @@ + if ( *usepr == 0 ) { + /* Use diagonal pivot? */ + if ( diag >= 0 ) { /* diagonal exists */ +- rtemp = c_abs1 (&lu_col_ptr[diag]); ++ rtemp = slu_c_abs1 (&lu_col_ptr[diag]); + if ( rtemp != 0.0 && rtemp >= thresh ) pivptr = diag; + } + *pivrow = lsub_ptr[pivptr]; +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cutil.c scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cutil.c +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/cutil.c 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/cutil.c 2008-11-11 17:32:10.000000000 +0100 +@@ -414,8 +414,8 @@ + err = xnorm = 0.0; + for (i = 0; i < X->nrow; i++) { + c_sub(&temp, &soln_work[i], &xtrue[i]); +- err = SUPERLU_MAX(err, c_abs(&temp)); +- xnorm = SUPERLU_MAX(xnorm, c_abs(&soln_work[i])); ++ err = SUPERLU_MAX(err, slu_c_abs(&temp)); ++ xnorm = SUPERLU_MAX(xnorm, slu_c_abs(&soln_work[i])); + } + err = err / xnorm; + printf("||X - Xtrue||/||X|| = %e\n", err); +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/scomplex.c scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/scomplex.c +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/scomplex.c 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/scomplex.c 2008-11-11 17:32:10.000000000 +0100 +@@ -45,7 +45,7 @@ + + + /* Returns sqrt(z.r^2 + z.i^2) */ +-double c_abs(complex *z) ++double slu_c_abs(complex *z) + { + float temp; + float real = z->r; +@@ -68,7 +68,7 @@ + + /* Approximates the abs */ + /* Returns abs(z.r) + abs(z.i) */ +-double c_abs1(complex *z) ++double slu_c_abs1(complex *z) + { + float real = z->r; + float imag = z->i; +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/scomplex.h scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/scomplex.h +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/scomplex.h 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/scomplex.h 2008-11-11 17:32:10.000000000 +0100 +@@ -57,8 +57,8 @@ + + /* Prototypes for functions in scomplex.c */ + void c_div(complex *, complex *, complex *); +-double c_abs(complex *); /* exact */ +-double c_abs1(complex *); /* approximate */ ++double slu_c_abs(complex *); /* exact */ ++double slu_c_abs1(complex *); /* approximate */ + void c_exp(complex *, complex *); + void r_cnjg(complex *, complex *); + double r_imag(complex *); +diff -ur scipy-0.6.0/scipy/linsolve/SuperLU/SRC/scsum1.c scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/scsum1.c +--- scipy-0.6.0/scipy/linsolve/SuperLU/SRC/scsum1.c 2007-09-22 09:55:18.000000000 +0200 ++++ scipy-svn/scipy/sparse/linalg/dsolve/SuperLU/SRC/scsum1.c 2008-11-11 17:32:10.000000000 +0100 +@@ -42,7 +42,7 @@ + int i__1, i__2; + float ret_val; + /* Builtin functions */ +- double c_abs(complex *); ++ double slu_c_abs(complex *); + /* Local variables */ + static int i, nincx; + static float stemp; +@@ -69,7 +69,7 @@ + + /* NEXT LINE MODIFIED. */ + +- stemp += c_abs(&CX(i)); ++ stemp += slu_c_abs(&CX(i)); + /* L10: */ + } + ret_val = stemp; +@@ -83,7 +83,7 @@ + + /* NEXT LINE MODIFIED. */ + +- stemp += c_abs(&CX(i)); ++ stemp += slu_c_abs(&CX(i)); + /* L30: */ + } + ret_val = stemp; diff --git a/sci-libs/scipy/files/scipy-0.6.0-stsci.patch b/sci-libs/scipy/files/scipy-0.6.0-stsci.patch new file mode 100644 index 000000000000..056837b2f9b1 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.6.0-stsci.patch @@ -0,0 +1,55 @@ +--- scipy/stsci/image/setup.py.orig 1970-01-01 01:00:00.000000000 +0100 ++++ scipy/stsci/image/setup.py 2007-02-07 01:20:26.000000000 +0000 +@@ -0,0 +1,22 @@ ++#!/usr/bin/env python ++import numpy ++ ++def configuration(parent_package='',top_path=None): ++ from numpy.distutils.misc_util import Configuration ++ config = Configuration('image',parent_package,top_path, ++ package_path='lib') ++ config.add_extension('_combine', ++ sources=["src/_combinemodule.c"], ++ define_macros = [('NUMPY', '1')], ++ include_dirs = [numpy.get_numarray_include()]) ++ return config ++ ++if __name__ == "__main__": ++ from numpy.distutils.core import setup ++ config = configuration(top_path='').todict() ++ setup(author='Todd Miller', ++ author_email = 'help@stsci.edu', ++ description = 'image array manipulation functions', ++ version = '2.0', ++ **config) ++ +--- scipy/stsci/convolve/setup.py.orig 1970-01-01 01:00:00.000000000 +0100 ++++ scipy/stsci/convolve/setup.py 2007-03-14 16:52:59.000000000 +0000 +@@ -0,0 +1,27 @@ ++#!/usr/bin/env python ++import numpy ++ ++def configuration(parent_package='',top_path=None): ++ from numpy.distutils.misc_util import Configuration ++ config = Configuration('convolve',parent_package,top_path, ++ package_path='lib') ++ ++ config.add_extension('_correlate', ++ sources=["src/_correlatemodule.c"], ++ define_macros = [('NUMPY', '1')], ++ include_dirs = [numpy.get_numarray_include()]) ++ config.add_extension('_lineshape', ++ sources=["src/_lineshapemodule.c"], ++ define_macros = [('NUMPY', '1')], ++ include_dirs = [numpy.get_numarray_include()]) ++ return config ++ ++if __name__ == "__main__": ++ from numpy.distutils.core import setup ++ config = configuration(top_path='').todict() ++ setup(author='Todd Miller', ++ author_email = 'help@stsci.edu', ++ description = 'image array convolution functions', ++ version = '2.0', ++ **config) ++ diff --git a/sci-libs/scipy/files/scipy-0.7.0_beta1-implicit.patch b/sci-libs/scipy/files/scipy-0.7.0_beta1-implicit.patch new file mode 100644 index 000000000000..dee015244db3 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.7.0_beta1-implicit.patch @@ -0,0 +1,28 @@ +--- scipy/sparse/linalg/dsolve/SuperLU/SRC/dcomplex.c 2007-09-22 03:55:18.000000000 -0400 ++++ scipy/sparse/linalg/dsolve/SuperLU/SRC/dcomplex.c 2008-07-03 08:04:15.000000000 -0400 +@@ -11,6 +11,7 @@ + */ + #include <math.h> + #include <stdio.h> ++#include <stdlib.h> + #include "dcomplex.h" + + +--- scipy/sparse/linalg/dsolve/SuperLU/SRC/scomplex.c 2007-09-22 03:55:18.000000000 -0400 ++++ scipy/sparse/linalg/dsolve/SuperLU/SRC/scomplex.c 2008-07-03 08:04:34.000000000 -0400 +@@ -11,6 +11,7 @@ + */ + #include <math.h> + #include <stdio.h> ++#include <stdlib.h> + #include "scomplex.h" + + +--- scipy/sparse/linalg/dsolve/SuperLU/SRC/xerbla.c 2007-09-22 03:55:18.000000000 -0400 ++++ scipy/sparse/linalg/dsolve/SuperLU/SRC/xerbla.c 2008-07-03 08:05:27.000000000 -0400 +@@ -1,3 +1,5 @@ ++#include <stdio.h> ++ + /* Subroutine */ int xerbla_(char *srname, int *info) + { + /* -- LAPACK auxiliary routine (version 2.0) -- diff --git a/sci-libs/scipy/scipy-0.6.0-r5.ebuild b/sci-libs/scipy/scipy-0.6.0-r5.ebuild new file mode 100644 index 000000000000..a765bf24e4b8 --- /dev/null +++ b/sci-libs/scipy/scipy-0.6.0-r5.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.6.0-r5.ebuild,v 1.1 2008/12/05 11:38:02 bicatali Exp $ + +EAPI=1 +NEED_PYTHON=2.3 +inherit eutils distutils fortran flag-o-matic + +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +DESCRIPTION="Scientific algorithms library for Python" +HOMEPAGE="http://www.scipy.org/" +LICENSE="BSD" + +SLOT="0" + +IUSE="fftw umfpack sandbox" + +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +CDEPEND="dev-python/numpy + virtual/cblas + virtual/lapack + fftw? ( sci-libs/fftw:2.1 ) + umfpack? ( sci-libs/umfpack ) + sandbox? ( >=sci-libs/netcdf-3.6 x11-libs/libX11 )" + +DEPEND="${CDEPEND} + dev-util/pkgconfig + umfpack? ( dev-lang/swig )" + +RDEPEND="${CDEPEND} + dev-python/imaging" + +# test still buggy on lapack with 2 failures on check_syevr +# (lapack float). check every version bump. +#RESTRICT="test" + +DOCS="THANKS.txt DEVELOPERS.txt LATEST.txt TOCHANGE.txt FORMAT_GUIDELINES.txt" + +scipy_fortran_setup() { + append-ldflags -shared + FORTRAN="gfortran g77 ifc" + fortran_pkg_setup + local fc= + case ${FORTRANC} in + gfortran) fc=gnu95 ;; + g77) fc=gnu ;; + ifc|ifort) + if use ia64; then + fc=intele + elif use amd64; then + fc=intelem + else + fc=intel + fi + ;; + *) eerror "Unknown fortran compiler: ${FORTRANC}" + die "scipy_fortran_setup failed" ;; + esac + + # when fortran flags are set, pic is removed. + use amd64 && [[ -n ${FFLAGS} ]] && FFLAGS="${FFLAGS} -fPIC" + export SCIPY_FCONFIG="config_fc --fcompiler=${fc} --noopt --noarch" +} + +pkg_setup() { + if use umfpack && ! built_with_use dev-lang/swig python; then + eerror "With umfpack enabled you need" + eerror "dev-lang/swig with python enabled" + einfo "Please re-emerge swig with USE=python" + die "needs swig with python" + fi + # scipy automatically detects libraries by default + export {FFTW,FFTW3,UMFPACK}=None + use fftw && unset FFTW + use umfpack && unset UMFPACK + use sandbox && elog "Warning: using sandbox modules at your own risk!" + scipy_fortran_setup +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-implicit.patch + epatch "${FILESDIR}"/${P}-randomkit.patch + epatch "${FILESDIR}"/${P}-cdf.patch + epatch "${FILESDIR}"/${P}-fftw-fix.patch + epatch "${FILESDIR}"/${P}-ndimage.patch + epatch "${FILESDIR}"/${P}-python-2.6-c_abs.patch + epatch "${FILESDIR}"/${P}-stsci.patch + cat > site.cfg <<-EOF + [DEFAULT] + library_dirs = /usr/$(get_libdir) + include_dirs = /usr/include + [atlas] + include_dirs = $(pkg-config --cflags-only-I \ + cblas lapack | sed -e 's/^-I//' -e 's/ -I/:/g') + library_dirs = $(pkg-config --libs-only-L \ + cblas lapack | sed -e \ + 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):/usr/$(get_libdir) + atlas_libs = $(pkg-config --libs-only-l \ + cblas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g') + lapack_libs = $(pkg-config --libs-only-l \ + lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g') + [blas_opt] + include_dirs = $(pkg-config --cflags-only-I \ + cblas | sed -e 's/^-I//' -e 's/ -I/:/g') + library_dirs = $(pkg-config --libs-only-L \ + cblas | sed -e 's/^-L//' -e 's/ -L/:/g' \ + -e 's/ //g'):/usr/$(get_libdir) + libraries = $(pkg-config --libs-only-l \ + cblas | 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) + libraries = $(pkg-config --libs-only-l \ + lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g') + EOF + if use sandbox; then + cd scipy/sandbox + ls -1 */__init__.py \ + | sed -e 's:/__init__.py::' \ + | grep -v exmplpackage \ + > enabled_packages.txt \ + || die "sandbox listing failed" + fi +} + +src_compile() { + distutils_src_compile ${SCIPY_FCONFIG} +} + +src_test() { + "${python}" setup.py install \ + --home="${S}"/test \ + --no-compile \ + ${SCIPY_FCONFIG} || die "install test failed" + pushd "${S}"/test/lib*/python + PYTHONPATH=. "${python}" -c \ + "import scipy as s;import sys;sys.exit(s.test(10,3))" \ + 2>&1 | tee test.log + grep -q OK test.log || die "test failed" + popd + rm -rf test +} + +src_install() { + distutils_src_install ${SCIPY_FCONFIG} +} + +pkg_postinst() { + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" + elog "to your prefered image viewer if you don't like the default one. Ex:" + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" +} diff --git a/sci-libs/scipy/scipy-0.7.0_beta1.ebuild b/sci-libs/scipy/scipy-0.7.0_beta1.ebuild new file mode 100644 index 000000000000..39a912f7425e --- /dev/null +++ b/sci-libs/scipy/scipy-0.7.0_beta1.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.7.0_beta1.ebuild,v 1.1 2008/12/05 11:38:02 bicatali Exp $ + +EAPI=1 +NEED_PYTHON=2.4 +MYP=${P/_beta/b} +inherit eutils distutils fortran flag-o-matic + +SRC_URI="mirror://sourceforge/${PN}/${MYP}.tar.gz" +DESCRIPTION="Scientific algorithms library for Python" +HOMEPAGE="http://www.scipy.org/" +LICENSE="BSD" + +SLOT="0" + +IUSE="test umfpack" + +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +CDEPEND=">=dev-python/numpy-1.2 + virtual/cblas + virtual/lapack + umfpack? ( sci-libs/umfpack )" + +DEPEND="${CDEPEND} + dev-util/pkgconfig + test? ( dev-python/nose ) + umfpack? ( dev-lang/swig )" + +RDEPEND="${CDEPEND} + dev-python/imaging" + +DOCS="THANKS.txt LATEST.txt TOCHANGE.txt FORMAT_GUIDELINES.txt" + +S="${WORKDIR}/${MYP}" + +scipy_fortran_setup() { + append-ldflags -shared + FORTRAN="gfortran g77 ifc" + fortran_pkg_setup + local fc= + case ${FORTRANC} in + gfortran) fc=gnu95 ;; + g77) fc=gnu ;; + ifc|ifort) + if use ia64; then + fc=intele + elif use amd64; then + fc=intelem + else + fc=intel + fi + ;; + *) eerror "Unknown fortran compiler: ${FORTRANC}" + die "scipy_fortran_setup failed" ;; + esac + + # when fortran flags are set, pic is removed. + use amd64 && [[ -n ${FFLAGS} ]] && FFLAGS="${FFLAGS} -fPIC" + export SCIPY_FCONFIG="config_fc --fcompiler=${fc} --noopt --noarch" +} + +pkg_setup() { + if use umfpack && ! built_with_use dev-lang/swig python; then + eerror "With umfpack enabled you need" + eerror "dev-lang/swig with python enabled" + einfo "Please re-emerge swig with USE=python" + die "needs swig with python" + fi + # scipy automatically detects libraries by default + export {FFTW,FFTW3,UMFPACK}=None + use umfpack && unset UMFPACK + scipy_fortran_setup +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-implicit.patch + epatch "${FILESDIR}"/${PN}-0.6.0-stsci.patch + cat > site.cfg <<-EOF + [DEFAULT] + library_dirs = /usr/$(get_libdir) + include_dirs = /usr/include + [atlas] + include_dirs = $(pkg-config --cflags-only-I \ + cblas lapack | sed -e 's/^-I//' -e 's/ -I/:/g') + library_dirs = $(pkg-config --libs-only-L \ + cblas lapack | sed -e \ + 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):/usr/$(get_libdir) + atlas_libs = $(pkg-config --libs-only-l \ + cblas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g') + lapack_libs = $(pkg-config --libs-only-l \ + lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g') + [blas_opt] + include_dirs = $(pkg-config --cflags-only-I \ + cblas | sed -e 's/^-I//' -e 's/ -I/:/g') + library_dirs = $(pkg-config --libs-only-L \ + cblas | sed -e 's/^-L//' -e 's/ -L/:/g' \ + -e 's/ //g'):/usr/$(get_libdir) + libraries = $(pkg-config --libs-only-l \ + cblas | 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) + libraries = $(pkg-config --libs-only-l \ + lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g') + EOF +} + +src_compile() { + distutils_src_compile ${SCIPY_FCONFIG} +} + +src_test() { + "${python}" setup.py install \ + --home="${S}"/test \ + --no-compile \ + ${SCIPY_FCONFIG} || die "install test failed" + pushd "${S}"/test/lib*/python + PYTHONPATH=. "${python}" -c "import scipy; scipy.test()" 2>&1 | tee test.log + grep -q ^ERROR test.log && die "test failed" + popd + rm -rf test +} + +src_install() { + distutils_src_install ${SCIPY_FCONFIG} +} + +pkg_postinst() { + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" + elog "to your prefered image viewer if you don't like the default one. Ex:" + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" +} |