summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-astronomy/kapteyn
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-astronomy/kapteyn')
-rw-r--r--sci-astronomy/kapteyn/Manifest1
-rw-r--r--sci-astronomy/kapteyn/files/kapteyn-2.2-debundle_wcs.patch101
-rw-r--r--sci-astronomy/kapteyn/kapteyn-2.2-r1.ebuild33
-rw-r--r--sci-astronomy/kapteyn/metadata.xml12
4 files changed, 147 insertions, 0 deletions
diff --git a/sci-astronomy/kapteyn/Manifest b/sci-astronomy/kapteyn/Manifest
new file mode 100644
index 000000000000..97e8168412fa
--- /dev/null
+++ b/sci-astronomy/kapteyn/Manifest
@@ -0,0 +1 @@
+DIST kapteyn-2.2.tar.gz 11818056 SHA256 7826a8eeab42e0167f3c9d8ad3444a213b24a34095ff1dd68f0f3254d9fce0ac SHA512 e3f16f2308626c8aaf795460c4fa19464e05e50db7f4de71d73f24a0dba0210d81651b46d2291a30c106a913f0910d0b3ad6ff2935a60a48f8dc1f4cf0205599 WHIRLPOOL 1e64239ac11e5dd32da791387c7880e632e4bf643dd253b5228dafb2d3a1415f06d596bc70bded9e735a7dc2549deaffacecc32428ab912cf601250fad9adc6d
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.2-r1.ebuild b/sci-astronomy/kapteyn/kapteyn-2.2-r1.ebuild
new file mode 100644
index 000000000000..55ad6b271876
--- /dev/null
+++ b/sci-astronomy/kapteyn/kapteyn-2.2-r1.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils 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}
+ virtual/pyfits[${PYTHON_USEDEP}]
+ dev-python/matplotlib[${PYTHON_USEDEP}]"
+
+DOCS=( CHANGES.txt README.txt doc/${PN}.pdf )
+
+python_prepare_all() {
+ epatch "${FILESDIR}"/${P}-debundle_wcs.patch
+ 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..3a653d266440
--- /dev/null
+++ b/sci-astronomy/kapteyn/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci-astronomy</herd>
+<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>