PrusaSlicer: rebuild for boost 1.81.0
This commit is contained in:
parent
dc4fcac8e4
commit
db165d3c5c
15
srcpkgs/PrusaSlicer/patches/boost-1.81.patch
Normal file
15
srcpkgs/PrusaSlicer/patches/boost-1.81.patch
Normal file
@ -0,0 +1,15 @@
|
||||
Index: PrusaSlicer-2.4.2/src/slic3r/GUI/PrintHostDialogs.cpp
|
||||
===================================================================
|
||||
--- PrusaSlicer-2.4.2.orig/src/slic3r/GUI/PrintHostDialogs.cpp
|
||||
+++ PrusaSlicer-2.4.2/src/slic3r/GUI/PrintHostDialogs.cpp
|
||||
@@ -79,8 +79,8 @@ PrintHostSendDialog::PrintHostSendDialog
|
||||
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 wxString &apath) -> bool {
|
||||
+ if (! apath.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;
|
38
srcpkgs/PrusaSlicer/patches/cereal-is-header-only.patch
Normal file
38
srcpkgs/PrusaSlicer/patches/cereal-is-header-only.patch
Normal file
@ -0,0 +1,38 @@
|
||||
Index: PrusaSlicer-2.4.2/src/libslic3r/CMakeLists.txt
|
||||
===================================================================
|
||||
--- PrusaSlicer-2.4.2.orig/src/libslic3r/CMakeLists.txt
|
||||
+++ PrusaSlicer-2.4.2/src/libslic3r/CMakeLists.txt
|
||||
@@ -337,7 +337,6 @@ target_include_directories(libslic3r PUB
|
||||
target_link_libraries(libslic3r
|
||||
libnest2d
|
||||
admesh
|
||||
- cereal
|
||||
libigl
|
||||
miniz
|
||||
boost_libs
|
||||
Index: PrusaSlicer-2.4.2/src/CMakeLists.txt
|
||||
===================================================================
|
||||
--- PrusaSlicer-2.4.2.orig/src/CMakeLists.txt
|
||||
+++ PrusaSlicer-2.4.2/src/CMakeLists.txt
|
||||
@@ -125,7 +125,7 @@ if (NOT WIN32 AND NOT APPLE)
|
||||
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
|
||||
endif ()
|
||||
|
||||
-target_link_libraries(PrusaSlicer libslic3r cereal)
|
||||
+target_link_libraries(PrusaSlicer libslic3r)
|
||||
if (APPLE)
|
||||
# add_compile_options(-stdlib=libc++)
|
||||
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
|
||||
Index: PrusaSlicer-2.4.2/src/slic3r/CMakeLists.txt
|
||||
===================================================================
|
||||
--- PrusaSlicer-2.4.2.orig/src/slic3r/CMakeLists.txt
|
||||
+++ PrusaSlicer-2.4.2/src/slic3r/CMakeLists.txt
|
||||
@@ -260,7 +260,7 @@ add_library(libslic3r_gui STATIC ${SLIC3
|
||||
|
||||
encoding_check(libslic3r_gui)
|
||||
|
||||
-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
|
||||
+target_link_libraries(libslic3r_gui libslic3r avrdude imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
|
||||
|
||||
if (MSVC)
|
||||
target_link_libraries(libslic3r_gui Setupapi.lib)
|
@ -18,3 +18,40 @@
|
||||
#include <string>
|
||||
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
--- a/src/slic3r/GUI/GUI_App.cpp
|
||||
+++ b/src/slic3r/GUI/GUI_App.cpp
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <exception>
|
||||
+#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include <regex>
|
||||
#include <string_view>
|
||||
--- a/src/slic3r/GUI/HintNotification.cpp
|
||||
+++ b/src/slic3r/GUI/HintNotification.cpp
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
+#include <boost/filesystem/fstream.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/property_tree/ini_parser.hpp>
|
||||
--- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp
|
||||
+++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "libslic3r/Platform.hpp"
|
||||
#include "libslic3r/Config.hpp"
|
||||
|
||||
+#include <fstream>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/dll/runtime_symbol_info.hpp>
|
||||
@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegr
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
-#endif // __linux__
|
||||
\ No newline at end of file
|
||||
+#endif // __linux__
|
||||
|
229
srcpkgs/PrusaSlicer/patches/system-boost-nowide.nop
Normal file
229
srcpkgs/PrusaSlicer/patches/system-boost-nowide.nop
Normal file
@ -0,0 +1,229 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -326,7 +326,7 @@ endif()
|
||||
# boost::process was introduced first in version 1.64.0,
|
||||
# boost::beast::detail::base64 was introduced first in version 1.66.0
|
||||
set(MINIMUM_BOOST_VERSION "1.66.0")
|
||||
-set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams")
|
||||
+set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams;nowide")
|
||||
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components})
|
||||
|
||||
add_library(boost_libs INTERFACE)
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -4,8 +4,6 @@ project(PrusaSlicer-native)
|
||||
add_subdirectory(build-utils)
|
||||
add_subdirectory(admesh)
|
||||
add_subdirectory(avrdude)
|
||||
-# boost/nowide
|
||||
-add_subdirectory(boost)
|
||||
add_subdirectory(clipper)
|
||||
add_subdirectory(miniz)
|
||||
add_subdirectory(glu-libtess)
|
||||
--- a/src/libslic3r/CMakeLists.txt
|
||||
+++ b/src/libslic3r/CMakeLists.txt
|
||||
@@ -341,7 +341,6 @@ target_link_libraries(libslic3r
|
||||
miniz
|
||||
boost_libs
|
||||
clipper
|
||||
- nowide
|
||||
${EXPAT_LIBRARIES}
|
||||
glu-libtess
|
||||
qhull
|
||||
--- a/src/PrusaSlicer.cpp
|
||||
+++ b/src/PrusaSlicer.cpp
|
||||
@@ -25,9 +25,9 @@
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/nowide/args.hpp>
|
||||
-#include <boost/nowide/cenv.hpp>
|
||||
+#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/iostream.hpp>
|
||||
-#include <boost/nowide/integration/filesystem.hpp>
|
||||
+#include <boost/nowide/filesystem.hpp>
|
||||
#include <boost/dll/runtime_symbol_info.hpp>
|
||||
|
||||
#include "unix/fhs.hpp" // Generated by CMake from ../platform/unix/fhs.hpp.in
|
||||
--- a/src/libslic3r/pchheader.hpp
|
||||
+++ b/src/libslic3r/pchheader.hpp
|
||||
@@ -81,12 +81,12 @@
|
||||
#include <boost/log/expressions.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/multi_array.hpp>
|
||||
-#include <boost/nowide/cenv.hpp>
|
||||
+#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/convert.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
-#include <boost/nowide/integration/filesystem.hpp>
|
||||
+#include <boost/nowide/filesystem.hpp>
|
||||
#include <boost/nowide/iostream.hpp>
|
||||
|
||||
// boost/property_tree/json_parser/detail/parser.hpp includes boost/bind.hpp, which is deprecated.
|
||||
--- a/src/libslic3r/AppConfig.cpp
|
||||
+++ b/src/libslic3r/AppConfig.cpp
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
-#include <boost/nowide/cenv.hpp>
|
||||
+#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include <boost/property_tree/ini_parser.hpp>
|
||||
#include <boost/property_tree/ptree_fwd.hpp>
|
||||
--- a/src/libslic3r/Config.cpp
|
||||
+++ b/src/libslic3r/Config.cpp
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
-#include <boost/nowide/cenv.hpp>
|
||||
+#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/iostream.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include <boost/property_tree/ini_parser.hpp>
|
||||
--- a/src/libslic3r/GCode/PostProcessor.cpp
|
||||
+++ b/src/libslic3r/GCode/PostProcessor.cpp
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/nowide/convert.hpp>
|
||||
-#include <boost/nowide/cenv.hpp>
|
||||
+#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
|
||||
#ifdef WIN32
|
||||
--- a/src/libslic3r/Preset.cpp
|
||||
+++ b/src/libslic3r/Preset.cpp
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
-#include <boost/nowide/cenv.hpp>
|
||||
+#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/convert.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
--- a/src/libslic3r/PresetBundle.cpp
|
||||
+++ b/src/libslic3r/PresetBundle.cpp
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <boost/algorithm/clamp.hpp>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
|
||||
-#include <boost/nowide/cenv.hpp>
|
||||
+#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
#include <boost/property_tree/ini_parser.hpp>
|
||||
--- a/src/slic3r/pchheader.hpp
|
||||
+++ b/src/slic3r/pchheader.hpp
|
||||
@@ -73,7 +73,7 @@
|
||||
#include <boost/locale.hpp>
|
||||
#include <boost/locale/encoding_utf.hpp>
|
||||
#include <boost/log/trivial.hpp>
|
||||
-#include <boost/nowide/cenv.hpp>
|
||||
+#include <boost/nowide/cstdlib.hpp>
|
||||
#include <boost/nowide/convert.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
#include <boost/nowide/fstream.hpp>
|
||||
--- a/src/slic3r/GUI/Plater.cpp
|
||||
+++ b/src/slic3r/GUI/Plater.cpp
|
||||
@@ -1339,7 +1339,7 @@ void Sidebar::update_sliced_info_sizer()
|
||||
wxString t_est = std::isnan(ps.estimated_print_time) ? "N/A" : get_time_dhms(float(ps.estimated_print_time));
|
||||
p->sliced_info->SetTextAndShow(siEstimatedTime, t_est, _L("Estimated printing time") + ":");
|
||||
|
||||
- p->plater->get_notification_manager()->set_slicing_complete_print_time(_utf8("Estimated printing time: ") + boost::nowide::narrow(t_est), p->plater->is_sidebar_collapsed());
|
||||
+ p->plater->get_notification_manager()->set_slicing_complete_print_time(static_cast<const char*>((_utf8("Estimated printing time: ") + t_est.utf8_str()).utf8_str()), p->plater->is_sidebar_collapsed());
|
||||
|
||||
// Hide non-SLA sliced info parameters
|
||||
p->sliced_info->SetTextAndShow(siFilament_m, "N/A");
|
||||
--- a/src/slic3r/GUI/GUI_ObjectList.cpp
|
||||
+++ b/src/slic3r/GUI/GUI_ObjectList.cpp
|
||||
@@ -4153,7 +4153,7 @@ void ObjectList::fix_through_netfabb()
|
||||
}
|
||||
if (msg.IsEmpty())
|
||||
msg = _L("Repairing was canceled");
|
||||
- plater->get_notification_manager()->push_notification(NotificationType::NetfabbFinished, NotificationManager::NotificationLevel::PrintInfoShortNotificationLevel, boost::nowide::narrow(msg));
|
||||
+ plater->get_notification_manager()->push_notification(NotificationType::NetfabbFinished, NotificationManager::NotificationLevel::PrintInfoShortNotificationLevel, static_cast<const char *>(msg.utf8_str()));
|
||||
}
|
||||
|
||||
void ObjectList::simplify()
|
||||
--- a/src/slic3r/GUI/PrintHostDialogs.cpp
|
||||
+++ b/src/slic3r/GUI/PrintHostDialogs.cpp
|
||||
@@ -411,7 +411,7 @@ void PrintHostQueueDialog::on_progress(E
|
||||
wxVariant nm, hst;
|
||||
job_list->GetValue(nm, evt.job_id, COL_FILENAME);
|
||||
job_list->GetValue(hst, evt.job_id, COL_HOST);
|
||||
- wxGetApp().notification_manager()->set_upload_job_notification_percentage(evt.job_id + 1, boost::nowide::narrow(nm.GetString()), boost::nowide::narrow(hst.GetString()), evt.progress / 100.f);
|
||||
+ wxGetApp().notification_manager()->set_upload_job_notification_percentage(evt.job_id + 1, nm.GetString().ToStdString(), hst.GetString().ToStdString(), evt.progress / 100.f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ void PrintHostQueueDialog::on_error(Even
|
||||
wxVariant nm, hst;
|
||||
job_list->GetValue(nm, evt.job_id, COL_FILENAME);
|
||||
job_list->GetValue(hst, evt.job_id, COL_HOST);
|
||||
- wxGetApp().notification_manager()->upload_job_notification_show_error(evt.job_id + 1, boost::nowide::narrow(nm.GetString()), boost::nowide::narrow(hst.GetString()));
|
||||
+ wxGetApp().notification_manager()->upload_job_notification_show_error(evt.job_id + 1, nm.GetString().ToStdString(), hst.GetString().ToStdString());
|
||||
}
|
||||
|
||||
void PrintHostQueueDialog::on_cancel(Event &evt)
|
||||
@@ -447,7 +447,7 @@ void PrintHostQueueDialog::on_cancel(Eve
|
||||
wxVariant nm, hst;
|
||||
job_list->GetValue(nm, evt.job_id, COL_FILENAME);
|
||||
job_list->GetValue(hst, evt.job_id, COL_HOST);
|
||||
- wxGetApp().notification_manager()->upload_job_notification_show_canceled(evt.job_id + 1, boost::nowide::narrow(nm.GetString()), boost::nowide::narrow(hst.GetString()));
|
||||
+ wxGetApp().notification_manager()->upload_job_notification_show_canceled(evt.job_id + 1, nm.GetString().ToStdString(), hst.GetString().ToStdString());
|
||||
}
|
||||
|
||||
void PrintHostQueueDialog::get_active_jobs(std::vector<std::pair<std::string, std::string>>& ret)
|
||||
--- a/src/slic3r/GUI/Search.cpp
|
||||
+++ b/src/slic3r/GUI/Search.cpp
|
||||
@@ -239,7 +239,7 @@ bool OptionsSearcher::search(const std::
|
||||
const Option &opt = options[i];
|
||||
if (full_list) {
|
||||
std::string label = into_u8(get_label(opt));
|
||||
- found.emplace_back(FoundOption{ label, label, boost::nowide::narrow(get_tooltip(opt)), i, 0 });
|
||||
+ found.emplace_back(FoundOption{ label, label, get_tooltip(opt).ToStdString(), i, 0 });
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ bool OptionsSearcher::search(const std::
|
||||
boost::erase_all(label_plain, std::string(1, char(ImGui::ColorMarkerStart)));
|
||||
boost::erase_all(label_plain, std::string(1, char(ImGui::ColorMarkerEnd)));
|
||||
#endif
|
||||
- found.emplace_back(FoundOption{ label_plain, label_u8, boost::nowide::narrow(get_tooltip(opt)), i, score });
|
||||
+ found.emplace_back(FoundOption{ label_plain, label_u8, get_tooltip(opt).ToStdString(), i, score });
|
||||
}
|
||||
}
|
||||
|
||||
--- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp
|
||||
+++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
|
||||
@@ -118,7 +118,7 @@ void resolve_path_from_var(const std::st
|
||||
wxString wxdirs;
|
||||
if (! wxGetEnv(boost::nowide::widen(var), &wxdirs) || wxdirs.empty() )
|
||||
return;
|
||||
- std::string dirs = boost::nowide::narrow(wxdirs);
|
||||
+ std::string dirs = wxdirs.ToStdString();
|
||||
for (size_t i = dirs.find(':'); i != std::string::npos; i = dirs.find(':'))
|
||||
{
|
||||
paths.push_back(dirs.substr(0, i));
|
||||
@@ -303,7 +303,7 @@ void DesktopIntegrationDialog::perform_d
|
||||
// if all failed - try creating default home folder
|
||||
if (i == target_candidates.size() - 1) {
|
||||
// create $HOME/.local/share
|
||||
- create_path(boost::nowide::narrow(wxFileName::GetHomeDir()), ".local/share/icons" + icon_theme_dirs);
|
||||
+ create_path(wxFileName::GetHomeDir().ToStdString(), ".local/share/icons" + icon_theme_dirs);
|
||||
// copy icon
|
||||
target_dir_icons = GUI::format("%1%/.local/share",wxFileName::GetHomeDir());
|
||||
std::string icon_path = GUI::format("%1%/icons/PrusaSlicer.png",resources_dir());
|
||||
@@ -355,7 +355,7 @@ void DesktopIntegrationDialog::perform_d
|
||||
// if all failed - try creating default home folder
|
||||
if (i == target_candidates.size() - 1) {
|
||||
// create $HOME/.local/share
|
||||
- create_path(boost::nowide::narrow(wxFileName::GetHomeDir()), ".local/share/applications");
|
||||
+ create_path(wxFileName::GetHomeDir().ToStdString(), ".local/share/applications");
|
||||
// create desktop file
|
||||
target_dir_desktop = GUI::format("%1%/.local/share",wxFileName::GetHomeDir());
|
||||
std::string path = GUI::format("%1%/applications/PrusaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
@ -1,11 +1,12 @@
|
||||
# Template file for 'PrusaSlicer'
|
||||
pkgname=PrusaSlicer
|
||||
version=2.4.2
|
||||
revision=2
|
||||
revision=3
|
||||
build_style=cmake
|
||||
build_helper="qemu cmake-wxWidgets-gtk3"
|
||||
# Pre-Compiled Headers seems to be slower
|
||||
configure_args="-DSLIC3R_WX_STABLE=1 -DSLIC3R_FHS=1 -DSLIC3R_GTK=3
|
||||
-DSLIC3R_ENC_CHECK=0 -DUSE_BLOSC=ON -DUSE_EXR=ON"
|
||||
-DSLIC3R_ENC_CHECK=0 -DUSE_BLOSC=ON -DUSE_EXR=ON -DSLIC3R_PCH=OFF"
|
||||
hostmakedepends="pkg-config"
|
||||
makedepends=" boost-devel cereal cgal-devel dbus-devel eigen glew-devel
|
||||
glu-devel gmpxx-devel gtest-devel gtk+3-devel libcurl-devel libglib-devel
|
||||
@ -32,6 +33,7 @@ post_extract() {
|
||||
-e 's/\(SCENARIO( "make_xxx functions produce meshes."\)\()\)/\1, "[!mayfail]"\2/'
|
||||
;;
|
||||
esac
|
||||
# rm -rf src/boost
|
||||
}
|
||||
|
||||
post_install() {
|
||||
@ -42,4 +44,7 @@ Slic3rPE_package() {
|
||||
build_style=meta
|
||||
short_desc+=" (transitional dummy package)"
|
||||
depends="${sourcepkg}>=${version}_${revision}"
|
||||
pkg_install() {
|
||||
vdoc ${FILESDIR}/README.voidlinux
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user