summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2012-06-28 21:16:40 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2012-06-28 21:16:40 +0000
commit6c113ce260b69f630a03ad7d8bc1f66b9153c60f (patch)
treebf80306a2dfdd95ed46aac75990366fd61bc1c97 /dev-python
parentSet minimum version for xjavac to build with jdk7, remove vulnarable. (diff)
downloadgentoo-2-6c113ce260b69f630a03ad7d8bc1f66b9153c60f.tar.gz
gentoo-2-6c113ce260b69f630a03ad7d8bc1f66b9153c60f.tar.bz2
gentoo-2-6c113ce260b69f630a03ad7d8bc1f66b9153c60f.zip
Cleaned up a bit the pkg-config mangling for blas/lapack. Hack to strip -lm because it would not link with system blas/lapack on prefix
(Portage version: 2.2.01.20430-prefix/cvs/Linux x86_64)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/numpy/ChangeLog6
-rw-r--r--dev-python/numpy/numpy-1.6.2.ebuild38
2 files changed, 30 insertions, 14 deletions
diff --git a/dev-python/numpy/ChangeLog b/dev-python/numpy/ChangeLog
index 7dca8a68b6cd..3026864ec043 100644
--- a/dev-python/numpy/ChangeLog
+++ b/dev-python/numpy/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/numpy
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.165 2012/06/28 15:48:33 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.166 2012/06/28 21:16:40 bicatali Exp $
+
+ 28 Jun 2012; Sebastien Fabbro <fabbros@gentoo.org> numpy-1.6.2.ebuild:
+ Cleaned up a bit the pkg-config mangling for blas/lapack. Hack to strip -lm
+ because it would not link with system blas/lapack on prefix
28 Jun 2012; Jeroen Roovers <jer@gentoo.org> numpy-1.6.1-r1.ebuild:
Stable for HPPA (bug #418419).
diff --git a/dev-python/numpy/numpy-1.6.2.ebuild b/dev-python/numpy/numpy-1.6.2.ebuild
index aacd7ffe97aa..f2b0c586f604 100644
--- a/dev-python/numpy/numpy-1.6.2.ebuild
+++ b/dev-python/numpy/numpy-1.6.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.6.2.ebuild,v 1.1 2012/05/22 16:34:49 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.6.2.ebuild,v 1.2 2012/06/28 21:16:40 bicatali Exp $
EAPI=4
@@ -59,7 +59,7 @@ pkg_setup() {
append-fflags -fPIC
NUMPY_FCONFIG="config_fc --noopt --noarch"
# workaround bug 335908
- [[ ${FC} == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
+ [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
fi
}
@@ -70,26 +70,38 @@ src_unpack() {
fi
}
+pc_incdir() {
+ pkg-config --cflags-only-I $@ | \
+ sed -e 's/^-I//' -e 's/[ ]*-I/:/g'
+}
+
+pc_libdir() {
+ pkg-config --libs-only-L $@ | \
+ sed -e 's/^-L//' -e 's/[ ]*-L/:/g'
+}
+
+pc_libs() {
+ pkg-config --libs-only-l $@ | \
+ sed -e 's/[ ]-l*\(pthread\|m\)[ ]*//g' \
+ -e 's/^-l//' -e 's/[ ]*-l/,/g'
+}
+
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.6.1-atlas.patch
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)
+ # make sure _dotblas.so gets built
+ sed -i -e '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py || die
cat >> site.cfg <<-EOF
[blas]
- 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'):${libdir}
- blas_libs = $(pkg-config --libs-only-l \
- cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
+ include_dirs = $(pc_incdir cblas)
+ library_dirs = $(pc_libdir cblas blas):${libdir}
+ blas_libs = $(pc_libs cblas blas)
[lapack]
- library_dirs = $(pkg-config --libs-only-L \
- lapack | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir}
- lapack_libs = $(pkg-config --libs-only-l \
- lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
+ library_dirs = $(pc_libdir lapack):${libdir}
+ lapack_libs = $(pc_libs lapack)
EOF
else
export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None