1 |
grenoya |
72538 |
Summary: Hierarchical Data Format Library |
2 |
|
|
Name: HDF |
3 |
|
|
Version: 4.2r4 |
4 |
|
|
Release: %mkrel 4 |
5 |
|
|
License: BSD |
6 |
|
|
Group: Development/C |
7 |
|
|
URL: http://www.hdfgroup.org/ |
8 |
|
|
Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/%{name}%{version}.tar.gz |
9 |
|
|
Patch0: hdf-4.2r3-maxavailfiles.patch |
10 |
|
|
Patch1: hdf-4.2r3-ppc.patch |
11 |
|
|
Patch2: hdf-4.2r2-sparc.patch |
12 |
|
|
Patch3: hdf-4.2r2-s390.patch |
13 |
|
|
Patch4: hdf-4.2r4-buffer.patch |
14 |
|
|
Patch5: HDF-ppc.patch |
15 |
|
|
Patch6: hdf4.2r1-libm.patch |
16 |
|
|
Patch7: HDF4.2r4-format_not_a_string_literal_and_no_format_arguments.diff |
17 |
|
|
BuildRequires: byacc |
18 |
|
|
BuildRequires: flex |
19 |
|
|
BuildRequires: gcc-gfortran |
20 |
|
|
BuildRequires: groff |
21 |
|
|
BuildRequires: zlib-devel |
22 |
|
|
BuildRequires: libjpeg-devel |
23 |
|
|
BuildRequires: netcdf-devel |
24 |
|
|
Provides: HDF-devel |
25 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
26 |
|
|
|
27 |
|
|
%description |
28 |
|
|
HDF is a multi-object file format that facilitates the transfer of various |
29 |
|
|
types of scientific data between machines and operating systems. |
30 |
|
|
HDF allows self-definitions of data content and easy extensibility for |
31 |
|
|
future enhancements or compatibility with other standard formats. |
32 |
|
|
HDF includes Fortran and C calling interfaces, and utilities to |
33 |
|
|
prepare raw image of data files or for use with other NCSA software. |
34 |
|
|
|
35 |
|
|
The HDF library contains interfaces for storing and retrieving compressed or |
36 |
|
|
uncompressed 8-bit and 24=bit raster images with palettes, |
37 |
|
|
n-Dimensional scientific datasets and binary tables. AN interface is also |
38 |
|
|
included that allows arbitrary grouping of other HDF objects. |
39 |
|
|
|
40 |
|
|
%package util |
41 |
|
|
Summary: HDF utilities and test data files |
42 |
|
|
Group: Graphics |
43 |
|
|
Requires: %{name} = %{version}-%{release} |
44 |
|
|
|
45 |
|
|
%description util |
46 |
|
|
This package contains utilities for HDF data manipulation and |
47 |
|
|
test data files. |
48 |
|
|
|
49 |
|
|
%prep |
50 |
|
|
|
51 |
|
|
%setup -q -n HDF%{version} |
52 |
|
|
%patch0 -p1 -b .maxavailfiles |
53 |
|
|
%patch1 -p1 -b .ppc |
54 |
|
|
%patch2 -p1 -b .sparc |
55 |
|
|
%patch3 -p1 -b .s390 |
56 |
|
|
%patch4 -p1 -b .buffer |
57 |
|
|
|
58 |
|
|
%ifarch ppc |
59 |
|
|
%patch5 -p1 -b .ppcold |
60 |
|
|
%endif |
61 |
|
|
|
62 |
|
|
%patch6 -p1 -b .libm |
63 |
|
|
%patch7 -p1 -b .format_not_a_string_literal_and_no_format_arguments |
64 |
|
|
|
65 |
|
|
# Make it lib64 aware |
66 |
|
|
find . -name Makefile.in | \ |
67 |
|
|
xargs perl -pi -e "s,^(libdir|LIBDIR)\s+=.+,\1 = \\\$(prefix)/%{_lib}," |
68 |
|
|
|
69 |
|
|
%build |
70 |
|
|
export F77=gfortran |
71 |
|
|
export FC=gfortran |
72 |
|
|
|
73 |
|
|
# Build with PIC in case static library is built into a DSO afterwards |
74 |
|
|
%ifarch ia64 x86_64 |
75 |
|
|
export CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC -DPIC -fPIC" |
76 |
|
|
export CXXFLAGS=$CFLAGS |
77 |
|
|
export FFLAGS="%{optflags}" |
78 |
|
|
%else |
79 |
|
|
export CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC" |
80 |
|
|
export CXXFLAGS=$CFLAGS |
81 |
|
|
export FFLAGS="%{optflags}" |
82 |
|
|
%endif |
83 |
|
|
|
84 |
|
|
%ifarch ppc |
85 |
|
|
%configure2_5x --prefix=%{_prefix} i386-unknown-linux \ |
86 |
|
|
--enable-production |
87 |
|
|
%else |
88 |
|
|
%configure2_5x --prefix=%{_prefix} \ |
89 |
|
|
--enable-production |
90 |
|
|
%endif |
91 |
|
|
%make |
92 |
|
|
|
93 |
|
|
mkdir -p samples |
94 |
|
|
cp -a hdf/util/testfiles/* samples |
95 |
|
|
|
96 |
|
|
%check |
97 |
|
|
echo ====================TESTING========================= |
98 |
|
|
make CFLAGS="%{optflags} -ansi -D_BSD_SOURCE -DPC" FFLAGS="%{optflags}" \ |
99 |
|
|
%ifarch ia64 |
100 |
|
|
check -k || echo make test failed |
101 |
|
|
%else |
102 |
|
|
# (tv) disabled b/c one test failed with 'Arithmetic overflow converting |
103 |
|
|
# INTEGER(4) to INTEGER(1) at (1). This check can be disabled with the option |
104 |
|
|
# -fno-range-check': |
105 |
|
|
#check |
106 |
|
|
%endif |
107 |
|
|
echo ====================TESTING END===================== |
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
%install |
112 |
|
|
rm -rf %{buildroot} |
113 |
|
|
%makeinstall_std |
114 |
|
|
# remove files already provided by other packages (libjpeg, netcdf, zlib) |
115 |
|
|
rm -f %{buildroot}%{_includedir}/{jconfig.h,jerror.h,jmorecfg.h,jpeglib.h} \ |
116 |
|
|
%{buildroot}%{_includedir}/{zconf.h,zlib.h} \ |
117 |
|
|
%{buildroot}%{_bindir}/{ncdump,ncgen} \ |
118 |
|
|
%{buildroot}%{_includedir}/netcdf.{h,inc,f90} \ |
119 |
|
|
%{buildroot}%{_mandir}/man1/ncgen.1 \ |
120 |
|
|
%{buildroot}%{_mandir}/man1/ncdump.1 |
121 |
|
|
mv -f %{buildroot}%{_bindir}/vmake %{buildroot}%{_bindir}/vmake-hdf |
122 |
|
|
mkdir -p %{buildroot}%{_datadir}/hdf |
123 |
|
|
cp -aR samples %{buildroot}%{_datadir}/hdf/ |
124 |
|
|
|
125 |
|
|
# remove unpackaged files |
126 |
|
|
rm -f %{buildroot}%{_prefix}/man/man1/nc{gen,dump}.1* |
127 |
|
|
|
128 |
|
|
%clean |
129 |
|
|
rm -rf %{buildroot} |
130 |
|
|
|
131 |
|
|
%files |
132 |
|
|
%defattr(-,root,root) |
133 |
|
|
%doc COPYING README |
134 |
|
|
%{_libdir}/libdf.*a |
135 |
|
|
%{_libdir}/libmfhdf.*a |
136 |
|
|
%{_libdir}/libhdf4.settings |
137 |
|
|
%{_includedir}/* |
138 |
|
|
%{_mandir}/*/* |
139 |
|
|
|
140 |
|
|
%files util |
141 |
|
|
%defattr(-,root,root) |
142 |
|
|
%dir %{_datadir}/hdf |
143 |
|
|
%dir %{_datadir}/hdf/samples |
144 |
|
|
%{_bindir}/* |
145 |
|
|
%attr(644,root,root) %{_datadir}/hdf/samples/* |
146 |
|
|
|
147 |
|
|
|