# ChangeLog for sci-libs/scipy
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.72 2011/12/13 14:16:08 jlec Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.73 2012/01/08 16:59:11 bicatali Exp $
+
+*scipy-0.10.0 (08 Jan 2012)
+
+ 08 Jan 2012; Sébastien Fabbro <bicatali@gentoo.org>
+ -files/scipy-0.6.0-stsci.patch, -scipy-0.8.0.ebuild,
+ -files/scipy-0.8.0-python2.7.patch, -scipy-0.9.0.ebuild,
+ -scipy-0.9.0-r2.ebuild, +scipy-0.10.0.ebuild:
+ Version bump
*scipy-0.9.0-r3 (13 Dec 2011)
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
+Hash: SHA1
-AUX scipy-0.6.0-stsci.patch 2209 RMD160 c7c21a23aef7fff9318f224ef2383f7970c1caf9 SHA1 4b86ad61346660959a61dce24b2b9f20595ea473 SHA256 69cec7cfedbc39a30f54ec12852a84017b5a256e966e60a64b4e891b497fd1be
-AUX scipy-0.8.0-python2.7.patch 826 RMD160 9c4cf8bb36e22dd1602fb14b4af5731692b43f9f SHA1 5b7f8a55c67d28448480a211d62379368c029df4 SHA256 cebe98b2a0f755516a154f43f99297a2a654b06b976d97db877b609d0ff0a346
AUX scipy-0.9.0-qhull.patch 1672 RMD160 7b1d7ceb4cc330b141c993f4f37b2f52a7ffbb9c SHA1 a5180f6a80ad31585edf9da42dcd0751e0cc3a38 SHA256 adbcb54b569c48838df8500a416febbc1f704643874780e4dcf30a635efe6027
AUX scipy-0.9.0-superlu-4.3.patch 712 RMD160 bd4f4205c61be7f207a5fd75a64103d39fc96b83 SHA1 21cd63a5df0010a2bd11c9cb32490c06c274a2f9 SHA256 3078e9b60534571a5765824cb1d5ae1f42497f5a4382f9ae201d59f1cf4dd8d2
AUX scipy-0.9.0-superlu.patch 1526 RMD160 e9628e30466502aa9f708a082cca02fdf97e6bab SHA1 c17ff6d2da83b262bd898a4d91fa4db0269c6e02 SHA256 10b58353b0cdd6a8a6713ca7186cdb37c33c0ae4e42014322c5ad94465359e8f
-DIST scipy-0.8-html.zip 6570421 RMD160 718a919f095e619a3669c30b3b77816500687daa SHA1 4d9e8e3bc04a3d5aec54b77c4acf36be46af342a SHA256 fd4f0a268cb0c4ca7f1b03da0036e342c06cb2dacf3eda3b893cb759e6655f7e
-DIST scipy-0.8-ref.pdf 4561020 RMD160 e748733add18a452753d2a6ec1a1084024e87756 SHA1 0ccd530749b05f56ee1372e9461ebe99810d1472 SHA256 0715c01702ac7302487544600e16870ef12027c121af336c3ae9bae03e9fd41b
-DIST scipy-0.8.0.tar.gz 5560625 RMD160 cce915a5760f9bcf4cc39381cb01d1a5726a57f3 SHA1 d7a84e5dc440d05e4d198411a2e0c6b8ec9adfc5 SHA256 b12937bd3a71ace8d7d6b7e19f8f220630969c2822e6248fc0bbc8f2cc18d825
+DIST scipy-0.10.0-html.zip 10376099 RMD160 7c93b41f4982388a414d3fea714354d23e57ec44 SHA1 1c07550a6e0fd066d64111c78e26b865ae43bd38 SHA256 cd74fcc447ff353ae9d8b86240ec0f841488c6c53db299a67005a0e10f27c506
+DIST scipy-0.10.0-ref.pdf 6611552 RMD160 905493a2e17a9ab21cf2cfe13d6c14f476514399 SHA1 4e10404b20fae58dcbce48713a1c5f720e840b89 SHA256 e73c654ed3ba799a1897bdc8f1720597ede5ce8381c6acde25203ba70d2181a7
+DIST scipy-0.10.0.tar.gz 6212961 RMD160 4d177c2c185c1ac913902d415e616427976b0a47 SHA1 acb017a4c4ca02a938a2e5a1fedc7dc83e1670c0 SHA256 611f980a29c0139519e70164804340b6945656b79c6d62b83fdbac32ab95fbf8
DIST scipy-0.9-html.zip 8516420 RMD160 01dc795021f2a360ac4713bf35619c8a01a1efb1 SHA1 527712601a68abacbfc6d4a4e104a865618d8219 SHA256 6f3148881502ca2cd2964fef7baf9bfec6fe2329ec3f1832e1e6d864aed0f889
DIST scipy-0.9-ref.pdf 5299022 RMD160 38b23f2c32b568d89a4bd02061cf95a0db87a1cf SHA1 9d1af3044d7e461f3ecb4fb3c00b3e31d1ea4419 SHA256 ed2641c180eef2f842536a611982fbd91c33c95a7e7e3c279d7ae6f10071be47
DIST scipy-0.9.0.tar.gz 6084552 RMD160 2aef8c3413ba9c7731d078b27eef1e03419de606 SHA1 a586b10d0613cd61dbfcfd42f3d2609062cd10b8 SHA256 913089de94721be864e0a57fdab52603f3150250a2e0ce4ed6928ca1125f6b23
-EBUILD scipy-0.8.0.ebuild 4166 RMD160 5e3f45d0131da1e8c0dd6c17f308b2732d6a9f78 SHA1 9ff2da693c2eb833c8c2db1efd44c2e773e4fda4 SHA256 db014251fb60a79e789fbf76cbd4ce6b7b554e309badd95f55b4dcb36c1d2c9c
+EBUILD scipy-0.10.0.ebuild 3756 RMD160 cc2a42c6003b506783bad3e99dbb69098d47ab89 SHA1 7a51a8aea4e0b80699d9a220afe82b1a83231de5 SHA256 ccb9669a88cd0d457aa7cb99522969aebd691735d29cd7854d8a615ffad3be8c
EBUILD scipy-0.9.0-r1.ebuild 4258 RMD160 b5905f6f89d9042d5d45836d70370c8f05d5042c SHA1 7c0cb80a4c3f1695be0bb0bfdd23ab26738a3f03 SHA256 06c216262f320b85261b7cb686e687f8642438570059ee9a4b8dd7a0783d1f06
-EBUILD scipy-0.9.0-r2.ebuild 3782 RMD160 7e9ba6e5e0a65e5f8295c3b2ca77c996524125fd SHA1 41dd114595380a8f4553f0678d289dd942e8f32d SHA256 f298f2169fad2b7320325468b2e45cb17a109be4d0fa09b54e7593fcbf0203c3
EBUILD scipy-0.9.0-r3.ebuild 3832 RMD160 eff59b93fdd1cbd28c4fcc1f27106efa99d000e9 SHA1 6bfb05ffbf0d3de5bbb407d87c9928f9b2a762a4 SHA256 5dd991102118d6bfb959e9d6050713fb3bfab3004be6647a1812f1c237f38691
-EBUILD scipy-0.9.0.ebuild 4091 RMD160 bb0e21dea2f099707065037ae13a43b4411f508b SHA1 5c0efbaef685314a54056c376f13269ffeccfb9e SHA256 f666d91d2896c126aa40f98fabced087c3341c2a4215c23f76161a28d43886f1
-MISC ChangeLog 14214 RMD160 5639e1b2dc00c639ca30ed3b866a115ef9f014d2 SHA1 2fac0d781e22a27961aa8767ef1c85acbe1a6931 SHA256 05fc360641c5b44789ffd1421da72ea32af042a92f124095eee065784ce5c426
+MISC ChangeLog 14480 RMD160 b6093da9acaac91b95290a5e23693df114214401 SHA1 d108851f688fca120d261136c714d75cdec35d77 SHA256 f64b70aed252d0d084c90e980937acb715feafa4f6b448002c99cda9ca71325b
MISC metadata.xml 701 RMD160 7de26e871ba7b2eabf2fc82ba77e4083dc06ec5c SHA1 477a629e4d3a7fa7f5ccdf99e7082a87a2b5f55a SHA256 8f4674ae9fc4197903a15da51e7e4e3674edae1acf06a2db6644a3ae0ce332e6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iEYEAREKAAYFAk7nXi0ACgkQgAnW8HDreRbNKgCfWs3BuJUQDpnjx29tujFwny2I
-QqcAn0m9PeGu75P7iaOBH3uaRqGGl5lr
-=xCze
+iEYEARECAAYFAk8Jy2cACgkQ1ycZbhPLE2B9JwCggY55w0q8RE2kmBcFGnhNyCsh
+PEcAn36VfOmJMTAzcZhE3Flych2Tp1Km
+=sWfd
-----END PGP SIGNATURE-----
+++ /dev/null
---- scipy/stsci/image/setup.py.orig 1970-01-01 01:00:00.000000000 +0100
-+++ scipy/stsci/image/setup.py 2007-02-07 01:20:26.000000000 +0000
-@@ -0,0 +1,22 @@
-+#!/usr/bin/env python
-+import numpy
-+
-+def configuration(parent_package='',top_path=None):
-+ from numpy.distutils.misc_util import Configuration
-+ config = Configuration('image',parent_package,top_path,
-+ package_path='lib')
-+ config.add_extension('_combine',
-+ sources=["src/_combinemodule.c"],
-+ define_macros = [('NUMPY', '1')],
-+ include_dirs = [numpy.get_numarray_include()])
-+ return config
-+
-+if __name__ == "__main__":
-+ from numpy.distutils.core import setup
-+ config = configuration(top_path='').todict()
-+ setup(author='Todd Miller',
-+ author_email = 'help@stsci.edu',
-+ description = 'image array manipulation functions',
-+ version = '2.0',
-+ **config)
-+
---- scipy/stsci/convolve/setup.py.orig 1970-01-01 01:00:00.000000000 +0100
-+++ scipy/stsci/convolve/setup.py 2007-03-14 16:52:59.000000000 +0000
-@@ -0,0 +1,27 @@
-+#!/usr/bin/env python
-+import numpy
-+
-+def configuration(parent_package='',top_path=None):
-+ from numpy.distutils.misc_util import Configuration
-+ config = Configuration('convolve',parent_package,top_path,
-+ package_path='lib')
-+
-+ config.add_extension('_correlate',
-+ sources=["src/_correlatemodule.c"],
-+ define_macros = [('NUMPY', '1')],
-+ include_dirs = [numpy.get_numarray_include()])
-+ config.add_extension('_lineshape',
-+ sources=["src/_lineshapemodule.c"],
-+ define_macros = [('NUMPY', '1')],
-+ include_dirs = [numpy.get_numarray_include()])
-+ return config
-+
-+if __name__ == "__main__":
-+ from numpy.distutils.core import setup
-+ config = configuration(top_path='').todict()
-+ setup(author='Todd Miller',
-+ author_email = 'help@stsci.edu',
-+ description = 'image array convolution functions',
-+ version = '2.0',
-+ **config)
-+
+++ /dev/null
-http://projects.scipy.org/scipy/changeset/6646
-
---- scipy/sparse/sparsetools/setup.py
-+++ scipy/sparse/sparsetools/setup.py
-@@ -9,7 +9,9 @@
- for fmt in ['csr','csc','coo','bsr','dia']:
- sources = [ fmt + '_wrap.cxx' ]
- depends = [ fmt + '.h' ]
-- config.add_extension('_' + fmt, sources=sources, depends=depends)
-+ config.add_extension('_' + fmt, sources=sources,
-+ define_macros=[('__STDC_FORMAT_MACROS', 1)],
-+ depends=depends)
-
- return config
-
---- scipy/sparse/sparsetools/SConscript
-+++ scipy/sparse/sparsetools/SConscript
-@@ -3,6 +3,7 @@
- from numscons import GetNumpyEnvironment
-
- env = GetNumpyEnvironment(ARGUMENTS)
-+env.PrependUnique(CPPDEFINES = '__STDC_FORMAT_MACROS')
-
- for fmt in ['csr','csc','coo','bsr','dia']:
- sources = [ fmt + '_wrap.cxx' ]
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.9.0-r2.ebuild,v 1.1 2011/10/07 15:38:28 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.10.0.ebuild,v 1.1 2012/01/08 16:59:11 bicatali Exp $
-EAPI="3"
+EAPI=4
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="*-jython"
inherit eutils fortran-2 distutils flag-o-matic toolchain-funcs versionator
-SP="${PN}-$(get_version_component_range 1-2)"
+DISTUTILS_SRC_TEST=nosetests
DESCRIPTION="Scientific algorithms library for Python"
HOMEPAGE="http://www.scipy.org/ http://pypi.python.org/pypi/scipy"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
doc? (
- http://docs.scipy.org/doc/${P}/${PN}-html.zip -> ${SP}-html.zip
- http://docs.scipy.org/doc/${P}/${PN}-ref.pdf -> ${SP}-ref.pdf
+ http://docs.scipy.org/doc/${P}/${PN}-html.zip -> ${P}-html.zip
+ http://docs.scipy.org/doc/${P}/${PN}-ref.pdf -> ${P}-ref.pdf
)"
-LICENSE="BSD"
+LICENSE="BSD LGPL-2"
SLOT="0"
IUSE="doc umfpack"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-CDEPEND="
- >=dev-python/numpy-1.5
+CDEPEND="dev-python/numpy
media-libs/qhull
sci-libs/arpack
sci-libs/superlu
doc? ( app-arch/unzip )
umfpack? ( dev-lang/swig )"
-RDEPEND="
- virtual/fortran
+RDEPEND="virtual/fortran
${CDEPEND}
dev-python/imaging"
-# buggy test suite - still true for 0.9.0
-#RESTRICT="test"
-
DOCS="THANKS.txt LATEST.txt TOCHANGE.txt"
pkg_setup() {
export F90="${FC}"
export SCIPY_FCONFIG="config_fc --noopt --noarch"
append-fflags -fPIC
+ python_pkg_setup
}
src_unpack() {
unpack ${P}.tar.gz
if use doc; then
- unzip -qo "${DISTDIR}"/${SP}-html.zip -d html || die
+ unzip -qo "${DISTDIR}"/${P}-html.zip -d html || die
fi
}
src_prepare() {
+ # remove bundled libs
epatch \
- "${FILESDIR}"/${P}-superlu.patch \
- "${FILESDIR}"/${P}-qhull.patch
+ "${FILESDIR}"/${PN}-0.9.0-superlu.patch \
+ "${FILESDIR}"/${PN}-0.9.0-superlu-4.3.patch \
+ "${FILESDIR}"/${PN}-0.9.0-qhull.patch
rm -rf ./scipy/sparse/linalg/dsolve/SuperLU ./scipy/spatial/qhull
local libdir="${EPREFIX}"/usr/$(get_libdir)
cat >> site.cfg <<-EOF
src_test() {
testing() {
"$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install \
- --home="${S}/test-${PYTHON_ABI}" --no-compile ${SCIPY_FCONFIG} || die "install test failed"
+ --home="${S}/test-${PYTHON_ABI}" --no-compile ${SCIPY_FCONFIG} \
+ || die "install test failed"
pushd "${S}/test-${PYTHON_ABI}/"lib*/python > /dev/null
- PYTHONPATH=. "$(PYTHON)" -c "import scipy; scipy.test('full')" 2>&1 | tee test.log
+ PYTHONPATH=. "$(PYTHON)" -c "import scipy; scipy.test('full')" \
+ 2>&1 | tee test.log
grep -q ^ERROR test.log && die "test failed"
popd > /dev/null
rm -fr test-${PYTHON_ABI}
src_install() {
distutils_src_install ${SCIPY_FCONFIG}
- if use doc; then
- insinto /usr/share/doc/${PF}
- doins -r "${WORKDIR}"/html || die
- doins "${DISTDIR}"/${SP}*pdf || die
- fi
+ use doc && dohtml -r "${WORKDIR}"/html/* && dodoc "${DISTDIR}"/${P}*pdf
}
pkg_postinst() {
distutils_pkg_postinst
-
elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
elog "to your prefered image viewer if you don't like the default one. Ex:"
elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
+++ /dev/null
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.8.0.ebuild,v 1.9 2011/06/21 14:46:11 jlec Exp $
-
-EAPI="2"
-
-PYTHON_DEPEND="2"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* *-jython"
-
-inherit eutils fortran-2 distutils flag-o-matic toolchain-funcs versionator
-
-SP="${PN}-$(get_version_component_range 1-2)"
-
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="http://www.scipy.org/ http://pypi.python.org/pypi/scipy/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
- doc? (
- http://docs.scipy.org/doc/${SP}.x/${PN}-html.zip -> ${SP}-html.zip
- http://docs.scipy.org/doc/${SP}.x/${PN}-ref.pdf -> ${SP}-ref.pdf
- )"
-
-LICENSE="BSD"
-SLOT="0"
-IUSE="doc umfpack"
-KEYWORDS="amd64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-
-CDEPEND="
- >=dev-python/numpy-1.4.1
- virtual/cblas
- virtual/lapack
- umfpack? ( sci-libs/umfpack )"
-
-DEPEND="${CDEPEND}
- dev-util/pkgconfig
- umfpack? ( dev-lang/swig )
- doc? ( app-arch/unzip )"
-# test? ( dev-python/nose )
-
-RDEPEND="
- virtual/fortran
- ${CDEPEND}
- dev-python/imaging"
-
-# buggy tests
-RESTRICT="test"
-
-DOCS="THANKS.txt LATEST.txt TOCHANGE.txt"
-
-pkg_setup() {
- fortran-2_pkg_setup
- # scipy automatically detects libraries by default
- export {FFTW,FFTW3,UMFPACK}=None
- use umfpack && unset UMFPACK
- # the missing symbols are in -lpythonX.Y, but since the version can
- # differ, we just introduce the same scaryness as on Linux/ELF
- [[ ${CHOST} == *-darwin* ]] \
- && append-ldflags -bundle "-undefined dynamic_lookup" \
- || append-ldflags -shared
- [[ -z ${FC} ]] && export FC="$(tc-getFC)"
- # hack to force F77 to be FC until bug #278772 is fixed
- [[ -z ${F77} ]] && export F77="$(tc-getFC)"
- export F90="${FC}"
- export SCIPY_FCONFIG="config_fc --noopt --noarch"
- append-fflags -fPIC
-}
-
-src_unpack() {
- unpack ${P}.tar.gz
- if use doc; then
- unzip -qo "${DISTDIR}"/${SP}-html.zip -d html || die
- fi
-}
-
-src_prepare() {
- epatch \
- "${FILESDIR}"/${PN}-0.6.0-stsci.patch \
- "${FILESDIR}"/${P}-python2.7.patch
- local libdir="${EPREFIX}"/usr/$(get_libdir)
- cat > site.cfg <<-EOF
- [atlas]
- 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 lapack| sed -e \
- 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir}
- atlas_libs = $(pkg-config --libs-only-l \
- cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
- lapack_libs = $(pkg-config --libs-only-l \
- lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
- [blas_opt]
- 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}
- libraries = $(pkg-config --libs-only-l \
- cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
- [lapack_opt]
- library_dirs = $(pkg-config --libs-only-L \
- lapack | sed -e 's/^-L//' -e 's/ -L/:/g' \
- -e 's/ //g'):${libdir}
- libraries = $(pkg-config --libs-only-l \
- lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
- EOF
-}
-
-src_compile() {
- distutils_src_compile ${SCIPY_FCONFIG}
-}
-
-src_test() {
- testing() {
- "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install \
- --home="${S}/test-${PYTHON_ABI}" --no-compile ${SCIPY_FCONFIG} || die "install test failed"
- pushd "${S}/test-${PYTHON_ABI}/"lib*/python > /dev/null
- PYTHONPATH=. "$(PYTHON)" -c "import scipy; scipy.test('full')" 2>&1 | tee test.log
- grep -q ^ERROR test.log && die "test failed"
- popd > /dev/null
- rm -fr test-${PYTHON_ABI}
- }
- python_execute_function testing
-}
-
-src_install() {
- distutils_src_install ${SCIPY_FCONFIG}
- if use doc; then
- insinto /usr/share/doc/${PF}
- doins -r "${WORKDIR}"/html || die
- doins "${DISTDIR}"/${SP}*pdf || die
- fi
-}
-
-pkg_postinst() {
- distutils_pkg_postinst
-
- elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
- elog "to your prefered image viewer if you don't like the default one. Ex:"
- elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
-}
+++ /dev/null
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.9.0.ebuild,v 1.7 2011/10/05 19:30:26 jlec Exp $
-
-EAPI="3"
-
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="*-jython"
-
-inherit eutils fortran-2 distutils flag-o-matic toolchain-funcs versionator
-
-SP="${PN}-$(get_version_component_range 1-2)"
-
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="http://www.scipy.org/ http://pypi.python.org/pypi/scipy"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
- doc? (
- http://docs.scipy.org/doc/${P}/${PN}-html.zip -> ${SP}-html.zip
- http://docs.scipy.org/doc/${P}/${PN}-ref.pdf -> ${SP}-ref.pdf
- )"
-
-LICENSE="BSD"
-SLOT="0"
-IUSE="doc umfpack"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-
-CDEPEND="
- >=dev-python/numpy-1.5[lapack]
- media-libs/qhull
- sci-libs/arpack
- virtual/cblas
- virtual/lapack
- umfpack? ( sci-libs/umfpack )"
-
-DEPEND="${CDEPEND}
- dev-util/pkgconfig
- doc? ( app-arch/unzip )
- umfpack? ( dev-lang/swig )"
-
-RDEPEND="
- virtual/fortran
- ${CDEPEND}
- dev-python/imaging"
-
-# buggy test suite - still true for 0.9.0
-RESTRICT="test"
-
-DOCS="THANKS.txt LATEST.txt TOCHANGE.txt"
-
-pkg_setup() {
- fortran-2_pkg_setup
- # scipy automatically detects libraries by default
- export {FFTW,FFTW3,UMFPACK}=None
- use umfpack && unset UMFPACK
- # the missing symbols are in -lpythonX.Y, but since the version can
- # differ, we just introduce the same scaryness as on Linux/ELF
- [[ ${CHOST} == *-darwin* ]] \
- && append-ldflags -bundle "-undefined dynamic_lookup" \
- || append-ldflags -shared
- [[ -z ${FC} ]] && export FC="$(tc-getFC)"
- # hack to force F77 to be FC until bug #278772 is fixed
- [[ -z ${F77} ]] && export F77="$(tc-getFC)"
- export F90="${FC}"
- export SCIPY_FCONFIG="config_fc --noopt --noarch"
- append-fflags -fPIC
-}
-
-src_unpack() {
- unpack ${P}.tar.gz
- if use doc; then
- unzip -qo "${DISTDIR}"/${SP}-html.zip -d html || die
- fi
-}
-
-src_prepare() {
- local libdir="${EPREFIX}"/usr/$(get_libdir)
- cat > site.cfg <<-EOF
- [atlas]
- 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 lapack| sed -e \
- 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir}
- atlas_libs = $(pkg-config --libs-only-l \
- cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
- lapack_libs = $(pkg-config --libs-only-l \
- lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
- [blas_opt]
- 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}
- libraries = $(pkg-config --libs-only-l \
- cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
- [lapack_opt]
- library_dirs = $(pkg-config --libs-only-L \
- lapack | sed -e 's/^-L//' -e 's/ -L/:/g' \
- -e 's/ //g'):${libdir}
- libraries = $(pkg-config --libs-only-l \
- lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
- EOF
-}
-
-src_compile() {
- distutils_src_compile ${SCIPY_FCONFIG}
-}
-
-src_test() {
- testing() {
- "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install \
- --home="${S}/test-${PYTHON_ABI}" --no-compile ${SCIPY_FCONFIG} || die "install test failed"
- pushd "${S}/test-${PYTHON_ABI}/"lib*/python > /dev/null
- PYTHONPATH=. "$(PYTHON)" -c "import scipy; scipy.test('full')" 2>&1 | tee test.log
- grep -q ^ERROR test.log && die "test failed"
- popd > /dev/null
- rm -fr test-${PYTHON_ABI}
- }
- python_execute_function testing
-}
-
-src_install() {
- distutils_src_install ${SCIPY_FCONFIG}
- if use doc; then
- insinto /usr/share/doc/${PF}
- doins -r "${WORKDIR}"/html || die
- doins "${DISTDIR}"/${SP}*pdf || die
- fi
-}
-
-pkg_postinst() {
- distutils_pkg_postinst
-
- elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
- elog "to your prefered image viewer if you don't like the default one. Ex:"
- elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
-}