From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-828583-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 598DF1385B0
	for <garchives@archives.gentoo.org>; Sat, 15 Aug 2015 14:42:12 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id DC57B142B7;
	Sat, 15 Aug 2015 14:42:03 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 3C0F1142B7
	for <gentoo-commits@lists.gentoo.org>; Sat, 15 Aug 2015 14:42:03 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id E056B340D80
	for <gentoo-commits@lists.gentoo.org>; Sat, 15 Aug 2015 14:42:01 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id C783F149
	for <gentoo-commits@lists.gentoo.org>; Sat, 15 Aug 2015 14:41:59 +0000 (UTC)
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" <jlec@gentoo.org>
Message-ID: <1439649704.d74b53ae75779f93fb56a1ef60529f56db1ca628.jlec@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-astronomy/wcslib/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sci-astronomy/wcslib/Manifest sci-astronomy/wcslib/metadata.xml sci-astronomy/wcslib/wcslib-4.25.1.ebuild
X-VCS-Directories: sci-astronomy/wcslib/
X-VCS-Committer: jlec
X-VCS-Committer-Name: Justin Lecher
X-VCS-Revision: d74b53ae75779f93fb56a1ef60529f56db1ca628
X-VCS-Branch: master
Date: Sat, 15 Aug 2015 14:41:59 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: f9ec8eaa-746e-4579-85dc-b80deda23484
X-Archives-Hash: dc5534e851d1cf695b3f20bc8e62f23e

commit:     d74b53ae75779f93fb56a1ef60529f56db1ca628
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 14:30:37 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 14:41:44 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d74b53ae

sci-astronomy/wcslib: Version Bump

Package-Manager: portage-2.2.20.1
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 sci-astronomy/wcslib/Manifest             |  1 +
 sci-astronomy/wcslib/metadata.xml         | 12 ++---
 sci-astronomy/wcslib/wcslib-4.25.1.ebuild | 74 +++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+), 6 deletions(-)

diff --git a/sci-astronomy/wcslib/Manifest b/sci-astronomy/wcslib/Manifest
index 41f86ff..43af518 100644
--- a/sci-astronomy/wcslib/Manifest
+++ b/sci-astronomy/wcslib/Manifest
@@ -1,3 +1,4 @@
 DIST wcslib-4.21.tar.bz2 1865628 SHA256 530eb67e432ce0d881f91e9b08734a346a98cee06233433da79ad0c7d5f144ae SHA512 0fdd7b6cb234565e2dc3b619ec219918103c7a14916294004c12c709be803b10f064fa01c9647a46d2588d4f880ed7db6e65758b510d1a556b3b46f7bc836cdd WHIRLPOOL daaa3ba60cab0aac0619d317ea338f8d734a6d924c49d806a509560e6cd89a896f4594d48e760997d1289d2639c6a81b8802f65a2d95a3cd82efa533476a354a
 DIST wcslib-4.22.tar.bz2 1866676 SHA256 afafdf772cb0fe97ae886cbf512fb114d842ca358cce7df9fa93449d1b556950 SHA512 9288314d842a9b54536b5f512900933e2ac307ef81003172fa511c8334f430161f28084309cde7ad2d94d39020eacec33cf8944d30d78abb51f3e7ff01be2bc4 WHIRLPOOL 629bbca2672d0d9ac03696deadfcea155c912c14ef115defac48966c41714ae692fe5cd60587a733ce691612bea9f48d212587dd0a2327739839328b90eae399
 DIST wcslib-4.23.tar.bz2 1876150 SHA256 baf0fc85fb290e8a575eab4b7046517818a12754a0f01da74db9483467dde5a2 SHA512 cc82818b1aa88d325b72c5a7967b688060c9d0bfd6ba4fef39c0e9dab00bab547282b1c301dafb1331156c69e6266ef80c39f0dc44b894a977d2b2b3cafb9c87 WHIRLPOOL 90ca6e91511371c4e791b7e31b395a6cfda29d1f613176282960896170651b7d5ca7b215254befab1021b18e03e283a88820a248c9c4e6e07edef1bed3adca03
+DIST wcslib-4.25.1.tar.bz2 2027340 SHA256 1e5127513c2f402a30daa280f5b4f6da53e73484cbc8085868bc432f807c8495 SHA512 0ed9eeb4b84d2f022394a1ccd04db8a62cb4593d43c5c12e0034f27a12d52cc8c8bf4b14f5d30f71e933682809e3dac5377be1c69bfc6321f6d96b91f6f1da3c WHIRLPOOL 75785c8687cfad92ba6d33444757005c13346188a46913b38afb66997676bae5284e27ccd7f348e88a9d14b6c27d522a06d37e744a5a258e76ef3ed73cefb262

diff --git a/sci-astronomy/wcslib/metadata.xml b/sci-astronomy/wcslib/metadata.xml
index 8d2a6dc..555cb5b 100644
--- a/sci-astronomy/wcslib/metadata.xml
+++ b/sci-astronomy/wcslib/metadata.xml
@@ -1,20 +1,20 @@
 <?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">
+  <herd>sci-astronomy</herd>
+  <longdescription lang="en">
   WCSLIB is a C library, supplied with a full set of Fortran wrappers,
   that implements the "World Coordinate System" (WCS) convention in FITS
   (Flexible Image Transport System).  It also includes a PGPLOT-based routine,
   PGSBOX, for drawing general curvilinear coordinate graticules and a number of
   utility programs.
 </longdescription>
-<use>
-  <flag name="fits">
+  <use>
+    <flag name="fits">
     Enable support for the FITS format through <pkg>sci-libs/cfitsio</pkg>
   </flag>
-  <flag name="pgplot">
+    <flag name="pgplot">
     Builds PGBSOX routines, needs <pkg>sci-libs/pgplot</pkg> library
   </flag>
-</use>
+  </use>
 </pkgmetadata>

diff --git a/sci-astronomy/wcslib/wcslib-4.25.1.ebuild b/sci-astronomy/wcslib/wcslib-4.25.1.ebuild
new file mode 100644
index 0000000..b14ecc6
--- /dev/null
+++ b/sci-astronomy/wcslib/wcslib-4.25.1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+FORTRAN_NEEDED=fortran
+
+inherit eutils fortran-2 multilib
+
+DESCRIPTION="Astronomical World Coordinate System transformations library"
+HOMEPAGE="http://www.atnf.csiro.au/people/mcalabre/WCS/"
+SRC_URI="ftp://ftp.atnf.csiro.au/pub/software/${PN}/${P}.tar.bz2"
+
+SLOT="0/4"
+LICENSE="LGPL-3"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc fortran fits pgplot static-libs"
+
+RDEPEND="
+	fits? ( sci-libs/cfitsio:0= )
+	pgplot? ( sci-libs/pgplot:0= )"
+DEPEND="${RDEPEND}
+	sys-devel/flex
+	virtual/pkgconfig"
+
+src_prepare() {
+	sed -i -e 's/COPYING\*//' GNUmakefile || die
+}
+
+src_configure() {
+	local myconf=(
+		--docdir="${EPREFIX}"/usr/share/doc/${PF}
+		$(use_enable static-libs static)
+		$(use_enable fortran)
+	)
+	# hacks because cfitsio and pgplot directories are hard-coded
+	if use fits; then
+		myconf+=(
+			--with-cfitsioinc="${EPREFIX}/usr/include"
+			--with-cfitsiolib="${EPREFIX}/usr/$(get_libdir)"
+		)
+	else
+		myconf+=( --without-cfitsio )
+	fi
+	if use pgplot; then
+		myconf+=(
+			--with-pgplotinc="${EPREFIX}/usr/include"
+			--with-pgplotlib="${EPREFIX}/usr/$(get_libdir)"
+		)
+	else
+		myconf+=( --without-pgplot )
+	fi
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	# nasty makefile, debugging means probably full rewrite
+	emake -j1
+}
+
+src_test() {
+	emake -j1 check
+}
+
+src_install () {
+	default
+	# static libs are same as shared (compiled with PIC)
+	# so they are not compiled twice
+	use static-libs || rm "${ED}"/usr/$(get_libdir)/lib*.a
+	use doc || rm -r \
+		"${ED}"/usr/share/doc/${PF}/html \
+		"${ED}"/usr/share/doc/${PF}/*.pdf
+}