CDO: add patch for missing algorithm header (#45692)
* add cdo patch for missing algorithm header * add patch for 2.2.2:2.3.0 Signed-off-by: Jannek <squar@informatik.uni-hamburg.de> * Add conflict of old cdo with new gcc * Update var/spack/repos/builtin/packages/cdo/add_algorithm_header_222.patch Co-authored-by: Wouter Deconinck <wdconinc@gmail.com> * Adjust patch hash * Update var/spack/repos/builtin/packages/cdo/package.py fix copy-paste-error on hash Co-authored-by: Wouter Deconinck <wdconinc@gmail.com> --------- Signed-off-by: Jannek <squar@informatik.uni-hamburg.de> Co-authored-by: Jannek <squar@informatik.uni-hamburg.de> Co-authored-by: Try2Code <stark.dreamdetective@gmail.com> Co-authored-by: Wouter Deconinck <wdconinc@gmail.com>
This commit is contained in:
parent
607d158a44
commit
122c3c2dbb
@ -0,0 +1,22 @@
|
||||
diff --git a/src/cdo_module.cc b/src/cdo_module_patched.cc
|
||||
index dc408d9..f50c2d3 100644
|
||||
--- a/src/cdo_module.cc
|
||||
+++ b/src/cdo_module_patched.cc
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "cdo_module.h"
|
||||
+#include <algorithm>
|
||||
|
||||
oper_t::oper_t() : help(default_help) {}
|
||||
|
||||
diff --git a/src/cdo_options.cc b/src/cdo_options_patched.cc
|
||||
index 465f1f9..0684e78 100644
|
||||
--- a/src/cdo_options.cc
|
||||
+++ b/src/cdo_options_patched.cc
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "cdo_output.h"
|
||||
|
||||
#include <cstring>
|
||||
+#include <algorithm>
|
||||
|
||||
namespace cdo
|
||||
{
|
@ -0,0 +1,23 @@
|
||||
diff --git a/src/cdo_options.cc b/src/cdo_options_patched.cc
|
||||
index 465f1f9..0684e78 100644
|
||||
--- a/src/cdo_options.cc
|
||||
+++ b/src/cdo_options_patched.cc
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "cdo_output.h"
|
||||
|
||||
#include <cstring>
|
||||
+#include <algorithm>
|
||||
|
||||
namespace cdo
|
||||
{
|
||||
diff -u src/cdo_options.h src/cdo_options_patched.h
|
||||
--- a/src/cdo_options.h
|
||||
+++ b/src/cdo_options_patched.h
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
+#include <algorithm>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h" /* _FILE_OFFSET_BITS influence off_t */
|
@ -170,6 +170,20 @@ class Cdo(AutotoolsPackage):
|
||||
depends_on("cxx", type="build") # generated
|
||||
depends_on("fortran", type="build") # generated
|
||||
|
||||
# patches
|
||||
# see https://code.mpimet.mpg.de/boards/1/topics/15594
|
||||
patch(
|
||||
"add_algorithm_header.patch",
|
||||
when="@2.4.0:2.4.2 %gcc@14:",
|
||||
sha256="0bc20d2fcb14d8e4010d4222297f259eb7b4220effd97555ed3f027e63cf8b30",
|
||||
)
|
||||
patch(
|
||||
"add_algorithm_header_222.patch",
|
||||
when="@2.2.2:2.3.0 %gcc@14:",
|
||||
sha256="db0d9bd32bbee01d914c1dbebd751403e9c918fafd540fd6ecc6a2f27e0900cf",
|
||||
)
|
||||
conflicts("%gcc@14:", when="@:2.2.0", msg="Compilation with gcc@14: requires cdo@2.2.2:")
|
||||
|
||||
variant("netcdf", default=True, description="Enable NetCDF support")
|
||||
variant(
|
||||
"grib2",
|
||||
|
Loading…
Reference in New Issue
Block a user