summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2013-04-25 16:27:31 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2013-04-25 16:27:31 +0000
commiteb57157f86551400796bd3654bbf816087471728 (patch)
tree9a91d8c7fda4fca61c1820614b3b45c660825cd3 /sci-libs/scipy
parentExperimentally add --with-mibdirs="." (bug #249496). (diff)
downloadgentoo-2-eb57157f86551400796bd3654bbf816087471728.tar.gz
gentoo-2-eb57157f86551400796bd3654bbf816087471728.tar.bz2
gentoo-2-eb57157f86551400796bd3654bbf816087471728.zip
Version bump
(Portage version: 2.2.01.21890-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'sci-libs/scipy')
-rw-r--r--sci-libs/scipy/ChangeLog11
-rw-r--r--sci-libs/scipy/files/scipy-0.12.0-blitz.patch28
-rw-r--r--sci-libs/scipy/files/scipy-0.12.0-cephes-missing-include.patch12
-rw-r--r--sci-libs/scipy/files/scipy-0.12.0-gerqf.patch12
-rw-r--r--sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch15
-rw-r--r--sci-libs/scipy/metadata.xml22
-rw-r--r--sci-libs/scipy/scipy-0.12.0.ebuild131
7 files changed, 219 insertions, 12 deletions
diff --git a/sci-libs/scipy/ChangeLog b/sci-libs/scipy/ChangeLog
index 916c76d3b461..7d6f69f94998 100644
--- a/sci-libs/scipy/ChangeLog
+++ b/sci-libs/scipy/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-libs/scipy
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.89 2013/03/30 13:07:39 floppym Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/ChangeLog,v 1.90 2013/04/25 16:27:31 bicatali Exp $
+
+*scipy-0.12.0 (25 Apr 2013)
+
+ 25 Apr 2013; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/scipy-0.12.0-blitz.patch,
+ +files/scipy-0.12.0-cephes-missing-include.patch,
+ +files/scipy-0.12.0-gerqf.patch, +files/scipy-0.12.0-restore-sys-argv.patch,
+ +scipy-0.12.0.ebuild, metadata.xml:
+ Version bump
30 Mar 2013; Mike Gilbert <floppym@gentoo.org> scipy-0.11.0-r1.ebuild:
Quote patterns for python_gen_usedep.
diff --git a/sci-libs/scipy/files/scipy-0.12.0-blitz.patch b/sci-libs/scipy/files/scipy-0.12.0-blitz.patch
new file mode 100644
index 000000000000..2817aa39b871
--- /dev/null
+++ b/sci-libs/scipy/files/scipy-0.12.0-blitz.patch
@@ -0,0 +1,28 @@
+Description: Fixes scipy.weave.inline compalition with g++ 4.3 and upwards
+Author: Sameer Morar <smorar@gmail.com>
+Forwarded: http://projects.scipy.org/scipy/scipy/ticket/739
+Bug-Debian: http://bugs.debian.org/598520
+Bug-Ubuntu: https://launchpad.net/bugs/302649
+
+--- a/scipy/weave/blitz/blitz/blitz.h
++++ b/scipy/weave/blitz/blitz/blitz.h
+@@ -65,6 +65,8 @@
+
+ #define BZ_THROW // Needed in <blitz/numinquire.h>
+
++#include <cstdlib>
++
+ BZ_NAMESPACE(blitz)
+
+ #ifdef BZ_HAVE_STD
+--- a/scipy/weave/blitz/blitz/prettyprint.h
++++ b/scipy/weave/blitz/blitz/prettyprint.h
+@@ -22,6 +22,8 @@
+ #ifndef BZ_PRETTYPRINT_H
+ #define BZ_PRETTYPRINT_H
+
++#include <cstdlib>
++
+ BZ_NAMESPACE(blitz)
+
+ class prettyPrintFormat {
diff --git a/sci-libs/scipy/files/scipy-0.12.0-cephes-missing-include.patch b/sci-libs/scipy/files/scipy-0.12.0-cephes-missing-include.patch
new file mode 100644
index 000000000000..3bd93ad2bc41
--- /dev/null
+++ b/sci-libs/scipy/files/scipy-0.12.0-cephes-missing-include.patch
@@ -0,0 +1,12 @@
+Missing declarations resulting in insecure code
+bicatali - gentoo - 04/2013
+--- scipy/special/cephes/gels.c.orig 2013-04-25 09:17:00.578809719 -0700
++++ scipy/special/cephes/gels.c 2013-04-25 09:17:18.048916759 -0700
+@@ -63,6 +63,7 @@
+ * C ..................................................................
+ * C
+ */
++#include <math.h>
+ #include "protos.h"
+
+ int gels(A, R, M, EPS, AUX)
diff --git a/sci-libs/scipy/files/scipy-0.12.0-gerqf.patch b/sci-libs/scipy/files/scipy-0.12.0-gerqf.patch
new file mode 100644
index 000000000000..cf93c0ec53f0
--- /dev/null
+++ b/sci-libs/scipy/files/scipy-0.12.0-gerqf.patch
@@ -0,0 +1,12 @@
+diff -up scipy-0.12.0/scipy/linalg/flapack.pyf.src.gerqf scipy-0.12.0/scipy/linalg/flapack.pyf.src
+--- scipy-0.12.0/scipy/linalg/flapack.pyf.src.gerqf 2013-04-06 10:10:35.000000000 -0600
++++ scipy-0.12.0/scipy/linalg/flapack.pyf.src 2013-04-15 17:03:37.290059000 -0600
+@@ -650,7 +650,7 @@ interface
+ <ftype> dimension(m,n),intent(in,out,copy,out=qr,aligned8) :: a
+ <ftype> dimension(MIN(m,n)),intent(out) :: tau
+
+- integer optional,intent(in),depend(n),check(lwork>=m||lwork==-1) :: lwork=3*m
++ integer optional,intent(in),depend(m),check(lwork>=m||lwork==-1) :: lwork=3*m
+ <ftype> dimension(MAX(lwork,1)),intent(out),depend(lwork) :: work
+ integer intent(out) :: info
+ end subroutine <prefix>gerqf
diff --git a/sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch b/sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch
new file mode 100644
index 000000000000..3eef739f93a8
--- /dev/null
+++ b/sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch
@@ -0,0 +1,15 @@
+Description: restore sys.argv in case of exception
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500814
+
+--- a/scipy/weave/build_tools.py
++++ b/scipy/weave/build_tools.py
+@@ -283,6 +283,9 @@ def build_extension(module_path,compiler
+ configure_python_path(build_dir)
+ except SyntaxError: #TypeError:
+ success = 0
++ except Exception, e:
++ restore_sys_argv()
++ raise e
+
+ # restore argv after our trick...
+ restore_sys_argv()
diff --git a/sci-libs/scipy/metadata.xml b/sci-libs/scipy/metadata.xml
index 1020ae39f436..3fcc27d2e030 100644
--- a/sci-libs/scipy/metadata.xml
+++ b/sci-libs/scipy/metadata.xml
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>sci</herd>
- <longdescription lang="en">
+<herd>sci</herd>
+<longdescription lang="en">
SciPy is an open source library of scientific tools for Python. SciPy
supplements the popular numpy module, gathering a variety of high level
science and engineering modules together as a single package.
- SciPy includes modules for graphics and plotting, optimization, integration,
- special functions, signal and image processing, genetic algorithms, ODE
- solvers, and others.
+ SciPy includes modules for graphics and plotting, optimization,
+ integration, special functions, signal and image processing, genetic
+ algorithms, ODE solvers, and others.
</longdescription>
- <use>
- <flag name="umfpack">Adds support for sparse solving with <pkg>sci-libs/umfpack</pkg></flag>
- </use>
- <upstream>
- <remote-id type="pypi">scipy</remote-id>
- </upstream>
+<use>
+ <flag name="umfpack">Adds support for sparse solving with <pkg>sci-libs/umfpack</pkg></flag>
+</use>
+<upstream>
+ <remote-id type="pypi">scipy</remote-id>
+</upstream>
</pkgmetadata>
diff --git a/sci-libs/scipy/scipy-0.12.0.ebuild b/sci-libs/scipy/scipy-0.12.0.ebuild
new file mode 100644
index 000000000000..aca06103b370
--- /dev/null
+++ b/sci-libs/scipy/scipy-0.12.0.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/scipy/scipy-0.12.0.ebuild,v 1.1 2013/04/25 16:27:31 bicatali Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_5,2_6,2_7,3_2,3_3} )
+
+inherit eutils fortran-2 distutils-r1 flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Scientific algorithms library for Python"
+HOMEPAGE="http://www.scipy.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ doc? (
+ http://docs.scipy.org/doc/${PN}/${PN}-html.zip -> ${P}-html.zip
+ http://docs.scipy.org/doc/${PN}/${PN}-ref.pdf -> ${P}-ref.pdf
+ )"
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+IUSE="doc sparse test"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+
+CDEPEND="
+ dev-python/numpy[lapack,${PYTHON_USEDEP}]
+ sci-libs/arpack
+ virtual/cblas
+ virtual/lapack
+ sparse? ( sci-libs/umfpack )"
+DEPEND="${CDEPEND}
+ dev-lang/swig
+ dev-python/cython[${PYTHON_USEDEP}]
+ virtual/pkgconfig
+ doc? ( app-arch/unzip )
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+RDEPEND="${CDEPEND}
+ dev-python/imaging[$(python_gen_usedep 'python2*')]"
+
+DOCS=( HACKING.rst.txt README.txt THANKS.txt LATEST.txt TOCHANGE.txt )
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ if use doc; then
+ unzip -qo "${DISTDIR}"/${P}-html.zip -d html || die
+ fi
+}
+
+pc_incdir() {
+ $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
+ sed -e 's/^-I//' -e 's/[ ]*-I/:/g'
+}
+
+pc_libdir() {
+ $(tc-getPKG_CONFIG) --libs-only-L $@ | \
+ sed -e 's/^-L//' -e 's/[ ]*-L/:/g'
+}
+
+pc_libs() {
+ $(tc-getPKG_CONFIG) --libs-only-l $@ | \
+ sed -e 's/[ ]-l*\(pthread\|m\)[ ]*//g' \
+ -e 's/^-l//' -e 's/[ ]*-l/,/g'
+}
+
+python_prepare_all() {
+ # scipy automatically detects libraries by default
+ export {FFTW,FFTW3,UMFPACK}=None
+ use sparse && 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
+
+ local libdir="${EPREFIX}"/usr/$(get_libdir)
+ cat >> site.cfg <<-EOF
+ [blas]
+ include_dirs = $(pc_incdir cblas)
+ library_dirs = $(pc_libdir cblas blas):${libdir}
+ blas_libs = $(pc_libs cblas blas)
+ [lapack]
+ library_dirs = $(pc_libdir lapack):${libdir}
+ lapack_libs = $(pc_libs lapack)
+ EOF
+
+ local PATCHES=(
+ "${FILESDIR}"/${P}-gerqf.patch
+ "${FILESDIR}"/${P}-blitz.patch
+ "${FILESDIR}"/${P}-restore-sys-argv.patch
+ "${FILESDIR}"/${P}-cephes-missing-include.patch
+ )
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ distutils-r1_python_compile ${SCIPY_FCONFIG}
+}
+
+python_test() {
+ distutils_install_for_testing ${SCIPY_FCONFIG}
+ cd "${TEST_DIR}" || die "no ${TEST_DIR} available"
+ # nasty hack to remove weave tests because it is not python3 compat
+ [[ ${TEST_DIR} =~ python3 ]] && rm -r "${TEST_DIR}"/lib/scipy/weave
+#r = scipy.test('full', verbose=10)
+ "${EPYTHON}" -c "
+import scipy, sys
+r = scipy.test('fast',verbose=2)
+sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install ${SCIPY_FCONFIG}
+ if use doc; then
+ dohtml -r "${WORKDIR}"/html/.
+ dodoc "${DISTDIR}"/${P}*pdf
+ fi
+}
+
+pkg_postinst() {
+ elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
+ elog "to your prefered image viewer. Example:"
+ elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
+}