1 |
Hi, |
2 |
|
3 |
I tried to emerge the numpy ebuild with -lapack usflag, but I had to |
4 |
make a few modifications to the ebuild in order force numpy not to link |
5 |
against lapack-atlas. I also cleaned up the MY_P stuff. (ebuild below) |
6 |
|
7 |
best regards, |
8 |
|
9 |
Toon |
10 |
|
11 |
|
12 |
# Copyright 1999-2006 Gentoo Foundation |
13 |
# Distributed under the terms of the GNU General Public License v2 |
14 |
# $Header: $ |
15 |
|
16 |
|
17 |
inherit distutils |
18 |
|
19 |
DESCRIPTION="Multi-dimensional array object and processing for Python." |
20 |
SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz" |
21 |
HOMEPAGE="http://numeric.scipy.org/" |
22 |
# numpy provides the latest version of dev-python/f2py |
23 |
DEPEND=">=dev-lang/python-2.3 |
24 |
!dev-python/f2py |
25 |
lapack? ( virtual/blas |
26 |
virtual/lapack )" |
27 |
IUSE="lapack" |
28 |
SLOT="0" |
29 |
KEYWORDS="~amd64 ~ppc ~x86" |
30 |
LICENSE="BSD" |
31 |
RESTRICT="test" |
32 |
|
33 |
src_unpack() { |
34 |
unpack ${A} |
35 |
cd "${S}" |
36 |
# sed to patch ATLAS libraries names (gentoo specific) |
37 |
sed -i \ |
38 |
-e "s:f77blas:blas:g" \ |
39 |
-e "s:ptblas:blas:g" \ |
40 |
-e "s:ptcblas:cblas:g" \ |
41 |
-e "s:lapack_atlas:lapack:g" \ |
42 |
numpy/distutils/system_info.py |
43 |
|
44 |
if use lapack; then |
45 |
echo "[atlas]" > site.cfg |
46 |
echo "include_dirs = /usr/include/atlas" >> site.cfg |
47 |
echo "atlas_libs = lapack, blas, cblas, atlas" >> site.cfg |
48 |
echo -n "library_dirs = /usr/$(get_libdir)/lapack:" >> |
49 |
site.cfg |
50 |
if [ -d "/usr/$(get_libdir)/blas/threaded-atlas" ]; then |
51 |
echo "/usr/$(get_libdir)/blas/threaded-atlas" |
52 |
>> site.cfg |
53 |
else |
54 |
echo "/usr/$(get_libdir)/blas/atlas" >> site.cfg |
55 |
fi |
56 |
fi |
57 |
} |
58 |
|
59 |
src_compile() { |
60 |
# http://projects.scipy.org/scipy/numpy/ticket/182 |
61 |
# Can't set LDFLAGS |
62 |
unset LDFLAGS |
63 |
|
64 |
if !(use lapack); then |
65 |
rm -f site.cfg |
66 |
export LAPACK=None |
67 |
export ATLAS=None |
68 |
fi |
69 |
|
70 |
distutils_src_compile |
71 |
} |
72 |
|
73 |
src_install() { |
74 |
distutils_src_install |
75 |
dodoc numpy/doc/* |
76 |
} |
77 |
-- |
78 |
gentoo-science@g.o mailing list |