mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: prusa-slicer: Update to 2.9.2
* gnu/packages/patches/prusa-slicer-add-cmake-module.patch: New file. * gnu/packages/patches/prusa-slicer-fix-tests.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Register new patch, unregister removed patch. * gnu/packages/engineering.scm (prusa-slicer): Update to 2.9.2 [source]: Update patches. Update paths to bundled libraries. Properly remove libexpat from target_link_libraries. [native-inputs]: Replace catch2 by catch2-3.8. [inputs]: Replace opencascade-occt by opencascade-occt-7.6.1. Add openssl, webkitgtk-for-gtk3 and webkitgtk-with-libsoup2 for the new built-in browser functionality. Add z3. [description]: Extend description. Change-Id: If8c1b23b74e4eba2524276401e4fa468acc14901 Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
parent
687989ef3c
commit
f6b3eca6f3
4 changed files with 88 additions and 32 deletions
|
@ -2047,7 +2047,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/pounce-readable-checks.patch \
|
%D%/packages/patches/pounce-readable-checks.patch \
|
||||||
%D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
|
%D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
|
||||||
%D%/packages/patches/procps-strtod-test.patch \
|
%D%/packages/patches/procps-strtod-test.patch \
|
||||||
%D%/packages/patches/prusa-slicer-fix-tests.patch \
|
%D%/packages/patches/prusa-slicer-add-cmake-module.patch \
|
||||||
%D%/packages/patches/prusa-wxwidgets-makefile-fix.patch \
|
%D%/packages/patches/prusa-wxwidgets-makefile-fix.patch \
|
||||||
%D%/packages/patches/pthreadpool-system-libraries.patch \
|
%D%/packages/patches/pthreadpool-system-libraries.patch \
|
||||||
%D%/packages/patches/python-3.11-fix-tests.patch \
|
%D%/packages/patches/python-3.11-fix-tests.patch \
|
||||||
|
|
|
@ -181,6 +181,7 @@
|
||||||
#:use-module (gnu packages tree-sitter)
|
#:use-module (gnu packages tree-sitter)
|
||||||
#:use-module (gnu packages version-control)
|
#:use-module (gnu packages version-control)
|
||||||
#:use-module (gnu packages web)
|
#:use-module (gnu packages web)
|
||||||
|
#:use-module (gnu packages webkit)
|
||||||
#:use-module (gnu packages wxwidgets)
|
#:use-module (gnu packages wxwidgets)
|
||||||
#:use-module (gnu packages xdisorg)
|
#:use-module (gnu packages xdisorg)
|
||||||
#:use-module (gnu packages xiph)
|
#:use-module (gnu packages xiph)
|
||||||
|
@ -4616,7 +4617,7 @@ G-codes to binary and vice versa.")
|
||||||
(define-public prusa-slicer
|
(define-public prusa-slicer
|
||||||
(package
|
(package
|
||||||
(name "prusa-slicer")
|
(name "prusa-slicer")
|
||||||
(version "2.7.4")
|
(version "2.9.2")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
|
@ -4625,8 +4626,8 @@ G-codes to binary and vice versa.")
|
||||||
(url "https://github.com/prusa3d/PrusaSlicer")
|
(url "https://github.com/prusa3d/PrusaSlicer")
|
||||||
(commit (string-append "version_" version))))
|
(commit (string-append "version_" version))))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256 (base32 "0s1cfvhfilyv0y98asr61c6rwlgyr1hf5v5hg8q9zwmzm2bkcql3"))
|
(sha256 (base32 "05zwwhqv3fjg9rx6a4ga55f4ic1136f6lwms0kb4kaq50w9dvxwg"))
|
||||||
(patches (search-patches "prusa-slicer-fix-tests.patch"))
|
(patches (search-patches "prusa-slicer-add-cmake-module.patch"))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
`(begin
|
`(begin
|
||||||
|
@ -4634,25 +4635,40 @@ G-codes to binary and vice versa.")
|
||||||
;; Most of them contain prusa-specific modifications (e.g. avrdude),
|
;; Most of them contain prusa-specific modifications (e.g. avrdude),
|
||||||
;; but others do not. Here we replace the latter with Guix packages.
|
;; but others do not. Here we replace the latter with Guix packages.
|
||||||
;; Remove bundled libraries that were not modified by Prusa Slicer developers.
|
;; Remove bundled libraries that were not modified by Prusa Slicer developers.
|
||||||
(delete-file-recursively "src/hidapi")
|
(delete-file-recursively "bundled_deps/hidapi")
|
||||||
(delete-file-recursively "src/eigen")
|
(delete-file-recursively "bundled_deps/libigl/igl")
|
||||||
(delete-file-recursively "src/libigl/igl")
|
|
||||||
(substitute* "CMakeLists.txt"
|
(substitute* "CMakeLists.txt"
|
||||||
|
(("target_link_libraries\\(libexpat INTERFACE EXPAT::EXPAT\\)")
|
||||||
|
"")
|
||||||
(("add_library\\(libexpat INTERFACE\\)")
|
(("add_library\\(libexpat INTERFACE\\)")
|
||||||
""))
|
""))
|
||||||
(substitute* "src/libigl/CMakeLists.txt"
|
(substitute* "bundled_deps/CMakeLists.txt"
|
||||||
|
(("add_subdirectory\\(hidapi\\)")
|
||||||
|
""))
|
||||||
|
(substitute* "bundled_deps/libigl/CMakeLists.txt"
|
||||||
(("target_link_libraries\\(libigl INTERFACE igl::core\\)") ""))
|
(("target_link_libraries\\(libigl INTERFACE igl::core\\)") ""))
|
||||||
(substitute* "src/CMakeLists.txt"
|
(substitute* "src/CMakeLists.txt"
|
||||||
(("add_subdirectory\\(hidapi\\)")
|
(("add_subdirectory\\(hidapi\\)")
|
||||||
"pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
|
"pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
|
||||||
(("include_directories\\(hidapi/include\\)")
|
(("include_directories\\(hidapi/include\\)")
|
||||||
"include_directories()"))
|
"include_directories()")
|
||||||
|
(("add_library\\(libexpat INTERFACE\\)")
|
||||||
|
"")
|
||||||
|
(("target_link_libraries\\(libexpat INTERFACE EXPAT::EXPAT\\)")
|
||||||
|
"")
|
||||||
|
(("list\\(APPEND wxWidgets_LIBRARIES libexpat\\)")
|
||||||
|
"list(APPEND wxWidgets_LIBRARIES expat)"))
|
||||||
|
(substitute* "src/libslic3r/CMakeLists.txt"
|
||||||
|
(("libexpat")
|
||||||
|
"expat"))
|
||||||
(substitute* "src/slic3r/CMakeLists.txt"
|
(substitute* "src/slic3r/CMakeLists.txt"
|
||||||
(("add_library\\(libslic3r_gui.*" all)
|
(("add_library\\(libslic3r_gui.*" all)
|
||||||
(string-append
|
(string-append
|
||||||
|
"find_package(HidAPI REQUIRED)\n"
|
||||||
all
|
all
|
||||||
"\ntarget_include_directories(libslic3r_gui PUBLIC ${HIDAPI_INCLUDE_DIRS})\n"))
|
"\ntarget_include_directories(libslic3r_gui PUBLIC ${HIDAPI_INCLUDE_DIR})\n"))
|
||||||
(("\\bhidapi\\b") "${HIDAPI_LIBRARIES}"))))))
|
((" hidapi")
|
||||||
|
" ${HIDAPI_LIBRARY}"))))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:configure-flags
|
(list #:configure-flags
|
||||||
|
@ -4674,7 +4690,7 @@ G-codes to binary and vice versa.")
|
||||||
(("#include <libigl/igl/qslim.h>")
|
(("#include <libigl/igl/qslim.h>")
|
||||||
"#include <igl/qslim.h>")))))))
|
"#include <igl/qslim.h>")))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list pkg-config catch2))
|
(list pkg-config catch2-3.8))
|
||||||
(inputs
|
(inputs
|
||||||
(list boost
|
(list boost
|
||||||
cereal
|
cereal
|
||||||
|
@ -4698,7 +4714,8 @@ G-codes to binary and vice versa.")
|
||||||
mpfr
|
mpfr
|
||||||
nanosvg
|
nanosvg
|
||||||
nlopt
|
nlopt
|
||||||
opencascade-occt
|
opencascade-occt-7.6.1
|
||||||
|
openssl
|
||||||
openvdb
|
openvdb
|
||||||
pango
|
pango
|
||||||
prusa-libbgcode
|
prusa-libbgcode
|
||||||
|
@ -4707,11 +4724,18 @@ G-codes to binary and vice versa.")
|
||||||
prusa-wxwidgets
|
prusa-wxwidgets
|
||||||
qhull
|
qhull
|
||||||
tbb
|
tbb
|
||||||
|
webkitgtk-for-gtk3
|
||||||
|
webkitgtk-with-libsoup2
|
||||||
|
z3
|
||||||
zlib))
|
zlib))
|
||||||
(home-page "https://www.prusa3d.com/prusaslicer/")
|
(home-page "https://www.prusa3d.com/prusaslicer/")
|
||||||
(synopsis "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)")
|
(synopsis "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)")
|
||||||
(description "PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into
|
(description "PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts
|
||||||
G-code instructions for FFF printers or PNG layers for mSLA 3D printers.")
|
them into G-code instructions for FFF printers or PNG layers for mSLA 3D
|
||||||
|
printers. It is compatible with any modern printer based on the RepRap
|
||||||
|
toolchain, including all those based on the Marlin, Prusa, Sprinter and
|
||||||
|
Repetier firmware. It also works with Mach3, LinuxCNC and Machinekit
|
||||||
|
controllers.")
|
||||||
(license license:agpl3)
|
(license license:agpl3)
|
||||||
|
|
||||||
;; Mark as tunable to take advantage of SIMD code in Eigen and in libigl.
|
;; Mark as tunable to take advantage of SIMD code in Eigen and in libigl.
|
||||||
|
|
49
gnu/packages/patches/prusa-slicer-add-cmake-module.patch
Normal file
49
gnu/packages/patches/prusa-slicer-add-cmake-module.patch
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
From 23f1b40dbf6223b4b8af3845efe64b076998b2d7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: nomike <nomike@nomike.com>
|
||||||
|
Date: Sat, 12 Jul 2025 03:14:16 +0200
|
||||||
|
Subject: [PATCH] Add CMake module for finding HidAPI library
|
||||||
|
|
||||||
|
---
|
||||||
|
cmake/modules/FindHidAPI.cmake | 30 ++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 30 insertions(+)
|
||||||
|
create mode 100644 cmake/modules/FindHidAPI.cmake
|
||||||
|
|
||||||
|
diff --git a/cmake/modules/FindHidAPI.cmake b/cmake/modules/FindHidAPI.cmake
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000..0fdcecf88
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/cmake/modules/FindHidAPI.cmake
|
||||||
|
@@ -0,0 +1,30 @@
|
||||||
|
+find_package(PkgConfig)
|
||||||
|
+pkg_search_module(PC_HIDAPI QUIET hidapi hidapi-libusb)
|
||||||
|
+
|
||||||
|
+find_path(HIDAPI_INCLUDE_DIR NAMES hidapi.h
|
||||||
|
+ HINTS
|
||||||
|
+ ${PC_HIDAPI_INCLUDEDIR}
|
||||||
|
+ ${PC_HIDAPI_INCLUDE_DIRS})
|
||||||
|
+
|
||||||
|
+find_library(HIDAPI_LIBRARY NAMES hidapi hidapi-libusb
|
||||||
|
+ HINTS
|
||||||
|
+ ${PC_HIDAPI_LIBDIR}
|
||||||
|
+ ${PC_HIDAPI_LIBRARY_DIRS})
|
||||||
|
+
|
||||||
|
+if(HIDAPI_INCLUDE_DIR AND EXISTS "${HIDAPI_INCLUDE_DIR}/hidapi.h")
|
||||||
|
+ file(STRINGS "${HIDAPI_INCLUDE_DIR}/hidapi.h" hidapi_version_major
|
||||||
|
+ REGEX "^#define[\t ]+HID_API_VERSION_MAJOR[\t ]+[0-9]+")
|
||||||
|
+ file(STRINGS "${HIDAPI_INCLUDE_DIR}/hidapi.h" hidapi_version_minor
|
||||||
|
+ REGEX "^#define[\t ]+HID_API_VERSION_MINOR[\t ]+[0-9]+")
|
||||||
|
+ file(STRINGS "${HIDAPI_INCLUDE_DIR}/hidapi.h" hidapi_version_patch
|
||||||
|
+ REGEX "^#define[\t ]+HID_API_VERSION_PATCH[\t ]+[0-9]+")
|
||||||
|
+ string(REGEX REPLACE "[^0-9.]" "" HIDAPI_VERSION_STRING "${hidapi_version_major}.${hidapi_version_minor}.${hidapi_version_patch}")
|
||||||
|
+ unset(hidapi_version_major)
|
||||||
|
+ unset(hidapi_version_minor)
|
||||||
|
+ unset(hidapi_version_patch)
|
||||||
|
+endif()
|
||||||
|
+
|
||||||
|
+include(FindPackageHandleStandardArgs)
|
||||||
|
+find_package_handle_standard_args(HidAPI REQUIRED_VARS HIDAPI_LIBRARY HIDAPI_INCLUDE_DIR)
|
||||||
|
+
|
||||||
|
+mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)
|
||||||
|
--
|
||||||
|
2.50.0
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
This patch comes from Gentoo:
|
|
||||||
portage/media-gfx/prusaslicer/files/prusaslicer-2.5.0_rc1-fix-tests.patch
|
|
||||||
|
|
||||||
--- a/tests/fff_print/test_data.cpp
|
|
||||||
+++ b/tests/fff_print/test_data.cpp
|
|
||||||
@@ -4,10 +4,9 @@
|
|
||||||
#include "libslic3r/GCodeReader.hpp"
|
|
||||||
#include "libslic3r/Config.hpp"
|
|
||||||
#include "libslic3r/Print.hpp"
|
|
||||||
-#include "libslic3r/Format/OBJ.hpp"
|
|
||||||
-#include "libslic3r/Format/STL.hpp"
|
|
||||||
|
|
||||||
#include <cstdlib>
|
|
||||||
+#include <fstream>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include <boost/nowide/cstdio.hpp>
|
|
Loading…
Add table
Add a link
Reference in a new issue