From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- sci-misc/fitscut/Manifest | 5 +++ .../fitscut/files/fitscut-1.4.4-fix-asinh.patch | 33 +++++++++++++++++++ sci-misc/fitscut/fitscut-1.4.4.ebuild | 38 ++++++++++++++++++++++ sci-misc/fitscut/metadata.xml | 14 ++++++++ 4 files changed, 90 insertions(+) create mode 100644 sci-misc/fitscut/Manifest create mode 100644 sci-misc/fitscut/files/fitscut-1.4.4-fix-asinh.patch create mode 100644 sci-misc/fitscut/fitscut-1.4.4.ebuild create mode 100644 sci-misc/fitscut/metadata.xml (limited to 'sci-misc/fitscut') diff --git a/sci-misc/fitscut/Manifest b/sci-misc/fitscut/Manifest new file mode 100644 index 000000000000..113faf668774 --- /dev/null +++ b/sci-misc/fitscut/Manifest @@ -0,0 +1,5 @@ +AUX fitscut-1.4.4-fix-asinh.patch 1238 SHA256 baf7ddf271b2a4bc400586287db3094e3243124bde6020da8c251c613c803d06 SHA512 dc0f72c3177ebccbcfd062bf4e12ef5775e91eb53a3ccdb7ce0aeacec698e469c3593e6d33c7bc27f73b71d588a999ca9c51c0b36dde926f7e7fd8108324afd9 WHIRLPOOL 95a19db1956b86656d68bb3dd5d38bd5ddda5a510e2bd93cfc53daca909487336406f929f2ae8223ac11d243fce1d5411cbedbb70c264a206deb64dd1db421e5 +DIST fitscut-1.4.4.tar.gz 163663 SHA256 1df936af9cd36bf1cd1e3a095ecc8bec68a6974525e0f4fd0e9cccb9633728bb SHA512 1d80671efeebfb07e7e2714d9cdbdd445a2e7644119d5b82ba4a8f033b36e773d13f87998ece45091f4a127beca374021e8c5afd88f649c9405fb329cd1ee97f WHIRLPOOL fa2a7ac7306988b574dd9155fe1062bd86fea8cf1bd45cfb8a05795d7ef305cd5de9d9061fe00b2d7e9f25c263f8db4bed252bf171082943b7c9d82684c0dcd4 +EBUILD fitscut-1.4.4.ebuild 904 SHA256 6df6dcf893ec1c0141067b3e1121ad28aa0733a01df1f870f0336a30e93ee033 SHA512 0fbf7e3c169fd1eec37d5a695a7b8c7596b5453865d97d53e775f2a1124f3ce8354f590b3f96da3ff0d43b85e83bbab10895cafde61efa7c0860affb71625a9d WHIRLPOOL 088161c8930814e7f25f6d9db6b8ff1d15e944b4868b19f3779e87343b6a0c2a1e31ab8355916c8ba2f4917c4db81790182e0b35de49e0e5446ddf4fdebf3500 +MISC ChangeLog 352 SHA256 27396f49ea07db28688fd569cad8a14b3cef65ecc94a185b6a3e05cab05a31b8 SHA512 5b8e22e1a4e313c7ff1f98feb87ca9ff5119f4772f0322f2dcba715658cdcc968838c3083d2a31314dbdc4a968f92408735e4ce9b034df210e0fc879e960c1c3 WHIRLPOOL a0d406170b80e317627a56075bf4ad658b7e6e53b3f1719f79a66592dbf17d5f52464c0278d915ab8e0421588cd21463c7ceb9d1196e6d769b1ae0b63348e923 +MISC metadata.xml 564 SHA256 f3dcdc1b397884949733ff136245d16a78788941750f29ec8cd428877d93128d SHA512 0a7da435d3131addb07f5d2a7fdd9fd85d67ab60041421f72ccc37cb67b3490c808f2c749726490efe235ba07ad0652b87da909e06f77d4094020057a7976ae8 WHIRLPOOL cc19fd63d62f198b0c6cd832340b01abce736f7cee420af80876d6638db687100c949afe616d7bd099b945d3cded8b15c00a2e5d958271da32e9295050229751 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 000000000000..be5c3a1c2309 --- /dev/null +++ b/sci-misc/fitscut/files/fitscut-1.4.4-fix-asinh.patch @@ -0,0 +1,33 @@ +Author: Ole Streicher +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 000000000000..7e9d93d64b13 --- /dev/null +++ b/sci-misc/fitscut/fitscut-1.4.4.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 000000000000..cc63d596cc37 --- /dev/null +++ b/sci-misc/fitscut/metadata.xml @@ -0,0 +1,14 @@ + + + + + sci-astronomy@gentoo.org + Gentoo Astronomy Project + + + 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. + + -- cgit v1.2.3