[gmt] 05/08: Add patch to fix _netcdf_dashl regex in FindNETCDF.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Mon Aug 24 19:36:10 UTC 2015


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

sebastic pushed a commit to branch master
in repository gmt.

commit 83ac8c9a223f61439b5030eef3d862da4cd9a115
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Fri Aug 21 19:09:47 2015 +0200

    Add patch to fix _netcdf_dashl regex in FindNETCDF.
---
 debian/changelog                          |  1 +
 debian/patches/netcdf-library-regex.patch | 19 +++++++++++++++++++
 debian/patches/series                     |  1 +
 3 files changed, 21 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 1763c82..2d267d9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ gmt (5.1.2+dfsg1-2~exp2) UNRELEASED; urgency=medium
 
   * Override dh_auto_configure to use custom CMake options.
   * Drop changes for HDF5 MPI, netcdf now built with serial flavor.
+  * Add patch to fix _netcdf_dashl regex in FindNETCDF.
 
  -- Bas Couwenberg <sebastic at debian.org>  Thu, 30 Jul 2015 22:35:49 +0200
 
diff --git a/debian/patches/netcdf-library-regex.patch b/debian/patches/netcdf-library-regex.patch
new file mode 100644
index 0000000..b925bd9
--- /dev/null
+++ b/debian/patches/netcdf-library-regex.patch
@@ -0,0 +1,19 @@
+Description: Fix linker flag regex to not match '-l' in '-L/usr/lib/x86_64-linux-gnu/hdf5/serial'.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: http://gmt.soest.hawaii.edu/issues/757
+
+--- a/cmake/modules/FindNETCDF.cmake
++++ b/cmake/modules/FindNETCDF.cmake
+@@ -58,8 +58,10 @@ if (UNIX AND NOT NETCDF_FOUND)
+ 			ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE
+ 			OUTPUT_VARIABLE NETCDF_CONFIG_LIBS)
+ 		if (NETCDF_CONFIG_LIBS)
+-			string (REGEX MATCHALL "-l[^ ]+" _netcdf_dashl ${NETCDF_CONFIG_LIBS})
+-			string (REGEX REPLACE "-l" "" _netcdf_lib "${_netcdf_dashl}")
++			# Ensure -l is precedeced by whitespace to not match
++		        # '-l' in '-L/usr/lib/x86_64-linux-gnu/hdf5/serial'
++			string (REGEX MATCHALL "(^| )-l[^ ]+" _netcdf_dashl ${NETCDF_CONFIG_LIBS})
++			string (REGEX REPLACE "(^| )-l" "" _netcdf_lib "${_netcdf_dashl}")
+ 			string (REGEX MATCHALL "-L[^ ]+" _netcdf_dashL ${NETCDF_CONFIG_LIBS})
+ 			string (REGEX REPLACE "-L" "" _netcdf_libpath "${_netcdf_dashL}")
+ 		endif (NETCDF_CONFIG_LIBS)
diff --git a/debian/patches/series b/debian/patches/series
index ae9a6fd..1336e59 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ mips.patch
 manpage-section.patch
 dont-use-timestamped-gzip.patch
 rename-libpsl-to-libgmt-psl.patch
+netcdf-library-regex.patch

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



More information about the Pkg-grass-devel mailing list