63668bb
%if 0%{?rhel} < 7
63668bb
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
63668bb
%endif
63668bb
e824436
Name: hdf
d734a5f
Version: 4.2.13
7fdff1d
Release: 6%{?dist}
e824436
Summary: A general purpose library and file format for storing scientific data
313087f
License: BSD
e824436
Group: System Environment/Libraries
6917ceb
URL: http://hdfgroup.org/products/hdf4/index.html
4030299
Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/%{name}-%{version}.tar.bz2
4030299
Patch0: hdf-4.2.5-maxavailfiles.patch
Orion Poplawski e742054
Patch1: hdf-ppc.patch
4030299
Patch2: hdf-4.2.4-sparc.patch
d0def9a
Patch3: hdf-s390.patch
d0def9a
Patch4: hdf-arm.patch
d0def9a
# Support DESTDIR in install-examples
d0def9a
Patch5: hdf-destdir.patch
d0def9a
# Install examples into the right location
d0def9a
Patch6: hdf-examplesdir.patch
Marcin Juszkiewicz 8804e81
# Add AArch64 definitions
Marcin Juszkiewicz 8804e81
Patch8: hdf-4.2.10-aarch64.patch
Orion Poplawski 07a787f
# ppc64le support
Orion Poplawski 07a787f
# https://bugzilla.redhat.com/show_bug.cgi?id=1134385
Orion Poplawski 07a787f
Patch9: hdf-ppc64le.patch
Marcin Juszkiewicz 8804e81
d734a5f
# Fix syntax error on epel6 builds
d734a5f
# Use only if java is disabled
d734a5f
Patch10: hdf-avoid_syntax_error_el6.patch
d734a5f
d0def9a
# For destdir/examplesdir patches
d0def9a
BuildRequires: automake libtool
63668bb
BuildRequires: flex byacc libjpeg-devel zlib-devel %{!?el6:libaec-devel}
55d0b25
BuildRequires: libtirpc-devel
e824436
BuildRequires: gcc-gfortran
a8ca1b4
e824436
%description
e824436
HDF is a general purpose library and file format for storing scientific data.
e824436
HDF can store two primary objects: datasets and groups. A dataset is 
e824436
essentially a multidimensional array of data elements, and a group is a 
e824436
structure for organizing objects in an HDF file. Using these two basic 
e824436
objects, one can create and store almost any kind of scientific data 
e824436
structure, such as images, arrays of vectors, and structured and unstructured 
e824436
grids. You can also mix and match them in HDF files according to your needs.
e824436
e824436
%package devel
e824436
Summary: HDF development files
e824436
Group: Development/Libraries
0136f18
Provides: %{name}-static = %{version}-%{release}
63668bb
Requires: %{name}%{?_isa} = %{version}-%{release}
2783347
Requires: libjpeg-devel zlib-devel
e824436
e824436
%description devel
e824436
HDF development headers and libraries.
e824436
e824436
%prep
4030299
%setup -q
6dc67f7
%patch0 -p1 -b .maxavailfiles
d0fb78a
%patch1 -p1 -b .ppc
990f2f0
%patch2 -p1 -b .sparc
e8897ea
%patch3 -p1 -b .s390
fac6186
%patch4 -p1 -b .arm
d0def9a
%patch5 -p1 -b .destdir
d734a5f
%patch6 -p0 -b .examplesdir
Marcin Juszkiewicz 8804e81
%patch8 -p1 -b .aarch64
Orion Poplawski 07a787f
%patch9 -p1 -b .ppc64le
e824436
d734a5f
## Fix syntax error bacause 'CLASSPATH_ENV=$H4_CLASSPATH' line on epel6 builds
d734a5f
# Use only if java is disabled
d734a5f
%if 0%{?rhel} < 7
d734a5f
%patch10 -p0
d734a5f
%endif
d734a5f
2cb4675
chmod a-x *hdf/*/*.c hdf/*/*.h
a8d47c2
# restore include file timestamps modified by patching
dabe258
touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h
2cb4675
e824436
%build
2029323
# For destdir/examplesdir patches
2029323
autoreconf -vif
a8d47c2
# avoid upstream compiler flags settings
2cb4675
rm config/*linux-gnu
55d0b25
# TODO: upstream fix
63668bb
# Shared libraries disabled: libmfhdf.so is not correctly compiled
63668bb
# for missing link to libdf.so
63668bb
export CFLAGS="%{optflags} -fPIC -I%{_includedir}/tirpc"
63668bb
export LDFLAGS="%{__global_ldflags} -ltirpc"
63668bb
export FFLAGS="%{optflags} -fPIC -ffixed-line-length-none"
d734a5f
%configure --disable-production --disable-java --disable-netcdf \
63668bb
 --enable-shared=no --enable-static=yes --enable-fortran %{!?el6:--with-szlib} \
2cb4675
 --includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name}
63668bb
%make_build
e824436
a8d47c2
# correct the timestamps based on files used to generate the header files
dabe258
touch -c -r hdf/src/hdf.inc hdf/src/hdf.f90
dabe258
touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90
dabe258
touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90
a8d47c2
# netcdf fortran include need same treatement, but they are not shipped
a8ca1b4
e824436
%install
63668bb
%make_install
63668bb
63668bb
rm -f %{buildroot}%{_libdir}/%{name}/*.la
63668bb
e824436
#Don't conflict with netcdf
a8d47c2
for file in ncdump ncgen; do
Orion Poplawski 7623869
  mv %{buildroot}%{_bindir}/$file %{buildroot}%{_bindir}/h$file
a8d47c2
  # man pages are the same than netcdf ones
Orion Poplawski 7623869
  rm %{buildroot}%{_mandir}/man1/${file}.1
a8d47c2
done
a8d47c2
a8d47c2
# this is done to have the same timestamp on multiarch setups
63668bb
touch -c -r README.txt %{buildroot}%{_includedir}/hdf/h4config.h
a8d47c2
a8d47c2
# Remove an autoconf conditional from the API that is unused and cause
a8d47c2
# the API to be different on x86 and x86_64
63668bb
pushd %{buildroot}%{_includedir}/hdf
a8d47c2
grep -v 'H4_SIZEOF_INTP' h4config.h > h4config.h.tmp
dabe258
touch -c -r h4config.h h4config.h.tmp
a8d47c2
mv h4config.h.tmp h4config.h
a8d47c2
popd
a8ca1b4
63668bb
# ./testdhf fails on f28-i386 only with
63668bb
# --> /bin/sh: line 25: 22535 Segmentation fault      (core dumped) srcdir="." ./${tname} >> ${log} 2>&1
63668bb
#  but not by an arch-override=i386 ?!
63668bb
%if 0%{?fedora} >= 28
63668bb
%ifnarch %{ix86}
e824436
%check
63668bb
make -j1 check
63668bb
%endif
63668bb
%endif
63668bb
%if 0%{?fedora} < 28
63668bb
%check
63668bb
make -j1 check
63668bb
%endif
a8ca1b4
e824436
%files
Orion Poplawski 7623869
%license COPYING
Orion Poplawski 7623869
%doc MANIFEST README.txt release_notes/*.txt
d0def9a
%exclude %{_defaultdocdir}/%{name}/examples
e824436
%{_bindir}/*
e824436
%{_mandir}/man1/*.gz
e824436
e824436
%files devel
e824436
%{_includedir}/%{name}/
e824436
%{_libdir}/%{name}/
d0def9a
%{_defaultdocdir}/%{name}/examples
e824436
e824436
%changelog
7fdff1d
* Fri Feb 02 2018 Orion Poplawski <orion@cora.nwra.com> - 4.2.13-6
7fdff1d
- Rebuild for gcc 8.0
7fdff1d
63668bb
* Sat Jan 20 2018 Antonio Trande <sagitter@fedoraproject.org> 4.2.13-5
63668bb
- Enable szlib support 
63668bb
55d0b25
* Wed Jan 17 2018 Pavel Raiskup <praiskup@redhat.com> - 4.2.13-4
55d0b25
- rpc api moved from glibc to libtirpc:
55d0b25
  https://fedoraproject.org/wiki/Changes/SunRPCRemoval
55d0b25
fff01b7
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.13-3
fff01b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
fff01b7
f075f55
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.13-2
f075f55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f075f55
d734a5f
* Fri Jul 21 2017 Antonio Trande <sagitter@fedoraproject.org> 4.2.13-1
d734a5f
- Update to 4.2.13
d734a5f
60421e5
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.12-2
60421e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
60421e5
Orion Poplawski 2e6c8ec
* Tue Jan 31 2017 Orion Poplawski <orion@cora.nwra.com> 4.2.12-1
Orion Poplawski 2e6c8ec
- Update to 4.2.12
Orion Poplawski 2e6c8ec
Orion Poplawski 7623869
* Wed May 25 2016 Orion Poplawski <orion@cora.nwra.com> 4.2.11-4
Orion Poplawski 7623869
- Cleanup spec
Orion Poplawski 7623869
- Remove .la files
Orion Poplawski 7623869
- Use %%license
Orion Poplawski 7623869
5afb49c
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.11-3
5afb49c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5afb49c
475dc48
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.11-2
475dc48
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
475dc48
Orion Poplawski ee88e56
* Fri Feb 13 2015 Orion Poplawski <orion@cora.nwra.com> 4.2.11-1
Orion Poplawski ee88e56
- Update to 4.2.11
Orion Poplawski ee88e56
- Drop format patch applied upstream
Orion Poplawski ee88e56
- Update destdir patch
Orion Poplawski ee88e56
Orion Poplawski e234585
* Mon Sep 8 2014 Orion Poplawski <orion@cora.nwra.com> - 4.2.10-7
Orion Poplawski e234585
- Updated patch for ppc64le support (bug #1134385)
Orion Poplawski e234585
Orion Poplawski 07a787f
* Wed Sep 3 2014 Orion Poplawski <orion@cora.nwra.com> - 4.2.10-6
Orion Poplawski 07a787f
- Add initial attempt at ppc64le support (bug #1134385)
Orion Poplawski 07a787f
ebcf45e
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.10-5
ebcf45e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
ebcf45e
e27becf
* Wed Jun 25 2014 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> 4.2.10-4
Marcin Juszkiewicz 8804e81
- Add AArch64 support.
Marcin Juszkiewicz 8804e81
68d9ac9
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.10-3
68d9ac9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
68d9ac9
18459c8
* Thu May 22 2014 Jakub Čajka <jcajka@redhat.com> 4.2.10-2
18459c8
- Fixed build/tests on s390x
18459c8
- Tests enabled on ppc
18459c8
d0def9a
* Fri Feb 14 2014 Orion Poplawski <orion@cora.nwra.com> 4.2.10-1
d0def9a
- Update to 4.2.10
d0def9a
- Rebase arm, ppc, and s390 patches
d0def9a
- Add destdir, examplesdir patches to fix installation of examples
d0def9a
Orion Poplawski 21f0493
* Sat Feb 1 2014 Orion Poplawski <orion@cora.nwra.com> 4.2.9-4
Orion Poplawski 21f0493
- Fix build with -Werror=format-security (bug #1037120)
Orion Poplawski 21f0493
0904fbf
* Tue Aug 13 2013 Karsten Hopp <karsten@redhat.com> 4.2.9-3
0904fbf
- temporarily skip checks on ppc* (#961007)
0904fbf
54de3e0
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.9-2
54de3e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
54de3e0
8e0c506
* Fri Feb 15 2013 Orion Poplawski <orion@cora.nwra.com> 4.2.9-1
8e0c506
- Update to 4.2.9
5e3477d
- Add patch for some missing declarations
Orion Poplawski 14eb82c
- Add patch to fix integer wrapping in test
8e0c506
5a83e98
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.8-4
5a83e98
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
5a83e98
Adam Tkac befc50b
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 4.2.8-3
Adam Tkac befc50b
- rebuild due to "jpeg8-ABI" feature drop
Adam Tkac befc50b
43f8631
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 4.2.8-2
43f8631
- rebuild against new libjpeg
43f8631
2031253
* Wed Aug 15 2012 Orion Poplawski <orion@cora.nwra.com> 4.2.8-1
2031253
- Update to 4.2.8
2031253
e36f3cd
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.7-3
e36f3cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e36f3cd
fac6186
* Tue Mar 06 2012 DJ Delorie <dj@redhat.com> 4.2.7-2
fac6186
- Add patch for ARM support
fac6186
Orion Poplawski e742054
* Wed Feb 15 2012 Orion Poplawski <orion@cora.nwra.com> 4.2.7-1
Orion Poplawski e742054
- Update to 4.2.7
Orion Poplawski e742054
56395a1
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.6-2
56395a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
56395a1
Orion Poplawski f8ab28a
* Tue Jun 21 2011 Orion Poplawski <orion@cora.nwra.com> 4.2.6-1
Orion Poplawski f8ab28a
- Update to 4.2.6
Orion Poplawski f8ab28a
- Drop jpeg patch, fixed upstream
Orion Poplawski f8ab28a
- Update ppc,s390 patches
Orion Poplawski f8ab28a
8fb3e8b
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.5-3
8fb3e8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8fb3e8b
Orion Poplawski c8791fc
* Fri Dec 10 2010 Orion Poplawski <orion@cora.nwra.com> 4.2.5-2
Orion Poplawski c8791fc
- Add patch to disable jpeg tests due to change to jpeg-turbo, FTBFS bug 631337
Orion Poplawski c8791fc
4030299
* Tue Mar 2 2010 Orion Poplawski <orion@cora.nwra.com> 4.2.5-1
4030299
- Update to 4.2.5
4030299
c79a564
* Fri Sep 18 2009 Orion Poplawski <orion@cora.nwra.com> 4.2r4-5
c79a564
- Add EL4 build conditionals
c79a564
353ba1b
* Thu Aug 13 2009 Orion Poplawski <orion@cora.nwra.com> 4.2r4-4
353ba1b
- Add -fPIC to FFLAGS
353ba1b
a17bd9d
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2r4-3
a17bd9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
a17bd9d
0136f18
* Tue Apr 7 2009 Orion Poplawski <orion@cora.nwra.com> 4.2r4-2
0136f18
- Add Provides hdf-static to hdf-devel (bug #494529)
0136f18
ea2af30
* Wed Feb 25 2009 Orion Poplawski <orion@cora.nwra.com> 4.2r4-1
ea2af30
- Update to 4.2r4
ea2af30
- Add patch to increase buffer size in test
ea2af30
- Drop upstreamed libm patch
ea2af30
07692a7
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2r3-5
07692a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
07692a7
ea2af30
* Wed Oct  1 2008 Orion Poplawski <orion@cora.nwra.com> 4.2r3-4
65eae9e
- Rebase maxavailfiles patch
65eae9e
6dc67f7
* Sun Sep 21 2008 Ville Skyttä <ville.skytta at iki.fi> - 4.2r3-3
6dc67f7
- Fix Patch0:/%%patch mismatch.
6dc67f7
dabe258
* Sun Mar  2 2008 Patrice Dumas <pertusus@free.fr> 4.2r3-2
dabe258
- don't ship an empty netcdf.h file. The related definitions are now
dabe258
  in hdf4_netcdf.h
dabe258
b872f9c
* Tue Feb  5 2008 Orion Poplawski <orion@cora.nwra.com> 4.2.r3-1
b872f9c
- Update to 4.2r3
b872f9c
5cc4fde
* Tue Feb  5 2008 Orion Poplawski <orion@cora.nwra.com> 4.2.r2-7
5cc4fde
- Add patch to add -lm to hdiff link
5cc4fde
e8897ea
* Tue Feb  5 2008 Orion Poplawski <orion@cora.nwra.com> 4.2.r2-6
e8897ea
- Add patch for s390 support (bug #431511)
e8897ea
990f2f0
* Mon Jan  7 2008 Orion Poplawski <orion@cora.nwra.com> 4.2.r2-5
990f2f0
- Add patches for sparc support (bug #427639)
990f2f0
5f83d0d
* Mon Oct 29 2007 Patrice Dumas <pertusus@free.fr> 4.2r2-4
5f83d0d
- install the netcdf.h file that describes the netcdf2 hdf enabled
5f83d0d
  API
5f83d0d
a8d47c2
* Mon Oct 29 2007 Patrice Dumas <pertusus@free.fr> 4.2r2-3
a8d47c2
- ship hdf enabled nc* utils as hnc*
a8d47c2
- add --disable-netcdf that replaces HAVE_NETCDF
a8d47c2
- keep include files timestamps, and have the same accross arches
a8d47c2
- fix multiarch difference in include files (#341491)
a8d47c2
3cb73a8
* Wed Oct 17 2007 Patrice Dumas <pertusus@free.fr> 4.2r2-2
2cb4675
- update to 4.2r2
2cb4675
313087f
* Fri Aug 24 2007 Orion Poplawski <orion@cora.nwra.com> 4.2r1-15
313087f
- Update license tag to BSD
313087f
- Rebuild for BuildID
313087f
d0fb78a
* Thu May 10 2007 Balint Cristian <cbalint@redhat.com> 4.2r1-14
d0fb78a
- Fix ppc64 too.
d0fb78a
2783347
* Thu May 10 2007 Orion Poplawski <orion@cora.nwra.com> 4.2r1-13
2783347
- Remove netcdf-devel requires. (bug #239631)
2783347
a8ca1b4
* Fri Apr 20 2007 Orion Poplawski <orion@cora.nwra.com> 4.2r1-12
a8ca1b4
- Use 4.2r1-hrepack-p4.tar.gz for hrepack patch
a8ca1b4
- Remove configure patch applied upstream
eeab993
- Use --disable-production configure flag to avoid stripping -g compile flag
eeab993
- Add patch to fix open file test when run under mock
a8ca1b4
cdaad2b
* Tue Aug 29 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-11
cdaad2b
- Rebuild for FC6
cdaad2b
4451993
* Thu Apr 20 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-10
4451993
- Add Requires netcdf-devel for hdf-devel (bug #189337)
4451993
60ad317
* Mon Feb 13 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-9
60ad317
- Rebuild for gcc/glibc changes
60ad317
c7d518c
* Wed Feb  8 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-8
c7d518c
- Compile with -DHAVE_NETCDF for gdl hdf/netcdf compatibility
c7d518c
2cac9a7
* Thu Feb  2 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-7
2cac9a7
- Add patch to build on ppc
2cac9a7
aad1b02
* Wed Dec 21 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-6
aad1b02
- Rebuild
aad1b02
69a5013
* Wed Oct 05 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-5
69a5013
- Add Requires: libjpeg-devel zlib-devel to -devel package
69a5013
29bcc26
* Tue Aug 23 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-4
29bcc26
- Use -fPIC
29bcc26
- Fix project URL
29bcc26
58f7455
* Fri Jul 29 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-3
58f7455
- Exclude ppc/ppc64 - HDF does not recognize it
58f7455
e824436
* Wed Jul 20 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-2
e824436
- Fix BuildRequires to have autoconf
e824436
e824436
* Fri Jul 15 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-1
e824436
- inital package for Fedora Extras