Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > by-pkgid > 122887109a80210747db999cbced7850 > files > 2

HDF-4.2r4-4mdv2010.1.src.rpm

Summary:	Hierarchical Data Format Library
Name:		HDF
Version:	4.2r4
Release:	%mkrel 4
License:	BSD
Group:		Development/C
URL:		http://www.hdfgroup.org/
Source0:	ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/%{name}%{version}.tar.gz
Patch0:		hdf-4.2r3-maxavailfiles.patch
Patch1:		hdf-4.2r3-ppc.patch
Patch2:		hdf-4.2r2-sparc.patch
Patch3:		hdf-4.2r2-s390.patch
Patch4:		hdf-4.2r4-buffer.patch
Patch5:		HDF-ppc.patch
Patch6:		hdf4.2r1-libm.patch
Patch7:		HDF4.2r4-format_not_a_string_literal_and_no_format_arguments.diff
BuildRequires:	byacc
BuildRequires:	flex
%if %{mdkversion} > 1020
BuildRequires:	gcc-gfortran
%else
BuildRequires:	gcc-g77
%endif
BuildRequires:	groff
BuildRequires:	zlib-devel
BuildRequires:	libjpeg-devel
BuildRequires:	netcdf-devel
Provides:	HDF-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root

%description
HDF is a multi-object file format that facilitates the transfer of various
types of scientific data between machines and operating systems. 
HDF allows self-definitions of data content and easy extensibility for
future enhancements or compatibility with other standard formats.
HDF includes Fortran and C calling interfaces, and utilities to
prepare raw image of data files or for use with other NCSA software.

The HDF library contains interfaces for storing and retrieving compressed or
uncompressed 8-bit and 24=bit raster images with palettes,
n-Dimensional scientific datasets and binary tables. AN interface is also
included that allows arbitrary grouping of other HDF objects.

%package util
Summary:	HDF utilities and test data files
Group:		Graphics
Requires:	%{name} = %{version}-%{release}

%description util
This package contains utilities for HDF data manipulation and
test data files.

%prep

%setup -q -n HDF%{version}
%patch0 -p1 -b .maxavailfiles
%patch1 -p1 -b .ppc
%patch2 -p1 -b .sparc
%patch3 -p1 -b .s390
%patch4 -p1 -b .buffer

%ifarch ppc
%patch5 -p1 -b .ppcold
%endif

%patch6 -p1 -b .libm
%patch7 -p1 -b .format_not_a_string_literal_and_no_format_arguments

# Make it lib64 aware
find . -name Makefile.in | \
  xargs perl -pi -e "s,^(libdir|LIBDIR)\s+=.+,\1 = \\\$(prefix)/%{_lib},"

%build
%if %{mdkversion} > 1020
export F77=gfortran
export FC=gfortran
%endif

# Build with PIC in case static library is built into a DSO afterwards
%ifarch ia64 x86_64
export CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC -DPIC -fPIC"
export CXXFLAGS=$CFLAGS
export FFLAGS="%{optflags}"
%else
export CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC"
export CXXFLAGS=$CFLAGS
export FFLAGS="%{optflags}"
%endif

%ifarch ppc
	%configure2_5x --prefix=%{_prefix} i386-unknown-linux \
		--enable-production
%else
	%configure2_5x --prefix=%{_prefix} \
		--enable-production
%endif
%make

mkdir -p samples
cp -a hdf/util/testfiles/* samples

%check
echo ====================TESTING=========================
make CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC" FFLAGS="%{optflags}" \
%ifarch ia64
  check -k || echo make test failed
%else
# (tv) disabled b/c one test failed with 'Arithmetic overflow converting
# INTEGER(4) to INTEGER(1) at (1). This check can be disabled with the option
# -fno-range-check':
  #check
%endif
echo ====================TESTING END=====================



%install
rm -rf %{buildroot}
%makeinstall_std
# remove files already provided by other packages (libjpeg, netcdf, zlib)
rm -f %{buildroot}%{_includedir}/{jconfig.h,jerror.h,jmorecfg.h,jpeglib.h} \
    %{buildroot}%{_includedir}/{zconf.h,zlib.h} \
    %{buildroot}%{_bindir}/{ncdump,ncgen} \
    %{buildroot}%{_includedir}/netcdf.{h,inc,f90} \
    %{buildroot}%{_mandir}/man1/ncgen.1 \
    %{buildroot}%{_mandir}/man1/ncdump.1
mv -f %{buildroot}%{_bindir}/vmake %{buildroot}%{_bindir}/vmake-hdf
mkdir -p %{buildroot}%{_datadir}/hdf
cp -aR samples %{buildroot}%{_datadir}/hdf/

# remove unpackaged files
rm -f %{buildroot}%{_prefix}/man/man1/nc{gen,dump}.1*

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING README
%{_libdir}/libdf.*a
%{_libdir}/libmfhdf.*a
%{_libdir}/libhdf4.settings
%{_includedir}/*
%{_mandir}/*/*

%files util
%defattr(-,root,root)
%dir %{_datadir}/hdf
%dir %{_datadir}/hdf/samples
%{_bindir}/*
%attr(644,root,root) %{_datadir}/hdf/samples/*


%changelog
* Tue Apr 27 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 4.2r4-4mdv2010.1
+ Revision: 539407
- build witf -fPIC -DPIC on x86_64
- add netcdf-devel as a buildrequire

* Mon Apr 26 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 4.2r4-3mdv2010.1
+ Revision: 539202
- spec file clean
- use macros everywhere it is possible

* Mon Jan 11 2010 Funda Wang <fwang@mandriva.org> 4.2r4-2mdv2010.1
+ Revision: 489478
- rebuild for libjpegv8

* Mon Aug 17 2009 Oden Eriksson <oeriksson@mandriva.com> 4.2r4-1mdv2010.0
+ Revision: 417266
- fix build
- 4.2r4
- sync patches with fedora
- fix build with -Werror=format-security (P7)
- rediffed one fuzzy patch
- rebuilt against libjpeg v7

* Tue Jun 17 2008 Thierry Vignaud <tv@mandriva.org> 4.2r1-9mdv2009.0
+ Revision: 222049
- disable checks b/c one test failed with 'Arithmetic overflow converting
  INTEGER(4) to INTEGER(1) at (1). This check can be disabled with the option
  -fno-range-check'
- rebuild
- rebuild
- kill re-definition of %%buildroot on Pixel's request

  + Oden Eriksson <oeriksson@mandriva.com>
    - rebuild

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot


* Sat Mar 03 2007 Giuseppe Ghibò <ghibo@mandriva.com> 4.2r1-6mdv2007.0
+ Revision: 131852
- %%mkrel.
- Rebuilt.
- Import HDF

* Sat Dec 31 2005 Mandriva Linux Team <http://www.mandrivaexpert.com/> 4.2r1-5mdk
- Rebuild

* Thu Aug 25 2005 Oden Eriksson <oeriksson@mandriva.com> 4.2r1-4mdk
- nuke man pages that conflicts with netcdf-devel

* Sun Aug 07 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 4.2r1-3mdk
- drop patch2 - fixed upstream in configure script

* Sat Aug 06 2005 Giuseppe Ghibò <ghibo@mandriva.com> 4.2r1-2mdk
- cleaned SPEC file.

* Sat Aug 06 2005 Giuseppe Ghibò <ghibo@mandriva.com> 4.2r1-1mdk
- Release: 4.2r1.
- Rebuilt Patch6.

* Sat Jun 12 2004 Christiaan Welvaart <cjw@daneel.dyndns.org> 4.1r5-8mdk
- fix ppc build