Gentoo Archives: gentoo-commits

From: "Justin Bronder (jsbronder)" <jsbronder@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/numpy: ChangeLog numpy-1.0.4-r1.ebuild
Date: Fri, 11 Jan 2008 17:06:23
Message-Id: E1JDNKl-0006fm-7a@stork.gentoo.org
1 jsbronder 08/01/11 17:06:19
2
3 Modified: ChangeLog
4 Added: numpy-1.0.4-r1.ebuild
5 Log:
6 Fix cpuinfo to correctly detect nocona-based hardware. Bug 183236.
7 (Portage version: 2.1.3.19)
8
9 Revision Changes Path
10 1.49 dev-python/numpy/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?rev=1.49&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?rev=1.49&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/ChangeLog?r1=1.48&r2=1.49
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v
19 retrieving revision 1.48
20 retrieving revision 1.49
21 diff -u -r1.48 -r1.49
22 --- ChangeLog 4 Jan 2008 14:16:44 -0000 1.48
23 +++ ChangeLog 11 Jan 2008 17:06:18 -0000 1.49
24 @@ -1,6 +1,12 @@
25 # ChangeLog for dev-python/numpy
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.48 2008/01/04 14:16:44 bicatali Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.49 2008/01/11 17:06:18 jsbronder Exp $
29 +
30 +*numpy-1.0.4-r1 (11 Jan 2008)
31 +
32 + 11 Jan 2008; Justin Bronder <jsbronder@g.o>
33 + +files/numpy-1.0.4-nocona-cpuinfo.patch, +numpy-1.0.4-r1.ebuild:
34 + Fix cpuinfo to correctly detect nocona-based hardware. Bug 183236.
35
36 04 Jan 2008; Sébastien Fabbro <bicatali@g.o> -numpy-1.0.3.ebuild,
37 -numpy-1.0.3.1.ebuild:
38
39
40
41 1.1 dev-python/numpy/numpy-1.0.4-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.0.4-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-python/numpy/numpy-1.0.4-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: numpy-1.0.4-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.0.4-r1.ebuild,v 1.1 2008/01/11 17:06:18 jsbronder Exp $
51
52 NEED_PYTHON=2.3
53
54 inherit distutils eutils flag-o-matic
55
56 MY_P=${P/_beta/b}
57 MY_P=${MY_P/_}
58
59 DESCRIPTION="Python array processing for numbers, strings, records, and objects"
60 SRC_URI="mirror://sourceforge/numpy/${MY_P}.tar.gz"
61 HOMEPAGE="http://numeric.scipy.org/"
62
63 RDEPEND="!dev-python/f2py
64 lapack? ( virtual/cblas virtual/lapack )"
65 DEPEND="${RDEPEND}
66 lapack? ( dev-util/pkgconfig )"
67
68 IUSE="lapack"
69 SLOT="0"
70 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
71 LICENSE="BSD"
72
73 S="${WORKDIR}/${MY_P}"
74
75 # whatever LDFLAGS set will break linking
76 # see progress in http://projects.scipy.org/scipy/numpy/ticket/573
77 [ -n "${LDFLAGS}" ] && append-ldflags -shared
78
79 # ex usage: pkgconf_cfg --libs-only-l cblas: ['cblas','atlas']
80 pkgconf_cfg() {
81 local cfg="["
82 for i in $(pkg-config "$1" "$2"); do
83 cfg="${cfg}'${i:2}'"
84 done
85 echo "${cfg//\'\'/','}]"
86 }
87
88 src_unpack() {
89 unpack ${A}
90 cd "${S}"
91
92 # Fix some paths and docs in f2py
93 epatch "${FILESDIR}"/${PN}-1.0.1-f2py.patch
94
95 # Patch to use feclearexcept(3) rather than fpsetsticky(3) on FreeBSD 5.3+
96 epatch "${FILESDIR}"/${P}-freebsd.patch
97
98 # Detect nocona hardware correctly. Bug #183236.
99 epatch "${FILESDIR}"/${PN}-1.0.4-nocona-cpuinfo.patch
100
101 # Gentoo patch for ATLAS library names
102 sed -i \
103 -e "s:'f77blas':'blas':g" \
104 -e "s:'ptblas':'blas':g" \
105 -e "s:'ptcblas':'cblas':g" \
106 -e "s:'lapack_atlas':'lapack':g" \
107 numpy/distutils/system_info.py \
108 || die "sed system_info.py failed"
109
110 export BLAS=None
111 export LAPACK=None
112 export ATLAS=None
113 export PTATLAS=None
114 export MKL=None
115
116 if use lapack; then
117 unset BLAS LAPACK
118 cat > site.cfg <<-EOF
119 [blas]
120 blas_libs = $(pkgconf_cfg --libs-only-l cblas)
121 library_dirs = $(pkgconf_cfg --libs-only-L cblas)
122
123 [lapack]
124 lapack_libs = $(pkgconf_cfg --libs-only-l lapack)
125 library_dirs = $(pkgconf_cfg --libs-only-L lapack)
126 EOF
127 fi
128 }
129
130 src_test() {
131 "${python}" setup.py install \
132 --home="${S}"/test \
133 --no-compile \
134 || die "install test failed"
135
136 pushd "${S}"/test/lib*/python
137 PYTHONPATH=. "${python}" -c "import numpy; numpy.test(10,3)" 2>&1 \
138 | tee test.log
139 grep -q '^OK$' test.log || die "test failed"
140 popd
141
142 rm -rf test
143 }
144
145 src_install() {
146 distutils_src_install
147
148 docinto numpy
149 dodoc numpy/doc/*txt || die "dodoc failed"
150
151 docinto f2py
152 dodoc numpy/f2py/docs/*txt || die "dodoc f2py failed"
153 doman numpy/f2py/f2py.1 || die "doman failed"
154 }
155
156 pkg_postinst() {
157 if ! built_with_use sys-devel/gcc fortran && ! has_version dev-lang/ifc; then
158 ewarn "To use numpy's f2py you need a fortran compiler."
159 ewarn "You can either set USE=fortran flag and re-emerge gcc,"
160 ewarn "or emerge dev-lang/ifc"
161 fi
162 }
163
164
165
166 --
167 gentoo-commits@l.g.o mailing list