commit:     3b38c7d63df91496ec368e15f3cfe4c5009e6c71
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 28 08:09:31 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 28 08:10:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b38c7d6

sci-libs/vtk: workaround build failure w/ sci-libs/netcdf-4.9.3

Pass -DNETCDF_ENABLE_LEGACY_MACROS for now to fix building against
sci-libs/netcdf-4.9.3. This won't be necessary with vtk-9.5.0.

Bug: https://gitlab.kitware.com/vtk/vtk/-/issues/19616
Closes: https://bugs.gentoo.org/959139
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-libs/vtk/vtk-9.4.2-r1.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sci-libs/vtk/vtk-9.4.2-r1.ebuild b/sci-libs/vtk/vtk-9.4.2-r1.ebuild
index 186b951bf533..418735dc7551 100644
--- a/sci-libs/vtk/vtk-9.4.2-r1.ebuild
+++ b/sci-libs/vtk/vtk-9.4.2-r1.ebuild
@@ -12,7 +12,7 @@ PYTHON_COMPAT=( python3_{11..13} )
 WEBAPP_OPTIONAL=yes
 WEBAPP_MANUAL_SLOT=yes
 
-inherit check-reqs cmake cuda java-pkg-opt-2 multiprocessing python-single-r1 
toolchain-funcs virtualx webapp
+inherit check-reqs cmake cuda flag-o-matic java-pkg-opt-2 multiprocessing 
python-single-r1 toolchain-funcs virtualx webapp
 
 # Short package version
 MY_PV="$(ver_cut 1-2)"
@@ -394,6 +394,10 @@ src_prepare() {
 #      VTK_BUILD_SCALED_SOA_ARRAYS
 #      VTK_DISPATCH_{AOS,SOA,TYPED}_ARRAYS
 src_configure() {
+       # Workaround for sci-libs/netcdf-4.9.3. See bug #959139.
+       # Should be dropped with vtk-9.5.0.
+       append-cppflags -DNETCDF_ENABLE_LEGACY_MACROS
+
        local mycmakeargs=(
                -DCMAKE_DISABLE_FIND_PACKAGE_Git="yes"
                -DVTK_GIT_DESCRIBE="v${PV}"

Reply via email to