summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2026-06-05 15:32:00 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2026-06-05 17:24:44 +0200
commit453ec02a7daec48dda00ab2dfb369c2c9b42f3c8 (patch)
tree08c318f17753362069f28c2538bd2c56ce4ed056
parentd8dbd26e9e267443da3e2d0ff116c9b6bde32626 (diff)
gnu: prusa-slicer: Update to 2.9.5.
* gnu/packages/patches/prusa-slicer-boost-1.87.patch: New file. * gnu/packages/patches/prusa-slicer-boost-1.88.patch: New file. * gnu/packages/patches/prusa-slicer-boost-1.89.patch: New file. * gnu/packages/patches/prusa-slicer-cgal-6.patch: New file. * gnu/packages/patches/prusa-slicer-opencascade-7.8.patch: New file. * gnu/local.mk (dist_patch_DATA): Register them. * gnu/packages/engineering.scm (prusa-slicer): Update to 2.9.5. [source]: Use patches. [arguments]: Disable tests. Add 'fix-for-glew-on-wayland' phase. [inputs]: Replace boost-1.83, cgal-5 and opencascade-occt-7.6.1 by boost, cgal and opencascade-occt. * gnu/packages/maths.scm (opencascade-occt-7.6.1): Remove variable. Change-Id: Idce4ec5fc45f50cbe74ef94aeea679a04d0e80dc
-rw-r--r--gnu/local.mk7
-rw-r--r--gnu/packages/engineering.scm32
-rw-r--r--gnu/packages/maths.scm99
-rw-r--r--gnu/packages/patches/prusa-slicer-boost-1.87.patch366
-rw-r--r--gnu/packages/patches/prusa-slicer-boost-1.88.patch39
-rw-r--r--gnu/packages/patches/prusa-slicer-boost-1.89.patch35
-rw-r--r--gnu/packages/patches/prusa-slicer-cgal-6.patch191
-rw-r--r--gnu/packages/patches/prusa-slicer-opencascade-7.8.patch20
8 files changed, 682 insertions, 107 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 0c55d5872cb..fe54c64aa11 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2106,7 +2106,12 @@ dist_patch_DATA = \
2106 %D%/packages/patches/pounce-readable-checks.patch \ 2106 %D%/packages/patches/pounce-readable-checks.patch \
2107 %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ 2107 %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
2108 %D%/packages/patches/procps-strtod-test.patch \ 2108 %D%/packages/patches/procps-strtod-test.patch \
2109 %D%/packages/patches/prusa-slicer-add-cmake-module.patch \ 2109 %D%/packages/patches/prusa-slicer-add-cmake-module.patch \
2110 %D%/packages/patches/prusa-slicer-boost-1.87.patch \
2111 %D%/packages/patches/prusa-slicer-boost-1.88.patch \
2112 %D%/packages/patches/prusa-slicer-boost-1.89.patch \
2113 %D%/packages/patches/prusa-slicer-cgal-6.patch \
2114 %D%/packages/patches/prusa-slicer-opencascade-7.8.patch \
2110 %D%/packages/patches/pthreadpool-system-libraries.patch \ 2115 %D%/packages/patches/pthreadpool-system-libraries.patch \
2111 %D%/packages/patches/python-3.11-fix-tests.patch \ 2116 %D%/packages/patches/python-3.11-fix-tests.patch \
2112 %D%/packages/patches/python-3.12-fix-tests.patch \ 2117 %D%/packages/patches/python-3.12-fix-tests.patch \
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index da61fc7d590..153251e184b 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -24,7 +24,7 @@
24;;; Copyright © 2020, 2021, 2023 Morgan Smith <Morgan.J.Smith@outlook.com> 24;;; Copyright © 2020, 2021, 2023 Morgan Smith <Morgan.J.Smith@outlook.com>
25;;; Copyright © 2021 qblade <qblade@protonmail.com> 25;;; Copyright © 2021 qblade <qblade@protonmail.com>
26;;; Copyright © 2021 Gerd Heber <gerd.heber@gmail.com> 26;;; Copyright © 2021 Gerd Heber <gerd.heber@gmail.com>
27;;; Copyright © 2021, 2022 Guillaume Le Vaillant <glv@posteo.net> 27;;; Copyright © 2021, 2022, 2026 Guillaume Le Vaillant <glv@posteo.net>
28;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru> 28;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
29;;; Copyright © 2021, 2022 Petr Hodina <phodina@protonmail.com> 29;;; Copyright © 2021, 2022 Petr Hodina <phodina@protonmail.com>
30;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com> 30;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
@@ -4009,7 +4009,7 @@ G-codes to binary and vice versa.")
4009(define-public prusa-slicer 4009(define-public prusa-slicer
4010 (package 4010 (package
4011 (name "prusa-slicer") 4011 (name "prusa-slicer")
4012 (version "2.9.4") 4012 (version "2.9.5")
4013 (source 4013 (source
4014 (origin 4014 (origin
4015 (method git-fetch) 4015 (method git-fetch)
@@ -4018,8 +4018,13 @@ G-codes to binary and vice versa.")
4018 (url "https://github.com/prusa3d/PrusaSlicer") 4018 (url "https://github.com/prusa3d/PrusaSlicer")
4019 (commit (string-append "version_" version)))) 4019 (commit (string-append "version_" version))))
4020 (file-name (git-file-name name version)) 4020 (file-name (git-file-name name version))
4021 (sha256 (base32 "008rnwld4i59xh8jg7kdqd8x8f2ynk6mbhs4iypqa8jssjpn0afn")) 4021 (sha256 (base32 "08kqfr3dfj0y1fzvpq2ri5b09996bn3hgq6ifgjlg0x4ij2byl5m"))
4022 (patches (search-patches "prusa-slicer-add-cmake-module.patch")) 4022 (patches (search-patches "prusa-slicer-add-cmake-module.patch"
4023 "prusa-slicer-boost-1.87.patch"
4024 "prusa-slicer-boost-1.88.patch"
4025 "prusa-slicer-boost-1.89.patch"
4026 "prusa-slicer-cgal-6.patch"
4027 "prusa-slicer-opencascade-7.8.patch"))
4023 (modules '((guix build utils))) 4028 (modules '((guix build utils)))
4024 (snippet 4029 (snippet
4025 `(begin 4030 `(begin
@@ -4068,12 +4073,16 @@ G-codes to binary and vice versa.")
4068 "-DSLIC3R_GTK=3" ;; Use GTK+ 4073 "-DSLIC3R_GTK=3" ;; Use GTK+
4069 ;; Use wxWidgets 3.0.x.x to prevent GUI crashes when adding support enforcers. 4074 ;; Use wxWidgets 3.0.x.x to prevent GUI crashes when adding support enforcers.
4070 "-DSLIC3R_WX_STABLE=1" 4075 "-DSLIC3R_WX_STABLE=1"
4076 ;; FIXME: tests fail to build with cgal-6.
4077 ;; prusa-slicer-cgal-6.patch needs updating.
4078 "-DSLIC3R_BUILD_TESTS=0"
4071 (format #f "-Dlibigl_DIR=~a" 4079 (format #f "-Dlibigl_DIR=~a"
4072 (search-input-directory %build-inputs 4080 (search-input-directory %build-inputs
4073 "lib/cmake/igl/")) 4081 "lib/cmake/igl/"))
4074 (format #f "-DCatch2_DIR=~a" 4082 (format #f "-DCatch2_DIR=~a"
4075 (search-input-directory %build-inputs 4083 (search-input-directory %build-inputs
4076 "lib/cmake/Catch2/"))) 4084 "lib/cmake/Catch2/")))
4085 #:tests? #f
4077 #:phases 4086 #:phases
4078 #~(modify-phases %standard-phases 4087 #~(modify-phases %standard-phases
4079 (add-after 'unpack 'fix-include-paths 4088 (add-after 'unpack 'fix-include-paths
@@ -4081,6 +4090,15 @@ G-codes to binary and vice versa.")
4081 (substitute* "tests/libslic3r/test_quadric_edge_collapse.cpp" 4090 (substitute* "tests/libslic3r/test_quadric_edge_collapse.cpp"
4082 (("#include <libigl/igl/qslim.h>") 4091 (("#include <libigl/igl/qslim.h>")
4083 "#include <igl/qslim.h>")))) 4092 "#include <igl/qslim.h>"))))
4093 (add-after 'unpack 'fix-for-glew-on-wayland
4094 (lambda _
4095 ;; GLEW's glewInit() function attempts to use GLX,
4096 ;; which fails on Wayland.
4097 ;; Ignoring the error code GLEW_ERROR_NO_GLX_DISPLAY
4098 ;; solves the issue.
4099 (substitute* "src/slic3r/GUI/OpenGLManager.cpp"
4100 (("err != GLEW_OK")
4101 "err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY"))))
4084 (add-after 'install 'wrap-program 4102 (add-after 'install 'wrap-program
4085 (lambda _ 4103 (lambda _
4086 (wrap-program (string-append #$output "/bin/prusa-slicer") 4104 (wrap-program (string-append #$output "/bin/prusa-slicer")
@@ -4092,9 +4110,9 @@ G-codes to binary and vice versa.")
4092 (list pkg-config catch2-3.8)) 4110 (list pkg-config catch2-3.8))
4093 (inputs 4111 (inputs
4094 (list bash-minimal 4112 (list bash-minimal
4095 boost-1.83 4113 boost
4096 cereal 4114 cereal
4097 cgal-5 4115 cgal
4098 curl 4116 curl
4099 dbus 4117 dbus
4100 eigen 4118 eigen
@@ -4115,7 +4133,7 @@ G-codes to binary and vice versa.")
4115 nanosvg 4133 nanosvg
4116 nlohmann-json 4134 nlohmann-json
4117 nlopt 4135 nlopt
4118 opencascade-occt-7.6.1 4136 opencascade-occt
4119 openssl 4137 openssl
4120 openvdb 4138 openvdb
4121 pango 4139 pango
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 875e6209be3..68e41e25bc8 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3754,105 +3754,6 @@ This is the certified version of the Open Cascade Technology (OCCT) library.")
3754 ;; File src/NCollection/NCollection_StdAllocator.hxx: 3754 ;; File src/NCollection/NCollection_StdAllocator.hxx:
3755 license:public-domain)))) 3755 license:public-domain))))
3756 3756
3757;; PrusaSlicer has a hard dependency on this slightly older version of
3758;; OpenCASCADE. According to them, all newer versions have a bug that causes
3759;; chamfers to be triangulated incorrectly.
3760;; See https://github.com/prusa3d/PrusaSlicer/commit/c6a02106fd1d3caa9a48a6b7c2bdd04546b24485.
3761(define-public opencascade-occt-7.6.1
3762 (hidden-package
3763 (package
3764 (name "opencascade-occt")
3765 (version "7.6.1")
3766 (source
3767 (origin
3768 (method git-fetch)
3769 (uri (git-reference
3770 (url "https://git.dev.opencascade.org/repos/occt.git")
3771 (commit
3772 (string-append "V"
3773 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
3774 version)))))
3775 (file-name (git-file-name name version))
3776 (sha256
3777 (base32 "1cc7n4rs26lm1awwn2bijvjq9b3kz204ffnks02lrpgs7pf8yk8b"))
3778 (modules '((guix build utils)))
3779 (snippet
3780 '(begin
3781 ;; Remove files specific to non-free operating systems.
3782 (delete-file-recursively "samples/ios")
3783 (delete-file-recursively "samples/mfc")
3784 (delete-file-recursively "samples/qt/FuncDemo")
3785 (delete-file "genconf.bat")
3786 (delete-file "gendoc.bat")
3787 (delete-file "genproj.bat")
3788 (delete-file "upgrade.bat")
3789 ;; Remove references to deleted files.
3790 (substitute* "dox/FILES_HTML.txt"
3791 ((".*standard.*") "" )
3792 ((".*UIKitSample.*") ""))
3793 #t))))
3794 (build-system cmake-build-system)
3795 (arguments
3796 '(;; There is no test target for make. OCCT provides an
3797 ;; 'Automated Testing System', which may be accessed after
3798 ;; installation via the draw.sh script. draw.sh is located in
3799 ;; the bin directory. For details see:
3800 ;; https://dev.opencascade.org/doc/occt-7.3.0/overview/html/\
3801 ;; occt_dev_guides__tests.html
3802 #:tests? #f
3803 ;; Configure without freeimage: attempting to link against the
3804 ;; freeimage version 3.17 library leads to 'undefined
3805 ;; reference' errors.
3806 #:configure-flags
3807 (list "-DCMAKE_CXX_FLAGS=-fpermissive" ;from unsigned char* to char*
3808 "-DUSE_FREEIMAGE:BOOL=OFF"
3809 "-DUSE_TBB:BOOL=ON"
3810 "-DUSE_VTK:BOOL=ON"
3811 "-DBUILD_DOC_Overview:BOOL=OFF"
3812 "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
3813 "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
3814 "-UCMAKE_INSTALL_LIBDIR")))
3815 (native-inputs (list doxygen fontconfig))
3816 (inputs
3817 (list freetype
3818 ;; ("freeimage" ,freeimage)
3819 glu
3820 libxext
3821 libxi
3822 libxmu
3823 mesa
3824 tbb-2020
3825 tcl
3826 tk
3827 vtk))
3828 ;; TODO: build Overview documentation and add 'doc' output.
3829 (home-page "https://dev.opencascade.org")
3830 (synopsis "Libraries for 3D modeling and numerical simulation")
3831 (description
3832 "Open CASCADE is a set of libraries for the development of applications
3833dealing with 3D CAD data or requiring industrial 3D capabilities. It includes
3834C++ class libraries providing services for 3D surface and solid modeling, CAD
3835data exchange, and visualization. It is used for development of specialized
3836software dealing with 3D models in design (CAD), manufacturing (CAM),
3837numerical simulation (CAE), measurement equipment (CMM), and quality
3838control (CAQ) domains.
3839
3840This is the certified version of the Open Cascade Technology (OCCT) library.")
3841 (license (list ;; OCCT library:
3842 license:lgpl2.1; with an exception for the use of header
3843 ; files, see OCCT_LGPL_EXCEPTION.txt.
3844 ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and
3845 ;; src/OpenGl/OpenGl_HaltonSampler.hxx:
3846 license:expat
3847 ;; Files src/ExprIntrp/ExprIntrp.tab.* and
3848 ;; src/StepFile/step.tab.*:
3849 license:gpl3+ ; with Bison 2.2 exception.
3850 ;; File src/NCollection/NCollection_UtfIterator.lxx:
3851 (license:non-copyleft
3852 "https://www.unicode.org/license.html")
3853 ;; File src/NCollection/NCollection_StdAllocator.hxx:
3854 license:public-domain)))))
3855
3856(define-public fast-downward 3757(define-public fast-downward
3857 (package 3758 (package
3858 (name "fast-downward") 3759 (name "fast-downward")
diff --git a/gnu/packages/patches/prusa-slicer-boost-1.87.patch b/gnu/packages/patches/prusa-slicer-boost-1.87.patch
new file mode 100644
index 00000000000..3dae923d06a
--- /dev/null
+++ b/gnu/packages/patches/prusa-slicer-boost-1.87.patch
@@ -0,0 +1,366 @@
1https://bugs.gentoo.org/946495
2https://github.com/prusa3d/PrusaSlicer/issues/13799
3
4--- PrusaSlicer-version_2.8.1-orig/src/libslic3r/GCodeSender.cpp
5+++ PrusaSlicer-version_2.8.1-dwok/src/libslic3r/GCodeSender.cpp
6@@ -113,7 +113,7 @@ GCodeSender::connect(std::string devname
7 this->io.post(boost::bind(&GCodeSender::do_read, this));
8
9 // start reading in the background thread
10- boost::thread t(boost::bind(&boost::asio::io_service::run, &this->io));
11+ boost::thread t(boost::bind(&boost::asio::io_context::run, &this->io));
12 this->background_thread.swap(t);
13
14 // always send a M105 to check for connection because firmware might be silent on connect
15--- PrusaSlicer-version_2.8.1-orig/src/libslic3r/GCodeSender.hpp
16+++ PrusaSlicer-version_2.8.1-dwok/src/libslic3r/GCodeSender.hpp
17@@ -40,7 +40,7 @@ class GCodeSender : private boost::nonco
18 void reset();
19
20 private:
21- asio::io_service io;
22+ asio::io_context io;
23 asio::serial_port serial;
24 boost::thread background_thread;
25 boost::asio::streambuf read_buffer, write_buffer;
26--- PrusaSlicer-version_2.8.1-orig/src/slic3r/GUI/FirmwareDialog.cpp
27+++ PrusaSlicer-version_2.8.1-dwok/src/slic3r/GUI/FirmwareDialog.cpp
28@@ -429,7 +429,7 @@ void FirmwareDialog::priv::avr109_wait_f
29
30 void FirmwareDialog::priv::avr109_reboot(const SerialPortInfo &port)
31 {
32- asio::io_service io;
33+ asio::io_context io;
34 Serial serial(io, port.port, 1200);
35 std::this_thread::sleep_for(std::chrono::milliseconds(50));
36 }
37--- PrusaSlicer-version_2.8.1-orig/src/slic3r/Utils/Bonjour.cpp
38+++ PrusaSlicer-version_2.8.1-dwok/src/slic3r/Utils/Bonjour.cpp
39@@ -624,11 +624,11 @@ UdpSession::UdpSession(Bonjour::ReplyFn
40 buffer.resize(DnsMessage::MAX_SIZE);
41 }
42
43-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)
44+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_context)
45 : replyfn(replyfn)
46 , multicast_address(multicast_address)
47- , socket(*io_service)
48- , io_service(io_service)
49+ , socket(*io_context)
50+ , io_context(io_context)
51 {
52 try {
53 // open socket
54@@ -658,11 +658,11 @@ UdpSocket::UdpSocket( Bonjour::ReplyFn r
55 }
56
57
58-UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, std::shared_ptr< boost::asio::io_service > io_service)
59+UdpSocket::UdpSocket( Bonjour::ReplyFn replyfn, const asio::ip::address& multicast_address, std::shared_ptr< boost::asio::io_context > io_context)
60 : replyfn(replyfn)
61 , multicast_address(multicast_address)
62- , socket(*io_service)
63- , io_service(io_service)
64+ , socket(*io_context)
65+ , io_context(io_context)
66 {
67 try {
68 // open socket
69@@ -714,7 +714,7 @@ void UdpSocket::receive_handler(SharedSe
70 // let io_service to handle the datagram on session
71 // from boost documentation io_service::post:
72 // The io_service guarantees that the handler will only be called in a thread in which the run(), run_one(), poll() or poll_one() member functions is currently being invoked.
73- io_service->post(boost::bind(&UdpSession::handle_receive, session, error, bytes));
74+ boost::asio::post(*io_context, boost::bind(&UdpSession::handle_receive, session, error, bytes));
75 // immediately accept new datagrams
76 async_receive();
77 }
78@@ -871,13 +871,13 @@ void Bonjour::priv::lookup_perform()
79 {
80 service_dn = (boost::format("_%1%._%2%.local") % service % protocol).str();
81
82- std::shared_ptr< boost::asio::io_service > io_service(new boost::asio::io_service);
83+ std::shared_ptr< boost::asio::io_context > io_context(new boost::asio::io_context);
84
85 std::vector<LookupSocket*> sockets;
86
87 // resolve intefaces - from PR#6646
88 std::vector<boost::asio::ip::address> interfaces;
89- asio::ip::udp::resolver resolver(*io_service);
90+ asio::ip::udp::resolver resolver(*io_context);
91 boost::system::error_code ec;
92 // ipv4 interfaces
93 auto results = resolver.resolve(udp::v4(), asio::ip::host_name(), "", ec);
94@@ -890,12 +890,12 @@ void Bonjour::priv::lookup_perform()
95 // create ipv4 socket for each interface
96 // each will send to querry to for both ipv4 and ipv6
97 for (const auto& intrfc : interfaces)
98- sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP4, intrfc, io_service));
99+ sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP4, intrfc, io_context));
100 } else {
101 BOOST_LOG_TRIVIAL(info) << "Failed to resolve ipv4 interfaces: " << ec.message();
102 }
103 if (sockets.empty())
104- sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP4, io_service));
105+ sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP4, io_context));
106 // ipv6 interfaces
107 interfaces.clear();
108 //udp::resolver::query query(host, PORT, boost::asio::ip::resolver_query_base::numeric_service);
109@@ -910,9 +910,9 @@ void Bonjour::priv::lookup_perform()
110 // create ipv6 socket for each interface
111 // each will send to querry to for both ipv4 and ipv6
112 for (const auto& intrfc : interfaces)
113- sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP6, intrfc, io_service));
114+ sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP6, intrfc, io_context));
115 if (interfaces.empty())
116- sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP6, io_service));
117+ sockets.emplace_back(new LookupSocket(txt_keys, service, service_dn, protocol, replyfn, BonjourRequest::MCAST_IP6, io_context));
118 } else {
119 BOOST_LOG_TRIVIAL(info)<< "Failed to resolve ipv6 interfaces: " << ec.message();
120 }
121@@ -923,13 +923,13 @@ void Bonjour::priv::lookup_perform()
122 socket->send();
123
124 // timer settings
125- asio::deadline_timer timer(*io_service);
126+ asio::deadline_timer timer(*io_context);
127 retries--;
128 std::function<void(const error_code&)> timer_handler = [&](const error_code& error) {
129 // end
130 if (retries == 0 || error) {
131 // is this correct ending?
132- io_service->stop();
133+ io_context->stop();
134 if (completefn) {
135 completefn();
136 }
137@@ -947,7 +947,7 @@ void Bonjour::priv::lookup_perform()
138 timer.expires_from_now(boost::posix_time::seconds(timeout));
139 timer.async_wait(timer_handler);
140 // start io_service, it will run until it has something to do - so in this case until stop is called in timer
141- io_service->run();
142+ io_context->run();
143 }
144 catch (std::exception& e) {
145 BOOST_LOG_TRIVIAL(error) << e.what();
146@@ -966,12 +966,12 @@ void Bonjour::priv::resolve_perform()
147 rpls.push_back(reply);
148 };
149
150- std::shared_ptr< boost::asio::io_service > io_service(new boost::asio::io_service);
151+ std::shared_ptr< boost::asio::io_context > io_context(new boost::asio::io_context);
152 std::vector<ResolveSocket*> sockets;
153
154 // resolve interfaces - from PR#6646
155 std::vector<boost::asio::ip::address> interfaces;
156- asio::ip::udp::resolver resolver(*io_service);
157+ asio::ip::udp::resolver resolver(*io_context);
158 boost::system::error_code ec;
159 // ipv4 interfaces
160 auto results = resolver.resolve(udp::v4(), asio::ip::host_name(), "", ec);
161@@ -984,12 +984,12 @@ void Bonjour::priv::resolve_perform()
162 // create ipv4 socket for each interface
163 // each will send to querry to for both ipv4 and ipv6
164 for (const auto& intrfc : interfaces)
165- sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP4, intrfc, io_service));
166+ sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP4, intrfc, io_context));
167 } else {
168 BOOST_LOG_TRIVIAL(info) << "Failed to resolve ipv4 interfaces: " << ec.message();
169 }
170 if (sockets.empty())
171- sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP4, io_service));
172+ sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP4, io_context));
173
174 // ipv6 interfaces
175 interfaces.clear();
176@@ -1003,9 +1003,9 @@ void Bonjour::priv::resolve_perform()
177 // create ipv6 socket for each interface
178 // each will send to querry to for both ipv4 and ipv6
179 for (const auto& intrfc : interfaces)
180- sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP6, intrfc, io_service));
181+ sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP6, intrfc, io_context));
182 if (interfaces.empty())
183- sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP6, io_service));
184+ sockets.emplace_back(new ResolveSocket(hostname, reply_callback, BonjourRequest::MCAST_IP6, io_context));
185 } else {
186 BOOST_LOG_TRIVIAL(info) << "Failed to resolve ipv6 interfaces: " << ec.message();
187 }
188@@ -1016,14 +1016,14 @@ void Bonjour::priv::resolve_perform()
189 socket->send();
190
191 // timer settings
192- asio::deadline_timer timer(*io_service);
193+ asio::deadline_timer timer(*io_context);
194 retries--;
195 std::function<void(const error_code&)> timer_handler = [&](const error_code& error) {
196 int replies_count = replies.size();
197 // end
198 if (retries == 0 || error || replies_count > 0) {
199 // is this correct ending?
200- io_service->stop();
201+ io_context->stop();
202 if (replies_count > 0 && resolvefn) {
203 resolvefn(replies);
204 }
205@@ -1041,7 +1041,7 @@ void Bonjour::priv::resolve_perform()
206 timer.expires_from_now(boost::posix_time::seconds(timeout));
207 timer.async_wait(timer_handler);
208 // start io_service, it will run until it has something to do - so in this case until stop is called in timer
209- io_service->run();
210+ io_context->run();
211 }
212 catch (std::exception& e) {
213 BOOST_LOG_TRIVIAL(error) << e.what();
214--- PrusaSlicer-version_2.8.1-orig/src/slic3r/Utils/Bonjour.hpp
215+++ PrusaSlicer-version_2.8.1-dwok/src/slic3r/Utils/Bonjour.hpp
216@@ -155,11 +155,11 @@ public:
217 UdpSocket(Bonjour::ReplyFn replyfn
218 , const boost::asio::ip::address& multicast_address
219 , const boost::asio::ip::address& interface_address
220- , std::shared_ptr< boost::asio::io_service > io_service);
221+ , std::shared_ptr< boost::asio::io_context > io_context);
222
223 UdpSocket(Bonjour::ReplyFn replyfn
224 , const boost::asio::ip::address& multicast_address
225- , std::shared_ptr< boost::asio::io_service > io_service);
226+ , std::shared_ptr< boost::asio::io_context > io_context);
227
228 void send();
229 void async_receive();
230@@ -172,7 +172,7 @@ protected:
231 boost::asio::ip::address multicast_address;
232 boost::asio::ip::udp::socket socket;
233 boost::asio::ip::udp::endpoint mcast_endpoint;
234- std::shared_ptr< boost::asio::io_service > io_service;
235+ std::shared_ptr< boost::asio::io_context > io_context;
236 std::vector<BonjourRequest> requests;
237 };
238
239@@ -186,8 +186,8 @@ public:
240 , Bonjour::ReplyFn replyfn
241 , const boost::asio::ip::address& multicast_address
242 , const boost::asio::ip::address& interface_address
243- , std::shared_ptr< boost::asio::io_service > io_service)
244- : UdpSocket(replyfn, multicast_address, interface_address, io_service)
245+ , std::shared_ptr< boost::asio::io_context > io_context)
246+ : UdpSocket(replyfn, multicast_address, interface_address, io_context)
247 , txt_keys(txt_keys)
248 , service(service)
249 , service_dn(service_dn)
250@@ -203,8 +203,8 @@ public:
251 , std::string protocol
252 , Bonjour::ReplyFn replyfn
253 , const boost::asio::ip::address& multicast_address
254- , std::shared_ptr< boost::asio::io_service > io_service)
255- : UdpSocket(replyfn, multicast_address, io_service)
256+ , std::shared_ptr< boost::asio::io_context > io_context)
257+ : UdpSocket(replyfn, multicast_address, io_context)
258 , txt_keys(txt_keys)
259 , service(service)
260 , service_dn(service_dn)
261@@ -241,8 +241,8 @@ public:
262 , Bonjour::ReplyFn replyfn
263 , const boost::asio::ip::address& multicast_address
264 , const boost::asio::ip::address& interface_address
265- , std::shared_ptr< boost::asio::io_service > io_service)
266- : UdpSocket(replyfn, multicast_address, interface_address, io_service)
267+ , std::shared_ptr< boost::asio::io_context > io_context)
268+ : UdpSocket(replyfn, multicast_address, interface_address, io_context)
269 , hostname(hostname)
270
271 {
272@@ -253,8 +253,8 @@ public:
273 ResolveSocket(const std::string& hostname
274 , Bonjour::ReplyFn replyfn
275 , const boost::asio::ip::address& multicast_address
276- , std::shared_ptr< boost::asio::io_service > io_service)
277- : UdpSocket(replyfn, multicast_address, io_service)
278+ , std::shared_ptr< boost::asio::io_context > io_context)
279+ : UdpSocket(replyfn, multicast_address, io_context)
280 , hostname(hostname)
281
282 {
283--- PrusaSlicer-version_2.8.1-orig/src/slic3r/Utils/Serial.cpp
284+++ PrusaSlicer-version_2.8.1-dwok/src/slic3r/Utils/Serial.cpp
285@@ -282,12 +282,12 @@ std::vector<std::string> scan_serial_por
286 namespace asio = boost::asio;
287 using boost::system::error_code;
288
289-Serial::Serial(asio::io_service& io_service) :
290- asio::serial_port(io_service)
291+Serial::Serial(asio::io_context &io_context) :
292+ asio::serial_port(io_context)
293 {}
294
295-Serial::Serial(asio::io_service& io_service, const std::string &name, unsigned baud_rate) :
296- asio::serial_port(io_service, name)
297+Serial::Serial(asio::io_context &io_context, const std::string &name, unsigned baud_rate) :
298+ asio::serial_port(io_context, name)
299 {
300 set_baud_rate(baud_rate);
301 }
302@@ -390,19 +390,19 @@ void Serial::reset_line_num()
303
304 bool Serial::read_line(unsigned timeout, std::string &line, error_code &ec)
305 {
306- auto& io_service =
307+ auto& io_context =
308 #if BOOST_VERSION >= 107000
309 //FIXME this is most certainly wrong!
310 (boost::asio::io_context&)this->get_executor().context();
311 #else
312 this->get_io_service();
313 #endif
314- asio::deadline_timer timer(io_service);
315+ asio::deadline_timer timer(io_context);
316 char c = 0;
317 bool fail = false;
318
319 while (true) {
320- io_service.reset();
321+ io_context.reset();
322
323 asio::async_read(*this, boost::asio::buffer(&c, 1), [&](const error_code &read_ec, size_t size) {
324 if (ec || size == 0) {
325@@ -423,7 +423,7 @@ bool Serial::read_line(unsigned timeout,
326 });
327 }
328
329- io_service.run();
330+ io_context.run();
331
332 if (fail) {
333 return false;
334--- PrusaSlicer-version_2.8.1-orig/src/slic3r/Utils/Serial.hpp
335+++ PrusaSlicer-version_2.8.1-dwok/src/slic3r/Utils/Serial.hpp
336@@ -43,8 +43,8 @@ extern std::vector<SerialPortInfo> scan
337 class Serial : public boost::asio::serial_port
338 {
339 public:
340- Serial(boost::asio::io_service &io_service);
341- Serial(boost::asio::io_service &io_service, const std::string &name, unsigned baud_rate);
342+ Serial(boost::asio::io_context &io_context);
343+ Serial(boost::asio::io_context &io_context, const std::string &name, unsigned baud_rate);
344 Serial(const Serial &) = delete;
345 Serial &operator=(const Serial &) = delete;
346 ~Serial();
347--- PrusaSlicer-version_2.8.1-orig/src/slic3r/Utils/TCPConsole.cpp
348+++ PrusaSlicer-version_2.8.1-dwok/src/slic3r/Utils/TCPConsole.cpp
349@@ -9,6 +9,7 @@
350 #include <boost/asio/read_until.hpp>
351 #include <boost/asio/steady_timer.hpp>
352 #include <boost/asio/write.hpp>
353+#include <boost/asio/connect.hpp>
354 #include <boost/bind/bind.hpp>
355 #include <boost/format.hpp>
356 #include <boost/log/trivial.hpp>
357@@ -161,7 +162,7 @@ bool TCPConsole::run_queue()
358
359 auto endpoints = m_resolver.resolve(m_host_name, m_port_name);
360
361- m_socket.async_connect(endpoints->endpoint(),
362+ boost::asio::async_connect(m_socket, endpoints,
363 boost::bind(&TCPConsole::handle_connect, this, boost::placeholders::_1)
364 );
365
366
diff --git a/gnu/packages/patches/prusa-slicer-boost-1.88.patch b/gnu/packages/patches/prusa-slicer-boost-1.88.patch
new file mode 100644
index 00000000000..ad712c49618
--- /dev/null
+++ b/gnu/packages/patches/prusa-slicer-boost-1.88.patch
@@ -0,0 +1,39 @@
1Bug: https://bugs.gentoo.org/955553
2Based on: https://gitlab.archlinux.org/archlinux/packaging/packages/prusa-slicer/-/blob/main/boost-1.88.patch
3
4--- a/src/libslic3r/GCode/PostProcessor.cpp
5+++ b/src/libslic3r/GCode/PostProcessor.cpp
6@@ -152,7 +152,14 @@ static int run_script(const std::string &script, const std::string &gcode, std::
7
8 #include <cstdlib> // getenv()
9 #include <sstream>
10+#if BOOST_VERSION >= 108800 // v2 is now default
11+#define BOOST_PROCESS_VERSION 1
12+#include <boost/process/v1/child.hpp>
13+#include <boost/process/v1/io.hpp>
14+#include <boost/process/v1/pipe.hpp>
15+#else
16 #include <boost/process.hpp>
17+#endif
18
19 namespace process = boost::process;
20
21--- a/src/slic3r/GUI/RemovableDriveManager.cpp
22+++ b/src/slic3r/GUI/RemovableDriveManager.cpp
23@@ -35,8 +35,16 @@
24 #include <pwd.h>
25 #include <boost/filesystem.hpp>
26 #include <boost/system/error_code.hpp>
27+#if BOOST_VERSION >= 108800 // v2 is now default
28+#define BOOST_PROCESS_VERSION 1
29+#include <boost/process/v1/child.hpp>
30+#include <boost/process/v1/io.hpp>
31+#include <boost/process/v1/pipe.hpp>
32+#include <boost/process/v1/search_path.hpp>
33+#else
34 #include <boost/process.hpp>
35 #endif
36+#endif
37
38 namespace Slic3r {
39 namespace GUI {
diff --git a/gnu/packages/patches/prusa-slicer-boost-1.89.patch b/gnu/packages/patches/prusa-slicer-boost-1.89.patch
new file mode 100644
index 00000000000..9a5403ceb31
--- /dev/null
+++ b/gnu/packages/patches/prusa-slicer-boost-1.89.patch
@@ -0,0 +1,35 @@
1`Boost::system` is not valid since Boost 1.89.0.
2
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5@@ -370,7 +370,7 @@ endif()
6 # boost::process was introduced first in version 1.64.0,
7 # boost::beast::detail::base64 was introduced first in version 1.66.0
8 set(MINIMUM_BOOST_VERSION "1.83.0")
9-set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams;nowide")
10+set(_boost_components "filesystem;thread;log;locale;regex;chrono;atomic;date_time;iostreams;nowide")
11 find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components})
12
13 find_package(Eigen3 3.3.7 REQUIRED)
14
15--- a/cmake/modules/FindOpenVDB.cmake
16+++ b/cmake/modules/FindOpenVDB.cmake
17@@ -471,5 +471,4 @@
18 set(_OPENVDB_VISIBLE_DEPENDENCIES
19 Boost::iostreams
20- Boost::system
21 IlmBase::Half
22 )
23
24--- a/src/slic3r/Utils/Bonjour.cpp
25+++ b/src/slic3r/Utils/Bonjour.cpp
26@@ -11,6 +11,7 @@
27 #include <string>
28 #include <map>
29 #include <thread>
30+#include <boost/asio/deadline_timer.hpp>
31 #include <boost/endian/conversion.hpp>
32 #include <boost/date_time/posix_time/posix_time_duration.hpp>
33 #include <boost/format.hpp>
34--
352.52.0 \ No newline at end of file
diff --git a/gnu/packages/patches/prusa-slicer-cgal-6.patch b/gnu/packages/patches/prusa-slicer-cgal-6.patch
new file mode 100644
index 00000000000..3aac479197b
--- /dev/null
+++ b/gnu/packages/patches/prusa-slicer-cgal-6.patch
@@ -0,0 +1,191 @@
1From a9283c62cec2b802aa2133c92b7ff5bf320c0bb6 Mon Sep 17 00:00:00 2001
2From: Laurent Rineau <laurent.rineau@cgal.org>
3Date: Sat, 13 Jul 2024 01:19:21 +0200
4Subject: [PATCH] compatibility with CGAL-6.0 (and 5.6.x)
5
6updated for 2.8.1
7
8--- a/src/libslic3r/CutSurface.cpp
9+++ b/src/libslic3r/CutSurface.cpp
10@@ -4,6 +4,14 @@
11 ///|/
12 #include "CutSurface.hpp"
13
14+template <typename T>
15+auto access_pmap(std::optional<T> opt) -> T {
16+ return opt.value();
17+}
18+
19+template <typename Pair>
20+auto access_pmap(Pair pair) { return pair.first; }
21+
22 /// models_input.obj - Check transormation of model to each others
23 /// projection_center.obj - circle representing center of projection with correct distance
24 /// {M} .. model index
25@@ -31,6 +39,7 @@ using namespace Slic3r;
26 #include <CGAL/Exact_integer.h>
27 #include <CGAL/Surface_mesh.h>
28 #include <CGAL/Cartesian_converter.h>
29+#include <CGAL/AABB_traits.h>
30 #include <oneapi/tbb/blocked_range.h>
31 #include <oneapi/tbb/parallel_for.h>
32 #include <boost/property_map/property_map.hpp>
33@@ -1021,8 +1030,8 @@ priv::CutMesh priv::to_cgal(const ExPolygons &shapes,
34 if (shapes.empty()) return {};
35
36 CutMesh result;
37- EdgeShapeMap edge_shape_map = result.add_property_map<EI, IntersectingElement>(edge_shape_map_name).first;
38- FaceShapeMap face_shape_map = result.add_property_map<FI, IntersectingElement>(face_shape_map_name).first;
39+ EdgeShapeMap edge_shape_map = access_pmap((result.add_property_map<EI, IntersectingElement>(edge_shape_map_name)));
40+ FaceShapeMap face_shape_map = access_pmap((result.add_property_map<FI, IntersectingElement>(face_shape_map_name)));
41
42 std::vector<VI> indices;
43 auto insert_contour = [&projection, &indices, &result,
44@@ -1432,17 +1441,17 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
45 const ExPolygonsIndices &s2i)
46 {
47 // pointer to edge or face shape_map
48- VertexShapeMap vert_shape_map = cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr).first;
49+ VertexShapeMap vert_shape_map = access_pmap((cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr)));
50
51 // detect anomalities in visitor.
52 bool is_valid = true;
53 // NOTE: map are created when convert shapes to cgal model
54- const EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name).first;
55- const FaceShapeMap& face_shape_map = cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name).first;
56+ const EdgeShapeMap& edge_shape_map = access_pmap((cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name)));
57+ const FaceShapeMap& face_shape_map = access_pmap((cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name)));
58 Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid};
59
60 // a property map containing the constrained-or-not status of each edge
61- EdgeBoolMap ecm = cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false).first;
62+ EdgeBoolMap ecm = access_pmap((cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false)));
63 const auto &p = CGAL::parameters::visitor(visitor)
64 .edge_is_constrained_map(ecm)
65 .throw_on_self_intersection(false);
66@@ -1451,7 +1460,7 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
67
68 if (!is_valid) return {};
69
70- FaceTypeMap face_type_map = cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained).first;
71+ FaceTypeMap face_type_map = access_pmap((cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained)));
72
73 // Select inside and outside face in model
74 set_face_type(face_type_map, cgal_model, vert_shape_map, ecm, cgal_shape, s2i);
75@@ -1587,8 +1596,8 @@ void priv::collect_surface_data(std::queue<FI> &process,
76
77 void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh)
78 {
79- const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
80- const EdgeBoolMap &ecm = mesh.property_map<EI, bool>(is_constrained_edge_name).first;
81+ const VertexShapeMap &vert_shape_map = access_pmap((mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name)));
82+ const EdgeBoolMap &ecm = access_pmap((mesh.property_map<EI, bool>(is_constrained_edge_name)));
83
84 // check if vertex was made by edge_2 which is diagonal of quad
85 auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
86@@ -1773,10 +1782,10 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches,
87 for (const SurfacePatch &patch : patches) {
88 // map is created during intersection by corefine visitor
89 const VertexShapeMap &vert_shape_map =
90- models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
91+ access_pmap((models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
92 uint32_t patch_index = &patch - &patches.front();
93 // map is created during patch creation / dividing
94- const CvtVI2VI& cvt = patch.mesh.property_map<VI, VI>(patch_source_name).first;
95+ const CvtVI2VI& cvt = access_pmap((patch.mesh.property_map<VI, VI>(patch_source_name)));
96 // for each point on outline
97 for (const Loop &loop : patch.loops)
98 for (const VI &vi_patch : loop) {
99@@ -2666,7 +2675,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
100 /* const */ CutMesh &mesh,
101 const ReductionMap *rmap)
102 {
103- auto is_counted = mesh.add_property_map<VI, bool>("v:is_counted").first;
104+ auto is_counted = access_pmap((mesh.add_property_map<VI, bool>("v:is_counted")));
105 uint32_t count_vertices = 0;
106 if (rmap == nullptr) {
107 for (FI fi : fis)
108@@ -2696,7 +2705,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
109 cm.reserve(count_vertices, count_edges, count_faces);
110
111 // vertex conversion function from mesh VI to result VI
112- CvtVI2VI mesh2result = mesh.add_property_map<VI,VI>("v:mesh2result").first;
113+ CvtVI2VI mesh2result = access_pmap((mesh.add_property_map<VI,VI>("v:mesh2result")));
114
115 if (rmap == nullptr) {
116 for (FI fi : fis) {
117@@ -2748,7 +2757,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
118 assert(count_edges >= cm.edges().size());
119
120 // convert VI from this patch to source VI, when exist
121- CvtVI2VI cvt = cm.add_property_map<VI, VI>(patch_source_name).first;
122+ CvtVI2VI cvt = access_pmap((cm.add_property_map<VI, VI>(patch_source_name)));
123 // vi_s .. VertexIndex into mesh (source)
124 // vi_d .. new VertexIndex in cm (destination)
125 for (VI vi_s : mesh.vertices()) {
126@@ -2939,7 +2948,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch,
127 uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model)
128 {
129 // map is created during intersection by corefine visitor
130- const VertexShapeMap &vert_shape_map = model.property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
131+ const VertexShapeMap &vert_shape_map = access_pmap((model.property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
132 // for each half edge of outline
133 for (HI hi : cut.second) {
134 VI vi = model.source(hi);
135@@ -2964,7 +2973,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector<FI>& fis,
136 patch_new.model_id = patch.model_id;
137 patch_new.shape_id = patch.shape_id;
138 // fix cvt
139- CvtVI2VI cvt = patch_new.mesh.property_map<VI, VI>(patch_source_name).first;
140+ CvtVI2VI cvt = access_pmap((patch_new.mesh.property_map<VI, VI>(patch_source_name)));
141 for (VI &vi : cvt) {
142 if (!vi.is_valid()) continue;
143 vi = cvt_from[vi];
144@@ -2982,9 +2991,9 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches)
145 CutMesh& cm = patch.mesh;
146 assert(!cm.faces().empty());
147 std::string patch_number_name = "f:patch_number";
148- CutMesh::Property_map<FI,bool> is_processed = cm.add_property_map<FI, bool>(patch_number_name, false).first;
149+ CutMesh::Property_map<FI,bool> is_processed = access_pmap((cm.add_property_map<FI, bool>(patch_number_name, false)));
150
151- const CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).first;
152+ const CvtVI2VI& cvt_from = access_pmap((patch.mesh.property_map<VI, VI>(patch_source_name)));
153
154 std::vector<FI> fis;
155 fis.reserve(cm.faces().size());
156@@ -3085,7 +3094,7 @@ priv::SurfacePatches priv::diff_models(VCutAOIs &cuts,
157 CutAOIs &model_cuts = cuts[model_index];
158 CutMesh &cut_model_ = cut_models[model_index];
159 const CutMesh &cut_model = cut_model_;
160- ReductionMap vertex_reduction_map = cut_model_.add_property_map<VI, VI>(vertex_reduction_map_name).first;
161+ ReductionMap vertex_reduction_map = access_pmap((cut_model_.add_property_map<VI, VI>(vertex_reduction_map_name)));
162 create_reduce_map(vertex_reduction_map, cut_model);
163
164 for (size_t cut_index = 0; cut_index < model_cuts.size(); ++cut_index, ++index) {
165@@ -3171,7 +3180,7 @@ bool priv::is_over_whole_expoly(const CutAOI &cutAOI,
166 const CutMesh &mesh)
167 {
168 // NonInterupted contour is without other point and contain all from shape
169- const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
170+ const VertexShapeMap &vert_shape_map = access_pmap((mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name)));
171 for (HI hi : cutAOI.second) {
172 const IntersectingElement *ie_s = vert_shape_map[mesh.source(hi)];
173 const IntersectingElement *ie_t = vert_shape_map[mesh.target(hi)];
174@@ -3708,7 +3717,7 @@ void priv::store(const CutMesh &mesh, const FaceTypeMap &face_type_map, const st
175 }
176
177 CutMesh &mesh_ = const_cast<CutMesh &>(mesh);
178- auto face_colors = mesh_.add_property_map<priv::FI, CGAL::Color>("f:color").first;
179+ auto face_colors = access_pmap((mesh_.add_property_map<priv::FI, CGAL::Color>("f:color")));
180 for (FI fi : mesh.faces()) {
181 auto &color = face_colors[fi];
182 switch (face_type_map[fi]) {
183@@ -3734,7 +3743,7 @@ void priv::store(const CutMesh &mesh, const ReductionMap &reduction_map, const s
184 std::string off_file = dir + "model" + std::to_string(reduction_order++) + ".off";
185
186 CutMesh &mesh_ = const_cast<CutMesh &>(mesh);
187- auto vertex_colors = mesh_.add_property_map<priv::VI, CGAL::Color>("v:color").first;
188+ auto vertex_colors = access_pmap((mesh_.add_property_map<priv::VI, CGAL::Color>("v:color")));
189 // initialize to gray color
190 for (VI vi: mesh.vertices())
191 vertex_colors[vi] = CGAL::Color{127, 127, 127};
diff --git a/gnu/packages/patches/prusa-slicer-opencascade-7.8.patch b/gnu/packages/patches/prusa-slicer-opencascade-7.8.patch
new file mode 100644
index 00000000000..1e37ce9baa1
--- /dev/null
+++ b/gnu/packages/patches/prusa-slicer-opencascade-7.8.patch
@@ -0,0 +1,20 @@
1--- a/src/occt_wrapper/CMakeLists.txt
2+++ b/src/occt_wrapper/CMakeLists.txt
3@@ -19,14 +19,11 @@ include(GenerateExportHeader)
4
5 generate_export_header(OCCTWrapper)
6
7-find_package(OpenCASCADE 7.6.1 REQUIRED)
8+find_package(OpenCASCADE REQUIRED)
9
10 set(OCCT_LIBS
11- TKXDESTEP
12- TKSTEP
13- TKSTEP209
14- TKSTEPAttr
15- TKSTEPBase
16+ TKDESTEP
17+ TKDESTL
18 TKXCAF
19 TKXSBase
20 TKVCAF