[petsc] 07/07: use pkg-config to set hdf5 include and libs

Drew Parsons dparsons at moszumanska.debian.org
Wed Nov 1 18:34:30 UTC 2017


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

dparsons pushed a commit to branch experimental
in repository petsc.

commit 8b23bcaf89eba2658c7c3b8759727157b75b3c0e
Author: Drew Parsons <dparsons at debian.org>
Date:   Thu Nov 2 02:28:15 2017 +0800

    use pkg-config to set hdf5 include and libs
    
    --with-hdf5-include --with-hdf5-lib are recommended by upstream
    
    Needs a bit of work to extract the include dir, but no more
    complicated than the definition of hdf5 dir that we had previously
---
 debian/changelog | 6 ++++--
 debian/rules     | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8ae1f36..586f37a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,8 +3,6 @@ petsc (3.8.0+dfsg1-1exp1) UNRELEASED; urgency=medium
   * Team upload.
   * New upstream version.
     - updated API, fortran interfaces are simplified.
-    - configure option --with-mpi-dir not required
-      (specify MPI compilers mpicc,mpicxx,mpif90 explicitly)
   * Remove deprecated debian patches:
     - applied upstream:
         build-ssl1.1.patch
@@ -16,6 +14,10 @@ petsc (3.8.0+dfsg1-1exp1) UNRELEASED; urgency=medium
         configure-kfreebsd8.patch
   * New package structure: drop patch-specific versions and alternatives
     i.e. drop 3.8.0 specific packages, any 3.8.Z will satisfy petsc3.8
+  * configuration updates:
+    - configure option --with-mpi-dir not required
+      (specify MPI compilers mpicc,mpicxx,mpif90 explicitly)
+    - use pkg-config to set hdf5 include and libs
 
  -- Drew Parsons <dparsons at debian.org>  Thu, 19 Oct 2017 09:59:02 +0800
 
diff --git a/debian/rules b/debian/rules
index 53b627c..bddd362 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,9 +49,9 @@ MPI_DEPENDS=$(shell debian/extract_MPI_dependency)
 # facilitate build-time testing (invoking OpenMPI) when building in a chroot (pbuilder or sbuild)
 export OMPI_MCA_plm_rsh_agent=/bin/false
 
-HDF5_SERIAL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
-HDF5_MPI_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/$(ARCH_DEFAULT_MPI_IMPL)
-PETSC_HDF5_FLAGS=$(shell if [ -e $(HDF5_MPI_DIR)/libhdf5.so ]; then echo "--with-hdf5=1 --with-hdf5-dir=$(HDF5_MPI_DIR)"; else if [ -e $(HDF5_SERIAL_DIR)/libhdf5.so ]; then echo "--with-hdf5=1 --with-hdf5-dir=$(HDF5_SERIAL_DIR)"; fi; fi)
+HDF5_INCLUDE_DIR=$(shell for i in `pkg-config hdf5 --cflags-only-I`; do echo $$i | grep "include/hdf5"; done | sed "s/-I//")
+HDF5_LIBS=$(shell pkg-config hdf5 --libs)
+PETSC_HDF5_FLAGS=--with-hdf5-include=$(HDF5_INCLUDE_DIR) --with-hdf5-lib="$(HDF5_LIBS)"
 
 PETSC_REAL_BUILD_DIR=$(PETSC_ARCH)-real
 PETSC_REAL_DEBUG_BUILD_DIR=$(PETSC_ARCH)-real-debug

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/petsc.git



More information about the debian-science-commits mailing list