diff options
author | Melven Roehrig-Zoellner <Melven.Roehrig-Zoellner@DLR.de> | 2024-06-06 14:16:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-06 06:16:11 -0600 |
commit | 6c309d3bc9efdb3745b651b3fff0ee15f746a8a6 (patch) | |
tree | 23ef9ca8f1ff6cda5d716ab080cc306a87f4681b | |
parent | 24b49eee8350e97949153c59a7a14930587808cd (diff) | |
download | spack-6c309d3bc9efdb3745b651b3fff0ee15f746a8a6.tar.gz spack-6c309d3bc9efdb3745b651b3fff0ee15f746a8a6.tar.bz2 spack-6c309d3bc9efdb3745b651b3fff0ee15f746a8a6.tar.xz spack-6c309d3bc9efdb3745b651b3fff0ee15f746a8a6.zip |
cgns: patch for gcc14 (#44562)
-rw-r--r-- | var/spack/repos/builtin/packages/cgns/gcc14.patch | 50 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/cgns/package.py | 5 |
2 files changed, 55 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cgns/gcc14.patch b/var/spack/repos/builtin/packages/cgns/gcc14.patch new file mode 100644 index 0000000000..62f9bd2e1f --- /dev/null +++ b/var/spack/repos/builtin/packages/cgns/gcc14.patch @@ -0,0 +1,50 @@ +From: Mickael Philit <mickey.phy@gmail.com> +Date: Sun, 3 Mar 2024 20:54:39 +0100 +Subject: [PATCH] backport gcc14 fedora patch + +--- + src/cgnstools/tkogl/gencyl.c | 4 ++-- + src/cgnstools/tkogl/tkogl.c | 8 +++++++- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/src/cgnstools/tkogl/gencyl.c b/src/cgnstools/tkogl/gencyl.c +index cc36c4ba6..b64d777f4 100644 +--- a/src/cgnstools/tkogl/gencyl.c ++++ b/src/cgnstools/tkogl/gencyl.c +@@ -682,8 +682,8 @@ RenderModel (Model* model) + Vector normal; + GLdouble v [3]; + obj = gluNewTess(); +- gluTessCallback(obj, GLU_BEGIN, glBegin); +- gluTessCallback(obj, GLU_VERTEX, glVertex3fv); ++ gluTessCallback(obj, GLU_BEGIN, (_GLUfuncptr)glBegin); ++ gluTessCallback(obj, GLU_VERTEX, (_GLUfuncptr)glVertex3fv); + gluTessCallback(obj, GLU_END, glEnd); + if (flags&CLOSE_FIRST) { + CrossSection *a = model->cross [0]; +diff --git a/src/cgnstools/tkogl/tkogl.c b/src/cgnstools/tkogl/tkogl.c +index e697e735e..506599d54 100644 +--- a/src/cgnstools/tkogl/tkogl.c ++++ b/src/cgnstools/tkogl/tkogl.c +@@ -22,6 +22,12 @@ + #include "printstr.h" + #include "feedback.h" + ++#if ! defined(__WIN32__) && ! defined(_WIN32) ++/* For TkWmAddToColormapWindows. */ ++#define _TKPORT /* Typical installations cannot find tkPort.h. */ ++#include <tkInt.h> ++#endif ++ + #ifndef CONST + # define CONST + #endif +@@ -599,7 +605,7 @@ OGLwinCmd(clientData, interp, argc, argv) + + if ((Tk_Parent(tkwin) != NULL) && + (Tk_Colormap(tkwin) != Tk_Colormap (Tk_Parent(tkwin)))) { +- TkWmAddToColormapWindows(tkwin); ++ TkWmAddToColormapWindows((TkWindow *)tkwin); + } + + /* See if this window will share display lists with another */ diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py index 4ac08f89d4..25d9728583 100644 --- a/var/spack/repos/builtin/packages/cgns/package.py +++ b/var/spack/repos/builtin/packages/cgns/package.py @@ -73,6 +73,11 @@ class Cgns(CMakePackage): # https://bugs.gentoo.org/662210 patch("no-matherr.patch", when="@:3.3.1 +tools") + # patch for gcc14 due to using internal tk type/function, + # copied from https://github.com/CGNS/CGNS/pull/757 + # (adjusted an include from tk-private/generic/tkInt.h to tkInt.h) + patch("gcc14.patch", when="@:4.4.0 %gcc@14:") + def cmake_args(self): spec = self.spec options = [] |