commit: 732d5c38a89687a8c064fb5e5033b911254412c4
Author: Sébastien Fabbro gentoo org>
AuthorDate: Mon Mar 7 21:00:43 2016 +
Commit: Sebastien Fabbro gentoo org>
CommitDate: Mon Mar 7 21:02:24 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=732d5c38
sci-astronomy/psfex: initial import
Package-Manager: portage-2.2.27
sci-astronomy/psfex/Manifest | 1 +
.../psfex/files/psfex-3.17.1-have-mmap.patch | 55 +
.../psfex/files/psfex-3.17.1-plplot510.patch | 221 +
.../psfex/files/psfex-3.17.1-sigbus.patch | 26 +++
sci-astronomy/psfex/metadata.xml | 17 ++
sci-astronomy/psfex/psfex-3.17.1.ebuild| 64 ++
6 files changed, 384 insertions(+)
diff --git a/sci-astronomy/psfex/Manifest b/sci-astronomy/psfex/Manifest
new file mode 100644
index 000..e739f7b
--- /dev/null
+++ b/sci-astronomy/psfex/Manifest
@@ -0,0 +1 @@
+DIST psfex-3.17.1.tar.gz 2366370 SHA256
53f1b449ab7da7e6e0a989c41b82885f52c8f08270ceb4378bb1ec7ef754af89 SHA512
eb562372dd75593a111c23698b0c00ce050547051803a741ac771ca346d13a0de1e478b055581619a9fa2bf6fa374915ca685cfcf1c4162271b6aa44303e6e58
WHIRLPOOL
3245b2b8c5a85e5f0a88b0c11aff07ce10ced0682890b786d0b092285d46fedf72bf15e87dd3ef6f6296527bc632e12c5162fa0b3b660b5b8bff0b30f38510c9
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 000..1b65650
--- /dev/null
+++ b/sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch
@@ -0,0 +1,55 @@
+Author: Justin Pryzby
+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))
+ {
++#ifdefHAVE_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 000..4dd5805
--- /dev/null
+++ b/sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch
@@ -0,0 +1,221 @@
+Author: Ole Streicher
+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 +