[packages/hdf-eos] - new - cc patch to allow build without h4cc - link patch to fix libhdfeos linking
qboosh
qboosh at pld-linux.org
Sun Dec 23 14:46:10 CET 2012
commit f6214b11dd31b55fc3771a28e69f582ca4b9e91c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Dec 23 14:47:19 2012 +0100
- new
- cc patch to allow build without h4cc
- link patch to fix libhdfeos linking
hdf-eos-cc.patch | 36 ++++++++++++++
hdf-eos-link.patch | 15 ++++++
hdf-eos.spec | 143 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 194 insertions(+)
---
diff --git a/hdf-eos.spec b/hdf-eos.spec
new file mode 100644
index 0000000..f95cd99
--- /dev/null
+++ b/hdf-eos.spec
@@ -0,0 +1,143 @@
+#
+# Conditional build:
+%bcond_without szip # SZIP support (must match hdf build bcond)
+%bcond_without tests # don't perform "make check"
+#
+Summary: HDF-EOS 2 library
+Summary(pl.UTF-8): Biblioteka HDF-EOS 2
+Name: hdf-eos
+Version: 2.18.1.00
+Release: 1
+License: MIT-like
+Group: Libraries
+Source0: ftp://edhs1.gsfc.nasa.gov/edhs/hdfeos/latest_release/HDF-EOS2.18v1.00.tar.Z
+# Source0-md5: 755a75c7ce82f0df943c81bc94b32fe4
+# needed for auto* rebuild
+Source1: ftp://edhs1.gsfc.nasa.gov/edhs/hdfeos/latest_release/HDF-EOS2.18v1.00_TestDriver.tar.Z
+# Source1-md5: d95c510f24a598e6eeeefdf92009ba15
+Patch0: %{name}-cc.patch
+Patch1: %{name}-link.patch
+URL: http://hdfeos.org/software/library.php#HDF-EOS2
+BuildRequires: autoconf >= 2.61
+BuildRequires: automake
+BuildRequires: hdf-devel >= 4
+BuildRequires: libjpeg-devel
+BuildRequires: libtool
+%{?with_szip:BuildRequires: szip-devel}
+BuildRequires: zlib-devel
+Requires: hdf >= 4
+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 2 library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki HDF-EOS 2
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: hdf-devel >= 4
+Requires: libjpeg-devel
+%{?with_szip:Requires: szip-devel}
+Requires: zlib-devel
+
+%description devel
+Header files for HDF-EOS 2 library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki HDF-EOS 2.
+
+%package static
+Summary: Static HDF-EOS 2 library
+Summary(pl.UTF-8): Statyczna biblioteka HDF-EOS 2
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static HDF-EOS 2 library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka HDF-EOS 2.
+
+%prep
+%setup -q -n hdfeos -b1
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+# as hdf 4 extension, use the same include dir as hdf 4
+%configure \
+ --includedir=%{_includedir}/hdf \
+ --enable-install-include \
+ --enable-shared \
+ --with-hdf4=%{_includedir}/hdf, \
+ %{?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}/libGctp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libGctp.so.0
+%attr(755,root,root) %{_libdir}/libhdfeos.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libhdfeos.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libGctp.so
+%attr(755,root,root) %{_libdir}/libhdfeos.so
+%{_libdir}/libGctp.la
+%{_libdir}/libhdfeos.la
+%{_includedir}/hdf/HDFEOSVersion.h
+%{_includedir}/hdf/HE2_config.h
+%{_includedir}/hdf/HdfEosDef.h
+%{_includedir}/hdf/bcea.h
+%{_includedir}/hdf/cfortHdf.h
+%{_includedir}/hdf/cproj.h
+%{_includedir}/hdf/cproj_prototypes.h
+%{_includedir}/hdf/ease.h
+%{_includedir}/hdf/gctp_prototypes.h
+%{_includedir}/hdf/isin.h
+%{_includedir}/hdf/proj.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libGctp.a
+%{_libdir}/libhdfeos.a
diff --git a/hdf-eos-cc.patch b/hdf-eos-cc.patch
new file mode 100644
index 0000000..5cb32fa
--- /dev/null
+++ b/hdf-eos-cc.patch
@@ -0,0 +1,36 @@
+--- hdfeos/configure.ac.orig 2012-12-22 19:37:24.849760302 +0100
++++ hdfeos/configure.ac 2012-12-22 21:44:13.192935055 +0100
+@@ -327,23 +327,6 @@
+
+ AC_PROG_AWK
+
+- AC_MSG_CHECKING([for h4cc])
+- PURE_CC=""
+- if ($CC -show &> /dev/null); then
+- dnl Since CC can be "h4cc -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 h4cc])
+- 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([he2_cv_szlib_functional],
+@@ -373,9 +356,6 @@
+ }
+ ], [he2_cv_szlib_can_encode=yes], [he2_cv_szlib_can_encode=no],)])
+
+- CC="$saved_CC"
+- rm -f $SZIP_CC
+-
+ if test ${he2_cv_szlib_functional} = "no"; then
+ he2_cv_szlib_can_encode=broken
+ else
diff --git a/hdf-eos-link.patch b/hdf-eos-link.patch
new file mode 100644
index 0000000..4c83014
--- /dev/null
+++ b/hdf-eos-link.patch
@@ -0,0 +1,15 @@
+--- hdfeos/src/Makefile.am.orig 2008-02-19 19:43:18.000000000 +0100
++++ hdfeos/src/Makefile.am 2012-12-22 22:11:30.172900935 +0100
+@@ -5,11 +5,9 @@
+
+ INCLUDES=-I$(top_srcdir)/include/
+
+-# Set LDFLAGS to alow the HDF-EOS library to use extern variables from HDF4
+-LDFLAGS=-Wl,-single_module
+-
+ # Build HDF-EOS2
+ lib_LTLIBRARIES=libhdfeos.la
++libhdfeos_la_LIBADD=$(top_builddir)/gctp/src/libGctp.la
+
+ # Source files for library
+ libhdfeos_la_SOURCES=EHapi.c GDapi.c PTapi.c SWapi.c
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hdf-eos.git/commitdiff/f6214b11dd31b55fc3771a28e69f582ca4b9e91c
More information about the pld-cvs-commit
mailing list