From 7c453fcadcf69dcf7998f6a83bb32cba9e37dda4 Mon Sep 17 00:00:00 2001 From: Matthew D Truch Date: Nov 14 2005 00:04:32 +0000 Subject: auto-import cfitsio-3.004-0.10.b on branch FC-3 from cfitsio-3.004-0.10.b.src.rpm --- diff --git a/cfitsio.patch b/cfitsio.patch new file mode 100644 index 0000000..2f57d76 --- /dev/null +++ b/cfitsio.patch @@ -0,0 +1,42 @@ +diff -u cfitsio/configure cfitsio-new/configure +--- cfitsio/configure 2005-07-28 17:26:13.000000000 -0400 ++++ cfitsio-new/configure 2005-11-13 14:36:39.000000000 -0500 +@@ -1251,7 +1251,8 @@ + SHLIB_SUFFIX=".sl" + ;; + lnx) +- SHLIB_LD=":" ++ SHLIB_LD="cc -shared -Wl,-soname,libcfitsio.so.0" ++ SHLIB_SUFFIX=".so.0" + ;; + osf) + SHLIB_LD="ld -shared -expect_unresolved '*'" +@@ -1271,7 +1272,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 +- SHLIB_LD="$CC -shared" ++ SHLIB_LD="cc -shared -Wl,-soname,libcfitsio.so.0" + lhea_shlib_cflags='-fPIC' + fi + if test "x$lhea_shlib_cflags" != x; then +diff -u cfitsio/Makefile.in cfitsio-new/Makefile.in +--- cfitsio/Makefile.in 2005-04-26 11:48:05.000000000 -0400 ++++ cfitsio-new/Makefile.in 2005-11-13 13:52:27.000000000 -0500 +@@ -19,8 +19,8 @@ + # + + CFITSIO_PREFIX = @CFITSIO_PREFIX@ +-CFITSIO_LIB = ${CFITSIO_PREFIX}/lib +-CFITSIO_INCLUDE = ${CFITSIO_PREFIX}/include ++CFITSIO_LIB = ${CFITSIO_PREFIX}/${LIBDIR} ++CFITSIO_INCLUDE = ${CFITSIO_PREFIX}/${INCLUDEDIR} + + SHELL = /bin/sh + RANLIB = @RANLIB@ +@@ -146,4 +146,4 @@ + objs: ${CORE_OBJECTS} + + ${CFITSIO_PREFIX} ${CFITSIO_LIB} ${CFITSIO_INCLUDE}: +- @if [ ! -d $@ ]; then mkdir $@; fi ++ @if [ ! -d $@ ]; then mkdir -p $@; fi diff --git a/cfitsio.spec b/cfitsio.spec index 6620530..81ccde5 100644 --- a/cfitsio.spec +++ b/cfitsio.spec @@ -1,15 +1,16 @@ Name: cfitsio Version: 3.004 -Release: 0.9.b%{?dist} +Release: 0.10.b%{?dist} Summary: Library for manipulating FITS data files Group: Development/Libraries License: GPL URL: ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3004bbeta.tar.gz Source0: cfitsio3004bbeta.tar.gz +Patch: cfitsio.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: gcc-gfortran +BuildRequires: gcc-g77 Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -35,28 +36,18 @@ Headers required when building a program against the cfitsio library. %prep %setup -q -n cfitsio - +%patch -p1 %build -FC=g95 -export FC %configure --prefix=%{buildroot}/%{_prefix} --includedir=%{buildroot}/%{_includedir}/%{name} -cat Makefile | \ - sed -e 's|cc -shared|cc -shared -Wl,-soname,libcfitsio.so.0|g' \ - > Makefile.new -mv Makefile.new Makefile make shared %{?_smp_mflags} -unset FC %install rm -rf %{buildroot} mkdir -p %{buildroot} -make install -#move headers to correct location (configure doesn't obey --includedir) -mkdir -p %{buildroot}%{_includedir}/%{name} -mv %{buildroot}%{_includedir}/*.h %{buildroot}%{_includedir}/%{name} +LIBDIR=%{_lib} INCLUDEDIR=include/%{name} make install pushd %{buildroot}%{_libdir} -ln -s libcfitsio.so libcfitsio.so.0 +ln -s libcfitsio.so.0 libcfitsio.so popd %clean @@ -69,14 +60,19 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc README Licence.txt changes.txt fitsio.doc fitsio.ps cfitsio.doc cfitsio.ps -%{_libdir}/libcfitsio.so* +%{_libdir}/libcfitsio.so.* %files devel %{_includedir}/%{name} %{_libdir}/libcfitsio.a +%{_libdir}/libcfitsio.so %changelog * Sun Nov 13 2005 Matthew Truch - 3.004-0.9.b +- Patch configure and the Makefile so they obey what they are told +- Require gcc-g77 to build instead of gcc-fortran like FC-4 and newer + +* Sun Nov 13 2005 Matthew Truch - 3.004-0.9.b - Use dist tag in release for FC-3 branch * Sat Nov 12 2005 Matthew Truch - 3.004-0.8.b