diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index f6e8ae4..0000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -wcstools-3.7.0.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a79df3d --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +wcstools-3.8.1.tar.gz +/wcstools-3.9.4.tar.gz +/wcstools-3.9.5.tar.gz +/wcstools-3.9.6.tar.gz +/wcstools-3.9.7.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index 3c081ae..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: wcstools -# $Id$ -NAME := wcstools -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/changelog b/changelog new file mode 100644 index 0000000..cd8e188 --- /dev/null +++ b/changelog @@ -0,0 +1,128 @@ +* Sat Jan 22 2022 Fedora Release Engineering - 3.9.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.9.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jan 27 2021 Fedora Release Engineering - 3.9.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 3.9.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat Jun 27 2020 Mattia Verga - 3.9.6-1 +- Update to 3.9.6 + +* Fri Jan 31 2020 Fedora Release Engineering - 3.9.5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sat Jul 27 2019 Fedora Release Engineering - 3.9.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 3.9.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 3.9.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sat Jun 30 2018 Mattia Verga - 3.9.5-7 +- Remove ldconfig scriptlets + +* Mon Feb 19 2018 Mattia Verga - 3.9.5-6 +- Add gcc to BuildRequires + +* Fri Feb 09 2018 Fedora Release Engineering - 3.9.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 3.9.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 3.9.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat May 20 2017 Mattia Verga - 3.9.5-2 +- Rename remap to wcsremap. See #1450190 + +* Fri Apr 14 2017 Mattia Verga - 3.9.5-1 +- Update to 3.9.5 + +* Sat Feb 11 2017 Fedora Release Engineering - 3.9.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sun Jan 15 2017 Mattia Verga - 3.9.4-1 +- Update to 3.9.4 + +* Mon Feb 07 2011 Fedora Release Engineering - 3.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Feb 03 2010 Sergio Pascual 3.8.1-1 +- New upstream source +- Patch to fix bz #559863 from upstream + +* Mon Jul 27 2009 Fedora Release Engineering - 3.7.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 3.7.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Feb 19 2009 Sergio Pascual 3.7.0-6 +- Reverting soname change + +* Sat Feb 14 2009 Sergio Pascual 3.7.0-5 +- Libray and headers renamed as wcstools + +* Wed Oct 01 2008 Sergio Pascual 3.7.0-4 +- Fails to build from source bz#465061 + +* Wed Oct 01 2008 Sergio Pascual 3.7.0-3 +- Fails to build from source bz#465061 + +* Tue Feb 19 2008 Fedora Release Engineering - 3.7.0-2 +- Autorebuild for GCC 4.3 + +* Wed Sep 05 2007 Sergio Pascual 3.7.0-1 +- New upstream source 3.7.0 + +* Mon Aug 27 2007 Sergio Pascual 3.6.8-2.1 +- Rebuild for Fedora 8 to get the build-id + +* Tue Mar 20 2007 Sergio Pascual 3.6.8-2 +- Fix for bug #232413 + +* Mon Mar 19 2007 Sergio Pascual 3.6.8-1 +- New upstream source 3.6.8 +- Added pacthes to remove warnings during the compilation + +* Mon Feb 26 2007 Sergio Pascual 3.6.7-1 +- New upstream source 3.6.7 + +* Wed Nov 15 2006 Sergio Pascual 3.6.6-1 +- New upstream source 3.6.6 + +* Tue Oct 10 2006 Sergio Pascual 3.6.6-0.1.beta +- New upstream source 3.6.6beta + +* Mon Sep 4 2006 Sergio Pascual 3.6.5-3 +- Rebuild. + +* Wed Aug 30 2006 Sergio Pascual 3.6.5-2 +- Corrected bug in edhead (patch2) (bug #204642). + +* Wed Jun 21 2006 Sergio Pascual 3.6.5-1 +- New upstream source 3.6.5 + +* Tue Jun 13 2006 Sergio Pascual 3.6.4-3 +- Patched overflows in catutil.c and getdate.c +- Patched incompatible pointer in binread.c + +* Mon Jun 12 2006 Sergio Pascual 3.6.4-2 +- Patched edhead. +- libwcs provides libwcs.so.3 +- libwcs into System Environment/Libraries group +- Makefile uses ${RPM_OPT_FLAGS} and $(CC) + +* Fri Jun 09 2006 Sergio Pascual 3.6.4-1 +- Removed not needed ldconfig in wcstools and libwcs-devel. + +* Wed Mar 08 2006 Sergio Pascual 3.6.3-1 +- Initial RPM file. diff --git a/fix_gcc15-c++23.patch b/fix_gcc15-c++23.patch new file mode 100644 index 0000000..9ee1bdf --- /dev/null +++ b/fix_gcc15-c++23.patch @@ -0,0 +1,54 @@ +diff -U 3 -dHrN a/libwcs/dateutil.c b/libwcs/dateutil.c +--- a/libwcs/dateutil.c 2021-09-15 23:45:06.000000000 +0200 ++++ b/libwcs/dateutil.c 2025-01-24 09:38:40.402443820 +0100 +@@ -314,6 +314,8 @@ + * Return Mod of floating point number + */ + ++#define _GNU_SOURCE ++ + #include + #include + #include +diff -U 3 -dHrN a/libwcs/imgetwcs.c b/libwcs/imgetwcs.c +--- a/libwcs/imgetwcs.c 2016-06-24 21:23:06.000000000 +0200 ++++ b/libwcs/imgetwcs.c 2025-01-24 09:40:12.971028438 +0100 +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include "wcs.h" + #include "lwcs.h" +diff -U 3 -dHrN a/libwcs/webread.c b/libwcs/webread.c +--- a/libwcs/webread.c 2022-02-04 22:08:59.000000000 +0100 ++++ b/libwcs/webread.c 2025-01-24 09:37:25.750042386 +0100 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + #include + #include "wcs.h" +@@ -976,7 +977,7 @@ + memset(adrinet, 0, sizeof(struct sockaddr_in)); + adrinet->sin_family = AF_INET; + adrinet->sin_port = htons(port); +- memcpy(&adrinet->sin_addr, hp->h_addr, hp->h_length); ++ memcpy(&adrinet->sin_addr, hp->h_addr_list[0], hp->h_length); + + return type; + } +diff -U 3 -dHrN a/Makefile b/Makefile +--- a/Makefile 2025-01-22 08:49:29.246196532 +0100 ++++ b/Makefile 2025-01-24 09:31:30.842906462 +0100 +@@ -1,4 +1,7 @@ + CC= gcc ++ ++CFLAGS += -std=c99 -D_XOPEN_SOURCE=500 ++ + LIBWCS = libwcs/libwcstools.so + LIBS = -L libwcs -lwcstools -lm + #LIBS = $(LIBWCS) -lm -lnsl -lsocket diff --git a/sources b/sources index 808ea30..3c275ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bda2748ab4a60e196e3621cc7fa47eda wcstools-3.7.0.tar.gz +SHA512 (wcstools-3.9.7.tar.gz) = a785b87eb8715e6408b463b42f521eaa7b22096346b83b7e76dc068954dd299ef892ac990326b46fef349d9581416dc34d7b1df0fcf41096a4f2c8bf2ed2677b diff --git a/wcstools-3.9.6-rename-shlib.patch b/wcstools-3.9.6-rename-shlib.patch new file mode 100644 index 0000000..c4995ed --- /dev/null +++ b/wcstools-3.9.6-rename-shlib.patch @@ -0,0 +1,307 @@ +diff -U 3 -dHrN -- a/libwcs/Makefile b/libwcs/Makefile +--- a/libwcs/Makefile 2011-09-15 21:05:05.000000000 +0200 ++++ b/libwcs/Makefile 2020-06-27 18:40:25.837417862 +0200 +@@ -1,4 +1,4 @@ +-CFLAGS= -g -D_FILE_OFFSET_BITS=64 ++CFLAGS+= -fPIC + CC= cc + + OBJS = imsetwcs.o imgetwcs.o matchstar.o findstar.o daoread.o wcscon.o \ +@@ -11,10 +11,17 @@ + sortstar.o platefit.o iget.o fileutil.o \ + wcslib.o lin.o cel.o proj.o sph.o wcstrig.o distort.o poly.o + +-libwcs.a: $(OBJS) ++all: libwcstools.so.1.0.0 libwcstools.a ++ ++libwcstools.a: $(OBJS) + ar rv $@ $? + ranlib $@ + ++libwcstools.so.1.0.0: $(OBJS) ++ $(CC) $(LDFLAGS) -shared -o $@ -Wl,-soname,libwcstools.so.1 $? -lm ++ ln -s libwcstools.so.1.0.0 libwcstools.so.1 ++ ln -s libwcstools.so.1.0.0 libwcstools.so ++ + actread.o: fitsfile.h wcscat.h wcs.h fitshead.h wcslib.h + binread.o: wcscat.h wcs.h fitshead.h wcslib.h + ctgread.o: wcscat.h wcs.h fitshead.h wcslib.h +@@ -67,4 +74,4 @@ + worldpos.o: wcs.h fitshead.h wcslib.h + + clean: +- rm -f *.a *.o ++ rm -f *.a *.o *.so *.so.* +diff -U 3 -dHrN -- a/Makefile b/Makefile +--- a/Makefile 2018-11-06 03:55:26.000000000 +0100 ++++ b/Makefile 2020-06-27 18:32:28.022430111 +0200 +@@ -1,12 +1,11 @@ +-CFLAGS= -g -D_FILE_OFFSET_BITS=64 + CC= cc +-LIBWCS = libwcs/libwcs.a +-LIBS = $(LIBWCS) -lm ++LIBWCS = libwcs/libwcstools.so ++LIBS = -L libwcs -lwcstools -lm + #LIBS = $(LIBWCS) -lm -lnsl -lsocket + BIN = bin + .PRECIOUS: ${LIBWCS} ${LIBNED} + .c.o: +- $(CC) -c $(CFLAGS) $(DEFS) $< ++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) $< + + all: cphead delwcs delhead edhead fixpix gethead i2f imcat imhead immatch \ + imrot imsize imstar imwcs scat sethead addpix getpix setpix sky2xy \ +@@ -16,190 +15,190 @@ + isfile simpos bincat + + addpix: addpix.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/addpix addpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/addpix addpix.c $(LIBS) + + bincat: bincat.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/bincat bincat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/bincat bincat.c $(LIBS) + + char2sp: char2sp.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/char2sp char2sp.c $(LIBWCS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/char2sp char2sp.c $(LIBWCS) + + conpix: conpix.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/conpix conpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/conpix conpix.c $(LIBS) + + cphead: cphead.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/cphead cphead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/cphead cphead.c $(LIBS) + + crlf: crlf.c +- $(CC) $(CFLAGS) -o $(BIN)/crlf crlf.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/crlf crlf.c + + delwcs: delwcs.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/delwcs delwcs.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/delwcs delwcs.c $(LIBS) + + delhead: delhead.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/delhead delhead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/delhead delhead.c $(LIBS) + + edhead: edhead.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/edhead edhead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/edhead edhead.c $(LIBS) + + filename: filename.c +- $(CC) $(CFLAGS) -o $(BIN)/filename filename.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/filename filename.c + + filedir: filedir.c +- $(CC) $(CFLAGS) -o $(BIN)/filedir filedir.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/filedir filedir.c + + fileroot: fileroot.c +- $(CC) $(CFLAGS) -o $(BIN)/fileroot fileroot.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/fileroot fileroot.c + + filext: filext.c +- $(CC) $(CFLAGS) -o $(BIN)/filext filext.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/filext filext.c + + fixpix: fixpix.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/fixpix fixpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/fixpix fixpix.c $(LIBS) + + getcol: getcol.c $(LIBWCS) libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/getcol getcol.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/getcol getcol.c $(LIBS) + + getdate: getdate.c $(LIBWCS) libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/getdate getdate.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/getdate getdate.c $(LIBS) + + gethead: gethead.c $(LIBWCS) libwcs/wcs.h libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/gethead gethead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/gethead gethead.c $(LIBS) + + getfits: getfits.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/getfits getfits.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/getfits getfits.c $(LIBS) + + getpix: getpix.c $(LIBWCS) libwcs/wcs.h libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/getpix getpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/getpix getpix.c $(LIBS) + + gettab: gettab.c $(LIBWCS) libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/gettab gettab.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/gettab gettab.c $(LIBS) + + httpget: httpget.c $(LIBWCS) libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/httpget httpget.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/httpget httpget.c $(LIBS) + + htmlsp: htmlsp.c +- $(CC) $(CFLAGS) -o $(BIN)/htmlsp htmlsp.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/htmlsp htmlsp.c + + i2f: i2f.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/i2f i2f.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/i2f i2f.c $(LIBS) + + imcat: imcat.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/imcat imcat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imcat imcat.c $(LIBS) + + imfill: imfill.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imfill imfill.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imfill imfill.c $(LIBS) + + imresize: imresize.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imresize imresize.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imresize imresize.c $(LIBS) + + imsmooth: imsmooth.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imsmooth imsmooth.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imsmooth imsmooth.c $(LIBS) + + imhead: imhead.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/imhead imhead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imhead imhead.c $(LIBS) + + imrot: imrot.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imrot imrot.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imrot imrot.c $(LIBS) + + imsize: imsize.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/imsize imsize.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imsize imsize.c $(LIBS) + + imstack: imstack.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imstack imstack.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imstack imstack.c $(LIBS) + + imextract: imextract.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/imextract imextract.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imextract imextract.c $(LIBS) + + imstar: imstar.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h libwcs/lwcs.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/imstar imstar.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imstar imstar.c $(LIBS) + + isfile: isfile.c $(LIBWCS) libwcs/fitshead.h +- $(CC) $(CFLAGS) -o $(BIN)/isfile isfile.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isfile isfile.c $(LIBS) + + isfits: isfits.c $(LIBWCS) libwcs/fitshead.h +- $(CC) $(CFLAGS) -o $(BIN)/isfits isfits.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isfits isfits.c $(LIBS) + + isnum: isnum.c $(LIBWCS) libwcs/fitshead.h +- $(CC) $(CFLAGS) -o $(BIN)/isnum isnum.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isnum isnum.c $(LIBS) + + isimlist: isimlist.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/isimlist isimlist.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isimlist isimlist.c $(LIBS) + + isrange: isrange.c +- $(CC) $(CFLAGS) -o $(BIN)/isrange isrange.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isrange isrange.c + + imwcs: imwcs.c $(LIBWCS) libwcs/fitsfile.h libwcs/lwcs.h +- $(CC) $(CFLAGS) -o $(BIN)/imwcs imwcs.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imwcs imwcs.c $(LIBS) + + immatch: immatch.c $(LIBWCS) libwcs/fitsfile.h libwcs/lwcs.h +- $(CC) $(CFLAGS) -o $(BIN)/immatch immatch.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/immatch immatch.c $(LIBS) + + immwcs: immwcs.c $(LIBWCS) libwcs/fitsfile.h libwcs/lwcs.h +- $(CC) $(CFLAGS) -o $(BIN)/immwcs immwcs.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/immwcs immwcs.c $(LIBS) + + keyhead: keyhead.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/keyhead keyhead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/keyhead keyhead.c $(LIBS) + + matchcat: matchcat.c $(LIBWCS) libwcs/wcscat.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/matchcat matchcat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/matchcat matchcat.c $(LIBS) + + newfits: newfits.c $(LIBWCS) libwcs/fitshead.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/newfits newfits.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/newfits newfits.c $(LIBS) + + remap: remap.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/remap remap.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/remap remap.c $(LIBS) + + scat: scat.c $(LIBWCS) libwcs/wcscat.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/scat scat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/scat scat.c $(LIBS) + + sethead: sethead.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/sethead sethead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/sethead sethead.c $(LIBS) + + setpix: setpix.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/setpix setpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/setpix setpix.c $(LIBS) + + sky2xy: sky2xy.c $(LIBWCS) libwcs/wcs.h libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/sky2xy sky2xy.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/sky2xy sky2xy.c $(LIBS) + + skycoor: skycoor.c $(LIBWCS) libwcs/wcs.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/skycoor skycoor.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/skycoor skycoor.c $(LIBS) + + sp2char: sp2char.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/sp2char sp2char.c $(LIBWCS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/sp2char sp2char.c $(LIBWCS) + + subpix: subpix.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/subpix subpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/subpix subpix.c $(LIBS) + + sumpix: sumpix.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/sumpix sumpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/sumpix sumpix.c $(LIBS) + + wcshead: wcshead.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/wcshead wcshead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/wcshead wcshead.c $(LIBS) + + xy2sky: xy2sky.c $(LIBWCS) libwcs/wcs.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/xy2sky xy2sky.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/xy2sky xy2sky.c $(LIBS) + +-simpos: simpos.c libwcs/libwcs.a +- $(CC) $(CFLAGS) -o $(BIN)/simpos simpos.c $(LIBS) ++simpos: simpos.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/simpos simpos.c $(LIBS) + + gsc2cat: gsc2cat.c $(LIBWCS) +- $(CC) $(CFLAGS) -o $(BIN)/gsc2cat gsc2cat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/gsc2cat gsc2cat.c $(LIBS) + + tmcat: tmcat.c +- $(CC) $(CFLAGS) -o $(BIN)/tmcat tmcat.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/tmcat tmcat.c + + tmcate: tmcate.c +- $(CC) $(CFLAGS) -o $(BIN)/tmcate tmcate.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/tmcate tmcate.c + + $(LIBWCS): libwcs/*.c libwcs/*.h +- cd libwcs; make ++ $(MAKE) CC=$(CC) -C libwcs + + objclean: +- cd libwcs; make clean ++ $(MAKE) -C libwcs clean + + binclean: + rm -f ./bin/* + +-clean: ++clean: objclean binclean + make objclean; make binclean diff --git a/wcstools-3.9.7_rename-binaries.patch b/wcstools-3.9.7_rename-binaries.patch new file mode 100644 index 0000000..f6c947d --- /dev/null +++ b/wcstools-3.9.7_rename-binaries.patch @@ -0,0 +1,36 @@ +diff -udHrN -- b/Makefile c/Makefile +--- b/Makefile 2022-04-30 15:52:57.095131468 +0200 ++++ c/Makefile 2022-04-30 15:55:58.530749638 +0200 +@@ -87,7 +87,7 @@ + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/i2f i2f.c $(LIBS) + + imcat: imcat.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imcat imcat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imcatalog imcat.c $(LIBS) + + imfill: imfill.c $(LIBWCS) libwcs/fitsfile.h + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imfill imfill.c $(LIBS) +@@ -153,7 +153,7 @@ + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/newfits newfits.c $(LIBS) + + remap: remap.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/remap remap.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/wcsremap remap.c $(LIBS) + + scat: scat.c $(LIBWCS) libwcs/wcscat.h libwcs/wcs.h + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/scat scat.c $(LIBS) +diff -udHrN -- b/man/man1/imcat.1 c/man/man1/imcat.1 +--- b/man/man1/imcat.1 2016-06-24 22:33:58.000000000 +0200 ++++ c/man/man1/imcat.1 2022-04-30 15:59:00.116431139 +0200 +@@ -1,8 +1,8 @@ +-.TH imcat 1 WCSTools "30 January 2003" ++.TH imcatalog 1 WCSTools "30 January 2003" + .SH Name +-imcat \- List catalog stars in FITS and IRAF image files ++imcatalog \- List catalog stars in FITS and IRAF image files + .SH Synopsis +-imcat [options] FITS or IRAF file(s) ++imcatalog [options] FITS or IRAF file(s) + .SH Description + Search given catalog withing area described by the world coordinate + system in an image header. May be called as imuac to search the USNO A 1.0 diff --git a/wcstools-3.9.7_rename-libwcs-to-libwcstools.patch b/wcstools-3.9.7_rename-libwcs-to-libwcstools.patch new file mode 100644 index 0000000..c147875 --- /dev/null +++ b/wcstools-3.9.7_rename-libwcs-to-libwcstools.patch @@ -0,0 +1,317 @@ +diff -udHrN -- a/libwcs/Makefile b/libwcs/Makefile +--- a/libwcs/Makefile 2011-09-15 21:05:05.000000000 +0200 ++++ b/libwcs/Makefile 2022-04-30 11:32:21.246791512 +0200 +@@ -1,5 +1,4 @@ +-CFLAGS= -g -D_FILE_OFFSET_BITS=64 +-CC= cc ++CFLAGS+= -fPIC + + OBJS = imsetwcs.o imgetwcs.o matchstar.o findstar.o daoread.o wcscon.o \ + fitswcs.o wcsinit.o wcs.o ty2read.o webread.o tmcread.o \ +@@ -11,10 +10,17 @@ + sortstar.o platefit.o iget.o fileutil.o \ + wcslib.o lin.o cel.o proj.o sph.o wcstrig.o distort.o poly.o + +-libwcs.a: $(OBJS) ++all: libwcstools.so.1.0.0 libwcstools.a ++ ++libwcstools.a: $(OBJS) + ar rv $@ $? + ranlib $@ + ++libwcstools.so.1.0.0: $(OBJS) ++ $(CC) $(LDFLAGS) -shared -o $@ -Wl,-soname,libwcstools.so.1 $? -lm ++ ln -s libwcstools.so.1.0.0 libwcstools.so.1 ++ ln -s libwcstools.so.1.0.0 libwcstools.so ++ + actread.o: fitsfile.h wcscat.h wcs.h fitshead.h wcslib.h + binread.o: wcscat.h wcs.h fitshead.h wcslib.h + ctgread.o: wcscat.h wcs.h fitshead.h wcslib.h +@@ -67,4 +73,4 @@ + worldpos.o: wcs.h fitshead.h wcslib.h + + clean: +- rm -f *.a *.o ++ rm -f *.a *.o *.so *.so.* +diff -udHrN -- a/Makefile b/Makefile +--- a/Makefile 2021-10-12 21:55:01.000000000 +0200 ++++ b/Makefile 2022-04-30 15:52:57.095131468 +0200 +@@ -1,12 +1,11 @@ +-CFLAGS= -g -D_FILE_OFFSET_BITS=64 +-CC= cc +-LIBWCS = libwcs/libwcs.a +-LIBS = $(LIBWCS) -lm ++CC= gcc ++LIBWCS = libwcs/libwcstools.so ++LIBS = -L libwcs -lwcstools -lm + #LIBS = $(LIBWCS) -lm -lnsl -lsocket + BIN = bin + .PRECIOUS: ${LIBWCS} ${LIBNED} + .c.o: +- $(CC) -c $(CFLAGS) $(DEFS) $< ++ $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) $< + + all: cphead delwcs delhead edhead fixpix gethead i2f imcat imhead immatch \ + imrot imsize imstar imwcs scat sethead addpix getpix setpix sky2xy \ +@@ -16,196 +15,195 @@ + isfile simpos bincat + + addpix: addpix.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/addpix addpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/addpix addpix.c $(LIBS) + + bincat: bincat.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/bincat bincat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/bincat bincat.c $(LIBS) + + char2sp: char2sp.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/char2sp char2sp.c $(LIBWCS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/char2sp char2sp.c $(LIBWCS) + + conpix: conpix.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/conpix conpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/conpix conpix.c $(LIBS) + + cphead: cphead.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/cphead cphead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/cphead cphead.c $(LIBS) + + crlf: crlf.c +- $(CC) $(CFLAGS) -o $(BIN)/crlf crlf.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/crlf crlf.c + + delwcs: delwcs.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/delwcs delwcs.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/delwcs delwcs.c $(LIBS) + + delhead: delhead.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/delhead delhead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/delhead delhead.c $(LIBS) + + edhead: edhead.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/edhead edhead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/edhead edhead.c $(LIBS) + + filename: filename.c +- $(CC) $(CFLAGS) -o $(BIN)/filename filename.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/filename filename.c + + filedir: filedir.c +- $(CC) $(CFLAGS) -o $(BIN)/filedir filedir.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/filedir filedir.c + + fileroot: fileroot.c +- $(CC) $(CFLAGS) -o $(BIN)/fileroot fileroot.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/fileroot fileroot.c + + filext: filext.c +- $(CC) $(CFLAGS) -o $(BIN)/filext filext.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/filext filext.c + + fixhead: fixhead.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/fixhead fixhead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/fixhead fixhead.c $(LIBS) + + fixpix: fixpix.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/fixpix fixpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/fixpix fixpix.c $(LIBS) + + getcol: getcol.c $(LIBWCS) libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/getcol getcol.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/getcol getcol.c $(LIBS) + + getdate: getdate.c $(LIBWCS) libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/getdate getdate.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/getdate getdate.c $(LIBS) + + gethead: gethead.c $(LIBWCS) libwcs/wcs.h libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/gethead gethead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/gethead gethead.c $(LIBS) + + getfits: getfits.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/getfits getfits.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/getfits getfits.c $(LIBS) + + getpix: getpix.c $(LIBWCS) libwcs/wcs.h libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/getpix getpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/getpix getpix.c $(LIBS) + + gettab: gettab.c $(LIBWCS) libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/gettab gettab.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/gettab gettab.c $(LIBS) + + httpget: httpget.c $(LIBWCS) libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/httpget httpget.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/httpget httpget.c $(LIBS) + + htmlsp: htmlsp.c +- $(CC) $(CFLAGS) -o $(BIN)/htmlsp htmlsp.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/htmlsp htmlsp.c + + i2f: i2f.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/i2f i2f.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/i2f i2f.c $(LIBS) + + imcat: imcat.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/imcat imcat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imcat imcat.c $(LIBS) + + imfill: imfill.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imfill imfill.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imfill imfill.c $(LIBS) + + imresize: imresize.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imresize imresize.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imresize imresize.c $(LIBS) + + imsmooth: imsmooth.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imsmooth imsmooth.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imsmooth imsmooth.c $(LIBS) + + imhead: imhead.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/imhead imhead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imhead imhead.c $(LIBS) + + imrot: imrot.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imrot imrot.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imrot imrot.c $(LIBS) + + imsize: imsize.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/imsize imsize.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imsize imsize.c $(LIBS) + + imstack: imstack.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/imstack imstack.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imstack imstack.c $(LIBS) + + imextract: imextract.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/imextract imextract.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imextract imextract.c $(LIBS) + + imstar: imstar.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h libwcs/lwcs.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/imstar imstar.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imstar imstar.c $(LIBS) + + isfile: isfile.c $(LIBWCS) libwcs/fitshead.h +- $(CC) $(CFLAGS) -o $(BIN)/isfile isfile.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isfile isfile.c $(LIBS) + + isfits: isfits.c $(LIBWCS) libwcs/fitshead.h +- $(CC) $(CFLAGS) -o $(BIN)/isfits isfits.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isfits isfits.c $(LIBS) + + isnum: isnum.c $(LIBWCS) libwcs/fitshead.h +- $(CC) $(CFLAGS) -o $(BIN)/isnum isnum.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isnum isnum.c $(LIBS) + + isdate: isdate.c $(LIBWCS) libwcs/fitshead.h +- $(CC) $(CFLAGS) -o $(BIN)/isdate isdate.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isdate isdate.c $(LIBS) + + isimlist: isimlist.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/isimlist isimlist.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isimlist isimlist.c $(LIBS) + + isrange: isrange.c +- $(CC) $(CFLAGS) -o $(BIN)/isrange isrange.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/isrange isrange.c + + imwcs: imwcs.c $(LIBWCS) libwcs/fitsfile.h libwcs/lwcs.h +- $(CC) $(CFLAGS) -o $(BIN)/imwcs imwcs.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/imwcs imwcs.c $(LIBS) + + immatch: immatch.c $(LIBWCS) libwcs/fitsfile.h libwcs/lwcs.h +- $(CC) $(CFLAGS) -o $(BIN)/immatch immatch.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/immatch immatch.c $(LIBS) + + immwcs: immwcs.c $(LIBWCS) libwcs/fitsfile.h libwcs/lwcs.h +- $(CC) $(CFLAGS) -o $(BIN)/immwcs immwcs.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/immwcs immwcs.c $(LIBS) + + keyhead: keyhead.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/keyhead keyhead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/keyhead keyhead.c $(LIBS) + + matchcat: matchcat.c $(LIBWCS) libwcs/wcscat.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/matchcat matchcat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/matchcat matchcat.c $(LIBS) + + newfits: newfits.c $(LIBWCS) libwcs/fitshead.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/newfits newfits.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/newfits newfits.c $(LIBS) + + remap: remap.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/remap remap.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/remap remap.c $(LIBS) + + scat: scat.c $(LIBWCS) libwcs/wcscat.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/scat scat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/scat scat.c $(LIBS) + + sethead: sethead.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h +- $(CC) $(CFLAGS) -o $(BIN)/sethead sethead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/sethead sethead.c $(LIBS) + + setpix: setpix.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/setpix setpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/setpix setpix.c $(LIBS) + + sky2xy: sky2xy.c $(LIBWCS) libwcs/wcs.h libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/sky2xy sky2xy.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/sky2xy sky2xy.c $(LIBS) + + skycoor: skycoor.c $(LIBWCS) libwcs/wcs.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/skycoor skycoor.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/skycoor skycoor.c $(LIBS) + + sp2char: sp2char.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/sp2char sp2char.c $(LIBWCS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/sp2char sp2char.c $(LIBWCS) + + subpix: subpix.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/subpix subpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/subpix subpix.c $(LIBS) + + sumpix: sumpix.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/sumpix sumpix.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/sumpix sumpix.c $(LIBS) + + wcshead: wcshead.c $(LIBWCS) libwcs/fitsfile.h +- $(CC) $(CFLAGS) -o $(BIN)/wcshead wcshead.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/wcshead wcshead.c $(LIBS) + + xy2sky: xy2sky.c $(LIBWCS) libwcs/wcs.h libwcs/wcscat.h +- $(CC) $(CFLAGS) -o $(BIN)/xy2sky xy2sky.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/xy2sky xy2sky.c $(LIBS) + +-simpos: simpos.c libwcs/libwcs.a +- $(CC) $(CFLAGS) -o $(BIN)/simpos simpos.c $(LIBS) ++simpos: simpos.c $(LIBWCS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/simpos simpos.c $(LIBS) + + gsc2cat: gsc2cat.c $(LIBWCS) +- $(CC) $(CFLAGS) -o $(BIN)/gsc2cat gsc2cat.c $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/gsc2cat gsc2cat.c $(LIBS) + + tmcat: tmcat.c +- $(CC) $(CFLAGS) -o $(BIN)/tmcat tmcat.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/tmcat tmcat.c + + tmcate: tmcate.c +- $(CC) $(CFLAGS) -o $(BIN)/tmcate tmcate.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(BIN)/tmcate tmcate.c + + $(LIBWCS): libwcs/*.c libwcs/*.h +- cd libwcs; make ++ $(MAKE) CC=$(CC) -C libwcs + + objclean: +- cd libwcs; make clean ++ $(MAKE) -C libwcs clean + + binclean: + rm -f ./bin/* + +-clean: +- make objclean; make binclean ++clean: objclean binclean diff --git a/wcstools.spec b/wcstools.spec index 99e4ed4..a37b8d0 100644 --- a/wcstools.spec +++ b/wcstools.spec @@ -1,54 +1,70 @@ -Name: wcstools -Version: 3.7.0 -Release: 3%{?dist} -Summary: Software utilities to display and manipulate the WCS of a FITS image +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} -Group: Applications/Engineering -License: GPLv2+ -URL: http://tdc-www.harvard.edu/wcstools -Source0: http://tdc-www.harvard.edu/software/wcstools/wcstools-%{version}.tar.gz -Patch0: wcstools3-shared.patch -Patch1: wcstools3-codewarn.patch -Patch2: wcstools3-bug232413.patch -Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +%global build_type_safety_c 0 + +Name: wcstools +Version: 3.9.7 +Release: %autorelease +Summary: Software utilities to display and manipulate the WCS of a FITS image +License: GPL-2.0-or-later +URL: http://tdc-www.harvard.edu/wcstools +Source0: http://tdc-www.harvard.edu/software/wcstools/%{name}-%{version}.tar.gz + +BuildRequires: make +BuildRequires: gcc + +# Patch adjusted from Debian to create shared lib and rename it to avoid +# conflicts with Mark Calabretta's wcslib package. +Patch: wcstools-3.9.7_rename-libwcs-to-libwcstools.patch + +# Patch to rename some conflicting binaries +# new names in accordance to Debian renaming +# see also fedora#1450190 +Patch: wcstools-3.9.7_rename-binaries.patch + +# Since there's no way to reach out upstream other than email +# and I don't get replies, this patch tries to fix build with GCC15 +Patch: fix_gcc15-c++23.patch %description Wcstools is a set of software utilities, written in C, which create, display and manipulate the world coordinate system of a FITS or IRAF image, using specific keywords in the image header which relate pixel -position within the image to position on the sky. Auxillary programs +position within the image to position on the sky. Auxiliary programs search star catalogs and manipulate images. -%package -n libwcs -Summary: Libwcs shared library -Group: System Environment/Libraries -License: LGPLv2+ -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig +%package libs +Summary: Wcstools shared library +# most files have LGPL-2.0-or-later header +# COPYING is LGPL-2.1-only +License: LGPL-2.0-or-later AND LGPL-2.1-only -%description -n libwcs +%description libs Shared library necessary to run wcstools and programs based on libwcs. -%package -n libwcs-devel -Summary: Libraries, includes, etc. used to develop an application with libwcs -Group: Development/Libraries -License: LGPLv2+ -Requires: libwcs = %{version}-%{release} -%description -n libwcs-devel -This are the files needed to develop an application using libwcs. + +%package devel +Summary: Libraries, includes, etc. used to develop an application with wcstools +License: LGPL-2.0-or-later AND LGPL-2.1-only +Requires: %{name}-libs%{_isa} = %{version}-%{release} +%description devel +This are the files needed to develop an application using wcstools. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%autosetup -p1 + +# Fix wrong FSF address in source headers +# asked upstream by mail to fix this +grep -rl '59 Temple Place, Suite 330, Boston, MA 02111-1307 USA' --include=*.{c,h} | xargs -i@ sed -i 's/59 Temple Place, Suite 330, Boston, MA 02111-1307 USA/51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA./g' @ + %build -%{__make} CC="%{__cc}" CFLAGS="%{optflags} -fPIC" all +%make_build + %install -%{__rm} -rf %{buildroot} %{__mkdir_p} %{buildroot}%{_libdir} %{__mkdir_p} %{buildroot}%{_bindir} %{__mkdir_p} %{buildroot}%{_includedir}/wcs @@ -56,83 +72,25 @@ This are the files needed to develop an application using libwcs. %{__install} -p bin/* %{buildroot}%{_bindir} %{__cp} -a libwcs/*.so* %{buildroot}%{_libdir} %{__install} -p -m 644 libwcs/*.h %{buildroot}%{_includedir}/wcs -%{__install} -p -m 644 Man/man1/* %{buildroot}%{_mandir}/man1 +%{__install} -p -m 644 man/man1/* %{buildroot}%{_mandir}/man1 -%clean -%{__rm} -fr %{buildroot} -%post -n libwcs -p /sbin/ldconfig - -%postun -n libwcs -p /sbin/ldconfig %files -%doc NEWS COPYING Readme Programs -%defattr(-,root,root) +%license COPYING +%doc NEWS Readme Programs %{_bindir}/* %{_mandir}/man1/* -%files -n libwcs -%defattr(-,root,root) -%doc libwcs/COPYING -%{_libdir}/*.so.* +%files libs +%license libwcs/COPYING +%{_libdir}/*.so.1* -%files -n libwcs-devel -%doc libwcs/COPYING libwcs/NEWS -%defattr(-,root,root) +%files devel +%doc libwcs/NEWS %{_libdir}/*.so %{_includedir}/wcs %changelog -* Wed Oct 01 2008 Sergio Pascual 3.7.0-3 -- Fails to build from source bz#465061 - -* Tue Feb 19 2008 Fedora Release Engineering - 3.7.0-2 -- Autorebuild for GCC 4.3 - -* Wed Sep 05 2007 Sergio Pascual 3.7.0-1 -- New upstream source 3.7.0 - -* Mon Aug 27 2007 Sergio Pascual 3.6.8-2.1 -- Rebuild for Fedora 8 to get the build-id - -* Tue Mar 20 2007 Sergio Pascual 3.6.8-2 -- Fix for bug #232413 - -* Mon Mar 19 2007 Sergio Pascual 3.6.8-1 -- New upstream source 3.6.8 -- Added pacthes to remove warnings during the compilation - -* Mon Feb 26 2007 Sergio Pascual 3.6.7-1 -- New upstream source 3.6.7 - -* Wed Nov 15 2006 Sergio Pascual 3.6.6-1 -- New upstream source 3.6.6 - -* Tue Oct 10 2006 Sergio Pascual 3.6.6-0.1.beta -- New upstream source 3.6.6beta - -* Mon Sep 4 2006 Sergio Pascual 3.6.5-3 -- Rebuild. - -* Wed Aug 30 2006 Sergio Pascual 3.6.5-2 -- Corrected bug in edhead (patch2) (bug #204642). - -* Fri Jun 21 2006 Sergio Pascual 3.6.5-1 -- New upstream source 3.6.5 - -* Tue Jun 13 2006 Sergio Pascual 3.6.4-3 -- Patched overflows in catutil.c and getdate.c -- Patched incompatible pointer in binread.c - -* Mon Jun 12 2006 Sergio Pascual 3.6.4-2 -- Patched edhead. -- libwcs provides libwcs.so.3 -- libwcs into System Environment/Libraries group -- Makefile uses ${RPM_OPT_FLAGS} and $(CC) - -* Fri Jun 09 2006 Sergio Pascual 3.6.4-1 -- Removed not needed ldconfig in wcstools and libwcs-devel. - -* Wed Mar 08 2006 Sergio Pascual 3.6.3-1 -- Initial RPM file. +%autochangelog diff --git a/wcstools3-bug232413.patch b/wcstools3-bug232413.patch deleted file mode 100644 index aece19e..0000000 --- a/wcstools3-bug232413.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -ur wcstools-3.6.8/libwcs/imsetwcs.c wcstools-3.6.8.patch/libwcs/imsetwcs.c ---- wcstools-3.6.8/libwcs/imsetwcs.c 2007-01-11 23:01:41.000000000 +0100 -+++ wcstools-3.6.8.patch/libwcs/imsetwcs.c 2007-03-20 10:15:17.000000000 +0100 -@@ -850,13 +850,13 @@ - if (gc) free ((char *)gc); - - /* Free memory used for object names in reference catalog */ -- if (gobj1 != NULL) { -+/* if (gobj1 != NULL) { - for (i = 0; i < ns; i++) { - if (gobj[i] != NULL) free (gobj[i]); - gobj[i] = NULL; - } - } -- -+*/ - /* Free image source arrays */ - if (sx) free ((char *)sx); - if (sy) free ((char *)sy); diff --git a/wcstools3-codewarn.patch b/wcstools3-codewarn.patch deleted file mode 100644 index 1d00f14..0000000 --- a/wcstools3-codewarn.patch +++ /dev/null @@ -1,1065 +0,0 @@ -diff -ur wcstools-3.7.0/bincat.c wcstools-3.7.0.new/bincat.c ---- wcstools-3.7.0/bincat.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/bincat.c 2007-09-07 20:58:35.000000000 +0200 -@@ -90,7 +90,7 @@ - char *lastchar; - char filename[128]; - FILE *flist; -- char *listfile; -+ char *listfile = NULL; - char rastr[32], decstr[32]; - double x, y; - char cs1; -diff -ur wcstools-3.7.0/cphead.c wcstools-3.7.0.new/cphead.c ---- wcstools-3.7.0/cphead.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/cphead.c 2007-09-07 21:27:59.000000000 +0200 -@@ -357,7 +357,7 @@ - double dval; - int ival, nch; - int iraffile; -- int ndec, nbheadout, nbheadin, nbheader; -+ int ndec, nbheadout = 0, nbheadin, nbheader; - char newname[128]; - char string[80]; - char *kw, *kwe, *filepath, *fname, *ext, *imext, *imext1; -diff -ur wcstools-3.7.0/crlf.c wcstools-3.7.0.new/crlf.c ---- wcstools-3.7.0/crlf.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/crlf.c 2007-09-07 20:59:04.000000000 +0200 -@@ -99,7 +99,7 @@ - if (buffer[i] == (char) 13) - buffer[i] = (char) 10; - } -- (void) write (1, buffer, nbr); -+ write (1, buffer, nbr); - } - } - return; -diff -ur wcstools-3.7.0/delhead.c wcstools-3.7.0.new/delhead.c ---- wcstools-3.7.0/delhead.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/delhead.c 2007-09-07 21:51:50.000000000 +0200 -@@ -551,7 +551,7 @@ - char *header; /* FITS header */ - int verbose; /* If true, print deletion confirmations */ - { -- char *hplace, *hcom, *v, *v1, *v2, *ve; -+ char *hplace, *hcom, *v, *v2, *ve; - int i, killcom, nline; - int nkill = 0; - -@@ -585,7 +585,7 @@ - - /* Fill line with blanks */ - else { -- for (i = 0; i++; i < 80) -+ for (i = 0; i < 80; i++) - hcom[i] = ' '; - hplace = hplace + 80; - } -diff -ur wcstools-3.7.0/delwcs.c wcstools-3.7.0.new/delwcs.c ---- wcstools-3.7.0/delwcs.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/delwcs.c 2007-09-07 20:59:28.000000000 +0200 -@@ -114,7 +114,7 @@ - - { - char *header; /* FITS image header */ -- char *image; /* Image pixels */ -+ char *image = NULL; /* Image pixels */ - int lhead; /* Maximum number of bytes in FITS header */ - int nbhead; /* Actual number of bytes in FITS header */ - int iraffile; /* 1 if IRAF image */ -diff -ur wcstools-3.7.0/edhead.c wcstools-3.7.0.new/edhead.c ---- wcstools-3.7.0/edhead.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/edhead.c 2007-09-07 20:59:48.000000000 +0200 -@@ -210,8 +210,8 @@ - break; - } - nbytes = i + 1; -- (void) fwrite (headline, 1, nbytes, fd); -- (void) fwrite (newline, 1, 1, fd); -+ fwrite (headline, 1, nbytes, fd); -+ fwrite (newline, 1, 1, fd); - } - fclose (fd); - free (header); -diff -ur wcstools-3.7.0/filename.c wcstools-3.7.0.new/filename.c ---- wcstools-3.7.0/filename.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/filename.c 2007-09-07 21:32:59.000000000 +0200 -@@ -39,7 +39,7 @@ - { - char *fn, *fn0; - char *str; -- char *name; -+ char *name = NULL; - char *is[10]; - char *endroot; - int i, n; -diff -ur wcstools-3.7.0/getcol.c wcstools-3.7.0.new/getcol.c ---- wcstools-3.7.0/getcol.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/getcol.c 2007-09-07 21:00:14.000000000 +0200 -@@ -447,7 +447,7 @@ - nop++; - } - else -- printf (" Constants %s, %s, or operation %s illegal\n",sop1,sop2,opi[0]); -+ printf (" Constants %s, %s, or operation %c illegal\n",sop1,sop2,opi[0]); - } - - /* File to read */ -diff -ur wcstools-3.7.0/getdate.c wcstools-3.7.0.new/getdate.c ---- wcstools-3.7.0/getdate.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/getdate.c 2007-09-07 21:00:41.000000000 +0200 -@@ -409,10 +409,10 @@ - int year, vyear; - int lfd, oldfits; - char outform[16]; -- char *fitsdate, *newfdate, *stdate; -+ char *fitsdate = NULL, *newfdate, *stdate; - char temp[64]; - char fyear[16]; -- char ts0[8]; -+ char ts0[9]; - char *tchar; - int its, its1; - time_t lts; -diff -ur wcstools-3.7.0/getpix.c wcstools-3.7.0.new/getpix.c ---- wcstools-3.7.0/getpix.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/getpix.c 2007-09-07 21:01:00.000000000 +0200 -@@ -68,7 +68,7 @@ - char *fn; - char *rrange; /* Row range string */ - char *crange; /* Column range string */ -- char *rstr; -+ char *rstr = NULL; - char *dstr = NULL; - char *cstr; - int systemp; -diff -ur wcstools-3.7.0/gettab.c wcstools-3.7.0.new/gettab.c ---- wcstools-3.7.0/gettab.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/gettab.c 2007-09-07 21:01:31.000000000 +0200 -@@ -558,7 +558,7 @@ - char *alias[]; /* Output names of keywords if different from input */ - - { -- char *str; -+ char *str = NULL; - char *cstr, *cval, cvalue[64]; - int pass = 0; - int drop; -diff -ur wcstools-3.7.0/imcat.c wcstools-3.7.0.new/imcat.c ---- wcstools-3.7.0/imcat.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/imcat.c 2007-09-07 21:53:32.000000000 +0200 -@@ -109,9 +109,6 @@ - char **fn; - int i, ic; - int nx, ny; -- char *header; -- double cra, cdec, dra, ddec, secpix; -- int wp, hp, bitpix; - double x, y; - char *refcatname[5]; /* reference catalog name */ - int ncat = 0; -@@ -123,7 +120,7 @@ - int scat = 0; - char c1, c, *ccom; - double drot; -- struct WorldCoor *wcs = NULL; /* World coordinate system structure */ -+ /*struct WorldCoor *wcs = NULL;*/ /* World coordinate system structure */ - - nfile = 0; - fn = (char **)calloc (maxnfile, sizeof(char *)); -@@ -1777,7 +1774,7 @@ - sprintf (headline, "%s %s %s %5.1f %5.1f %d", - numstr,rastr,decstr,gm[0][i],gm[1][i],gc[i]); - else if (refcat == SKYBOT) -- sprintf (headline, "%s %s %s %5.2f %5.2f %5.2f", -+ sprintf (headline, "%s %s %s %5.2f %5.2f %5.2f %5.2f", - numstr,rastr,decstr,gm[0][i],gm[1][i],gm[2][i],gm[3][i]); - else if (refcat == UJC) - sprintf (headline, "%s %s %s %5.2f %d", -diff -ur wcstools-3.7.0/imfill.c wcstools-3.7.0.new/imfill.c ---- wcstools-3.7.0/imfill.c 2007-08-30 23:47:02.000000000 +0200 -+++ wcstools-3.7.0.new/imfill.c 2007-09-07 21:01:55.000000000 +0200 -@@ -313,7 +313,7 @@ - int nfilled; - int nbadpix; - int i; -- char *irafheader; /* IRAF image header */ -+ char *irafheader = NULL; /* IRAF image header */ - char newname[256]; /* Name for revised image */ - char *ltime; - char *endchar; -diff -ur wcstools-3.7.0/imsmooth.c wcstools-3.7.0.new/imsmooth.c ---- wcstools-3.7.0/imsmooth.c 2007-08-30 23:47:03.000000000 +0200 -+++ wcstools-3.7.0.new/imsmooth.c 2007-09-07 21:02:24.000000000 +0200 -@@ -263,7 +263,7 @@ - char *ext = NULL; - char *newimage = NULL; - char *imext = NULL; -- char *imext1; -+ char *imext1 = NULL; - char *fname; - char extname[16]; - int lext = 0; -diff -ur wcstools-3.7.0/imstack.c wcstools-3.7.0.new/imstack.c ---- wcstools-3.7.0/imstack.c 2007-08-30 23:47:03.000000000 +0200 -+++ wcstools-3.7.0.new/imstack.c 2007-09-07 21:03:02.000000000 +0200 -@@ -199,7 +199,7 @@ - blanks = (char *) malloc ((size_t) nbytes); - for (i = 0; i < nbytes; i++) - blanks[i] = 0; -- (void) fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack); -+ fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack); - free (blanks); - } - } -@@ -475,7 +475,7 @@ - blanks = (char *) malloc ((size_t) nbytes); - for (i = 0; i < nbytes; i++) - blanks[i] = 0; -- (void) fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack); -+ fwrite (blanks, (size_t) 1, (size_t)nbytes, fstack); - free (blanks); - } - } -diff -ur wcstools-3.7.0/libwcs/binread.c wcstools-3.7.0.new/libwcs/binread.c ---- wcstools-3.7.0/libwcs/binread.c 2007-01-11 23:02:42.000000000 +0100 -+++ wcstools-3.7.0.new/libwcs/binread.c 2007-09-07 21:03:38.000000000 +0200 -@@ -505,7 +505,7 @@ - struct Star *star; - char str[128]; - int nmag; -- int mrv; -+ int mrv = 0; - - nstar = 0; - starcat = binopen (bincat); -@@ -694,7 +694,7 @@ - int nmag; /* Real number of magnitudes per entry (- rv) */ - int jstar; - int nstar; -- double mag; -+ double mag = 0; - double num; - int magsort; - int istar = 0; -@@ -1372,7 +1372,7 @@ - for (i = 0; i < nmag; i++) { - moveb (sc->catline, (char *) st->mag, 2, sc->entmag[0]+(i*2), i*2); - if (sc->byteswapped) -- binswap2 (&st->mag[i], 2); -+ binswap2 ((char*)&st->mag[i], 2); - st->xmag[i] = 0.01 * (double) st->mag[i]; - } - } -diff -ur wcstools-3.7.0/libwcs/catutil.c wcstools-3.7.0.new/libwcs/catutil.c ---- wcstools-3.7.0/libwcs/catutil.c 2007-07-23 23:00:32.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/catutil.c 2007-09-07 20:58:14.000000000 +0200 -@@ -737,7 +737,7 @@ - lname = 0; - else - lname = strlen (refcatname); -- catname = (char *)calloc (lname + 16, 1); -+ catname = (char *)calloc (lname + 37, 1); - if (lname > 0) - sprintf (catname, "%s sources", refcatname); - else -diff -ur wcstools-3.7.0/libwcs/fileutil.c wcstools-3.7.0.new/libwcs/fileutil.c ---- wcstools-3.7.0/libwcs/fileutil.c 2007-01-11 22:57:29.000000000 +0100 -+++ wcstools-3.7.0.new/libwcs/fileutil.c 2007-09-07 21:04:08.000000000 +0200 -@@ -343,7 +343,7 @@ - /* If line can be read, add null at the end of the first token */ - if (fgets (token, ncmax, diskfile) != NULL) { - if (token[0] == '#') { -- (void) fgets (token, ncmax, diskfile); -+ fgets (token, ncmax, diskfile); - } - - /* If only character is a control character, return a NULL */ -diff -ur wcstools-3.7.0/libwcs/findstar.c wcstools-3.7.0.new/libwcs/findstar.c ---- wcstools-3.7.0/libwcs/findstar.c 2007-01-10 18:35:23.000000000 +0100 -+++ wcstools-3.7.0.new/libwcs/findstar.c 2007-09-07 21:04:43.000000000 +0200 -@@ -747,7 +747,7 @@ - double sd = 0.0; - int i; - int npix; -- double dnpix; -+ double dnpix = 0; - double sum; - - pmin = -1.0e20; -diff -ur wcstools-3.7.0/libwcs/fitsfile.c wcstools-3.7.0.new/libwcs/fitsfile.c ---- wcstools-3.7.0/libwcs/fitsfile.c 2007-05-01 00:22:51.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/fitsfile.c 2007-09-07 21:44:46.000000000 +0200 -@@ -874,7 +874,7 @@ - if (!simple) { - nbytes = getfilesize (filename) - nbhead; - if ((image = (char *) malloc (nbytes + 1)) == NULL) { -- snprintf (fitserrmsg,79, "FITSRFULL: %d-byte image buffer cannot be allocated\n"); -+ snprintf (fitserrmsg,79, "FITSRFULL: %d-byte image buffer cannot be allocated\n", nbytes); - (void)close (fd); - return (NULL); - } -diff -ur wcstools-3.7.0/libwcs/gsc2read.c wcstools-3.7.0.new/libwcs/gsc2read.c ---- wcstools-3.7.0/libwcs/gsc2read.c 2007-07-09 23:36:08.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/gsc2read.c 2007-09-07 21:06:03.000000000 +0200 -@@ -191,7 +191,7 @@ - - /* Dump returned file and stop */ - if (nlog < 0) { -- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); -+ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); - exit (0); - } - -@@ -293,7 +293,7 @@ - char *databuff; - char *lastbuff; - char *oldbuff; -- char *colhead, *colsep; -+ /*char *colhead, *colsep;*/ - int lhead, lbuff, i, j; - char ctab = (char) 9; - char ccom = ','; -diff -ur wcstools-3.7.0/libwcs/gscread.c wcstools-3.7.0.new/libwcs/gscread.c ---- wcstools-3.7.0/libwcs/gscread.c 2007-07-05 18:05:03.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/gscread.c 2007-09-07 21:07:44.000000000 +0200 -@@ -512,7 +512,7 @@ - } - - /* Close region input file */ -- (void) close (ift); -+ close (ift); - itot = itot + itable; - if (nlog > 0) - fprintf (stderr,"GSCREAD: %4d / %4d: %5d / %5d / %5d sources from region %4d \n", -@@ -549,7 +549,7 @@ - int *gtype; /* Array of object types (returned) */ - int nlog; /* 1 for diagnostics */ - { -- char *table; /* FITS table */ -+ char *table = NULL; /* FITS table */ - char inpath[64]; /* Pathname for input FITS table file */ - char entry[100]; /* Buffer for FITS table row */ - int class; /* Object class (0>star, 3>other) */ -@@ -574,7 +574,7 @@ - double perr0 = 0.0; - double ra0 = 0.0; - double dec0 = 0.0; -- char *str; -+ char *str = NULL; - char *url; - - itot = 0; -@@ -756,7 +756,7 @@ - } - - /* Close region input file */ -- (void) close (ift); -+ close (ift); - itot = itot + itable; - if (nlog > 0) - fprintf (stderr,"GSCRNUM: %4d / %4d: %5d / %5d sources, region %4d.%04d\n", -@@ -795,7 +795,7 @@ - int rlist[100]; /* List of input FITS tables files */ - char inpath[64]; /* Pathname for input FITS table file */ - char entry[100]; /* Buffer for FITS table row */ -- int class, class0; /* Object class (0>star, 3>other) */ -+ int class = 0, class0 = 0; /* Object class (0>star, 3>other) */ - int sysref=WCS_J2000; /* Catalog coordinate system */ - double eqref=2000.0; /* Catalog equinox */ - struct Keyword kw[8]; /* Keyword structure */ -@@ -808,9 +808,9 @@ - int ik,nk,itable,ntable,jstar; - int nbline,npos,nbhead; - int nbr,nrmax,nstar,i; -- int ift, band0, band; -- double ra,ra0,rasum,dec,dec0,decsum,perr,perr0,perr2,perrsum,msum; -- double mag,mag0,merr,merr0,merr2,merrsum; -+ int ift, band0 = 0., band = 0.; -+ double ra,ra0 = 0.,rasum,dec,dec0 = 0.,decsum,perr,perr0 = 0.,perr2,perrsum,msum; -+ double mag,mag0 = 0.,merr,merr0 = 0.,merr2,merrsum; - double rra1, rra2, rdec1, rdec2; - double rdist, ddist; - char *str; -@@ -830,11 +830,11 @@ - - /* Set image parameters */ - bitpix = 0; -- (void)hgeti4 (header, "BITPIX", &bitpix); -+ hgeti4 (header, "BITPIX", &bitpix); - w = 0; -- (void)hgeti4 (header, "NAXIS1", &w); -+ hgeti4 (header, "NAXIS1", &w); - h = 0; -- (void)hgeti4 (header, "NAXIS2", &h); -+ hgeti4 (header, "NAXIS2", &h); - - if (refcat == GSCACT) { - if ((str = getenv("GSCACT_NORTH")) == NULL) -@@ -1080,7 +1080,7 @@ - } - - /* Close region input file */ -- (void) close (ift); -+ close (ift); - itot = itot + itable; - if (nlog > 0) - fprintf (stderr,"GSCBIN: %4d / %4d: %5d / %5d / %5d sources from region %4d \n", -@@ -1321,7 +1321,7 @@ - jr2 = 0; - } - -- (void) close (ift); -+ close (ift); - return (nrgn); - } - -@@ -1381,7 +1381,7 @@ - double min; /* Minutes of declination */ - - /* Get declination sign from table */ -- (void) ftgetc (fitsline, &rkw[sgncol], sgn, 3); -+ ftgetc (fitsline, &rkw[sgncol], sgn, 3); - - /* Get degrees of declination from table */ - deg = ftgetr8 (fitsline, &rkw[dcol]); -diff -ur wcstools-3.7.0/libwcs/hput.c wcstools-3.7.0.new/libwcs/hput.c ---- wcstools-3.7.0/libwcs/hput.c 2007-08-22 23:59:56.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/hput.c 2007-09-07 21:47:09.000000000 +0200 -@@ -273,7 +273,7 @@ - const char *cval; /* character string containing the value for variable - keyword. trailing and leading blanks are removed. */ - { -- int lroot, lcv, i, ii, nkw, lkw, lval; -+ int lroot = 0, lcv, i, ii, nkw, lkw, lval; - int comment = 0; - const char *v; - char keyroot[8], newkey[12], value[80]; -@@ -599,7 +599,7 @@ - char squot, slash, space; - char line[100]; - int lkeyword, lcom, lhead, i, lblank, ln, nc, lc; -- char *vp, *v1, *v2, *c0, *c1, *q1, *q2; -+ char *vp, *v1, *v2, *c0, *c1, *q1, *q2=NULL; - - squot = (char) 39; - slash = (char) 47; -diff -ur wcstools-3.7.0/libwcs/imgetwcs.c wcstools-3.7.0.new/libwcs/imgetwcs.c ---- wcstools-3.7.0/libwcs/imgetwcs.c 2007-07-26 22:08:41.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/imgetwcs.c 2007-09-07 21:26:47.000000000 +0200 -@@ -381,7 +381,7 @@ - double xref, yref, degpix, secpix; - struct WorldCoor *wcs; - char temp[16]; -- char *cwcs; -+ char *cwcs = NULL; - - /* Set the world coordinate system from the image header */ - if (strlen (filename) > 0) { -diff -ur wcstools-3.7.0/libwcs/imhfile.c wcstools-3.7.0.new/libwcs/imhfile.c ---- wcstools-3.7.0/libwcs/imhfile.c 2007-01-08 18:24:29.000000000 +0100 -+++ wcstools-3.7.0.new/libwcs/imhfile.c 2007-09-07 21:09:34.000000000 +0200 -@@ -910,10 +910,10 @@ - - /* Write IRAF header to disk file */ - nbw = write (fd, irafheader, nbhead); -- (void) ftruncate (fd, nbhead); -+ ftruncate (fd, nbhead); - close (fd); - if (nbw < nbhead) { -- (void)fprintf(stderr, "IRAF header file %s: %d / %d bytes written.\n", -+ fprintf(stderr, "IRAF header file %s: %d / %d bytes written.\n", - hdrname, nbw, nbhead); - return (-1); - } -diff -ur wcstools-3.7.0/libwcs/imrotate.c wcstools-3.7.0.new/libwcs/imrotate.c ---- wcstools-3.7.0/libwcs/imrotate.c 2007-04-04 20:42:14.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/imrotate.c 2007-09-07 21:42:33.000000000 +0200 -@@ -371,7 +371,6 @@ - - { - static char flds[15][8]; -- char ctype1[16], ctype2[16]; - double ctemp1, ctemp2, ctemp3, ctemp4, naxis1, naxis2; - int i, n, ndec1, ndec2, ndec3, ndec4; - -diff -ur wcstools-3.7.0/libwcs/imsetwcs.c wcstools-3.7.0.new/libwcs/imsetwcs.c ---- wcstools-3.7.0/libwcs/imsetwcs.c 2007-03-14 22:03:43.000000000 +0100 -+++ wcstools-3.7.0.new/libwcs/imsetwcs.c 2007-09-07 21:10:35.000000000 +0200 -@@ -136,22 +136,22 @@ - int nmax; /* Maximum number of matches possible (nrg or nbs) */ - int lofld = 0; /* Length of object name field in output */ - double mag1,mag2; -- int refcat; /* reference catalog switch */ -+ int refcat = 0; /* reference catalog switch */ - int nmag, mprop; - double dxys; - char numstr[32]; - int minstars; -- int ngmax; -+ int ngmax = 0; - int nbin, nbytes; - int iterate, toliterate, nfiterate; -- int imag, magsort; -+ int imag, magsort = 0; - int niter = 0; - int recenter = recenter0; - int ret = 0; - int is, ig, igs, i, j; - char rstr[32], dstr[32]; - double refeq, refep; -- double maxnum; -+ double maxnum = 0; - int nnfld; - int refsys; - char refcoor[8]; -diff -ur wcstools-3.7.0/libwcs/imutil.c wcstools-3.7.0.new/libwcs/imutil.c ---- wcstools-3.7.0/libwcs/imutil.c 2007-01-11 20:51:15.000000000 +0100 -+++ wcstools-3.7.0.new/libwcs/imutil.c 2007-09-07 21:49:38.000000000 +0200 -@@ -164,7 +164,7 @@ - { - char *buffret; /* Modified image buffer (returned) */ - int nx,ny; /* Number of columns and rows in image */ --int ix,iy; /* Pixel around which to compute mean */ -+int ix,iy = 0; /* Pixel around which to compute mean */ - int npix; /* Number of pixels in image */ - int bitpix; /* Number of bits per pixel (<0=floating point) */ - int bitpixb; /* Number of bits per pixel in bad pixel file */ -@@ -217,7 +217,7 @@ - if (*bb++) { - *b2++ = bpvali2; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -236,7 +236,7 @@ - if (*bb++) { - *b2++ = bpvali2; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -263,7 +263,7 @@ - if (*bb++) { - *b2++ = bpvali4; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -282,7 +282,7 @@ - if (*bb++) { - *b2++ = bpvali4; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -310,7 +310,7 @@ - if (*bb++) { - *b2++ = bpvalr4; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -329,7 +329,7 @@ - if (*bb++) { - *b2++ = bpvalr4; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -355,7 +355,7 @@ - if (*bb++) { - *b2++ = bpval; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -374,7 +374,7 @@ - if (*bb++) { - *b2++ = bpval; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -407,7 +407,7 @@ - { - char *buffret; /* Modified image buffer (returned) */ - int nx,ny; /* Number of columns and rows in image */ --int ix,iy; /* Pixel around which to compute mean */ -+int ix,iy = 0; /* Pixel around which to compute mean */ - int npix; /* Number of pixels in image */ - int bitpix; /* Number of bits per pixel (<0=floating point) */ - int checkmin = 0; -@@ -450,12 +450,12 @@ - if (checkmin && *bb < mnvali2) { - *b2++ = bpvali2; - nfilled++; -- *b1++; -+ b1++; - } - else if (checkmax && *bb > mxvali2) { - *b2++ = bpvali2; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -482,12 +482,12 @@ - if (checkmin && *bb < mnvali4) { - *b2++ = bpvali4; - nfilled++; -- *b1++; -+ b1++; - } - else if (checkmax && *bb > mxvali4) { - *b2++ = bpvali4; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -514,12 +514,12 @@ - if (checkmin && *bb < mnvalr4) { - *b2++ = bpvalr4; - nfilled++; -- *b1++; -+ b1++; - } - else if (checkmax && *bb > mxvalr4) { - *b2++ = bpvalr4; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -546,12 +546,12 @@ - if (checkmin && *bb < mnvalr8) { - *b2++ = bpvalr8; - nfilled++; -- *b1++; -+ b1++; - } - else if (checkmax && *bb > mxvalr8) { - *b2++ = bpvalr8; - nfilled++; -- *b1++; -+ b1++; - } - else { - *b2++ = *b1++; -@@ -589,7 +589,7 @@ - { - char *buffret; /* Modified image buffer (returned) */ - int nx,ny; /* Number of columns and rows in image */ --int ix,iy; /* Pixel around which to compute median */ -+int ix,iy = 0; /* Pixel around which to compute median */ - int npix; /* Number of pixels in image */ - int bitpix; /* Number of bits per pixel (<0=floating point) */ - int naxes; -@@ -698,7 +698,7 @@ - { - char *buffret; /* Modified image buffer (returned) */ - int nx,ny; /* Number of columns and rows in image */ --int ix,iy; /* Pixel around which to compute median */ -+int ix,iy = 0; /* Pixel around which to compute median */ - int npix; /* Number of pixels in image */ - int bitpix; /* Number of bits per pixel (<0=floating point) */ - int naxes; -@@ -1173,7 +1173,7 @@ - { - char *buffret; /* Modified image buffer (returned) */ - int nx,ny; /* Number of columns and rows in image */ --int ix,iy; /* Pixel around which to compute mean */ -+int ix,iy = 0; /* Pixel around which to compute mean */ - int npix; /* Number of pixels in image */ - int bitpix; /* Number of bits per pixel (<0=floating point) */ - int naxes; -@@ -1278,7 +1278,7 @@ - { - char *buffret; /* Modified image buffer (returned) */ - int nx,ny; /* Number of columns and rows in image */ --int ix,iy; /* Pixel around which to compute mean */ -+int ix,iy = 0; /* Pixel around which to compute mean */ - int npix; /* Number of pixels in image */ - int bitpix; /* Number of bits per pixel (<0=floating point) */ - int naxes; -@@ -1651,7 +1651,7 @@ - { - char *buffret; /* Modified image buffer (returned) */ - int nx,ny; /* Number of columns and rows in image */ -- int ix,iy; /* Pixel around which to compute median */ -+ int ix,iy = 0; /* Pixel around which to compute median */ - int npix; /* Number of pixels in image */ - int bitpix; /* Number of bits per pixel (<0=floating point) */ - int naxes; -@@ -1752,7 +1752,7 @@ - { - char *buffret; /* Modified image buffer (returned) */ - int nx,ny; /* Number of columns and rows in image */ --int ix,iy; /* Pixel around which to compute median */ -+int ix,iy = 0; /* Pixel around which to compute median */ - int npix; /* Number of pixels in image */ - int bitpix; /* Number of bits per pixel (<0=floating point) */ - int naxes; -diff -ur wcstools-3.7.0/libwcs/proj.c wcstools-3.7.0.new/libwcs/proj.c ---- wcstools-3.7.0/libwcs/proj.c 2006-06-20 22:08:00.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/proj.c 2007-09-07 21:15:23.000000000 +0200 -@@ -3672,7 +3672,7 @@ - - { - int face; -- double cthe, eta, l, m, n, rho, xi; -+ double cthe, eta = 0, l, m, n, rho, xi = 0; - const float tol = 1.0e-7; - - float a, a2, a2b2, a4, ab, b, b2, b4, ca2, cb2; -diff -ur wcstools-3.7.0/libwcs/sdssread.c wcstools-3.7.0.new/libwcs/sdssread.c ---- wcstools-3.7.0/libwcs/sdssread.c 2007-01-10 19:24:44.000000000 +0100 -+++ wcstools-3.7.0.new/libwcs/sdssread.c 2007-09-07 21:15:41.000000000 +0200 -@@ -165,7 +165,7 @@ - - /* Dump returned file and stop */ - if (nlog < 0) { -- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); -+ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); - exit (0); - } - -diff -ur wcstools-3.7.0/libwcs/skybotread.c wcstools-3.7.0.new/libwcs/skybotread.c ---- wcstools-3.7.0/libwcs/skybotread.c 2007-07-27 20:21:27.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/skybotread.c 2007-09-07 21:42:18.000000000 +0200 -@@ -125,12 +125,11 @@ - int nlog; /* 1 for diagnostics */ - { - char srchurl[LINE]; -- char cmag; - char *obs; - char *dstr; - struct TabTable *tabtable; - struct StarCat *starcat; /* Star catalog data structure */ -- double dtemp, jdout; -+ double jdout; - int nstar, nlog0; - double ra, dec, mag, dradi, dradx; - char rastr[32], decstr[32], temp[256], tstr[80]; -@@ -281,29 +280,22 @@ - - char *skybuff; /* Input comma-separated table */ - { -- char *heading; - char *colhead; - char *colsep; - char *tabbuff; /* Output tab-separated table */ - char *tbuff; -- char *databuff; - char *dbuff; - char *buffer; - char *lastbuff; -- char *endhead; - char *colend; -- char *chead; -- char *head; - char *tbuffi; - char temp[16], format[16]; - int lbuff, i, lra, icol; -- int lhead, ldata; -+ int lhead; - int addname; - int lobj; - char cbuff; -- char *buff; - char cbar = '|'; -- char ccom = ','; - char cminus = '-'; - char cspace = ' '; - char ctab = (char) 9; -diff -ur wcstools-3.7.0/libwcs/tabread.c wcstools-3.7.0.new/libwcs/tabread.c ---- wcstools-3.7.0/libwcs/tabread.c 2007-07-23 23:02:01.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/tabread.c 2007-09-07 21:43:33.000000000 +0200 -@@ -147,7 +147,7 @@ - int lname; - int imag; - double ra,dec, rapm, decpm; -- double mag, parallax, rv; -+ double mag = 0, parallax, rv; - double num; - int peak, i; - int istar, nstars, lstar; -@@ -596,7 +596,7 @@ - } - - /* Check ID number first */ -- (void) setoken (&startok, line, "tab"); -+ setoken (&startok, line, "tab"); - if (!strcmp (sc->isfil,"gsc-server")) { - if (tabgetc (&startok, sc->entid, str, 24)) - num = 0.0; -@@ -782,7 +782,7 @@ - int nstar; - int imag; - double ra,dec, rapm, decpm; -- double mag, parallax, rv; -+ double mag = 0, parallax, rv; - double num; - int peak; - int istar, nstars, lstar; -@@ -2163,7 +2163,7 @@ - tabtable->lline = (nextline - tabtable->tabdata) * 2; - tabtable->tabline = (char *) calloc (tabtable->lline, 1); - fseek (tabtable->tcat, (long) tabtable->lhead, SEEK_SET); -- (void) fgets (tabtable->tabline, tabtable->lline, tabtable->tcat); -+ fgets (tabtable->tabline, tabtable->lline, tabtable->tcat); - lline = strlen (tabtable->tabline); - if (tabtable->tabline[lline-1] < 32) - tabtable->tabline[lline-1] = (char) 0; -@@ -2173,7 +2173,7 @@ - /* Close catalog file if not reading one line at a time */ - else { - tabtable->lhead = 0; -- (void) fclose (fcat); -+ fclose (fcat); - tabtable->tcat = NULL; - } - -@@ -2245,7 +2245,7 @@ - fseek (tabtable->tcat, (long) tabtable->lhead, SEEK_SET); - tabtable->iline = 0; - for (i = tabtable->iline; i < iline; i++) { -- (void) fgets (tabtable->tabline, tabtable->lline, tabtable->tcat); -+ fgets (tabtable->tabline, tabtable->lline, tabtable->tcat); - tabtable->iline++; - } - lline = strlen (tabtable->tabline); -@@ -2648,7 +2648,6 @@ - return (0); - } - -- - /* Search table of column headings for first with string (case-independent) */ - - static int -diff -ur wcstools-3.7.0/libwcs/tmcread.c wcstools-3.7.0.new/libwcs/tmcread.c ---- wcstools-3.7.0/libwcs/tmcread.c 2007-01-10 19:09:43.000000000 +0100 -+++ wcstools-3.7.0.new/libwcs/tmcread.c 2007-09-07 21:38:33.000000000 +0200 -@@ -105,7 +105,7 @@ - double eqref=2000.0; /* Catalog equinox */ - double epref=2000.0; /* Catalog epoch */ - double size = 0.0; /* Semi-major axis of extended source */ -- struct StarCat *starcat; -+ struct StarCat *starcat = NULL; - struct Star *star; - int verbose; - int wrap; -@@ -529,7 +529,7 @@ - int sysref=WCS_J2000; /* Catalog coordinate system */ - double eqref=2000.0; /* Catalog equinox */ - double epref=2000.0; /* Catalog epoch */ -- struct StarCat *starcat; -+ struct StarCat *starcat = NULL; - struct Star *star; - char *str; - -diff -ur wcstools-3.7.0/libwcs/wcs.c wcstools-3.7.0.new/libwcs/wcs.c ---- wcstools-3.7.0/libwcs/wcs.c 2007-07-25 20:54:55.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/wcs.c 2007-09-07 21:37:11.000000000 +0200 -@@ -1415,8 +1415,8 @@ - double x2,y2; /* (RA,Dec) or (Long,Lat) in degrees */ - - { -- double xr1, xr2, yr1, yr2, r, diffi; -- double pos1[3], pos2[3], w, diff, cosb; -+ double diffi, r; -+ double pos1[3], pos2[3], w, diff; - int i; - - /* Convert two vectors to direction cosines */ -diff -ur wcstools-3.7.0/libwcs/wcsinit.c wcstools-3.7.0.new/libwcs/wcsinit.c ---- wcstools-3.7.0/libwcs/wcsinit.c 2007-04-28 01:25:47.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/wcsinit.c 2007-09-07 21:18:43.000000000 +0200 -@@ -1082,7 +1082,7 @@ - static void - wcseq (hstring, wcs) - --char *hstring; /* character string containing FITS header information -+const char *hstring; /* character string containing FITS header information - in the format = [/ ] */ - struct WorldCoor *wcs; /* World coordinate system data structure */ - { -diff -ur wcstools-3.7.0/libwcs/webread.c wcstools-3.7.0.new/libwcs/webread.c ---- wcstools-3.7.0/libwcs/webread.c 2007-08-28 17:27:19.000000000 +0200 -+++ wcstools-3.7.0.new/libwcs/webread.c 2007-09-07 21:38:10.000000000 +0200 -@@ -252,7 +252,7 @@ - - /* Dump returned file and stop */ - if (nlog < 0) { -- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); -+ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); - exit (0); - } - -@@ -378,7 +378,7 @@ - - /* Dump returned file and stop */ - if (nlog < 0) { -- (void) fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); -+ fwrite (tabtable->tabbuff, tabtable->lbuff, 1, stdout); - exit (0); - } - -@@ -612,7 +612,7 @@ - fflush(sok); - free (server); - -- (void) fscanf(sok, "%*s %d %*s\r\n", &status); -+ fscanf(sok, "%*s %d %*s\r\n", &status); - - /* Skip continue lines - if (status == 100) { -@@ -647,7 +647,7 @@ - *lbuff = 0; - ltbuff = 0; - while (lline > 0) { -- (void) fgets (linebuff, LINE, sok); -+ fgets (linebuff, LINE, sok); - lline = strlen (linebuff); - if (lline < 1) - break; -@@ -689,7 +689,7 @@ - else { - buff = tabbuff + lcbuff; - } -- (void) fread (buff, 1, lchunk, sok); -+ fread (buff, 1, lchunk, sok); - buff[lchunk] = (char) 0; - if (diag) - fprintf (stderr, "%s\n", buff); -@@ -730,7 +730,7 @@ - fprintf (stderr, "%s\n", buff); - } - } -- (void) fclose (sok); -+ fclose (sok); - - return (tabbuff); - } -@@ -864,7 +864,7 @@ - space2tab (tabbuff) - char *tabbuff; /* Tab table filled with spaces */ - { -- char *newbuff, *line0, *line1, *ic, *icn, *tstart; -+ char *newbuff, *line0, *line1, *ic, *icn; - char cspace, ctab, cdash; - int lbuff; - int alltab = 0; -diff -ur wcstools-3.7.0/scat.c wcstools-3.7.0.new/scat.c ---- wcstools-3.7.0/scat.c 2007-08-30 23:47:03.000000000 +0200 -+++ wcstools-3.7.0.new/scat.c 2007-09-07 21:31:23.000000000 +0200 -@@ -1101,7 +1101,7 @@ - double crao, cdeco; /* Output center long/lat or RA/Dec in degrees */ - double epout = 0.0; - int ng; /* Number of catalog stars */ -- int ns; /* Number of brightest catalog stars actually used */ -+ int ns = 0; /* Number of brightest catalog stars actually used */ - struct Range *range = NULL; /* Range of catalog numbers to list */ - int nfind; /* Number of stars to find */ - int i, is, j, ngmax, nc; -@@ -1122,7 +1122,7 @@ - int nlog; - int magsort; - int typecol; -- int band; -+ int band = 0; - int imag, nmagr; - int sysout = 0; - char sortletter = (char) 0; -@@ -2366,7 +2366,7 @@ - printf (" %5.2f %5.2f %5.2f %5.2f %5.2f", - gm[0][0],gm[1][0],gm[2][0],gm[4][0],gm[5][0]); - else -- printf (" %5.2f %5.2f %5.2f %5.2f", -+ printf (" %5.2f %5.2f %5.2f %5.2f %5.2f", - gm[0][0],gm[1][0],gm[2][0],gm[4][0],gm[5][0]); - } - else if (refcat == HIP) { -diff -ur wcstools-3.7.0/setpix.c wcstools-3.7.0.new/setpix.c ---- wcstools-3.7.0/setpix.c 2007-08-30 23:47:03.000000000 +0200 -+++ wcstools-3.7.0.new/setpix.c 2007-09-07 21:22:50.000000000 +0200 -@@ -258,9 +258,9 @@ - int lhead; /* Maximum number of bytes in FITS header */ - int nbhead; /* Actual number of bytes in FITS header */ - int iraffile; /* 1 if IRAF image */ -- char *irafheader; /* IRAF image header */ -+ char *irafheader = NULL; /* IRAF image header */ - int i, lext, lroot; -- int nx, ny, ix, iy, x, y, ipix; -+ int nx, ny, ix, iy, x, y, ipix = 0; - char *imext, *imext1; - double bzero; /* Zero point for pixel scaling */ - double bscale; /* Scale factor for pixel scaling */ -diff -ur wcstools-3.7.0/wcshead.c wcstools-3.7.0.new/wcshead.c ---- wcstools-3.7.0/wcshead.c 2007-08-30 23:47:04.000000000 +0200 -+++ wcstools-3.7.0.new/wcshead.c 2007-09-07 21:23:35.000000000 +0200 -@@ -211,7 +211,7 @@ - char *GetFITShead(); - char rastr[32], decstr[32], fform[8]; - struct WorldCoor *wcs, *GetWCSFITS(); -- double wfrst, dwl, wlast, dxpix, zvel, vel; -+ double wfrst, dwl, wlast, dxpix, zvel = 0, vel; - int logwav = 0; - - if (rootdir){ -diff -ur wcstools-3.7.0/xy2sky.c wcstools-3.7.0.new/xy2sky.c ---- wcstools-3.7.0/xy2sky.c 2007-08-30 23:47:04.000000000 +0200 -+++ wcstools-3.7.0.new/xy2sky.c 2007-09-07 21:32:39.000000000 +0200 -@@ -46,9 +46,9 @@ - static int ncm = 0; - static int printhead = 0; - static char printonly = 'n'; --static int centerset = 0; -+/*static int centerset = 0; - static int sizeset = 0; --static int scaleset = 0; -+static int scaleset = 0;*/ - static int version = 0; /* If 1, print only program name and version */ - - static char *RevMsg = "XY2SKY WCSTools 3.7.0, 30 August 2007, Doug Mink (dmink@cfa.harvard.edu)"; -@@ -70,9 +70,9 @@ - int entmag = 0; - int i, ic; - double x, y, mag; -- double cra, cdec, dra, ddec, secpix, drot; -+ double cra, cdec, dra, ddec, secpix;/*, drot;*/ - double eqout = 0.0; -- double eqin = 0.0; -+ /*double eqin = 0.0;*/ - int sysout = 0; - int wp, hp, nx, ny, lhead; - FILE *fd = NULL; -@@ -82,7 +82,7 @@ - char *header; - char *fn; - int bitpix = 0; -- struct WorldCoor *wcs; -+ struct WorldCoor *wcs = NULL; - char xstr[32], ystr[32], mstr[32]; - char rastr[32], decstr[32]; - char keyword[16]; diff --git a/wcstools3-shared.patch b/wcstools3-shared.patch deleted file mode 100644 index a819e16..0000000 --- a/wcstools3-shared.patch +++ /dev/null @@ -1,103 +0,0 @@ -diff -ur wcstools-3.6.7.old/libwcs/Makefile wcstools-3.6.7/libwcs/Makefile ---- wcstools-3.6.7.old/libwcs/Makefile 2007-01-10 20:26:36.000000000 +0100 -+++ wcstools-3.6.7/libwcs/Makefile 2007-02-26 15:42:32.000000000 +0100 -@@ -11,10 +11,18 @@ - sortstar.o platefit.o iget.o fileutil.o \ - wcslib.o lin.o cel.o proj.o sph.o wcstrig.o distort.o - -+all: libwcs.a libwcs.so.3.0.0 -+ - libwcs.a: $(OBJS) - ar rv $@ $? - ranlib $@ - -+libwcs.so.3.0.0: $(OBJS) -+ $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname,libwcs.so.3 $? -+ ln -s libwcs.so.3.0.0 libwcs.so.3 -+ ln -s libwcs.so.3.0.0 libwcs.so -+ -+ - actread.o: fitsfile.h wcscat.h wcs.h fitshead.h wcslib.h - binread.o: wcscat.h wcs.h fitshead.h wcslib.h - ctgread.o: wcscat.h wcs.h fitshead.h wcslib.h -@@ -64,4 +72,4 @@ - worldpos.o: wcs.h fitshead.h wcslib.h - - clean: -- rm -f *.a *.o -+ rm -f *.a *.o *.so* ---- wcstools-3.6.8.old/Makefile 2007-02-28 21:44:24.000000000 +0100 -+++ wcstools-3.6.8/Makefile 2007-03-19 17:36:28.000000000 +0100 -@@ -1,6 +1,6 @@ - CFLAGS= -g - CC= cc --LIBWCS = libwcs/libwcs.a -+LIBWCS = -L`pwd`/libwcs -lwcs - LIBS = $(LIBWCS) -lm - #CATLIBS = $(LIBS) -lnsl -lsocket - CATLIBS = $(LIBS) -@@ -19,10 +19,10 @@ - $(CC) $(CFLAGS) -o $(BIN)/addpix addpix.c $(LIBS) - - bincat: bincat.c $(LIBWCS) libwcs/fitsfile.h libwcs/wcs.h -- $(CC) $(CFLAGS) -o $(BIN)/bincat bincat.c $(CATLIBS) -+ $(CC) $(CFLAGS) -o $(BIN)/bincat bincat.c $(LIBS) - - char2sp: char2sp.c $(LIBWCS) libwcs/fitsfile.h -- $(CC) $(CFLAGS) -o $(BIN)/char2sp char2sp.c $(LIBWCS) -+ $(CC) $(CFLAGS) -o $(BIN)/char2sp char2sp.c $(LIBS) - - conpix: conpix.c $(LIBWCS) libwcs/fitsfile.h - $(CC) $(CFLAGS) -o $(BIN)/conpix conpix.c $(LIBS) -@@ -151,7 +151,7 @@ - $(CC) $(CFLAGS) -o $(BIN)/skycoor skycoor.c $(CATLIBS) - - sp2char: sp2char.c $(LIBWCS) libwcs/fitsfile.h -- $(CC) $(CFLAGS) -o $(BIN)/sp2char sp2char.c $(LIBWCS) -+ $(CC) $(CFLAGS) -o $(BIN)/sp2char sp2char.c $(LIBS) - - subpix: subpix.c $(LIBWCS) libwcs/fitsfile.h - $(CC) $(CFLAGS) -o $(BIN)/subpix subpix.c $(LIBS) -@@ -169,13 +169,13 @@ - $(CC) $(CFLAGS) -o $(BIN)/simpos simpos.c $(CATLIBS) - - $(LIBWCS): libwcs/*.c libwcs/*.h -- cd libwcs; make -+ $(MAKE) -C libwcs - - objclean: -- cd libwcs; make clean -+ $(MAKE) -C libwcs clean - - binclean: - rm -f ./bin/* - - clean: -- make objclean; make binclean -+ $(MAKE) objclean; $(MAKE) binclean -diff -ur wcstools-3.6.8/libwcs/imhfile.c wcstools-3.6.8.new/libwcs/imhfile.c ---- wcstools-3.6.8/libwcs/imhfile.c 2007-03-19 18:26:41.000000000 +0100 -+++ wcstools-3.6.8.new/libwcs/imhfile.c 2007-03-19 18:40:26.000000000 +0100 -@@ -1036,11 +1036,11 @@ - int len; - char *newpixname; - -- newpixname = (char *) calloc (SZ_IM2PIXFILE, 1); -+ newpixname = (char *) calloc (SZ_IM2PIXFILE + 1, sizeof(char)); - - /* Pixel file is in same directory as header */ - if (strncmp(pixname, "HDR$", 4) == 0 ) { -- (void)strncpy (newpixname, hdrname, SZ_IM2PIXFILE); -+ strncpy (newpixname, hdrname, SZ_IM2PIXFILE); - - /* find the end of the pathname */ - len = strlen (newpixname); -@@ -1053,7 +1053,7 @@ - - /* add name */ - newpixname[len] = '\0'; -- (void)strncat (newpixname, &pixname[4], SZ_IM2PIXFILE); -+ strncat (newpixname, &pixname[4], SZ_IM2PIXFILE); - } - - /* Bare pixel file with no path is assumed to be same as HDR$filename */