]> git.pld-linux.org Git - packages/hdf.git/blobdiff - hdf.spec
- add -fallow-argument-mismatch to fix Fortran build with gcc 10
[packages/hdf.git] / hdf.spec
index 193a2707581b9019efd3e66b828fc0406b722665..7760888476126558c74fc4668db6ff3bc2f570f2 100644 (file)
--- a/hdf.spec
+++ b/hdf.spec
@@ -5,20 +5,21 @@
 Summary:       Hierarchical Data Format library
 Summary(pl.UTF-8):     Biblioteka HDF (Hierarchical Data Format)
 Name:          hdf
-Version:       4.2.7
+Version:       4.2.15
 Release:       1
 Epoch:         1
 Group:         Libraries
 License:       Nearly BSD, but changed sources must be marked
-Source0:       ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/hdf-%{version}.tar.bz2
-# Source0-md5: 5217b131bfe04a16fc2acad4645b79dc
+Source0:       https://support.hdfgroup.org/ftp/HDF/releases/HDF%{version}/src/hdf-%{version}.tar.bz2
+# Source0-md5: 27ab87b22c31906883a0bfaebced97cb
 Source1:       http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-man-pages.tar.bz2
 # Source1-md5: 607df78cacc131b37dfdb443e61e789a
 Patch0:                %{name}-shared.patch
-Patch1:                %{name}-opt.patch
-Patch2:                %{name}-morearchs.patch
-Patch3:                %{name}-link.patch
-URL:           http://hdf.ncsa.uiuc.edu/
+Patch1:                %{name}-morearchs.patch
+Patch2:                %{name}-link.patch
+Patch3:                %{name}-szip.patch
+Patch4:                %{name}-tirpc.patch
+URL:           http://portal.hdfgroup.org/display/HDF4/HDF4
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
 BuildRequires: bison
@@ -26,8 +27,9 @@ BuildRequires:        flex
 BuildRequires: gcc-fortran
 BuildRequires: groff
 BuildRequires: libjpeg-devel >= 6b
+BuildRequires: libtirpc-devel
 BuildRequires: libtool >= 2:1.4d-3
-BuildRequires: netcdf-devel
+BuildRequires: rpmbuild(macros) >= 1.750
 %{?with_szip:BuildRequires:    szip-devel >= 2.0}
 BuildRequires: which
 BuildRequires: zlib-devel >= 1.1.4
@@ -63,6 +65,7 @@ Summary(pl.UTF-8):    Pliki nagłówkowe biblioteki HDF
 Group:         Development/Libraries
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      libjpeg-devel >= 6b
+Requires:      libtirpc-devel
 %{?with_szip:Requires: szip-devel >= 2.0}
 Requires:      zlib-devel >= 1.1.4
 
@@ -96,15 +99,24 @@ Utilities to convert from/to HDF format.
 %description progs -l pl.UTF-8
 Narzędzia do konwersji z i do formatu HDF.
 
+%package examples
+Summary:       HDF example programs (source code)
+Summary(pl.UTF-8):     Przykładowe programy dla biblioteki HDF (w postaci źródłowej)
+Group:         Documentation
+
+%description examples
+HDF example programs (source code).
+
+%description examples -l pl.UTF-8
+Przykładowe programy dla biblioteki HDF (w postaci źródłowej).
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-
-# evil -R
-sed -i '/^if HDF_BUILD_XDR/,/^endif/d;/^if HDF_BUILD_SHARED/,/^endif/d' config/commence.am
+%patch4 -p1
 
 %build
 %{__libtoolize}
@@ -113,8 +125,16 @@ sed -i '/^if HDF_BUILD_XDR/,/^endif/d;/^if HDF_BUILD_SHARED/,/^endif/d' config/c
 %{__autoheader}
 %{__automake}
 # need to pass F77 to override F77=g77 in config/linux-gnu
+%ifarch x32
+%define        gfortran        x86_64-pld-linux-gnux32-gfortran
+%else
+%define        gfortran        %{_target_cpu}-pld-linux-gfortran
+%endif
 %configure \
-       F77="%{_target_cpu}-pld-linux-gfortran" \
+       F77="%{gfortran}" \
+%if "%{_ver_ge '%(%{gfortran} -dumpversion)' '10.0'}" == "1"
+       FFLAGS="%{rpmcflags} -fallow-argument-mismatch" \
+%endif
        --enable-shared \
        %{?with_szip:--with-szlib}
 
@@ -125,17 +145,19 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_mandir}/man{3,7},%{_includedir}/hdf}
 
 %{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
+       DESTDIR=$RPM_BUILD_ROOT \
+       EXAMPLETOPDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
+       EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/c \
 
-mv -f $RPM_BUILD_ROOT%{_includedir}/*.{h,inc,f90} $RPM_BUILD_ROOT%{_includedir}/hdf
+%{__mv} $RPM_BUILD_ROOT%{_includedir}/*.{h,inc,f90} $RPM_BUILD_ROOT%{_includedir}/hdf
 
-install man/gr_chunk.3 $RPM_BUILD_ROOT%{_mandir}/man3
-mv -f $RPM_BUILD_ROOT%{_mandir}/man1/hdf.1 $RPM_BUILD_ROOT%{_mandir}/man7/hdf.7
+cp -p man/gr_chunk.3 $RPM_BUILD_ROOT%{_mandir}/man3
+%{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/hdf.1 $RPM_BUILD_ROOT%{_mandir}/man7/hdf.7
 
 # resolve conflict with netcdf
 for i in ncdump ncgen ; do
-       mv -f $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/hdf$i
-       mv -f $RPM_BUILD_ROOT%{_mandir}/man1/$i.1 $RPM_BUILD_ROOT%{_mandir}/man1/hdf$i.1
+       %{__mv} $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/hdf$i
+       %{__mv} $RPM_BUILD_ROOT%{_mandir}/man1/$i.1 $RPM_BUILD_ROOT%{_mandir}/man1/hdf$i.1
 done
 
 bzip2 -dc %{SOURCE1} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
@@ -222,3 +244,14 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/ristosds.1*
 %{_mandir}/man1/vmake.1*
 %{_mandir}/man1/vshow.1*
+
+%files examples
+%defattr(644,root,root,755)
+%dir %{_examplesdir}/%{name}-%{version}
+%{_examplesdir}/%{name}-%{version}/README
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/run-all-ex.sh
+%dir %{_examplesdir}/%{name}-%{version}/c
+%{_examplesdir}/%{name}-%{version}/c/*.c
+%{_examplesdir}/%{name}-%{version}/c/*.f
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/c/run-c-ex.sh
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/c/run-fortran-ex.sh
This page took 0.067219 seconds and 4 git commands to generate.