summaryrefslogtreecommitdiff
path: root/sci-astronomy/psfex
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-astronomy/psfex
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-astronomy/psfex')
-rw-r--r--sci-astronomy/psfex/Manifest7
-rw-r--r--sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch55
-rw-r--r--sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch221
-rw-r--r--sci-astronomy/psfex/files/psfex-3.17.1-sigbus.patch26
-rw-r--r--sci-astronomy/psfex/metadata.xml17
-rw-r--r--sci-astronomy/psfex/psfex-3.17.1.ebuild63
6 files changed, 389 insertions, 0 deletions
diff --git a/sci-astronomy/psfex/Manifest b/sci-astronomy/psfex/Manifest
new file mode 100644
index 000000000000..4e1d4a485554
--- /dev/null
+++ b/sci-astronomy/psfex/Manifest
@@ -0,0 +1,7 @@
+AUX psfex-3.17.1-have-mmap.patch 1406 SHA256 5fbd289f5659f1ebe0856832dfcfee5ef6032bad83b6f7df36efc1a8720ad3b5 SHA512 b944a9c75b379932faa0af70d6e215ccbe113b2b063939d8a21810a1c03deecdb0c5a2947b4ebdf4c1396426bd2382e3014e906ac68ef17962670e3705d95a45 WHIRLPOOL 74d47decc00b6e1e12d4a2973b3baaa98378795c3e56ffc5c408d320658ac591ff82d099ee34b78c83ec1ff1f2b348cff9f1822edc10fb68a6b13d2f0579db4c
+AUX psfex-3.17.1-plplot510.patch 5697 SHA256 44cb242e1d3cb24e6d8ac44b7f54e375dfc68588be1d869407f4bb249674e808 SHA512 269457b0592c6458f36c459ca3721df529d8f9ff06e0ed651d4151224bba537e4663a0eb2afb3c55e6e921c56c643fa77f9cb0b39528ae3c09894cc944446328 WHIRLPOOL e12ace2080cb740f81a9e590955182a7a64ab5b62c4d99048d0ed7e6579bc30e691f91d54fd2016f88cb4ca61e8dce9e8e49c1f94a593e25a5bf166c456c11af
+AUX psfex-3.17.1-sigbus.patch 736 SHA256 6dbece30c6d805cebc9211648c08b5b5013f8c2dfc3c5d91ddb6e80c337a5d28 SHA512 bca9ad7a758294812761b9f860cc40cd931a5753f248a4682858e9fd1b917a485d5e0b891e17b90c96b54d0e7f05d1aa2e2e7e6143fdc52ec57d4a609c9f4df6 WHIRLPOOL 7cf8f0a365dca534b94557c2897d2f848f44def25e18549060646f4b8e3e5fcc5460c65bc424286037c8d5caafc86ca23fc2aed6fbb2e34addcc8d6ba47fc9a4
+DIST psfex-3.17.1.tar.gz 2366370 SHA256 53f1b449ab7da7e6e0a989c41b82885f52c8f08270ceb4378bb1ec7ef754af89 SHA512 eb562372dd75593a111c23698b0c00ce050547051803a741ac771ca346d13a0de1e478b055581619a9fa2bf6fa374915ca685cfcf1c4162271b6aa44303e6e58 WHIRLPOOL 3245b2b8c5a85e5f0a88b0c11aff07ce10ced0682890b786d0b092285d46fedf72bf15e87dd3ef6f6296527bc632e12c5162fa0b3b660b5b8bff0b30f38510c9
+EBUILD psfex-3.17.1.ebuild 1616 SHA256 03da6514fa4eb91601f8d04422475e5b10f6f9cb4b1852db5bdb9841714c56f9 SHA512 1517b4777174f2ad3274e3a67e496d180fa0b0fb72cedee3db4bb9e36ed109d21a621f23fe49051afb4cce3a91a2bcb7cbae4997c35d5d430f884977ba5a18b4 WHIRLPOOL 73b4ab23588f6c70acf975765008cacf566ab89157da3e97d46106cb3c9efc08747f72ae5055a485d95869fb04c6c1d5376dec0d89bbc572986d0ce7489d9d89
+MISC ChangeLog 563 SHA256 9a077db8e2853d6717d385b82ac5d08b2538a6e44e65ed0e63717f24b6a4a21d SHA512 f7b88cbd22aa2d96bfbc166b1ea3df1d021d7cf127af83627784307b2e122bc8e6d3615261bf708cad020f7ca6982e8c667c4430221ea1415fbaad036d554a63 WHIRLPOOL 257770ff14ba31f6b135b18a053c8227edfed05b0033bf56d7b402dde9ed88413db866dcaf57ca14c0326339414dab5617a407ec17a9cbdc4073e5bbaa9ce9c2
+MISC metadata.xml 720 SHA256 1bce61bb7b3074a7732fe29d9ad86235f2397f7be90c746a844b97216656524c SHA512 7cc57534487d05bed6729a0c2462fb9ff14402145de76071af155b9451ead40cd276cb5b682fa542085066b35eed6dfefa0e73f9a20a788a5f636f38581efa9b WHIRLPOOL 2725cc2aa00cf8ce7f75cfc63615a8d2e9753ae39f1638c939d42ade3392136631c8d4b93a4491efb04a76565ac733dc111a33cce2e304b6a6bdc11b54a62a56
diff --git a/sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch b/sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch
new file mode 100644
index 000000000000..1b6565089849
--- /dev/null
+++ b/sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch
@@ -0,0 +1,55 @@
+Author: Justin Pryzby <justinpryzby@users.sf.net>
+Description: (guess) Use mmap only if it exists.
+--- a/src/fits/fitsbody.c
++++ b/src/fits/fitsbody.c
+@@ -64,9 +64,12 @@
+ ***/
+ PIXTYPE *alloc_body(tabstruct *tab, void (*func)(PIXTYPE *ptr, int npix))
+ {
++#ifdef HAVE_MMAP
+ FILE *file;
+ PIXTYPE *buffer;
+- size_t npix, size, sizeleft, spoonful;
++ size_t sizeleft, spoonful;
++#endif
++ size_t npix, size;
+
+ if (!body_ramflag)
+ {
+@@ -87,7 +90,9 @@
+ /* Decide if the data will go in physical memory or on swap-space */
+ npix = tab->tabsize/tab->bytepix;
+ size = npix*sizeof(PIXTYPE);
++#if !HAVE_MMAP
+ if (size < body_ramleft)
++#endif
+ {
+ /*-- There should be enough RAM left: try to do a malloc() */
+ if ((tab->bodybuf = malloc(size)))
+@@ -105,6 +110,7 @@
+ tab->bodybuf = NULL;
+ }
+
++#if HAVE_MMAP
+ if (size < body_vramleft)
+ {
+ /*-- Convert and copy the data to a swap file, and mmap() it */
+@@ -144,6 +150,7 @@
+ return NULL;
+ return (PIXTYPE *)tab->bodybuf;
+ }
++#endif
+
+ /* If no memory left at all: forget it! */
+ return NULL;
+@@ -270,8 +277,10 @@
+ size = (tab->tabsize/tab->bytepix)*sizeof(PIXTYPE);
+ if (tab->swapflag)
+ {
++#if HAVE_MMAP
+ if (munmap(tab->bodybuf, size))
+ warning("Can't unmap ", tab->cat->filename);
++#endif
+ tab->swapflag = 0;
+ tab->bodybuf = NULL;
+ body_vramleft += size;
diff --git a/sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch b/sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch
new file mode 100644
index 000000000000..4dd5805a9367
--- /dev/null
+++ b/sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch
@@ -0,0 +1,221 @@
+Author: Ole Streicher <olebole@debian.org>
+Description: Replace deprecated plwid() calls by plwidth().
+--- a/src/cplot.c
++++ b/src/cplot.c
+@@ -527,7 +527,7 @@
+
+ /* Draw meridians */
+ plschr(0.0, 0.33);
+- plwid(0);
++ plwidth(0.0);
+ pllsty(2);
+ xmd = xmu = xdo = -0.5;
+ ymd = ymu = ydo = -0.5;
+@@ -709,14 +709,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: FWHM map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -830,7 +830,7 @@
+ plFree2dGrid(fwhm, nsnap2, nsnap2);
+ }
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -941,14 +941,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: ellipticity map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1062,7 +1062,7 @@
+ plFree2dGrid(ellip, nsnap2, nsnap2);
+ }
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1159,14 +1159,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: map of Moffat fit residuals", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1278,7 +1278,7 @@
+ plFree2dGrid(resi, nsnap2, nsnap2);
+ }
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1378,14 +1378,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: PSF asymmetry map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1497,7 +1497,7 @@
+ plFree2dGrid(resi, nsnap2, nsnap2);
+ }
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1592,14 +1592,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: source count map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1666,7 +1666,7 @@
+ clevel, CPLOT_NSHADES, 1, 0, 0, plfill, 0, distort_map, wcsptr);
+ plFree2dGrid(count, nsnap2, nsnap2);
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1751,14 +1751,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: source count fraction map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1826,7 +1826,7 @@
+ clevel, CPLOT_NSHADES, 1, 0, 0, plfill, 0, distort_map, wcsptr);
+ plFree2dGrid(count, nsnap2, nsnap2);
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -1911,14 +1911,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: #gx#u2#d/d.o.f. map", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -1985,7 +1985,7 @@
+ clevel, CPLOT_NSHADES, 1, 0, 0, plfill, 0, distort_map, wcsptr);
+ plFree2dGrid(count, nsnap2, nsnap2);
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
+@@ -2070,14 +2070,14 @@
+ ymin = 0.5;
+ ymax = 100.5;
+ lwid = plotaaflag? ((CPLOT_AAFAC+1)/2) : 1;
+- plwid(lwid);
++ plwidth((double)lwid);
+ plfont(2);
+ plcol0(15);
+ plenv((PLFLT)xmin, (PLFLT)xmax, (PLFLT)ymin, (PLFLT)ymax, 1, -1);
+ sprintf(str, "#uField %.24s: map of residuals", field->rtcatname);
+ plschr(0.0, 1.0);
+ pllab("","", str);
+- plwid(0);
++ plwidth(0.0);
+ plcol0(7);
+ cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax);
+
+@@ -2144,7 +2144,7 @@
+ clevel, CPLOT_NSHADES, 1, 0, 0, plfill, 0, distort_map, wcsptr);
+ plFree2dGrid(count, nsnap2, nsnap2);
+ plcol0(7);
+- plwid(lwid);
++ plwidth((double)lwid);
+ cplot_drawbounds(wcs, wcsout);
+ }
+
diff --git a/sci-astronomy/psfex/files/psfex-3.17.1-sigbus.patch b/sci-astronomy/psfex/files/psfex-3.17.1-sigbus.patch
new file mode 100644
index 000000000000..2796f63884e3
--- /dev/null
+++ b/sci-astronomy/psfex/files/psfex-3.17.1-sigbus.patch
@@ -0,0 +1,26 @@
+Author: Justin Pryzby <justinpryzby@users.sf.net>
+Description: (guess) Handle the "sigbus" case only if it exists
+--- a/src/fits/fitscleanup.c
++++ b/src/fits/fitscleanup.c
+@@ -164,7 +164,9 @@
+ /* Catch CTRL-Cs */
+ signal(SIGINT, signal_function);
+ /* Catch bus errors */
++#ifdef SIGBUS // TODO: what if it is an enum?
+ signal(SIGBUS, signal_function);
++#endif
+ /* Catch segmentation faults */
+ signal(SIGSEGV, signal_function);
+ /* Catch floating exceptions */
+@@ -195,9 +197,11 @@
+ case SIGINT:
+ fprintf(stderr, "^C\n");
+ exit(-1);
++#ifdef SIGBUS
+ case SIGBUS:
+ fprintf(stderr, "bus error\n");
+ exit(-1);
++#endif
+ case SIGSEGV:
+ fprintf(stderr, "segmentation fault\n");
+ exit(-1);
diff --git a/sci-astronomy/psfex/metadata.xml b/sci-astronomy/psfex/metadata.xml
new file mode 100644
index 000000000000..81a909fb6d5a
--- /dev/null
+++ b/sci-astronomy/psfex/metadata.xml
@@ -0,0 +1,17 @@
+<?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">
+ PSFEx (“PSF Extractor”) extracts models of the Point Spread
+ Function (PSF) from FITS images processed with <pkg>sci-astronomy/sextractor</pkg>, and
+ measures the quality of images. The generated PSF models can be used
+ for model-fitting photometry or morphological analyses.
+</longdescription>
+<use>
+ <flag name="plplot">Build with <pkg>sci-libs/plplot</pkg> to allow diagnostic plots during processing</flag>
+</use>
+</pkgmetadata>
diff --git a/sci-astronomy/psfex/psfex-3.17.1.ebuild b/sci-astronomy/psfex/psfex-3.17.1.ebuild
new file mode 100644
index 000000000000..904072cc38fe
--- /dev/null
+++ b/sci-astronomy/psfex/psfex-3.17.1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="Extracts models of the Point Spread Function from FITS images"
+HOMEPAGE="http://www.astromatic.net/software/psfex"
+SRC_URI="http://www.astromatic.net/download/${PN}/${P}.tar.gz"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="doc threads plplot"
+
+RDEPEND="
+ sci-libs/atlas:0[lapack,threads=]
+ sci-libs/fftw:3.0
+ plplot? ( sci-libs/plplot:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}/${P}-have-mmap.patch"
+ "${FILESDIR}/${P}-plplot510.patch"
+ "${FILESDIR}/${P}-sigbus.patch"
+)
+
+src_prepare() {
+ default
+ local mycblas=atlcblas myclapack=atlclapack
+ if use threads; then
+ [[ -e ${EPREFIX}/usr/$(get_libdir)/libptcblas.so ]] && \
+ mycblas=ptcblas
+ [[ -e ${EPREFIX}/usr/$(get_libdir)/libptclapack.so ]] &&
+ myclapack=ptclapack
+ fi
+ # fix the configure and not the acx_atlas.m4. the eautoreconf will
+ # produce a configure giving a wrong install Makefile target (to fix)
+ sed -e "s/-lcblas/-l${mycblas}/g" \
+ -e "s/AC_CHECK_LIB(cblas/AC_CHECK_LIB(${mycblas}/g" \
+ -e "s/-llapack/-l${myclapack}/g" \
+ -e "s/\(lapack_lib=\).*/\1${myclapack}/g" \
+ -e "s/AC_CHECK_LIB(lapack/AC_CHECK_LIB(${myclapack}/g" \
+ -i acx_atlas.m4 || die
+
+ # fix for newer plplot
+ sed -e 's/plplotd/plplot/g' -i acx_plplot.m4 || die
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --with-atlas-incdir="${EPREFIX}/usr/include/atlas" \
+ $(use_enable plplot) \
+ $(use_enable threads)
+}
+
+src_install () {
+ default
+ use doc && dodoc doc/*
+}