summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/superslicer/files')
-rw-r--r--media-gfx/superslicer/files/superslicer-2.5.59.2-boost.patch324
-rw-r--r--media-gfx/superslicer/files/superslicer-2.5.59.2-cereal.patch53
-rw-r--r--media-gfx/superslicer/files/superslicer-2.5.59.2-dont-install-angelscript.patch13
-rw-r--r--media-gfx/superslicer/files/superslicer-2.5.59.2-gcodeviewer-symlink-fix.patch11
-rw-r--r--media-gfx/superslicer/files/superslicer-2.5.59.2-missing-includes-fix.patch74
-rw-r--r--media-gfx/superslicer/files/superslicer-2.5.59.2-openexr3.patch77
-rw-r--r--media-gfx/superslicer/files/superslicer-2.5.59.2-relax-OpenCASCADE-dep.patch13
-rw-r--r--media-gfx/superslicer/files/superslicer-2.5.59.2-wxgtk3-wayland-fix.patch21
8 files changed, 586 insertions, 0 deletions
diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.2-boost.patch b/media-gfx/superslicer/files/superslicer-2.5.59.2-boost.patch
new file mode 100644
index 000000000000..ba0870a480b0
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.2-boost.patch
@@ -0,0 +1,324 @@
+diff --git a/src/hints/HintsToPot.cpp b/src/hints/HintsToPot.cpp
+index 7c8029c..4791f06 100644
+--- a/src/hints/HintsToPot.cpp
++++ b/src/hints/HintsToPot.cpp
+@@ -9,7 +9,7 @@
+
+ bool write_to_pot(boost::filesystem::path path, const std::vector<std::pair<std::string, std::string>>& data)
+ {
+- boost::filesystem::ofstream file(std::move(path), std::ios_base::app);
++ boost::nowide::ofstream file(path.string(), std::ios_base::app);
+ for (const auto& element : data)
+ {
+ //Example of .pot element
+diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp
+index e7c81f8..a626986 100644
+--- a/src/libslic3r/AppConfig.cpp
++++ b/src/libslic3r/AppConfig.cpp
+@@ -1,3 +1,4 @@
++#include <boost/filesystem.hpp>
+ #include "libslic3r/libslic3r.h"
+ #include "libslic3r/Utils.hpp"
+ #include "AppConfig.hpp"
+diff --git a/src/libslic3r/AppConfig.hpp b/src/libslic3r/AppConfig.hpp
+index 35e36c0..5e8059b 100644
+--- a/src/libslic3r/AppConfig.hpp
++++ b/src/libslic3r/AppConfig.hpp
+@@ -5,6 +5,7 @@
+ #include <map>
+ #include <string>
+
++#include <boost/filesystem/path.hpp>
+ #include <boost/algorithm/string/trim_all.hpp>
+
+ #include "libslic3r/Config.hpp"
+diff --git a/src/libslic3r/Flow.cpp b/src/libslic3r/Flow.cpp
+index 269c1cb..acea297 100644
+--- a/src/libslic3r/Flow.cpp
++++ b/src/libslic3r/Flow.cpp
+@@ -6,6 +6,7 @@
+ #include <assert.h>
+
+ #include <boost/algorithm/string/predicate.hpp>
++#include <boost/algorithm/string/replace.hpp>
+
+ // Mark string for localization and translate.
+ #define L(s) Slic3r::I18N::translate(s)
+diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp
+index 132c9a7..c311d05 100644
+--- a/src/libslic3r/GCode/WipeTower.cpp
++++ b/src/libslic3r/GCode/WipeTower.cpp
+@@ -12,7 +12,9 @@
+ #include "LocalesUtils.hpp"
+ #include "Flow.hpp"
+
++
+ #include <boost/algorithm/string/predicate.hpp>
++#include <boost/algorithm/string.hpp>
+
+
+ namespace Slic3r
+diff --git a/src/libslic3r/LocalesUtils.cpp b/src/libslic3r/LocalesUtils.cpp
+index 5bf5205..7b87052 100644
+--- a/src/libslic3r/LocalesUtils.cpp
++++ b/src/libslic3r/LocalesUtils.cpp
+@@ -1,3 +1,4 @@
++#include <boost/lexical_cast.hpp>
+ #include "LocalesUtils.hpp"
+
+ #ifdef _WIN32
+diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp
+index 106f26e..c81cd1d 100644
+--- a/src/libslic3r/Preset.cpp
++++ b/src/libslic3r/Preset.cpp
+@@ -84,7 +84,7 @@ ConfigFileType guess_config_file_type(const ptree &tree)
+ VendorProfile VendorProfile::from_ini(const boost::filesystem::path &path, bool load_all)
+ {
+ ptree tree;
+- boost::filesystem::ifstream ifs(path);
++ boost::nowide::ifstream ifs(path.string());
+ boost::property_tree::read_ini(ifs, tree);
+ return VendorProfile::from_ini(tree, path, load_all);
+ }
+diff --git a/src/libslic3r/Utils.hpp b/src/libslic3r/Utils.hpp
+index f525c98..839f0f5 100644
+--- a/src/libslic3r/Utils.hpp
++++ b/src/libslic3r/Utils.hpp
+@@ -7,6 +7,7 @@
+ #include <type_traits>
+ #include <system_error>
+
++#include <boost/filesystem.hpp>
+ #include <boost/system/error_code.hpp>
+
+ #include "libslic3r.h"
+diff --git a/src/slic3r/GUI/CreateMMUTiledCanvas.cpp b/src/slic3r/GUI/CreateMMUTiledCanvas.cpp
+index cef390f..553a183 100644
+--- a/src/slic3r/GUI/CreateMMUTiledCanvas.cpp
++++ b/src/slic3r/GUI/CreateMMUTiledCanvas.cpp
+@@ -18,6 +18,11 @@
+ #include <wx/notebook.h>
+ #include "Notebook.hpp"
+
++#include <boost/filesystem.hpp>
++#include <boost/property_tree/ptree.hpp>
++#include <boost/property_tree/ini_parser.hpp>
++#include <boost/log/trivial.hpp>
++
+ #include "MainFrame.hpp"
+ #include "wxExtensions.hpp"
+
+diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
+index fcb7472..866ebae 100644
+--- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp
++++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
+@@ -14,6 +14,7 @@
+ #include <boost/log/trivial.hpp>
+ #include <boost/dll/runtime_symbol_info.hpp>
+ #include <boost/algorithm/string/replace.hpp>
++#include <boost/nowide/fstream.hpp>
+
+ #include <wx/filename.h>
+ #include <wx/stattext.h>
+@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog()
+
+ } // namespace GUI
+ } // namespace Slic3r
+-#endif // __linux__
+\ No newline at end of file
++#endif // __linux__
+diff --git a/src/slic3r/GUI/FreeCADDialog.cpp b/src/slic3r/GUI/FreeCADDialog.cpp
+index d519626..a14fb61 100644
+--- a/src/slic3r/GUI/FreeCADDialog.cpp
++++ b/src/slic3r/GUI/FreeCADDialog.cpp
+@@ -38,6 +38,7 @@
+ #include <boost/log/trivial.hpp>
+ #include <boost/property_tree/ptree.hpp>
+ #include <boost/property_tree/json_parser.hpp>
++#include <boost/nowide/fstream.hpp>
+
+ // hack for process.hpp : it uses pid_t to set it as alias of int, but vc_x64_lib (wx thingy) as a '#define pid_t int'
+ // and so boost/process has a line 'typedef int int'instead of 'typedef int pid_t' that makes it crash
+@@ -322,7 +323,7 @@ bool FreeCADDialog::load_text_from_file(const boost::filesystem::path &path) {
+ try {
+ std::locale loc = boost::locale::generator()("en_US.UTF-8");
+ // Open the stream to 'lock' the file.
+- boost::filesystem::ifstream in;
++ boost::nowide::ifstream in;
+ in.imbue(loc);
+ in.open(path);
+ // Obtain the size of the file.
+@@ -369,7 +370,7 @@ bool FreeCADDialog::write_text_in_file(const wxString &towrite, const boost::fil
+ boost::filesystem::create_directories(file.parent_path());
+ std::locale loc = boost::locale::generator()("en_US.UTF-8");
+ // Open the stream to 'lock' the file.
+- boost::filesystem::ofstream out;
++ boost::nowide::ofstream out;
+ out.imbue(loc);
+ out.open(file);
+ out << towrite;
+diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
+index 2f32d04..813ef1c 100644
+--- a/src/slic3r/GUI/GUI_App.cpp
++++ b/src/slic3r/GUI/GUI_App.cpp
+@@ -19,6 +19,7 @@
+ #include <boost/lexical_cast.hpp>
+ #include <boost/log/trivial.hpp>
+ #include <boost/nowide/convert.hpp>
++#include <boost/nowide/fstream.hpp>
+
+ #include <wx/stdpaths.h>
+ #include <wx/imagpng.h>
+diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp
+index dbedd0a..25182cc 100644
+--- a/src/slic3r/GUI/HintNotification.cpp
++++ b/src/slic3r/GUI/HintNotification.cpp
+@@ -14,12 +14,14 @@
+ #include "libslic3r/Config.hpp"
+ #include "libslic3r/PrintConfig.hpp"
+
++#include <map>
++
+ #include <boost/algorithm/string/replace.hpp>
+ #include <boost/filesystem.hpp>
+ #include <boost/nowide/fstream.hpp>
+ #include <boost/log/trivial.hpp>
+ #include <boost/property_tree/ini_parser.hpp>
+-#include <map>
++
+ #include <cereal/archives/binary.hpp>
+ #include <cereal/types/string.hpp>
+ #include <cereal/types/vector.hpp>
+@@ -65,7 +67,7 @@ inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, f
+
+ void write_used_binary(const std::vector<std::string>& ids)
+ {
+- boost::filesystem::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary);
++ boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal").string(), std::ios::binary);
+ cereal::BinaryOutputArchive archive(file);
+ HintsCerealData cd { ids };
+ try
+@@ -84,7 +86,7 @@ void read_used_binary(std::vector<std::string>& ids)
+ BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string();
+ return;
+ }
+- boost::filesystem::ifstream file(path);
++ boost::nowide::ifstream file(path.string());
+ cereal::BinaryInputArchive archive(file);
+ HintsCerealData cd;
+ try
+diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp
+index ffc600b..c8080d1 100644
+--- a/src/slic3r/GUI/Preferences.cpp
++++ b/src/slic3r/GUI/Preferences.cpp
+@@ -12,6 +12,7 @@
+ #include "OG_CustomCtrl.hpp"
+ #include "wxExtensions.hpp"
+
++#include <boost/algorithm/string/split.hpp>
+ #include <boost/filesystem.hpp>
+ #include <boost/filesystem/path.hpp>
+
+diff --git a/src/slic3r/GUI/PrintHostDialogs.cpp b/src/slic3r/GUI/PrintHostDialogs.cpp
+index 87bef23..d097d58 100644
+--- a/src/slic3r/GUI/PrintHostDialogs.cpp
++++ b/src/slic3r/GUI/PrintHostDialogs.cpp
+@@ -81,8 +81,8 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUplo
+ if (size_t extension_start = recent_path.find_last_of('.'); extension_start != std::string::npos)
+ m_valid_suffix = recent_path.substr(extension_start);
+ // .gcode suffix control
+- auto validate_path = [this](const wxString &path) -> bool {
+- if (! path.Lower().EndsWith(m_valid_suffix.Lower())) {
++ auto validate_path = [this](const std::wstring &path) -> bool {
++ if (! wxString(path).Lower().EndsWith(m_valid_suffix.Lower())) {
+ MessageDialog msg_wingow(this, wxString::Format(_L("Upload filename doesn't end with \"%s\". Do you wish to continue?"), m_valid_suffix), wxString(SLIC3R_APP_NAME), wxYES | wxNO);
+ if (msg_wingow.ShowModal() == wxID_NO)
+ return false;
+@@ -92,7 +92,7 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUplo
+
+ auto* btn_ok = add_button(wxID_OK, true, _L("Upload"));
+ btn_ok->Bind(wxEVT_BUTTON, [this, validate_path](wxCommandEvent&) {
+- if (validate_path(txt_filename->GetValue())) {
++ if (validate_path(txt_filename->GetValue().ToStdWstring())) {
+ post_upload_action = PrintHostPostUploadAction::None;
+ EndDialog(wxID_OK);
+ }
+@@ -102,7 +102,7 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUplo
+ if (post_actions.has(PrintHostPostUploadAction::StartPrint)) {
+ auto* btn_print = add_button(wxID_YES, false, _L("Upload and Print"));
+ btn_print->Bind(wxEVT_BUTTON, [this, validate_path](wxCommandEvent&) {
+- if (validate_path(txt_filename->GetValue())) {
++ if (validate_path(txt_filename->GetValue().ToStdWstring())) {
+ post_upload_action = PrintHostPostUploadAction::StartPrint;
+ EndDialog(wxID_OK);
+ }
+@@ -113,7 +113,7 @@ PrintHostSendDialog::PrintHostSendDialog(const fs::path &path, PrintHostPostUplo
+ // Using wxID_MORE as a button identifier to be different from the other buttons, wxID_MORE has no other meaning here.
+ auto* btn_simulate = add_button(wxID_MORE, false, _L("Upload and Simulate"));
+ btn_simulate->Bind(wxEVT_BUTTON, [this, validate_path](wxCommandEvent&) {
+- if (validate_path(txt_filename->GetValue())) {
++ if (validate_path(txt_filename->GetValue().ToStdWstring())) {
+ post_upload_action = PrintHostPostUploadAction::StartSimulation;
+ EndDialog(wxID_OK);
+ }
+diff --git a/src/slic3r/GUI/ScriptExecutor.cpp b/src/slic3r/GUI/ScriptExecutor.cpp
+index e923bb5..354c79b 100644
+--- a/src/slic3r/GUI/ScriptExecutor.cpp
++++ b/src/slic3r/GUI/ScriptExecutor.cpp
+@@ -4,6 +4,13 @@
+ #include "Tab.hpp"
+ #include "libslic3r/PresetBundle.hpp"
+ #include "libslic3r/Print.hpp"
++#include <boost/log/trivial.hpp>
++#include <boost/lexical_cast.hpp>
++#include <boost/algorithm/string/trim_all.hpp>
++#include <boost/algorithm/string/erase.hpp>
++#include <boost/algorithm/string/split.hpp>
++#include <boost/filesystem.hpp>
++#include <boost/filesystem/string_file.hpp>
+
+ #include <string>
+
+diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
+index 340369e..837982e 100644
+--- a/src/slic3r/GUI/Tab.cpp
++++ b/src/slic3r/GUI/Tab.cpp
+@@ -36,6 +36,8 @@
+ #include <boost/filesystem.hpp>
+ #include <boost/filesystem/path.hpp>
+ #include <boost/lexical_cast.hpp>
++#include <boost/nowide/fstream.hpp>
++#include <boost/log/trivial.hpp>
+
+ #include "wxExtensions.hpp"
+ #include "PresetComboBoxes.hpp"
+@@ -1701,7 +1703,7 @@ std::vector<Slic3r::GUI::PageShp> Tab::create_pages(std::string setting_type_nam
+
+ //read file
+ //std::ifstream filestream(ui_layout_file.c_str());
+- boost::filesystem::ifstream filestream(ui_layout_file);
++ boost::nowide::ifstream filestream(ui_layout_file);
+ std::string full_line;
+ while (std::getline(filestream, full_line)) {
+ //remove spaces
+diff --git a/src/slic3r/Utils/Http.cpp b/src/slic3r/Utils/Http.cpp
+index 62461cd..7a02c04 100644
+--- a/src/slic3r/Utils/Http.cpp
++++ b/src/slic3r/Utils/Http.cpp
+@@ -11,6 +11,7 @@
+ #include <boost/filesystem.hpp>
+ #include <boost/format.hpp>
+ #include <boost/log/trivial.hpp>
++#include <boost/nowide/fstream.hpp>
+
+ #include <curl/curl.h>
+
+@@ -52,7 +53,7 @@ namespace Slic3r {
+ % error;
+ })
+ .on_complete([&](std::string body, unsigned /* http_status */) {
+- boost::filesystem::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc);
++ boost::nowide::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc);
+ file.write(body.c_str(), body.size());
+ file.close();
+ boost::filesystem::rename(tmp_path, target_path);
diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.2-cereal.patch b/media-gfx/superslicer/files/superslicer-2.5.59.2-cereal.patch
new file mode 100644
index 000000000000..2013e08cf032
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.2-cereal.patch
@@ -0,0 +1,53 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 18f26ba..c0a1f1f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -468,6 +468,9 @@ endif ()
+
+ # Find the Cereal serialization library
+ find_package(cereal REQUIRED)
++if (NOT TARGET cereal::cereal)
++ add_library(cereal::cereal ALIAS cereal)
++endif ()
+
+ # l10n
+ set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 7b2defe..f63aaad 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -141,7 +141,7 @@ if (NOT WIN32)
+ set_target_properties(Slic3r PROPERTIES OUTPUT_NAME "${SLIC3R_APP_CMD}")
+ endif ()
+
+-target_link_libraries(Slic3r libslic3r cereal)
++target_link_libraries(Slic3r libslic3r cereal::cereal)
+
+ if (APPLE)
+ # add_compile_options(-stdlib=libc++)
+diff --git a/src/libslic3r/CMakeLists.txt b/src/libslic3r/CMakeLists.txt
+index 0ab5584..36917f3 100644
+--- a/src/libslic3r/CMakeLists.txt
++++ b/src/libslic3r/CMakeLists.txt
+@@ -416,7 +416,7 @@ find_package(JPEG REQUIRED)
+ target_link_libraries(libslic3r
+ libnest2d
+ admesh
+- cereal
++ cereal::cereal
+ libigl
+ miniz
+ boost_libs
+diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
+index c11f860..4ca2523 100644
+--- a/src/slic3r/CMakeLists.txt
++++ b/src/slic3r/CMakeLists.txt
+@@ -302,7 +302,7 @@ target_compile_definitions(libslic3r_gui PRIVATE $<$<BOOL:${SLIC3R_ALPHA}>:SLIC3
+
+ encoding_check(libslic3r_gui)
+
+-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi exif angelscript libcurl ${wxWidgets_LIBRARIES})
++target_link_libraries(libslic3r_gui libslic3r avrdude cereal::cereal imgui GLEW::GLEW OpenGL::GL hidapi exif angelscript libcurl ${wxWidgets_LIBRARIES})
+
+ if (MSVC)
+ target_link_libraries(libslic3r_gui Setupapi.lib)
diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.2-dont-install-angelscript.patch b/media-gfx/superslicer/files/superslicer-2.5.59.2-dont-install-angelscript.patch
new file mode 100644
index 000000000000..f8e89fcd08fa
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.2-dont-install-angelscript.patch
@@ -0,0 +1,13 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index f63aaad..ba2fe01 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -28,7 +28,7 @@ if (SLIC3R_GUI)
+ include_directories(hidapi/include)
+ add_subdirectory(exif)
+ include_directories(exif/include)
+- add_subdirectory(angelscript)
++ add_subdirectory(angelscript EXCLUDE_FROM_ALL)
+ # include_directories(angelscript/include)
+
+ if(WIN32)
diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.2-gcodeviewer-symlink-fix.patch b/media-gfx/superslicer/files/superslicer-2.5.59.2-gcodeviewer-symlink-fix.patch
new file mode 100644
index 000000000000..2fc6ca2730e8
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.2-gcodeviewer-symlink-fix.patch
@@ -0,0 +1,11 @@
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index ba2fe01..b84292b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -300,5 +300,5 @@ else ()
+ install(TARGETS Slic3r RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+
+ # Install the symlink for gcodeviewer
+- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink slic3r ${GCODEVIEWER_APP_CMD} WORKING_DIRECTORY \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})")
++ install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${SLIC3R_APP_CMD} ${GCODEVIEWER_APP_CMD} WORKING_DIRECTORY \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})")
+ endif ()
diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.2-missing-includes-fix.patch b/media-gfx/superslicer/files/superslicer-2.5.59.2-missing-includes-fix.patch
new file mode 100644
index 000000000000..289198863367
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.2-missing-includes-fix.patch
@@ -0,0 +1,74 @@
+diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp
+index a626986..5f2d963 100644
+--- a/src/libslic3r/AppConfig.cpp
++++ b/src/libslic3r/AppConfig.cpp
+@@ -1,6 +1,7 @@
+ #include <boost/filesystem.hpp>
+ #include "libslic3r/libslic3r.h"
+ #include "libslic3r/Utils.hpp"
++#include "libslic3r/I18N.hpp"
+ #include "AppConfig.hpp"
+ #include "Exception.hpp"
+ #include "LocalesUtils.hpp"
+diff --git a/src/libslic3r/ExtrusionEntity.hpp b/src/libslic3r/ExtrusionEntity.hpp
+index 1c54588..c74df3a 100644
+--- a/src/libslic3r/ExtrusionEntity.hpp
++++ b/src/libslic3r/ExtrusionEntity.hpp
+@@ -9,6 +9,8 @@
+ #include <string_view>
+ #include <numeric>
+
++#include "Config.hpp"
++
+ namespace Slic3r {
+
+ class ExPolygonCollection;
+diff --git a/src/libslic3r/Geometry/ArcFitter.cpp b/src/libslic3r/Geometry/ArcFitter.cpp
+index 34ef2ae..20fe8b7 100644
+--- a/src/libslic3r/Geometry/ArcFitter.cpp
++++ b/src/libslic3r/Geometry/ArcFitter.cpp
+@@ -2,6 +2,7 @@
+
+ #include <cmath>
+ #include <cassert>
++#include "Polyline.hpp"
+
+ namespace Slic3r { namespace Geometry {
+
+diff --git a/src/libslic3r/PerimeterGenerator.hpp b/src/libslic3r/PerimeterGenerator.hpp
+index 34ec4e6..ed83b3e 100644
+--- a/src/libslic3r/PerimeterGenerator.hpp
++++ b/src/libslic3r/PerimeterGenerator.hpp
+@@ -1,6 +1,7 @@
+ #ifndef slic3r_PerimeterGenerator_hpp_
+ #define slic3r_PerimeterGenerator_hpp_
+
++#include "ClipperUtils.hpp"
+ #include "libslic3r.h"
+ #include <vector>
+ #include "ExPolygonCollection.hpp"
+diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp
+index f69d68f..1dd55f2 100644
+--- a/src/libslic3r/Print.cpp
++++ b/src/libslic3r/Print.cpp
+@@ -18,6 +18,8 @@
+ #include "Utils.hpp"
+ #include "BuildVolume.hpp"
+
++#include <tbb/tbb.h>
++
+ #include <float.h>
+
+ #include <algorithm>
+diff --git a/src/slic3r/GUI/CreateMMUTiledCanvas.cpp b/src/slic3r/GUI/CreateMMUTiledCanvas.cpp
+index 553a183..686630c 100644
+--- a/src/slic3r/GUI/CreateMMUTiledCanvas.cpp
++++ b/src/slic3r/GUI/CreateMMUTiledCanvas.cpp
+@@ -40,6 +40,7 @@
+ #include <wx/odcombo.h>
+ #include <wx/textctrl.h>
+ #include <wx/wrapsizer.h>
++#include <wx/rawbmp.h>
+ #include "wxExtensions.hpp"
+
+ #include <boost/filesystem/path.hpp>
diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.2-openexr3.patch b/media-gfx/superslicer/files/superslicer-2.5.59.2-openexr3.patch
new file mode 100644
index 000000000000..7bd04e6fad10
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.2-openexr3.patch
@@ -0,0 +1,77 @@
+diff --git a/cmake/modules/FindOpenVDB.cmake b/cmake/modules/FindOpenVDB.cmake
+index 4fde5fa..566e73a 100644
+--- a/cmake/modules/FindOpenVDB.cmake
++++ b/cmake/modules/FindOpenVDB.cmake
+@@ -347,28 +347,10 @@ macro(just_fail msg)
+ return()
+ endmacro()
+
+-find_package(IlmBase QUIET)
+-if(NOT IlmBase_FOUND)
+- pkg_check_modules(IlmBase QUIET IlmBase)
+-endif()
+-if (IlmBase_FOUND AND NOT TARGET IlmBase::Half)
+- message(STATUS "Falling back to IlmBase 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!")
+- endif()
+-
+- add_library(IlmBase::Half UNKNOWN IMPORTED)
+- set_target_properties(IlmBase::Half PROPERTIES
+- IMPORTED_LOCATION "${IlmHalf_LIBRARY}"
+- INTERFACE_INCLUDE_DIRECTORIES "${IlmBase_INCLUDE_DIRS}")
+-elseif(NOT IlmBase_FOUND)
+- just_fail("IlmBase::Half can not be found!")
+-endif()
+ find_package(TBB ${_quiet} ${_required} COMPONENTS tbb)
+ find_package(ZLIB ${_quiet} ${_required})
+ find_package(Boost ${_quiet} ${_required} COMPONENTS iostreams system )
++find_package(Imath CONFIG)
+
+ # Use GetPrerequisites to see which libraries this OpenVDB lib has linked to
+ # which we can query for optional deps. This basically runs ldd/otoll/objdump
+@@ -419,7 +401,7 @@ foreach(PREREQUISITE ${_OPENVDB_PREREQUISITE_LIST})
+ set(OpenVDB_USES_LOG4CPLUS ON)
+ endif()
+
+- string(FIND ${PREREQUISITE} "IlmImf" _HAS_DEP)
++ string(FIND ${PREREQUISITE} "OpenEXR" _HAS_DEP)
+ if(NOT ${_HAS_DEP} EQUAL -1)
+ set(OpenVDB_USES_ILM ON)
+ endif()
+@@ -450,11 +432,7 @@ if(OpenVDB_USES_LOG4CPLUS)
+ find_package(Log4cplus ${_quiet} ${_required})
+ endif()
+
+-if(OpenVDB_USES_ILM)
+- find_package(IlmBase ${_quiet} ${_required})
+-endif()
+-
+-if(OpenVDB_USES_EXR)
++if(OpenVDB_USES_ILM OR OpenVDB_USES_EXR)
+ find_package(OpenEXR ${_quiet} ${_required})
+ endif()
+
+@@ -471,7 +449,7 @@ endif()
+ set(_OPENVDB_VISIBLE_DEPENDENCIES
+ Boost::iostreams
+ Boost::system
+- IlmBase::Half
++ Imath::Imath
+ )
+
+ set(_OPENVDB_DEFINITIONS)
+@@ -481,10 +459,7 @@ endif()
+
+ if(OpenVDB_USES_EXR)
+ list(APPEND _OPENVDB_VISIBLE_DEPENDENCIES
+- IlmBase::IlmThread
+- IlmBase::Iex
+- IlmBase::Imath
+- OpenEXR::IlmImf
++ OpenEXR::OpenEXR
+ )
+ list(APPEND _OPENVDB_DEFINITIONS "-DOPENVDB_TOOLS_RAYTRACER_USE_EXR")
+ endif()
diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.2-relax-OpenCASCADE-dep.patch b/media-gfx/superslicer/files/superslicer-2.5.59.2-relax-OpenCASCADE-dep.patch
new file mode 100644
index 000000000000..1ea699ebff5a
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.2-relax-OpenCASCADE-dep.patch
@@ -0,0 +1,13 @@
+diff --git a/src/occt_wrapper/CMakeLists.txt b/src/occt_wrapper/CMakeLists.txt
+index ed75531..16de4e0 100644
+--- a/src/occt_wrapper/CMakeLists.txt
++++ b/src/occt_wrapper/CMakeLists.txt
+@@ -19,7 +19,7 @@ include(GenerateExportHeader)
+
+ generate_export_header(OCCTWrapper)
+
+-find_package(OpenCASCADE 7.6.2 REQUIRED)
++find_package(OpenCASCADE REQUIRED)
+
+ set(OCCT_LIBS
+ TKXDESTEP
diff --git a/media-gfx/superslicer/files/superslicer-2.5.59.2-wxgtk3-wayland-fix.patch b/media-gfx/superslicer/files/superslicer-2.5.59.2-wxgtk3-wayland-fix.patch
new file mode 100644
index 000000000000..6111a25cbf2c
--- /dev/null
+++ b/media-gfx/superslicer/files/superslicer-2.5.59.2-wxgtk3-wayland-fix.patch
@@ -0,0 +1,21 @@
+diff --git a/src/slic3r/GUI/GUI.cpp b/src/slic3r/GUI/GUI.cpp
+index ccd3cc0..be8bbe5 100644
+--- a/src/slic3r/GUI/GUI.cpp
++++ b/src/slic3r/GUI/GUI.cpp
+@@ -33,6 +33,16 @@ class AppConfig;
+
+ namespace GUI {
+
++// wxgtk3 is broken on wayland: https://trac.wxwidgets.org/ticket/17702
++#ifdef __WXGTK3__
++struct ForceX11 {
++ ForceX11() {
++ setenv("GDK_BACKEND", "x11", 1);
++ }
++};
++static struct ForceX11 forcex11;
++#endif
++
+ #if __APPLE__
+ IOPMAssertionID assertionID;
+ #endif