--- /dev/null
+--- h4h5tools-2.2.1/configure.ac.orig 2012-12-23 20:36:16.191219184 +0100
++++ h4h5tools-2.2.1/configure.ac 2012-12-23 21:19:12.137832161 +0100
+@@ -477,9 +477,11 @@
+ fi
+ fi])
+
+-if test -n "$HDFEOS2_DIR"; then
++if test "$with_hdfeos2" = "yes" ; then
++ if test -n "$HDFEOS2_DIR"; then
+ CPPFLAGS="$CPPFLAGS -I$HDFEOS2_DIR/include"
+ LDFLAGS="$LDFLAGS -L$HDFEOS2_DIR/lib"
++ fi
+
+ AC_CHECK_LIB(Gctp, inv_init,, AC_MSG_ERROR([invalid Gctp in hdfeos2]))
+ AC_CHECK_LIB(hdfeos, GDopen,, AC_MSG_ERROR([invalid hdfeos in hdfeos2]))
---- h4h5tools_20/lib/src/Makefile.am.orig 2008-05-23 18:34:47.000000000 +0200
-+++ h4h5tools_20/lib/src/Makefile.am 2008-06-12 18:40:44.720352249 +0200
-@@ -15,13 +15,14 @@
+--- h4h5tools-2.2.1/lib/src/Makefile.am.orig 2012-12-23 20:33:44.221222353 +0100
++++ h4h5tools-2.2.1/lib/src/Makefile.am 2012-12-23 20:35:53.314552995 +0100
+@@ -14,13 +14,14 @@
#
CSOURCES = H4TOH5I.c h4toh5anno.c h4toh5pal.c h4toh5sds.c h4toh5util.c \
h4toh5vdata.c h4toh5vgroup.c h4toh5image.c h4toh5main.c h4toh5eos.c
- CHEADERS = h4toh5.h H4TOH5api_adpt.h h4toh5vector.h
+ CHEADERS = h4toh5.h H4TOH5api_adpt.h h4toh5vector.h h4toh5apicompatible.h
-libh4toh5_a_SOURCES = $(CSOURCES)
+libh4toh5_la_SOURCES = $(CSOURCES)
-# TODO: hdfeos2 >= 2.17: http://hdfeos.org/ ftp://edhs1.gsfc.nasa.gov/edhs/hdfeos/latest_release/
Summary: HDF 4.x to/from HDF5 conversion tools
Summary(pl.UTF-8): Narzędzia do konwersji pomiędzy HDF 4.x i HDF5
Name: h4h5tools
-Version: 2.2.0
+Version: 2.2.1
Release: 1
Group: Applications/File
License: BSD-like, but changed sources must be marked
-Source0: ftp://ftp.hdfgroup.org/HDF5/h4toh5/src/%{name}-%{version}.tar.gz
-# Source0-md5: 06f1acab0d2cb09f9a7edeb9d38c78a9
+Source0: ftp://ftp.hdfgroup.org/HDF5/releases/tools/h4toh5/h4toh5-%{version}/src/%{name}-%{version}.tar.gz
+# Source0-md5: 4dbfd9fd3b8e3cb0a0518fee596fd2cf
Patch0: %{name}-config.patch
Patch1: %{name}-shared.patch
+Patch2: %{name}-hdfeos.patch
URL: http://hdf.ncsa.uiuc.edu/h4toh5/
BuildRequires: autoconf >= 2.50
BuildRequires: automake
BuildRequires: hdf-devel >= 4.2.6
+BuildRequires: hdf-eos-devel >= 2.17
BuildRequires: hdf5-devel >= 1.6.10
BuildRequires: libjpeg-devel >= 6b
BuildRequires: libtool
Summary(pl.UTF-8): Biblioteka do konwersji pomiędzy HDF 4.x i HDF5
Group: Development/Libraries
Requires: hdf >= 4.2.6
+Requires: hdf-eos >= 2.17
Requires: hdf5 >= 1.6.10
%description lib
Group: Development/Libraries
Requires: %{name}-lib = %{version}-%{release}
Requires: hdf-devel >= 4.2.6
+Requires: hdf-eos-devel >= 2.17
Requires: hdf5-devel >= 1.6.10
%description devel
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
%{__libtoolize}
%{__autoconf}
%{__automake}
CPPFLAGS="%{rpmcppflags} -I/usr/include/hdf -DH5_USE_16_API"
-%configure
+%configure \
+ --with-hdfeos2
%{__make} \
h5toh4_LDADD="-lmfhdf"