diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2007-02-23 23:26:18 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2007-02-23 23:26:18 +0000 |
commit | 77e490f98371677f062ebf2aa4c4825a892a3d15 (patch) | |
tree | 511ddd70ee890e49c7a75c8f5d19fe572867311f /dev-python/numarray | |
parent | added sci herd and fix a numpy dependency (diff) | |
download | gentoo-2-77e490f98371677f062ebf2aa4c4825a892a3d15.tar.gz gentoo-2-77e490f98371677f062ebf2aa4c4825a892a3d15.tar.bz2 gentoo-2-77e490f98371677f062ebf2aa4c4825a892a3d15.zip |
cleaned patches, replaced numarray-1.5.2 with -r1 and better lapack treatment
(Portage version: 2.1.2-r9)
Diffstat (limited to 'dev-python/numarray')
-rw-r--r-- | dev-python/numarray/ChangeLog | 13 | ||||
-rw-r--r-- | dev-python/numarray/files/digest-numarray-1.5.2-r1 (renamed from dev-python/numarray/files/digest-numarray-1.5.2) | 0 | ||||
-rw-r--r-- | dev-python/numarray/files/numarray-1.5.2-html.patch | 20 | ||||
-rw-r--r-- | dev-python/numarray/files/numarray-1.5.2-includes.patch | 24 | ||||
-rw-r--r-- | dev-python/numarray/files/numarray-1.5.2-numinclude.patch | 11 | ||||
-rw-r--r-- | dev-python/numarray/files/numarray-1.5.2-refcount.patch | 10 | ||||
-rw-r--r-- | dev-python/numarray/metadata.xml | 3 | ||||
-rw-r--r-- | dev-python/numarray/numarray-1.5.2-r1.ebuild | 111 | ||||
-rw-r--r-- | dev-python/numarray/numarray-1.5.2.ebuild | 67 |
9 files changed, 147 insertions, 112 deletions
diff --git a/dev-python/numarray/ChangeLog b/dev-python/numarray/ChangeLog index 97320d5c4aa3..95b4e8dda561 100644 --- a/dev-python/numarray/ChangeLog +++ b/dev-python/numarray/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for dev-python/numarray # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/ChangeLog,v 1.20 2007/02/07 20:55:38 marienz Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/ChangeLog,v 1.21 2007/02/23 23:26:18 bicatali Exp $ + +*numarray-1.5.2-r1 (23 Feb 2007) + + 23 Feb 2007; Sébastien Fabbro <bicatali@gentoo.org> + -files/numarray-1.5.2-html.patch, files/numarray-1.5.2-includes.patch, + -files/numarray-1.5.2-numinclude.patch, + -files/numarray-1.5.2-lapack.patch, + +files/numarray-1.5.2-refcount.patch, metadata.xml, + -numarray-1.5.2.ebuild, +numarray-1.5.2-r1.ebuild: + better treatment of cblas/lapack, added some patches, a src_test and + much cleaning. 07 Feb 2007; Marien Zwart <marienz@gentoo.org> numarray-1.5.2.ebuild: Fix syntax error in SRC_URI. Closes bug #165789, thanks to Darren Dale for diff --git a/dev-python/numarray/files/digest-numarray-1.5.2 b/dev-python/numarray/files/digest-numarray-1.5.2-r1 index 882e2bded563..882e2bded563 100644 --- a/dev-python/numarray/files/digest-numarray-1.5.2 +++ b/dev-python/numarray/files/digest-numarray-1.5.2-r1 diff --git a/dev-python/numarray/files/numarray-1.5.2-html.patch b/dev-python/numarray/files/numarray-1.5.2-html.patch deleted file mode 100644 index b2e4896d7bf4..000000000000 --- a/dev-python/numarray/files/numarray-1.5.2-html.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- numarray-1.5.2/Doc/manual/Makefile 2005-04-28 16:58:23.000000000 +0100 -+++ numarray-1.5.2.new/Doc/manual/Makefile 2006-08-30 19:54:21.000000000 +0100 -@@ -52,7 +52,7 @@ - - dvi: numarray.dvi - --html: numarray -+html: numarray.html - - pdf: numarray.pdf - -@@ -71,7 +71,7 @@ - echo "You need to create a link to mkhowto," - echo "see the README for details." - --numarray: Makefile mkhowto $(SOURCES) -+numarray.html: Makefile mkhowto $(SOURCES) - $(MKHOWTO) --html $(OPTIONS) numarray.tex - - numarray.dvi: Makefile mkhowto $(SOURCES) diff --git a/dev-python/numarray/files/numarray-1.5.2-includes.patch b/dev-python/numarray/files/numarray-1.5.2-includes.patch index 43536999bf3d..b425ef8b7e34 100644 --- a/dev-python/numarray/files/numarray-1.5.2-includes.patch +++ b/dev-python/numarray/files/numarray-1.5.2-includes.patch @@ -1,6 +1,6 @@ -diff -Nur numarray-1.5.2/Include/numarray/arraybase.h numarray-1.5.2.new/Include/numarray/arraybase.h ---- numarray-1.5.2/Include/numarray/arraybase.h 2006-01-23 11:45:03.000000000 +0000 -+++ numarray-1.5.2.new/Include/numarray/arraybase.h 2006-08-30 19:54:21.000000000 +0100 +diff -Nur Include.orig/numarray/arraybase.h Include/numarray/arraybase.h +--- Include.orig/numarray/arraybase.h 2007-02-08 16:08:06.000000000 +0000 ++++ Include/numarray/arraybase.h 2007-02-08 16:07:30.000000000 +0000 @@ -1,6 +1,8 @@ #if !defined(_arraybase_h) #define _arraybase_h 1 @@ -19,9 +19,9 @@ diff -Nur numarray-1.5.2/Include/numarray/arraybase.h numarray-1.5.2.new/Include #define REFCOUNT(obj) (((PyObject *)(obj))->ob_refcnt) #define MAX_ELSIZE 16 -diff -Nur numarray-1.5.2/Include/numarray/cfunc.h numarray-1.5.2.new/Include/numarray/cfunc.h ---- numarray-1.5.2/Include/numarray/cfunc.h 2005-10-27 22:06:35.000000000 +0100 -+++ numarray-1.5.2.new/Include/numarray/cfunc.h 2006-08-30 19:54:21.000000000 +0100 +diff -Nur Include.orig/numarray/cfunc.h Include/numarray/cfunc.h +--- Include.orig/numarray/cfunc.h 2007-02-08 16:08:06.000000000 +0000 ++++ Include/numarray/cfunc.h 2007-02-08 16:07:30.000000000 +0000 @@ -1,6 +1,8 @@ #if !defined(__cfunc__) #define __cfunc__ 1 @@ -31,9 +31,9 @@ diff -Nur numarray-1.5.2/Include/numarray/cfunc.h numarray-1.5.2.new/Include/num typedef PyObject *(*CFUNCasPyValue)(void *); typedef int (*UFUNC)(long, long, long, void **, long*); /* typedef void (*CFUNC_2ARG)(long, void *, void *); */ -diff -Nur numarray-1.5.2/Include/numarray/nummacro.h numarray-1.5.2.new/Include/numarray/nummacro.h ---- numarray-1.5.2/Include/numarray/nummacro.h 2005-11-28 01:07:02.000000000 +0000 -+++ numarray-1.5.2.new/Include/numarray/nummacro.h 2006-08-30 19:54:21.000000000 +0100 +diff -Nur Include.orig/numarray/nummacro.h Include/numarray/nummacro.h +--- Include.orig/numarray/nummacro.h 2007-02-08 16:08:06.000000000 +0000 ++++ Include/numarray/nummacro.h 2007-02-08 16:07:30.000000000 +0000 @@ -1,6 +1,8 @@ #if !defined(_ndarraymacro) #define _ndarraymacro @@ -43,9 +43,9 @@ diff -Nur numarray-1.5.2/Include/numarray/nummacro.h numarray-1.5.2.new/Include/ /* The structs defined here are private implementation details of numarray which are subject to change w/o notice. */ -diff -Nur numarray-1.5.2/Include/numarray/tc.h numarray-1.5.2.new/Include/numarray/tc.h ---- numarray-1.5.2/Include/numarray/tc.h 2003-05-09 18:11:56.000000000 +0100 -+++ numarray-1.5.2.new/Include/numarray/tc.h 2006-08-30 19:54:21.000000000 +0100 +diff -Nur Include.orig/numarray/tc.h Include/numarray/tc.h +--- Include.orig/numarray/tc.h 2007-02-08 16:08:06.000000000 +0000 ++++ Include/numarray/tc.h 2007-02-08 16:07:30.000000000 +0000 @@ -1,5 +1,7 @@ #if defined(MEASURE_TIMING) diff --git a/dev-python/numarray/files/numarray-1.5.2-numinclude.patch b/dev-python/numarray/files/numarray-1.5.2-numinclude.patch deleted file mode 100644 index 3da32fc56847..000000000000 --- a/dev-python/numarray/files/numarray-1.5.2-numinclude.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- numarray-1.5.2/Lib/numinclude.py 2006-08-24 19:40:48.000000000 +0100 -+++ numarray-1.5.2.new/Lib/numinclude.py 2006-08-30 19:54:21.000000000 +0100 -@@ -4,7 +4,7 @@ - import _ndarray - import os - --include_dir = '/home/jmiller/work/debug/include/python2.5/numarray' -+include_dir = '/usr/include/python2.4/numarray' - version = '1.5.2' - hasUInt64 = _ndarray.hasUInt64() - LP64 = _ndarray.lp64() diff --git a/dev-python/numarray/files/numarray-1.5.2-refcount.patch b/dev-python/numarray/files/numarray-1.5.2-refcount.patch new file mode 100644 index 000000000000..d80f90f94bc6 --- /dev/null +++ b/dev-python/numarray/files/numarray-1.5.2-refcount.patch @@ -0,0 +1,10 @@ +--- Src/libnumarray.ch 2006-08-24 19:38:15.000000000 +0100 ++++ Src/libnumarray.ch.new 2007-02-08 16:10:49.000000000 +0000 +@@ -877,6 +877,7 @@ + if (!buf) return NULL; + } else { + buf = Py_None; ++ Py_INCREF(buf); + } + + a = NA_NewAllFromBuffer( nd, dimensions, descr->type_num, buf, diff --git a/dev-python/numarray/metadata.xml b/dev-python/numarray/metadata.xml index 255a5187017b..b4eae9987766 100644 --- a/dev-python/numarray/metadata.xml +++ b/dev-python/numarray/metadata.xml @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> +<herd>sci</herd> <herd>python</herd> -<longdescription> +<longdescription lang="en"> Numarray is an array processing package designed to efficiently manipulate large multi-dimensional arrays. Numarray is modelled after Numeric and features c-code generated from python template scripts, diff --git a/dev-python/numarray/numarray-1.5.2-r1.ebuild b/dev-python/numarray/numarray-1.5.2-r1.ebuild new file mode 100644 index 000000000000..2e935ca3d879 --- /dev/null +++ b/dev-python/numarray/numarray-1.5.2-r1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/numarray-1.5.2-r1.ebuild,v 1.1 2007/02/23 23:26:18 bicatali Exp $ + +NEED_PYTHON=2.3 + +inherit distutils fortran + +DOC_PV=1.5 +DESCRIPTION="Large array processing extension module for Python" +SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz + doc? ( mirror://sourceforge/numpy/${PN}-${DOC_PV}.html.tar.gz )" +HOMEPAGE="http://www.stsci.edu/resources/software_hardware/numarray" + +# numarray does not work yet with other cblas implementations +# than cblas-reference or blas-atlas +RDEPEND="lapack? ( || ( >=sci-libs/blas-atlas-3.7.11-r1 + >=sci-libs/cblas-reference-20030223-r3 ) + virtual/lapack )" +DEPEND="${RDEPEND} + lapack? ( app-admin/eselect-cblas )" + +IUSE="doc lapack" +SLOT="0" +KEYWORDS="~amd64 ~x86" +LICENSE="BSD" + +DOCS="LICENSE.txt Doc/*.txt Doc/release_notes/ANNOUNCE-${PV:0:3}" + +pkg_setup() { + if use lapack; then + FORTRAN="gfortran g77" + fortran_pkg_setup + for d in $(eselect cblas show); do mycblas=${d}; done + if [[ -z "${mycblas/reference/}" ]] && [[ -z "${mycblas/atlas/}" ]]; then + ewarn "You need to set cblas to atlas or reference. Do:" + ewarn " eselect cblas set <impl>" + ewarn "where <impl> is atlas, threaded-atlas or reference" + die "setup failed" + fi + fi +} + +src_unpack() { + if use lapack; then + fortran_src_unpack + else + unpack ${A} + fi + + cd "${S}" + # include Python.h from header files using the PyObject_HEAD macro. + epatch "${FILESDIR}"/${P}-includes.patch + + # fix refcount problem from a debian bug + epatch "${FILESDIR}"/${P}-refcount.patch + + # fix hard-coded path in numinclude + sed -i \ + -e "s:/home/jmiller/work/debug/include/python2.5:/usr/include/python${PYVER}:" \ + Lib/numinclude.py || die "sed failed" + + # configure cfg_packages.py for lapack + if use lapack; then + sed -i \ + -e '/^if USE_LAPACK:/iUSE_LAPACK=True' \ + -e 's:/usr/local/include/atlas:/usr/include/atlas:g' \ + -e "s:/usr/local/lib/atlas:/usr/$(get_libdir):g" \ + -e 's:f77blas:blas:g' \ + cfg_packages.py + # fix gfortran for > gcc-4 + if [[ "${FORTRANC}" == gfortran ]]; then + sed -i \ + -e "s:g2c:gfortran:g" \ + cfg_packages.py + fi + [[ "${mycblas}" == reference ]] && \ + sed -i \ + -e "s:'atlas',::g" \ + -e "s:include/atlas:include/cblas:g" \ + cfg_packages.py + fi + ${python} setup.py config --gencode || die "API code generation failed" +} + +src_test() { + # test with lapack buggy + if use lapack; then + einfo "no automatic testing with external lapack" + return + fi + ebegin "Testing numarray functions" + cd build/lib* + cp "${S}"/Lib/testdata.fits numarray + PYTHONPATH=. "${python}" -c \ + "from numarray.testall import test;import sys;sys.exit(test())" \ + > test.log + grep -q -i failed test.log && die "failed tests in ${PWD}/test.log" + eend $? + rm -f numarray/testdata.fits test*.* +} + + +src_install() { + distutils_src_install + if use doc; then + insinto /usr/share/doc/${PF} + doins -r Examples + dohtml ${WORKDIR}/${PN}-${DOC_PV}/* || die "dohtml failed" + fi +} diff --git a/dev-python/numarray/numarray-1.5.2.ebuild b/dev-python/numarray/numarray-1.5.2.ebuild deleted file mode 100644 index dadbebb8a1b6..000000000000 --- a/dev-python/numarray/numarray-1.5.2.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/numarray-1.5.2.ebuild,v 1.2 2007/02/07 20:55:38 marienz Exp $ - -inherit distutils fortran - -DESCRIPTION="Large array processing extension module for Python" -SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz - doc? ( mirror://sourceforge/numpy/${PN}-1.5.html.tar.gz )" -HOMEPAGE="http://www.stsci.edu/resources/software_hardware/numarray" -DEPEND=">=dev-lang/python-2.3 - lapack? ( virtual/lapack )" -IUSE="doc lapack" -SLOT="0" -KEYWORDS="~amd64 ~x86" -LICENSE="BSD" - -pkg_setup() { - if use lapack; then - FORTRAN="gfortran g77" - fortran_pkg_setup - fi -} - -src_unpack() { - if use lapack; then - fortran_src_unpack - else - unpack ${A} - fi - - use doc && mv ${PN}-1.5 html - # include Python.h from header files using the PyObject_HEAD macro. - epatch "${FILESDIR}"/${P}-includes.patch - - # fix Makefile for html docs - epatch "${FILESDIR}"/${P}-html.patch - - # fix hard-coded path in numinclude - epatch "${FILESDIR}"/${P}-numinclude.patch - - cd "${S}" - if use lapack; then - sed -i \ - -e '/^if USE_LAPACK:/iUSE_LAPACK=True' \ - -e "s:/usr/local/lib/atlas:/usr/$(get_libdir):g" \ - -e 's:/usr/local/include/atlas:/usr/include/atlas:g' \ - -e 's:f77blas:blas:g' \ - cfg_packages.py - # fix gfortran for > gcc-4 - if [[ ${FORTRANC} == gfortran ]]; then - sed -i \ - -e "s:g2c:gfortran:g" \ - cfg_packages.py - fi - fi -} - -src_install() { - distutils_src_install - dodoc Doc/*.txt LICENSE.txt Doc/release_notes/ANNOUNCE-${PV:0:3} - if use doc; then - insinto /usr/share/doc/${PF} - doins -r Examples - dohtml ${WORKDIR}/html - fi -} |