[gentoo-commits] repo/gentoo:master commit in: sci-astronomy/psfex/

2021-03-03 Thread Sam James
commit: 29021980e0fdcb21cc7cfad2b243e90e98851965
Author: Sam James  gentoo  org>
AuthorDate: Thu Mar  4 01:18:16 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Mar  4 01:18:16 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29021980

sci-astronomy/psfex: add gcc 10 workaround

Closes: https://bugs.gentoo.org/724588
Signed-off-by: Sam James  gentoo.org>

 sci-astronomy/psfex/psfex-3.17.1.ebuild | 22 ++
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/sci-astronomy/psfex/psfex-3.17.1.ebuild 
b/sci-astronomy/psfex/psfex-3.17.1.ebuild
index a6635393b98..d5dbf1306d4 100644
--- a/sci-astronomy/psfex/psfex-3.17.1.ebuild
+++ b/sci-astronomy/psfex/psfex-3.17.1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
-inherit autotools
+inherit autotools flag-o-matic
 
 DESCRIPTION="Extracts models of the Point Spread Function from FITS images"
 HOMEPAGE="http://www.astromatic.net/software/psfex";
@@ -14,12 +14,12 @@ LICENSE="GPL-3"
 SLOT="0"
 IUSE="doc threads plplot"
 
+BDEPEND="virtual/pkgconfig"
 RDEPEND="
sci-libs/atlas:0[lapack,threads=]
sci-libs/fftw:3.0
plplot? ( sci-libs/plplot:= )"
-DEPEND="${RDEPEND}
-   virtual/pkgconfig"
+DEPEND="${RDEPEND}"
 
 PATCHES=(
"${FILESDIR}/${P}-have-mmap.patch"
@@ -29,13 +29,16 @@ PATCHES=(
 
 src_prepare() {
default
-   local mycblas=atlcblas  myclapack=atlclapack
+
+   local mycblas=atlcblas myclapack=atlclapack
+
if use threads; then
-   [[ -e ${EPREFIX}/usr/$(get_libdir)/libptcblas.so ]] && \
+   [[ -e "${EPREFIX}"/usr/$(get_libdir)/libptcblas.so ]] && \
mycblas=ptcblas
-   [[ -e ${EPREFIX}/usr/$(get_libdir)/libptclapack.so ]] &&
+   [[ -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" \
@@ -51,6 +54,9 @@ src_prepare() {
 }
 
 src_configure() {
+   # bug #724588
+   append-cflags "-fcommon"
+
econf \
--with-atlas-incdir="${EPREFIX}/usr/include/atlas" \
$(use_enable plplot) \



[gentoo-commits] repo/gentoo:master commit in: sci-astronomy/psfex/

2016-04-19 Thread Ian Stakenvicius
commit: cff5247e3c470df757e646f064b4699eb701a70b
Author: Ian Stakenvicius  gentoo  org>
AuthorDate: Tue Apr 19 20:37:14 2016 +
Commit: Ian Stakenvicius  gentoo  org>
CommitDate: Tue Apr 19 20:37:14 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cff5247e

fix  reference in metadata.xml

Package-Manager: portage-2.2.26

 sci-astronomy/psfex/metadata.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-astronomy/psfex/metadata.xml b/sci-astronomy/psfex/metadata.xml
index 45b00a7..81a909f 100644
--- a/sci-astronomy/psfex/metadata.xml
+++ b/sci-astronomy/psfex/metadata.xml
@@ -7,7 +7,7 @@
 
 
   PSFEx  (“PSF Extractor”) extracts models of the Point Spread
-  Function (PSF) from FITS images processed with 
sci-libs/sextractor, and
+  Function (PSF) from FITS images processed with 
sci-astronomy/sextractor, and
   measures the quality of images. The generated PSF models can be used
   for model-fitting photometry or morphological analyses.
 



[gentoo-commits] repo/gentoo:master commit in: sci-astronomy/psfex/files/, sci-astronomy/psfex/

2016-03-07 Thread Sebastien Fabbro
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 +