From 636df680043c9e60fb208548c12e7c96900f5e97 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 20 Mar 2012 15:49:35 +0000 Subject: [PATCH 1/1] - split from netcdf.spec since 4.2 Changed files: netcdf-fortran-f90.patch -> 1.1 netcdf-fortran-info.patch -> 1.1 netcdf-fortran.spec -> 1.1 --- netcdf-fortran-f90.patch | 10 +++ netcdf-fortran-info.patch | 28 +++++++ netcdf-fortran.spec | 151 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 netcdf-fortran-f90.patch create mode 100644 netcdf-fortran-info.patch create mode 100644 netcdf-fortran.spec diff --git a/netcdf-fortran-f90.patch b/netcdf-fortran-f90.patch new file mode 100644 index 0000000..7d7b758 --- /dev/null +++ b/netcdf-fortran-f90.patch @@ -0,0 +1,10 @@ +--- netcdf-fortran-4.2/f90/netcdf_visibility.f90.orig 2011-09-27 16:17:02.000000000 +0200 ++++ netcdf-fortran-4.2/f90/netcdf_visibility.f90 2012-03-20 16:03:11.006184197 +0100 +@@ -20,6 +20,6 @@ + public :: nf90_put_att, nf90_get_att + + ! Variable routines +- public :: nf90_def_var, nf90_inq_varid, nf90_rename_var, nf90_inquire_variable ++ public :: nf90_def_var, nf90_inq_varid, nf90_set_var_chunk_cache, nf90_rename_var, nf90_inquire_variable + ! overloaded functions + public :: nf90_put_var, nf90_get_var diff --git a/netcdf-fortran-info.patch b/netcdf-fortran-info.patch new file mode 100644 index 0000000..4c36d7b --- /dev/null +++ b/netcdf-fortran-info.patch @@ -0,0 +1,28 @@ +--- netcdf-4.0.1/man4/netcdf-f77.texi.orig 2008-01-29 19:22:51.000000000 +0100 ++++ netcdf-4.0.1/man4/netcdf-f77.texi 2008-11-01 12:42:21.152734968 +0100 +@@ -16,9 +16,9 @@ + @include defines.texi + + @ifinfo +-@dircategory netCDF scientific data format ++@dircategory Libraries: + @direntry +-* netcdf-f77: (netcdf-f77). @value{f77-man} ++* netcdf-f77: (netcdf-f77). @value{f77-man} + @end direntry + @end ifinfo + +--- netcdf-4.0.1/man4/netcdf-f90.texi.orig 2008-01-29 19:22:52.000000000 +0100 ++++ netcdf-4.0.1/man4/netcdf-f90.texi 2008-11-01 12:42:32.452735806 +0100 +@@ -16,9 +16,9 @@ + @include defines.texi + + @ifinfo +-@dircategory netCDF scientific data format ++@dircategory Libraries: + @direntry +-* netcdf-f90: (netcdf-f90). @value{f90-man} ++* netcdf-f90: (netcdf-f90). @value{f90-man} + @end direntry + @end ifinfo + diff --git a/netcdf-fortran.spec b/netcdf-fortran.spec new file mode 100644 index 0000000..95f6e71 --- /dev/null +++ b/netcdf-fortran.spec @@ -0,0 +1,151 @@ +# +# Conditional build: +%bcond_without f90 # don't build Fortran 90 interface (just builtin F77) +%bcond_without tests # don't perform "make check" + # (note: tests need endoder-enabled szip) +# +Summary: NetCDF Fortran library +Summary(pl.UTF-8): Biblioteka NetCDF dla języka Fortran +Name: netcdf-fortran +Version: 4.2 +Release: 1 +License: BSD-like +Group: Libraries +Source0: ftp://ftp.unidata.ucar.edu/pub/netcdf/%{name}-%{version}.tar.gz +# Source0-md5: cc3bf530223e8f4aff93793b9f197bf3 +Patch0: %{name}-f90.patch +Patch1: %{name}-info.patch +URL: http://www.unidata.ucar.edu/packages/netcdf/ +BuildRequires: autoconf >= 2.59 +BuildRequires: automake +%if %{with f90} +BuildRequires: gcc-fortran >= 5:4.0 +%else +BuildRequires: gcc-g77 +%endif +BuildRequires: libtool >= 2:2.2 +BuildRequires: netcdf-devel >= 4.2 +BuildRequires: texinfo +Requires: netcdf >= 4.2 +Obsoletes: netcdf-f90 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +NetCDF (network Common Data Form) is an interface for array-oriented +data access and a library that provides an implementation of the +interface. The netCDF library also defines a machine-independent +format for representing scientific data. Together, the interface, +library, and format support the creation, access, and sharing of +scientific data. The netCDF software was developed at the Unidata +Program Center in Boulder, Colorado. + +This package contains Fortran 77%{?with_f90: and 90} library. + +%description -l pl.UTF-8 +NetCDF (Network Common Data Form) jest interfejsem dostępu do danych +zorganizowanych w tablice. Biblioteka netCDF definiuje niezależny od +maszyny format reprezentowania danych naukowych. Interfejs oraz +biblioteka pozwalają na tworzenie, dostęp i współdzielenie danych. +NetCDF powstał w Unidata Program Center w Boulder, Colorado. + +Ten pakiet zawiera bibliotekę dla języka Fortran 77%{?with_f90: i 90}. + +%package devel +Summary: Header files for netCDF Fortran interface +Summary(pl.UTF-8): Pliki nagłówkowe interfejsu netCDF dla języka Fortran +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +%if %{with f90} +Requires: gcc-fortran >= 5:4.0 +%else +Requires: gcc-g77 +%endif +Requires: netcdf-devel >= 4.2 +Obsoletes: netcdf-f90-devel + +%description devel +Header files for netCDF - Fortran interface. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki netCDF - interfejs dla języka Fortran. + +%package static +Summary: NetCDF Fortran static library +Summary(pl.UTF-8): Biblioteka statyczna netCDF dla języka Fortran +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} +Obsoletes: netcdf-f90-static + +%description static +Static version of netCDF Fortran library. + +%description static -l pl.UTF-8 +Statyczna wersja biblioteki netCDF dla języka Fortran. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%{__libtoolize} +%{__aclocal} -I m4 +%{__autoconf} +%{__autoheader} +%{__automake} +# specify gFortran, configure detection may fail if FC specifies *-gfortran different `which gfortran` +CPPFLAGS="%{rpmcppflags} -DgFortran=1" +%configure \ + FCFLAGS="%{rpmcflags}" \ + %{!?with_f90:--disable-f90} + +%{__make} + +%if %{with tests} +%{__make} check +%endif + +%install +rm -rf $RPM_BUILD_ROOT + +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%post devel -p /sbin/postshell +-/usr/sbin/fix-info-dir -c %{_infodir} + +%postun devel -p /sbin/postshell +-/usr/sbin/fix-info-dir -c %{_infodir} + +%files +%defattr(644,root,root,755) +%doc COPYRIGHT README +%attr(755,root,root) %{_libdir}/libnetcdff.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libnetcdff.so.5 + +%files devel +%defattr(644,root,root,755) +%doc man4/netcdf-f77.html man4/netcdf-f90.html +%attr(755,root,root) %{_bindir}/nf-config +%attr(755,root,root) %{_libdir}/libnetcdff.so +%{_libdir}/libnetcdff.la +%{_includedir}/netcdf.inc +%{_pkgconfigdir}/netcdf-fortran.pc +%{_mandir}/man3/netcdf_f77.3* +%{_infodir}/netcdf-f77.info* +%if %{with f90} +%{_includedir}/netcdf.mod +%{_includedir}/typesizes.mod +%{_mandir}/man3/netcdf_f90.3* +%{_infodir}/netcdf-f90.info* +%endif + +%files static +%defattr(644,root,root,755) +%{_libdir}/libnetcdff.a -- 2.44.0