[packages/hdf-eos5] - new - cc patch to allow build without h5cc - link patch to fix libhe5_hdfeos linking - tests patch

qboosh qboosh at pld-linux.org
Sun Dec 23 19:12:57 CET 2012


commit 71c9f2c4f4d4df7e8532cd92170c1fbaf4f61d39
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Dec 23 19:14:05 2012 +0100

    - new
    - cc patch to allow build without h5cc
    - link patch to fix libhe5_hdfeos linking
    - tests patch to fix off-by-one errors in test suite

 hdf-eos5-cc.patch    |  36 +++++++++++++
 hdf-eos5-link.patch  |  43 +++++++++++++++
 hdf-eos5-tests.patch |  22 ++++++++
 hdf-eos5.spec        | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 245 insertions(+)
---
diff --git a/hdf-eos5.spec b/hdf-eos5.spec
new file mode 100644
index 0000000..fe959f0
--- /dev/null
+++ b/hdf-eos5.spec
@@ -0,0 +1,144 @@
+#
+# Conditional build:
+%bcond_without	szip		# SZIP support (must match hdf build bcond)
+%bcond_without	tests		# don't perform "make check"
+#
+Summary:	HDF-EOS 5 library
+Summary(pl.UTF-8):	Biblioteka HDF-EOS 5
+Name:		hdf-eos5
+Version:	5.1.14
+Release:	1
+License:	MIT-like
+Group:		Libraries
+Source0:	ftp://edhs1.gsfc.nasa.gov/edhs/hdfeos5/latest_release/HDF-EOS%{version}.tar.Z
+# Source0-md5:	4a332f9bb4401103d484a1e9184e8972
+# needed for auto* rebuild
+Source1:	ftp://edhs1.gsfc.nasa.gov/edhs/hdfeos5/latest_release/HDF-EOS%{version}_TESTDRIVERS.tar.Z
+# Source1-md5:	80b5de90a1c56e3c17071e3e669f4fb3
+Patch0:		%{name}-cc.patch
+Patch1:		%{name}-link.patch
+Patch2:		%{name}-tests.patch
+URL:		http://hdfeos.org/software/library.php#HDF-EOS5
+BuildRequires:	autoconf >= 2.59
+BuildRequires:	automake
+BuildRequires:	hdf5-devel
+BuildRequires:	libtool
+%{?with_szip:BuildRequires:	szip-devel}
+BuildRequires:	zlib-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+HDF-EOS is a software library designed to support EOS-specific data
+structures, namely Grid, Point, and Swath. The new data structures are
+constructed from standard HDF data objects, using EOS conventions,
+through the use of a software library. A key feature of HDF-EOS files
+is that instrument-independent services, such as subsetting by
+geolocation, can be applied to the files across a wide variety of data
+products. The library is extensible and new data structures can be
+added.
+
+%description -l pl.UTF-8
+HDF-EOS to biblioteka programowa zaprojektowana w celu obsługi
+struktur danych związanych z EOS, takich jak Grid, Point i Swath. Nowe
+struktury danych są tworzone z obiektów danych HDF, przy użyciu
+konwencji EOS, poprzez bibliotekę programową. Kluczową cechą plików
+HDF-EOS jest to, że usługi niezależne od przyrządu, takie jak na
+przykład podział według geolokalizacji, można wykonywać na plikach
+zawierających różnorodne zbiory danych. Biblioteka jest rozszerzalna i
+pozwala na dodawanie nowych struktur danych.
+
+%package devel
+Summary:	Header files for HDF-EOS 5 library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki HDF-EOS 5
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	hdf5-devel
+%{?with_szip:Requires:	szip-devel}
+Requires:	zlib-devel
+
+%description devel
+Header files for HDF-EOS 5 library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki HDF-EOS 5.
+
+%package static
+Summary:	Static HDF-EOS 5 library
+Summary(pl.UTF-8):	Statyczna biblioteka HDF-EOS 5
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static HDF-EOS 5 library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka HDF-EOS 5.
+
+%prep
+%setup -q -n hdfeos5 -b1
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+CPPFLAGS="%{rpmcppflags} -DH5_USE_16_API"
+# hdf5 installs in plain /usr/include, but we want to isolate headers
+# from system include dir (hdf-eos2 uses the same filenames)
+%configure \
+	--includedir=%{_includedir}/he5 \
+	--enable-install-include \
+	--enable-shared \
+	%{?with_szip:--with-szlib}
+
+%{__make}
+
+%{?with_tests:%{__make} check}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc doc/{HDFEOS-DEFINITION.TXT,README}
+%attr(755,root,root) %{_libdir}/libhe5_Gctp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libhe5_Gctp.so.0
+%attr(755,root,root) %{_libdir}/libhe5_hdfeos.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libhe5_hdfeos.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libhe5_Gctp.so
+%attr(755,root,root) %{_libdir}/libhe5_hdfeos.so
+%{_libdir}/libhe5_Gctp.la
+%{_libdir}/libhe5_hdfeos.la
+%{_includedir}/he5/HE5_GctpFunc.h
+%{_includedir}/he5/HE5_HdfEosDef.h
+%{_includedir}/he5/HE5_config.h
+%{_includedir}/he5/bcea.h
+%{_includedir}/he5/cfortHdf.h
+%{_includedir}/he5/cproj.h
+%{_includedir}/he5/cproj_prototypes.h
+%{_includedir}/he5/ease.h
+%{_includedir}/he5/gctp_prototypes.h
+%{_includedir}/he5/isin.h
+%{_includedir}/he5/proj.h
+%{_includedir}/he5/tutils.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libhe5_Gctp.a
+%{_libdir}/libhe5_hdfeos.a
diff --git a/hdf-eos5-cc.patch b/hdf-eos5-cc.patch
new file mode 100644
index 0000000..1e51b4d
--- /dev/null
+++ b/hdf-eos5-cc.patch
@@ -0,0 +1,36 @@
+--- hdfeos5/configure.ac.orig	2009-05-19 18:12:48.000000000 +0200
++++ hdfeos5/configure.ac	2012-12-23 15:06:02.131632173 +0100
+@@ -268,23 +268,6 @@
+ 
+     AC_PROG_AWK
+ 
+-    AC_MSG_CHECKING([for h5cc])
+-    PURE_CC=""
+-    if ($CC -show &> /dev/null); then
+-	dnl Since CC can be "h5cc -Df2cFortran", arguments should be removed
+-	PURE_CC=`echo "$CC" | $AWK '{ split($1, array, " ") ; printf array[[1]] }'`
+-	AC_MSG_RESULT([$PURE_CC])
+-    else
+-	AC_MSG_RESULT([$CC])
+-	AC_MSG_ERROR([CC is not h5cc])
+-    fi
+-
+-    SZIP_CC=szip_cc
+-    cat $PURE_CC | $AWK '{ if ( $0 ~ /^LDFLAGS=\"(.*)/ ) { print substr($0, 1, 9) " -L'$szlib_lib' " substr($0, 10) } else  { print } } ' > $SZIP_CC
+-    chmod 755 $SZIP_CC
+-    saved_CC="$CC"
+-    CC=./$SZIP_CC
+-
+     AC_MSG_CHECKING([for szlib encoder])
+ 
+     AC_CACHE_VAL([he5_cv_szlib_functional],
+@@ -314,9 +297,6 @@
+         }
+         ], [he5_cv_szlib_can_encode=yes], [he5_cv_szlib_can_encode=no],)])
+ 
+-    CC="$saved_CC"
+-    rm -f $SZIP_CC
+-
+     if test ${he5_cv_szlib_functional} = "no"; then
+         he5_cv_szlib_can_encode=broken
+     else
diff --git a/hdf-eos5-link.patch b/hdf-eos5-link.patch
new file mode 100644
index 0000000..cdf7056
--- /dev/null
+++ b/hdf-eos5-link.patch
@@ -0,0 +1,43 @@
+--- hdfeos5/src/Makefile.am.orig	2007-03-29 18:59:47.000000000 +0200
++++ hdfeos5/src/Makefile.am	2012-12-23 16:17:19.668209682 +0100
+@@ -10,10 +10,10 @@
+ 
+ # Set LDFLAGS to allow the HDF-EOS library to use extern variables from
+ # HDF5
+-LDFLAGS=-Wl,-single_module
+ 
+ # Build HDF-EOS5
+ lib_LTLIBRARIES=libhe5_hdfeos.la
++libhe5_hdfeos_la_LIBADD=$(top_builddir)/gctp/src/libhe5_Gctp.la -lhdf5_hl -lhdf5
+ 
+ # Source files for library
+ libhe5_hdfeos_la_SOURCES=EHapi.c GDapi.c PTapi.c SWapi.c TSapi.c ZAapi.c
+--- hdfeos5/gctp/src/Makefile.am.orig	2012-12-23 16:17:10.788209866 +0100
++++ hdfeos5/gctp/src/Makefile.am	2012-12-23 16:17:06.164876631 +0100
+@@ -4,7 +4,7 @@
+ include $(top_srcdir)/config/include.am
+ 
+ # Library to build
+-lib_LTLIBRARIES = libGctp.la
++lib_LTLIBRARIES = libhe5_Gctp.la
+ 
+ ## Normally DEFAULT_INCLUDES is supplied by Automake, but one of the
+ ## directories included by default is $(top_builddir)/include, which
+@@ -17,7 +17,7 @@
+ INCLUDES=-I$(srcdir)/../include/
+ 
+ # Library source files
+-libGctp_la_SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c      \
++libhe5_Gctp_la_SOURCES = gctp.c alberfor.c alberinv.c alconfor.c alconinv.c      \
+           azimfor.c aziminv.c bceafor.c bceainv.c br_gctp.c ceafor.c         \
+           ceainv.c cproj.c eqconfor.c eqconinv.c equifor.c equiinv.c         \
+           for_init.c gnomfor.c gnominv.c goodfor.c goodinv.c gvnspfor.c      \
+--- hdfeos5/config/include.am.orig	2007-03-29 18:59:12.000000000 +0200
++++ hdfeos5/config/include.am	2012-12-23 16:25:47.688199095 +0100
+@@ -4,5 +4,5 @@
+ ## shared definitions.
+ 
+ LIBHDFEOS5=$(top_builddir)/src/libhe5_hdfeos.la
+-LIBGCTP=$(top_builddir)/gctp/src/libGctp.la
++LIBGCTP=$(top_builddir)/gctp/src/libhe5_Gctp.la
+ 
diff --git a/hdf-eos5-tests.patch b/hdf-eos5-tests.patch
new file mode 100644
index 0000000..f9d74bc
--- /dev/null
+++ b/hdf-eos5-tests.patch
@@ -0,0 +1,22 @@
+--- hdfeos5/samples/he5_pt_writedata.c.orig	2007-03-29 18:58:21.000000000 +0200
++++ hdfeos5/samples/he5_pt_writedata.c	2012-12-23 18:36:44.438035334 +0100
+@@ -16,7 +16,7 @@
+ 
+   typedef struct 
+ 	{
+-	  char      Label[8];
++	  char      Label[9];
+ 	  double    Lon;
+ 	  double    Lat;
+ 	  int       Date;
+--- hdfeos5/testdrivers/point/TestPoint.c.orig	2007-03-29 18:58:28.000000000 +0200
++++ hdfeos5/testdrivers/point/TestPoint.c	2012-12-23 18:45:28.971357733 +0100
+@@ -79,7 +79,7 @@
+   
+   typedef struct
+ 	{
+-	  char        label[8];
++	  char        label[9];
+ 	  double      lon;
+ 	  double      lat;
+ 	  int         date;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/hdf-eos5.git/commitdiff/71c9f2c4f4d4df7e8532cd92170c1fbaf4f61d39



More information about the pld-cvs-commit mailing list