[PATCH 0/5] Update priusa-sicer to version 2.9.2

  • Done
  • quality assurance status badge
Details
2 participants
  • Andreas Enge
  • nomike
Owner
unassigned
Submitted by
nomike
Severity
normal

Debbugs page

N
N
nomike wrote on 29 Apr 17:02 -0700
(address . guix-patches@gnu.org)(name . nomike)(address . nomike@nomike.com)
20250430001153.893176-1-nomike@nomike.com
The update required serveral changes:

- catch2 needs to be available as version 3.8. As it has a lot of dependend apps,
I chose to create a new package.
- opencascade-occt: This was downgraded by prusa-slicer due to a bug which still
doesn't seem to be fixed in the latest version.
- hidapi-cmake: hidapi deprecated autotools/automake and switched to CMake.
As I couldn't get prusa-slicer to build properly with the automake version
I switched it to CMake. To avoid issues with existing dependencies, I created
a new package. The old ond should probably be marked as deprecated and slowly
phased out.
- prusa-libbgcode doesn't have official releases, so I just created a new build
using the same commit as is used by the upstream project.
- prusa-slicer is updated to the latest version. I took patches from
included the ones which seem necessary.

There is a bug in prusa-slicer in regards to hidapi which I fixed in the package
definition. I also filed https://github.com/prusa3d/PrusaSlicer/issues/14505for that.

nomike (5):
gnu: Add catch2-3.8
gnu: Add version 7.6.1 of opencascade-occt
gnu: Add hidapi-cmake
gnu: Update prusa-libbgcode
gnu: Update prusa-slicer to version 2.9.2

gnu/packages/check.scm | 28 +++
gnu/packages/engineering.scm | 199 ++++++++++--------
gnu/packages/libusb.scm | 30 +++
gnu/packages/maths.scm | 98 +++++++++
...0-dont-force-link-to-wayland-and-x11.patch | 12 ++
.../patches/prusa-slicer-2.8.1-cgal-6.0.patch | 191 +++++++++++++++++
.../patches/prusa-slicer-2.8.1-fstream.patch | 42 ++++
.../patches/prusa-slicer-fix-tests.patch | 17 --
8 files changed, 508 insertions(+), 109 deletions(-)
create mode 100644 gnu/packages/patches/prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch
create mode 100644 gnu/packages/patches/prusa-slicer-2.8.1-cgal-6.0.patch
create mode 100644 gnu/packages/patches/prusa-slicer-2.8.1-fstream.patch
delete mode 100644 gnu/packages/patches/prusa-slicer-fix-tests.patch

--
2.49.0
N
N
nomike wrote on 29 Apr 17:15 -0700
[PATCH 1/5] gnu: Add catch2-3.8
(address . 78154@debbugs.gnu.org)(name . nomike)(address . nomike@nomike.com)
20250430001507.912670-1-nomike@nomike.com
* gnu/packages/check.scm (catch2-3.8): New variable

Change-Id: I8286d4b71fc09bbcdc483c920710dc881fc82aba
---
gnu/packages/check.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (48 lines)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 3fe7214645..8e498ed3e5 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -54,6 +54,7 @@
;;; Copyright © 2024 Navid Afkhami <navid.afkhami@mdc-berlin.de>
;;; Copyright © 2024, 2025 gemmaro <gemmaro.dev@gmail.com>
;;; Copyright © 2024 Ashvith Shetty <ashvithshetty10@gmail.com>
+;;; Copyright © 2025 nomike Postmann <nomike@nomike.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -735,6 +736,33 @@ (define-public catch2-3
a multi-paradigm automated test framework for C++ and Objective-C.")
(license license:boost1.0)))
+(define-public catch2-3.8
+ (package
+ (name "catch2")
+ (version "3.8.1")
+ (home-page "https://github.com/catchorg/Catch2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/catchorg/Catch2")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0v1k14n02aiw4rv5sxhc5612cjhkdj59cjpm50qfxhapsdv54n3f"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:configure-flags
+ #~(list "-DCATCH_DEVELOPMENT_BUILD=ON" "-DCATCH_ENABLE_WERROR=OFF"
+ "-DBUILD_SHARED_LIBS=ON")))
+ (inputs (list python-wrapper))
+ (synopsis "Automated test framework for C++ and Objective-C")
+ (description
+ "Catch2 stands for C++ Automated Test Cases in Headers and is
+a multi-paradigm automated test framework for C++ and Objective-C.")
+ (license license:boost1.0)))
+
(define-public cmdtest
(package
(name "cmdtest")
--
2.49.0
N
N
nomike wrote on 29 Apr 17:15 -0700
[PATCH 2/5] gnu: Add version 7.6.1 of opencascade-occt
(address . 78154@debbugs.gnu.org)(name . nomike)(address . nomike@nomike.com)
20250430001507.912670-2-nomike@nomike.com
* gnu/packages/maths.scm (opencascade-occt-7.6.1): New variable

Change-Id: I4ade08f8e9db19c4aea115ab838ed163661ab3d4
---
gnu/packages/maths.scm | 98 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)

Toggle diff (118 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 0b653f4daf..face2f6da3 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -69,6 +69,7 @@
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2025 Luca Cirrottola <luca.cirrottola@inria.fr>
;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2025 nomike Postmann <nomike@nomike.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3305,6 +3306,103 @@ (define-public octave
#t))))))
(synopsis "High-level language for numerical computation (with GUI)")))
+(define-public opencascade-occt-7.6.1
+ ;; As of version 2.9.2 PrusaSlicer has a hard dependency on this version of OCCT
+ ;; "because newer versions are triangulating chamfers incorrectly.".
+ ;; See https://github.com/prusa3d/PrusaSlicer/commit/c6a02106fd1d3caa9a48a6b7c2bdd04546b24485
+ (package
+ (name "opencascade-occt")
+ (version "7.6.1")
+ (properties '((release-tag-prefix . "^V")
+ (release-tag-version-delimiter . "_")))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.dev.opencascade.org/repos/occt.git")
+ (commit (string-append "V"
+ (string-map (lambda (x)
+ (if (eq? x #\.) #\_ x))
+ version)))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1cc7n4rs26lm1awwn2bijvjq9b3kz204ffnks02lrpgs7pf8yk8b"))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; Remove files specific to non-free operating systems.
+ (delete-file-recursively "samples/ios")
+ (delete-file-recursively "samples/mfc")
+ (delete-file-recursively "samples/qt/FuncDemo")
+ (delete-file "genconf.bat")
+ (delete-file "gendoc.bat")
+ (delete-file "genproj.bat")
+ (delete-file "upgrade.bat")
+ ;; Remove references to deleted files.
+ (substitute* "dox/FILES_HTML.txt"
+ ((".*standard.*")
+ "")
+ ((".*UIKitSample.*")
+ ""))
+ #t))))
+ (build-system cmake-build-system)
+ (arguments
+ '( ;There is no test target for make. OCCT provides an
+
+ ;; 'Automated Testing System', which may be accessed after
+ ;; installation via the draw.sh script. draw.sh is located in
+ ;; the bin directory. For details see:
+ ;; https://www.opencascade.com/doc/occt-7.3.0/overview/html/\
+ ;; occt_dev_guides__tests.html
+ #:tests? #f
+ ;; Configure without freeimage: attempting to link against the
+ ;; freeimage version 3.17 library leads to 'undefined
+ ;; reference' errors.
+ #:configure-flags (list "-DUSE_FREEIMAGE:BOOL=OFF"
+ "-DUSE_TBB:BOOL=ON"
+ "-DUSE_VTK:BOOL=OFF"
+ "-DBUILD_DOC_Overview:BOOL=OFF"
+ "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
+ "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
+ "-UCMAKE_INSTALL_LIBDIR")))
+ (native-inputs (list doxygen fontconfig))
+ (inputs (list freetype
+ ;; ("freeimage" ,freeimage)
+ glu
+ libxext
+ libxi
+ libxmu
+ mesa
+ tbb-2020
+ tcl
+ tk))
+ ;; TODO: build Overview documentation and add 'doc' output.
+ (home-page "https://www.opencascade.com")
+ (synopsis "Libraries for 3D modeling and numerical simulation")
+ (description
+ "Open CASCADE is a set of libraries for the development of applications
+dealing with 3D CAD data or requiring industrial 3D capabilities. It includes
+C++ class libraries providing services for 3D surface and solid modeling, CAD
+data exchange, and visualization. It is used for development of specialized
+software dealing with 3D models in design (CAD), manufacturing (CAM),
+numerical simulation (CAE), measurement equipment (CMM), and quality
+control (CAQ) domains.
+
+This is the certified version of the Open Cascade Technology (OCCT) library.")
+ (license (list ;OCCT library:
+ license:lgpl2.1 ;with an exception for the use of header
+ ;; files, see OCCT_LGPL_EXCEPTION.txt.
+ ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and
+ ;; src/OpenGl/OpenGl_HaltonSampler.hxx:
+ license:expat
+ ;; Files src/ExprIntrp/ExprIntrp.tab.* and
+ ;; src/StepFile/step.tab.*:
+ license:gpl3+ ;with Bison 2.2 exception.
+ ;; File src/NCollection/NCollection_UtfIterator.lxx:
+ (license:non-copyleft
+ "https://www.unicode.org/license.html")
+ ;; File src/NCollection/NCollection_StdAllocator.hxx:
+ license:public-domain))))
+
(define-public opencascade-occt
(package
(name "opencascade-occt")
--
2.49.0
N
N
nomike wrote on 29 Apr 17:15 -0700
[PATCH 3/5] gnu: Add hidapi-cmake
(address . 78154@debbugs.gnu.org)(name . nomike)(address . nomike@nomike.com)
20250430001507.912670-3-nomike@nomike.com
* gnu/packages/libusb.scm (hidapi-cmake): New variable

Change-Id: I8a0c324544d9de0bfa63c85d88c6e3721cdd6ecd
---
gnu/packages/libusb.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index a6e24f8c41..3ad17a474e 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;; Copyright © 2024 hapster <o.rojon@posteo.net>
+;;; Copyright © 2025 nomike Postmann <nomike@nomike.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -712,6 +713,35 @@ (define-public hidapi
license:bsd-3
(license:non-copyleft "file://LICENSE-orig.txt")))))
+(define-public hidapi-cmake
+ (package
+ (name "hidapi-cmake")
+ (version "0.14.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libusb/hidapi")
+ (commit (string-append "hidapi-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "121laqsml0104d1h4hp115gp21qiqi0r9dgcaqdi9ismmq3b6yx7"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f))
+ (inputs (list libusb eudev))
+ (native-inputs (list autoconf automake libtool pkg-config))
+ (home-page "https://github.com/libusb/hidapi")
+ (synopsis "HID API library - CMake version")
+ (description
+ "HIDAPI is a library which allows an application to interface with USB and Bluetooth
+HID-Class devices. This version is built using CMake instead of autoconf/automake which
+has been deprecated by the hidapi project")
+ ;; HIDAPI can be used under one of three licenses.
+ (license (list license:gpl3 license:bsd-3
+ (license:non-copyleft "file://LICENSE-orig.txt")))))
+
(define-public python-hid
(package
(name "python-hid")
--
2.49.0
N
N
nomike wrote on 29 Apr 17:15 -0700
[PATCH 4/5] gnu: Update prusa-libbgcode
(address . 78154@debbugs.gnu.org)(name . nomike)(address . nomike@nomike.com)
20250430001507.912670-4-nomike@nomike.com
Change-Id: Ic29aec26c37103ba40a55d090a349aba0ef9a035
---
gnu/packages/engineering.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index f472d1127f..440c075156 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -4355,8 +4355,8 @@ (define (fix-external-library cmake source)
(define-public prusa-libbgcode
;; Use the latest commit since there are no proper releases nor tags, see
;; <https://github.com/prusa3d/libbgcode/issues/31>.
- (let ((commit "8ae75bd0eea622f0e34cae311b3bd065b55eae9b")
- (revision "0"))
+ (let ((commit "5041c093b33e2748e76d6b326f2251310823f3df")
+ (revision "1"))
(package
(name "prusa-libbgcode")
(version (git-version "0.0.0" revision commit))
@@ -4368,8 +4368,8 @@ (define-public prusa-libbgcode
(commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "0fjx2ijz9zqpqs486lcrrrhqvmfzrpb8j6v57l0jiynavwv3kznw"))))
- (native-inputs (list catch2))
+ (base32 "0ivc0zhpf0gz55jfj0gbkff6yw5gpwazk94asldzznn7x9jmbb0i"))))
+ (native-inputs (list catch2-3.8))
(propagated-inputs (list zlib boost heatshrink))
(build-system cmake-build-system)
(home-page "https://github.com/prusa3d/libbgcode")
--
2.49.0
N
N
nomike wrote on 29 Apr 17:15 -0700
[PATCH 5/5] gnu: Update prusa-slicer to version 2.9.2
(address . 78154@debbugs.gnu.org)(name . nomike)(address . nomike@nomike.com)
20250430001507.912670-5-nomike@nomike.com
Change-Id: Ibf59b2efb751c3ea0b555c2e4e914e5c095d5413
---
gnu/packages/engineering.scm | 191 ++++++++++--------
...0-dont-force-link-to-wayland-and-x11.patch | 12 ++
.../patches/prusa-slicer-2.8.1-cgal-6.0.patch | 191 ++++++++++++++++++
.../patches/prusa-slicer-2.8.1-fstream.patch | 42 ++++
.../patches/prusa-slicer-fix-tests.patch | 17 --
5 files changed, 348 insertions(+), 105 deletions(-)
create mode 100644 gnu/packages/patches/prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch
create mode 100644 gnu/packages/patches/prusa-slicer-2.8.1-cgal-6.0.patch
create mode 100644 gnu/packages/patches/prusa-slicer-2.8.1-fstream.patch
delete mode 100644 gnu/packages/patches/prusa-slicer-fix-tests.patch

Toggle diff (399 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 440c075156..ce8ae4e347 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -42,6 +42,7 @@
;;; Copyright © 2024 Juliana Sims <juli@incana.org>
;;; Copyright © 2024 Nguyễn Gia Phong <mcsinyx@disroot.org>
;;; Copyright © 2025 Frederick Muriuki Muriithi <fredmanglis@gmail.com>
+;;; Copyright © 2025 nomike Postmann <nomike@nomike.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -169,6 +170,7 @@ (define-module (gnu packages engineering)
#:use-module (gnu packages tree-sitter)
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
+ #:use-module (gnu packages webkit)
#:use-module (gnu packages wxwidgets)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xiph)
@@ -4402,104 +4404,117 @@ (define-public prusa-libbgcode
(define-public prusa-slicer
(package
(name "prusa-slicer")
- (version "2.7.4")
+ (version "2.9.2")
(source
(origin
(method git-fetch)
- (uri
- (git-reference
- (url "https://github.com/prusa3d/PrusaSlicer")
- (commit (string-append "version_" version))))
+ (uri (git-reference
+ (url "https://github.com/prusa3d/PrusaSlicer")
+ (commit (string-append "version_" version))))
(file-name (git-file-name name version))
- (sha256 (base32 "0s1cfvhfilyv0y98asr61c6rwlgyr1hf5v5hg8q9zwmzm2bkcql3"))
- (patches (search-patches "prusa-slicer-fix-tests.patch"))
+ (sha256
+ (base32 "05zwwhqv3fjg9rx6a4ga55f4ic1136f6lwms0kb4kaq50w9dvxwg"))
+ (patches (search-patches
+ "prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch"
+ "prusa-slicer-2.8.1-cgal-6.0.patch"
+ "prusa-slicer-2.8.1-fstream.patch"))
(modules '((guix build utils)))
- (snippet
- `(begin
- ;; Prusa slicer bundles a lot of dependencies in src/ directory.
- ;; Most of them contain prusa-specific modifications (e.g. avrdude),
- ;; but others do not. Here we replace the latter with Guix packages.
- ;; Remove bundled libraries that were not modified by Prusa Slicer developers.
- (delete-file-recursively "src/hidapi")
- (delete-file-recursively "src/eigen")
- (delete-file-recursively "src/libigl/igl")
- (substitute* "CMakeLists.txt"
- (("add_library\\(libexpat INTERFACE\\)")
- ""))
- (substitute* "src/libigl/CMakeLists.txt"
- (("target_link_libraries\\(libigl INTERFACE igl::core\\)") ""))
- (substitute* "src/CMakeLists.txt"
- (("add_subdirectory\\(hidapi\\)")
- "pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
- (("include_directories\\(hidapi/include\\)")
- "include_directories()"))
- (substitute* "src/slic3r/CMakeLists.txt"
- (("add_library\\(libslic3r_gui.*" all)
- (string-append
- all
- "\ntarget_include_directories(libslic3r_gui PUBLIC ${HIDAPI_INCLUDE_DIRS})\n"))
- (("\\bhidapi\\b") "${HIDAPI_LIBRARIES}"))))))
+ (snippet `(begin
+ ;; Prusa slicer bundles a lot of dependencies in src/ directory.
+ ;; Most of them contain prusa-specific modifications (e.g. avrdude),
+ ;; but others do not. Here we replace the latter with Guix packages.
+ ;; Remove bundled libraries that were not modified by Prusa Slicer
+ ;; developers.
+
+ ;; un-bundling hidapi
+ ;; https://github.com/prusa3d/PrusaSlicer/issues/14505
+ (delete-file-recursively "bundled_deps/hidapi")
+ (substitute* "bundled_deps/CMakeLists.txt"
+ (("add_subdirectory\\(hidapi\\)")
+ ""))
+ (substitute* "src/slic3r/CMakeLists.txt"
+ (("hidapi")
+ "hidapi::hidapi")
+ (("add_library\\(libslic3r_gui.*" all)
+ (string-append all "\nfind_package(hidapi REQUIRED)\n")))
+
+ ;; un-bundling libigl
+ (delete-file-recursively "bundled_deps/libigl/igl")
+ (substitute* "bundled_deps/libigl/CMakeLists.txt"
+ (("target_link_libraries\\(libigl INTERFACE igl::core\\)")
+ ""))
+ ;; Fix libsoup double linking
+ (substitute* "src/slic3r/CMakeLists.txt"
+ ((" webkit2gtk-4.1")
+ ""))))))
(build-system cmake-build-system)
(arguments
- (list #:configure-flags
- #~(list "-DSLIC3R_FHS=1" ;; Use The Filesystem Hierarchy Standard.
- "-DSLIC3R_GTK=3" ;; Use GTK+
- ;; Use wxWidgets 3.0.x.x to prevent GUI crashes when adding support enforcers.
- "-DSLIC3R_WX_STABLE=1"
- (format #f "-Dlibigl_DIR=~a"
- (search-input-directory %build-inputs
- "lib/cmake/igl/"))
- (format #f "-DCatch2_DIR=~a"
- (search-input-directory %build-inputs
- "lib/cmake/Catch2/")))
- #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'fix-include-paths
- (lambda _
- (substitute* "tests/libslic3r/test_quadric_edge_collapse.cpp"
- (("#include <libigl/igl/qslim.h>")
- "#include <igl/qslim.h>")))))))
- (native-inputs
- (list pkg-config catch2))
- (inputs
- (list boost
- cereal
- cgal
- curl
- dbus
- eigen
- eudev
- expat
- glew
- glib
- gmp
- gtk+
- heatshrink
- hidapi
- ilmbase
- libigl
- libjpeg-turbo
- libpng
- mesa
- mpfr
- nanosvg
- nlopt
- opencascade-occt
- openvdb
- pango
- prusa-libbgcode
- ;; XXX: Using Prusa wxWidgets fork as PrusaSlicer segfaults when compiled
- ;; with regular wxwidgets.
- prusa-wxwidgets
- qhull
- tbb
- zlib))
+ (list
+ #:configure-flags
+ #~(list "-DSLIC3R_FHS=1" ;Use The Filesystem Hierarchy Standard.
+ "-DSLIC3R_GTK=3" ;Use GTK+
+ ;; Use wxWidgets 3.0.x.x to prevent GUI crashes when adding support
+ ;; enforcers.
+ "-DSLIC3R_WX_STABLE=1"
+ (format #f "-Dlibigl_DIR=~a"
+ (search-input-directory %build-inputs "lib/cmake/igl/"))
+ (format #f "-DCatch2_DIR=~a"
+ (search-input-directory %build-inputs
+ "lib/cmake/Catch2/")))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-include-paths
+ (lambda _
+ (substitute* "tests/libslic3r/test_quadric_edge_collapse.cpp"
+ (("#include <libigl/igl/qslim.h>")
+ "#include <igl/qslim.h>"))
+ (substitute* "src/slic3r/GUI/Mouse3DController.hpp"
+ (("#include \"hidapi.h\"")
+ "#include \"hidapi/hidapi.h\"")))))))
+ (native-inputs (list pkg-config catch2-3.8))
+ (inputs (list boost
+ cereal
+ catch2-3.8
+ cgal
+ curl
+ dbus
+ eigen
+ eudev
+ `(,expat "static")
+ glew
+ glib
+ gmp
+ gtk+
+ heatshrink
+ hidapi-cmake
+ ilmbase
+ libigl
+ libjpeg-turbo
+ libpng
+ mesa
+ mpfr
+ nanosvg
+ nlopt
+ opencascade-occt-7.6.1
+ openssl
+ openvdb
+ pango
+ prusa-libbgcode
+ ;; XXX: Using Prusa wxWidgets fork as PrusaSlicer
+ ;; segfaults when compiled with regular wxwidgets.
+ prusa-wxwidgets
+ qhull
+ tbb
+ webkitgtk-with-libsoup2
+ z3
+ zlib))
(home-page "https://www.prusa3d.com/prusaslicer/")
- (synopsis "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)")
- (description "PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into
+ (synopsis
+ "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)")
+ (description
+ "PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into
G-code instructions for FFF printers or PNG layers for mSLA 3D printers.")
(license license:agpl3)
-
;; Mark as tunable to take advantage of SIMD code in Eigen and in libigl.
(properties '((tunable? . #t)))))
diff --git a/gnu/packages/patches/prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch b/gnu/packages/patches/prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch
new file mode 100644
index 0000000000..1d36fcbb7b
--- /dev/null
+++ b/gnu/packages/patches/prusa-slicer-2.6.0-dont-force-link-to-wayland-and-x11.patch
@@ -0,0 +1,12 @@
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -115,9 +115,6 @@ if (SLIC3R_GUI)
+ # libslic3r_gui will link to opengl anyway, so lets override wx
+ list(FILTER wxWidgets_LIBRARIES EXCLUDE REGEX OpenGL)
+
+- if (UNIX AND NOT APPLE)
+- list(APPEND wxWidgets_LIBRARIES X11 wayland-client wayland-egl EGL)
+- endif ()
+ # list(REMOVE_ITEM wxWidgets_LIBRARIES oleacc)
+ message(STATUS "wx libs: ${wxWidgets_LIBRARIES}")
+
diff --git a/gnu/packages/patches/prusa-slicer-2.8.1-cgal-6.0.patch b/gnu/packages/patches/prusa-slicer-2.8.1-cgal-6.0.patch
new file mode 100644
index 0000000000..3aac479197
--- /dev/null
+++ b/gnu/packages/patches/prusa-slicer-2.8.1-cgal-6.0.patch
@@ -0,0 +1,191 @@
+From a9283c62cec2b802aa2133c92b7ff5bf320c0bb6 Mon Sep 17 00:00:00 2001
+From: Laurent Rineau <laurent.rineau@cgal.org>
+Date: Sat, 13 Jul 2024 01:19:21 +0200
+Subject: [PATCH] compatibility with CGAL-6.0 (and 5.6.x)
+
+updated for 2.8.1
+
+--- a/src/libslic3r/CutSurface.cpp
++++ b/src/libslic3r/CutSurface.cpp
+@@ -4,6 +4,14 @@
+ ///|/
+ #include "CutSurface.hpp"
+
++template <typename T>
++auto access_pmap(std::optional<T> opt) -> T {
++ return opt.value();
++}
++
++template <typename Pair>
++auto access_pmap(Pair pair) { return pair.first; }
++
+ /// models_input.obj - Check transormation of model to each others
+ /// projection_center.obj - circle representing center of projection with correct distance
+ /// {M} .. model index
+@@ -31,6 +39,7 @@ using namespace Slic3r;
+ #include <CGAL/Exact_integer.h>
+ #include <CGAL/Surface_mesh.h>
+ #include <CGAL/Cartesian_converter.h>
++#include <CGAL/AABB_traits.h>
+ #include <oneapi/tbb/blocked_range.h>
+ #include <oneapi/tbb/parallel_for.h>
+ #include <boost/property_map/property_map.hpp>
+@@ -1021,8 +1030,8 @@ priv::CutMesh priv::to_cgal(const ExPolygons &shapes,
+ if (shapes.empty()) return {};
+
+ CutMesh result;
+- EdgeShapeMap edge_shape_map = result.add_property_map<EI, IntersectingElement>(edge_shape_map_name).first;
+- FaceShapeMap face_shape_map = result.add_property_map<FI, IntersectingElement>(face_shape_map_name).first;
++ EdgeShapeMap edge_shape_map = access_pmap((result.add_property_map<EI, IntersectingElement>(edge_shape_map_name)));
++ FaceShapeMap face_shape_map = access_pmap((result.add_property_map<FI, IntersectingElement>(face_shape_map_name)));
+
+ std::vector<VI> indices;
+ auto insert_contour = [&projection, &indices, &result,
+@@ -1432,17 +1441,17 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
+ const ExPolygonsIndices &s2i)
+ {
+ // pointer to edge or face shape_map
+- VertexShapeMap vert_shape_map = cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr).first;
++ VertexShapeMap vert_shape_map = access_pmap((cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr)));
+
+ // detect anomalities in visitor.
+ bool is_valid = true;
+ // NOTE: map are created when convert shapes to cgal model
+- const EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name).first;
+- const FaceShapeMap& face_shape_map = cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name).first;
++ const EdgeShapeMap& edge_shape_map = access_pmap((cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name)));
++ const FaceShapeMap& face_shape_map = access_pmap((cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name)));
+ Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map, vert_shape_map, &is_valid};
+
+ // a property map containing the constrained-or-not status of each edge
+- EdgeBoolMap ecm = cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false).first;
++ EdgeBoolMap ecm = access_pmap((cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false)));
+ const auto &p = CGAL::parameters::visitor(visitor)
+ .edge_is_constrained_map(ecm)
+ .throw_on_self_intersection(false);
+@@ -1451,7 +1460,7 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
+
+ if (!is_valid) return {};
+
+- FaceTypeMap face_type_map = cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained).first;
++ FaceTypeMap face_type_map = access_pmap((cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained)));
+
+ // Select inside and outside face in model
+ set_face_type(face_type_map, cgal_model, vert_shape_map, ecm, cgal_shape, s2i);
+@@ -1587,8 +1596,8 @@ void priv::collect_surface_data(std::queue<FI> &process,
+
+ void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh)
+ {
+- const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name).first;
+- const EdgeBoolMap &ecm = mesh.property_map<EI, bool>(is_constrained_edge_name).first;
++ const VertexShapeMap &vert_shape_map = access_pmap((mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name)));
++ const EdgeBoolMap &ecm = access_pmap((mesh.property_map<EI, bool>(is_constrained_edge_name)));
+
+ // check if vertex was made by edge_2 which is diagonal of quad
+ auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
+@@ -1773,10 +1782,10 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches,
+ for (const SurfacePatch &patch : patches) {
+ // map is created during intersection by corefine visitor
+ const VertexShapeMap &vert_shape_map =
+- models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
++ access_pmap((models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
+ uint32_t patch_index = &patch - &patches.front();
+ // map is created during patch creation / dividing
+- const CvtVI2VI& cvt = patch.mesh.property_map<VI, VI>(patch_source_name).first;
++ const CvtVI2VI& cvt = access_pmap((patch.mesh.property_map<VI, VI>(patch_source_name)));
+ // for each point on outline
+ for (const Loop &loop : patch.loops)
+ for (const VI &vi_patch : loop) {
+@@ -2666,7 +2675,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+ /* const */ CutMesh &mesh,
+ const ReductionMap *rmap)
+ {
+- auto is_counted = mesh.add_property_map<VI, bool>("v:is_counted").first;
++ auto is_counted = access_pmap((mesh.add_property_map<VI, bool>("v:is_counted")));
+ uint32_t count_vertices = 0;
+ if (rmap == nullptr) {
+ for (FI fi : fis)
+@@ -2696,7 +2705,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+ cm.reserve(count_vertices, count_edges, count_faces);
+
+ // vertex conversion function from mesh VI to result VI
+- CvtVI2VI mesh2result = mesh.add_property_map<VI,VI>("v:mesh2result").first;
++ CvtVI2VI mesh2result = access_pmap((mesh.add_property_map<VI,VI>("v:mesh2result")));
+
+ if (rmap == nullptr) {
+ for (FI fi : fis) {
+@@ -2748,7 +2757,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+ assert(count_edges >= cm.edges().size());
+
+ // convert VI from this patch to source VI, when exist
+- CvtVI2VI cvt = cm.add_property_map<VI, VI>(patch_source_name).first;
++ CvtVI2VI cvt = access_pmap((cm.add_property_map<VI, VI>(patch_source_name)));
+ // vi_s .. VertexIndex into mesh (source)
+ // vi_d .. new VertexIndex in cm (destination)
+ for (VI vi_s : mesh.vertices()) {
+@@ -2939,7 +2948,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch &patch,
+ uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model)
+ {
+ // map is created during intersection by corefine visitor
+- const VertexShapeMap &vert_shape_map = model.property_map<VI, const IntersectingElement *>(vert_shape_map_name).first;
++ const VertexShapeMap &vert_shape_map = access_pmap((model.property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
+ // for each half edge of outline
+ for (HI hi : cut.second) {
+ VI vi = model.source(hi);
+@@ -2964,7 +2973,7 @@ priv::SurfacePatch priv::separate_patch(const std::vector<FI>& fis,
+ patch_new.model_id = patch.model_id;
+ patch_new.shape_id = patch.shape_id;
+ // fix cvt
+- CvtVI2VI cvt = patch_new.mesh.property_map<VI, VI>(patch_source_name).first;
++ CvtVI2VI cvt = access_pmap((patch_new.mesh.property_map<VI, VI>(patch_source_name)));
+ for (VI &vi : cvt) {
+ if (!vi.is_valid()) continue;
+ vi = cvt_from[vi];
+@@ -2982,9 +2991,9 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches)
+ CutMesh& cm = patch.mesh;
+ assert(!cm.faces().empty());
+ std::string patch_number_name = "f:patch_number";
+- CutMesh::Property_map<FI,bool> is_processed = cm.add_property_map<FI, bool>(patch_number_name, false).first;
++ CutMesh::Property_map<FI,bool> is_processed = access_pmap((cm.add_property_map<FI, bool>(patch_number_name, false))
This message was truncated. Download the full message here.
A
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 78154@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 78154
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch