[eccodes] 01/02: Fix for FTFBS with cmake-3.9.0. Closes: #870040

Alastair McKinstry mckinstry at moszumanska.debian.org
Mon Jul 31 06:36:35 UTC 2017


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

mckinstry pushed a commit to branch debian/master
in repository eccodes.

commit f727c5a7a3c142a5306edbd43465a5f04477eef1
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Sun Jul 30 07:42:18 2017 +0100

    Fix for FTFBS with cmake-3.9.0. Closes: #870040
---
 debian/changelog                     |  1 +
 debian/patches/findnetcdf4-fix.patch | 27 +++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 3 files changed, 29 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d8a2250..4e976f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ eccodes (2.4.0-4) UNRELEASED; urgency=medium
 
   * FIx URLs for git repo in debian/control. Closes: #868297
   * Add B-D on libnetcdf-dev.
+  * Fix for FTFBS with cmake-3.9.0. Closes: #870040
 
  -- Alastair McKinstry <mckinstry at debian.org>  Sat, 29 Jul 2017 09:31:18 +0100
 
diff --git a/debian/patches/findnetcdf4-fix.patch b/debian/patches/findnetcdf4-fix.patch
new file mode 100644
index 0000000..8850d27
--- /dev/null
+++ b/debian/patches/findnetcdf4-fix.patch
@@ -0,0 +1,27 @@
+Description: Remove incorrect else() statements
+ For cmake >= 3.9.0, these incorrect statements cause a build failure
+ rather than gracefully building without netcdf component.
+Author: Alastair McKinstry <mckinstry at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=870040
+Last-Update: 2017-07-30
+Forwarded: no
+
+--- eccodes-2.4.0.orig/cmake/contrib/FindNetCDF4.cmake
++++ eccodes-2.4.0/cmake/contrib/FindNetCDF4.cmake
+@@ -195,15 +195,13 @@ else()
+             list( APPEND NETCDF_INCLUDE_DIRS ${NETCDF_${INC}_INCLUDE_DIR} )
+           else()
+             list( FIND NETCDF_REQUIRED ${INC} location )
+-            if( ${location} EQUAL -1 )
+-              else()
++	    if( NOT (${location} EQUAL -1 ) )
+               if(NETCDF_FIND_REQUIRED)
+                 ecbuild_error( "\"${INC}\" is not found for NetCDF component ${LANGUAGE}" )
+               elseif( NOT NETCDF_FIND_QUIETLY )
+                 message( STATUS "\"${INC}\" is not found for NetCDF component ${LANGUAGE}" )
+               endif()
+               set( NETCDF_${LANGUAGE}_FOUND 0 )
+-            else()
+             endif()
+           endif()
+         endforeach()
diff --git a/debian/patches/series b/debian/patches/series
index 888c30a..9d65581 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ numpy-fixes.patch
 py3-fixes.patch
 remove-rpms.patch
 memfs.patch
+findnetcdf4-fix.patch

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



More information about the debian-science-commits mailing list