[xmds2] 02/05: wscript-hdf5.patch: New patch for getting the correct flags for HDF5

Rafael Laboissière rlaboiss-guest at moszumanska.debian.org
Sat Sep 20 10:04:18 UTC 2014


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

rlaboiss-guest pushed a commit to branch master
in repository xmds2.

commit 61b4427067c439689f8d08d4700a69e6189545af
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Fri Sep 19 20:00:12 2014 -0300

    wscript-hdf5.patch: New patch for getting the correct flags for HDF5
    
    This also reverts commit afb0ccf.
    
    Thanks: Gilles Filippini
---
 debian/patches/series             |  1 +
 debian/patches/wscript-hdf5.patch | 57 +++++++++++++++++++++++++++++++++++++++
 debian/rules                      |  7 +----
 3 files changed, 59 insertions(+), 6 deletions(-)

diff --git a/debian/patches/series b/debian/patches/series
index b219596..b079cb4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ revision-number-as-deb-pkg.patch
 parse-dep-relationship.patch
 remove-non-dfsg-code.patch
 show-library-name.patch
+wscript-hdf5.patch
diff --git a/debian/patches/wscript-hdf5.patch b/debian/patches/wscript-hdf5.patch
new file mode 100644
index 0000000..e39c702
--- /dev/null
+++ b/debian/patches/wscript-hdf5.patch
@@ -0,0 +1,57 @@
+Description: Use h5cc for getting the compilation flags for the HDF5 library
+Author: Gilles Filippini <pini at debian.org>
+Reviewed-by: Rafael Laboissiere <rafael at laboissiere.net>
+Forwarded: no
+Last-Update: 2014-09-20
+  
+--- xmds2-2.2.0+dfsg1.orig/xpdeint/support/wscript
++++ xmds2-2.2.0+dfsg1/xpdeint/support/wscript
+@@ -361,39 +361,15 @@
+             msg = "Checking for /dev/urandom",
+         )
+         
+-        # Check for zlib, used by hdf5
+-        check_cxx(
+-            lib='z',
+-            function_name="deflate",
+-            header_name="zlib.h",
+-            uselib_store="zlib",
+-            msg = "Checking for zlib"
+-        )
+-        
+-        check_cxx(
+-            lib='hdf5',
+-            header_name="hdf5.h",
+-            function_name="H5check_version",
+-            uselib_store="hdf5",
+-            uselib="zlib" if "zlib" in conf.env['uselib'] else [],
+-            msg = "Checking for HDF5",
+-        )
+-        
+-        if 'hdf5' in conf.env['uselib']:
+-            check_cxx(
+-                lib='hdf5_hl',
+-                defines='HAVE_HDF5_HL',
+-                header_name=['hdf5.h', 'hdf5_hl.h'],
+-                function_name='H5DSset_scale',
+-                uselib_store='hdf5',
+-                uselib='hdf5',
+-                msg = "Checking for HDF5 High-level library",
+-            )
+-            
+-            # We need to reverse the library order because hdf5_hl depends on hdf5
+-            if conf.env['STLIB_hdf5']: conf.env['STLIB_hdf5'] = list(reversed(conf.env.get_flat('STLIB_hdf5').split()))
+-            if conf.env['SHLIB_hdf5']: conf.env['SHLIB_hdf5'] = list(reversed(conf.env.get_flat('SHLIB_hdf5').split()))
+-            
++        # Check for hdf5
++        try:
++            conf.find_program('h5cc', var='H5CC')
++        except  conf.errors.ConfigurationError:
++            conf.find_program('h5pcc', var='H5CC')
++        ret = conf.cmd_and_log([conf.env['H5CC'], '-show', '-shlib'])
++        conf.parse_flags(ret, 'hdf5')
++        if conf.env['LIB_hdf5']:
++            conf.env.append_unique('uselib', 'hdf5')
+             check_cxx(
+                 header_name=['hdf5.h'],
+                 defines='HAVE_H5LEXISTS',
diff --git a/debian/rules b/debian/rules
index fe77830..5811204 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,11 +3,6 @@
 
 XMDS_USER_DATA = $(CURDIR)/debian/xmds-user-data
 
-ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
-	HDF5_PATHS := --include-path=/usr/include/hdf5/serial \
-		--lib-path=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
-endif
-
 #DH_VERBOSE=1
 
 %:
@@ -24,7 +19,7 @@ override_dh_auto_test:
           export OMPI_MCA_plm_rsh_agent=/bin/false ;	\
 	  mkdir bin-test ;				\
 	  install -m 755 bin/* bin-test ; 		\
-	  xmds2 --reconfigure $(HDF5_PATHS) ;		\
+	  xmds2 --reconfigure ;				\
 	  ./run_tests.py ;				\
 	  cd ./examples ;				\
 	  xmds2 lorenz.xmds ;				\

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



More information about the debian-science-commits mailing list