From 60004a2c1cc02c3130978ef15cc5833a60a7b5b8 Mon Sep 17 00:00:00 2001 From: Ed Hill Date: Sun, 16 Oct 2005 06:11:56 +0000 Subject: [PATCH] building the library twice (once each for g77 and gfortran) fixes an annoying problem for people who need both compilers --- netcdf.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/netcdf.spec b/netcdf.spec index 5cb54a2..a9791a5 100644 --- a/netcdf.spec +++ b/netcdf.spec @@ -1,6 +1,6 @@ Name: netcdf Version: 3.6.0 -Release: 7.p1%{?dist} +Release: 8.p1%{?dist} Summary: Libraries for the Unidata network Common Data Form (NetCDF v3) Group: Applications/Engineering @@ -66,6 +66,17 @@ export FFLAGS="-fPIC" # The parallel build was tested and it does NOT work. # make %{?_smp_mflags} make +mkdir lib_g77 +cp libsrc/libnetcdf.a lib_g77 +make clean +CPPFLAGS="-fPIC -DpgiFortran" +%configure +make +# The below seems to work but I worry that it would lead to odd runtime +# errors due to possible symbol collisions in the "cfortran.h" bits. +# The safer thing to do is to simply build and install two libraries, +# one for the older g77 and one for gfortran. +# ar cru libsrc/libnetcdf.a lib_g77/libnetcdf.a unset FC unset CPPFLAGS unset FFLAGS @@ -81,6 +92,7 @@ cd src %makeinstall INCDIR=${RPM_BUILD_ROOT}%{_includedir}/netcdf-3 \ LIBDIR=${RPM_BUILD_ROOT}%{_libdir}/netcdf-3 \ MANDIR=${RPM_BUILD_ROOT}%{_mandir} +cp lib_g77/libnetcdf.a ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3/libnetcdf_g77.a rm -rf ${RPM_BUILD_ROOT}%{_mandir}/man3f* find ${RPM_BUILD_ROOT}%{_includedir}/netcdf-3 -type f | xargs chmod 644 find ${RPM_BUILD_ROOT}%{_libdir}/netcdf-3 -type f | xargs chmod 644 @@ -104,6 +116,10 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Sun Oct 16 2005 Ed Hill - 3.6.0-8.p1 +- building the library twice (once each for g77 and gfortran) + fixes an annoying problem for people who need both compilers + * Fri Sep 29 2005 Ed Hill - 3.6.0-7.p1 - add FFLAGS="-fPIC"