rpms/wcstools/devel wcstools.spec, NONE, 1.1 wcstools3-codewarn.patch, NONE, 1.1 wcstools3-shared.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Sergio Pascual (sergiopr) fedora-extras-commits at redhat.com
Mon Jun 26 17:27:53 UTC 2006


Author: sergiopr

Update of /cvs/extras/rpms/wcstools/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18655/devel

Modified Files:
	.cvsignore sources 
Added Files:
	wcstools.spec wcstools3-codewarn.patch wcstools3-shared.patch 
Log Message:
auto-import wcstools-3.6.5-1 on branch devel from wcstools-3.6.5-1.src.rpm


--- NEW FILE wcstools.spec ---
Name: wcstools
Version: 3.6.5
Release: 1%{?dist}
Summary: Software utilities to display and manipulate the WCS of a FITS image

Group: Applications/Engineering
License: GPL
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
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)


%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
search star catalogs and manipulate images.

%package -n libwcs
Summary: Libwcs shared library 
Group: System Environment/Libraries
License: LGPL

Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig

%description -n libwcs
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: LGPL
Requires: %{name} = %{version}-%{release}
%description -n libwcs-devel
This are the files needed to develop an application using libwcs.

%prep
%setup -q
%patch0 -p1
%patch1 -p1

%build
%{__make} CC=%{__cc} CFLAGS="%{optflags} -fPIC" all

%install
%{__rm} -rf %{buildroot}
%{__mkdir_p} %{buildroot}%{_libdir}
%{__mkdir_p} %{buildroot}%{_bindir}
%{__mkdir_p} %{buildroot}%{_includedir}/wcs
%{__mkdir_p} %{buildroot}%{_mandir}/man1
%{__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

%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)
%{_bindir}/*
%{_mandir}/man1/*

%files -n libwcs
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n libwcs-devel
%doc libwcs/COPYING libwcs/NEWS
%defattr(-,root,root)
%{_libdir}/*.so
%{_includedir}/wcs


%changelog
* Fri Jun 21 2006 Sergio Pascual <spr at astrax.fis.ucm.es> 3.6.5-1
- New upstream source 3.6.5
* Tue Jun 13 2006 Sergio Pascual <spr at astrax.fis.ucm.es> 3.6.4-3
- Patched overflows in catutil.c and getdate.c
- Patched incompatible pointer in binread.c
* Mon Jun 12 2006 Sergio Pascual <spr at astrax.fis.ucm.es> 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 <spr at astrax.fis.ucm.es> 3.6.4-1
- Removed not needed ldconfig in wcstools and libwcs-devel.
* Wed Mar 08 2006 Sergio Pascual <spr at astrax.fis.ucm.es> 3.6.3-1
- Initial RPM file.

wcstools3-codewarn.patch:

--- NEW FILE wcstools3-codewarn.patch ---
diff -ur wcstools-3.6.5.orig/getdate.c wcstools-3.6.5/getdate.c
--- wcstools-3.6.5.orig/getdate.c	2006-06-22 01:46:49.000000000 +0200
+++ wcstools-3.6.5/getdate.c	2006-06-23 10:23:36.000000000 +0200
@@ -382,7 +382,7 @@
     char outform[16];
     char *fitsdate, *newfdate;
     char temp[64];
-    char ts0[8];
+    char ts0[9];
     char *tchar;
     int its, its1;
     time_t lts;
diff -ur wcstools-3.6.5.orig/libwcs/binread.c wcstools-3.6.5/libwcs/binread.c
--- wcstools-3.6.5.orig/libwcs/binread.c	2006-06-20 22:07:37.000000000 +0200
+++ wcstools-3.6.5/libwcs/binread.c	2006-06-23 10:24:39.000000000 +0200
@@ -1358,7 +1358,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.6.5.orig/libwcs/catutil.c wcstools-3.6.5/libwcs/catutil.c
--- wcstools-3.6.5.orig/libwcs/catutil.c	2006-06-20 21:05:14.000000000 +0200
+++ wcstools-3.6.5/libwcs/catutil.c	2006-06-23 10:29:31.000000000 +0200
@@ -722,7 +722,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

wcstools3-shared.patch:

--- NEW FILE wcstools3-shared.patch ---
diff -ur wcstools-3.6.4.orig/libwcs/Makefile wcstools-3.6.4/libwcs/Makefile
--- wcstools-3.6.4.orig/libwcs/Makefile	2006-04-19 22:10:07.000000000 +0200
+++ wcstools-3.6.4/libwcs/Makefile	2006-06-12 13:24:01.000000000 +0200
@@ -1,5 +1,4 @@
-CFLAGS= -g
-CC= cc
+CFLAGS =
 
 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 polfit.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
@@ -65,4 +71,4 @@
 worldpos.o:	wcs.h fitshead.h wcslib.h
 
 clean:
-	rm -f *.a *.o
+	rm -f *.a *.o *.so*
diff -ur wcstools-3.6.4.orig/Makefile wcstools-3.6.4/Makefile
--- wcstools-3.6.4.orig/Makefile	2006-04-26 00:14:19.000000000 +0200
+++ wcstools-3.6.4/Makefile	2006-06-12 13:19:10.000000000 +0200
@@ -1,8 +1,5 @@
-CFLAGS= -g
-CC= cc
-LIBWCS = libwcs/libwcs.a
-LIBS = $(LIBWCS) -lm
-#CATLIBS = $(LIBS) -lnsl -lsocket
+LIBWCS = libwcs/libwcs.so
+LIBS = -L./libwcs -lwcs -lm
 CATLIBS = $(LIBS)
 BIN = bin
 .PRECIOUS: ${LIBWCS}
@@ -22,7 +19,7 @@
 	$(CC) $(CFLAGS) -o $(BIN)/bincat bincat.c $(CATLIBS)
 
 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 +148,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 +166,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


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/wcstools/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	26 Jun 2006 17:27:15 -0000	1.1
+++ .cvsignore	26 Jun 2006 17:27:53 -0000	1.2
@@ -0,0 +1 @@
+wcstools-3.6.5.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/wcstools/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	26 Jun 2006 17:27:15 -0000	1.1
+++ sources	26 Jun 2006 17:27:53 -0000	1.2
@@ -0,0 +1 @@
+9cd9bbbe1408c2d92728d8f039291fb3  wcstools-3.6.5.tar.gz




More information about the scm-commits mailing list