Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Fedora Release Engineering
104c1bfd17 dist-git conversion 2010-07-29 15:13:46 +00:00
e7b4732bc6 - Updated wcstools3-shared.patch
- Missing .1 in EVR
2010-02-03 18:35:54 +00:00
afb7ac7849 - Updated wcstools3-shared.patch 2010-02-03 18:32:03 +00:00
725ba4d1bd - New upstream source
- Patch to fix bz #559863 from upstream
2010-02-03 18:27:57 +00:00
Bill Nottingham
1138900381 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:15:40 +00:00
Jesse Keating
e82e1c16a4 Initialize branch F-11 for wcstools 2009-04-15 06:12:32 +00:00
8 changed files with 223 additions and 1194 deletions

View file

View file

@ -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)

View file

@ -1 +1 @@
bda2748ab4a60e196e3621cc7fa47eda wcstools-3.7.0.tar.gz
f70c3f94dd9ec110515571f336da4110 wcstools-3.8.1.tar.gz

View file

@ -1,6 +1,6 @@
Name: wcstools
Version: 3.7.0
Release: 7%{?dist}
Version: 3.8.1
Release: 1%{?dist}.1
Summary: Software utilities to display and manipulate the WCS of a FITS image
Group: Applications/Engineering
@ -8,8 +8,7 @@ License: GPLv2+
URL: http://tdc-www.harvard.edu/wcstools
Source0: http://tdc-www.harvard.edu/software/wcstools/%{name}-%{version}.tar.gz
Patch0: wcstools3-shared.patch
Patch1: wcstools3-codewarn.patch
Patch2: wcstools3-bug232413.patch
Patch1: wcstools3-bug559863.patch
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
@ -23,7 +22,6 @@ search star catalogs and manipulate images.
Summary: Wcstools shared library
Group: System Environment/Libraries
License: LGPLv2+
Obsoletes: libwcs < 3.7.0-4
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@ -36,15 +34,13 @@ Summary: Libraries, includes, etc. used to develop an application with wcstools
Group: Development/Libraries
License: LGPLv2+
Requires: %{name}-libs = %{version}-%{release}
Obsoletes: libwcs-devel < 3.7.0-4
%description devel
This are the files needed to develop an application using wcstools.
These are the files needed to develop an application using wcstools.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%{__make} CC="%{__cc}" CFLAGS="%{optflags} -fPIC" all
@ -69,23 +65,31 @@ This are the files needed to develop an application using wcstools.
%files
%doc NEWS COPYING Readme Programs
%defattr(-,root,root)
%defattr(-,root,root,-)
%{_bindir}/*
%{_mandir}/man1/*
%files libs
%defattr(-,root,root)
%defattr(-,root,root,-)
%doc libwcs/COPYING
%{_libdir}/*.so.*
%files devel
%doc libwcs/COPYING libwcs/NEWS
%defattr(-,root,root)
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_includedir}/wcs
%changelog
* Tue Feb 03 2010 Sergio Pascual <sergiopr at fedoraproject.org> 3.8.1-1.1
- Updated wcstools3-shared.patch
- Missing .1 in EVR
* Tue Feb 03 2010 Sergio Pascual <sergiopr at fedoraproject.org> 3.8.1-1
- New upstream source
- Patch to fix bz #559863 from upstream
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.7.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

View file

@ -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);

195
wcstools3-bug559863.patch Normal file
View file

@ -0,0 +1,195 @@
diff -ur wcstools-3.8.1/libwcs/wcs.c wcstools-3.8.1.new/libwcs/wcs.c
--- wcstools-3.8.1/libwcs/wcs.c 2008-02-27 20:07:29.000000000 +0100
+++ wcstools-3.8.1.new/libwcs/wcs.c 2010-02-03 18:44:51.000000000 +0100
@@ -1,8 +1,8 @@
/*** File libwcs/wcs.c
- *** July 25, 2007
+ *** February 3, 2010
*** By Doug Mink, dmink@cfa.harvard.edu
*** Harvard-Smithsonian Center for Astrophysics
- *** Copyright (C) 1994-2007
+ *** Copyright (C) 1994-2010
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
This library is free software; you can redistribute it and/or
@@ -90,7 +90,6 @@
static char wcserrmsg[80];
static char wcsfile[256]={""};
static void wcslibrot();
-void wcsrotset();
static int wcsproj0 = 0;
static int izpix = 0;
static double zpix = 0.0;
@@ -334,7 +333,6 @@
int i, iproj;
int nctype = 32;
char ctypes[32][4];
- char dtypes[10][4];
/* Initialize projection types */
strcpy (ctypes[0], "LIN");
@@ -370,27 +368,28 @@
strcpy (ctypes[30], "PLT");
strcpy (ctypes[31], "TNX");
- /* Initialize distortion types */
- strcpy (dtypes[1], "SIP");
+ /* First coordinate type */
if (!strncmp (ctype1, "LONG",4))
strncpy (ctype1, "XLON",4);
- strcpy (wcs->ctype[0], ctype1);
- strcpy (wcs->c1type, ctype1);
- strcpy (wcs->ptype, ctype1);
-
/* Linear coordinates */
- if (!strncmp (ctype1,"LINEAR",6))
+ if (!strncmp (ctype1,"LINEAR",6)) {
wcs->prjcode = WCS_LIN;
+ strcpy (wcs->ctype[0], "LINEAR");
+ }
/* Pixel coordinates */
- else if (!strncmp (ctype1,"PIXEL",6))
+ else if (!strncmp (ctype1,"PIXEL",5)) {
wcs->prjcode = WCS_PIX;
+ strcpy (wcs->ctype[0], "PIXEL");
+ }
/*Detector pixel coordinates */
- else if (strsrch (ctype1,"DET"))
+ else if (strsrch (ctype1,"DET")) {
wcs->prjcode = WCS_PIX;
+ strcpy (wcs->ctype[0], "PIXEL");
+ }
/* Set up right ascension, declination, latitude, or longitude */
else if (ctype1[0] == 'R' || ctype1[0] == 'D' ||
@@ -483,9 +482,13 @@
/* If not sky coordinates, assume linear */
else {
wcs->prjcode = WCS_LIN;
+ strcpy (wcs->ctype[0], "LINEAR");
return (0);
}
+ strcpy (wcs->c1type, wcs->ctype[0]);
+ strcpy (wcs->ptype, wcs->ctype[0]);
+
/* Second coordinate type */
if (!strncmp (ctype2, "NPOL",4)) {
ctype2[0] = ctype1[0];
@@ -503,16 +506,18 @@
}
else
wcs->latbase = 0;
- strcpy (wcs->ctype[1], ctype2);
- strcpy (wcs->c2type, ctype2);
/* Linear coordinates */
- if (!strncmp (ctype2,"LINEAR",6))
+ if (!strncmp (ctype2,"LINEAR",6)) {
wcs->prjcode = WCS_LIN;
+ strcpy (wcs->ctype[1], "LINEAR");
+ }
/* Pixel coordinates */
- else if (!strncmp (ctype2,"PIXEL",6))
+ else if (!strncmp (ctype2,"PIXEL",5)) {
wcs->prjcode = WCS_PIX;
+ strcpy (wcs->ctype[1], "PIXEL");
+ }
/* Set up right ascension, declination, latitude, or longitude */
else if (ctype2[0] == 'R' || ctype2[0] == 'D' ||
@@ -564,7 +569,9 @@
/* If not sky coordinates, assume linear */
else {
wcs->prjcode = WCS_LIN;
+ strcpy (wcs->ctype[1], "LINEAR");
}
+ strcpy (wcs->c2type, wcs->ctype[1]);
/* Set distortion code from CTYPE1 extension */
setdistcode (wcs, ctype1);
@@ -2934,4 +2941,7 @@
* Feb 23 2007 Fix bug when checking for "DET" in CTYPEi
* Apr 2 2007 Fix PC to CD matrix conversion
* Jul 25 2007 Compute distance between two coordinates using d2v3()
+ *
+ * Jan 11 2010 Move declaration of wcsrotset() to wcs.h
+ * Feb 3 2010 Fix wcstype() to copy only first 8 char of CTYPEs into wcs
*/
diff -ur wcstools-3.8.1/libwcs/wcsinit.c wcstools-3.8.1.new/libwcs/wcsinit.c
--- wcstools-3.8.1/libwcs/wcsinit.c 2009-03-24 20:58:36.000000000 +0100
+++ wcstools-3.8.1.new/libwcs/wcsinit.c 2010-02-03 18:46:16.000000000 +0100
@@ -1,8 +1,8 @@
/*** File libwcs/wcsinit.c
- *** March 24, 2009
+ *** February 3, 2010
*** By Doug Mink, dmink@cfa.harvard.edu
*** Harvard-Smithsonian Center for Astrophysics
- *** Copyright (C) 1998-2009
+ *** Copyright (C) 1998-2010
*** Smithsonian Astrophysical Observatory, Cambridge, MA, USA
This library is free software; you can redistribute it and/or
@@ -50,7 +50,6 @@
static void wcseq();
static void wcseqm();
static void wcsioset();
-void wcsrotset();
char wcschar();
/* set up a WCS structure from a FITS image header lhstring bytes long
@@ -243,9 +242,6 @@
int nax;
int twod;
int iszpx = 0;
- extern int tnxinit();
- extern int platepos();
- extern int dsspos();
wcs = (struct WorldCoor *) calloc (1, sizeof(struct WorldCoor));
@@ -423,25 +419,23 @@
ctype2[7] = 'N';
}
}
- strcpy (wcs->ctype[0], ctype1);
- strcpy (wcs->ctype[1], ctype2);
if (strsrch (ctype2, "LAT") || strsrch (ctype2, "DEC"))
ilat = 2;
else
ilat = 1;
- /* Read third and fourth coordinate types, if present */
- strcpy (wcs->ctype[2], "");
- hgetsc (hstring, "CTYPE3", &mchar, 9, wcs->ctype[2]);
- strcpy (wcs->ctype[3], "");
- hgetsc (hstring, "CTYPE4", &mchar, 9, wcs->ctype[3]);
-
/* Set projection type in WCS data structure */
if (wcstype (wcs, ctype1, ctype2)) {
wcsfree (wcs);
return (NULL);
}
+ /* Read third and fourth coordinate types, if present */
+ strcpy (wcs->ctype[2], "");
+ hgetsc (hstring, "CTYPE3", &mchar, 9, wcs->ctype[2]);
+ strcpy (wcs->ctype[3], "");
+ hgetsc (hstring, "CTYPE4", &mchar, 9, wcs->ctype[3]);
+
/* Get units, if present, for linear coordinates */
if (wcs->prjcode == WCS_LIN) {
if (!hgetsc (hstring, "CUNIT1", &mchar, 16, wcs->units[0])) {
@@ -1380,4 +1374,7 @@
* Jun 27 2008 If NAXIS1 and NAXIS2 not present, check for IMAGEW and IMAGEH
*
* Mar 24 2009 Fix dimension bug if NAXISi not present (fix from John Burns)
+ *
+ * Jan 11 2010 Move all external declarations to header files
+ * Feb 3 2010 Do not copy CTYPE1 and CTYPE2 into wcs structure directly
*/

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
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 @@
diff -ur wcstools-3.8.1/libwcs/Makefile wcstools-3.8.1.new/libwcs/Makefile
--- wcstools-3.8.1/libwcs/Makefile 2007-07-13 21:54:05.000000000 +0200
+++ wcstools-3.8.1.new/libwcs/Makefile 2010-01-30 01:17:58.000000000 +0100
@@ -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
@ -12,92 +12,27 @@ diff -ur wcstools-3.6.7.old/libwcs/Makefile wcstools-3.6.7/libwcs/Makefile
ranlib $@
+libwcs.so.0.0.0: $(OBJS)
+ $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname,libwc.so.0 $?
+ $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname,libwc.so.0 $? -lm
+ ln -s libwcs.so.0.0.0 libwcs.so.0
+ ln -s libwcs.so.0.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 @@
@@ -65,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
diff -ur wcstools-3.8.1/Makefile wcstools-3.8.1.new/Makefile
--- wcstools-3.8.1/Makefile 2009-01-05 23:58:59.000000000 +0100
+++ wcstools-3.8.1.new/Makefile 2010-01-30 01:24:32.000000000 +0100
@@ -1,6 +1,6 @@
CFLAGS= -g
CC= cc
-LIBWCS = libwcs/libwcs.a
+LIBWCS = -L`pwd`/libwcs -lwcs
+LIBWCS = -L./libwcs -lwcs
LIBNED = libned/libned.a
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 */
#LIBS = $(LIBWCS) -lm -lnsl -lsocket