[netcdf] 01/01: Add patch to append the HDF5 library & include paths in nc-config & netcdf.pc.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Thu Jul 30 18:35:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository netcdf.

commit 4ccd31651dcdd06e6f2ba42d23f61ab58ba01770
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Jul 30 19:49:42 2015 +0200

    Add patch to append the HDF5 library & include paths in nc-config & netcdf.pc.
---
 debian/changelog                       |  7 +++++
 debian/control                         |  3 +-
 debian/patches/hdf5-library-path.patch | 51 ++++++++++++++++++++++++++++++++++
 debian/patches/series                  |  1 +
 debian/rules                           | 10 ++++++-
 5 files changed, 70 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f20d7e1..b0f0899 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+netcdf (1:4.4.0~rc2-1~exp4) UNRELEASED; urgency=medium
+
+  * Add patch to append the HDF5 library & include paths in nc-config &
+    netcdf.pc.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Thu, 30 Jul 2015 19:46:45 +0200
+
 netcdf (1:4.4.0~rc2-1~exp3) experimental; urgency=medium
 
   * Change libhdf5-openmpi-dev (build) dependency to libhdf5-mpi-dev,
diff --git a/debian/control b/debian/control
index c4ee1b6..7fabf33 100644
--- a/debian/control
+++ b/debian/control
@@ -11,7 +11,8 @@ Build-Depends: debhelper (>= 9),
                doxygen,
                libjs-jquery,
                libhdf5-mpi-dev (>= 1.8.6-1~),
-               libcurl4-gnutls-dev | libcurl-ssl-dev
+               libcurl4-gnutls-dev | libcurl-ssl-dev,
+               mpi-default-dev
 Standards-Version: 3.9.6
 Vcs-Browser: http://anonscm.debian.org/cgit/pkg-grass/netcdf.git
 Vcs-Git: git://anonscm.debian.org/pkg-grass/netcdf.git
diff --git a/debian/patches/hdf5-library-path.patch b/debian/patches/hdf5-library-path.patch
new file mode 100644
index 0000000..6efd748
--- /dev/null
+++ b/debian/patches/hdf5-library-path.patch
@@ -0,0 +1,51 @@
+Description: Append HDF5 library & include paths to nc-config & netcdf.pc.
+ Fixes linking issues with netcdf and the hdf5 libraries it's built with:
+  /usr/bin/ld: cannot find -lhdf5_hl
+  /usr/bin/ld: cannot find -lhdf5
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: not-needed
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1465,6 +1465,17 @@ SET(libdir ${CMAKE_INSTALL_PREFIX}/${CMA
+ SET(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
+ SET(CC ${CMAKE_C_COMPILER})
+ 
++SET(HDF5_LIBS "")
++SET(HDF5_INCS "")
++
++IF(USE_HDF5 AND DEFINED HDF5_LIBRARY_PATH)
++  SET(HDF5_LIBS "-L${HDF5_LIBRARY_PATH}")
++ENDIF(USE_HDF5 AND DEFINED HDF5_LIBRARY_PATH)
++
++IF(USE_HDF5 AND DEFINED HDF5_INCLUDE_PATH)
++  SET(HDF5_INCS "-I${HDF5_INCLUDE_PATH}")
++ENDIF(USE_HDF5 AND DEFINED HDF5_LIBRARY_PATH)
++
+ # Process all dependency libraries and create a string
+ # used when parsing netcdf.pc.in
+ 
+--- a/nc-config.cmake.in
++++ b/nc-config.cmake.in
+@@ -10,8 +10,8 @@ libdir="@CMAKE_INSTALL_PREFIX@/lib"
+ includedir="@CMAKE_INSTALL_PREFIX@/include"
+ 
+ cc="@CMAKE_C_COMPILER@"
+-cflags="-I at CMAKE_INSTALL_PREFIX@/include"
+-libs="-L at CMAKE_INSTALL_PREFIX@/lib @NC_LIBS@"
++cflags="-I at CMAKE_INSTALL_PREFIX@/include @HDF5_INCS@"
++libs="-L at CMAKE_INSTALL_PREFIX@/lib @HDF5_LIBS@ @NC_LIBS@"
+ 
+ has_dap="@USE_DAP@"
+ if [ -z $has_dap ]; then
+--- a/netcdf.pc.in
++++ b/netcdf.pc.in
+@@ -8,6 +8,6 @@ Name: @PACKAGE@
+ Description: NetCDF Client Library for C
+ URL: http://www.unidata.ucar.edu/netcdf
+ Version: @PACKAGE_VERSION@
+-Libs: -L${libdir} @NC_LIBS@
+-Cflags: -I${includedir}
++Libs: -L${libdir} @HDF5_LIBS@ @NC_LIBS@
++Cflags: -I${includedir} @HDF5_INCS@
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 9faa5f8..60a8cb7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 link-private.patch
 privacy-breach-logo.patch
+hdf5-library-path.patch
diff --git a/debian/rules b/debian/rules
index 035b1a4..16976be 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,12 @@
 
 #export DH_VERBOSE=1
 
+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+include /usr/share/mpi-default-dev/debian_defaults
+HDF5_INCLUDE_PATH=/usr/include/hdf5/$(ARCH_DEFAULT_MPI_IMPL)
+HDF5_LIBRARY_PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/$(ARCH_DEFAULT_MPI_IMPL)
+
 UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//; s/^[0-9]://')
 
 %:
@@ -13,7 +19,9 @@ override_dh_auto_configure:
 	-DCMAKE_SKIP_RPATH:BOOL=ON \
 	-DCMAKE_VERBOSE_MAKEFILE=1 \
 	-DENABLE_TESTS:BOOL=OFF \
-	-DENABLE_DOXYGEN:BOOL=ON
+	-DENABLE_DOXYGEN:BOOL=ON \
+	-DHDF5_INCLUDE_PATH=$(HDF5_INCLUDE_PATH) \
+	-DHDF5_LIBRARY_PATH=$(HDF5_LIBRARY_PATH)
 
 override_dh_auto_install:
 	dh_auto_install

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/netcdf.git



More information about the Pkg-grass-devel mailing list