From cdf7f78362e3bdb0c39c1d023fa33a54a659e22c Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 31 Mar 2011 12:00:28 -0600 Subject: [PATCH] Update to 4.1.2 (soname bump) Add patch to add -lm to libnetcdf4 --- .gitignore | 1 + netcdf-4.1-beta2-pkgconfig.patch | 34 -------------------------------- netcdf-4.1.1-fflags.patch | 13 ------------ netcdf-4.1.1-hdf5.patch | 12 ----------- netcdf-4.1.2-libm.patch | 11 +++++++++++ netcdf.spec | 31 ++++++++++++++--------------- sources | 2 +- 7 files changed, 28 insertions(+), 76 deletions(-) delete mode 100644 netcdf-4.1-beta2-pkgconfig.patch delete mode 100644 netcdf-4.1.1-fflags.patch delete mode 100644 netcdf-4.1.1-hdf5.patch create mode 100644 netcdf-4.1.2-libm.patch diff --git a/.gitignore b/.gitignore index bb433a3..34b0b4f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ netcdf-4.1.1.tar.gz +/netcdf-4.1.2.tar.gz diff --git a/netcdf-4.1-beta2-pkgconfig.patch b/netcdf-4.1-beta2-pkgconfig.patch deleted file mode 100644 index 9baf290..0000000 --- a/netcdf-4.1-beta2-pkgconfig.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -up netcdf-4.1-snapshot2010020100/nc-config.in.pkgconfig netcdf-4.1-snapshot2010020100/nc-config.in ---- netcdf-4.1-snapshot2010020100/nc-config.in.pkgconfig 2010-01-11 12:27:12.000000000 -0700 -+++ netcdf-4.1-snapshot2010020100/nc-config.in 2010-02-01 16:04:22.429448744 -0700 -@@ -8,7 +8,6 @@ - - prefix=@prefix@ - exec_prefix=${prefix} --libdir=${exec_prefix}/lib - includedir=${prefix}/include - - cc="@CC@" -@@ -16,8 +15,6 @@ cxx="@CXX@" - fc="@FC@" - cflags=" -I${includedir}" - fflags="@FFLAGS@ @MOD_FLAG@${includedir}" --libs="-L${libdir} @NC_LIBS@" --flibs="-L${libdir} @NC_FLIBS@" - has_dap="@HAS_DAP@" - has_nc2="@HAS_NC2@" - has_nc4="@HAS_NC4@" -@@ -138,11 +135,11 @@ while test $# -gt 0; do - ;; - - --libs) -- echo $libs -+ pkg-config netcdf --libs - ;; - - --flibs) -- echo $flibs -+ pkg-config netcdf --flibs - ;; - - --has-dap) diff --git a/netcdf-4.1.1-fflags.patch b/netcdf-4.1.1-fflags.patch deleted file mode 100644 index 9a8ff0d..0000000 --- a/netcdf-4.1.1-fflags.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- netcdf-4.1.1/nc-config.in.fflags 2010-04-08 14:05:40.063132547 -0600 -+++ netcdf-4.1.1/nc-config.in 2010-04-09 13:53:26.923928260 -0600 -@@ -13,8 +13,8 @@ - cc="@CC@" - cxx="@CXX@" - fc="@FC@" --cflags=" -I${includedir}" --fflags="@FFLAGS@ @MOD_FLAG@${includedir}" -+cflags="-I${includedir}" -+fflags="@MOD_FLAG@${includedir}" - has_dap="@HAS_DAP@" - has_nc2="@HAS_NC2@" - has_nc4="@HAS_NC4@" diff --git a/netcdf-4.1.1-hdf5.patch b/netcdf-4.1.1-hdf5.patch deleted file mode 100644 index 4e7f431..0000000 --- a/netcdf-4.1.1-hdf5.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up netcdf-4.1.1/libsrc4/Makefile.in.hdf5 netcdf-4.1.1/libsrc4/Makefile.in ---- netcdf-4.1.1/libsrc4/Makefile.in.hdf5 2010-04-19 09:44:45.333650779 -0600 -+++ netcdf-4.1.1/libsrc4/Makefile.in 2010-04-19 09:44:45.338649501 -0600 -@@ -886,7 +886,7 @@ clean-libLTLIBRARIES: - rm -f "$${dir}/so_locations"; \ - done - libnetcdf.la: $(libnetcdf_la_OBJECTS) $(libnetcdf_la_DEPENDENCIES) -- $(libnetcdf_la_LINK) -rpath $(libdir) $(libnetcdf_la_OBJECTS) $(libnetcdf_la_LIBADD) $(LIBS) -+ $(libnetcdf_la_LINK) -rpath $(libdir) $(libnetcdf_la_OBJECTS) $(libnetcdf_la_LIBADD) -lhdf5_hl -lhdf5 $(LIBS) - - clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ diff --git a/netcdf-4.1.2-libm.patch b/netcdf-4.1.2-libm.patch new file mode 100644 index 0000000..9c2eae4 --- /dev/null +++ b/netcdf-4.1.2-libm.patch @@ -0,0 +1,11 @@ +--- netcdf-4.1.2/libsrc4/Makefile.in.libm 2011-03-29 17:14:04.000000000 -0600 ++++ netcdf-4.1.2/libsrc4/Makefile.in 2011-03-31 11:09:36.683165942 -0600 +@@ -312,7 +312,7 @@ + # Tell libtool what libraries are we will depend on. + + # Always link to hdf5_hl, hdf5, and z. +-libnetcdf4_la_LIBADD = $(am__append_12) $(am__append_13) -lhdf5_hl \ ++libnetcdf4_la_LIBADD = -lm $(am__append_12) $(am__append_13) -lhdf5_hl \ + -lhdf5 -lz + all: all-am + diff --git a/netcdf.spec b/netcdf.spec index 0f25394..8020d8b 100644 --- a/netcdf.spec +++ b/netcdf.spec @@ -1,17 +1,19 @@ Name: netcdf -Version: 4.1.1 -Release: 4%{?dist} +Version: 4.1.2 +Release: 1%{?dist} Summary: Libraries for the Unidata network Common Data Form Group: Applications/Engineering License: NetCDF URL: http://www.unidata.ucar.edu/software/netcdf/ -Source0: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-4.1.1.tar.gz +Source0: http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-%{version}.tar.gz +#Source0: http://www.unidata.ucar.edu/downloads/netcdf/ftp/snapshot/netcdf-4-daily.tar.gz #Use pkgconfig in nc-config to avoid multi-lib issues -Patch0: netcdf-4.1-beta2-pkgconfig.patch -Patch1: netcdf-4.1.1-fflags.patch -#Explicitly link libnetcdf.so agains -lhdf5_hl -lhdf5, reported upstream -Patch2: netcdf-4.1.1-hdf5.patch +Patch0: netcdf-4.1.2-pkgconfig.patch +#Strip FFLAGS from nc-config +Patch1: netcdf-4.1.2-fflags.patch +# Need to add -lm to libnetcdf4 +Patch2: netcdf-4.1.2-libm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc-gfortran, gawk @@ -80,7 +82,7 @@ This package contains the netCDF static libs. %setup -q %patch0 -p1 -b .pkgconfig %patch1 -p1 -b .fflags -%patch2 -p1 -b .hdf5 +%patch2 -p1 -b .libm %build @@ -94,14 +96,8 @@ export FCFLAGS="$FFLAGS" --enable-dap \ --enable-ncgen4 \ --enable-extra-example-tests \ -%ifnarch s390 s390x - --enable-valgrind-tests \ -%endif --disable-dap-remote-tests -#Need to be able to properly list all hdf4 library deps and location -# --enable-hdf4 \ - -make #%{?_smp_mflags} +make %{?_smp_mflags} %install @@ -143,7 +139,6 @@ fi %{_bindir}/ncgen3 %{_libdir}/*.so.* %{_mandir}/man1/* -%{_datadir}/doc/netcdf %{_infodir}/* %files devel @@ -165,6 +160,10 @@ fi %changelog +* Thu Mar 31 2011 Orion Poplawski - 4.1.2-1 +- Update to 4.1.2 (soname bump) +- Add patch to add -lm to libnetcdf4 + * Mon Jul 19 2010 Dan HorĂ¡k - 4.1.1-4 - no valgrind on s390(x) diff --git a/sources b/sources index f2a712c..6f77609 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -99cb93a15c4687cb7983e794f4f0ea9e netcdf-4.1.1.tar.gz +4a94ebe2d998d649159aa5665c83fb1a netcdf-4.1.2.tar.gz