summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2007-10-15 14:18:26 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2007-10-15 14:18:26 +0000
commit6451921e1879fc52d48f44aa5d42344c21841113 (patch)
treec91a9887f99945260bd911c4c84b975afef1be71 /dev-python/numpy
parentStable on ppc64 (diff)
downloadgentoo-2-6451921e1879fc52d48f44aa5d42344c21841113.tar.gz
gentoo-2-6451921e1879fc52d48f44aa5d42344c21841113.tar.bz2
gentoo-2-6451921e1879fc52d48f44aa5d42344c21841113.zip
Use the new virtual/cblas.
(Portage version: 2.1.3.12)
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/ChangeLog5
-rw-r--r--dev-python/numpy/numpy-1.0.3.1.ebuild62
2 files changed, 28 insertions, 39 deletions
diff --git a/dev-python/numpy/ChangeLog b/dev-python/numpy/ChangeLog
index d18951c94f79..ac08451babba 100644
--- a/dev-python/numpy/ChangeLog
+++ b/dev-python/numpy/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for dev-python/numpy
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.36 2007/08/26 21:27:50 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.37 2007/10/15 14:18:26 bicatali Exp $
+
+ 15 Oct 2007; Sébastien Fabbro <bicatali@gentoo.org> numpy-1.0.3.1.ebuild:
+ Use the new virtual/cblas.
26 Aug 2007; Sébastien Fabbro <bicatali@gentoo.org> -numpy-0.9.8.ebuild:
Removed old version
diff --git a/dev-python/numpy/numpy-1.0.3.1.ebuild b/dev-python/numpy/numpy-1.0.3.1.ebuild
index 3420b256d866..f93798e2803b 100644
--- a/dev-python/numpy/numpy-1.0.3.1.ebuild
+++ b/dev-python/numpy/numpy-1.0.3.1.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/numpy/numpy-1.0.3.1.ebuild,v 1.2 2007/08/24 19:22:47 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.0.3.1.ebuild,v 1.3 2007/10/15 14:18:26 bicatali Exp $
NEED_PYTHON=2.3
@@ -14,11 +14,9 @@ SRC_URI="mirror://sourceforge/numpy/${MY_P}.tar.gz"
HOMEPAGE="http://numeric.scipy.org/"
RDEPEND="!dev-python/f2py
- lapack? ( || ( >=sci-libs/blas-atlas-3.7.11-r1
- >=sci-libs/cblas-reference-20030223-r3 )
- virtual/lapack )"
+ lapack? ( virtual/cblas virtual/lapack )"
DEPEND="${RDEPEND}
- lapack? ( app-admin/eselect-cblas )"
+ lapack? ( dev-util/pkgconfig )"
IUSE="lapack"
SLOT="0"
@@ -35,37 +33,13 @@ pkg_setup() {
[[ -n "${LDFLAGS_sav}" ]] && einfo "Ignoring LDFLAGS=${LDFLAGS_sav}"
}
-numpy_lapack_setup() {
- local mycblas
- for d in $(eselect cblas show); do mycblas=${d}; done
- if [[ -z "${mycblas/reference/}" ]] && [[ -z "${mycblas/atlas/}" ]]; then
- ewarn "You need to set cblas to atlas or reference. Do:"
- ewarn " eselect cblas set <impl>"
- ewarn "where <impl> is atlas, threaded-atlas or reference"
- die "numpy_lapack_setup failed"
- fi
-
- # Remove default values
- echo "[blas_opt]" > site.cfg
- case "${mycblas}" in
- reference)
- echo "include_dirs = /usr/include/cblas" >> site.cfg
- echo "libraries = blas, cblas" >> site.cfg
- unset BLAS
- ;;
- atlas|threaded-atlas)
- echo "include_dirs = /usr/include/atlas" >> site.cfg
- echo "libraries = blas, cblas, atlas" >> site.cfg
- unset ATLAS
- ;;
- *)
- eerror "Invalid cblas implementation: ${cblas}"
- die "numpy_lapack_setup failed"
- ;;
- esac
- echo "[lapack_opt]" >> site.cfg
- echo "libraries = lapack" >> site.cfg
- unset LAPACK
+# ex usage: pkgconf_cfg --libs-only-l cblas: ['cblas','atlas']
+pkgconf_cfg() {
+ local cfg="["
+ for i in $(pkg-config "$1" "$2"); do
+ cfg="${cfg}'${i:2}'"
+ done
+ echo "${cfg//\'\'/','}]"
}
src_unpack() {
@@ -87,7 +61,19 @@ src_unpack() {
export ATLAS=None
export PTATLAS=None
export MKL=None
- use lapack && numpy_lapack_setup
+
+ if use lapack; then
+ unset BLAS LAPACK
+ cat > setup.cfg << EOF
+[blas_opt]
+libraries = $(pkgconf_cfg --libs-only-l cblas)
+library_dirs = $(pkgconf_cfg --libs-only-L cblas)
+
+[lapack_opt]
+libraries = $(pkgconf_cfg --libs-only-l lapack)
+library_dirs = $(pkgconf_cfg --libs-only-L lapack)
+EOF
+ fi
}
src_test() {
@@ -102,7 +88,7 @@ src_test() {
grep -q '^OK$' test.log || die "test failed"
popd
-_ rm -rf test
+ rm -rf test
}
src_install() {