From c2d0e059d1715c4e256310bb129cd40ce0ddd878 Mon Sep 17 00:00:00 2001 From: Sergio Pascual Date: Tue, 24 Apr 2012 16:55:03 +0200 Subject: [PATCH] Updated to 3.300 - Reorganized patches (zlib patch was lost somehow) --- cfitsio-zlib.patch | 58 ++++++++++++++++++++++++++++++++-------------- cfitsio.patch | 20 ++++++++++++---- cfitsio.spec | 19 +++++++++------ makefile.patch | 12 ---------- sources | 2 +- 5 files changed, 69 insertions(+), 42 deletions(-) delete mode 100644 makefile.patch diff --git a/cfitsio-zlib.patch b/cfitsio-zlib.patch index 20ec73e..2d54060 100644 --- a/cfitsio-zlib.patch +++ b/cfitsio-zlib.patch @@ -1,18 +1,40 @@ ---- cfitsio/cfitsio.pc.in.orig 2012-04-11 14:48:16.000000000 -0600 -+++ cfitsio/cfitsio.pc.in 2012-04-13 10:10:54.545363858 -0600 -@@ -1,11 +1,11 @@ - prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ --includedir=@includedir@ -+includedir=@includedir@/cfitsio - - Name: cfitsio - Description: FITS File Subroutine Library - Version: 3.30 --Libs: -L${libdir} -lcfitsio @LIBS@ --Libs.private: -lm --Cflags: -I${includedir} -+Libs: -L${libdir} -lcfitsio -+Libs.private: @LIBS@ -lm -+Cflags: -D_REENTRANT -I${includedir} +diff -ur cfitsio/Makefile.in cfitsio-zlib/Makefile.in +--- cfitsio/Makefile.in 2012-04-24 14:19:09.307351928 +0200 ++++ cfitsio-zlib/Makefile.in 2012-04-24 14:19:40.906582888 +0200 +@@ -52,9 +52,7 @@ + putcolj.c putcolk.c putcoluk.c putcoll.c putcols.c putcolsb.c \ + putcolu.c putcolui.c putcoluj.c putkey.c region.c scalnull.c \ + swapproc.c wcssub.c wcsutil.c imcompress.c quantize.c ricecomp.c \ +- pliocomp.c fits_hcompress.c fits_hdecompress.c zuncompress.c zcompress.c \ +- adler32.c crc32.c inffast.c inftrees.c trees.c zutil.c \ +- deflate.c infback.c inflate.c uncompr.c \ ++ pliocomp.c fits_hcompress.c fits_hdecompress.c zuncompress.c zcompress.c + + SOURCES = ${CORE_SOURCES} @F77_WRAPPERS@ + +@@ -87,7 +85,7 @@ + shared: libcfitsio${SHLIB_SUFFIX} + + libcfitsio${SHLIB_SUFFIX}: ${OBJECTS} +- ${SHLIB_LD} ${LDFLAGS} -o $@ ${OBJECTS} -lpthread -lm ++ ${SHLIB_LD} ${LDFLAGS} -o $@ ${OBJECTS} -lpthread -lm -lz + + install: libcfitsio.a $(INSTALL_DIRS) + @if [ -f libcfitsio.a ]; then \ +@@ -109,13 +107,13 @@ + ${CC} $(CFLAGS) $(DEFS) -o smem smem.o -L. -lcfitsio -lm + + testprog: testprog.o libcfitsio.a ${OBJECTS} +- ${CC} $(CFLAGS) $(DEFS) -o testprog testprog.o -L. -lcfitsio -lm ${LIBS} ++ ${CC} $(CFLAGS) $(DEFS) -o testprog testprog.o -L. -lcfitsio -lm ${LIBS} -lz + + fpack: fpack.o fpackutil.o libcfitsio.a ${OBJECTS} +- ${CC} $(CFLAGS) $(DEFS) -o fpack fpack.o fpackutil.o libcfitsio.a -lm ${LIBS} ++ ${CC} $(CFLAGS) $(DEFS) -o fpack fpack.o fpackutil.o -L. -lcfitsio -lm ${LIBS} -lz + + funpack: funpack.o fpackutil.o libcfitsio.a ${OBJECTS} +- ${CC} $(CFLAGS) $(DEFS) -o funpack funpack.o fpackutil.o libcfitsio.a -lm ${LIBS} ++ ${CC} $(CFLAGS) $(DEFS) -o funpack funpack.o fpackutil.o -L. -lcfitsio -lm ${LIBS} -lz + + fitscopy: fitscopy.o libcfitsio.a ${OBJECTS} + ${CC} $(CFLAGS) $(DEFS) -o fitscopy fitscopy.o -L. -lcfitsio -lm ${LIBS} diff --git a/cfitsio.patch b/cfitsio.patch index c38f274..a3ec6c4 100644 --- a/cfitsio.patch +++ b/cfitsio.patch @@ -1,7 +1,7 @@ diff -ur cfitsio/configure cfitsio-fixed/configure ---- cfitsio/configure 2011-01-10 12:03:51.000000000 -0500 -+++ cfitsio-fixed/configure 2011-04-11 11:33:54.384980620 -0400 -@@ -3778,7 +3778,8 @@ +--- cfitsio/configure 2012-04-13 21:16:16.000000000 +0200 ++++ cfitsio-fixed/configure 2012-04-24 13:54:49.295113574 +0200 +@@ -3908,7 +3908,8 @@ SHLIB_SUFFIX=".sl" ;; lnx) @@ -11,7 +11,7 @@ diff -ur cfitsio/configure cfitsio-fixed/configure ;; osf) SHLIB_LD="ld -shared -expect_unresolved '*'" -@@ -3799,7 +3800,7 @@ +@@ -3929,7 +3930,7 @@ # Darwin uses gcc (=cc), but needs different flags (see above) # if test "x$GCC" = xyes; then if test "x$GCC" = xyes && test "x$EXT" != xdarwin && test "x$EXT" != xcygwin; then @@ -20,3 +20,15 @@ diff -ur cfitsio/configure cfitsio-fixed/configure lhea_shlib_cflags='-fPIC' fi if test "x$lhea_shlib_cflags" != x; then +diff -ur cfitsio/Makefile.in cfitsio-fixed/Makefile.in +--- cfitsio/Makefile.in 2012-04-13 21:16:08.000000000 +0200 ++++ cfitsio-fixed/Makefile.in 2012-04-24 13:55:38.543470352 +0200 +@@ -87,7 +87,7 @@ + shared: libcfitsio${SHLIB_SUFFIX} + + libcfitsio${SHLIB_SUFFIX}: ${OBJECTS} +- ${SHLIB_LD} ${LDFLAGS} -o $@ ${OBJECTS} ++ ${SHLIB_LD} ${LDFLAGS} -o $@ ${OBJECTS} -lpthread -lm + + install: libcfitsio.a $(INSTALL_DIRS) + @if [ -f libcfitsio.a ]; then \ diff --git a/cfitsio.spec b/cfitsio.spec index ce5fa81..29040d2 100644 --- a/cfitsio.spec +++ b/cfitsio.spec @@ -1,14 +1,13 @@ Name: cfitsio Version: 3.300 -Release: 0.1.beta%{?dist} +Release: 1%{?dist} Summary: Library for manipulating FITS data files Group: Development/Libraries License: MIT URL: http://heasarc.gsfc.nasa.gov/fitsio/ -Source0: ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/beta_cfitsio3300.tar.gz +Source0: ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3300.tar.gz Patch0: cfitsio.patch -Patch1: makefile.patch -Patch3: cfitsio-zlib.patch +Patch1: cfitsio-zlib.patch BuildRequires: gcc-gfortran zlib-devel Requires(post): /sbin/ldconfig @@ -75,14 +74,16 @@ compression algorithm. %setup -q -n cfitsio %patch0 -p1 %patch1 -p1 -%patch3 -p1 # Fixing cfitsio.pc.in -sed -e 's|3.29|3.290|' -i cfitsio.pc.in +sed -e 's|includedir=@includedir@|includedir=@includedir@/cfitsio|' -i cfitsio.pc.in sed -e 's|Libs: -L${libdir} -lcfitsio @LIBS@|Libs: -L${libdir} -lcfitsio|' -i cfitsio.pc.in sed -e 's|Libs.private: -lm|Libs.private: @LIBS@ -lz -lm|' -i cfitsio.pc.in sed -e 's|Cflags: -I${includedir}|Cflags: -D_REENTRANT -I${includedir}|' -i cfitsio.pc.in -rm zlib.h zconf.h +# remove bundled zlib +rm adler32.c crc32.c deflate.c infback.c inffast.c inflate.c inflate.h \ + inftrees.c inftrees.h zlib.h deflate.h trees.c trees.h uncompr.c zconf.h \ + zutil.c zutil.h %build FC=f95 @@ -140,6 +141,10 @@ cp -p f{,un}pack %{buildroot}%{_bindir}/ %{_bindir}/funpack %changelog +* Tue Apr 24 2012 Sergio Pascual - 3.300-1 +- Updated to 3.300 +- Reorganized patches (zlib patch was lost somehow) + * Fri Apr 13 2012 Orion Poplawski - 3.300-0.1.beta - Update to 3.300 beta - Drop s390 patch applied upstream diff --git a/makefile.patch b/makefile.patch deleted file mode 100644 index c41a8f1..0000000 --- a/makefile.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up cfitsio/Makefile.in.orig cfitsio/Makefile.in ---- cfitsio/Makefile.in.orig 2012-04-11 13:55:24.000000000 -0600 -+++ cfitsio/Makefile.in 2012-04-13 10:07:54.549874768 -0600 -@@ -87,7 +87,7 @@ libcfitsio.a: ${OBJECTS} - shared: libcfitsio${SHLIB_SUFFIX} - - libcfitsio${SHLIB_SUFFIX}: ${OBJECTS} -- ${SHLIB_LD} ${LDFLAGS} -o $@ ${OBJECTS} -+ ${SHLIB_LD} ${LDFLAGS} -o $@ ${OBJECTS} -pthread -lm - - install: libcfitsio.a $(INSTALL_DIRS) - @if [ -f libcfitsio.a ]; then \ diff --git a/sources b/sources index 66cee5d..3d8b421 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c81d8145992fbc6a07922d79c6bb86fe beta_cfitsio3300.tar.gz +5045e82a30495ce23fd4be2c67b987f8 cfitsio3300.tar.gz