From: "Sebastien Fabbro" <bicatali@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-misc/fitscut/, sci-misc/fitscut/files/
Date: Tue, 22 Mar 2016 22:22:27 +0000 (UTC) [thread overview]
Message-ID: <1458688689.9b72b87082ff45e4fc74fac0132d7bc669a9fda0.bicatali@gentoo> (raw)
commit: 9b72b87082ff45e4fc74fac0132d7bc669a9fda0
Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 22 18:09:58 2016 +0000
Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Tue Mar 22 23:18:09 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b72b870
sci-misc/fitscut: initial import
Package-Manager: portage-2.2.28
sci-misc/fitscut/Manifest | 1 +
.../fitscut/files/fitscut-1.4.4-fix-asinh.patch | 33 ++++++++++++++++++
sci-misc/fitscut/fitscut-1.4.4.ebuild | 39 ++++++++++++++++++++++
sci-misc/fitscut/metadata.xml | 14 ++++++++
4 files changed, 87 insertions(+)
diff --git a/sci-misc/fitscut/Manifest b/sci-misc/fitscut/Manifest
new file mode 100644
index 0000000..3c69b47
--- /dev/null
+++ b/sci-misc/fitscut/Manifest
@@ -0,0 +1 @@
+DIST fitscut-1.4.4.tar.gz 163663 SHA256 1df936af9cd36bf1cd1e3a095ecc8bec68a6974525e0f4fd0e9cccb9633728bb SHA512 1d80671efeebfb07e7e2714d9cdbdd445a2e7644119d5b82ba4a8f033b36e773d13f87998ece45091f4a127beca374021e8c5afd88f649c9405fb329cd1ee97f WHIRLPOOL fa2a7ac7306988b574dd9155fe1062bd86fea8cf1bd45cfb8a05795d7ef305cd5de9d9061fe00b2d7e9f25c263f8db4bed252bf171082943b7c9d82684c0dcd4
diff --git a/sci-misc/fitscut/files/fitscut-1.4.4-fix-asinh.patch b/sci-misc/fitscut/files/fitscut-1.4.4-fix-asinh.patch
new file mode 100644
index 0000000..be5c3a1
--- /dev/null
+++ b/sci-misc/fitscut/files/fitscut-1.4.4-fix-asinh.patch
@@ -0,0 +1,33 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Avoid NaN in asinh calculation.
+ Also, ignore NaN in histogram creation.
+--- a/histogram.c
++++ b/histogram.c
+@@ -83,8 +83,10 @@
+ ind = 0;
+ else if (value > dmax)
+ ind = length-1;
+- else
++ else if (isfinite(value))
+ ind = ceil ((value-dmin) / binsize);
++ else
++ continue;
+ hist[ind] += 1.0;
+ }
+ }
+--- a/image_scale.c
++++ b/image_scale.c
+@@ -326,8 +326,11 @@
+ if (t > maxval)
+ maxval = t;
+ }
+-
+- weight = asinh (sum * nonlinearity) / (nonlinearity * sum);
++ if (sum * nonlinearity == 0.0) {
++ weight = 1.0;
++ } else {
++ weight = asinh (sum * nonlinearity) / (nonlinearity * sum);
++ }
+ for (k = 0; k < Image->channels; k++) {
+ if (Image->data[k] == NULL)
+ continue;
diff --git a/sci-misc/fitscut/fitscut-1.4.4.ebuild b/sci-misc/fitscut/fitscut-1.4.4.ebuild
new file mode 100644
index 0000000..49af77e
--- /dev/null
+++ b/sci-misc/fitscut/fitscut-1.4.4.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Extract cutouts from FITS image files"
+HOMEPAGE="http://acs.pha.jhu.edu/general/software/fitscut/"
+SRC_URI="${HOMEPAGE}/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+RDEPEND="
+ sci-libs/cfitsio:0=
+ sci-astronomy/wcstools:0=
+ media-libs/libpng:0=
+ virtual/jpeg:0="
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-fix-asinh.patch" )
+
+src_prepare() {
+ default
+ # gentoo wcs is called wcstools to avoid conflict with wcslib
+ sed -e 's/libwcs/wcs/g' \
+ -i wcs*.c fitscut.c || die
+ # cfitsio/fitsio.h might conflict with host on prefix
+ sed -e 's/LIB(wcs,/LIB(wcstools,/' \
+ -e 's/-lwcs/-lwcstools/' \
+ -e '/cfitsio\/fitsio.h/d' \
+ configure.in > configure.ac || die
+ rm configure.in
+ eautoreconf
+}
diff --git a/sci-misc/fitscut/metadata.xml b/sci-misc/fitscut/metadata.xml
new file mode 100644
index 0000000..cc63d59
--- /dev/null
+++ b/sci-misc/fitscut/metadata.xml
@@ -0,0 +1,14 @@
+<?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">
+ fitscut is designed to extract cutouts from FITS image format
+ files. FITS, PNG, and JPEG output types are supported.
+ When multiple input files are specified and the output type is PNG or
+ JPEG the resulting image is an RGB color image.
+</longdescription>
+</pkgmetadata>
reply other threads:[~2016-03-22 22:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458688689.9b72b87082ff45e4fc74fac0132d7bc669a9fda0.bicatali@gentoo \
--to=bicatali@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox