summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2011-03-26 17:10:43 +0000
committerJustin Lecher <jlec@gentoo.org>2011-03-26 17:10:43 +0000
commit3c2be64370db03f34251b1e00a37807fd406d269 (patch)
tree5d174bef82eb9008539e1263779726d5e0fcc1ef /sci-libs/scipy
parentVersion Bump (diff)
downloadgentoo-2-3c2be64370db03f34251b1e00a37807fd406d269.tar.gz
gentoo-2-3c2be64370db03f34251b1e00a37807fd406d269.tar.bz2
gentoo-2-3c2be64370db03f34251b1e00a37807fd406d269.zip
Unbundled Superlu and Qhull, #357879
(Portage version: 2.2.0_alpha28/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/scipy')
-rw-r--r--sci-libs/scipy/ChangeLog9
-rw-r--r--sci-libs/scipy/files/scipy-0.9.0-qhull.patch44
-rw-r--r--sci-libs/scipy/files/scipy-0.9.0-superlu.patch40
-rw-r--r--sci-libs/scipy/scipy-0.8.0.ebuild10
-rw-r--r--sci-libs/scipy/scipy-0.9.0-r1.ebuild139
-rw-r--r--sci-libs/scipy/scipy-0.9.0.ebuild13
6 files changed, 245 insertions, 10 deletions
diff --git a/sci-libs/scipy/ChangeLog b/sci-libs/scipy/ChangeLog
index 384cfb5d69cf..ef66f5d422bf 100644
--- a/sci-libs/scipy/ChangeLog
+++ b/sci-libs/scipy/ChangeLog
@@ -1,6 +1,13 @@
# 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.64 2011/03/07 20:12:04 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.65 2011/03/26 17:10:43 jlec Exp $
+
+*scipy-0.9.0-r1 (26 Mar 2011)
+
+ 26 Mar 2011; Justin Lecher <jlec@gentoo.org> scipy-0.8.0.ebuild,
+ scipy-0.9.0.ebuild, +scipy-0.9.0-r1.ebuild, +files/scipy-0.9.0-qhull.patch,
+ +files/scipy-0.9.0-superlu.patch:
+ Unbundled Superlu and Qhull, #357879
*scipy-0.9.0 (07 Mar 2011)
diff --git a/sci-libs/scipy/files/scipy-0.9.0-qhull.patch b/sci-libs/scipy/files/scipy-0.9.0-qhull.patch
new file mode 100644
index 000000000000..cb06df4c4734
--- /dev/null
+++ b/sci-libs/scipy/files/scipy-0.9.0-qhull.patch
@@ -0,0 +1,44 @@
+ scipy/spatial/qhull.c | 4 ++--
+ scipy/spatial/setup.py | 14 +++++++-------
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/scipy/spatial/qhull.c b/scipy/spatial/qhull.c
+index 91e22b3..e433ae9 100644
+--- a/scipy/spatial/qhull.c
++++ b/scipy/spatial/qhull.c
+@@ -202,8 +202,8 @@
+ #include "numpy/arrayobject.h"
+ #include "numpy/ufuncobject.h"
+ #include "math.h"
+-#include "qhull/src/qset.h"
+-#include "qhull/src/qhull.h"
++#include "qhull/qset.h"
++#include "qhull/qhull.h"
+ #include "qhull_blas.h"
+
+
+diff --git a/scipy/spatial/setup.py b/scipy/spatial/setup.py
+index 7401d55..254c23d 100755
+--- a/scipy/spatial/setup.py
++++ b/scipy/spatial/setup.py
+@@ -16,13 +16,13 @@ def configuration(parent_package = '', top_path = None):
+ 'random.c', 'rboxlib.c', 'stat.c', 'user.c', 'usermem.c',
+ 'userprintf.c']
+
+- config.add_library('qhull',
+- sources=[join('qhull', 'src', x) for x in qhull_src],
+- include_dirs=[get_python_inc(),
+- get_numpy_include_dirs()],
+- # XXX: GCC dependency!
+- #extra_compiler_args=['-fno-strict-aliasing'],
+- )
++# config.add_library('qhull',
++# sources=[join('qhull', 'src', x) for x in qhull_src],
++# include_dirs=[get_python_inc(),
++# get_numpy_include_dirs()],
++# # XXX: GCC dependency!
++# #extra_compiler_args=['-fno-strict-aliasing'],
++# )
+
+ lapack = dict(get_info('lapack_opt'))
+ try:
diff --git a/sci-libs/scipy/files/scipy-0.9.0-superlu.patch b/sci-libs/scipy/files/scipy-0.9.0-superlu.patch
new file mode 100644
index 000000000000..88f60be0cbbf
--- /dev/null
+++ b/sci-libs/scipy/files/scipy-0.9.0-superlu.patch
@@ -0,0 +1,40 @@
+--- scipy/sparse/linalg/dsolve/_superluobject.h.orig 2011-03-24 22:05:15.995923005 +1300
++++ scipy/sparse/linalg/dsolve/_superluobject.h 2011-03-24 22:06:09.638923002 +1300
+@@ -9,11 +9,10 @@
+ #define __SUPERLU_OBJECT
+
+ #include "Python.h"
+-#include "SuperLU/SRC/slu_zdefs.h"
++#include "superlu/slu_zdefs.h"
+ #include "numpy/arrayobject.h"
+-#include "SuperLU/SRC/slu_util.h"
+-#include "SuperLU/SRC/slu_dcomplex.h"
+-#include "SuperLU/SRC/slu_scomplex.h"
++#include "superlu/slu_util.h"
++#include "superlu/slu_dcomplex.h"
+
+
+ #define _CHECK_INTEGER(x) (PyArray_ISINTEGER(x) && (x)->descr->elsize == sizeof(int))
+
+--- scipy/sparse/linalg/dsolve/setup.py.orig 2011-02-20 22:58:20.000000000 +1300
++++ scipy/sparse/linalg/dsolve/setup.py 2011-03-25 11:08:02.691267018 +1300
+@@ -25,18 +25,12 @@
+ # when using MSVC + MKL, lsame is already in MKL
+ sources.remove(join(superlu_src, 'lsame.c'))
+
+- config.add_library('superlu_src',
+- sources = sources,
+- macros = superlu_defs,
+- include_dirs=[superlu_src],
+- )
+-
+ # Extension
+ config.add_extension('_superlu',
+ sources = ['_superlumodule.c',
+ '_superlu_utils.c',
+ '_superluobject.c'],
+- libraries = ['superlu_src'],
++ libraries = ['superlu'],
+ extra_info = lapack_opt,
+ )
+
diff --git a/sci-libs/scipy/scipy-0.8.0.ebuild b/sci-libs/scipy/scipy-0.8.0.ebuild
index 181f58a03eb4..4aaa0ceb88af 100644
--- a/sci-libs/scipy/scipy-0.8.0.ebuild
+++ b/sci-libs/scipy/scipy-0.8.0.ebuild
@@ -1,8 +1,9 @@
# 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.6 2011/01/23 11:50:58 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.8.0.ebuild,v 1.7 2011/03/26 17:10:43 jlec Exp $
EAPI="2"
+
PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython"
@@ -11,13 +12,13 @@ inherit eutils 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
)"
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="http://www.scipy.org/ http://pypi.python.org/pypi/scipy"
LICENSE="BSD"
SLOT="0"
@@ -69,7 +70,8 @@ src_unpack() {
}
src_prepare() {
- epatch "${FILESDIR}"/${PN}-0.6.0-stsci.patch \
+ epatch \
+ "${FILESDIR}"/${PN}-0.6.0-stsci.patch \
"${FILESDIR}"/${P}-python2.7.patch
local libdir="${EPREFIX}"/usr/$(get_libdir)
cat > site.cfg <<-EOF
diff --git a/sci-libs/scipy/scipy-0.9.0-r1.ebuild b/sci-libs/scipy/scipy-0.9.0-r1.ebuild
new file mode 100644
index 000000000000..0d76cc7afd8b
--- /dev/null
+++ b/sci-libs/scipy/scipy-0.9.0-r1.ebuild
@@ -0,0 +1,139 @@
+# 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-r1.ebuild,v 1.1 2011/03/26 17:10:43 jlec Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="*-jython"
+
+inherit eutils 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
+ 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="${CDEPEND}
+ dev-python/imaging"
+
+# buggy test suite - still true for 0.9.0
+RESTRICT="test"
+
+DOCS="THANKS.txt LATEST.txt TOCHANGE.txt"
+
+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}"/${P}-superlu.patch \
+ "${FILESDIR}"/${P}-qhull.patch
+ rm -rf ./scipy/sparse/linalg/dsolve/SuperLU ./scipy/spatial/qhull
+ 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"
+}
diff --git a/sci-libs/scipy/scipy-0.9.0.ebuild b/sci-libs/scipy/scipy-0.9.0.ebuild
index d75d7f7a90a0..6efe5139d958 100644
--- a/sci-libs/scipy/scipy-0.9.0.ebuild
+++ b/sci-libs/scipy/scipy-0.9.0.ebuild
@@ -1,8 +1,10 @@
# 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.2 2011/03/08 21:08:00 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.9.0.ebuild,v 1.3 2011/03/26 17:10:43 jlec Exp $
EAPI="3"
+
+PYTHON_DEPEND="2"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="*-jython"
@@ -11,7 +13,7 @@ inherit eutils 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"
+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
@@ -23,11 +25,12 @@ SLOT="0"
IUSE="doc umfpack"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
-CDEPEND=">=dev-python/numpy-1.5
- virtual/cblas
- virtual/lapack
+CDEPEND="
+ >=dev-python/numpy-1.5
media-libs/qhull
sci-libs/arpack
+ virtual/cblas
+ virtual/lapack
umfpack? ( sci-libs/umfpack )"
DEPEND="${CDEPEND}