commit:     807c9b83eac163f26369e35d143bdc2c5bdac49d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 12 11:45:52 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 12 11:47:15 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=807c9b83

sci-libs/opencascade: rebase live patches, drop unnecessary patch from 7.8.1

* Rebase jemalloc-lib-type.patch and avoid-pre-stripping-binaries.patch
* Drop unnecessary build-against-vtk-9.2.patch patch from 7.8.1 which
  was applying with fuzz, already in the 7.8.1 release

Closes: https://bugs.gentoo.org/942794
Thanks-to: jospezial
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../opencascade-7.7.0-build-against-vtk-9.2.patch  | 36 ----------------------
 ...ascade-7.8.2-avoid-pre-stripping-binaries.patch | 25 +++++++++++++++
 .../opencascade-7.8.2-jemalloc-lib-type.patch      | 26 ++++++++++++++++
 sci-libs/opencascade/opencascade-7.8.1.ebuild      |  1 -
 sci-libs/opencascade/opencascade-9999.ebuild       |  7 ++---
 5 files changed, 53 insertions(+), 42 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
deleted file mode 100644
index 7e744189a8d2..000000000000
--- a/sci-libs/opencascade/files/opencascade-7.7.0-build-against-vtk-9.2.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: 
http://git.dev.opencascade.org/gitweb/?p=occt.git;a=commitdiff_plain;h=7f523af8e8a63ee17d8fc26f107c191cd51dcd44;hp=0b4962a7f04caef12d090d087b7196cefde0703c
-
-From: Aiden Grossman <[email protected]>
-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/files/opencascade-7.8.2-avoid-pre-stripping-binaries.patch
 
b/sci-libs/opencascade/files/opencascade-7.8.2-avoid-pre-stripping-binaries.patch
new file mode 100644
index 000000000000..cd7ebdeeaac3
--- /dev/null
+++ 
b/sci-libs/opencascade/files/opencascade-7.8.2-avoid-pre-stripping-binaries.patch
@@ -0,0 +1,25 @@
+diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake
+index ec31fdd80..26411ba6a 100644
+--- a/adm/cmake/occt_defs_flags.cmake
++++ b/adm/cmake/occt_defs_flags.cmake
+@@ -173,8 +173,6 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc][Ll][Aa][Nn][Gg]")
+     # CLang can be used with both libstdc++ and libc++, however on OS X 
libstdc++ is outdated.
+     set (CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
+   endif()
+-  # Optimize size of binaries
+-  set (CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Wl,-s 
${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
+ endif()
+ if(MINGW)
+   add_definitions(-D_WIN32_WINNT=0x0601)
+@@ -183,11 +181,6 @@ if(MINGW)
+   # workaround bugs in mingw with vtable export
+   set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
+ endif()
+-if (DEFINED CMAKE_COMPILER_IS_GNUCXX)
+-  # Optimize size of binaries
+-  set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
+-  set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
+-endif()
+ 
+ if (BUILD_RELEASE_DISABLE_EXCEPTIONS)
+   set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNo_Exception")

diff --git 
a/sci-libs/opencascade/files/opencascade-7.8.2-jemalloc-lib-type.patch 
b/sci-libs/opencascade/files/opencascade-7.8.2-jemalloc-lib-type.patch
new file mode 100644
index 000000000000..02b5dfa9579b
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.8.2-jemalloc-lib-type.patch
@@ -0,0 +1,26 @@
+diff --git a/adm/cmake/jemalloc.cmake b/adm/cmake/jemalloc.cmake
+index 579ed3e15..08917d94c 100644
+--- a/adm/cmake/jemalloc.cmake
++++ b/adm/cmake/jemalloc.cmake
+@@ -67,6 +67,7 @@ macro (JEMALLOC_LIB_SEARCH MMGR_LIB PREFIX)
+ endmacro()
+ 
+ macro (SEARCH_JEMALLOC)
++if(BUILD_LIBRARY_TYPE EQUAL "Static")
+   # find static jemalloc lib
+   SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".a")
+   if (WIN32)
+@@ -76,10 +77,13 @@ macro (SEARCH_JEMALLOC)
+     SET(CMAKE_FIND_LIBRARY_SUFFIXES "" "so")
+     JEMALLOC_LIB_SEARCH ("jemalloc.so.2" "SHARED")
+   endif()
++endif()
+   
++if(BUILD_LIBRARY_TYPE EQUAL "Shared")
+   # find shared jemalloc lib
+   SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".so")
+   JEMALLOC_LIB_SEARCH ("jemalloc" "SHARED")
++endif()
+ endmacro()
+ 
+ # Reset CSF variable

diff --git a/sci-libs/opencascade/opencascade-7.8.1.ebuild 
b/sci-libs/opencascade/opencascade-7.8.1.ebuild
index 6c495f2484d2..39b6c68f9c12 100644
--- a/sci-libs/opencascade/opencascade-7.8.1.ebuild
+++ b/sci-libs/opencascade/opencascade-7.8.1.ebuild
@@ -104,7 +104,6 @@ PATCHES=(
        "${FILESDIR}/${PN}-7.5.1-0006-fix-creation-of-custom.sh-script.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"
        "${FILESDIR}/${PN}-7.7.0-musl.patch"
        "${FILESDIR}/${PN}-7.7.0-tbb-detection.patch"
        "${FILESDIR}/${PN}-7.7.0-jemalloc-lib-type.patch"

diff --git a/sci-libs/opencascade/opencascade-9999.ebuild 
b/sci-libs/opencascade/opencascade-9999.ebuild
index aa6493d1b426..4358439f6e95 100644
--- a/sci-libs/opencascade/opencascade-9999.ebuild
+++ b/sci-libs/opencascade/opencascade-9999.ebuild
@@ -101,15 +101,12 @@ BDEPEND="
 
 PATCHES=(
        "${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"
        "${FILESDIR}/${PN}-7.7.0-musl.patch"
-       "${FILESDIR}/${PN}-7.7.0-tbb-detection.patch"
-       "${FILESDIR}/${PN}-7.7.0-jemalloc-lib-type.patch"
-       "${FILESDIR}/${PN}-7.8.0-cmake-min-version.patch"
        "${FILESDIR}/${PN}-7.8.0-tests.patch"
        "${FILESDIR}/${PN}-7.8.0-jemalloc-noexcept.patch"
        "${FILESDIR}/${PN}-7.8.1-vtk_components.patch"
+       "${FILESDIR}/${PN}-7.8.2-avoid-pre-stripping-binaries.patch"
+       "${FILESDIR}/${PN}-7.8.2-jemalloc-lib-type.patch"
 )
 
 src_unpack() {

Reply via email to