diff options
author | Sébastien Fabbro <bicatali@gentoo.org> | 2016-03-07 21:00:43 +0000 |
---|---|---|
committer | Sébastien Fabbro <bicatali@gentoo.org> | 2016-03-07 21:02:24 +0000 |
commit | 732d5c38a89687a8c064fb5e5033b911254412c4 (patch) | |
tree | fcf9ed551a93cbd4f46a4249df86e9af7fdb3c07 /sci-astronomy/psfex/files | |
parent | sci-astronomy/scamp: initial import (diff) | |
download | gentoo-732d5c38a89687a8c064fb5e5033b911254412c4.tar.gz gentoo-732d5c38a89687a8c064fb5e5033b911254412c4.tar.bz2 gentoo-732d5c38a89687a8c064fb5e5033b911254412c4.zip |
sci-astronomy/psfex: initial import
Package-Manager: portage-2.2.27
Diffstat (limited to 'sci-astronomy/psfex/files')
-rw-r--r-- | sci-astronomy/psfex/files/psfex-3.17.1-have-mmap.patch | 55 | ||||
-rw-r--r-- | sci-astronomy/psfex/files/psfex-3.17.1-plplot510.patch | 221 | ||||
-rw-r--r-- | sci-astronomy/psfex/files/psfex-3.17.1-sigbus.patch | 26 |
3 files changed, 302 insertions, 0 deletions
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); |