Gentoo Archives: gentoo-commits

From: "Sebastien Fabbro (bicatali)" <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/scipy: ChangeLog scipy-0.6.0-r5.ebuild scipy-0.7.0_beta1.ebuild
Date: Fri, 05 Dec 2008 11:38:06
Message-Id: E1L8Z0U-0000nY-F3@stork.gentoo.org
1 bicatali 08/12/05 11:38:02
2
3 Modified: ChangeLog
4 Added: scipy-0.6.0-r5.ebuild scipy-0.7.0_beta1.ebuild
5 Log:
6 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
7 (Portage version: 2.2_rc16/cvs/Linux 2.6.25-gentoo-r7 x86_64)
8
9 Revision Changes Path
10 1.36 sci-libs/scipy/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/scipy/ChangeLog?rev=1.36&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/scipy/ChangeLog?rev=1.36&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/scipy/ChangeLog?r1=1.35&r2=1.36
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v
19 retrieving revision 1.35
20 retrieving revision 1.36
21 diff -u -r1.35 -r1.36
22 --- ChangeLog 28 Oct 2008 12:51:14 -0000 1.35
23 +++ ChangeLog 5 Dec 2008 11:38:02 -0000 1.36
24 @@ -1,6 +1,18 @@
25 # ChangeLog for sci-libs/scipy
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.35 2008/10/28 12:51:14 bicatali Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.36 2008/12/05 11:38:02 bicatali Exp $
29 +
30 +*scipy-0.7.0_beta1 (05 Dec 2008)
31 +*scipy-0.6.0-r5 (05 Dec 2008)
32 +
33 + 05 Dec 2008; Sébastien Fabbro <bicatali@g.o>
34 + files/scipy-0.6.0-implicit.patch,
35 + +files/scipy-0.6.0-python-2.6-c_abs.patch, +files/scipy-0.6.0-stsci.patch,
36 + +files/scipy-0.7.0_beta1-implicit.patch, +scipy-0.6.0-r5.ebuild,
37 + +scipy-0.7.0_beta1.ebuild:
38 + Fixed for python-2.6 (bug #245100, thanks Christian Becke for his patch),
39 + now installs stsci packages, and beta version bump, still masked for
40 + testing only
41
42 28 Oct 2008; Sébastien Fabbro <bicatali@g.o>
43 scipy-0.6.0-r4.ebuild:
44
45
46
47 1.1 sci-libs/scipy/scipy-0.6.0-r5.ebuild
48
49 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/scipy/scipy-0.6.0-r5.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/scipy/scipy-0.6.0-r5.ebuild?rev=1.1&content-type=text/plain
51
52 Index: scipy-0.6.0-r5.ebuild
53 ===================================================================
54 # Copyright 1999-2008 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $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 $
57
58 EAPI=1
59 NEED_PYTHON=2.3
60 inherit eutils distutils fortran flag-o-matic
61
62 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
63 DESCRIPTION="Scientific algorithms library for Python"
64 HOMEPAGE="http://www.scipy.org/"
65 LICENSE="BSD"
66
67 SLOT="0"
68
69 IUSE="fftw umfpack sandbox"
70
71 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
72
73 CDEPEND="dev-python/numpy
74 virtual/cblas
75 virtual/lapack
76 fftw? ( sci-libs/fftw:2.1 )
77 umfpack? ( sci-libs/umfpack )
78 sandbox? ( >=sci-libs/netcdf-3.6 x11-libs/libX11 )"
79
80 DEPEND="${CDEPEND}
81 dev-util/pkgconfig
82 umfpack? ( dev-lang/swig )"
83
84 RDEPEND="${CDEPEND}
85 dev-python/imaging"
86
87 # test still buggy on lapack with 2 failures on check_syevr
88 # (lapack float). check every version bump.
89 #RESTRICT="test"
90
91 DOCS="THANKS.txt DEVELOPERS.txt LATEST.txt TOCHANGE.txt FORMAT_GUIDELINES.txt"
92
93 scipy_fortran_setup() {
94 append-ldflags -shared
95 FORTRAN="gfortran g77 ifc"
96 fortran_pkg_setup
97 local fc=
98 case ${FORTRANC} in
99 gfortran) fc=gnu95 ;;
100 g77) fc=gnu ;;
101 ifc|ifort)
102 if use ia64; then
103 fc=intele
104 elif use amd64; then
105 fc=intelem
106 else
107 fc=intel
108 fi
109 ;;
110 *) eerror "Unknown fortran compiler: ${FORTRANC}"
111 die "scipy_fortran_setup failed" ;;
112 esac
113
114 # when fortran flags are set, pic is removed.
115 use amd64 && [[ -n ${FFLAGS} ]] && FFLAGS="${FFLAGS} -fPIC"
116 export SCIPY_FCONFIG="config_fc --fcompiler=${fc} --noopt --noarch"
117 }
118
119 pkg_setup() {
120 if use umfpack && ! built_with_use dev-lang/swig python; then
121 eerror "With umfpack enabled you need"
122 eerror "dev-lang/swig with python enabled"
123 einfo "Please re-emerge swig with USE=python"
124 die "needs swig with python"
125 fi
126 # scipy automatically detects libraries by default
127 export {FFTW,FFTW3,UMFPACK}=None
128 use fftw && unset FFTW
129 use umfpack && unset UMFPACK
130 use sandbox && elog "Warning: using sandbox modules at your own risk!"
131 scipy_fortran_setup
132 }
133
134 src_unpack() {
135 unpack ${A}
136 cd "${S}"
137 epatch "${FILESDIR}"/${P}-implicit.patch
138 epatch "${FILESDIR}"/${P}-randomkit.patch
139 epatch "${FILESDIR}"/${P}-cdf.patch
140 epatch "${FILESDIR}"/${P}-fftw-fix.patch
141 epatch "${FILESDIR}"/${P}-ndimage.patch
142 epatch "${FILESDIR}"/${P}-python-2.6-c_abs.patch
143 epatch "${FILESDIR}"/${P}-stsci.patch
144 cat > site.cfg <<-EOF
145 [DEFAULT]
146 library_dirs = /usr/$(get_libdir)
147 include_dirs = /usr/include
148 [atlas]
149 include_dirs = $(pkg-config --cflags-only-I \
150 cblas lapack | sed -e 's/^-I//' -e 's/ -I/:/g')
151 library_dirs = $(pkg-config --libs-only-L \
152 cblas lapack | sed -e \
153 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):/usr/$(get_libdir)
154 atlas_libs = $(pkg-config --libs-only-l \
155 cblas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
156 lapack_libs = $(pkg-config --libs-only-l \
157 lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
158 [blas_opt]
159 include_dirs = $(pkg-config --cflags-only-I \
160 cblas | sed -e 's/^-I//' -e 's/ -I/:/g')
161 library_dirs = $(pkg-config --libs-only-L \
162 cblas | sed -e 's/^-L//' -e 's/ -L/:/g' \
163 -e 's/ //g'):/usr/$(get_libdir)
164 libraries = $(pkg-config --libs-only-l \
165 cblas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
166 [lapack_opt]
167 library_dirs = $(pkg-config --libs-only-L \
168 lapack | sed -e 's/^-L//' -e 's/ -L/:/g' \
169 -e 's/ //g'):/usr/$(get_libdir)
170 libraries = $(pkg-config --libs-only-l \
171 lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
172 EOF
173 if use sandbox; then
174 cd scipy/sandbox
175 ls -1 */__init__.py \
176 | sed -e 's:/__init__.py::' \
177 | grep -v exmplpackage \
178 > enabled_packages.txt \
179 || die "sandbox listing failed"
180 fi
181 }
182
183 src_compile() {
184 distutils_src_compile ${SCIPY_FCONFIG}
185 }
186
187 src_test() {
188 "${python}" setup.py install \
189 --home="${S}"/test \
190 --no-compile \
191 ${SCIPY_FCONFIG} || die "install test failed"
192 pushd "${S}"/test/lib*/python
193 PYTHONPATH=. "${python}" -c \
194 "import scipy as s;import sys;sys.exit(s.test(10,3))" \
195 2>&1 | tee test.log
196 grep -q OK test.log || die "test failed"
197 popd
198 rm -rf test
199 }
200
201 src_install() {
202 distutils_src_install ${SCIPY_FCONFIG}
203 }
204
205 pkg_postinst() {
206 elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
207 elog "to your prefered image viewer if you don't like the default one. Ex:"
208 elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
209 }
210
211
212
213 1.1 sci-libs/scipy/scipy-0.7.0_beta1.ebuild
214
215 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/scipy/scipy-0.7.0_beta1.ebuild?rev=1.1&view=markup
216 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/scipy/scipy-0.7.0_beta1.ebuild?rev=1.1&content-type=text/plain
217
218 Index: scipy-0.7.0_beta1.ebuild
219 ===================================================================
220 # Copyright 1999-2008 Gentoo Foundation
221 # Distributed under the terms of the GNU General Public License v2
222 # $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 $
223
224 EAPI=1
225 NEED_PYTHON=2.4
226 MYP=${P/_beta/b}
227 inherit eutils distutils fortran flag-o-matic
228
229 SRC_URI="mirror://sourceforge/${PN}/${MYP}.tar.gz"
230 DESCRIPTION="Scientific algorithms library for Python"
231 HOMEPAGE="http://www.scipy.org/"
232 LICENSE="BSD"
233
234 SLOT="0"
235
236 IUSE="test umfpack"
237
238 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
239
240 CDEPEND=">=dev-python/numpy-1.2
241 virtual/cblas
242 virtual/lapack
243 umfpack? ( sci-libs/umfpack )"
244
245 DEPEND="${CDEPEND}
246 dev-util/pkgconfig
247 test? ( dev-python/nose )
248 umfpack? ( dev-lang/swig )"
249
250 RDEPEND="${CDEPEND}
251 dev-python/imaging"
252
253 DOCS="THANKS.txt LATEST.txt TOCHANGE.txt FORMAT_GUIDELINES.txt"
254
255 S="${WORKDIR}/${MYP}"
256
257 scipy_fortran_setup() {
258 append-ldflags -shared
259 FORTRAN="gfortran g77 ifc"
260 fortran_pkg_setup
261 local fc=
262 case ${FORTRANC} in
263 gfortran) fc=gnu95 ;;
264 g77) fc=gnu ;;
265 ifc|ifort)
266 if use ia64; then
267 fc=intele
268 elif use amd64; then
269 fc=intelem
270 else
271 fc=intel
272 fi
273 ;;
274 *) eerror "Unknown fortran compiler: ${FORTRANC}"
275 die "scipy_fortran_setup failed" ;;
276 esac
277
278 # when fortran flags are set, pic is removed.
279 use amd64 && [[ -n ${FFLAGS} ]] && FFLAGS="${FFLAGS} -fPIC"
280 export SCIPY_FCONFIG="config_fc --fcompiler=${fc} --noopt --noarch"
281 }
282
283 pkg_setup() {
284 if use umfpack && ! built_with_use dev-lang/swig python; then
285 eerror "With umfpack enabled you need"
286 eerror "dev-lang/swig with python enabled"
287 einfo "Please re-emerge swig with USE=python"
288 die "needs swig with python"
289 fi
290 # scipy automatically detects libraries by default
291 export {FFTW,FFTW3,UMFPACK}=None
292 use umfpack && unset UMFPACK
293 scipy_fortran_setup
294 }
295
296 src_unpack() {
297 unpack ${A}
298 cd "${S}"
299 epatch "${FILESDIR}"/${P}-implicit.patch
300 epatch "${FILESDIR}"/${PN}-0.6.0-stsci.patch
301 cat > site.cfg <<-EOF
302 [DEFAULT]
303 library_dirs = /usr/$(get_libdir)
304 include_dirs = /usr/include
305 [atlas]
306 include_dirs = $(pkg-config --cflags-only-I \
307 cblas lapack | sed -e 's/^-I//' -e 's/ -I/:/g')
308 library_dirs = $(pkg-config --libs-only-L \
309 cblas lapack | sed -e \
310 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):/usr/$(get_libdir)
311 atlas_libs = $(pkg-config --libs-only-l \
312 cblas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
313 lapack_libs = $(pkg-config --libs-only-l \
314 lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
315 [blas_opt]
316 include_dirs = $(pkg-config --cflags-only-I \
317 cblas | sed -e 's/^-I//' -e 's/ -I/:/g')
318 library_dirs = $(pkg-config --libs-only-L \
319 cblas | sed -e 's/^-L//' -e 's/ -L/:/g' \
320 -e 's/ //g'):/usr/$(get_libdir)
321 libraries = $(pkg-config --libs-only-l \
322 cblas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
323 [lapack_opt]
324 library_dirs = $(pkg-config --libs-only-L \
325 lapack | sed -e 's/^-L//' -e 's/ -L/:/g' \
326 -e 's/ //g'):/usr/$(get_libdir)
327 libraries = $(pkg-config --libs-only-l \
328 lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
329 EOF
330 }
331
332 src_compile() {
333 distutils_src_compile ${SCIPY_FCONFIG}
334 }
335
336 src_test() {
337 "${python}" setup.py install \
338 --home="${S}"/test \
339 --no-compile \
340 ${SCIPY_FCONFIG} || die "install test failed"
341 pushd "${S}"/test/lib*/python
342 PYTHONPATH=. "${python}" -c "import scipy; scipy.test()" 2>&1 | tee test.log
343 grep -q ^ERROR test.log && die "test failed"
344 popd
345 rm -rf test
346 }
347
348 src_install() {
349 distutils_src_install ${SCIPY_FCONFIG}
350 }
351
352 pkg_postinst() {
353 elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
354 elog "to your prefered image viewer if you don't like the default one. Ex:"
355 elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
356 }