diff options
author | Bernd Waibel <waebbl-gentoo@posteo.net> | 2022-12-18 16:37:34 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-31 15:36:06 +0000 |
commit | bdaa85f652b25c81c889d9a1bcff53a819b0afc2 (patch) | |
tree | cd29eab5fc486178d64b076b9a7d953362815297 /sci-libs | |
parent | dev-db/mongodb: further Boost 1.81 fixes (diff) | |
download | gentoo-bdaa85f652b25c81c889d9a1bcff53a819b0afc2.tar.gz gentoo-bdaa85f652b25c81c889d9a1bcff53a819b0afc2.tar.bz2 gentoo-bdaa85f652b25c81c889d9a1bcff53a819b0afc2.zip |
sci-libs/opencascade: build 7.7.0 against vtk-9.2
cleanup some X related libraries
Closes: https://bugs.gentoo.org/886343
Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/opencascade/files/opencascade-7.7.0-build-against-vtk-9.2.patch | 36 | ||||
-rw-r--r-- | sci-libs/opencascade/opencascade-7.7.0-r1.ebuild (renamed from sci-libs/opencascade/opencascade-7.7.0.ebuild) | 25 |
2 files changed, 45 insertions, 16 deletions
diff --git a/sci-libs/opencascade/files/opencascade-7.7.0-build-against-vtk-9.2.patch b/sci-libs/opencascade/files/opencascade-7.7.0-build-against-vtk-9.2.patch new file mode 100644 index 000000000000..7e744189a8d2 --- /dev/null +++ b/sci-libs/opencascade/files/opencascade-7.7.0-build-against-vtk-9.2.patch @@ -0,0 +1,36 @@ +From: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=7f523af8e8a63ee17d8fc26f107c191cd51dcd44;hp=0b4962a7f04caef12d090d087b7196cefde0703c + +From: Aiden Grossman <agrossman154@yahoo.com> +Date: Mon, 10 Oct 2022 18:25:13 +0000 (-0700) +Subject: Fix naming conflict between X11 headers and VTK 9.2.2+ +X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=7f523af8e8a63ee17d8fc26f107c191cd51dcd44;hp=0b4962a7f04caef12d090d087b7196cefde0703c + +Fix naming conflict between X11 headers and VTK 9.2.2+ + +Currently, the GLX headers include the X11 headers which use a +preprocessor define to make Status an int. However, VTK has a class +called Status, and this define replaces this class name with int which +results in compilation errors. This patch undefs Status and Success, +which are both defined in the X11 headers if they exist so that there +are no conflicts within the VTK headers for newer versions. +--- + +--- a/src/IVtkDraw/IVtkDraw_Interactor.cxx ++++ b/src/IVtkDraw/IVtkDraw_Interactor.cxx +@@ -27,6 +27,16 @@ + #undef AllValues + #endif + ++// Prevent naming collisions between X11 ++// and VTK versions 9.2.0 and above. ++// X11 is included through glx ++#ifdef Status ++#undef Status ++#endif ++#ifdef Success ++#undef Success ++#endif ++ + #include <vtkXRenderWindowInteractor.h> + #include <vtkXOpenGLRenderWindow.h> + #endif diff --git a/sci-libs/opencascade/opencascade-7.7.0.ebuild b/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild index c2f7e7dbf7a4..efd245f9b465 100644 --- a/sci-libs/opencascade/opencascade-7.7.0.ebuild +++ b/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild @@ -34,7 +34,7 @@ RDEPEND=" media-libs/fontconfig media-libs/freetype:2 virtual/opengl - x11-libs/libXmu + x11-libs/libX11 examples? ( dev-qt/qtcore:5 dev-qt/qtgui:5 @@ -63,6 +63,7 @@ PATCHES=( "${FILESDIR}"/${PN}-7.7.0-add-missing-include-limits.patch "${FILESDIR}"/${PN}-7.7.0-fix-installation-of-cmake-config-files.patch "${FILESDIR}"/${PN}-7.7.0-avoid-pre-stripping-binaries.patch + "${FILESDIR}"/${PN}-7.7.0-build-against-vtk-9.2.patch ) src_prepare() { @@ -132,24 +133,16 @@ src_configure() { fi if use vtk; then + mycmakeargs+=( + -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr + -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) + ) if has_version ">=sci-libs/vtk-9.2.0"; then - mycmakeargs+=( - -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr - -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.2 - -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) - ) + mycmakeargs+=( -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.2 ) elif has_version ">=sci-libs/vtk-9.1.0"; then - mycmakeargs+=( - -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr - -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1 - -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) - ) + mycmakeargs+=( -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1 ) elif has_version ">=sci-libs/vtk-9.0.0"; then - mycmakeargs+=( - -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr - -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 - -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) - ) + mycmakeargs+=( -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 ) fi fi |