commit: a611aa0e83261fc3fb18b8bd99e5db942cf086b3 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Jun 30 11:46:32 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Mon Jun 30 11:46:32 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a611aa0e
sci-libs/cgnslib: fix finding Tk headers (again) Closes: https://bugs.gentoo.org/959272 Signed-off-by: Sam James <sam <AT> gentoo.org> sci-libs/cgnslib/cgnslib-4.5.0.ebuild | 11 +++++++---- sci-libs/cgnslib/files/cgnslib-4.5.0-tk-internal.patch | 12 ++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/sci-libs/cgnslib/cgnslib-4.5.0.ebuild b/sci-libs/cgnslib/cgnslib-4.5.0.ebuild index fda3e085bea4..712c25a49978 100644 --- a/sci-libs/cgnslib/cgnslib-4.5.0.ebuild +++ b/sci-libs/cgnslib/cgnslib-4.5.0.ebuild @@ -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 diff --git a/sci-libs/cgnslib/files/cgnslib-4.5.0-tk-internal.patch b/sci-libs/cgnslib/files/cgnslib-4.5.0-tk-internal.patch new file mode 100644 index 000000000000..fb05b0aeb6f3 --- /dev/null +++ b/sci-libs/cgnslib/files/cgnslib-4.5.0-tk-internal.patch @@ -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
