diff --git a/0001-findwxwidgets.patch b/0001-findwxwidgets.patch new file mode 100644 index 0000000..4b30dce --- /dev/null +++ b/0001-findwxwidgets.patch @@ -0,0 +1,34 @@ +diff --git a/cmake/modules/FindwxWidgets.cmake b/cmake/modules/FindwxWidgets.cmake +index e1f93a6a26..88c5f2487d 100644 +--- a/cmake/modules/FindwxWidgets.cmake ++++ b/cmake/modules/FindwxWidgets.cmake +@@ -183,12 +183,12 @@ This module defines the following :prop_tgt:`IMPORTED` targets: + # Helper macro to control the debugging output globally. There are + # two versions for controlling how verbose your output should be. + macro(DBG_MSG _MSG) +-# message(STATUS +-# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") ++ message(STATUS ++ "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") + endmacro() + macro(DBG_MSG_V _MSG) +-# message(STATUS +-# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") ++ message(STATUS ++ "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") + endmacro() + + # Clear return values in case the module is loaded more than once. +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index aee1aaf100..e6db66b00d 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -57,7 +57,7 @@ if (SLIC3R_GUI) + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + set (wxWidgets_CONFIG_OPTIONS "--toolkit=gtk${SLIC3R_GTK}") + endif () +- find_package(wxWidgets 3.2 MODULE REQUIRED COMPONENTS base core adv html gl stc scintilla) ++ find_package(wxWidgets 3.2 MODULE REQUIRED COMPONENTS base core adv html gl stc) + + include(${wxWidgets_USE_FILE}) + diff --git a/0002-addlib-expat.patch b/0002-addlib-expat.patch new file mode 100644 index 0000000..a2501e8 --- /dev/null +++ b/0002-addlib-expat.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 34fe44a2ef..c0792f5476 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -485,8 +485,6 @@ include_directories(BEFORE SYSTEM ${EIGEN3_INCLUDE_DIR}) + # no matter what. + find_package(EXPAT REQUIRED) + +-add_library(libexpat INTERFACE) +- + if (TARGET EXPAT::EXPAT ) + target_link_libraries(libexpat INTERFACE EXPAT::EXPAT) + elseif(TARGET expat::expat) diff --git a/0011-fix-constructible-svgfile.patch b/0011-fix-constructible-svgfile.patch new file mode 100644 index 0000000..40c2fc8 --- /dev/null +++ b/0011-fix-constructible-svgfile.patch @@ -0,0 +1,13 @@ +diff --git a/src/libslic3r/EmbossShape.hpp b/src/libslic3r/EmbossShape.hpp +index 3e4a950037..22e5d3aee1 100644 +--- a/src/libslic3r/EmbossShape.hpp ++++ b/src/libslic3r/EmbossShape.hpp +@@ -101,6 +101,8 @@ struct EmbossShape + // Loaded string data from file + std::shared_ptr file_data = nullptr; + ++ SvgFile() {} ++ + template void save(Archive &ar) const { + // Note: image is only cache it is not neccessary to store + diff --git a/0012-boost1.87.patch b/0012-boost1.87.patch new file mode 100644 index 0000000..353a3b0 --- /dev/null +++ b/0012-boost1.87.patch @@ -0,0 +1,197 @@ +diff --git a/src/libslic3r/GCodeSender.cpp b/src/libslic3r/GCodeSender.cpp +index 396060cbaf..a3d28f6426 100644 +--- a/src/libslic3r/GCodeSender.cpp ++++ b/src/libslic3r/GCodeSender.cpp +@@ -113,7 +113,7 @@ GCodeSender::connect(std::string devname, unsigned int baud_rate) + this->io.post(boost::bind(&GCodeSender::do_read, this)); + + // start reading in the background thread +- boost::thread t(boost::bind(&boost::asio::io_service::run, &this->io)); ++ boost::thread t(boost::bind(&boost::asio::io_context::run, &this->io)); + this->background_thread.swap(t); + + // always send a M105 to check for connection because firmware might be silent on connect +diff --git a/src/libslic3r/GCodeSender.hpp b/src/libslic3r/GCodeSender.hpp +index 4f266619e4..f47caef0cb 100644 +--- a/src/libslic3r/GCodeSender.hpp ++++ b/src/libslic3r/GCodeSender.hpp +@@ -40,7 +40,7 @@ class GCodeSender : private boost::noncopyable { + void reset(); + + private: +- asio::io_service io; ++ asio::io_context io; + asio::serial_port serial; + boost::thread background_thread; + boost::asio::streambuf read_buffer, write_buffer; +diff --git a/src/slic3r/GUI/FirmwareDialog.cpp b/src/slic3r/GUI/FirmwareDialog.cpp +index a75a6e269e..d6d3c9608f 100644 +--- a/src/slic3r/GUI/FirmwareDialog.cpp ++++ b/src/slic3r/GUI/FirmwareDialog.cpp +@@ -365,7 +365,7 @@ bool FirmwareDialog::priv::check_model_id() + // return true; + // } + +- // asio::io_service io; ++ // asio::io_context io; + // Serial serial(io, port->port, 115200); + // serial.printer_setup(); + +@@ -429,7 +429,7 @@ void FirmwareDialog::priv::avr109_wait_for_bootloader(Avr109Pid usb_pid, unsigne + + void FirmwareDialog::priv::avr109_reboot(const SerialPortInfo &port) + { +- asio::io_service io; ++ asio::io_context io; + Serial serial(io, port.port, 1200); + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + } +diff --git a/src/slic3r/GUI/FreeCADDialog.cpp b/src/slic3r/GUI/FreeCADDialog.cpp +index 822bc4e2d9..dfbb037ed0 100644 +--- a/src/slic3r/GUI/FreeCADDialog.cpp ++++ b/src/slic3r/GUI/FreeCADDialog.cpp +@@ -64,7 +64,7 @@ namespace GUI { + class ExecVar { + public: + boost::process::opstream pyin; +- boost::asio::io_service ios; ++ boost::asio::io_context ios; + std::future data_out; + std::future data_err; + std::unique_ptr process; +diff --git a/src/slic3r/Utils/Bonjour.cpp b/src/slic3r/Utils/Bonjour.cpp +index b13d570120..d48fd87da5 100644 +--- a/src/slic3r/Utils/Bonjour.cpp ++++ b/src/slic3r/Utils/Bonjour.cpp +@@ -624,7 +624,7 @@ UdpSession::UdpSession(Bonjour::ReplyFn rfn) : replyfn(rfn) + buffer.resize(DnsMessage::MAX_SIZE); + } + +-UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, const asio::ip::address& interface_address, std::shared_ptr< boost::asio::io_service > io_service) ++UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, const asio::ip::address& interface_address, std::shared_ptr< boost::asio::io_context > io_service) + : replyfn(replyfn) + , multicast_address(multicast_address) + , socket(*io_service) +@@ -658,7 +658,7 @@ UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multica + } + + +-UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, std::shared_ptr< boost::asio::io_service > io_service) ++UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, std::shared_ptr< boost::asio::io_context > io_service) + : replyfn(replyfn) + , multicast_address(multicast_address) + , socket(*io_service) +@@ -871,7 +871,7 @@ void Bonjour::priv::lookup_perform() + { + service_dn = (boost::format("_%1%._%2%.local") % service % protocol).str(); + +- std::shared_ptr< boost::asio::io_service > io_service(new boost::asio::io_service); ++ std::shared_ptr< boost::asio::io_context > io_service(new boost::asio::io_context); + + std::vector sockets; + +@@ -966,7 +966,7 @@ void Bonjour::priv::resolve_perform() + rpls.push_back(reply); + }; + +- std::shared_ptr< boost::asio::io_service > io_service(new boost::asio::io_service); ++ std::shared_ptr< boost::asio::io_context > io_service(new boost::asio::io_context); + std::vector sockets; + + // resolve interfaces - from PR#6646 +diff --git a/src/slic3r/Utils/Bonjour.hpp b/src/slic3r/Utils/Bonjour.hpp +index 398adde045..436146096b 100644 +--- a/src/slic3r/Utils/Bonjour.hpp ++++ b/src/slic3r/Utils/Bonjour.hpp +@@ -155,11 +155,11 @@ public: + UdpSocket(Bonjour::ReplyFn replyfn + , const boost::asio::ip::address& multicast_address + , const boost::asio::ip::address& interface_address +- , std::shared_ptr< boost::asio::io_service > io_service); ++ , std::shared_ptr< boost::asio::io_context > io_service); + + UdpSocket(Bonjour::ReplyFn replyfn + , const boost::asio::ip::address& multicast_address +- , std::shared_ptr< boost::asio::io_service > io_service); ++ , std::shared_ptr< boost::asio::io_context > io_service); + + void send(); + void async_receive(); +@@ -172,7 +172,7 @@ protected: + boost::asio::ip::address multicast_address; + boost::asio::ip::udp::socket socket; + boost::asio::ip::udp::endpoint mcast_endpoint; +- std::shared_ptr< boost::asio::io_service > io_service; ++ std::shared_ptr< boost::asio::io_context > io_service; + std::vector requests; + }; + +@@ -186,7 +186,7 @@ public: + , Bonjour::ReplyFn replyfn + , const boost::asio::ip::address& multicast_address + , const boost::asio::ip::address& interface_address +- , std::shared_ptr< boost::asio::io_service > io_service) ++ , std::shared_ptr< boost::asio::io_context > io_service) + : UdpSocket(replyfn, multicast_address, interface_address, io_service) + , txt_keys(txt_keys) + , service(service) +@@ -203,7 +203,7 @@ public: + , std::string protocol + , Bonjour::ReplyFn replyfn + , const boost::asio::ip::address& multicast_address +- , std::shared_ptr< boost::asio::io_service > io_service) ++ , std::shared_ptr< boost::asio::io_context > io_service) + : UdpSocket(replyfn, multicast_address, io_service) + , txt_keys(txt_keys) + , service(service) +@@ -242,7 +242,7 @@ public: + , Bonjour::ReplyFn replyfn + , const boost::asio::ip::address& multicast_address + , const boost::asio::ip::address& interface_address +- , std::shared_ptr< boost::asio::io_service > io_service) ++ , std::shared_ptr< boost::asio::io_context > io_service) + : UdpSocket(replyfn, multicast_address, interface_address, io_service) + , hostname(hostname) + +@@ -254,7 +254,7 @@ public: + ResolveSocket(const std::string& hostname + , Bonjour::ReplyFn replyfn + , const boost::asio::ip::address& multicast_address +- , std::shared_ptr< boost::asio::io_service > io_service) ++ , std::shared_ptr< boost::asio::io_context > io_service) + : UdpSocket(replyfn, multicast_address, io_service) + , hostname(hostname) + +diff --git a/src/slic3r/Utils/Serial.cpp b/src/slic3r/Utils/Serial.cpp +index b44a909f8d..b21f91f4c0 100644 +--- a/src/slic3r/Utils/Serial.cpp ++++ b/src/slic3r/Utils/Serial.cpp +@@ -283,11 +283,11 @@ std::vector scan_serial_ports() + namespace asio = boost::asio; + using boost::system::error_code; + +-Serial::Serial(asio::io_service& io_service) : ++Serial::Serial(asio::io_context& io_service) : + asio::serial_port(io_service) + {} + +-Serial::Serial(asio::io_service& io_service, const std::string &name, unsigned baud_rate) : ++Serial::Serial(asio::io_context& io_service, const std::string &name, unsigned baud_rate) : + asio::serial_port(io_service, name) + { + set_baud_rate(baud_rate); +diff --git a/src/slic3r/Utils/Serial.hpp b/src/slic3r/Utils/Serial.hpp +index c47759795b..4452b2a914 100644 +--- a/src/slic3r/Utils/Serial.hpp ++++ b/src/slic3r/Utils/Serial.hpp +@@ -43,8 +43,8 @@ extern std::vector scan_serial_ports_extended(); + class Serial : public boost::asio::serial_port + { + public: +- Serial(boost::asio::io_service &io_service); +- Serial(boost::asio::io_service &io_service, const std::string &name, unsigned baud_rate); ++ Serial(boost::asio::io_context &io_service); ++ Serial(boost::asio::io_context &io_service, const std::string &name, unsigned baud_rate); + Serial(const Serial &) = delete; + Serial &operator=(const Serial &) = delete; + ~Serial(); diff --git a/PKGBUILD b/PKGBUILD index f15b71e..c8371b9 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -41,20 +41,28 @@ provides=("superslicer=$epoch:$pkgver") conflicts=('superslicer' 'superslicer-git') source=("https://github.com/supermerill/SuperSlicer/archive/$_pkgtag.tar.gz" "https://github.com/prusa3d/libbgcode/archive/$_libbgcode.tar.gz" + "0001-findwxwidgets.patch" + "0002-addlib-expat.patch" "0003-openexr3.patch" "0004-fix-opencascade-version-check.patch" "0005-fix-opencascade-libs.patch" "0008-boost1.85.patch" "0009-fix-multiple-choice.patch" - "0010-occtwrapper-install-dir.patch") + "0010-occtwrapper-install-dir.patch" + "0011-fix-constructible-svgfile.patch" + "0012-boost1.87.patch") sha512sums=('0d72bf61adcafe8eef2ed860449dc25ca295ba0732d956bff8c0ae50b381387b803fd88241ab855a9b38daf8f5eaa4c41d17241b8c15c66d63576874179aa1c0' '04cb7cb69d887e1fa5ced5c0219b0ee6cab81f09d1bc1226ebd26563e2ce60b85fb6e5aef11a36dffd3e00779849906fc5c19ad2cdd22d45360226912b6af31b' + 'd910cf1fc07219b6c776240eae0f203813368e69b6a0215bcdcabba385531744093b6214b21d0dffbafa8992d3549c96bbdb02e939c52a4e81dbce98389397f9' + '93a943eb9be52085a811d7cc8379dc5a3942befdc3d19eecf6310f8dfcfdef72bfa15dfcb85ac1f4f9d7731c973b9815a532ae444e3fe275f8f624825fe8e98b' '840e51b8feb3568ff46d309ece063f7188018fcaa43d19ec50ede408fdf2c237a3b7eaa11ba24409d8c3f7d6f5fb270181508cc56e0b2b0fef68b766130ef1eb' '8512ace14c71b04eb98532e71592447475cf7feccf1c85f376487615c8a95f6afa645e4581f577ee26d91532c57f389eac7534a875d5a24e871f3ef593af33c9' 'a01abf748f82bc423f2c012ac430f78cfd5e56dede1d5999376e780267d0302d9a2a80c3eb15226c2f82102dda4c567c721ff99ab1fdeef504cbf9d9cb63ca53' 'ca9f407d87d8dd0181077bc2da5a8e2f8995eed88a4787b73ee6c62ef6d2380fd1394fe5412cdc34276d4182bce6f272173e9ccb653d1e28978e16f379114002' '6d7ab93042a75f04e1c3c8f294d19dd39abaf22aa75caf996c6a0cf753f6472134a3d4fa443b73924800b2d3a710416a931745c168911c0df3709fb71ec00570' - '92929ba1cb6ee104a10f34a649eba3789ca02f1725104a57412279ff68c46614b1812b13e7dcdf0d235618b9f2a868b4798b1404d9e712d9f1efd46e6c71fcb5') + '92929ba1cb6ee104a10f34a649eba3789ca02f1725104a57412279ff68c46614b1812b13e7dcdf0d235618b9f2a868b4798b1404d9e712d9f1efd46e6c71fcb5' + '03dbbb8e1bc1422104c644c9eb37dc72c6ce50733eac70fe44a76b0345d1882ebd71f11af3358f8392402dda627d520cfe7c2ddf1257d1b891c6b60faf7c8182' + '29c8d60ef3b04d8bc950e5bef615543d3fb66b182338106dedbe2656ecdb6d95413044b73748a488548a4fd8202a0799be6b648ff9354de7c2d8bd11029d0a9d') _apply_patches() { for patch in "${@}" @@ -78,12 +86,16 @@ prepare() { # apply patches for superslicer _apply_patches \ + "$srcdir/0001-findwxwidgets.patch" \ + "$srcdir/0002-addlib-expat.patch" \ "$srcdir/0003-openexr3.patch" \ "$srcdir/0004-fix-opencascade-version-check.patch" \ "$srcdir/0005-fix-opencascade-libs.patch" \ "$srcdir/0008-boost1.85.patch" \ "$srcdir/0009-fix-multiple-choice.patch" \ - "$srcdir/0010-occtwrapper-install-dir.patch" + "$srcdir/0010-occtwrapper-install-dir.patch" \ + "$srcdir/0011-fix-constructible-svgfile.patch" \ + "$srcdir/0012-boost1.87.patch" } build() {