1 |
commit: bdaa85f652b25c81c889d9a1bcff53a819b0afc2 |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Sun Dec 18 15:37:34 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 31 15:36:06 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdaa85f6 |
7 |
|
8 |
sci-libs/opencascade: build 7.7.0 against vtk-9.2 |
9 |
|
10 |
cleanup some X related libraries |
11 |
|
12 |
Closes: https://bugs.gentoo.org/886343 |
13 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
.../opencascade-7.7.0-build-against-vtk-9.2.patch | 36 ++++++++++++++++++++++ |
17 |
...de-7.7.0.ebuild => opencascade-7.7.0-r1.ebuild} | 25 ++++++--------- |
18 |
2 files changed, 45 insertions(+), 16 deletions(-) |
19 |
|
20 |
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 |
21 |
new file mode 100644 |
22 |
index 000000000000..7e744189a8d2 |
23 |
--- /dev/null |
24 |
+++ b/sci-libs/opencascade/files/opencascade-7.7.0-build-against-vtk-9.2.patch |
25 |
@@ -0,0 +1,36 @@ |
26 |
+From: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=7f523af8e8a63ee17d8fc26f107c191cd51dcd44;hp=0b4962a7f04caef12d090d087b7196cefde0703c |
27 |
+ |
28 |
+From: Aiden Grossman <agrossman154@×××××.com> |
29 |
+Date: Mon, 10 Oct 2022 18:25:13 +0000 (-0700) |
30 |
+Subject: Fix naming conflict between X11 headers and VTK 9.2.2+ |
31 |
+X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=7f523af8e8a63ee17d8fc26f107c191cd51dcd44;hp=0b4962a7f04caef12d090d087b7196cefde0703c |
32 |
+ |
33 |
+Fix naming conflict between X11 headers and VTK 9.2.2+ |
34 |
+ |
35 |
+Currently, the GLX headers include the X11 headers which use a |
36 |
+preprocessor define to make Status an int. However, VTK has a class |
37 |
+called Status, and this define replaces this class name with int which |
38 |
+results in compilation errors. This patch undefs Status and Success, |
39 |
+which are both defined in the X11 headers if they exist so that there |
40 |
+are no conflicts within the VTK headers for newer versions. |
41 |
+--- |
42 |
+ |
43 |
+--- a/src/IVtkDraw/IVtkDraw_Interactor.cxx |
44 |
++++ b/src/IVtkDraw/IVtkDraw_Interactor.cxx |
45 |
+@@ -27,6 +27,16 @@ |
46 |
+ #undef AllValues |
47 |
+ #endif |
48 |
+ |
49 |
++// Prevent naming collisions between X11 |
50 |
++// and VTK versions 9.2.0 and above. |
51 |
++// X11 is included through glx |
52 |
++#ifdef Status |
53 |
++#undef Status |
54 |
++#endif |
55 |
++#ifdef Success |
56 |
++#undef Success |
57 |
++#endif |
58 |
++ |
59 |
+ #include <vtkXRenderWindowInteractor.h> |
60 |
+ #include <vtkXOpenGLRenderWindow.h> |
61 |
+ #endif |
62 |
|
63 |
diff --git a/sci-libs/opencascade/opencascade-7.7.0.ebuild b/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild |
64 |
similarity index 88% |
65 |
rename from sci-libs/opencascade/opencascade-7.7.0.ebuild |
66 |
rename to sci-libs/opencascade/opencascade-7.7.0-r1.ebuild |
67 |
index c2f7e7dbf7a4..efd245f9b465 100644 |
68 |
--- a/sci-libs/opencascade/opencascade-7.7.0.ebuild |
69 |
+++ b/sci-libs/opencascade/opencascade-7.7.0-r1.ebuild |
70 |
@@ -34,7 +34,7 @@ RDEPEND=" |
71 |
media-libs/fontconfig |
72 |
media-libs/freetype:2 |
73 |
virtual/opengl |
74 |
- x11-libs/libXmu |
75 |
+ x11-libs/libX11 |
76 |
examples? ( |
77 |
dev-qt/qtcore:5 |
78 |
dev-qt/qtgui:5 |
79 |
@@ -63,6 +63,7 @@ PATCHES=( |
80 |
"${FILESDIR}"/${PN}-7.7.0-add-missing-include-limits.patch |
81 |
"${FILESDIR}"/${PN}-7.7.0-fix-installation-of-cmake-config-files.patch |
82 |
"${FILESDIR}"/${PN}-7.7.0-avoid-pre-stripping-binaries.patch |
83 |
+ "${FILESDIR}"/${PN}-7.7.0-build-against-vtk-9.2.patch |
84 |
) |
85 |
|
86 |
src_prepare() { |
87 |
@@ -132,24 +133,16 @@ src_configure() { |
88 |
fi |
89 |
|
90 |
if use vtk; then |
91 |
+ mycmakeargs+=( |
92 |
+ -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr |
93 |
+ -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) |
94 |
+ ) |
95 |
if has_version ">=sci-libs/vtk-9.2.0"; then |
96 |
- mycmakeargs+=( |
97 |
- -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr |
98 |
- -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.2 |
99 |
- -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) |
100 |
- ) |
101 |
+ mycmakeargs+=( -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.2 ) |
102 |
elif has_version ">=sci-libs/vtk-9.1.0"; then |
103 |
- mycmakeargs+=( |
104 |
- -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr |
105 |
- -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1 |
106 |
- -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) |
107 |
- ) |
108 |
+ mycmakeargs+=( -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.1 ) |
109 |
elif has_version ">=sci-libs/vtk-9.0.0"; then |
110 |
- mycmakeargs+=( |
111 |
- -D3RDPARTY_VTK_DIR="${ESYSROOT}"/usr |
112 |
- -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 |
113 |
- -D3RDPARTY_VTK_LIBRARY_DIR="${ESYSROOT}"/usr/$(get_libdir) |
114 |
- ) |
115 |
+ mycmakeargs+=( -D3RDPARTY_VTK_INCLUDE_DIR="${ESYSROOT}"/usr/include/vtk-9.0 ) |
116 |
fi |
117 |
fi |