summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2012-06-21 16:34:44 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2012-06-21 16:34:44 +0000
commit60e81944bc7151688690adc0ed156de8c46c9148 (patch)
treeae15a597f099398488cba19df4c18c9ff7aa0c8b /dev-python/astropy
parentDisable strict aliasing for python2 (diff)
downloadgentoo-2-60e81944bc7151688690adc0ed156de8c46c9148.tar.gz
gentoo-2-60e81944bc7151688690adc0ed156de8c46c9148.tar.bz2
gentoo-2-60e81944bc7151688690adc0ed156de8c46c9148.zip
Debundle zlib wrt #422657 by Diego Elio Pettenò <flameeyes@gentoo.org>, rename fitschecker to avoid collision with dev-python/pyfits wrt #422659 by Helmut Jarausch <jarausch@igpm.rwth-aachen.de>
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/astropy')
-rw-r--r--dev-python/astropy/ChangeLog10
-rw-r--r--dev-python/astropy/astropy-0.1-r1.ebuild (renamed from dev-python/astropy/astropy-0.1.ebuild)21
-rw-r--r--dev-python/astropy/files/astropy-0.1-debundle_zlib.patch62
3 files changed, 88 insertions, 5 deletions
diff --git a/dev-python/astropy/ChangeLog b/dev-python/astropy/ChangeLog
index 7477c0e453cb..8a160997d130 100644
--- a/dev-python/astropy/ChangeLog
+++ b/dev-python/astropy/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-python/astropy
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/astropy/ChangeLog,v 1.4 2012/06/19 20:43:31 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/astropy/ChangeLog,v 1.5 2012/06/21 16:34:43 xarthisius Exp $
+
+*astropy-0.1-r1 (21 Jun 2012)
+
+ 21 Jun 2012; Kacper Kowalik <xarthisius@gentoo.org> +astropy-0.1-r1.ebuild,
+ +files/astropy-0.1-debundle_zlib.patch, -astropy-0.1.ebuild:
+ Debundle zlib wrt #422657 by Diego Elio Pettenò <flameeyes@gentoo.org>, rename
+ fitschecker to avoid collision with dev-python/pyfits wrt #422659 by Helmut
+ Jarausch <jarausch@igpm.rwth-aachen.de>
19 Jun 2012; Sébastien Fabbro <bicatali@gentoo.org> astropy-0.1.ebuild,
metadata.xml:
diff --git a/dev-python/astropy/astropy-0.1.ebuild b/dev-python/astropy/astropy-0.1-r1.ebuild
index 81b313ad3707..6982320f45dd 100644
--- a/dev-python/astropy/astropy-0.1.ebuild
+++ b/dev-python/astropy/astropy-0.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/astropy/astropy-0.1.ebuild,v 1.3 2012/06/19 20:43:31 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/astropy/astropy-0.1-r1.ebuild,v 1.1 2012/06/21 16:34:43 xarthisius Exp $
EAPI=4
@@ -27,13 +27,26 @@ DEPEND="${RDEPEND}
dev-python/pytest
doc? ( dev-python/sphinx dev-python/matplotlib )"
+PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
+
src_prepare() {
- # Remove most of the bundled deps
- rm -rf cextern ${PN}/extern
+ # Remove most of the bundled deps (expat,zlib)
+ rm -rf cextern ${PN}/extern ${PN}/io/fits/src/{zlib,inffast,inftrees,trees}.{c,h}
+
export ASTROPY_USE_SYSTEM_PYTEST=1
- epatch "${FILESDIR}"/${P}-expat.patch
+ epatch "${FILESDIR}"/${P}-expat.patch \
+ "${FILESDIR}"/${P}-debundle_zlib.patch
sed -e 's/from ..extern.configobj //g' \
-i astropy/config/configuration.py || die
+
+ # 422659
+ sed -e 's/fitscheck/&_astropy/g' \
+ -i ${PN}/io/fits/{scripts/fitscheck.py,hdu/base.py} \
+ docs/io/fits/{appendix/faq.rst,appendix/history.rst} \
+ scripts/fitscheck || die
+ mv ${PN}/io/fits/scripts/fitscheck{,_${PN}}.py || die
+ mv scripts/fitscheck{,_${PN}} || die
+
distutils_src_prepare
}
diff --git a/dev-python/astropy/files/astropy-0.1-debundle_zlib.patch b/dev-python/astropy/files/astropy-0.1-debundle_zlib.patch
new file mode 100644
index 000000000000..3702f2a1fda3
--- /dev/null
+++ b/dev-python/astropy/files/astropy-0.1-debundle_zlib.patch
@@ -0,0 +1,62 @@
+Debundle zlib
+
+https://bugs.gentoo.org/show_bug.cgi?id=422657
+
+Patch written by Kacper Kowalik <xarthisius@gentoo.org>
+--- a/astropy/io/fits/setup_package.py
++++ b/astropy/io/fits/setup_package.py
+@@ -20,6 +20,7 @@
+ [os.path.relpath(x) for x in
+ glob(os.path.join(os.path.dirname(__file__), 'src/*.c'))],
+ include_dirs=[setup_helpers.get_numpy_include_path()],
++ libraries=['z'],
+ extra_compile_args=extra_compile_args)
+ ]
+
+--- a/astropy/io/fits/src/compress.c
++++ b/astropy/io/fits/src/compress.c
+@@ -106,7 +106,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include "zlib.h"
++#include <zlib.h>
+
+ int _astropy_uncompress2mem_from_mem(
+ char *inmemptr,
+@@ -182,7 +182,7 @@
+ d_stream.next_out = uncompr;
+ d_stream.avail_out = uncomprLen;
+
+- err = _astropy_inflate(&d_stream, Z_NO_FLUSH);
++ err = inflate(&d_stream, Z_NO_FLUSH);
+
+ if (err != Z_OK && err != Z_STREAM_END)
+ {
+@@ -217,7 +217,7 @@
+ *filesize = d_stream.total_out;
+
+ /* End the decompression */
+- err = _astropy_inflateEnd(&d_stream);
++ err = inflateEnd(&d_stream);
+
+ /* free temporary output data buffer */
+ free(uncompr);
+@@ -285,7 +285,7 @@
+ c_stream.next_out = compr;
+ c_stream.avail_out = comprLen;
+
+- err = _astropy_deflate(&c_stream, Z_FINISH);
++ err = deflate(&c_stream, Z_FINISH);
+
+ if (err != Z_OK && err != Z_STREAM_END)
+ {
+@@ -320,7 +320,7 @@
+ *filesize = c_stream.total_out;
+
+ /* End the compression */
+- err = _astropy_deflateEnd(&c_stream);
++ err = deflateEnd(&c_stream);
+
+ /* free temporary output data buffer */
+ free(compr);