From 9e007b2d602688f4810320bfaa8fe2e2c80f4f5c Mon Sep 17 00:00:00 2001 From: Sergio Pascual Date: Feb 01 2024 20:04:39 +0000 Subject: Fix FTBS in F35 --- diff --git a/.gitignore b/.gitignore index c8775ab..c66dd38 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /psfex-3.9.1.tar.gz /psfex-3.17.0.tar.gz /psfex-3.17.1.tar.gz +/psfex-3.24.1.tar.gz diff --git a/psfex-3.17.1-gcc10.patch b/psfex-3.17.1-gcc10.patch deleted file mode 100644 index 297d36a..0000000 --- a/psfex-3.17.1-gcc10.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -up psfex-3.17.1/src/catout.c.me psfex-3.17.1/src/catout.c ---- psfex-3.17.1/src/catout.c.me 2020-02-19 11:21:09.797040286 +0100 -+++ psfex-3.17.1/src/catout.c 2020-02-19 11:21:26.666323002 +0100 -@@ -44,6 +44,8 @@ - #include "context.h" - #include "sample.h" - -+char gstr[MAXCHAR]; -+ - /****** init_outcat ************************************************* - PROTO outcatstruct *init_outcat(char *filename, int ncontext) - PURPOSE Initialize a SExtractor-like catalog containing detections used by PSFex -diff -up psfex-3.17.1/src/define.h.me psfex-3.17.1/src/define.h -diff -up psfex-3.17.1/src/diagnostic.c.me psfex-3.17.1/src/diagnostic.c ---- psfex-3.17.1/src/diagnostic.c.me 2020-02-19 10:15:20.606744076 +0100 -+++ psfex-3.17.1/src/diagnostic.c 2020-02-19 10:16:29.828884183 +0100 -@@ -66,6 +66,7 @@ int pthread_overflag, pthread_n, pthrea - #endif - - double lm_opts[] = {1.0e-2, 1.0e-12, 1.0e-12, 1.0e-12, 1.0e-4}; -+float moffat_parammin[PSF_DIAGNPARAM],moffat_parammax[PSF_DIAGNPARAM]; - - /****** psf_wcsdiagnostic ***************************************************** - PROTO void psf_wcsdiagnostic(psfstruct *psf, wcsstruct *wcs) -diff -up psfex-3.17.1/src/diagnostic.h.me psfex-3.17.1/src/diagnostic.h ---- psfex-3.17.1/src/diagnostic.h.me 2020-02-19 10:13:48.509261744 +0100 -+++ psfex-3.17.1/src/diagnostic.h 2020-02-19 10:14:10.082605929 +0100 -@@ -49,7 +49,7 @@ - - /*----------------------------- Global variables ---------------------------*/ - --float moffat_parammin[PSF_DIAGNPARAM],moffat_parammax[PSF_DIAGNPARAM]; -+extern float moffat_parammin[PSF_DIAGNPARAM],moffat_parammax[PSF_DIAGNPARAM]; - - /*---------------------------------- protos --------------------------------*/ - extern void psf_boundtounbound(float *param, double *dparam), -diff -up psfex-3.17.1/src/fits/fitsbody.c.me psfex-3.17.1/src/fits/fitsbody.c ---- psfex-3.17.1/src/fits/fitsbody.c.me 2020-02-19 10:17:06.647490604 +0100 -+++ psfex-3.17.1/src/fits/fitsbody.c 2020-02-19 10:23:07.898440533 +0100 -@@ -51,6 +51,8 @@ int body_vmnumber; - - char body_swapdirname[MAXCHARS] = BODY_DEFSWAPDIR; - -+int bswapflag; -+ - /******* alloc_body *********************************************************** - PROTO PIXTYPE *alloc_body(tabstruct *tab, - void (*func)(PIXTYPE *ptr, int npix)) -diff -up psfex-3.17.1/src/fits/fitscat.h.me psfex-3.17.1/src/fits/fitscat.h ---- psfex-3.17.1/src/fits/fitscat.h.me 2020-02-19 10:11:34.811128717 +0100 -+++ psfex-3.17.1/src/fits/fitscat.h 2020-02-19 10:11:49.072356239 +0100 -@@ -333,6 +333,6 @@ extern void error(int code, const char - warning(char *msg1, char *msg2); - - --int bswapflag; -+extern int bswapflag; - - #endif -diff -up psfex-3.17.1/src/fits/fitscat_defs.h.me psfex-3.17.1/src/fits/fitscat_defs.h ---- psfex-3.17.1/src/fits/fitscat_defs.h.me 2020-02-19 10:17:53.208257476 +0100 -+++ psfex-3.17.1/src/fits/fitscat_defs.h 2020-02-19 11:25:52.494771717 +0100 -@@ -86,7 +86,7 @@ typedef unsigned char BYTE; /* a byte - typedef int LONG; /* for DEC-Alpha... */ - - /*----------------------------- Internal constants --------------------------*/ --char gstr[MAXCHAR]; -+extern char gstr[MAXCHAR]; - - /*----------------------------- External constants --------------------------*/ - -diff -up psfex-3.17.1/src/fitswcs.c.me psfex-3.17.1/src/fitswcs.c -diff -up psfex-3.17.1/src/globals.h.me psfex-3.17.1/src/globals.h ---- psfex-3.17.1/src/globals.h.me 2020-02-19 10:35:16.326252445 +0100 -+++ psfex-3.17.1/src/globals.h 2020-02-19 11:27:25.695328510 +0100 -@@ -37,7 +37,7 @@ - #endif - - /*----------------------- miscellaneous variables ---------------------------*/ --char gstr[MAXCHAR]; -+extern char gstr[MAXCHAR]; - - /*------------------------------- functions ---------------------------------*/ - extern void makeit(void); diff --git a/psfex-c99.patch b/psfex-c99.patch deleted file mode 100644 index 13f5cce..0000000 --- a/psfex-c99.patch +++ /dev/null @@ -1,27 +0,0 @@ -Include "xml.h" for the write_xml_header, write_xml_meta functions. -This avoids implicit function declarations and build failures with -future compilers. - -Fixed upstream as part of: - -commit c991bb2ab46c0c02b917954decb21136576b289e -Author: Emmanuel Bertin -Date: Tue Jul 12 22:51:09 2016 +0200 - - Fixed regression in sample.c. - Added missing include in catout.c. - Updated list of m4 files and filenames in root Makefile.am. - - -diff --git a/src/catout.c b/src/catout.c -index cfbd5e1353eb817b..e8fd98afa0a75f2c 100644 ---- a/src/catout.c -+++ b/src/catout.c -@@ -43,6 +43,7 @@ - #include "prefs.h" - #include "context.h" - #include "sample.h" -+#include "xml.h" - - char gstr[MAXCHAR]; - diff --git a/psfex-format-sec.patch b/psfex-format-sec.patch deleted file mode 100644 index 465861d..0000000 --- a/psfex-format-sec.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -ur psfex-3.9.1/src/field.c psfex-3.9.1.format/src/field.c ---- psfex-3.9.1/src/field.c 2010-11-03 23:08:09.000000000 +0100 -+++ psfex-3.9.1.format/src/field.c 2013-12-05 11:51:29.426512559 +0100 -@@ -394,7 +394,7 @@ - - cat = new_cat(1); - init_cat(cat); -- sprintf(cat->filename, filename); -+ sprintf(cat->filename, "%s", filename); - if (open_cat(cat, WRITE_ONLY) != RETURN_OK) - error(EXIT_FAILURE, "*Error*: cannot open for writing ", cat->filename); - /* Write primary HDU */ -diff -ur psfex-3.9.1/src/xml.c psfex-3.9.1.format/src/xml.c ---- psfex-3.9.1/src/xml.c 2010-10-25 20:00:03.000000000 +0200 -+++ psfex-3.9.1.format/src/xml.c 2013-12-05 11:56:57.887051460 +0100 -@@ -1201,7 +1201,7 @@ - name, ucd); - break; - case P_STRING: -- sprintf(value, (char *)key[i].ptr); -+ sprintf(value, "%s", (char *)key[i].ptr); - fprintf(file, " \n", - name, ucd, value); -@@ -1210,13 +1210,13 @@ - n = *(key[i].nlistptr); - if (n) - { -- sprintf(value, ((char **)key[i].ptr)[0]); -+ sprintf(value, "%s", ((char **)key[i].ptr)[0]); - fprintf(file, " \n"); -@@ -1227,7 +1227,7 @@ - name, ucd); - break; - case P_KEY: -- sprintf(value, key[i].keylist[*((int *)key[i].ptr)]); -+ sprintf(value, "%s", key[i].keylist[*((int *)key[i].ptr)]); - fprintf(file, " \n", - name, ucd, value); -@@ -1236,13 +1236,13 @@ - n = *(key[i].nlistptr); - if (n) - { -- sprintf(value, key[i].keylist[((int *)key[i].ptr)[0]]); -+ sprintf(value, "%s", key[i].keylist[((int *)key[i].ptr)[0]]); - fprintf(file, " \n"); diff --git a/psfex-plplot.patch b/psfex-plplot.patch deleted file mode 100644 index d5ead12..0000000 --- a/psfex-plplot.patch +++ /dev/null @@ -1,220 +0,0 @@ -diff -ur psfex-3.17.0/src/cplot.c psfex-3.17.0.plplt/src/cplot.c ---- psfex-3.17.0/src/cplot.c 2012-06-17 22:46:27.000000000 +0200 -+++ psfex-3.17.0.plplt/src/cplot.c 2014-03-28 13:41:46.261925316 +0100 -@@ -527,7 +527,7 @@ - - /* Draw meridians */ - plschr(0.0, 0.33); -- plwid(0); -+ plwidth(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(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); - plcol0(7); - cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax); - -@@ -830,7 +830,7 @@ - plFree2dGrid(fwhm, nsnap2, nsnap2); - } - plcol0(7); -- plwid(lwid); -+ plwidth(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(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); - plcol0(7); - cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax); - -@@ -1062,7 +1062,7 @@ - plFree2dGrid(ellip, nsnap2, nsnap2); - } - plcol0(7); -- plwid(lwid); -+ plwidth(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(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); - plcol0(7); - cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax); - -@@ -1278,7 +1278,7 @@ - plFree2dGrid(resi, nsnap2, nsnap2); - } - plcol0(7); -- plwid(lwid); -+ plwidth(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(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); - plcol0(7); - cplot_drawloccoordgrid(wcsout, xmin, xmax, ymin, ymax); - -@@ -1497,7 +1497,7 @@ - plFree2dGrid(resi, nsnap2, nsnap2); - } - plcol0(7); -- plwid(lwid); -+ plwidth(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(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); - 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(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(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); - 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(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(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); - 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(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(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); - 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(lwid); - cplot_drawbounds(wcs, wcsout); - } - diff --git a/psfex.spec b/psfex.spec index 51ac811..9760091 100644 --- a/psfex.spec +++ b/psfex.spec @@ -1,20 +1,21 @@ Name: psfex -Version: 3.17.1 -Release: 31%{?dist} +Version: 3.24.1 +Release: 1%{?dist} Summary: Model the Point Spread Function from FITS images -License: GPLv3+ +License: GPL-3.0-only URL: http://astromatic.iap.fr/software/%{name} -Source0: http://www.astromatic.net/download/%{name}/%{name}-%{version}.tar.gz -# Change plwid to plwidth -Patch0: psfex-plplot.patch -Patch1: psfex-3.17.1-gcc10.patch -Patch2: psfex-c99.patch +Source0: https://github.com/astromatic/psfex/archive/%{version}/%{name}-%{version}.tar.gz + BuildRequires: make BuildRequires: gcc -BuildRequires: fftw-devel >= 3.1 -BuildRequires: atlas-devel >= 3.6.0 -BuildRequires: plplot-devel >= 5.3.1 +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool + +BuildRequires: fftw-devel +BuildRequires: atlas-devel +BuildRequires: plplot-devel %description PSFEx (“PSF Extractor”) extracts models of the Point Spread Function (PSF) @@ -23,16 +24,10 @@ The generated PSF models can be used for model-fitting photometry or morphological analyses. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -# New atlas libs -sed -i -e '/LIBS*=.*atlas/s,=.*,="-L%{_libdir}/atlas -lsatlas",' configure -# New plplot lib name -sed -i -e 's/plplotd/plplot/g' configure +%autosetup %build +./autogen.sh %configure --enable-plplot=yes %make_build @@ -40,14 +35,18 @@ sed -i -e 's/plplotd/plplot/g' configure %make_install %files -%license COPYRIGHT LICENSE -%doc AUTHORS HISTORY README THANKS doc/psfex.pdf +%license LICENSE +%doc AUTHORS HISTORY README.md THANKS %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* -%exclude %{_mandir}/manx/* +%{_mandir}/manx/%{name}.x* %{_datadir}/%{name}/ %changelog +* Thu Feb 01 2024 Sergio Pascual - 3.24.1-1 +- New upstream source +- Using SPDX license name + * Fri Jan 26 2024 Fedora Release Engineering - 3.17.1-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 7d2c91b..a82487a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8256c8117e8f270cf05f44fa7774ce1d psfex-3.17.1.tar.gz +SHA512 (psfex-3.24.1.tar.gz) = b6d0ae9060b2f39213e51595a83eeca058ba704a1d0b00506444c563e058f4a71de5e832a9339c8ebbe52a79c667c62d9b432211dd5fb3eb103c7872b6da71fc