summaryrefslogtreecommitdiff
path: root/sci-astronomy/kapteyn
diff options
context:
space:
mode:
Diffstat (limited to 'sci-astronomy/kapteyn')
-rw-r--r--sci-astronomy/kapteyn/Manifest6
-rw-r--r--sci-astronomy/kapteyn/files/kapteyn-2.2-debundle_wcs.patch101
-rw-r--r--sci-astronomy/kapteyn/kapteyn-2.3.ebuild33
-rw-r--r--sci-astronomy/kapteyn/metadata.xml15
4 files changed, 155 insertions, 0 deletions
diff --git a/sci-astronomy/kapteyn/Manifest b/sci-astronomy/kapteyn/Manifest
new file mode 100644
index 000000000000..3ddacbf81de6
--- /dev/null
+++ b/sci-astronomy/kapteyn/Manifest
@@ -0,0 +1,6 @@
+AUX kapteyn-2.2-debundle_wcs.patch 2441 SHA256 6a2fd3eb10fc989a572c3446307dd7d5942e4d1651fd2b7b73c7b9caa23f730a SHA512 530d50ba8179939110eac6d4cb5b3611c67208994765f1ab1e50fc9a8cd30d56fe8f1aebc2b44e39f6ae3af534ca7ccb6bc58a4f1df555b49277d358d706e25f WHIRLPOOL cb8412732d26dedc914d526fd6bf4b9bb759e8f828d1a92a6e6dfdf7a9efea983dd84c14215f5f71d9d1539d3aa384d167e9eb08228c3e4c8c6291d1e96be9ab
+DIST kapteyn-2.3.tar.gz 14496700 SHA256 ba328d4fa202c1b1c7641857cbf23d3f05c78d7eac33d34b97b1c4ee22efa876 SHA512 7095d9f1faed1937817af48416027391e19bf416187b8cc7f0cc5fb1227efe715c0c6ff945e0e021d1a5e82353e9c3ad2c3a1236d3453b4904d6ca2f2a47747b WHIRLPOOL c31d78402b337569c2b0f733bb44b547ca5c0aed503e7fcfc22433bc63a443458122fb1713b199c65fc58fb8828ca84c47ce24d21a06b3dbac5fe9c7f94db211
+EBUILD kapteyn-2.3.ebuild 775 SHA256 8f44d80f336b197c9d65dc6abece2e9137de41af88e84ccbd022ff338717385f SHA512 d9a8e52851b4a3696568b348a9f6dc6d14e124f2de2fec88d127e23fd46118d057b4ca651f70ce8a822c6b10610230f58a0e935d912d7061b0d277e83b38a536 WHIRLPOOL 882c90fa1d972b9fbb3f4f18186e1ba5afd1b1c34e7d1330fc27044c3bf66a794241a286dfb46099e29d1f55773fd92ba84b2d4f7c27796de158f5471d1df1ba
+MISC ChangeLog 2724 SHA256 76f8c1de5713b0c59c6843da0f5879a2226c2a1c15dc07ed0c573b42c3810c97 SHA512 52cadba8f3a4ec778d686008e67dcdf78f87b374cf54ca0416587d4f72fe86edd495816adbd45df607e12b3bed9734f5e8e3e1c38b8114ef9243a10195dde2e1 WHIRLPOOL 755c8c6fcf954656db0ec190e1982e523cfc09bee2523fed667e092a359421b670ec637cc671ae4c6de4fa84a7cb5fcef79f609236fb3077e549e2f272104b87
+MISC ChangeLog-2015 2120 SHA256 9b0d6fe7c9e3961cc01b6766978e2dba7c075fac68cce7ca889f68c06bf94a33 SHA512 2731238c09fe2623cab903bd99a6146d36adb37dc6e20fa8142a63cde3de38ae63c1d54fd5e43ec9f262a87b178335182402c460ec9b9975d86d020ecc876b2d WHIRLPOOL 9fbc3b28b7407126d4b939bba2fa9084e3a6f568aebf000876b7991b75d6fb0c5495b0f63f96134dc60b0f3b5549404b26ff9f7c5f83edbc353a9e6f7ff9bfde
+MISC metadata.xml 618 SHA256 cc593721fb985a05f83d60948486b772a1d1c1858964afc01e3f30a758837060 SHA512 f0c7ebe71e55db31e91ebc2f3abbb700a2869cb305e5ea06cabc229dce6b73e8418c1943b3926a3a8fec9e8cc2ea117ffa675dcc80b46ec381a4094daf646fb1 WHIRLPOOL 5053e93acdb7c7ac58441996c1cd1e50ba13bc2e95cb2a20271d008796852e6f508084d143b8c53b550d2c9915da3bb8d6aa4345dd19c98bbba5716119e46c39
diff --git a/sci-astronomy/kapteyn/files/kapteyn-2.2-debundle_wcs.patch b/sci-astronomy/kapteyn/files/kapteyn-2.2-debundle_wcs.patch
new file mode 100644
index 000000000000..035979b80bc7
--- /dev/null
+++ b/sci-astronomy/kapteyn/files/kapteyn-2.2-debundle_wcs.patch
@@ -0,0 +1,101 @@
+Use system wcslib
+
+Patch written by Kacper Kowalik <xarthisius@gentoo.org>
+
+--- a/setup.py
++++ b/setup.py
+@@ -3,7 +3,8 @@
+ from kapteyn import __version__ as version
+ from glob import glob
+ import sys, os
+-
++from subprocess import Popen, PIPE
++from re import match
+ try:
+ import numpy
+ except:
+@@ -14,21 +15,27 @@
+ '''
+ sys.exit(1)
+
+-try:
+- wcslib_dir = glob('src/wcslib*/C/')[0]
+-except:
+- print '''
+--- Error.
+-Unable to find WCSLIB source distribution.
+-'''
+- sys.exit(1)
++def pkgconfig(*packages, **kw):
++ flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'}
++ arg = "--libs --cflags --modversion %s" % ' '.join(packages)
++ for tok in Popen(["pkg-config "+ arg],stdout=PIPE, shell=True).communicate()[0].split():
++ token = tok.decode("utf-8")
++ if(match("[0-9]",token)):
++ kw.setdefault("version",[]).append(token)
++ else:
++ kw.setdefault(flag_map.get(token[:2]), []).append(token[2:])
++ return kw
+
+ include_dirs = []
+ numdir = os.path.dirname(numpy.__file__)
+ ipath = os.path.join(numdir, numpy.get_include())
+ include_dirs.append(ipath)
+ include_dirs.append('src')
+-include_dirs.append(wcslib_dir)
++
++WCSLIB = pkgconfig('wcslib')
++WCSVERSION = Popen(["pkg-config --modversion"],stdout=PIPE, shell=True).communicate()[0].split()
++
++include_dirs += WCSLIB['include_dirs']
+
+ short_descr = "Kapteyn Package: Python modules for astronomical applications"
+
+@@ -94,27 +101,6 @@
+ "xyz.c"
+ ]
+
+-wcslib_src = [
+- "cel.c",
+- "lin.c",
+- "log.c",
+- "prj.c",
+- "spc.c",
+- "sph.c",
+- "spx.c",
+- "tab.c",
+- "wcs.c",
+- "wcsfix.c",
+- "wcshdr.c",
+- "wcsprintf.c",
+- "wcstrig.c",
+- "wcsunits.c",
+- "wcsutil.c",
+- "wcserr.c",
+- "flexed/wcsulex.c",
+- "flexed/wcsutrn.c"
+-]
+-
+ ndimg_src = [
+ "nd_image.c",
+ "ni_filters.c",
+@@ -125,8 +111,7 @@
+ "ni_support.c",
+ ]
+
+-wcs_src = ( ['src/' + source for source in wcsmod_src]
+- + [wcslib_dir + source for source in wcslib_src] )
++wcs_src = ( ['src/' + source for source in wcsmod_src] )
+
+ _nd_image_src = ['src/ndimg/' + source for source in ndimg_src]
+
+@@ -168,7 +153,8 @@
+ Extension(
+ "wcs", wcs_src,
+ include_dirs=include_dirs,
+- define_macros=define_macros
++ define_macros=define_macros,
++ libraries=WCSLIB['libraries']
+ ),
+ Extension(
+ "ascarray",
diff --git a/sci-astronomy/kapteyn/kapteyn-2.3.ebuild b/sci-astronomy/kapteyn/kapteyn-2.3.ebuild
new file mode 100644
index 000000000000..853ec1ed2cf1
--- /dev/null
+++ b/sci-astronomy/kapteyn/kapteyn-2.3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Collection of python tools for astronomy"
+HOMEPAGE="http://www.astro.rug.nl/software/kapteyn"
+SRC_URI="http://www.astro.rug.nl/software/kapteyn/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND="
+ sci-astronomy/wcslib
+ dev-python/numpy[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ dev-python/astropy[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]"
+
+DOCS=( CHANGES.txt README.txt doc/${PN}.pdf )
+
+PATCHES=( "${FILESDIR}"/${PN}-2.2-debundle_wcs.patch )
+
+python_prepare_all() {
+ rm -r src/wcslib-4.* || die
+ distutils-r1_python_prepare_all
+}
diff --git a/sci-astronomy/kapteyn/metadata.xml b/sci-astronomy/kapteyn/metadata.xml
new file mode 100644
index 000000000000..57bfac11edbd
--- /dev/null
+++ b/sci-astronomy/kapteyn/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-astronomy@gentoo.org</email>
+ <name>Gentoo Astronomy Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The Kapteyn Package is a collection of Python modules and applications
+ made by the computer group of the Kapteyn Astronomical Institute,
+ University of Groningen, The Netherlands. The purpose of the package
+ is to provide tools for the development of astronomical applications
+ with Python.
+</longdescription>
+</pkgmetadata>