sci-libs/cgnslib: fix finding Tk headers (again)

Closes: https://bugs.gentoo.org/959272
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-06-30 12:46:32 +01:00
parent c381fba1a1
commit a611aa0e83
2 changed files with 19 additions and 4 deletions

View File

@@ -44,6 +44,7 @@ REQUIRED_USE="
PATCHES=(
"${FILESDIR}"/${PN}-4.5.0-rpath.patch
"${FILESDIR}"/${PN}-4.5.0-tk-internal.patch
)
pkg_setup() {
@@ -66,10 +67,12 @@ src_configure() {
filter-lto
# Needed for uses an internal header (bug #934122)
local tk_ver=$(best_version dev-lang/tk)
tk_ver=${tk_ver#dev-lang/tk-}
tk_ver=$(ver_cut 1-2 ${tk_ver})
append-cppflags -I"${ESYSROOT}/usr/$(get_libdir)/tk${tk_ver}/include/generic"
if use tools ; then
local tk_ver=$(best_version dev-lang/tk)
tk_ver=${tk_ver#dev-lang/tk-}
tk_ver=$(ver_cut 1-2 ${tk_ver})
append-cppflags -I"${ESYSROOT}/usr/$(get_libdir)/tk${tk_ver}/include/generic"
fi
local mycmakeargs=(
-DCGNS_BUILD_SHARED=ON

View File

@@ -0,0 +1,12 @@
https://bugs.gentoo.org/959272
--- 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 <tk-private/generic/tkInt.h>
+#include <tkInt.h>
#endif
#ifndef CONST