diff --git a/var/spack/repos/builtin/packages/cgns/cgns-4.5-tk-private.patch b/var/spack/repos/builtin/packages/cgns/cgns-4.5-tk-private.patch new file mode 100644 index 00000000000..c61fec1a2e8 --- /dev/null +++ b/var/spack/repos/builtin/packages/cgns/cgns-4.5-tk-private.patch @@ -0,0 +1,13 @@ +diff --git a/src/cgnstools/tkogl/tkogl.c b/src/cgnstools/tkogl/tkogl.c +index 506599d..71b4fb8 100644 +--- a/src/cgnstools/tkogl/tkogl.c ++++ b/src/cgnstools/tkogl/tkogl.c +@@ -25,7 +25,7 @@ + #if ! defined(__WIN32__) && ! defined(_WIN32) + /* For TkWmAddToColormapWindows. */ + #define _TKPORT /* Typical installations cannot find tkPort.h. */ +-#include ++#include + #endif + + #ifndef CONST diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py index ed034cdbfd2..96415ad60e1 100644 --- a/var/spack/repos/builtin/packages/cgns/package.py +++ b/var/spack/repos/builtin/packages/cgns/package.py @@ -81,6 +81,8 @@ class Cgns(CMakePackage): # 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:") + # "wrong" include for spack (tk-private) from the patch above made it into the official version + patch("cgns-4.5-tk-private.patch", when="@4.5.0") def cmake_args(self): spec = self.spec