git: 6bac56f068c0 - main - cad/PrusaSlicer: Strip FindOpenVDB's Imath::Half handling

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Sun, 10 Aug 2025 19:03:21 UTC
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6bac56f068c067cbbd6f0326cee640ab62bfcdb6

commit 6bac56f068c067cbbd6f0326cee640ab62bfcdb6
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2025-08-09 18:11:20 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2025-08-10 19:02:43 +0000

    cad/PrusaSlicer: Strip FindOpenVDB's Imath::Half handling
    
    ...which no longer fits Imath 3.2.0, and replace the simpler parts
    of it by just depending on Imath or Imath::Imath.
---
 cad/PrusaSlicer/Makefile                           |  3 +-
 .../files/patch-cmake_modules_FindOpenVDB.cmake    | 32 ++++++++--------------
 .../files/patch-src_slic3r_GUI_GLCanvas3D.cpp      |  4 +--
 .../files/patch-src_slic3r_GUI_Preferences.cpp     |  6 ++--
 4 files changed, 18 insertions(+), 27 deletions(-)

diff --git a/cad/PrusaSlicer/Makefile b/cad/PrusaSlicer/Makefile
index 7b3a95bf3e66..19893f969204 100644
--- a/cad/PrusaSlicer/Makefile
+++ b/cad/PrusaSlicer/Makefile
@@ -61,7 +61,8 @@ CMAKE_ARGS+=	-DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \
 		-DSLIC3R_GTK=3 \
 		-DSLIC3R_FHS=1 \
 		-DSLIC3R_PCH=OFF \
-		-DSLIC3R_BUILD_TESTS=OFF
+		-DSLIC3R_BUILD_TESTS=OFF \
+		-Wno-dev
 
 PORTDATA=	*
 post-patch:
diff --git a/cad/PrusaSlicer/files/patch-cmake_modules_FindOpenVDB.cmake b/cad/PrusaSlicer/files/patch-cmake_modules_FindOpenVDB.cmake
index 02a12d73302b..142237d5aafd 100644
--- a/cad/PrusaSlicer/files/patch-cmake_modules_FindOpenVDB.cmake
+++ b/cad/PrusaSlicer/files/patch-cmake_modules_FindOpenVDB.cmake
@@ -1,28 +1,23 @@
---- cmake/modules/FindOpenVDB.cmake.orig	2025-02-14 18:26:40 UTC
+--- cmake/modules/FindOpenVDB.cmake.orig	2025-04-10 11:26:51 UTC
 +++ cmake/modules/FindOpenVDB.cmake
-@@ -347,24 +347,24 @@ endmacro()
+@@ -347,24 +347,12 @@ endmacro()
    return()
  endmacro()
  
 -find_package(IlmBase QUIET)
 -if(NOT IlmBase_FOUND)
 -  pkg_check_modules(IlmBase QUIET IlmBase)
-+find_package(Imath QUIET COMPONENTS Half)
++find_package(Imath QUIET COMPONENTS Imath)
 +if(NOT Imath_FOUND)
 +  pkg_check_modules(Imath QUIET Imath)
  endif()
 -if (IlmBase_FOUND AND NOT TARGET IlmBase::Half)
 -  message(STATUS "Falling back to IlmBase found by pkg-config...")
-+if (Imath_FOUND AND NOT TARGET Imath::Half)
-+  message(STATUS "Falling back to Imath found by pkg-config...")
- 
+-
 -  find_library(IlmHalf_LIBRARY NAMES Half)
 -  if(IlmHalf_LIBRARY-NOTFOUND OR NOT IlmBase_INCLUDE_DIRS)
 -    just_fail("IlmBase::Half can not be found!")
-+  find_library(Imath_LIBRARY NAMES Imath)
-+  if(Imath_LIBRARY-NOTFOUND OR NOT Imath_INCLUDE_DIRS)
-+    just_fail("Imath::Half can not be found!")
-   endif()
+-  endif()
 -  
 -  add_library(IlmBase::Half UNKNOWN IMPORTED)
 -  set_target_properties(IlmBase::Half PROPERTIES
@@ -30,17 +25,12 @@
 -    INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}")
 -elseif(NOT IlmBase_FOUND)
 -  just_fail("IlmBase::Half can not be found!")
-+ 
-+  add_library(Imath::Half UNKNOWN IMPORTED)
-+  set_target_properties(Imath::Half PROPERTIES
-+						IMPORTED_LOCATION "${Imath_LIBRARY}"
-+						INTERFACE_INCLUDE_DIRECTORIES "${Imath_INCLUDE_DIRS}")
-+elseif(NOT Imath_FOUND)
++if(NOT Imath_FOUND)
 +  just_fail("Imath::Half can not be found!")
  endif()
  find_package(TBB ${_quiet} ${_required} COMPONENTS tbb)
  find_package(ZLIB ${_quiet} ${_required})
-@@ -451,7 +451,7 @@ if(OpenVDB_USES_ILM)
+@@ -451,7 +439,7 @@ if(OpenVDB_USES_ILM)
  endif()
  
  if(OpenVDB_USES_ILM)
@@ -49,7 +39,7 @@
  endif()
  
  if(OpenVDB_USES_EXR)
-@@ -463,7 +463,7 @@ endif()
+@@ -463,7 +451,7 @@ endif()
  endif()
  
  # Set deps. Note that the order here is important. If we're building against
@@ -58,16 +48,16 @@
  # users chosen namespaced headers are correctly prioritized. Otherwise other
  # include paths from shared installs (including houdini) may pull in the wrong
  # headers
-@@ -471,7 +471,7 @@ set(_OPENVDB_VISIBLE_DEPENDENCIES
+@@ -471,7 +459,7 @@ set(_OPENVDB_VISIBLE_DEPENDENCIES
  set(_OPENVDB_VISIBLE_DEPENDENCIES
    Boost::iostreams
    Boost::system
 -  IlmBase::Half
-+  Imath::Half
++  Imath::Imath
  )
  
  set(_OPENVDB_DEFINITIONS)
-@@ -481,10 +481,10 @@ if(OpenVDB_USES_EXR)
+@@ -481,10 +469,10 @@ if(OpenVDB_USES_EXR)
  
  if(OpenVDB_USES_EXR)
    list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES
diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GLCanvas3D.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GLCanvas3D.cpp
index a08546fb6152..24adaa7d568b 100644
--- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GLCanvas3D.cpp
+++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GLCanvas3D.cpp
@@ -1,6 +1,6 @@
---- src/slic3r/GUI/GLCanvas3D.cpp.orig	2025-02-20 18:44:48 UTC
+--- src/slic3r/GUI/GLCanvas3D.cpp.orig	2025-04-10 11:26:51 UTC
 +++ src/slic3r/GUI/GLCanvas3D.cpp
-@@ -13,7 +13,7 @@
+@@ -18,7 +18,7 @@
  
  #include <igl/unproject.h> // IWYU pragma: keep
  #include <LocalesUtils.hpp>
diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp
index 9a78a4c1706e..9d3cd1e03b38 100644
--- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp
+++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_Preferences.cpp
@@ -9,7 +9,7 @@
  #include "DesktopIntegrationDialog.hpp"
  #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
  
-@@ -270,7 +270,7 @@ void PreferencesDialog::build()
+@@ -271,7 +271,7 @@ void PreferencesDialog::build()
  	tabs = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL | wxNB_NOPAGETHEME | wxNB_DEFAULT);
  #else
      tabs = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL  |wxNB_NOPAGETHEME | wxNB_DEFAULT );
@@ -18,7 +18,7 @@
  	tabs->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) {
  		e.Skip();
  		CallAfter([this]() { tabs->GetCurrentPage()->Layout(); });
-@@ -750,7 +750,7 @@ void PreferencesDialog::accept(wxEvent&)
+@@ -756,7 +756,7 @@ void PreferencesDialog::accept(wxEvent&)
  			downloader->allow(it->second == "1");
  		if (!downloader->on_finish())
  			return;
@@ -27,7 +27,7 @@
  		if(DownloaderUtils::Worker::perform_registration_linux) 
  			DesktopIntegrationDialog::perform_downloader_desktop_integration();
  #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
-@@ -1108,7 +1108,7 @@ void PreferencesDialog::create_settings_font_widget()
+@@ -1114,7 +1114,7 @@ void PreferencesDialog::create_settings_font_widget()
  		font_example->SetFont(font);
  		m_values[opt_key] = format("%1%", val);
  		stb_sizer->Layout();