[PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4.

  • Done
  • quality assurance status badge
Details
3 participants
  • Maxim Cournoyer
  • Artyom V. Poptsov
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Artyom V. Poptsov
Severity
normal
A
A
Artyom V. Poptsov wrote on 11 May 19:56 +0200
(address . guix-patches@gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
cover.1715450052.git.poptsov.artyom@gmail.com
This patch set updates PrusaSlicer to 2.7.4.

Artyom V. Poptsov (8):
gnu: cgal: Update to 5.6.1.
gnu: glfw: Update to 3.3.10.
gnu: glfw-3.4: New variable.
gnu: libigl: Update to 2.4.0.
gnu: heatshrink: New variable.
gnu: Add prusa-libbgcode.
gnu: Add prusa-wxwidgets.
gnu: prusa-slicer: Update to 2.7.4.

gnu/local.mk | 3 +-
gnu/packages/compression.scm | 54 +++
gnu/packages/engineering.scm | 360 +++++++++++++-----
gnu/packages/gl.scm | 20 +-
gnu/packages/graphics.scm | 6 +-
.../patches/heatshrink-add-cmake.patch | 111 ++++++
.../patches/prusa-slicer-boost-fixes.patch | 97 -----
.../prusa-slicer-with-cereal-1.3.1.patch | 52 ---
8 files changed, 450 insertions(+), 253 deletions(-)
create mode 100644 gnu/packages/patches/heatshrink-add-cmake.patch
delete mode 100644 gnu/packages/patches/prusa-slicer-boost-fixes.patch
delete mode 100644 gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch


base-commit: 014875b29e68da6357a5323e6dd1eaa74a05b753
--
2.41.0
A
A
Artyom V. Poptsov wrote on 11 May 19:58 +0200
[PATCH 1/8] gnu: cgal: Update to 5.6.1.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
d289abaf73fd2b65dcaf004f0361415a4bb1c220.1715450052.git.poptsov.artyom@gmail.com
* gnu/packages/graphics.scm (cgal): Update to 5.6.1.

Change-Id: Id909fc7be5d421496e6a3cd87d366f437f76bcfa
---
gnu/packages/graphics.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index ca2d74224f..cfd908be68 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -36,7 +36,7 @@
;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2023 David Thompson <dthompson2@worcester.edu>
;;; Copyright © 2023 Eric Bavier <bavier@posteo.net>
-;;; Copyright © 2023 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2023, 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -775,7 +775,7 @@ (define-public openshadinglanguage
(define-public cgal
(package
(name "cgal")
- (version "5.2.2")
+ (version "5.6.1")
(source (origin
(method url-fetch)
(uri (string-append
@@ -783,7 +783,7 @@ (define-public cgal
"/CGAL-" version ".tar.xz"))
(sha256
(base32
- "0yjzq12ivizp23y7zqm30x20psv9gzwbcdrhyd3f7h0ds94m1c40"))))
+ "0dsqvnyd2ic50pr28gfz34bpnyx3i2csf1rikmc661hywdz5xcfd"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
--
2.41.0
A
A
Artyom V. Poptsov wrote on 11 May 19:58 +0200
[PATCH 2/8] gnu: glfw: Update to 3.3.10.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
e480221487fca758c6081cf068c83513930021a5.1715450052.git.poptsov.artyom@gmail.com
* gnu/packages/gl.scm (glfw): Update to 3.3.10.

Change-Id: I9d789fb74af4ed649102195891adc5e437883d30
---
gnu/packages/gl.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 2100bb4872..f40ddaeb86 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -924,7 +925,7 @@ (define-public soil
(define-public glfw
(package
(name "glfw")
- (version "3.3.9")
+ (version "3.3.10")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/glfw/glfw"
@@ -932,7 +933,7 @@ (define-public glfw
"/glfw-" version ".zip"))
(sha256
(base32
- "023dn97n4h14n5lbjpzjv0y6a2plj254c0w3rr3wraf3z08189jm"))))
+ "1f5xs4cj1y5wk1jimv1mylk6n6vh7433js28mfd1kf7p2zw3whz8"))))
(build-system cmake-build-system)
(arguments
(list
--
2.41.0
A
A
Artyom V. Poptsov wrote on 11 May 19:58 +0200
[PATCH 3/8] gnu: glfw-3.4: New variable.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
5bea79f76507d2150d32cd58c7369671ab35f8e7.1715450052.git.poptsov.artyom@gmail.com
* gnu/packages/gl.scm (glfw-3.4): New variable.

Change-Id: I77f2214c78f35455436897a3fbff083331295314
---
gnu/packages/gl.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Toggle diff (28 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index f40ddaeb86..2d684e9c80 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -995,6 +995,21 @@ (define-public glfw
and surfaces, receiving input and events.")
(license license:zlib)))
+(define-public glfw-3.4
+ (package
+ (inherit glfw)
+ (version "3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/glfw/glfw"
+ "/releases/download/" version
+ "/glfw-" version ".zip"))
+ (sha256
+ (base32
+ "1sd396kkn53myp61kxrd18h7b1q4ix173hhxhvl0iz8j4x5h1v5m"))))
+ (inputs (modify-inputs (package-inputs glfw)
+ (prepend pkg-config)))))
+
(define-public nanovg-for-extempore
(let ((version "0.7.1")
(revision "0")
--
2.41.0
A
A
Artyom V. Poptsov wrote on 11 May 19:58 +0200
[PATCH 4/8] gnu: libigl: Update to 2.4.0.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
78bd2eeee639dd0d324266dadb6d982405ab6242.1715450052.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (libigl): Update to 2.4.0.
[arguments]: Use Gexps. Update configure flags. Disable GLFW tests as they
are failing with SEGFAULT errors (see
Update "unpack-external" phase: add new dependencies.
Update "patch-cmake" phase to prevent CMake from trying to download external
dependencies. Help CMake to find the package inputs.
Add "fix-assertions" and "install-copyleft-modules" phase.
[native-inputs]: Add catch2.
[inputs]: Use glfw-3.4. Add openblas, imgui and spectra. Add libigl
packages and imguizmo. Remove catch2.

Change-Id: Ib4ac842dc14fe1cbc6b0b87674bae1f261a1a970
---
gnu/packages/engineering.scm | 258 ++++++++++++++++++++++++-----------
1 file changed, 179 insertions(+), 79 deletions(-)

Toggle diff (336 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 4e30772296..1a0b136952 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -33,7 +33,7 @@
;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;; Copyright © 2022 Konstantinos Agiannis <agiannis.kon@gmail.com>
;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
-;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022-2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022, 2023 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2023 Theofilos Pechlivanis <theofilos.pechlivanis@gmail.com>
@@ -161,6 +161,7 @@ (define-module (gnu packages engineering)
#:use-module (gnu packages text-editors)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages toolkits)
#:use-module (gnu packages tree-sitter)
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
@@ -3531,7 +3532,7 @@ (define-public xfoil
(define-public libigl
(package
(name "libigl")
- (version "2.3.0")
+ (version "2.4.0")
(source
(origin
(method git-fetch)
@@ -3541,90 +3542,151 @@ (define-public libigl
(file-name (git-file-name name version))
(sha256
(base32
- "004a22ifq2vibgkgvrlyihqimpsfizvq5l448204kwfg3lkycajj"))))
+ "0qlnpp8nxbahcky4d67dzn0ynbv3v037nbx1akq6h5rzhvkzq40x"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
- '("-DLIBIGL_USE_STATIC_LIBRARY=OFF"
- "-DLIBIGL_BUILD_TESTS=ON"
- "-DLIBIGL_BUILD_TUTORIALS=OFF"
- "-DLIBIGL_EXPORT_TARGETS=ON"
- ;; The following options disable tests for the corresponding libraries.
- ;; The options do not affect whether the libraries are linked to
- ;; libigl or not, they are used for tests.
- "-DLIBIGL_WITH_COMISO=OFF"
- "-DLIBIGL_WITH_CORK=OFF"
- "-DLIBIGL_WITH_MATLAB=OFF"
- "-DLIBIGL_WITH_MOSEK=OFF"
- "-DLIBIGL_WITH_TRIANGLE=OFF" ;; Undefined reference to "triangulate".
- "-DLIBIGL_WITH_OPENGL_GLFW_IMGUI=OFF")
+ (list #:configure-flags
+ #~(list "-DLIBIGL_USE_STATIC_LIBRARY=OFF"
+ "-DLIBIGL_BUILD_TESTS=ON"
+ "-DLIBIGL_BUILD_TUTORIALS=OFF"
+ "-DLIBIGL_INSTALL=ON"
+ "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
+ (format #f "-DCatch2_DIR=~a/lib/cmake/catch2/"
+ #$(this-package-input "catch2"))
+ (format #f "-DSpectra_DIR=~a/share/pectra/cmake/"
+ #$(this-package-input "spectra"))
+ ;; The following options disable tests for the corresponding libraries.
+ ;; The options do not affect whether the libraries are linked to
+ ;; libigl or not, they are used for tests.
+ "-DLIBIGL_WITH_COMISO=OFF"
+ "-DLIBIGL_WITH_CORK=OFF"
+ "-DLIBIGL_MATLAB=OFF"
+ "-DLIBIGL_MOSEK=OFF"
+ ;; XXX: GLFW tests are failing with SEGFAULT. See
+ ;; <https://github.com/libigl/libigl/issues/2313>
+ "-DLIBIGL_GLFW_TESTS=OFF")
+ #:build-type "Release"
#:phases
- (modify-phases %standard-phases
+ #~(modify-phases %standard-phases
(add-after 'unpack 'unpack-external
(lambda _
(setenv "HOME" (getcwd)) ;; cmake needs this to export modules
(mkdir "external")
(copy-recursively (assoc-ref %build-inputs "libigl-glad") "external/glad")
- (copy-recursively (assoc-ref %build-inputs "libigl-stb") "external/stb")
+ (copy-recursively (assoc-ref %build-inputs "libigl-test-data") "external/test-data")
+ (copy-recursively (assoc-ref %build-inputs "libigl-comiso") "external/comiso")
(copy-recursively (assoc-ref %build-inputs "libigl-tetgen") "external/tetgen")
- (copy-recursively (assoc-ref %build-inputs "libigl-predicates") "external/predicates")))
+ (copy-recursively (assoc-ref %build-inputs "libigl-predicates") "external/predicates")
+ (copy-recursively (assoc-ref %build-inputs "imguizmo") "external/imguizmo")
+ (copy-recursively (assoc-ref %build-inputs "eigen") "external/eigen")))
(add-after 'unpack-external 'patch-cmake
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (source-dir library-name)
+ (format #f "SOURCE_DIR \"~a\""
+ (assoc-ref %build-inputs library-name)))
+ (define (fix-external-library cmake source)
+ (substitute* (format #f "cmake/recipes/external/~a.cmake"
+ cmake)
+ (("GIT_REPOSITORY.*") (source-dir source))
+ (("GIT_TAG.*") "")))
;; Fix references to external libraries
- (substitute* "cmake/libigl.cmake"
- (("if\\(NOT TARGET Eigen3::Eigen\\)" all)
- (string-append "find_package(Eigen3 CONFIG REQUIRED)\n" all))
- (("if\\(NOT TARGET CGAL::CGAL\\)" all)
- (string-append "find_package(CGAL CONFIG COMPONENTS Core)\n" all))
- (("if\\(NOT TARGET tinyxml2\\)" all)
- (string-append "find_package(tinyxml2 CONFIG REQUIRED)\n"
- "if (NOT TARGET tinyxml2::tinyxml2)"))
- (("if\\(NOT TARGET embree\\)" all)
- (string-append "find_package(embree 3 CONFIG REQUIRED)\n" all))
- (("if\\(NOT TARGET glfw\\)" all)
- (string-append "find_package(glfw3 CONFIG REQUIRED)\n" all))
- (("igl_download_glad\\(\\)" all) "")
- (("igl_download_stb\\(\\)" all) "")
- (("igl_download_tetgen\\(\\)" all) "")
- (("igl_download_triangle\\(\\)" all) "")
- (("igl_download_predicates\\(\\)" all) ""))
- (substitute* "tests/CMakeLists.txt"
- (("igl_download_test_data\\(\\)") "")
- (("set\\(IGL_TEST_DATA.*")
- (format #f "set(IGL_TEST_DATA ~a)\n"
- (assoc-ref %build-inputs "libigl-test-data")))
- (("igl_download_catch2\\(\\)") "find_package(Catch2 CONFIG REQUIRED)")
- (("list\\(APPEND CMAKE_MODULE_PATH \\$\\{LIBIGL_EXTERNAL\\}/catch2/contrib\\)")
- "")
- (("add_subdirectory\\(\\$\\{LIBIGL_EXTERNAL\\}/catch2 catch2\\)") ""))
- ;; Install otherwise missing headers
- (substitute* "cmake/libigl.cmake"
- (("install_dir_files\\(copyleft\\)" all)
- (string-join (list all
- "install_dir_files(copyleft/cgal)"
- "install_dir_files(copyleft/opengl)"
- "install_dir_files(copyleft/tetgen)"
- "install_dir_files(embree)"
- "install_dir_files(opengl)"
- "install_dir_files(png)"
- "install_dir_files(predicates)"
- "install_dir_files(xml)")
- "\n"))))))))
+ (fix-external-library "comiso" "libigl-comiso")
+ (fix-external-library "tetgen" "libigl-tetgen")
+ (fix-external-library "triangle" "libigl-triangle")
+ (fix-external-library "predicates" "libigl-predicates")
+ (fix-external-library "glad" "libigl-glad")
+ (fix-external-library "libigl_tests_data" "libigl-test-data")
+ (fix-external-library "stb" "libigl-stb")
+ (substitute* "cmake/recipes/external/imguizmo.cmake"
+ (("if\\(TARGET imguizmo::imguizmo\\)")
+ "if(true)")
+ (("target_link_libraries.*")
+ (format #f "include_directories(~a/include/imgui/)"
+ (assoc-ref inputs "imgui"))))
+
+ (substitute* "cmake/igl/igl_add_test.cmake"
+ (("include\\(\".*/contrib/Catch.cmake\"\\)")
+ (format #f
+ "include(\"~a/lib/cmake/Catch2/Catch.cmake\")"
+ (assoc-ref inputs "catch2"))))
+ (substitute* "cmake/recipes/external/cgal.cmake"
+ (("FetchContent_Populate\\(cgal\\)")
+ "find_package(CGAL CONFIG COMPONENTS Core)\nreturn()"))
+ (substitute* "cmake/recipes/external/eigen.cmake"
+ (("FetchContent_Populate\\(eigen\\)")
+ "find_package(Eigen3 CONFIG REQUIRED)\nreturn()"))
+ (substitute* "cmake/recipes/external/catch2.cmake"
+ (("message.*")
+ "find_package(Catch2 CONFIG)\nreturn()"))
+ (substitute* "cmake/recipes/external/libigl_imgui_fonts.cmake"
+ (("if\\(TARGET igl::imgui_fonts\\)")
+ "if(true)"))
+ (substitute* "cmake/recipes/external/tinyxml2.cmake"
+ (("FetchContent_Populate\\(tinyxml2\\)")
+ "find_package(tinyxml2 CONFIG REQUIRED)\nreturn()"))
+ (substitute* "cmake/recipes/external/embree.cmake"
+ (("FetchContent_MakeAvailable\\(embree\\)")
+ (string-join (list "find_package(Embree 3 CONFIG)"
+ "add_library(embree::embree ALIAS embree)"
+ "return()")
+ "\n")))
+ (substitute* "cmake/recipes/external/glfw.cmake"
+ (("FetchContent_MakeAvailable\\(glfw\\)")
+ (string-join
+ (list "find_package(glfw3 CONFIG REQUIRED)"
+ "add_library(glfw::glfw ALIAS glfw)"
+ "return()")
+ "\n")))
+ (substitute* "cmake/recipes/external/imgui.cmake"
+ (("FetchContent_MakeAvailable\\(imgui\\)")
+ "return()"))))
+
+ (add-after 'unpack-external 'fix-assertions
+ (lambda _
+ ;; Current Tetgen version has a bug.
+ (substitute* "include/igl/copyleft/tetgen/tetgenio_to_tetmesh.cpp"
+ (("assert\\(out.numberofpoints == out.numberofpointmarkers\\);")
+ ";"))
+ ;; CGAL has a bug in assertion as well.
+ (substitute* "include/igl/copyleft/cgal/trim_with_solid.cpp"
+ (("assert\\(I.size\\(\\) == Vr.rows\\(\\)\\);")
+ ";"))))
+
+ ;; XXX: Install modules as CMake fails to install them.
+ (add-after 'install 'install-includes
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (include-dir (string-append out "/include/igl/")))
+ (for-each (lambda (module)
+ (copy-recursively (format #f "../source/include/igl/~a"
+ module)
+ (format #f "~a/~a" include-dir module)))
+ (list "copyleft/cgal"
+ "copyleft/opengl2"
+ "copyleft/tetgen"
+ "embree"
+ "opengl"
+ "predicates"
+ "xml"))))))))
+
+ (native-inputs (list catch2))
;; XXX: Inputs are currently only used to build tests.
;; We would need to patch the CMake recipe to build a shared library
;; with all of these.
(inputs
`(("boost" ,boost)
- ("catch2" ,catch2)
("cgal" ,cgal)
("eigen" ,eigen)
("embree" ,embree)
- ("glfw" ,glfw)
+ ("glfw" ,glfw-3.4)
("gmp" ,gmp)
("mesa" ,mesa)
("mpfr" ,mpfr)
("tbb" ,tbb)
("tinyxml2" ,tinyxml2)
+ ("openblas" ,openblas)
+ ("imgui" ,imgui)
+ ("spectra" ,spectra)
;; When updating this package, update commit fields below according to
;; the hashes listed in "cmake/LibiglDownloadExternal.cmake".
("libigl-test-data"
@@ -3636,13 +3698,16 @@ (define-public libigl
(file-name (git-file-name "libigl-test-data" version))
(sha256 (base32 "1wxglrxw74xw4a4jmmjpm8719f3mnlbxbwygjb4ddfixxxyya4i2"))))
("libigl-glad"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/libigl/libigl-glad")
- (commit "09b4969c56779f7ddf8e6176ec1873184aec890f")))
- (file-name (git-file-name "libigl-glad" version))
- (sha256 (base32 "0rwrs7513ylp6gxv7crjzflapcg9p7x04nzfvywgl665vl53rawk"))))
+ ,(let* ((commit "ead2d21fd1d9f566d8f9a9ce99ddf85829258c7a")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/libigl-glad")
+ (commit commit)))
+ (file-name (git-file-name "libigl-glad" version))
+ (sha256 (base32 "079fd5yrbd713nq7slhhgq79wns85pc564ydlkjl9gf43d3220ay")))))
("libigl-stb"
,(origin
(method git-fetch)
@@ -3652,22 +3717,57 @@ (define-public libigl
(file-name (git-file-name "libigl-stb" version))
(sha256 (base32 "0wwlb370z40y63ic3ny6q7lxibhixg2k1pjdkl4ymzv79zld28kj"))))
("libigl-predicates"
+ ,(let* ((commit "50c2149e7a520d13cd10e9aeff698bd68edd5a4f")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/libigl-predicates.git")
+ (commit commit)))
+ (file-name (git-file-name "libigl-predicates" version))
+ (sha256 (base32 "0yiqhzry2qhb1p0v9sldlnpqsn4y8cln8r6y08lafkc9kc4qy8jz")))))
+ ;; TODO: Package tetgen separately from <http://www.tetgen.org>
+ ("libigl-tetgen"
+ ,(let* ((commit "4f3bfba3997f20aa1f96cfaff604313a8c2c85b6")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/tetgen.git")
+ (commit commit)))
+ (file-name (git-file-name "libigl-tetgen" version))
+ (sha256 (base32 "1k724syssw37py7kwmibk3sfwkkgyjyy7qkijnhn6rjm91g8qxsg")))))
+ ("libigl-comiso"
+ ,(let* ((commit "562efe333edc8e649dc101469614f43378b1eb55")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/comiso.git")
+ (commit commit)))
+ (file-name (git-file-name "libigl-comiso" version))
+ (sha256 (base32 "048zryh9ydd1dqwzs14vj7r3fd6yyq6n4zl6d1b0yb1iwrqfy6ba")))))
+ ("libigl-triangle"
,(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/libigl/libigl-predicates.git")
- (commit "488242fa2b1f98a9c5bd1441297fb4a99a6a9ae4")))
- (file-name (git-file-name "libigl-predicates" version))
- (sha256 (base32 "13bd98g8lgcq37i3crj66433z09grnb2xjrcqpwqmyn147rp5wyh"))))
- ;; TODO: Package tetgen separately from <http://www.tetgen.org>
- ("libigl-tetgen"
+ (url "https://github.com/libigl/triangle.git")
+ (commit "6bbd92c7ddd6c803c403e005e1132eadb38fbe68")))
+ (file-name (git-file-name "libigl-triangle" version))
+ (sha256 (base32 "0d35mfqwdk99xn1lpjzz9w5axq016r6xy5vr00lb4mvb05limxl3"))))
+ ;; XXX: This is a source-only library which is currently required only for
+ ;; libigl.
+ ("imguizmo"
,(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/libigl/tetgen.git")
- (commit "4f3bfba3997f20aa1f96cfaff604313a8c2c85b6")))
- (file-name (git-file-name "libigl-tetgen" version))
- (sha256 (base32 "1k724syssw37py7kwmibk3sfwkkgyjyy7qkijnhn6rjm91g8qxsg"))))))
+ (url "https://github.com/CedricGuillemet/ImGuizmo")
+ (commit "1.83")))
+ (file-name (git-file-name "imguizmo" version))
+ (sha256 (base32 "14ywf96nvxf5c081pwypyzjwx9vyq78glbzinc81558v1sxiy2v0"))))))
(home-page "https://libigl.github.io/")
(synopsis "Simple C++ geometry processing library")
(description "This library provides functionality for shape modelling,
--
2.41.0
A
A
Artyom V. Poptsov wrote on 11 May 19:58 +0200
[PATCH 6/8] gnu: Add prusa-libbgcode.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
15e75ed6a8a2c035194ca4ee66c0fb48b04a48d7.1715450052.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (prusa-libbgcode): New variable.

Change-Id: I1f18c399d0fe36987c613ce4c0c3845c803beb45
---
gnu/packages/engineering.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 1a0b136952..b1776484b5 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3774,6 +3774,30 @@ (define-public libigl
visualization, matrix manipulation.")
(license (list license:gpl3 license:mpl2.0))))
+(define-public prusa-libbgcode
+ (let ((commit "8ae75bd0eea622f0e34cae311b3bd065b55eae9b")
+ (revision "0"))
+ (package
+ (name "prusa-libbgcode")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/prusa3d/libbgcode")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256 (base32 "0fjx2ijz9zqpqs486lcrrrhqvmfzrpb8j6v57l0jiynavwv3kznw"))))
+ (native-inputs (list catch2))
+ (propagated-inputs
+ (list zlib boost heatshrink))
+ (build-system cmake-build-system)
+ (home-page "https://github.com/prusa3d/libbgcode")
+ (synopsis "Prusa Block & Binary G-code reader/writer/converter")
+ (description
+ "Prusa Block & Binary G-code reader/writer/converter.")
+ (license license:agpl3))))
+
(define-public prusa-slicer
(package
(name "prusa-slicer")
--
2.41.0
A
A
Artyom V. Poptsov wrote on 11 May 19:58 +0200
[PATCH 5/8] gnu: heatshrink: New variable.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
5ed96653a085765c79a2bf6b0150ddab179339f9.1715450052.git.poptsov.artyom@gmail.com
* gnu/packages/compression.scm (heatshrink): New variable.
* gnu/packages/patches/heatshrink-add-cmake.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add "heatshrink-add-cmake.patch".

Change-Id: I0beccdcaed22e47ac6bfe522497e0759a315813d
---
gnu/local.mk | 1 +
gnu/packages/compression.scm | 54 +++++++++
.../patches/heatshrink-add-cmake.patch | 111 ++++++++++++++++++
3 files changed, 166 insertions(+)
create mode 100644 gnu/packages/patches/heatshrink-add-cmake.patch

Toggle diff (203 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index edd546f81d..3ba9253ae2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1455,6 +1455,7 @@ dist_patch_DATA = \
%D%/packages/patches/hdf-eos5-remove-gctp.patch \
%D%/packages/patches/hdf-eos5-fix-szip.patch \
%D%/packages/patches/hdf-eos5-fortrantests.patch \
+ %D%/packages/patches/heatshrink-add-cmake.patch \
%D%/packages/patches/heimdal-CVE-2022-45142.patch \
%D%/packages/patches/helm-fix-gcc-9-build.patch \
%D%/packages/patches/highlight-gui-data-dir.patch \
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 55784a70de..187bc73f2f 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -39,6 +39,7 @@
;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2024 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -570,6 +571,59 @@ (define-public xz
(license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
(home-page "https://tukaani.org/xz/")))
+(define-public heatshrink
+ (package
+ (name "heatshrink")
+ (version "0.4.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/atomicobject/heatshrink/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0sdhvk27yz8kahw18j8pddbpkgl78v8rh8fx6wspc3acj7w7yvrn"))
+ ;; Add CMake build script, wanted by prusa-slicer and libbgcode, which are the
+ ;; only users of this library.
+ ;;
+ ;; See
+ ;; <https://github.com/NixOS/nixpkgs/pull/269758/commits/fa36136ceed0e2c58e0c9e21492a7e60c3a64470>
+ (patches (search-patches "heatshrink-add-cmake.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ ;; XXX: No tests available with CMake.
+ ;; See <https://github.com/atomicobject/heatshrink/pull/77>
+ #:tests? #f))
+ (home-page "https://github.com/atomicobject/heatshrink/")
+ (synopsis "Data compression library for embedded/real-time systems")
+ (description
+ "A data compression/decompression library for embedded/real-time systems.
+
+Key features:
+@itemize
+@item Low memory usage (as low as 50 bytes.)
+
+It is useful for some cases with less than 50 bytes, and useful for many general
+cases with < 300 bytes.
+
+@item Incremental, bounded CPU use.
+
+You can chew on input data in arbitrarily tiny bites. This is a useful property in
+hard real-time environments.
+
+@item Can use either static or dynamic memory allocation.
+
+The library doesn't impose any constraints on memory management.
+
+@item ISC license.
+
+You can use it freely, even for commercial purposes.
+@end itemize
+")
+ (license license:isc)))
+
(define-public lhasa
(package
(name "lhasa")
diff --git a/gnu/packages/patches/heatshrink-add-cmake.patch b/gnu/packages/patches/heatshrink-add-cmake.patch
new file mode 100644
index 0000000000..f67f87126e
--- /dev/null
+++ b/gnu/packages/patches/heatshrink-add-cmake.patch
@@ -0,0 +1,111 @@
+From 0886e9ca76552b8e325841e2b820b4563e5d5aba Mon Sep 17 00:00:00 2001
+From: tamasmeszaros <meszaros.q@gmail.com>
+Date: Thu, 27 Jul 2023 23:11:25 +0200
+Subject: [PATCH] Add CMake build script
+
+---
+ CMakeLists.txt | 82 +++++++++++++++++++++++++++++++++++++++++++++++++
+ Config.cmake.in | 5 +++
+ 2 files changed, 87 insertions(+)
+ create mode 100644 CMakeLists.txt
+ create mode 100644 Config.cmake.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..5b840eb
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,82 @@
++cmake_minimum_required(VERSION 3.10)
++
++project(heatshrink C)
++
++add_library(${PROJECT_NAME} heatshrink_decoder.c heatshrink_encoder.c)
++add_library(${PROJECT_NAME}_dynalloc heatshrink_decoder.c heatshrink_encoder.c)
++
++find_library(MATH_LIBRARY m) # Business as usual
++if(MATH_LIBRARY)
++ target_link_libraries(${PROJECT_NAME} PUBLIC ${MATH_LIBRARY})
++endif()
++
++target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
++target_include_directories(${PROJECT_NAME}_dynalloc PUBLIC $<INSTALL_INTERFACE:include>)
++
++target_compile_definitions(${PROJECT_NAME} PUBLIC HEATSHRINK_DYNAMIC_ALLOC=0)
++target_compile_definitions(${PROJECT_NAME}_dynalloc PUBLIC HEATSHRINK_DYNAMIC_ALLOC=1)
++
++if (UNIX)
++ add_executable(${PROJECT_NAME}_cmd heatshrink.c)
++ target_link_libraries(${PROJECT_NAME}_cmd ${PROJECT_NAME}_dynalloc)
++ set_target_properties(${PROJECT_NAME}_cmd PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
++endif ()
++
++# Installation and export:
++
++include(CMakePackageConfigHelpers)
++
++write_basic_package_version_file(
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
++ VERSION 0.4.1
++ COMPATIBILITY AnyNewerVersion
++)
++
++set(_exported_targets ${PROJECT_NAME} ${PROJECT_NAME}_dynalloc)
++if (UNIX)
++ list(APPEND _exported_targets ${PROJECT_NAME}_cmd)
++endif ()
++
++install(TARGETS ${_exported_targets}
++ EXPORT ${PROJECT_NAME}Targets
++)
++
++export(EXPORT ${PROJECT_NAME}Targets
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake"
++ NAMESPACE ${PROJECT_NAME}::
++)
++
++include(GNUInstallDirs)
++set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
++
++configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
++ INSTALL_DESTINATION ${ConfigPackageLocation}
++)
++
++install(
++ FILES
++ heatshrink_common.h
++ heatshrink_config.h
++ heatshrink_encoder.h
++ heatshrink_decoder.h
++ DESTINATION
++ include/${PROJECT_NAME}
++ )
++
++install(EXPORT ${PROJECT_NAME}Targets
++ FILE
++ ${PROJECT_NAME}Targets.cmake
++ NAMESPACE
++ ${PROJECT_NAME}::
++ DESTINATION
++ ${ConfigPackageLocation}
++)
++
++install(
++ FILES
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
++ DESTINATION
++ ${ConfigPackageLocation}
++)
+diff --git a/Config.cmake.in b/Config.cmake.in
+new file mode 100644
+index 0000000..0809ba9
+--- /dev/null
++++ b/Config.cmake.in
+@@ -0,0 +1,5 @@
++@PACKAGE_INIT@
++
++if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake)
++ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
++endif ()
--
2.41.0
A
A
Artyom V. Poptsov wrote on 11 May 19:58 +0200
[PATCH 7/8] gnu: Add prusa-wxwidgets.
(address . 70880@debbugs.gnu.org)
d2803cabcda81abae01a97c4c28edb04fa938be9.1715450052.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (prusa-wxwidgets): New variable.

Co-authored-by: Nikita Domnitskii <nikita@domnitskii.me>
Change-Id: I9043c2acc95986275ee24d9c5d944e5fe2702e99
---
gnu/packages/engineering.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b1776484b5..08ff06fa94 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3798,6 +3798,33 @@ (define-public prusa-libbgcode
"Prusa Block & Binary G-code reader/writer/converter.")
(license license:agpl3))))
+(define-public prusa-wxwidgets
+ ;; There is no tag/release, all patches are in separate branch.
+ (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26"))
+ (package
+ (inherit wxwidgets)
+ (name "prusa-wxwidgets")
+ (version "3.2.0")
+ (home-page "https://github.com/prusa3d/wxWidgets")
+ (source
+ (origin
+ (inherit (package-source wxwidgets))
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url home-page)
+ (commit commit)
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (patches (search-patches "prusa-wxwidgets-makefile-fix.patch"))
+ (sha256
+ (base32
+ "02nd07c23xbclnf1jjfbv6r5vqjb80gsdy2l559c5qzgdcvfd2xd"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments wxwidgets)
+ ((#:configure-flags flags)
+ #~(cons "--disable-glcanvasegl" #$flags)))))))
+
(define-public prusa-slicer
(package
(name "prusa-slicer")
--
2.41.0
A
A
Artyom V. Poptsov wrote on 11 May 19:58 +0200
[PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
a19292814de3a41ace949042ffb9515e8c25895d.1715450052.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (prusa-slicer): Update to 2.7.4.
[source]: Add "prusa-slicer-boost-fixes.patch". Move some part of the
snippet code to custom build phases.
[arguments]: In configure flags add paths to external libraries.
Add "fix-include-paths" phase.
[native-inputs]: Add "catch2".
[inputs]: Use "prusa-wxwidgets" instead of "wxwidgets" to fix segfaults.
Ad "qhull", "nanosvg", "heatshrink" and "prusa-libbgcode".
* gnu/packages/patches/prusa-slicer-boost-fixes.patch,
gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch: Remove unused
patches.
* gnu/local.mk (dist_patch_DATA): Remove unused "prusa-slicer" patches.

Change-Id: I15e85d63c9ad6c731c8040ef2d8ec8b2f31f2ab7
---
gnu/local.mk | 2 -
gnu/packages/engineering.scm | 51 ++++++----
.../patches/prusa-slicer-boost-fixes.patch | 97 -------------------
.../prusa-slicer-with-cereal-1.3.1.patch | 52 ----------
4 files changed, 33 insertions(+), 169 deletions(-)
delete mode 100644 gnu/packages/patches/prusa-slicer-boost-fixes.patch
delete mode 100644 gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch

Toggle diff (271 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 3ba9253ae2..3b61666803 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1816,9 +1816,7 @@ dist_patch_DATA = \
%D%/packages/patches/pokerth-boost.patch \
%D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
%D%/packages/patches/procps-strtod-test.patch \
- %D%/packages/patches/prusa-slicer-boost-fixes.patch \
%D%/packages/patches/prusa-slicer-fix-tests.patch \
- %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \
%D%/packages/patches/pthreadpool-system-libraries.patch \
%D%/packages/patches/python-3.12-fix-tests.patch \
%D%/packages/patches/python-accupy-use-matplotx.patch \
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 08ff06fa94..99f7c82d7d 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3828,7 +3828,7 @@ (define-public prusa-wxwidgets
(define-public prusa-slicer
(package
(name "prusa-slicer")
- (version "2.5.2")
+ (version "2.7.4")
(source
(origin
(method git-fetch)
@@ -3837,13 +3837,11 @@ (define-public prusa-slicer
(url "https://github.com/prusa3d/PrusaSlicer")
(commit (string-append "version_" version))))
(file-name (git-file-name name version))
- (sha256 (base32 "02qcrw3fa0d8ldbp73hp14l1qxbp3f4608j4csc07ny00ra42151"))
- (patches (search-patches "prusa-slicer-boost-fixes.patch"
- "prusa-slicer-fix-tests.patch"
- "prusa-slicer-with-cereal-1.3.1.patch"))
+ (sha256 (base32 "0s1cfvhfilyv0y98asr61c6rwlgyr1hf5v5hg8q9zwmzm2bkcql3"))
+ (patches (search-patches "prusa-slicer-fix-tests.patch"))
(modules '((guix build utils)))
(snippet
- '(begin
+ `(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.
@@ -3851,10 +3849,12 @@ (define-public prusa-slicer
(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\\(libigl\\)" all)
- (string-append
- all "\ninclude_directories(libigl INTERFACE libigl::core)"))
(("add_subdirectory\\(hidapi\\)")
"pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
(("include_directories\\(hidapi/include\\)")
@@ -3867,13 +3867,24 @@ (define-public prusa-slicer
(("\\bhidapi\\b") "${HIDAPI_LIBRARIES}"))))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
- '("-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")))
+ (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/lib/cmake/igl/"
+ #$(this-package-input "libigl"))
+ (format #f "-DCatch2_DIR=~a/lib/cmake/catch2/"
+ #$(this-package-input "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))
+ (list pkg-config catch2))
(inputs
(list boost
cereal
@@ -3899,9 +3910,13 @@ (define-public prusa-slicer
pango
tbb
eudev
- ;; prusa-slicer 2.5 segfaults on startup with wxwidgets 3.2
- ;; See https://github.com/prusa3d/PrusaSlicer/issues/8299
- wxwidgets-3.0
+ qhull
+ nanosvg
+ heatshrink
+ ;; XXX: Using Prusa wxWidgets fork as PrusaSlicer segfaults when compiled
+ ;; with regular wxwidgets.
+ prusa-wxwidgets
+ prusa-libbgcode
zlib))
(home-page "https://www.prusa3d.com/prusaslicer/")
(synopsis "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)")
diff --git a/gnu/packages/patches/prusa-slicer-boost-fixes.patch b/gnu/packages/patches/prusa-slicer-boost-fixes.patch
deleted file mode 100644
index 5bca271625..0000000000
--- a/gnu/packages/patches/prusa-slicer-boost-fixes.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-Fixes for Boost compatibility.
-This patch comes from Gentoo:
- portage/media-gfx/prusaslicer/files/prusaslicer-2.5.0_alpha2-boost-fixes.patch
-
---- a/src/hints/HintsToPot.cpp
-+++ b/src/hints/HintsToPot.cpp
-@@ -1,6 +1,7 @@
- #include <iostream>
- #include <vector>
- #include <string>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/dll.hpp>
- #include <boost/property_tree/ini_parser.hpp>
-@@ -9,7 +10,7 @@
-
- bool write_to_pot(boost::filesystem::path path, const std::vector<std::pair<std::string, std::string>>& data)
- {
-- boost::filesystem::ofstream file(std::move(path), std::ios_base::app);
-+ boost::nowide::ofstream file(std::move(path), std::ios_base::app);
- for (const auto& element : data)
- {
- //Example of .pot element
---- a/src/libslic3r/Preset.cpp
-+++ b/src/libslic3r/Preset.cpp
-@@ -25,6 +25,7 @@
- #include <stdexcept>
- #include <unordered_map>
- #include <boost/format.hpp>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/filesystem/fstream.hpp>
- #include <boost/algorithm/string.hpp>
-@@ -84,7 +85,7 @@ ConfigFileType guess_config_file_type(const ptree &tree)
- VendorProfile VendorProfile::from_ini(const boost::filesystem::path &path, bool load_all)
- {
- ptree tree;
-- boost::filesystem::ifstream ifs(path);
-+ boost::nowide::ifstream ifs(path);
- boost::property_tree::read_ini(ifs, tree);
- return VendorProfile::from_ini(tree, path, load_all);
- }
---- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp
-+++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
-@@ -10,6 +10,7 @@
- #include "libslic3r/Platform.hpp"
- #include "libslic3r/Config.hpp"
-
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/log/trivial.hpp>
- #include <boost/dll/runtime_symbol_info.hpp>
-@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog()
-
- } // namespace GUI
- } // namespace Slic3r
--#endif // __linux__
-\ No newline at end of file
-+#endif // __linux__
---- a/src/slic3r/GUI/GUI_App.cpp
-+++ b/src/slic3r/GUI/GUI_App.cpp
-@@ -13,6 +13,7 @@
- #include <cstdlib>
- #include <regex>
- #include <string_view>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/algorithm/string/predicate.hpp>
- #include <boost/algorithm/string.hpp>
- #include <boost/format.hpp>
---- a/src/slic3r/GUI/HintNotification.cpp
-+++ b/src/slic3r/GUI/HintNotification.cpp
-@@ -15,6 +15,7 @@
- #include "libslic3r/PrintConfig.hpp"
-
- #include <boost/algorithm/string/replace.hpp>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/nowide/fstream.hpp>
- #include <boost/log/trivial.hpp>
-@@ -65,7 +66,7 @@ inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, f
-
- void write_used_binary(const std::vector<std::string>& ids)
- {
-- boost::filesystem::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary);
-+ boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary);
- cereal::BinaryOutputArchive archive(file);
- HintsCerealData cd { ids };
- try
-@@ -84,7 +85,7 @@ void read_used_binary(std::vector<std::string>& ids)
- BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string();
- return;
- }
-- boost::filesystem::ifstream file(path);
-+ boost::nowide::ifstream file(path);
- cereal::BinaryInputArchive archive(file);
- HintsCerealData cd;
- try
diff --git a/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch b/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
deleted file mode 100644
index affa506b1c..0000000000
--- a/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Fix for building with cereal>=1.3.1.
-This patch comes from Gentoo:
- portage/media-gfx/prusaslicer/files/prusaslicer-2.5.0_rc1-cereal-1.3.1.patch
-
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -127,7 +127,7 @@
- set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
- endif ()
-
--target_link_libraries(PrusaSlicer libslic3r cereal)
-+target_link_libraries(PrusaSlicer libslic3r libcereal)
-
- if (APPLE)
- # add_compile_options(-stdlib=libc++)
---- a/src/slic3r/CMakeLists.txt
-+++ b/src/slic3r/CMakeLists.txt
-@@ -260,7 +260,7 @@
-
- encoding_check(libslic3r_gui)
-
--target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
-+target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
-
- if (MSVC)
- target_link_libraries(libslic3r_gui Setupapi.lib)
---- a/src/libslic3r/CMakeLists.txt
-+++ b/src/libslic3r/CMakeLists.txt
-@@ -395,7 +395,7 @@
- target_link_libraries(libslic3r
- libnest2d
- admesh
-- cereal
-+ libcereal
- libigl
- miniz
- boost_libs
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -446,6 +446,12 @@
-
- # Find the Cereal serialization library
- find_package(cereal REQUIRED)
-+add_library(libcereal INTERFACE)
-+if (NOT TARGET cereal::cereal)
-+ target_link_libraries(libcereal INTERFACE cereal)
-+else()
-+ target_link_libraries(libcereal INTERFACE cereal::cereal)
-+endif()
-
- # l10n
- set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
--
2.41.0
A
A
Artyom V. Poptsov wrote on 8 Jun 16:27 +0200
Re: [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4.
(address . guix-patches@gnu.org)(address . 70880@debbugs.gnu.org)
87a5jv7bng.fsf@gmail.com
Hello!

Could anyone review this patchset? It's been more than 3 weeks since it
was sent and I'd love to hear any feedback.

Thanks!

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmZkakwZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfpQOEAC4jy2ccLNoMFtyyZeY1MgQ
wFg87+uIetxAqsrulupP/tYAFDRTU8V707L5PXfT+h7PWqW1SxpUKMwswlsYu0eo
TKspxE4onRm6+4kN+leCJn0tl4N1XTf/DvAWjcVvPPgbOBRw5HEUc1gyehJ1zRqK
FoEt2TwZ9b+EH7oRv2e6BJw+HISrBE2+dnjXg7VuRHo6UCIyYrxrzpRWck5N+kG1
Cg0wkbx1N+nORD86R59QgW4ZGKxMmSNfe3oylwx64xayuJAdappNGtD0aoDlZWc0
QRHhj0eI9Jn0uAG3HCwIENa0PJiEaLOEaH4RSAX4BWHDXejyHiq8V9SqqfqdQzOm
duUJsD7KFCJV7VsJZd7fEx2C3dKGrxqkNrbZD3FlAAIpsPqWJiaUepilhD1LGkPp
7B1bkpLBTMMXHous6+sro8yzoBWD+2cyA3543PClsQse5BgTEDmsayJoElwE4et3
fdj2L38M3Jd7p2A6aQsb8ngPPdD7TdWPa8oCmDwysqWMCSH55v0/xYQ5RDOVQP2P
w9GYIxZ+8howTSOJz9udI1uFZTKko04h1eQntpzGk16NsS0DOfuSjRO2Dq79TGaf
GZxVg0UWp0OOrY3kXgeCLwDJoevPyaywZyQW6SuwSyKE5Acar0OJRtP6c7m/T4LS
JWw/m8dU43BYbCX5Dk3rwQ==
=7Imq
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 24 Jun 05:18 +0200
Re: [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 70880@debbugs.gnu.org)
874j9j3u65.fsf@gmail.com
Hello,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (37 lines)
> * gnu/packages/engineering.scm (prusa-libbgcode): New variable.
>
> Change-Id: I1f18c399d0fe36987c613ce4c0c3845c803beb45
> ---
> gnu/packages/engineering.scm | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index 1a0b136952..b1776484b5 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -3774,6 +3774,30 @@ (define-public libigl
> visualization, matrix manipulation.")
> (license (list license:gpl3 license:mpl2.0))))
>
> +(define-public prusa-libbgcode
> + (let ((commit "8ae75bd0eea622f0e34cae311b3bd065b55eae9b")
> + (revision "0"))
> + (package
> + (name "prusa-libbgcode")
> + (version (git-version "0.0.0" revision commit))
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/prusa3d/libbgcode")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256 (base32 "0fjx2ijz9zqpqs486lcrrrhqvmfzrpb8j6v57l0jiynavwv3kznw"))))
> + (native-inputs (list catch2))
> + (propagated-inputs
> + (list zlib boost heatshrink))
> + (build-system cmake-build-system)
> + (home-page "https://github.com/prusa3d/libbgcode")
> + (synopsis "Prusa Block & Binary G-code
> reader/writer/converter")

s/&/and/

Toggle quote (3 lines)
> + (description
> + "Prusa Block & Binary G-code reader/writer/converter.")

This needs to be fleshed out more (what are Prusa Block and Binary
G-code? Any features that stand out?). Currently it's a duplicate of
the synopsis.

Toggle quote (2 lines)
> + (license license:agpl3))))

Just checking, it's agpl3 only, not + (or later) ?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 24 Jun 05:18 +0200
control message for bug #70880
(address . control@debbugs.gnu.org)
8734p33u5z.fsf@gmail.com
tags 70880 + moreinfo
quit
M
M
Maxim Cournoyer wrote on 24 Jun 05:22 +0200
Re: [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 70880@debbugs.gnu.org)
87y16v2fea.fsf@gmail.com
Hi,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (72 lines)
> * gnu/packages/compression.scm (heatshrink): New variable.
> * gnu/packages/patches/heatshrink-add-cmake.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add "heatshrink-add-cmake.patch".
>
> Change-Id: I0beccdcaed22e47ac6bfe522497e0759a315813d
> ---
> gnu/local.mk | 1 +
> gnu/packages/compression.scm | 54 +++++++++
> .../patches/heatshrink-add-cmake.patch | 111 ++++++++++++++++++
> 3 files changed, 166 insertions(+)
> create mode 100644 gnu/packages/patches/heatshrink-add-cmake.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index edd546f81d..3ba9253ae2 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1455,6 +1455,7 @@ dist_patch_DATA = \
> %D%/packages/patches/hdf-eos5-remove-gctp.patch \
> %D%/packages/patches/hdf-eos5-fix-szip.patch \
> %D%/packages/patches/hdf-eos5-fortrantests.patch \
> + %D%/packages/patches/heatshrink-add-cmake.patch \
> %D%/packages/patches/heimdal-CVE-2022-45142.patch \
> %D%/packages/patches/helm-fix-gcc-9-build.patch \
> %D%/packages/patches/highlight-gui-data-dir.patch \
> diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
> index 55784a70de..187bc73f2f 100644
> --- a/gnu/packages/compression.scm
> +++ b/gnu/packages/compression.scm
> @@ -39,6 +39,7 @@
> ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
> ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
> ;;; Copyright © 2024 Vinicius Monego <monego@posteo.net>
> +;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -570,6 +571,59 @@ (define-public xz
> (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
> (home-page "https://tukaani.org/xz/")))
>
> +(define-public heatshrink
> + (package
> + (name "heatshrink")
> + (version "0.4.1")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/atomicobject/heatshrink/")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "0sdhvk27yz8kahw18j8pddbpkgl78v8rh8fx6wspc3acj7w7yvrn"))
> + ;; Add CMake build script, wanted by prusa-slicer and libbgcode, which are the
> + ;; only users of this library.
> + ;;
> + ;; See
> + ;; <https://github.com/NixOS/nixpkgs/pull/269758/commits/fa36136ceed0e2c58e0c9e21492a7e60c3a64470>
> + (patches (search-patches "heatshrink-add-cmake.patch"))))
> + (build-system cmake-build-system)
> + (arguments
> + (list
> + ;; XXX: No tests available with CMake.
> + ;; See <https://github.com/atomicobject/heatshrink/pull/77>
> + #:tests? #f))
> + (home-page "https://github.com/atomicobject/heatshrink/")
> + (synopsis "Data compression library for embedded/real-time systems")
> + (description
> + "A data compression/decompression library for embedded/real-time systems.
> +
> +Key features:

I'd use complete sentences, such as "Among its features are: "

Toggle quote (19 lines)
> +@itemize
> +@item Low memory usage (as low as 50 bytes.)
> +
> +It is useful for some cases with less than 50 bytes, and useful for many general
> +cases with < 300 bytes.
> +
> +@item Incremental, bounded CPU use.
> +
> +You can chew on input data in arbitrarily tiny bites. This is a useful property in
> +hard real-time environments.
> +
> +@item Can use either static or dynamic memory allocation.
> +
> +The library doesn't impose any constraints on memory management.
> +
> +@item ISC license.
> +
> +You can use it freely, even for commercial purposes.

There's no need to add text to package descriptions boasting about their
freeness; that's ensured by Guix :-).

The rest looks good to me.

Could you please send a v2?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 24 Jun 05:24 +0200
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 70880@debbugs.gnu.org)
87tthj2fca.fsf@gmail.com
Another nitpick: the commit summary line should read 'gnu: Add heatshrink.'

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 24 Jun 05:28 +0200
Re: [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
87pls72f4b.fsf@gmail.com
Hi,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (22 lines)
> * gnu/packages/engineering.scm (prusa-wxwidgets): New variable.
>
> Co-authored-by: Nikita Domnitskii <nikita@domnitskii.me>
> Change-Id: I9043c2acc95986275ee24d9c5d944e5fe2702e99
> ---
> gnu/packages/engineering.scm | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index b1776484b5..08ff06fa94 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -3798,6 +3798,33 @@ (define-public prusa-libbgcode
> "Prusa Block & Binary G-code reader/writer/converter.")
> (license license:agpl3))))
>
> +(define-public prusa-wxwidgets
> + ;; There is no tag/release, all patches are in separate branch.
> + (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26"))
> + (package
> + (inherit wxwidgets)

Due to not being delayed, inherit fields should only be used with values
defined in the same module. So you should move prusa-wxwidgets to where
wxwidgets comes from. See (info '(guix) Cyclic Module Dependencies').

Toggle quote (13 lines)
> + (name "prusa-wxwidgets")
> + (version "3.2.0")
> + (home-page "https://github.com/prusa3d/wxWidgets")
> + (source
> + (origin
> + (inherit (package-source wxwidgets))
> + (method git-fetch)
> + (uri
> + (git-reference
> + (url home-page)
> + (commit commit)
> + (recursive? #t)))

Recursive checkouts often mean bundled libraries are pulled and built as
part of the same package, which should be avoided in Guix if the build
system has supports for it. For this reason, we always leave a comment
explaining why it's needed.

Toggle quote (9 lines)
> + (file-name (git-file-name name version))
> + (patches (search-patches "prusa-wxwidgets-makefile-fix.patch"))
> + (sha256
> + (base32
> + "02nd07c23xbclnf1jjfbv6r5vqjb80gsdy2l559c5qzgdcvfd2xd"))))
> + (arguments
> + (substitute-keyword-arguments (package-arguments wxwidgets)
> + ((#:configure-flags flags)

Is this done to match upstream configuration? Perhaps add a comment.

Toggle quote (6 lines)
> + #~(cons "--disable-glcanvasegl" #$flags)))))))
> +
> (define-public prusa-slicer
> (package
> (name "prusa-slicer")

Could you please send a v2?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 24 Jun 05:30 +0200
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
87le2v2f2e.fsf@gmail.com
Hi,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (37 lines)
> * gnu/packages/engineering.scm (prusa-wxwidgets): New variable.
>
> Co-authored-by: Nikita Domnitskii <nikita@domnitskii.me>
> Change-Id: I9043c2acc95986275ee24d9c5d944e5fe2702e99
> ---
> gnu/packages/engineering.scm | 27 +++++++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index b1776484b5..08ff06fa94 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -3798,6 +3798,33 @@ (define-public prusa-libbgcode
> "Prusa Block & Binary G-code reader/writer/converter.")
> (license license:agpl3))))
>
> +(define-public prusa-wxwidgets
> + ;; There is no tag/release, all patches are in separate branch.
> + (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26"))
> + (package
> + (inherit wxwidgets)
> + (name "prusa-wxwidgets")
> + (version "3.2.0")
> + (home-page "https://github.com/prusa3d/wxWidgets")
> + (source
> + (origin
> + (inherit (package-source wxwidgets))
> + (method git-fetch)
> + (uri
> + (git-reference
> + (url home-page)
> + (commit commit)
> + (recursive? #t)))
> + (file-name (git-file-name name version))
> + (patches (search-patches
> "prusa-wxwidgets-makefile-fix.patch"))

Another thing: patches should be registered within the gnu/local.mk
file, so as to be included in the 'make dist' archive.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 24 Jun 05:38 +0200
Re: [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 70880@debbugs.gnu.org)
87h6dj2eop.fsf@gmail.com
Hi Artyom,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (3 lines)
> * gnu/packages/engineering.scm (prusa-slicer): Update to 2.7.4.
> [source]: Add "prusa-slicer-boost-fixes.patch".

I think you meant 'remove' rather than 'add' here; and another patch was
removed as well.

Toggle quote (12 lines)
> Move some part of the
> snippet code to custom build phases.
> [arguments]: In configure flags add paths to external libraries.
> Add "fix-include-paths" phase.
> [native-inputs]: Add "catch2".
> [inputs]: Use "prusa-wxwidgets" instead of "wxwidgets" to fix segfaults.
> Ad "qhull", "nanosvg", "heatshrink" and "prusa-libbgcode".
> * gnu/packages/patches/prusa-slicer-boost-fixes.patch,
> gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch: Remove unused
> patches.
> * gnu/local.mk (dist_patch_DATA): Remove unused "prusa-slicer" patches.

Nitpick: I typically use 'Register / De-register' wording for adding or
removing entries to local.mk.

Toggle quote (90 lines)
>
> Change-Id: I15e85d63c9ad6c731c8040ef2d8ec8b2f31f2ab7
> ---
> gnu/local.mk | 2 -
> gnu/packages/engineering.scm | 51 ++++++----
> .../patches/prusa-slicer-boost-fixes.patch | 97 -------------------
> .../prusa-slicer-with-cereal-1.3.1.patch | 52 ----------
> 4 files changed, 33 insertions(+), 169 deletions(-)
> delete mode 100644 gnu/packages/patches/prusa-slicer-boost-fixes.patch
> delete mode 100644 gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 3ba9253ae2..3b61666803 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1816,9 +1816,7 @@ dist_patch_DATA = \
> %D%/packages/patches/pokerth-boost.patch \
> %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
> %D%/packages/patches/procps-strtod-test.patch \
> - %D%/packages/patches/prusa-slicer-boost-fixes.patch \
> %D%/packages/patches/prusa-slicer-fix-tests.patch \
> - %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \
> %D%/packages/patches/pthreadpool-system-libraries.patch \
> %D%/packages/patches/python-3.12-fix-tests.patch \
> %D%/packages/patches/python-accupy-use-matplotx.patch \
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index 08ff06fa94..99f7c82d7d 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -3828,7 +3828,7 @@ (define-public prusa-wxwidgets
> (define-public prusa-slicer
> (package
> (name "prusa-slicer")
> - (version "2.5.2")
> + (version "2.7.4")
> (source
> (origin
> (method git-fetch)
> @@ -3837,13 +3837,11 @@ (define-public prusa-slicer
> (url "https://github.com/prusa3d/PrusaSlicer")
> (commit (string-append "version_" version))))
> (file-name (git-file-name name version))
> - (sha256 (base32 "02qcrw3fa0d8ldbp73hp14l1qxbp3f4608j4csc07ny00ra42151"))
> - (patches (search-patches "prusa-slicer-boost-fixes.patch"
> - "prusa-slicer-fix-tests.patch"
> - "prusa-slicer-with-cereal-1.3.1.patch"))
> + (sha256 (base32 "0s1cfvhfilyv0y98asr61c6rwlgyr1hf5v5hg8q9zwmzm2bkcql3"))
> + (patches (search-patches "prusa-slicer-fix-tests.patch"))
> (modules '((guix build utils)))
> (snippet
> - '(begin
> + `(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.
> @@ -3851,10 +3849,12 @@ (define-public prusa-slicer
> (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\\(libigl\\)" all)
> - (string-append
> - all "\ninclude_directories(libigl INTERFACE libigl::core)"))
> (("add_subdirectory\\(hidapi\\)")
> "pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
> (("include_directories\\(hidapi/include\\)")
> @@ -3867,13 +3867,24 @@ (define-public prusa-slicer
> (("\\bhidapi\\b") "${HIDAPI_LIBRARIES}"))))))
> (build-system cmake-build-system)
> (arguments
> - `(#:configure-flags
> - '("-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")))
> + (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/lib/cmake/igl/"
> + #$(this-package-input "libigl"))
> + (format #f "-DCatch2_DIR=~a/lib/cmake/catch2/"
> + #$(this-package-input "catch2")))

This may be possible to express via e.g (search-input-directory
%build-inputs "lib/cmake/igl"), if only one package provides that.

The benefit is that then that's a runtime thing that plays better with
inherited variants and package rewriting.

Toggle quote (11 lines)
> + #: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))
> + (list pkg-config catch2))

Please sort in alphabetical order.

Toggle quote (18 lines)
> (inputs
> (list boost
> cereal
> @@ -3899,9 +3910,13 @@ (define-public prusa-slicer
> pango
> tbb
> eudev
> - ;; prusa-slicer 2.5 segfaults on startup with wxwidgets 3.2
> - ;; See https://github.com/prusa3d/PrusaSlicer/issues/8299
> - wxwidgets-3.0
> + qhull
> + nanosvg
> + heatshrink
> + ;; XXX: Using Prusa wxWidgets fork as PrusaSlicer segfaults when compiled
> + ;; with regular wxwidgets.
> + prusa-wxwidgets
> + prusa-libbgcode

Likewise. Otherwise LGTM. Could you please send a v2?

--
Thanks,
Maxim
A
A
Artyom V. Poptsov wrote on 1 Jul 18:25 +0200
Re: [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 70880@debbugs.gnu.org)
87cynxnkot.fsf@gmail.com
Hello Maxim,

first of all, thanks for reviewing my patches!

Toggle quote (2 lines)
> s/&/and/

Fixed.

Toggle quote (4 lines)
> This needs to be fleshed out more (what are Prusa Block and Binary
> G-code? Any features that stand out?). Currently it's a duplicate of
> the synopsis.

Expanded the description using information from

Toggle quote (2 lines)
> Just checking, it's agpl3 only, not + (or later) ?

It turns out you're right -- this library is under "AGPL3 or later",
according to this file:

Fixed.

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmaC2IkZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfnrjD/9oMOOwcgg7K0yazVsDjk0B
3cJiCLhR7/ik2gTk8opcOlSjGI/rR7+ubA850EaNHHMxb4NQkUCSFKyaIcq+bLEd
0ULhD79g9jusYYlDeodJn8wbRCkHYQS8VoW9YilSJyfMEDn3EL+8ghUQgeWTCzL7
CKR+gtqOHjYwc1sZEFcWvmXv4Lp9rtP1MFZqsUBe3sPUofxqT4GQ2Ogys8tF3WAx
0q3WW6Aou69XFIyME3uYZYYstf25j5MEGjb6ASnPhWLarILF/ZKs+4vEy4pL+N5B
HfjDcVYpU1nEAS40rRHt9iYbvc01ZKlvYXgwRrH37rNImZ+n7P6g61kr6NU3zL0t
jLP1ED2w914MfkIUkMVyw0JhfUMnIIKOV5Jan9zZorfjU3x582XcU7inH9RQML7u
4xCfjExcAUPl1MurgXTaHEkpBeo6TMsUL7zjnolOAPuVLLuXrY4gXK+ccISC2ATf
eOQOQC716CxCSDmilZHINeO9sIcahhKJHqavuT32WSkgS9nSxcjE9wB85UTKNTpO
E255UysUxZuEkQzJtqCvQ8qlRDbP1Fu0xbKjgfcBMXuEaqYF9UqAD89ZGRXBUqPs
9YKQV2+3pyx8cVUBAgPrjci758V5KRFKixNb6UMjrSIrIvSG4qCrl9awEW8b6FEA
X+8B3cVtA6xspDgAmfRB/A==
=KGCt
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 1 Jul 19:07 +0200
[PATCH v2 3/8] gnu: glfw-3.4: New variable.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
dba2c2499510f4b07c9649033b5f390f02c1acf6.1719853592.git.poptsov.artyom@gmail.com
* gnu/packages/gl.scm (glfw-3.4): New variable.

Change-Id: I77f2214c78f35455436897a3fbff083331295314
---
gnu/packages/gl.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Toggle diff (28 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index f40ddaeb86..2d684e9c80 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -995,6 +995,21 @@ (define-public glfw
and surfaces, receiving input and events.")
(license license:zlib)))
+(define-public glfw-3.4
+ (package
+ (inherit glfw)
+ (version "3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/glfw/glfw"
+ "/releases/download/" version
+ "/glfw-" version ".zip"))
+ (sha256
+ (base32
+ "1sd396kkn53myp61kxrd18h7b1q4ix173hhxhvl0iz8j4x5h1v5m"))))
+ (inputs (modify-inputs (package-inputs glfw)
+ (prepend pkg-config)))))
+
(define-public nanovg-for-extempore
(let ((version "0.7.1")
(revision "0")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 1 Jul 19:07 +0200
[PATCH v2 1/8] gnu: cgal: Update to 5.6.1.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
c6d3235137dc86c567067365389dd80c51a03c62.1719853592.git.poptsov.artyom@gmail.com
* gnu/packages/graphics.scm (cgal): Update to 5.6.1.

Change-Id: Id909fc7be5d421496e6a3cd87d366f437f76bcfa
---
gnu/packages/graphics.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index f609118c01..066cb550ff 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -775,7 +775,7 @@ (define-public openshadinglanguage
(define-public cgal
(package
(name "cgal")
- (version "5.2.2")
+ (version "5.6.1")
(source (origin
(method url-fetch)
(uri (string-append
@@ -783,7 +783,7 @@ (define-public cgal
"/CGAL-" version ".tar.xz"))
(sha256
(base32
- "0yjzq12ivizp23y7zqm30x20psv9gzwbcdrhyd3f7h0ds94m1c40"))))
+ "0dsqvnyd2ic50pr28gfz34bpnyx3i2csf1rikmc661hywdz5xcfd"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
--
2.45.2
A
A
Artyom V. Poptsov wrote on 1 Jul 19:07 +0200
[PATCH v2 2/8] gnu: glfw: Update to 3.3.10.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
164af041e8271a27109c164ba5a1c57b6cd81140.1719853592.git.poptsov.artyom@gmail.com
* gnu/packages/gl.scm (glfw): Update to 3.3.10.

Change-Id: I9d789fb74af4ed649102195891adc5e437883d30
---
gnu/packages/gl.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 2100bb4872..f40ddaeb86 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -924,7 +925,7 @@ (define-public soil
(define-public glfw
(package
(name "glfw")
- (version "3.3.9")
+ (version "3.3.10")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/glfw/glfw"
@@ -932,7 +933,7 @@ (define-public glfw
"/glfw-" version ".zip"))
(sha256
(base32
- "023dn97n4h14n5lbjpzjv0y6a2plj254c0w3rr3wraf3z08189jm"))))
+ "1f5xs4cj1y5wk1jimv1mylk6n6vh7433js28mfd1kf7p2zw3whz8"))))
(build-system cmake-build-system)
(arguments
(list
--
2.45.2
A
A
Artyom V. Poptsov wrote on 1 Jul 19:07 +0200
[PATCH v2 4/8] gnu: libigl: Update to 2.4.0.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
09e99660acf1973e62ba21b25e5d3e2cceaa5921.1719853592.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (libigl): Update to 2.4.0.
[arguments]: Use Gexps. Update configure flags. Disable GLFW tests as they
are failing with SEGFAULT errors (see
Update "unpack-external" phase: add new dependencies.
Update "patch-cmake" phase to prevent CMake from trying to download external
dependencies. Help CMake to find the package inputs.
Add "fix-assertions" and "install-copyleft-modules" phase.
[native-inputs]: Add catch2.
[inputs]: Use glfw-3.4. Add openblas, imgui and spectra. Add libigl
packages and imguizmo. Remove catch2.

Change-Id: Ib4ac842dc14fe1cbc6b0b87674bae1f261a1a970
---
gnu/packages/engineering.scm | 258 ++++++++++++++++++++++++-----------
1 file changed, 179 insertions(+), 79 deletions(-)

Toggle diff (336 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index fcb73eab12..7f29e2c365 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -33,7 +33,7 @@
;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;; Copyright © 2022 Konstantinos Agiannis <agiannis.kon@gmail.com>
;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
-;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022-2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022, 2023 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2023 Theofilos Pechlivanis <theofilos.pechlivanis@gmail.com>
@@ -162,6 +162,7 @@ (define-module (gnu packages engineering)
#:use-module (gnu packages text-editors)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages toolkits)
#:use-module (gnu packages tree-sitter)
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
@@ -3510,7 +3511,7 @@ (define-public xfoil
(define-public libigl
(package
(name "libigl")
- (version "2.3.0")
+ (version "2.4.0")
(source
(origin
(method git-fetch)
@@ -3520,90 +3521,151 @@ (define-public libigl
(file-name (git-file-name name version))
(sha256
(base32
- "004a22ifq2vibgkgvrlyihqimpsfizvq5l448204kwfg3lkycajj"))))
+ "0qlnpp8nxbahcky4d67dzn0ynbv3v037nbx1akq6h5rzhvkzq40x"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
- '("-DLIBIGL_USE_STATIC_LIBRARY=OFF"
- "-DLIBIGL_BUILD_TESTS=ON"
- "-DLIBIGL_BUILD_TUTORIALS=OFF"
- "-DLIBIGL_EXPORT_TARGETS=ON"
- ;; The following options disable tests for the corresponding libraries.
- ;; The options do not affect whether the libraries are linked to
- ;; libigl or not, they are used for tests.
- "-DLIBIGL_WITH_COMISO=OFF"
- "-DLIBIGL_WITH_CORK=OFF"
- "-DLIBIGL_WITH_MATLAB=OFF"
- "-DLIBIGL_WITH_MOSEK=OFF"
- "-DLIBIGL_WITH_TRIANGLE=OFF" ;; Undefined reference to "triangulate".
- "-DLIBIGL_WITH_OPENGL_GLFW_IMGUI=OFF")
+ (list #:configure-flags
+ #~(list "-DLIBIGL_USE_STATIC_LIBRARY=OFF"
+ "-DLIBIGL_BUILD_TESTS=ON"
+ "-DLIBIGL_BUILD_TUTORIALS=OFF"
+ "-DLIBIGL_INSTALL=ON"
+ "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
+ (format #f "-DCatch2_DIR=~a/lib/cmake/catch2/"
+ #$(this-package-input "catch2"))
+ (format #f "-DSpectra_DIR=~a/share/pectra/cmake/"
+ #$(this-package-input "spectra"))
+ ;; The following options disable tests for the corresponding libraries.
+ ;; The options do not affect whether the libraries are linked to
+ ;; libigl or not, they are used for tests.
+ "-DLIBIGL_WITH_COMISO=OFF"
+ "-DLIBIGL_WITH_CORK=OFF"
+ "-DLIBIGL_MATLAB=OFF"
+ "-DLIBIGL_MOSEK=OFF"
+ ;; XXX: GLFW tests are failing with SEGFAULT. See
+ ;; <https://github.com/libigl/libigl/issues/2313>
+ "-DLIBIGL_GLFW_TESTS=OFF")
+ #:build-type "Release"
#:phases
- (modify-phases %standard-phases
+ #~(modify-phases %standard-phases
(add-after 'unpack 'unpack-external
(lambda _
(setenv "HOME" (getcwd)) ;; cmake needs this to export modules
(mkdir "external")
(copy-recursively (assoc-ref %build-inputs "libigl-glad") "external/glad")
- (copy-recursively (assoc-ref %build-inputs "libigl-stb") "external/stb")
+ (copy-recursively (assoc-ref %build-inputs "libigl-test-data") "external/test-data")
+ (copy-recursively (assoc-ref %build-inputs "libigl-comiso") "external/comiso")
(copy-recursively (assoc-ref %build-inputs "libigl-tetgen") "external/tetgen")
- (copy-recursively (assoc-ref %build-inputs "libigl-predicates") "external/predicates")))
+ (copy-recursively (assoc-ref %build-inputs "libigl-predicates") "external/predicates")
+ (copy-recursively (assoc-ref %build-inputs "imguizmo") "external/imguizmo")
+ (copy-recursively (assoc-ref %build-inputs "eigen") "external/eigen")))
(add-after 'unpack-external 'patch-cmake
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (source-dir library-name)
+ (format #f "SOURCE_DIR \"~a\""
+ (assoc-ref %build-inputs library-name)))
+ (define (fix-external-library cmake source)
+ (substitute* (format #f "cmake/recipes/external/~a.cmake"
+ cmake)
+ (("GIT_REPOSITORY.*") (source-dir source))
+ (("GIT_TAG.*") "")))
;; Fix references to external libraries
- (substitute* "cmake/libigl.cmake"
- (("if\\(NOT TARGET Eigen3::Eigen\\)" all)
- (string-append "find_package(Eigen3 CONFIG REQUIRED)\n" all))
- (("if\\(NOT TARGET CGAL::CGAL\\)" all)
- (string-append "find_package(CGAL CONFIG COMPONENTS Core)\n" all))
- (("if\\(NOT TARGET tinyxml2\\)" all)
- (string-append "find_package(tinyxml2 CONFIG REQUIRED)\n"
- "if (NOT TARGET tinyxml2::tinyxml2)"))
- (("if\\(NOT TARGET embree\\)" all)
- (string-append "find_package(embree 3 CONFIG REQUIRED)\n" all))
- (("if\\(NOT TARGET glfw\\)" all)
- (string-append "find_package(glfw3 CONFIG REQUIRED)\n" all))
- (("igl_download_glad\\(\\)" all) "")
- (("igl_download_stb\\(\\)" all) "")
- (("igl_download_tetgen\\(\\)" all) "")
- (("igl_download_triangle\\(\\)" all) "")
- (("igl_download_predicates\\(\\)" all) ""))
- (substitute* "tests/CMakeLists.txt"
- (("igl_download_test_data\\(\\)") "")
- (("set\\(IGL_TEST_DATA.*")
- (format #f "set(IGL_TEST_DATA ~a)\n"
- (assoc-ref %build-inputs "libigl-test-data")))
- (("igl_download_catch2\\(\\)") "find_package(Catch2 CONFIG REQUIRED)")
- (("list\\(APPEND CMAKE_MODULE_PATH \\$\\{LIBIGL_EXTERNAL\\}/catch2/contrib\\)")
- "")
- (("add_subdirectory\\(\\$\\{LIBIGL_EXTERNAL\\}/catch2 catch2\\)") ""))
- ;; Install otherwise missing headers
- (substitute* "cmake/libigl.cmake"
- (("install_dir_files\\(copyleft\\)" all)
- (string-join (list all
- "install_dir_files(copyleft/cgal)"
- "install_dir_files(copyleft/opengl)"
- "install_dir_files(copyleft/tetgen)"
- "install_dir_files(embree)"
- "install_dir_files(opengl)"
- "install_dir_files(png)"
- "install_dir_files(predicates)"
- "install_dir_files(xml)")
- "\n"))))))))
+ (fix-external-library "comiso" "libigl-comiso")
+ (fix-external-library "tetgen" "libigl-tetgen")
+ (fix-external-library "triangle" "libigl-triangle")
+ (fix-external-library "predicates" "libigl-predicates")
+ (fix-external-library "glad" "libigl-glad")
+ (fix-external-library "libigl_tests_data" "libigl-test-data")
+ (fix-external-library "stb" "libigl-stb")
+ (substitute* "cmake/recipes/external/imguizmo.cmake"
+ (("if\\(TARGET imguizmo::imguizmo\\)")
+ "if(true)")
+ (("target_link_libraries.*")
+ (format #f "include_directories(~a/include/imgui/)"
+ (assoc-ref inputs "imgui"))))
+
+ (substitute* "cmake/igl/igl_add_test.cmake"
+ (("include\\(\".*/contrib/Catch.cmake\"\\)")
+ (format #f
+ "include(\"~a/lib/cmake/Catch2/Catch.cmake\")"
+ (assoc-ref inputs "catch2"))))
+ (substitute* "cmake/recipes/external/cgal.cmake"
+ (("FetchContent_Populate\\(cgal\\)")
+ "find_package(CGAL CONFIG COMPONENTS Core)\nreturn()"))
+ (substitute* "cmake/recipes/external/eigen.cmake"
+ (("FetchContent_Populate\\(eigen\\)")
+ "find_package(Eigen3 CONFIG REQUIRED)\nreturn()"))
+ (substitute* "cmake/recipes/external/catch2.cmake"
+ (("message.*")
+ "find_package(Catch2 CONFIG)\nreturn()"))
+ (substitute* "cmake/recipes/external/libigl_imgui_fonts.cmake"
+ (("if\\(TARGET igl::imgui_fonts\\)")
+ "if(true)"))
+ (substitute* "cmake/recipes/external/tinyxml2.cmake"
+ (("FetchContent_Populate\\(tinyxml2\\)")
+ "find_package(tinyxml2 CONFIG REQUIRED)\nreturn()"))
+ (substitute* "cmake/recipes/external/embree.cmake"
+ (("FetchContent_MakeAvailable\\(embree\\)")
+ (string-join (list "find_package(Embree 3 CONFIG)"
+ "add_library(embree::embree ALIAS embree)"
+ "return()")
+ "\n")))
+ (substitute* "cmake/recipes/external/glfw.cmake"
+ (("FetchContent_MakeAvailable\\(glfw\\)")
+ (string-join
+ (list "find_package(glfw3 CONFIG REQUIRED)"
+ "add_library(glfw::glfw ALIAS glfw)"
+ "return()")
+ "\n")))
+ (substitute* "cmake/recipes/external/imgui.cmake"
+ (("FetchContent_MakeAvailable\\(imgui\\)")
+ "return()"))))
+
+ (add-after 'unpack-external 'fix-assertions
+ (lambda _
+ ;; Current Tetgen version has a bug.
+ (substitute* "include/igl/copyleft/tetgen/tetgenio_to_tetmesh.cpp"
+ (("assert\\(out.numberofpoints == out.numberofpointmarkers\\);")
+ ";"))
+ ;; CGAL has a bug in assertion as well.
+ (substitute* "include/igl/copyleft/cgal/trim_with_solid.cpp"
+ (("assert\\(I.size\\(\\) == Vr.rows\\(\\)\\);")
+ ";"))))
+
+ ;; XXX: Install modules as CMake fails to install them.
+ (add-after 'install 'install-includes
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (include-dir (string-append out "/include/igl/")))
+ (for-each (lambda (module)
+ (copy-recursively (format #f "../source/include/igl/~a"
+ module)
+ (format #f "~a/~a" include-dir module)))
+ (list "copyleft/cgal"
+ "copyleft/opengl2"
+ "copyleft/tetgen"
+ "embree"
+ "opengl"
+ "predicates"
+ "xml"))))))))
+
+ (native-inputs (list catch2))
;; XXX: Inputs are currently only used to build tests.
;; We would need to patch the CMake recipe to build a shared library
;; with all of these.
(inputs
`(("boost" ,boost)
- ("catch2" ,catch2)
("cgal" ,cgal)
("eigen" ,eigen)
("embree" ,embree)
- ("glfw" ,glfw)
+ ("glfw" ,glfw-3.4)
("gmp" ,gmp)
("mesa" ,mesa)
("mpfr" ,mpfr)
("tbb" ,tbb)
("tinyxml2" ,tinyxml2)
+ ("openblas" ,openblas)
+ ("imgui" ,imgui)
+ ("spectra" ,spectra)
;; When updating this package, update commit fields below according to
;; the hashes listed in "cmake/LibiglDownloadExternal.cmake".
("libigl-test-data"
@@ -3615,13 +3677,16 @@ (define-public libigl
(file-name (git-file-name "libigl-test-data" version))
(sha256 (base32 "1wxglrxw74xw4a4jmmjpm8719f3mnlbxbwygjb4ddfixxxyya4i2"))))
("libigl-glad"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/libigl/libigl-glad")
- (commit "09b4969c56779f7ddf8e6176ec1873184aec890f")))
- (file-name (git-file-name "libigl-glad" version))
- (sha256 (base32 "0rwrs7513ylp6gxv7crjzflapcg9p7x04nzfvywgl665vl53rawk"))))
+ ,(let* ((commit "ead2d21fd1d9f566d8f9a9ce99ddf85829258c7a")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/libigl-glad")
+ (commit commit)))
+ (file-name (git-file-name "libigl-glad" version))
+ (sha256 (base32 "079fd5yrbd713nq7slhhgq79wns85pc564ydlkjl9gf43d3220ay")))))
("libigl-stb"
,(origin
(method git-fetch)
@@ -3631,22 +3696,57 @@ (define-public libigl
(file-name (git-file-name "libigl-stb" version))
(sha256 (base32 "0wwlb370z40y63ic3ny6q7lxibhixg2k1pjdkl4ymzv79zld28kj"))))
("libigl-predicates"
+ ,(let* ((commit "50c2149e7a520d13cd10e9aeff698bd68edd5a4f")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/libigl-predicates.git")
+ (commit commit)))
+ (file-name (git-file-name "libigl-predicates" version))
+ (sha256 (base32 "0yiqhzry2qhb1p0v9sldlnpqsn4y8cln8r6y08lafkc9kc4qy8jz")))))
+ ;; TODO: Package tetgen separately from <http://www.tetgen.org>
+ ("libigl-tetgen"
+ ,(let* ((commit "4f3bfba3997f20aa1f96cfaff604313a8c2c85b6")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/tetgen.git")
+ (commit commit)))
+ (file-name (git-file-name "libigl-tetgen" version))
+ (sha256 (base32 "1k724syssw37py7kwmibk3sfwkkgyjyy7qkijnhn6rjm91g8qxsg")))))
+ ("libigl-comiso"
+ ,(let* ((commit "562efe333edc8e649dc101469614f43378b1eb55")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/comiso.git")
+ (commit commit)))
+ (file-name (git-file-name "libigl-comiso" version))
+ (sha256 (base32 "048zryh9ydd1dqwzs14vj7r3fd6yyq6n4zl6d1b0yb1iwrqfy6ba")))))
+ ("libigl-triangle"
,(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/libigl/libigl-predicates.git")
- (commit "488242fa2b1f98a9c5bd1441297fb4a99a6a9ae4")))
- (file-name (git-file-name "libigl-predicates" version))
- (sha256 (base32 "13bd98g8lgcq37i3crj66433z09grnb2xjrcqpwqmyn147rp5wyh"))))
- ;; TODO: Package tetgen separately from <http://www.tetgen.org>
- ("libigl-tetgen"
+ (url "https://github.com/libigl/triangle.git")
+ (commit "6bbd92c7ddd6c803c403e005e1132eadb38fbe68")))
+ (file-name (git-file-name "libigl-triangle" version))
+ (sha256 (base32 "0d35mfqwdk99xn1lpjzz9w5axq016r6xy5vr00lb4mvb05limxl3"))))
+ ;; XXX: This is a source-only library which is currently required only for
+ ;; libigl.
+ ("imguizmo"
,(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/libigl/tetgen.git")
- (commit "4f3bfba3997f20aa1f96cfaff604313a8c2c85b6")))
- (file-name (git-file-name "libigl-tetgen" version))
- (sha256 (base32 "1k724syssw37py7kwmibk3sfwkkgyjyy7qkijnhn6rjm91g8qxsg"))))))
+ (url "https://github.com/CedricGuillemet/ImGuizmo")
+ (commit "1.83")))
+ (file-name (git-file-name "imguizmo" version))
+ (sha256 (base32 "14ywf96nvxf5c081pwypyzjwx9vyq78glbzinc81558v1sxiy2v0"))))))
(home-page "https://libigl.github.io/")
(synopsis "Simple C++ geometry processing library")
(description "This library provides functionality for shape modelling,
--
2.45.2
A
A
Artyom V. Poptsov wrote on 1 Jul 19:07 +0200
[PATCH v2 5/8] gnu: Add heatshrink.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
b62cb9a5dc4d03a01266ea8d151db3810e73ba87.1719853592.git.poptsov.artyom@gmail.com
* gnu/packages/compression.scm (heatshrink): New variable.
* gnu/packages/patches/heatshrink-add-cmake.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add "heatshrink-add-cmake.patch".

Change-Id: I0beccdcaed22e47ac6bfe522497e0759a315813d
---
gnu/local.mk | 1 +
gnu/packages/compression.scm | 42 +++++++
.../patches/heatshrink-add-cmake.patch | 111 ++++++++++++++++++
3 files changed, 154 insertions(+)
create mode 100644 gnu/packages/patches/heatshrink-add-cmake.patch

Toggle diff (191 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index e20ed2be7e..e263261986 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1474,6 +1474,7 @@ dist_patch_DATA = \
%D%/packages/patches/hdf-eos5-remove-gctp.patch \
%D%/packages/patches/hdf-eos5-fix-szip.patch \
%D%/packages/patches/hdf-eos5-fortrantests.patch \
+ %D%/packages/patches/heatshrink-add-cmake.patch \
%D%/packages/patches/heimdal-CVE-2022-45142.patch \
%D%/packages/patches/helm-fix-gcc-9-build.patch \
%D%/packages/patches/highlight-gui-data-dir.patch \
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index ac025e0e3d..0a028f1490 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -40,6 +40,7 @@
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2024 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -574,6 +575,47 @@ (define-public xz
(license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
(home-page "https://tukaani.org/xz/")))
+(define-public heatshrink
+ (package
+ (name "heatshrink")
+ (version "0.4.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/atomicobject/heatshrink/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0sdhvk27yz8kahw18j8pddbpkgl78v8rh8fx6wspc3acj7w7yvrn"))
+ ;; Add CMake build script, wanted by prusa-slicer and libbgcode, which are the
+ ;; only users of this library.
+ ;;
+ ;; See
+ ;; <https://github.com/NixOS/nixpkgs/pull/269758/commits/fa36136ceed0e2c58e0c9e21492a7e60c3a64470>
+ (patches (search-patches "heatshrink-add-cmake.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ ;; XXX: No tests available with CMake.
+ ;; See <https://github.com/atomicobject/heatshrink/pull/77>
+ #:tests? #f))
+ (home-page "https://github.com/atomicobject/heatshrink/")
+ (synopsis "Data compression library for embedded/real-time systems")
+ (description
+ "A data compression/decompression library for embedded/real-time systems.
+
+Among its features are:
+@itemize
+@item Low memory usage (as low as 50 bytes.) It is useful for some cases with less
+than 50 bytes, and useful for many general cases with less than 300 bytes.
+@item Incremental, bounded CPU use. It can be used to chew on input data in
+arbitrarily tiny bites. This is a useful property in hard real-time environments.
+@item Can use either static or dynamic memory allocation.
+@end itemize
+")
+ (license license:isc)))
+
(define-public lhasa
(package
(name "lhasa")
diff --git a/gnu/packages/patches/heatshrink-add-cmake.patch b/gnu/packages/patches/heatshrink-add-cmake.patch
new file mode 100644
index 0000000000..f67f87126e
--- /dev/null
+++ b/gnu/packages/patches/heatshrink-add-cmake.patch
@@ -0,0 +1,111 @@
+From 0886e9ca76552b8e325841e2b820b4563e5d5aba Mon Sep 17 00:00:00 2001
+From: tamasmeszaros <meszaros.q@gmail.com>
+Date: Thu, 27 Jul 2023 23:11:25 +0200
+Subject: [PATCH] Add CMake build script
+
+---
+ CMakeLists.txt | 82 +++++++++++++++++++++++++++++++++++++++++++++++++
+ Config.cmake.in | 5 +++
+ 2 files changed, 87 insertions(+)
+ create mode 100644 CMakeLists.txt
+ create mode 100644 Config.cmake.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..5b840eb
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,82 @@
++cmake_minimum_required(VERSION 3.10)
++
++project(heatshrink C)
++
++add_library(${PROJECT_NAME} heatshrink_decoder.c heatshrink_encoder.c)
++add_library(${PROJECT_NAME}_dynalloc heatshrink_decoder.c heatshrink_encoder.c)
++
++find_library(MATH_LIBRARY m) # Business as usual
++if(MATH_LIBRARY)
++ target_link_libraries(${PROJECT_NAME} PUBLIC ${MATH_LIBRARY})
++endif()
++
++target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
++target_include_directories(${PROJECT_NAME}_dynalloc PUBLIC $<INSTALL_INTERFACE:include>)
++
++target_compile_definitions(${PROJECT_NAME} PUBLIC HEATSHRINK_DYNAMIC_ALLOC=0)
++target_compile_definitions(${PROJECT_NAME}_dynalloc PUBLIC HEATSHRINK_DYNAMIC_ALLOC=1)
++
++if (UNIX)
++ add_executable(${PROJECT_NAME}_cmd heatshrink.c)
++ target_link_libraries(${PROJECT_NAME}_cmd ${PROJECT_NAME}_dynalloc)
++ set_target_properties(${PROJECT_NAME}_cmd PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
++endif ()
++
++# Installation and export:
++
++include(CMakePackageConfigHelpers)
++
++write_basic_package_version_file(
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
++ VERSION 0.4.1
++ COMPATIBILITY AnyNewerVersion
++)
++
++set(_exported_targets ${PROJECT_NAME} ${PROJECT_NAME}_dynalloc)
++if (UNIX)
++ list(APPEND _exported_targets ${PROJECT_NAME}_cmd)
++endif ()
++
++install(TARGETS ${_exported_targets}
++ EXPORT ${PROJECT_NAME}Targets
++)
++
++export(EXPORT ${PROJECT_NAME}Targets
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake"
++ NAMESPACE ${PROJECT_NAME}::
++)
++
++include(GNUInstallDirs)
++set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
++
++configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
++ INSTALL_DESTINATION ${ConfigPackageLocation}
++)
++
++install(
++ FILES
++ heatshrink_common.h
++ heatshrink_config.h
++ heatshrink_encoder.h
++ heatshrink_decoder.h
++ DESTINATION
++ include/${PROJECT_NAME}
++ )
++
++install(EXPORT ${PROJECT_NAME}Targets
++ FILE
++ ${PROJECT_NAME}Targets.cmake
++ NAMESPACE
++ ${PROJECT_NAME}::
++ DESTINATION
++ ${ConfigPackageLocation}
++)
++
++install(
++ FILES
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
++ DESTINATION
++ ${ConfigPackageLocation}
++)
+diff --git a/Config.cmake.in b/Config.cmake.in
+new file mode 100644
+index 0000000..0809ba9
+--- /dev/null
++++ b/Config.cmake.in
+@@ -0,0 +1,5 @@
++@PACKAGE_INIT@
++
++if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake)
++ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
++endif ()
--
2.45.2
A
A
Artyom V. Poptsov wrote on 1 Jul 19:07 +0200
[PATCH v2 6/8] gnu: Add prusa-libbgcode.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
2cdedc4189efac291f16e099b91605a8f8f4aca9.1719853592.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (prusa-libbgcode): New variable.

Change-Id: I1f18c399d0fe36987c613ce4c0c3845c803beb45
---
gnu/packages/engineering.scm | 46 ++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 7f29e2c365..de4b4a5825 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3753,6 +3753,52 @@ (define-public libigl
visualization, matrix manipulation.")
(license (list license:gpl3 license:mpl2.0))))
+(define-public prusa-libbgcode
+ (let ((commit "8ae75bd0eea622f0e34cae311b3bd065b55eae9b")
+ (revision "0"))
+ (package
+ (name "prusa-libbgcode")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/prusa3d/libbgcode")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256 (base32 "0fjx2ijz9zqpqs486lcrrrhqvmfzrpb8j6v57l0jiynavwv3kznw"))))
+ (native-inputs (list catch2))
+ (propagated-inputs
+ (list zlib boost heatshrink))
+ (build-system cmake-build-system)
+ (home-page "https://github.com/prusa3d/libbgcode")
+ (synopsis "Prusa Block and Binary G-code reader/writer/converter")
+ (description
+ "Binary G-code is a new standard for encoding and compressing ASCII G-code
+files. G-code files are easy to read and interpret, but their downside is that the
+data is not saved efficiently, and the file size is often very large. Compression of
+the file is problematic because the printers usually run on limited hardware and they
+may not have enough memory and/or CPU power to decompress it.
+
+Block and Binary G-Code is a new G-code file format featuring the following
+improvements over the legacy G-code:
+@itemize
+@item Block structure with distinct blocks for metadata vs. G-code.
+@item Faster navigation.
+@item Coding and compression for smaller file size.
+@item Checksum for data validity.
+@item Extensibility through new (custom) blocks. For example, a file signature block
+may be welcome by corporate customers.
+@end itemize
+
+The binary G-code format is flexible and the encoding and compression of individual
+blocks is variable. @code{libbgcode} library contains the routines to convert ASCII
+G-codes to binary and vice versa. The library is written in C++ and the repository
+includes bindings for Python.")
+ ;; See
+ ;; <https://github.com/prusa3d/libbgcode/blob/main/pyproject.toml>
+ (license license:agpl3+))))
+
(define-public prusa-slicer
(package
(name "prusa-slicer")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 1 Jul 19:07 +0200
[PATCH v2 7/8] gnu: Add prusa-wxwidgets.
(address . 70880@debbugs.gnu.org)
9f39081f248d8efe78b8234a9642a367a3e05827.1719853592.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (prusa-wxwidgets): New variable.
* gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register
"prusa-wxwidgets-makefile-fix.patch".

Co-authored-by: Nikita Domnitskii <nikita@domnitskii.me>
Change-Id: I9043c2acc95986275ee24d9c5d944e5fe2702e99
---
gnu/local.mk | 1 +
.../prusa-wxwidgets-makefile-fix.patch | 112 ++++++++++++++++++
gnu/packages/wxwidgets.scm | 29 +++++
3 files changed, 142 insertions(+)
create mode 100644 gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch

Toggle diff (172 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index e263261986..29107a618b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1842,6 +1842,7 @@ dist_patch_DATA = \
%D%/packages/patches/prusa-slicer-boost-fixes.patch \
%D%/packages/patches/prusa-slicer-fix-tests.patch \
%D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \
+ %D%/packages/patches/prusa-wxwidgets-makefile-fix.patch \
%D%/packages/patches/pthreadpool-system-libraries.patch \
%D%/packages/patches/python-3.12-fix-tests.patch \
%D%/packages/patches/python-accupy-use-matplotx.patch \
diff --git a/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch b/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch
new file mode 100644
index 0000000000..aadf976588
--- /dev/null
+++ b/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch
@@ -0,0 +1,112 @@
+diff --git a/Makefile.in b/Makefile.in
+index 8f33aa2ff4..39928382da 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -4358,7 +4358,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS = \
+ monodll_msw_utils.o \
+ monodll_utilsexc.o \
+ monodll_fswatcher.o \
+- monodll_msw_secretstore.o
++ monodll_msw_secretstore.o \
+ monodll_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS \
+@@ -5284,7 +5284,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS = \
+ monodll_uuid.o \
+ monodll_msw_evtloop.o \
+ monodll_access.o \
+- monodll_dark_mode.o
++ monodll_dark_mode.o \
+ monodll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS = \
+@@ -6196,7 +6196,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1 = \
+ monodll_uuid.o \
+ monodll_msw_evtloop.o \
+ monodll_access.o \
+- monodll_dark_mode.o
++ monodll_dark_mode.o \
+ monodll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_1 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_1 = \
+@@ -6371,7 +6371,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1 = \
+ monolib_msw_utils.o \
+ monolib_utilsexc.o \
+ monolib_fswatcher.o \
+- monolib_msw_secretstore.o
++ monolib_msw_secretstore.o \
+ monolib_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_1 \
+@@ -7297,7 +7297,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2 = \
+ monolib_uuid.o \
+ monolib_msw_evtloop.o \
+ monolib_access.o \
+- monolib_dark_mode.o
++ monolib_dark_mode.o \
+ monolib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_2 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_2 = \
+@@ -8209,7 +8209,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3 = \
+ monolib_uuid.o \
+ monolib_msw_evtloop.o \
+ monolib_access.o \
+- monolib_dark_mode.o
++ monolib_dark_mode.o \
+ monolib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_3 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_3 = \
+@@ -8436,7 +8436,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2 = \
+ basedll_msw_utils.o \
+ basedll_utilsexc.o \
+ basedll_fswatcher.o \
+- basedll_msw_secretstore.o
++ basedll_msw_secretstore.o \
+ basedll_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_2 \
+@@ -8523,7 +8523,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3 = \
+ baselib_msw_utils.o \
+ baselib_utilsexc.o \
+ baselib_fswatcher.o \
+- baselib_msw_secretstore.o
++ baselib_msw_secretstore.o \
+ baselib_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_3 \
+@@ -9464,7 +9464,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4 = \
+ coredll_uuid.o \
+ coredll_msw_evtloop.o \
+ coredll_access.o \
+- coredll_dark_mode.o
++ coredll_dark_mode.o \
+ coredll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_4 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_4 = \
+@@ -10376,7 +10376,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5 = \
+ coredll_uuid.o \
+ coredll_msw_evtloop.o \
+ coredll_access.o \
+- coredll_dark_mode.o
++ coredll_dark_mode.o \
+ coredll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_5 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_5 = \
+@@ -11204,7 +11204,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6 = \
+ corelib_uuid.o \
+ corelib_msw_evtloop.o \
+ corelib_access.o \
+- corelib_dark_mode.o
++ corelib_dark_mode.o \
+ corelib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_6 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_6 = \
+@@ -12116,7 +12116,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7 = \
+ corelib_uuid.o \
+ corelib_msw_evtloop.o \
+ corelib_access.o \
+- corelib_dark_mode.o
++ corelib_dark_mode.o \
+ corelib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_7 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_7 = \
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index 973e962fb1..2cf2ceba56 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -265,6 +265,35 @@ (define-public wxwidgets-2
(("-Wall") "-Wall -Wno-narrowing"))
#t)))))))
+(define-public prusa-wxwidgets
+ ;; There is no tag/release, all patches are in separate branch.
+ (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26"))
+ (package
+ (inherit wxwidgets)
+ (name "prusa-wxwidgets")
+ (version "3.2.0")
+ (home-page "https://github.com/prusa3d/wxWidgets")
+ (source
+ (origin
+ (inherit (package-source wxwidgets))
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (patches (search-patches "prusa-wxwidgets-makefile-fix.patch"))
+ (sha256
+ (base32
+ "02nd07c23xbclnf1jjfbv6r5vqjb80gsdy2l559c5qzgdcvfd2xd"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments wxwidgets)
+ ((#:configure-flags flags)
+ ;; To fix 3D rendering in PrusaSlicer, wxWidgets must be compiled with
+ ;; "--disable-glcanvasegl" flag.
+ ;;
+ ;; See <https://github.com/NixOS/nixpkgs/issues/193135>
+ #~(cons "--disable-glcanvasegl" #$flags)))))))
+
(define-public python-wxpython
(package
(name "python-wxpython")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 1 Jul 19:07 +0200
[PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
6ad909cee24b19c9d2e834ddbe1de8f7d8b76979.1719853592.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (prusa-slicer): Update to 2.7.4. [source]:
Remove "prusa-slicer-boost-fixes.patch" and
"prusa-slicer-with-cereal-1.3.1.patch". Move some part of the snippet code
to custom build phases.
[arguments]: In configure flags add paths to external libraries.
Add "fix-include-paths" phase.
[native-inputs]: Add "catch2".
[inputs]: Use "prusa-wxwidgets" instead of "wxwidgets" to fix segfaults.
Ad "qhull", "nanosvg", "heatshrink" and "prusa-libbgcode".
* gnu/packages/patches/prusa-slicer-boost-fixes.patch,
gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch: Remove unused
patches.
* gnu/local.mk (dist_patch_DATA): De-register "prusa-slicer-boost-fixes.patch"
and "prusa-slicer-with-cereal-1.3.1.patch".

Change-Id: I15e85d63c9ad6c731c8040ef2d8ec8b2f31f2ab7
---
gnu/local.mk | 2 -
gnu/packages/engineering.scm | 53 ++++++----
.../patches/prusa-slicer-boost-fixes.patch | 97 -------------------
.../prusa-slicer-with-cereal-1.3.1.patch | 52 ----------
4 files changed, 35 insertions(+), 169 deletions(-)
delete mode 100644 gnu/packages/patches/prusa-slicer-boost-fixes.patch
delete mode 100644 gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch

Toggle diff (273 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 29107a618b..d9760557df 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1839,9 +1839,7 @@ dist_patch_DATA = \
%D%/packages/patches/pokerth-boost.patch \
%D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
%D%/packages/patches/procps-strtod-test.patch \
- %D%/packages/patches/prusa-slicer-boost-fixes.patch \
%D%/packages/patches/prusa-slicer-fix-tests.patch \
- %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \
%D%/packages/patches/prusa-wxwidgets-makefile-fix.patch \
%D%/packages/patches/pthreadpool-system-libraries.patch \
%D%/packages/patches/python-3.12-fix-tests.patch \
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index de4b4a5825..2a3671b01d 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3802,7 +3802,7 @@ (define-public prusa-libbgcode
(define-public prusa-slicer
(package
(name "prusa-slicer")
- (version "2.5.2")
+ (version "2.7.4")
(source
(origin
(method git-fetch)
@@ -3811,13 +3811,11 @@ (define-public prusa-slicer
(url "https://github.com/prusa3d/PrusaSlicer")
(commit (string-append "version_" version))))
(file-name (git-file-name name version))
- (sha256 (base32 "02qcrw3fa0d8ldbp73hp14l1qxbp3f4608j4csc07ny00ra42151"))
- (patches (search-patches "prusa-slicer-boost-fixes.patch"
- "prusa-slicer-fix-tests.patch"
- "prusa-slicer-with-cereal-1.3.1.patch"))
+ (sha256 (base32 "0s1cfvhfilyv0y98asr61c6rwlgyr1hf5v5hg8q9zwmzm2bkcql3"))
+ (patches (search-patches "prusa-slicer-fix-tests.patch"))
(modules '((guix build utils)))
(snippet
- '(begin
+ `(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.
@@ -3825,10 +3823,12 @@ (define-public prusa-slicer
(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\\(libigl\\)" all)
- (string-append
- all "\ninclude_directories(libigl INTERFACE libigl::core)"))
(("add_subdirectory\\(hidapi\\)")
"pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
(("include_directories\\(hidapi/include\\)")
@@ -3841,13 +3841,26 @@ (define-public prusa-slicer
(("\\bhidapi\\b") "${HIDAPI_LIBRARIES}"))))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
- '("-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")))
+ (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))
+ (list pkg-config catch2))
(inputs
(list boost
cereal
@@ -3873,9 +3886,13 @@ (define-public prusa-slicer
pango
tbb
eudev
- ;; prusa-slicer 2.5 segfaults on startup with wxwidgets 3.2
- ;; See https://github.com/prusa3d/PrusaSlicer/issues/8299
- wxwidgets-3.0
+ qhull
+ nanosvg
+ heatshrink
+ ;; XXX: Using Prusa wxWidgets fork as PrusaSlicer segfaults when compiled
+ ;; with regular wxwidgets.
+ prusa-wxwidgets
+ prusa-libbgcode
zlib))
(home-page "https://www.prusa3d.com/prusaslicer/")
(synopsis "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)")
diff --git a/gnu/packages/patches/prusa-slicer-boost-fixes.patch b/gnu/packages/patches/prusa-slicer-boost-fixes.patch
deleted file mode 100644
index 5bca271625..0000000000
--- a/gnu/packages/patches/prusa-slicer-boost-fixes.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-Fixes for Boost compatibility.
-This patch comes from Gentoo:
- portage/media-gfx/prusaslicer/files/prusaslicer-2.5.0_alpha2-boost-fixes.patch
-
---- a/src/hints/HintsToPot.cpp
-+++ b/src/hints/HintsToPot.cpp
-@@ -1,6 +1,7 @@
- #include <iostream>
- #include <vector>
- #include <string>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/dll.hpp>
- #include <boost/property_tree/ini_parser.hpp>
-@@ -9,7 +10,7 @@
-
- bool write_to_pot(boost::filesystem::path path, const std::vector<std::pair<std::string, std::string>>& data)
- {
-- boost::filesystem::ofstream file(std::move(path), std::ios_base::app);
-+ boost::nowide::ofstream file(std::move(path), std::ios_base::app);
- for (const auto& element : data)
- {
- //Example of .pot element
---- a/src/libslic3r/Preset.cpp
-+++ b/src/libslic3r/Preset.cpp
-@@ -25,6 +25,7 @@
- #include <stdexcept>
- #include <unordered_map>
- #include <boost/format.hpp>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/filesystem/fstream.hpp>
- #include <boost/algorithm/string.hpp>
-@@ -84,7 +85,7 @@ ConfigFileType guess_config_file_type(const ptree &tree)
- VendorProfile VendorProfile::from_ini(const boost::filesystem::path &path, bool load_all)
- {
- ptree tree;
-- boost::filesystem::ifstream ifs(path);
-+ boost::nowide::ifstream ifs(path);
- boost::property_tree::read_ini(ifs, tree);
- return VendorProfile::from_ini(tree, path, load_all);
- }
---- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp
-+++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
-@@ -10,6 +10,7 @@
- #include "libslic3r/Platform.hpp"
- #include "libslic3r/Config.hpp"
-
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/log/trivial.hpp>
- #include <boost/dll/runtime_symbol_info.hpp>
-@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog()
-
- } // namespace GUI
- } // namespace Slic3r
--#endif // __linux__
-\ No newline at end of file
-+#endif // __linux__
---- a/src/slic3r/GUI/GUI_App.cpp
-+++ b/src/slic3r/GUI/GUI_App.cpp
-@@ -13,6 +13,7 @@
- #include <cstdlib>
- #include <regex>
- #include <string_view>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/algorithm/string/predicate.hpp>
- #include <boost/algorithm/string.hpp>
- #include <boost/format.hpp>
---- a/src/slic3r/GUI/HintNotification.cpp
-+++ b/src/slic3r/GUI/HintNotification.cpp
-@@ -15,6 +15,7 @@
- #include "libslic3r/PrintConfig.hpp"
-
- #include <boost/algorithm/string/replace.hpp>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/nowide/fstream.hpp>
- #include <boost/log/trivial.hpp>
-@@ -65,7 +66,7 @@ inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, f
-
- void write_used_binary(const std::vector<std::string>& ids)
- {
-- boost::filesystem::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary);
-+ boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary);
- cereal::BinaryOutputArchive archive(file);
- HintsCerealData cd { ids };
- try
-@@ -84,7 +85,7 @@ void read_used_binary(std::vector<std::string>& ids)
- BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string();
- return;
- }
-- boost::filesystem::ifstream file(path);
-+ boost::nowide::ifstream file(path);
- cereal::BinaryInputArchive archive(file);
- HintsCerealData cd;
- try
diff --git a/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch b/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
deleted file mode 100644
index affa506b1c..0000000000
--- a/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Fix for building with cereal>=1.3.1.
-This patch comes from Gentoo:
- portage/media-gfx/prusaslicer/files/prusaslicer-2.5.0_rc1-cereal-1.3.1.patch
-
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -127,7 +127,7 @@
- set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
- endif ()
-
--target_link_libraries(PrusaSlicer libslic3r cereal)
-+target_link_libraries(PrusaSlicer libslic3r libcereal)
-
- if (APPLE)
- # add_compile_options(-stdlib=libc++)
---- a/src/slic3r/CMakeLists.txt
-+++ b/src/slic3r/CMakeLists.txt
-@@ -260,7 +260,7 @@
-
- encoding_check(libslic3r_gui)
-
--target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
-+target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
-
- if (MSVC)
- target_link_libraries(libslic3r_gui Setupapi.lib)
---- a/src/libslic3r/CMakeLists.txt
-+++ b/src/libslic3r/CMakeLists.txt
-@@ -395,7 +395,7 @@
- target_link_libraries(libslic3r
- libnest2d
- admesh
-- cereal
-+ libcereal
- libigl
- miniz
- boost_libs
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -446,6 +446,12 @@
-
- # Find the Cereal serialization library
- find_package(cereal REQUIRED)
-+add_library(libcereal INTERFACE)
-+if (NOT TARGET cereal::cereal)
-+ target_link_libraries(libcereal INTERFACE cereal)
-+else()
-+ target_link_libraries(libcereal INTERFACE cereal::cereal)
-+endif()
-
- # l10n
- set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 9 Jul 20:59 +0200
Re: [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 70880@debbugs.gnu.org)
87bk36qtmp.fsf@gmail.com
Hello Maxim Cournoyer!

Have you had any chance to review the new version of the patchset?

There's already PrusaSlicer 2.8.0, but I'd like to finish my work on
2.7.4 first and after the patchset is merged I'm going to try to update
PrusaSlicer to 2.8.0.

Thanks,
-avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmaNiIMZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfsRPD/9r5iNWXKgUhIGq5JYjQoXS
4undzlZ5t4JhxamYqMjTdmHp1XvN/D8nyd1XiQIbZIcKwxYrdfj2M3jcfvOMRhhR
l1W5fkhRxyomR2Luml5UP9UTLj38yHIJJ5ThxaVHxNDLzdDxQBtmPNhYO2/6dtJN
sB1e9qBliUu7gdsQ9N8Fud84hjpMaKlBoftPKHXpyz00ocL1vbeZwADdaZHy9pNI
CpNY8IvYzIdybPrDtIuj7QSlok1Rqydu3hbiJiz6tPP2lu7+5FKZ3COwdHj1xuK+
9JUMUeayw4Fb7S3N1oLUTvQUGMKmibPSHpv9GMyvuNmH+1sBRTWG+qcmlMm8v11r
UiGOSeBHqfpoVeA2mTzo2XOqx1Zuwa0v8FEdbX+VyAj87Wow6YRsBSKc+VtnTeHe
cI7l+mMot1F1ITspIOXFDgAsj/6MFhW3W78E3FR3NQJorAsdk9Xk9HYPcllcrmJR
z+i4Pg1vwkDDpI00PhvhatSeUjT2OR8okVfin42lPdZb89KWRk+1g9k5iMXzdyRO
Y7G3C+JEb+4R3bqiPUMpLj/mWtx3nliSn7u5vSS5ghngFE4SULYiGz3/in4vY8jz
wOKFxzH5oRy1cz6jAChhr71a/56Dc7baC//gUdXJu6AKk3EtFc4d5LJpoHbyhq95
dHijN0XHNDuSo0MTErHUyQ==
=p/G6
-----END PGP SIGNATURE-----

M
M
Maxim Cournoyer wrote on 10 Jul 04:11 +0200
Re: [bug#70880] [PATCH v2 3/8] gnu: glfw-3.4: New variable.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 70880@debbugs.gnu.org)
87a5iqvvvf.fsf@gmail.com
Hello,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (30 lines)
> * gnu/packages/gl.scm (glfw-3.4): New variable.
>
> Change-Id: I77f2214c78f35455436897a3fbff083331295314
> ---
> gnu/packages/gl.scm | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
> index f40ddaeb86..2d684e9c80 100644
> --- a/gnu/packages/gl.scm
> +++ b/gnu/packages/gl.scm
> @@ -995,6 +995,21 @@ (define-public glfw
> and surfaces, receiving input and events.")
> (license license:zlib)))
>
> +(define-public glfw-3.4
> + (package
> + (inherit glfw)
> + (version "3.4")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/glfw/glfw"
> + "/releases/download/" version
> + "/glfw-" version ".zip"))
> + (sha256
> + (base32
> + "1sd396kkn53myp61kxrd18h7b1q4ix173hhxhvl0iz8j4x5h1v5m"))))
> + (inputs (modify-inputs (package-inputs glfw)
> + (prepend pkg-config)))))

pkg-config should probably be in native-inputs, since it's used at build
time only.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 10 Jul 04:20 +0200
Re: [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 70880@debbugs.gnu.org)
875xtevvgl.fsf@gmail.com
"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (12 lines)
> * gnu/packages/engineering.scm (libigl): Update to 2.4.0.
> [arguments]: Use Gexps. Update configure flags. Disable GLFW tests as they
> are failing with SEGFAULT errors (see
> <https://github.com/libigl/libigl/issues/2313>.)
> Update "unpack-external" phase: add new dependencies.
> Update "patch-cmake" phase to prevent CMake from trying to download external
> dependencies. Help CMake to find the package inputs.
> Add "fix-assertions" and "install-copyleft-modules" phase.
> [native-inputs]: Add catch2.
> [inputs]: Use glfw-3.4. Add openblas, imgui and spectra. Add libigl
> packages and imguizmo. Remove catch2.

Nitpick: no need for hanging indents in GNU ChangeLog messages.

Toggle quote (95 lines)
> Change-Id: Ib4ac842dc14fe1cbc6b0b87674bae1f261a1a970
> ---
> gnu/packages/engineering.scm | 258 ++++++++++++++++++++++++-----------
> 1 file changed, 179 insertions(+), 79 deletions(-)
>
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index fcb73eab12..7f29e2c365 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -33,7 +33,7 @@
> ;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
> ;;; Copyright © 2022 Konstantinos Agiannis <agiannis.kon@gmail.com>
> ;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
> -;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
> +;;; Copyright © 2022-2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
> ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
> ;;; Copyright © 2022, 2023 Felix Gruber <felgru@posteo.net>
> ;;; Copyright © 2023 Theofilos Pechlivanis <theofilos.pechlivanis@gmail.com>
> @@ -162,6 +162,7 @@ (define-module (gnu packages engineering)
> #:use-module (gnu packages text-editors)
> #:use-module (gnu packages time)
> #:use-module (gnu packages tls)
> + #:use-module (gnu packages toolkits)
> #:use-module (gnu packages tree-sitter)
> #:use-module (gnu packages version-control)
> #:use-module (gnu packages web)
> @@ -3510,7 +3511,7 @@ (define-public xfoil
> (define-public libigl
> (package
> (name "libigl")
> - (version "2.3.0")
> + (version "2.4.0")
> (source
> (origin
> (method git-fetch)
> @@ -3520,90 +3521,151 @@ (define-public libigl
> (file-name (git-file-name name version))
> (sha256
> (base32
> - "004a22ifq2vibgkgvrlyihqimpsfizvq5l448204kwfg3lkycajj"))))
> + "0qlnpp8nxbahcky4d67dzn0ynbv3v037nbx1akq6h5rzhvkzq40x"))))
> (build-system cmake-build-system)
> (arguments
> - `(#:configure-flags
> - '("-DLIBIGL_USE_STATIC_LIBRARY=OFF"
> - "-DLIBIGL_BUILD_TESTS=ON"
> - "-DLIBIGL_BUILD_TUTORIALS=OFF"
> - "-DLIBIGL_EXPORT_TARGETS=ON"
> - ;; The following options disable tests for the corresponding libraries.
> - ;; The options do not affect whether the libraries are linked to
> - ;; libigl or not, they are used for tests.
> - "-DLIBIGL_WITH_COMISO=OFF"
> - "-DLIBIGL_WITH_CORK=OFF"
> - "-DLIBIGL_WITH_MATLAB=OFF"
> - "-DLIBIGL_WITH_MOSEK=OFF"
> - "-DLIBIGL_WITH_TRIANGLE=OFF" ;; Undefined reference to "triangulate".
> - "-DLIBIGL_WITH_OPENGL_GLFW_IMGUI=OFF")
> + (list #:configure-flags
> + #~(list "-DLIBIGL_USE_STATIC_LIBRARY=OFF"
> + "-DLIBIGL_BUILD_TESTS=ON"
> + "-DLIBIGL_BUILD_TUTORIALS=OFF"
> + "-DLIBIGL_INSTALL=ON"
> + "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
> + (format #f "-DCatch2_DIR=~a/lib/cmake/catch2/"
> + #$(this-package-input "catch2"))
> + (format #f "-DSpectra_DIR=~a/share/pectra/cmake/"
> + #$(this-package-input "spectra"))
> + ;; The following options disable tests for the corresponding libraries.
> + ;; The options do not affect whether the libraries are linked to
> + ;; libigl or not, they are used for tests.
> + "-DLIBIGL_WITH_COMISO=OFF"
> + "-DLIBIGL_WITH_CORK=OFF"
> + "-DLIBIGL_MATLAB=OFF"
> + "-DLIBIGL_MOSEK=OFF"
> + ;; XXX: GLFW tests are failing with SEGFAULT. See
> + ;; <https://github.com/libigl/libigl/issues/2313>
> + "-DLIBIGL_GLFW_TESTS=OFF")
> + #:build-type "Release"
> #:phases
> - (modify-phases %standard-phases
> + #~(modify-phases %standard-phases
> (add-after 'unpack 'unpack-external
> (lambda _
> (setenv "HOME" (getcwd)) ;; cmake needs this to export modules
> (mkdir "external")
> (copy-recursively (assoc-ref %build-inputs "libigl-glad") "external/glad")
> - (copy-recursively (assoc-ref %build-inputs "libigl-stb") "external/stb")
> + (copy-recursively (assoc-ref %build-inputs "libigl-test-data") "external/test-data")
> + (copy-recursively (assoc-ref %build-inputs "libigl-comiso") "external/comiso")
> (copy-recursively (assoc-ref %build-inputs "libigl-tetgen") "external/tetgen")
> - (copy-recursively (assoc-ref %build-inputs "libigl-predicates") "external/predicates")))
> + (copy-recursively (assoc-ref %build-inputs "libigl-predicates") "external/predicates")
> + (copy-recursively (assoc-ref %build-inputs "imguizmo") "external/imguizmo")
> + (copy-recursively (assoc-ref %build-inputs "eigen") "external/eigen")))

You'll want to break these long lines; we aim to limit line width below
80 columns. 'guix lint' should complain.

Toggle quote (102 lines)
> (add-after 'unpack-external 'patch-cmake
> - (lambda _
> + (lambda* (#:key inputs #:allow-other-keys)
> + (define (source-dir library-name)
> + (format #f "SOURCE_DIR \"~a\""
> + (assoc-ref %build-inputs library-name)))
> + (define (fix-external-library cmake source)
> + (substitute* (format #f "cmake/recipes/external/~a.cmake"
> + cmake)
> + (("GIT_REPOSITORY.*") (source-dir source))
> + (("GIT_TAG.*") "")))
> ;; Fix references to external libraries
> - (substitute* "cmake/libigl.cmake"
> - (("if\\(NOT TARGET Eigen3::Eigen\\)" all)
> - (string-append "find_package(Eigen3 CONFIG REQUIRED)\n" all))
> - (("if\\(NOT TARGET CGAL::CGAL\\)" all)
> - (string-append "find_package(CGAL CONFIG COMPONENTS Core)\n" all))
> - (("if\\(NOT TARGET tinyxml2\\)" all)
> - (string-append "find_package(tinyxml2 CONFIG REQUIRED)\n"
> - "if (NOT TARGET tinyxml2::tinyxml2)"))
> - (("if\\(NOT TARGET embree\\)" all)
> - (string-append "find_package(embree 3 CONFIG REQUIRED)\n" all))
> - (("if\\(NOT TARGET glfw\\)" all)
> - (string-append "find_package(glfw3 CONFIG REQUIRED)\n" all))
> - (("igl_download_glad\\(\\)" all) "")
> - (("igl_download_stb\\(\\)" all) "")
> - (("igl_download_tetgen\\(\\)" all) "")
> - (("igl_download_triangle\\(\\)" all) "")
> - (("igl_download_predicates\\(\\)" all) ""))
> - (substitute* "tests/CMakeLists.txt"
> - (("igl_download_test_data\\(\\)") "")
> - (("set\\(IGL_TEST_DATA.*")
> - (format #f "set(IGL_TEST_DATA ~a)\n"
> - (assoc-ref %build-inputs "libigl-test-data")))
> - (("igl_download_catch2\\(\\)") "find_package(Catch2 CONFIG REQUIRED)")
> - (("list\\(APPEND CMAKE_MODULE_PATH \\$\\{LIBIGL_EXTERNAL\\}/catch2/contrib\\)")
> - "")
> - (("add_subdirectory\\(\\$\\{LIBIGL_EXTERNAL\\}/catch2 catch2\\)") ""))
> - ;; Install otherwise missing headers
> - (substitute* "cmake/libigl.cmake"
> - (("install_dir_files\\(copyleft\\)" all)
> - (string-join (list all
> - "install_dir_files(copyleft/cgal)"
> - "install_dir_files(copyleft/opengl)"
> - "install_dir_files(copyleft/tetgen)"
> - "install_dir_files(embree)"
> - "install_dir_files(opengl)"
> - "install_dir_files(png)"
> - "install_dir_files(predicates)"
> - "install_dir_files(xml)")
> - "\n"))))))))
> + (fix-external-library "comiso" "libigl-comiso")
> + (fix-external-library "tetgen" "libigl-tetgen")
> + (fix-external-library "triangle" "libigl-triangle")
> + (fix-external-library "predicates" "libigl-predicates")
> + (fix-external-library "glad" "libigl-glad")
> + (fix-external-library "libigl_tests_data" "libigl-test-data")
> + (fix-external-library "stb" "libigl-stb")
> + (substitute* "cmake/recipes/external/imguizmo.cmake"
> + (("if\\(TARGET imguizmo::imguizmo\\)")
> + "if(true)")
> + (("target_link_libraries.*")
> + (format #f "include_directories(~a/include/imgui/)"
> + (assoc-ref inputs "imgui"))))
> +
> + (substitute* "cmake/igl/igl_add_test.cmake"
> + (("include\\(\".*/contrib/Catch.cmake\"\\)")
> + (format #f
> + "include(\"~a/lib/cmake/Catch2/Catch.cmake\")"
> + (assoc-ref inputs "catch2"))))
> + (substitute* "cmake/recipes/external/cgal.cmake"
> + (("FetchContent_Populate\\(cgal\\)")
> + "find_package(CGAL CONFIG COMPONENTS Core)\nreturn()"))
> + (substitute* "cmake/recipes/external/eigen.cmake"
> + (("FetchContent_Populate\\(eigen\\)")
> + "find_package(Eigen3 CONFIG REQUIRED)\nreturn()"))
> + (substitute* "cmake/recipes/external/catch2.cmake"
> + (("message.*")
> + "find_package(Catch2 CONFIG)\nreturn()"))
> + (substitute* "cmake/recipes/external/libigl_imgui_fonts.cmake"
> + (("if\\(TARGET igl::imgui_fonts\\)")
> + "if(true)"))
> + (substitute* "cmake/recipes/external/tinyxml2.cmake"
> + (("FetchContent_Populate\\(tinyxml2\\)")
> + "find_package(tinyxml2 CONFIG REQUIRED)\nreturn()"))
> + (substitute* "cmake/recipes/external/embree.cmake"
> + (("FetchContent_MakeAvailable\\(embree\\)")
> + (string-join (list "find_package(Embree 3 CONFIG)"
> + "add_library(embree::embree ALIAS embree)"
> + "return()")
> + "\n")))
> + (substitute* "cmake/recipes/external/glfw.cmake"
> + (("FetchContent_MakeAvailable\\(glfw\\)")
> + (string-join
> + (list "find_package(glfw3 CONFIG REQUIRED)"
> + "add_library(glfw::glfw ALIAS glfw)"
> + "return()")
> + "\n")))
> + (substitute* "cmake/recipes/external/imgui.cmake"
> + (("FetchContent_MakeAvailable\\(imgui\\)")
> + "return()"))))

All these FetchContent substitutions could perhaps be unnecessary if
they were referring to the right package name and with the use of the
-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS configure flag, which forces
CMake to look at the packages from the system and fail if they aren't
found instead of fetching their source and building them.

Toggle quote (144 lines)
> + (add-after 'unpack-external 'fix-assertions
> + (lambda _
> + ;; Current Tetgen version has a bug.
> + (substitute* "include/igl/copyleft/tetgen/tetgenio_to_tetmesh.cpp"
> + (("assert\\(out.numberofpoints == out.numberofpointmarkers\\);")
> + ";"))
> + ;; CGAL has a bug in assertion as well.
> + (substitute* "include/igl/copyleft/cgal/trim_with_solid.cpp"
> + (("assert\\(I.size\\(\\) == Vr.rows\\(\\)\\);")
> + ";"))))
> +
> + ;; XXX: Install modules as CMake fails to install them.
> + (add-after 'install 'install-includes
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (include-dir (string-append out "/include/igl/")))
> + (for-each (lambda (module)
> + (copy-recursively (format #f "../source/include/igl/~a"
> + module)
> + (format #f "~a/~a" include-dir module)))
> + (list "copyleft/cgal"
> + "copyleft/opengl2"
> + "copyleft/tetgen"
> + "embree"
> + "opengl"
> + "predicates"
> + "xml"))))))))
> +
> + (native-inputs (list catch2))
> ;; XXX: Inputs are currently only used to build tests.
> ;; We would need to patch the CMake recipe to build a shared library
> ;; with all of these.
> (inputs
> `(("boost" ,boost)
> - ("catch2" ,catch2)
> ("cgal" ,cgal)
> ("eigen" ,eigen)
> ("embree" ,embree)
> - ("glfw" ,glfw)
> + ("glfw" ,glfw-3.4)
> ("gmp" ,gmp)
> ("mesa" ,mesa)
> ("mpfr" ,mpfr)
> ("tbb" ,tbb)
> ("tinyxml2" ,tinyxml2)
> + ("openblas" ,openblas)
> + ("imgui" ,imgui)
> + ("spectra" ,spectra)
> ;; When updating this package, update commit fields below according to
> ;; the hashes listed in "cmake/LibiglDownloadExternal.cmake".
> ("libigl-test-data"
> @@ -3615,13 +3677,16 @@ (define-public libigl
> (file-name (git-file-name "libigl-test-data" version))
> (sha256 (base32 "1wxglrxw74xw4a4jmmjpm8719f3mnlbxbwygjb4ddfixxxyya4i2"))))
> ("libigl-glad"
> - ,(origin
> - (method git-fetch)
> - (uri (git-reference
> - (url "https://github.com/libigl/libigl-glad")
> - (commit "09b4969c56779f7ddf8e6176ec1873184aec890f")))
> - (file-name (git-file-name "libigl-glad" version))
> - (sha256 (base32 "0rwrs7513ylp6gxv7crjzflapcg9p7x04nzfvywgl665vl53rawk"))))
> + ,(let* ((commit "ead2d21fd1d9f566d8f9a9ce99ddf85829258c7a")
> + (revision "0")
> + (version (git-version "0.0.0" revision commit)))
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/libigl/libigl-glad")
> + (commit commit)))
> + (file-name (git-file-name "libigl-glad" version))
> + (sha256 (base32 "079fd5yrbd713nq7slhhgq79wns85pc564ydlkjl9gf43d3220ay")))))
> ("libigl-stb"
> ,(origin
> (method git-fetch)
> @@ -3631,22 +3696,57 @@ (define-public libigl
> (file-name (git-file-name "libigl-stb" version))
> (sha256 (base32 "0wwlb370z40y63ic3ny6q7lxibhixg2k1pjdkl4ymzv79zld28kj"))))
> ("libigl-predicates"
> + ,(let* ((commit "50c2149e7a520d13cd10e9aeff698bd68edd5a4f")
> + (revision "0")
> + (version (git-version "0.0.0" revision commit)))
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/libigl/libigl-predicates.git")
> + (commit commit)))
> + (file-name (git-file-name "libigl-predicates" version))
> + (sha256 (base32 "0yiqhzry2qhb1p0v9sldlnpqsn4y8cln8r6y08lafkc9kc4qy8jz")))))
> + ;; TODO: Package tetgen separately from <http://www.tetgen.org>
> + ("libigl-tetgen"
> + ,(let* ((commit "4f3bfba3997f20aa1f96cfaff604313a8c2c85b6")
> + (revision "0")
> + (version (git-version "0.0.0" revision commit)))
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/libigl/tetgen.git")
> + (commit commit)))
> + (file-name (git-file-name "libigl-tetgen" version))
> + (sha256 (base32 "1k724syssw37py7kwmibk3sfwkkgyjyy7qkijnhn6rjm91g8qxsg")))))
> + ("libigl-comiso"
> + ,(let* ((commit "562efe333edc8e649dc101469614f43378b1eb55")
> + (revision "0")
> + (version (git-version "0.0.0" revision commit)))
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/libigl/comiso.git")
> + (commit commit)))
> + (file-name (git-file-name "libigl-comiso" version))
> + (sha256 (base32 "048zryh9ydd1dqwzs14vj7r3fd6yyq6n4zl6d1b0yb1iwrqfy6ba")))))
> + ("libigl-triangle"
> ,(origin
> (method git-fetch)
> (uri (git-reference
> - (url "https://github.com/libigl/libigl-predicates.git")
> - (commit "488242fa2b1f98a9c5bd1441297fb4a99a6a9ae4")))
> - (file-name (git-file-name "libigl-predicates" version))
> - (sha256 (base32 "13bd98g8lgcq37i3crj66433z09grnb2xjrcqpwqmyn147rp5wyh"))))
> - ;; TODO: Package tetgen separately from <http://www.tetgen.org>
> - ("libigl-tetgen"
> + (url "https://github.com/libigl/triangle.git")
> + (commit "6bbd92c7ddd6c803c403e005e1132eadb38fbe68")))
> + (file-name (git-file-name "libigl-triangle" version))
> + (sha256 (base32 "0d35mfqwdk99xn1lpjzz9w5axq016r6xy5vr00lb4mvb05limxl3"))))
> + ;; XXX: This is a source-only library which is currently required only for
> + ;; libigl.
> + ("imguizmo"
> ,(origin
> (method git-fetch)
> (uri (git-reference
> - (url "https://github.com/libigl/tetgen.git")
> - (commit "4f3bfba3997f20aa1f96cfaff604313a8c2c85b6")))
> - (file-name (git-file-name "libigl-tetgen" version))
> - (sha256 (base32 "1k724syssw37py7kwmibk3sfwkkgyjyy7qkijnhn6rjm91g8qxsg"))))))
> + (url "https://github.com/CedricGuillemet/ImGuizmo")
> + (commit "1.83")))
> + (file-name (git-file-name "imguizmo" version))
> + (sha256 (base32 "14ywf96nvxf5c081pwypyzjwx9vyq78glbzinc81558v1sxiy2v0"))))))
> (home-page "https://libigl.github.io/")
> (synopsis "Simple C++ geometry processing library")
> (description "This library provides functionality for shape modelling,

The rest LGTM, although it'd be nice to modernize the definition to use
gexps and remove the input labels.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 10 Jul 04:24 +0200
Re: [bug#70880] [PATCH v2 5/8] gnu: Add heatshrink.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 70880@debbugs.gnu.org)
871q42vval.fsf@gmail.com
Hi,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (59 lines)
> * gnu/packages/compression.scm (heatshrink): New variable.
> * gnu/packages/patches/heatshrink-add-cmake.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add "heatshrink-add-cmake.patch".
>
> Change-Id: I0beccdcaed22e47ac6bfe522497e0759a315813d
> ---
> gnu/local.mk | 1 +
> gnu/packages/compression.scm | 42 +++++++
> .../patches/heatshrink-add-cmake.patch | 111 ++++++++++++++++++
> 3 files changed, 154 insertions(+)
> create mode 100644 gnu/packages/patches/heatshrink-add-cmake.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index e20ed2be7e..e263261986 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1474,6 +1474,7 @@ dist_patch_DATA = \
> %D%/packages/patches/hdf-eos5-remove-gctp.patch \
> %D%/packages/patches/hdf-eos5-fix-szip.patch \
> %D%/packages/patches/hdf-eos5-fortrantests.patch \
> + %D%/packages/patches/heatshrink-add-cmake.patch \
> %D%/packages/patches/heimdal-CVE-2022-45142.patch \
> %D%/packages/patches/helm-fix-gcc-9-build.patch \
> %D%/packages/patches/highlight-gui-data-dir.patch \
> diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
> index ac025e0e3d..0a028f1490 100644
> --- a/gnu/packages/compression.scm
> +++ b/gnu/packages/compression.scm
> @@ -40,6 +40,7 @@
> ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
> ;;; Copyright © 2024 Vinicius Monego <monego@posteo.net>
> ;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
> +;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -574,6 +575,47 @@ (define-public xz
> (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
> (home-page "https://tukaani.org/xz/")))
>
> +(define-public heatshrink
> + (package
> + (name "heatshrink")
> + (version "0.4.1")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/atomicobject/heatshrink/")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "0sdhvk27yz8kahw18j8pddbpkgl78v8rh8fx6wspc3acj7w7yvrn"))
> + ;; Add CMake build script, wanted by prusa-slicer and libbgcode, which are the
> + ;; only users of this library.
> + ;;
> + ;; See
> + ;; <https://github.com/NixOS/nixpkgs/pull/269758/commits/fa36136ceed0e2c58e0c9e21492a7e60c3a64470>

Not a hard requirement, but there's some loose convention used in Guix
for referencing URLs:

Blablabla text (see: $URL).

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 10 Jul 04:30 +0200
Re: [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 70880@debbugs.gnu.org)
87wmluugfy.fsf@gmail.com
Hi,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (17 lines)
> * gnu/packages/engineering.scm (prusa-libbgcode): New variable.
>
> Change-Id: I1f18c399d0fe36987c613ce4c0c3845c803beb45
> ---
> gnu/packages/engineering.scm | 46 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 46 insertions(+)
>
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index 7f29e2c365..de4b4a5825 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -3753,6 +3753,52 @@ (define-public libigl
> visualization, matrix manipulation.")
> (license (list license:gpl3 license:mpl2.0))))
>
> +(define-public prusa-libbgcode

Sorry for missing that in my first review: there should be an
explanatory comment here mentioning which commit to use and why (e.g.:
"Use the latest commit since there are no proper releases nor tags.")

Toggle quote (17 lines)
> + (let ((commit "8ae75bd0eea622f0e34cae311b3bd065b55eae9b")
> + (revision "0"))
> + (package
> + (name "prusa-libbgcode")
> + (version (git-version "0.0.0" revision commit))
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/prusa3d/libbgcode")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256 (base32 "0fjx2ijz9zqpqs486lcrrrhqvmfzrpb8j6v57l0jiynavwv3kznw"))))
> + (native-inputs (list catch2))
> + (propagated-inputs
> + (list zlib boost heatshrink))

Nitpick: when there are few inputs (< 5), it's OK to list them inline if
it fits the 80 columns rule, like:

(propagated-inputs (list zlib boost heatshrink))

I think this is what 'guix style' would do.

Toggle quote (23 lines)
> + (build-system cmake-build-system)
> + (home-page "https://github.com/prusa3d/libbgcode")
> + (synopsis "Prusa Block and Binary G-code reader/writer/converter")
> + (description
> + "Binary G-code is a new standard for encoding and compressing ASCII G-code
> +files. G-code files are easy to read and interpret, but their downside is that the
> +data is not saved efficiently, and the file size is often very large. Compression of
> +the file is problematic because the printers usually run on limited hardware and they
> +may not have enough memory and/or CPU power to decompress it.
> +
> +Block and Binary G-Code is a new G-code file format featuring the following
> +improvements over the legacy G-code:
> +@itemize
> +@item Block structure with distinct blocks for metadata vs. G-code.
> +@item Faster navigation.
> +@item Coding and compression for smaller file size.
> +@item Checksum for data validity.
> +@item Extensibility through new (custom) blocks. For example, a file signature block
> +may be welcome by corporate customers.
> +@end itemize
> +
> +The binary G-code format is flexible and the encoding and compression of individual
> +blocks is variable. @code{libbgcode} library contains the routines to convert ASCII
^ The @code{libgcode} ...
Toggle quote (3 lines)
> +G-codes to binary and vice versa. The library is written in C++ and the repository
> +includes bindings for Python.")

It looks like this package does not provide the Python bindings, so it
may be best to drop that part of the last sentence mentioning their
existence, as it would be misleading for Guix users.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 10 Jul 04:35 +0200
Re: [bug#70880] [PATCH v2 7/8] gnu: Add prusa-wxwidgets.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
87sewiug7j.fsf@gmail.com
Hello,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (33 lines)
> * gnu/packages/engineering.scm (prusa-wxwidgets): New variable.
> * gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register
> "prusa-wxwidgets-makefile-fix.patch".
>
> Co-authored-by: Nikita Domnitskii <nikita@domnitskii.me>
> Change-Id: I9043c2acc95986275ee24d9c5d944e5fe2702e99
> ---
> gnu/local.mk | 1 +
> .../prusa-wxwidgets-makefile-fix.patch | 112 ++++++++++++++++++
> gnu/packages/wxwidgets.scm | 29 +++++
> 3 files changed, 142 insertions(+)
> create mode 100644 gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index e263261986..29107a618b 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1842,6 +1842,7 @@ dist_patch_DATA = \
> %D%/packages/patches/prusa-slicer-boost-fixes.patch \
> %D%/packages/patches/prusa-slicer-fix-tests.patch \
> %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \
> + %D%/packages/patches/prusa-wxwidgets-makefile-fix.patch \
> %D%/packages/patches/pthreadpool-system-libraries.patch \
> %D%/packages/patches/python-3.12-fix-tests.patch \
> %D%/packages/patches/python-accupy-use-matplotx.patch \
> diff --git a/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch b/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch
> new file mode 100644
> index 0000000000..aadf976588
> --- /dev/null
> +++ b/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch
> @@ -0,0 +1,112 @@

There ideally should be some info as to how this patch came into
existence. Is it pulled from upstream? From which commit/URL ? If
it's custom work, briefly explain why it is necessary at the top of the
diff/patch.

Toggle quote (122 lines)
> +diff --git a/Makefile.in b/Makefile.in
> +index 8f33aa2ff4..39928382da 100644
> +--- a/Makefile.in
> ++++ b/Makefile.in
> +@@ -4358,7 +4358,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS = \
> + monodll_msw_utils.o \
> + monodll_utilsexc.o \
> + monodll_fswatcher.o \
> +- monodll_msw_secretstore.o
> ++ monodll_msw_secretstore.o \
> + monodll_msw_uilocale.o
> + @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS)
> + @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS \
> +@@ -5284,7 +5284,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS = \
> + monodll_uuid.o \
> + monodll_msw_evtloop.o \
> + monodll_access.o \
> +- monodll_dark_mode.o
> ++ monodll_dark_mode.o \
> + monodll_msw_bmpbndl.o
> + @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS)
> + @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS = \
> +@@ -6196,7 +6196,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1 = \
> + monodll_uuid.o \
> + monodll_msw_evtloop.o \
> + monodll_access.o \
> +- monodll_dark_mode.o
> ++ monodll_dark_mode.o \
> + monodll_msw_bmpbndl.o
> + @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_1 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1)
> + @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_1 = \
> +@@ -6371,7 +6371,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1 = \
> + monolib_msw_utils.o \
> + monolib_utilsexc.o \
> + monolib_fswatcher.o \
> +- monolib_msw_secretstore.o
> ++ monolib_msw_secretstore.o \
> + monolib_msw_uilocale.o
> + @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1)
> + @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_1 \
> +@@ -7297,7 +7297,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2 = \
> + monolib_uuid.o \
> + monolib_msw_evtloop.o \
> + monolib_access.o \
> +- monolib_dark_mode.o
> ++ monolib_dark_mode.o \
> + monolib_msw_bmpbndl.o
> + @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_2 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2)
> + @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_2 = \
> +@@ -8209,7 +8209,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3 = \
> + monolib_uuid.o \
> + monolib_msw_evtloop.o \
> + monolib_access.o \
> +- monolib_dark_mode.o
> ++ monolib_dark_mode.o \
> + monolib_msw_bmpbndl.o
> + @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_3 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3)
> + @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_3 = \
> +@@ -8436,7 +8436,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2 = \
> + basedll_msw_utils.o \
> + basedll_utilsexc.o \
> + basedll_fswatcher.o \
> +- basedll_msw_secretstore.o
> ++ basedll_msw_secretstore.o \
> + basedll_msw_uilocale.o
> + @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2)
> + @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_2 \
> +@@ -8523,7 +8523,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3 = \
> + baselib_msw_utils.o \
> + baselib_utilsexc.o \
> + baselib_fswatcher.o \
> +- baselib_msw_secretstore.o
> ++ baselib_msw_secretstore.o \
> + baselib_msw_uilocale.o
> + @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3)
> + @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_3 \
> +@@ -9464,7 +9464,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4 = \
> + coredll_uuid.o \
> + coredll_msw_evtloop.o \
> + coredll_access.o \
> +- coredll_dark_mode.o
> ++ coredll_dark_mode.o \
> + coredll_msw_bmpbndl.o
> + @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_4 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4)
> + @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_4 = \
> +@@ -10376,7 +10376,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5 = \
> + coredll_uuid.o \
> + coredll_msw_evtloop.o \
> + coredll_access.o \
> +- coredll_dark_mode.o
> ++ coredll_dark_mode.o \
> + coredll_msw_bmpbndl.o
> + @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_5 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5)
> + @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_5 = \
> +@@ -11204,7 +11204,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6 = \
> + corelib_uuid.o \
> + corelib_msw_evtloop.o \
> + corelib_access.o \
> +- corelib_dark_mode.o
> ++ corelib_dark_mode.o \
> + corelib_msw_bmpbndl.o
> + @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_6 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6)
> + @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_6 = \
> +@@ -12116,7 +12116,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7 = \
> + corelib_uuid.o \
> + corelib_msw_evtloop.o \
> + corelib_access.o \
> +- corelib_dark_mode.o
> ++ corelib_dark_mode.o \
> + corelib_msw_bmpbndl.o
> + @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_7 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7)
> + @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_7 = \
> diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
> index 973e962fb1..2cf2ceba56 100644
> --- a/gnu/packages/wxwidgets.scm
> +++ b/gnu/packages/wxwidgets.scm
> @@ -265,6 +265,35 @@ (define-public wxwidgets-2
> (("-Wall") "-Wall -Wno-narrowing"))
> #t)))))))
>
> +(define-public prusa-wxwidgets

I think the convention is to use a variable name like
'wxwidgets-for-prusa'.

Toggle quote (2 lines)
> + ;; There is no tag/release, all patches are in separate branch.

What does "all patches are in separate branch" mean?

Toggle quote (27 lines)
> + (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26"))
> + (package
> + (inherit wxwidgets)
> + (name "prusa-wxwidgets")
> + (version "3.2.0")
> + (home-page "https://github.com/prusa3d/wxWidgets")
> + (source
> + (origin
> + (inherit (package-source wxwidgets))
> + (method git-fetch)
> + (uri (git-reference
> + (url home-page)
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (patches (search-patches "prusa-wxwidgets-makefile-fix.patch"))
> + (sha256
> + (base32
> + "02nd07c23xbclnf1jjfbv6r5vqjb80gsdy2l559c5qzgdcvfd2xd"))))
> + (arguments
> + (substitute-keyword-arguments (package-arguments wxwidgets)
> + ((#:configure-flags flags)
> + ;; To fix 3D rendering in PrusaSlicer, wxWidgets must be compiled with
> + ;; "--disable-glcanvasegl" flag.
> + ;;
> + ;; See <https://github.com/NixOS/nixpkgs/issues/193135>
> + #~(cons "--disable-glcanvasegl" #$flags)))))))

Otherwise LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 10 Jul 04:42 +0200
Re: [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 70880@debbugs.gnu.org)
87o776ufw1.fsf@gmail.com
Hello,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

Toggle quote (3 lines)
> * gnu/packages/engineering.scm (prusa-slicer): Update to 2.7.4. [source]:
> Remove "prusa-slicer-boost-fixes.patch" and

Nitpick: no need for hanging indent :-)

Toggle quote (5 lines)
> "prusa-slicer-with-cereal-1.3.1.patch". Move some part of the snippet code
> to custom build phases.
> [arguments]: In configure flags add paths to external libraries.
> Add "fix-include-paths" phase.

Suggestion: I'd use either directly [configure-flags] or [arguments]
<configure-flags> to make description of change more terse.

Toggle quote (4 lines)
> [native-inputs]: Add "catch2".
> [inputs]: Use "prusa-wxwidgets" instead of "wxwidgets" to fix segfaults.
> Ad "qhull", "nanosvg", "heatshrink" and "prusa-libbgcode".

Nitpick: variable names are not typically quoted in the ChangeLog.

Toggle quote (124 lines)
> * gnu/packages/patches/prusa-slicer-boost-fixes.patch,
> gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch: Remove unused
> patches.
> * gnu/local.mk (dist_patch_DATA): De-register "prusa-slicer-boost-fixes.patch"
> and "prusa-slicer-with-cereal-1.3.1.patch".
>
> Change-Id: I15e85d63c9ad6c731c8040ef2d8ec8b2f31f2ab7
> ---
> gnu/local.mk | 2 -
> gnu/packages/engineering.scm | 53 ++++++----
> .../patches/prusa-slicer-boost-fixes.patch | 97 -------------------
> .../prusa-slicer-with-cereal-1.3.1.patch | 52 ----------
> 4 files changed, 35 insertions(+), 169 deletions(-)
> delete mode 100644 gnu/packages/patches/prusa-slicer-boost-fixes.patch
> delete mode 100644 gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 29107a618b..d9760557df 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1839,9 +1839,7 @@ dist_patch_DATA = \
> %D%/packages/patches/pokerth-boost.patch \
> %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
> %D%/packages/patches/procps-strtod-test.patch \
> - %D%/packages/patches/prusa-slicer-boost-fixes.patch \
> %D%/packages/patches/prusa-slicer-fix-tests.patch \
> - %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \
> %D%/packages/patches/prusa-wxwidgets-makefile-fix.patch \
> %D%/packages/patches/pthreadpool-system-libraries.patch \
> %D%/packages/patches/python-3.12-fix-tests.patch \
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index de4b4a5825..2a3671b01d 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -3802,7 +3802,7 @@ (define-public prusa-libbgcode
> (define-public prusa-slicer
> (package
> (name "prusa-slicer")
> - (version "2.5.2")
> + (version "2.7.4")
> (source
> (origin
> (method git-fetch)
> @@ -3811,13 +3811,11 @@ (define-public prusa-slicer
> (url "https://github.com/prusa3d/PrusaSlicer")
> (commit (string-append "version_" version))))
> (file-name (git-file-name name version))
> - (sha256 (base32 "02qcrw3fa0d8ldbp73hp14l1qxbp3f4608j4csc07ny00ra42151"))
> - (patches (search-patches "prusa-slicer-boost-fixes.patch"
> - "prusa-slicer-fix-tests.patch"
> - "prusa-slicer-with-cereal-1.3.1.patch"))
> + (sha256 (base32 "0s1cfvhfilyv0y98asr61c6rwlgyr1hf5v5hg8q9zwmzm2bkcql3"))
> + (patches (search-patches "prusa-slicer-fix-tests.patch"))
> (modules '((guix build utils)))
> (snippet
> - '(begin
> + `(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.
> @@ -3825,10 +3823,12 @@ (define-public prusa-slicer
> (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\\(libigl\\)" all)
> - (string-append
> - all "\ninclude_directories(libigl INTERFACE libigl::core)"))
> (("add_subdirectory\\(hidapi\\)")
> "pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
> (("include_directories\\(hidapi/include\\)")
> @@ -3841,13 +3841,26 @@ (define-public prusa-slicer
> (("\\bhidapi\\b") "${HIDAPI_LIBRARIES}"))))))
> (build-system cmake-build-system)
> (arguments
> - `(#:configure-flags
> - '("-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")))
> + (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))
> + (list pkg-config catch2))
> (inputs
> (list boost
> cereal
> @@ -3873,9 +3886,13 @@ (define-public prusa-slicer
> pango
> tbb
> eudev
> - ;; prusa-slicer 2.5 segfaults on startup with wxwidgets 3.2
> - ;; See https://github.com/prusa3d/PrusaSlicer/issues/8299
> - wxwidgets-3.0
> + qhull
> + nanosvg
> + heatshrink
> + ;; XXX: Using Prusa wxWidgets fork as PrusaSlicer segfaults when compiled
> + ;; with regular wxwidgets.
> + prusa-wxwidgets
> + prusa-libbgcode

Please sort inputs alphabetically.

The rest LGTM. Could you please resubmit a v3 with the small things
I've spotted in my reading of v2? Sorry for missing some of these
things in v1.

--
Thanks,
Maxim
A
A
Artyom V. Poptsov wrote on 13 Jul 11:30 +0200
Re: [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 70880@debbugs.gnu.org)
877cdpabb6.fsf@gmail.com
Hello!

Toggle quote (2 lines)
> Nitpick: no need for hanging indents in GNU ChangeLog messages.

Okay, fixed that.

Toggle quote (3 lines)
> You'll want to break these long lines; we aim to limit line width below
> 80 columns. 'guix lint' should complain.

Done.

Toggle quote (6 lines)
> All these FetchContent substitutions could perhaps be unnecessary if
> they were referring to the right package name and with the use of the
> -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS configure flag, which forces
> CMake to look at the packages from the system and fail if they aren't
> found instead of fetching their source and building them.

Unfortunately it seems that it does not work. I checked it and cmake
wasn't able to to find libraries. I'd prefer keep this as it is. Maybe
I'll figure out how to do it in a more effective way later.

Toggle quote (3 lines)
> The rest LGTM, although it'd be nice to modernize the definition to use
> gexps and remove the input labels.

Not sure how to properly handle things like this without input labels:

Toggle snippet (11 lines)
("libigl-test-data"
,(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/libigl/libigl-tests-data")
(commit "19cedf96d70702d8b3a83eb27934780c542356fe")))
(file-name (git-file-name "libigl-test-data" version))
(sha256
(base32 "1wxglrxw74xw4a4jmmjpm8719f3mnlbxbwygjb4ddfixxxyya4i2"))))

I'd prefer to keep input labels for now as it is more stylistic change
and does not affect the build.

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmaSSUMZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfnpIEACAp8RA3R442ChLliuMDk8x
kb6bs56wvtJzcRyIEgA/Fj3mUuVHIehWxugxn72w1DYmbPQDH6EqTjzFyaJR8BMi
b/Vp7CcCJzMglZ5DvavucaSCDLFXyvgC2is/R9YOv2b5GcskK0en+m0tL7dctD7v
+RSnQvgjFw/rL0eiXpAYwAgNPrCKs01tJSI1LFw3VwvTgYY6cfZuV3MikytBZ5vn
xMetIRZG29wP3gSy1nUf6T2FZMn0S4+/za17DiDBExzcENmZYy8u1WMDC6+HFH7A
p5SbROg6HB0le3LQ9hhbaLlShh95dhbYxPiw1Nkz1h5QUP8BktS54I9rGHibycWq
06GrxsIeInClxaOGgzFNYVw0Q0y2PoZJFqO9X1GWfvoJLSiQXYqxtHxHLU9wep/o
1VUB/kFL7bRSMPejt5Qdkbyy1CnaDrTDQob6qSSApfVWgcKsp4Q+6v3uJizCqYUB
goRTsrEDMFc6GfXwTAtMcz1nl3sN0zExkAdWJzd3n6gn984bWzOKMKhmVzBKABtf
DUTM2xy2GrLNDrb/QRLGlj/b0nQbN75OfZ4DCuGTzBoI5telsaexiRCLOvz6CWbX
5GKl2WtYagLFE0qFw38ibzhCxVBhlMxJMM9ur3A5A4nEVsmIDr/mcXWYf0lIVD/n
UXcammV90CoxMRbOWDskTA==
=If/4
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 13 Jul 11:35 +0200
Re: [bug#70880] [PATCH v2 5/8] gnu: Add heatshrink.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 70880@debbugs.gnu.org)
8734odab3m.fsf@gmail.com
Toggle quote (3 lines)
> Not a hard requirement, but there's some loose convention used in Guix
> for referencing URLs:

Fixed.

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmaSSlAZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfpDrD/9JKhlBi5A+ywUiMgMg4DbA
Jjr2lBxZyUfLmWVGkp+HcXLTtdXBmPckrZR7rsfvTPYYeRSrQZFh3WHLpu17qouJ
X7S+6mHdoLCGh1iXh9zxPfrbvHooyDZ4mtags3rLCWGTgJieb8cxm7VW/h2P1SdZ
fnFYvjfir7SYHssSxp2eShmrSo9w0ZfstZF8s/wRnk3tJuyXXqkR+2mfGA+rquuy
Pd/h5qTSHXxE9jTsq68hWOwH8AO0vyYbm69Ea5h+OViAuIf/UBxk8Vl4X7JfkjQE
ExepNNuEm67S7XMJDXhUjw1go2kYEggH1H60AbnsMuZuiJR6laOdHOn9EFkIAAKh
kPHwIQ/uSsvJzpM/Ot5XQ2PyNpTcUImp1z+bbcZM7ba6LBmsn1ldnDPY9XDfEKaW
ZUzcLwOKGj0UT1StVNgRPEEO053kkbKK82aX+cprCDpdMtWc4kzyUiTNVCTHBTNB
COLvEN1ceaeFm2YvJMfGz68hcCfn9zLCUrkf2czb3kYWsE90KvyXLjlQqZR52VQl
Z08AEOE4lgiTUNyeoBLSiNP9oP+BTZcUSDRsQGB36GdcsUzgDi4KjmePnm3KWiOC
rU5Jvzq6jFe48ZfsVKqnCS4NF4MMs59UKIylJ0Qs3JqMrlEWjz3J925KtQxqXoa0
h+HYob2KYooEHfP/m2uofA==
=bVoJ
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 13 Jul 11:41 +0200
Re: [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 70880@debbugs.gnu.org)
87y1658w83.fsf@gmail.com
Toggle quote (15 lines)
> Sorry for missing that in my first review: there should be an
> explanatory comment here mentioning which commit to use and why (e.g.:
> "Use the latest commit since there are no proper releases nor tags.")
> [...]
> Nitpick: when there are few inputs (< 5), it's OK to list them inline if
> it fits the 80 columns rule, like:
>
> (propagated-inputs (list zlib boost heatshrink))
>
> I think this is what 'guix style' would do.
> [...]
> It looks like this package does not provide the Python bindings, so it
> may be best to drop that part of the last sentence mentioning their
> existence, as it would be misleading for Guix users.

Fixed.

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmaSS98ZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFftJwEACseVAIbiqc02V+z6ABhsuw
OimvHyeHAPdmmOHw250ZuLLcFHYItWSH9SjMryt4JT04hsr+xLn0lTPBikBoDET9
PfE/OK6WUGH0PUqAFaBt/C85i3ghslA3uB9Ej10yYqWQtIsQu9PG8o+d1ukwqHan
TxVcpkkIhPpEEfgIbV7jxhKEjWvmoyE9upSNieLyazO6MZKYC/5v3A4eVkwcFSgU
pm+mRuo9IyiEywfSfvobcIILKpqo+b/HHSJS5nl1u7eBcBnz1nEZk9Sz6Z7Bs/rg
3xJxb+1lek6Mldrrk+/D1tnhjboTGRtO5KUDT2+jE3/zf9aBOHyFSmC6LfNZHX9i
+JuBWv/UlP2WQOsv0FH397Ab9fw8R0lFVc6ritsSnHI4UrgI/oObX9+j9lAazx1U
ZJ4hAxWEX9F0LDzCNHhprzXQcOnm4u2c3aTY0QPlWWy8Ty/B4v8x+B6wnFRSUclg
kuUL7eaSrbcxPWXK+vjNTmlfALxZlzzGDzbukkRNXKpOOEGK2inS+sbngdFczzoj
mVAsdIdmSx+sDRLHMcOCxoCJYTjhXODaXiJ9QWuZurS+izAkewmE7cbACpyAfouo
B1cQK1ksCqNI0GVDulKBg5mX3KIPKFOpkaU3ycOdVRU2uZI52g2qn7bc3ik9byFF
WKDpmJaIeXkR1gi+WWfTWg==
=JnqM
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 13 Jul 13:13 +0200
[PATCH v3 1/8] gnu: cgal: Update to 5.6.1.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
97d7c9dbc9e6b917a926a3c22c48ae7bd2318616.1720869087.git.poptsov.artyom@gmail.com
* gnu/packages/graphics.scm (cgal): Update to 5.6.1.

Change-Id: Id909fc7be5d421496e6a3cd87d366f437f76bcfa
---
gnu/packages/graphics.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index d85ac8bfa6..eb90713159 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -775,7 +775,7 @@ (define-public openshadinglanguage
(define-public cgal
(package
(name "cgal")
- (version "5.2.2")
+ (version "5.6.1")
(source (origin
(method url-fetch)
(uri (string-append
@@ -783,7 +783,7 @@ (define-public cgal
"/CGAL-" version ".tar.xz"))
(sha256
(base32
- "0yjzq12ivizp23y7zqm30x20psv9gzwbcdrhyd3f7h0ds94m1c40"))))
+ "0dsqvnyd2ic50pr28gfz34bpnyx3i2csf1rikmc661hywdz5xcfd"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags
--
2.45.2
A
A
Artyom V. Poptsov wrote on 13 Jul 13:13 +0200
[PATCH v3 2/8] gnu: glfw: Update to 3.3.10.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
c53f1f2494882cab8e6fe595df95268aa1e4298b.1720869087.git.poptsov.artyom@gmail.com
* gnu/packages/gl.scm (glfw): Update to 3.3.10.

Change-Id: I9d789fb74af4ed649102195891adc5e437883d30
---
gnu/packages/gl.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (32 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index 2100bb4872..f40ddaeb86 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2023 Kaelyn Takata <kaelyn.alexi@protonmail.com>
;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -924,7 +925,7 @@ (define-public soil
(define-public glfw
(package
(name "glfw")
- (version "3.3.9")
+ (version "3.3.10")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/glfw/glfw"
@@ -932,7 +933,7 @@ (define-public glfw
"/glfw-" version ".zip"))
(sha256
(base32
- "023dn97n4h14n5lbjpzjv0y6a2plj254c0w3rr3wraf3z08189jm"))))
+ "1f5xs4cj1y5wk1jimv1mylk6n6vh7433js28mfd1kf7p2zw3whz8"))))
(build-system cmake-build-system)
(arguments
(list
--
2.45.2
A
A
Artyom V. Poptsov wrote on 13 Jul 13:13 +0200
[PATCH v3 5/8] gnu: Add heatshrink.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
db441959dee6f36c9abc1d3cc43225b79f845e8d.1720869087.git.poptsov.artyom@gmail.com
* gnu/packages/compression.scm (heatshrink): New variable.
* gnu/packages/patches/heatshrink-add-cmake.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add "heatshrink-add-cmake.patch".

Change-Id: I0beccdcaed22e47ac6bfe522497e0759a315813d
---
gnu/local.mk | 1 +
gnu/packages/compression.scm | 40 +++++++
.../patches/heatshrink-add-cmake.patch | 111 ++++++++++++++++++
3 files changed, 152 insertions(+)
create mode 100644 gnu/packages/patches/heatshrink-add-cmake.patch

Toggle diff (189 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ea4cc251ae..4726e2c128 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1482,6 +1482,7 @@ dist_patch_DATA = \
%D%/packages/patches/hdf-eos5-remove-gctp.patch \
%D%/packages/patches/hdf-eos5-fix-szip.patch \
%D%/packages/patches/hdf-eos5-fortrantests.patch \
+ %D%/packages/patches/heatshrink-add-cmake.patch \
%D%/packages/patches/heimdal-CVE-2022-45142.patch \
%D%/packages/patches/helm-fix-gcc-9-build.patch \
%D%/packages/patches/highlight-gui-data-dir.patch \
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index ac025e0e3d..1c9e0a804c 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -40,6 +40,7 @@
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2024 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -574,6 +575,45 @@ (define-public xz
(license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
(home-page "https://tukaani.org/xz/")))
+(define-public heatshrink
+ (package
+ (name "heatshrink")
+ (version "0.4.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/atomicobject/heatshrink/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0sdhvk27yz8kahw18j8pddbpkgl78v8rh8fx6wspc3acj7w7yvrn"))
+ ;; Add CMake build script, wanted by prusa-slicer and libbgcode, which are the
+ ;; only users of this library (see
+ ;; <https://github.com/NixOS/nixpkgs/pull/269758/commits/fa36136ceed0e2c58e0c9e21492a7e60c3a64470>.)
+ (patches (search-patches "heatshrink-add-cmake.patch"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ ;; XXX: No tests available with CMake (see
+ ;; <https://github.com/atomicobject/heatshrink/pull/77>.)
+ #:tests? #f))
+ (home-page "https://github.com/atomicobject/heatshrink/")
+ (synopsis "Data compression library for embedded/real-time systems")
+ (description
+ "A data compression/decompression library for embedded/real-time systems.
+
+Among its features are:
+@itemize
+@item Low memory usage (as low as 50 bytes.) It is useful for some cases with less
+than 50 bytes, and useful for many general cases with less than 300 bytes.
+@item Incremental, bounded CPU use. It can be used to chew on input data in
+arbitrarily tiny bites. This is a useful property in hard real-time environments.
+@item Can use either static or dynamic memory allocation.
+@end itemize
+")
+ (license license:isc)))
+
(define-public lhasa
(package
(name "lhasa")
diff --git a/gnu/packages/patches/heatshrink-add-cmake.patch b/gnu/packages/patches/heatshrink-add-cmake.patch
new file mode 100644
index 0000000000..f67f87126e
--- /dev/null
+++ b/gnu/packages/patches/heatshrink-add-cmake.patch
@@ -0,0 +1,111 @@
+From 0886e9ca76552b8e325841e2b820b4563e5d5aba Mon Sep 17 00:00:00 2001
+From: tamasmeszaros <meszaros.q@gmail.com>
+Date: Thu, 27 Jul 2023 23:11:25 +0200
+Subject: [PATCH] Add CMake build script
+
+---
+ CMakeLists.txt | 82 +++++++++++++++++++++++++++++++++++++++++++++++++
+ Config.cmake.in | 5 +++
+ 2 files changed, 87 insertions(+)
+ create mode 100644 CMakeLists.txt
+ create mode 100644 Config.cmake.in
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+new file mode 100644
+index 0000000..5b840eb
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,82 @@
++cmake_minimum_required(VERSION 3.10)
++
++project(heatshrink C)
++
++add_library(${PROJECT_NAME} heatshrink_decoder.c heatshrink_encoder.c)
++add_library(${PROJECT_NAME}_dynalloc heatshrink_decoder.c heatshrink_encoder.c)
++
++find_library(MATH_LIBRARY m) # Business as usual
++if(MATH_LIBRARY)
++ target_link_libraries(${PROJECT_NAME} PUBLIC ${MATH_LIBRARY})
++endif()
++
++target_include_directories(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
++target_include_directories(${PROJECT_NAME}_dynalloc PUBLIC $<INSTALL_INTERFACE:include>)
++
++target_compile_definitions(${PROJECT_NAME} PUBLIC HEATSHRINK_DYNAMIC_ALLOC=0)
++target_compile_definitions(${PROJECT_NAME}_dynalloc PUBLIC HEATSHRINK_DYNAMIC_ALLOC=1)
++
++if (UNIX)
++ add_executable(${PROJECT_NAME}_cmd heatshrink.c)
++ target_link_libraries(${PROJECT_NAME}_cmd ${PROJECT_NAME}_dynalloc)
++ set_target_properties(${PROJECT_NAME}_cmd PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
++endif ()
++
++# Installation and export:
++
++include(CMakePackageConfigHelpers)
++
++write_basic_package_version_file(
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
++ VERSION 0.4.1
++ COMPATIBILITY AnyNewerVersion
++)
++
++set(_exported_targets ${PROJECT_NAME} ${PROJECT_NAME}_dynalloc)
++if (UNIX)
++ list(APPEND _exported_targets ${PROJECT_NAME}_cmd)
++endif ()
++
++install(TARGETS ${_exported_targets}
++ EXPORT ${PROJECT_NAME}Targets
++)
++
++export(EXPORT ${PROJECT_NAME}Targets
++ FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake"
++ NAMESPACE ${PROJECT_NAME}::
++)
++
++include(GNUInstallDirs)
++set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
++
++configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
++ INSTALL_DESTINATION ${ConfigPackageLocation}
++)
++
++install(
++ FILES
++ heatshrink_common.h
++ heatshrink_config.h
++ heatshrink_encoder.h
++ heatshrink_decoder.h
++ DESTINATION
++ include/${PROJECT_NAME}
++ )
++
++install(EXPORT ${PROJECT_NAME}Targets
++ FILE
++ ${PROJECT_NAME}Targets.cmake
++ NAMESPACE
++ ${PROJECT_NAME}::
++ DESTINATION
++ ${ConfigPackageLocation}
++)
++
++install(
++ FILES
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
++ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
++ DESTINATION
++ ${ConfigPackageLocation}
++)
+diff --git a/Config.cmake.in b/Config.cmake.in
+new file mode 100644
+index 0000000..0809ba9
+--- /dev/null
++++ b/Config.cmake.in
+@@ -0,0 +1,5 @@
++@PACKAGE_INIT@
++
++if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake)
++ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
++endif ()
--
2.45.2
A
A
Artyom V. Poptsov wrote on 13 Jul 13:13 +0200
[PATCH v3 3/8] gnu: glfw-3.4: New variable.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
dc5e476543eb8e3321c63cf89fbc7af980360553.1720869087.git.poptsov.artyom@gmail.com
* gnu/packages/gl.scm (glfw-3.4): New variable.

Change-Id: I77f2214c78f35455436897a3fbff083331295314
---
gnu/packages/gl.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Toggle diff (28 lines)
diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index f40ddaeb86..8441f3ae65 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -995,6 +995,21 @@ (define-public glfw
and surfaces, receiving input and events.")
(license license:zlib)))
+(define-public glfw-3.4
+ (package
+ (inherit glfw)
+ (version "3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/glfw/glfw"
+ "/releases/download/" version
+ "/glfw-" version ".zip"))
+ (sha256
+ (base32
+ "1sd396kkn53myp61kxrd18h7b1q4ix173hhxhvl0iz8j4x5h1v5m"))))
+ (native-inputs (modify-inputs (package-native-inputs glfw)
+ (prepend pkg-config)))))
+
(define-public nanovg-for-extempore
(let ((version "0.7.1")
(revision "0")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 13 Jul 13:13 +0200
[PATCH v3 4/8] gnu: libigl: Update to 2.4.0.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
5d6dafedfbdcb3eb6a67930d37049eca1d60bf51.1720869087.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (libigl): Update to 2.4.0.
[arguments]: Use Gexps. Update configure flags. Disable GLFW tests as they
are failing with SEGFAULT errors (see
Update "unpack-external" phase: add new dependencies.
Update "patch-cmake" phase to prevent CMake from trying to download external
dependencies. Help CMake to find the package inputs.
Add "fix-assertions" and "install-copyleft-modules" phase.
[native-inputs]: Add catch2.
[inputs]: Use glfw-3.4. Add openblas, imgui and spectra. Add libigl
packages and imguizmo. Remove catch2.

Change-Id: Ib4ac842dc14fe1cbc6b0b87674bae1f261a1a970
---
gnu/packages/engineering.scm | 287 +++++++++++++++++++++++++----------
1 file changed, 204 insertions(+), 83 deletions(-)

Toggle diff (365 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index cc9020c6fd..5dfb1e1be3 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -33,7 +33,7 @@
;;; Copyright © 2022 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
;;; Copyright © 2022 Konstantinos Agiannis <agiannis.kon@gmail.com>
;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
-;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2022-2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022, 2023 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2023 Theofilos Pechlivanis <theofilos.pechlivanis@gmail.com>
@@ -162,6 +162,7 @@ (define-module (gnu packages engineering)
#:use-module (gnu packages text-editors)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages toolkits)
#:use-module (gnu packages tree-sitter)
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
@@ -3511,7 +3512,7 @@ (define-public xfoil
(define-public libigl
(package
(name "libigl")
- (version "2.3.0")
+ (version "2.4.0")
(source
(origin
(method git-fetch)
@@ -3521,90 +3522,162 @@ (define-public libigl
(file-name (git-file-name name version))
(sha256
(base32
- "004a22ifq2vibgkgvrlyihqimpsfizvq5l448204kwfg3lkycajj"))))
+ "0qlnpp8nxbahcky4d67dzn0ynbv3v037nbx1akq6h5rzhvkzq40x"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
- '("-DLIBIGL_USE_STATIC_LIBRARY=OFF"
- "-DLIBIGL_BUILD_TESTS=ON"
- "-DLIBIGL_BUILD_TUTORIALS=OFF"
- "-DLIBIGL_EXPORT_TARGETS=ON"
- ;; The following options disable tests for the corresponding libraries.
- ;; The options do not affect whether the libraries are linked to
- ;; libigl or not, they are used for tests.
- "-DLIBIGL_WITH_COMISO=OFF"
- "-DLIBIGL_WITH_CORK=OFF"
- "-DLIBIGL_WITH_MATLAB=OFF"
- "-DLIBIGL_WITH_MOSEK=OFF"
- "-DLIBIGL_WITH_TRIANGLE=OFF" ;; Undefined reference to "triangulate".
- "-DLIBIGL_WITH_OPENGL_GLFW_IMGUI=OFF")
+ (list #:configure-flags
+ #~(list "-DLIBIGL_USE_STATIC_LIBRARY=OFF"
+ "-DLIBIGL_BUILD_TESTS=ON"
+ "-DLIBIGL_BUILD_TUTORIALS=OFF"
+ "-DLIBIGL_INSTALL=ON"
+ "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
+ (format #f "-DCatch2_DIR=~a/lib/cmake/catch2/"
+ #$(this-package-input "catch2"))
+ (format #f "-DSpectra_DIR=~a/share/pectra/cmake/"
+ #$(this-package-input "spectra"))
+ ;; The following options disable tests for the corresponding
+ ;; libraries. The options do not affect whether the libraries are
+ ;; linked to libigl or not, they are used for tests.
+ "-DLIBIGL_WITH_COMISO=OFF"
+ "-DLIBIGL_WITH_CORK=OFF"
+ "-DLIBIGL_MATLAB=OFF"
+ "-DLIBIGL_MOSEK=OFF"
+ ;; XXX: GLFW tests are failing with SEGFAULT. See
+ ;; <https://github.com/libigl/libigl/issues/2313>
+ "-DLIBIGL_GLFW_TESTS=OFF")
+ #:build-type "Release"
#:phases
- (modify-phases %standard-phases
+ #~(modify-phases %standard-phases
(add-after 'unpack 'unpack-external
(lambda _
(setenv "HOME" (getcwd)) ;; cmake needs this to export modules
(mkdir "external")
- (copy-recursively (assoc-ref %build-inputs "libigl-glad") "external/glad")
- (copy-recursively (assoc-ref %build-inputs "libigl-stb") "external/stb")
- (copy-recursively (assoc-ref %build-inputs "libigl-tetgen") "external/tetgen")
- (copy-recursively (assoc-ref %build-inputs "libigl-predicates") "external/predicates")))
+ (copy-recursively (assoc-ref %build-inputs "libigl-glad")
+ "external/glad")
+ (copy-recursively (assoc-ref %build-inputs "libigl-test-data")
+ "external/test-data")
+ (copy-recursively (assoc-ref %build-inputs "libigl-comiso")
+ "external/comiso")
+ (copy-recursively (assoc-ref %build-inputs "libigl-tetgen")
+ "external/tetgen")
+ (copy-recursively (assoc-ref %build-inputs "libigl-predicates")
+ "external/predicates")
+ (copy-recursively (assoc-ref %build-inputs "imguizmo")
+ "external/imguizmo")
+ (copy-recursively (assoc-ref %build-inputs "eigen")
+ "external/eigen")))
(add-after 'unpack-external 'patch-cmake
- (lambda _
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (source-dir library-name)
+ (format #f "SOURCE_DIR \"~a\""
+ (assoc-ref %build-inputs library-name)))
+ (define (fix-external-library cmake source)
+ (substitute* (format #f "cmake/recipes/external/~a.cmake"
+ cmake)
+ (("GIT_REPOSITORY.*") (source-dir source))
+ (("GIT_TAG.*") "")))
;; Fix references to external libraries
- (substitute* "cmake/libigl.cmake"
- (("if\\(NOT TARGET Eigen3::Eigen\\)" all)
- (string-append "find_package(Eigen3 CONFIG REQUIRED)\n" all))
- (("if\\(NOT TARGET CGAL::CGAL\\)" all)
- (string-append "find_package(CGAL CONFIG COMPONENTS Core)\n" all))
- (("if\\(NOT TARGET tinyxml2\\)" all)
- (string-append "find_package(tinyxml2 CONFIG REQUIRED)\n"
- "if (NOT TARGET tinyxml2::tinyxml2)"))
- (("if\\(NOT TARGET embree\\)" all)
- (string-append "find_package(embree 3 CONFIG REQUIRED)\n" all))
- (("if\\(NOT TARGET glfw\\)" all)
- (string-append "find_package(glfw3 CONFIG REQUIRED)\n" all))
- (("igl_download_glad\\(\\)" all) "")
- (("igl_download_stb\\(\\)" all) "")
- (("igl_download_tetgen\\(\\)" all) "")
- (("igl_download_triangle\\(\\)" all) "")
- (("igl_download_predicates\\(\\)" all) ""))
- (substitute* "tests/CMakeLists.txt"
- (("igl_download_test_data\\(\\)") "")
- (("set\\(IGL_TEST_DATA.*")
- (format #f "set(IGL_TEST_DATA ~a)\n"
- (assoc-ref %build-inputs "libigl-test-data")))
- (("igl_download_catch2\\(\\)") "find_package(Catch2 CONFIG REQUIRED)")
- (("list\\(APPEND CMAKE_MODULE_PATH \\$\\{LIBIGL_EXTERNAL\\}/catch2/contrib\\)")
- "")
- (("add_subdirectory\\(\\$\\{LIBIGL_EXTERNAL\\}/catch2 catch2\\)") ""))
- ;; Install otherwise missing headers
- (substitute* "cmake/libigl.cmake"
- (("install_dir_files\\(copyleft\\)" all)
- (string-join (list all
- "install_dir_files(copyleft/cgal)"
- "install_dir_files(copyleft/opengl)"
- "install_dir_files(copyleft/tetgen)"
- "install_dir_files(embree)"
- "install_dir_files(opengl)"
- "install_dir_files(png)"
- "install_dir_files(predicates)"
- "install_dir_files(xml)")
- "\n"))))))))
+ (fix-external-library "comiso" "libigl-comiso")
+ (fix-external-library "tetgen" "libigl-tetgen")
+ (fix-external-library "triangle" "libigl-triangle")
+ (fix-external-library "predicates" "libigl-predicates")
+ (fix-external-library "glad" "libigl-glad")
+ (fix-external-library "libigl_tests_data" "libigl-test-data")
+ (fix-external-library "stb" "libigl-stb")
+ (substitute* "cmake/recipes/external/imguizmo.cmake"
+ (("if\\(TARGET imguizmo::imguizmo\\)")
+ "if(true)")
+ (("target_link_libraries.*")
+ (format #f "include_directories(~a/include/imgui/)"
+ (assoc-ref inputs "imgui"))))
+
+ (substitute* "cmake/igl/igl_add_test.cmake"
+ (("include\\(\".*/contrib/Catch.cmake\"\\)")
+ (format #f
+ "include(\"~a/lib/cmake/Catch2/Catch.cmake\")"
+ (assoc-ref inputs "catch2"))))
+ (substitute* "cmake/recipes/external/cgal.cmake"
+ (("FetchContent_Populate\\(cgal\\)")
+ "find_package(CGAL CONFIG COMPONENTS Core)\nreturn()"))
+ (substitute* "cmake/recipes/external/eigen.cmake"
+ (("FetchContent_Populate\\(eigen\\)")
+ "find_package(Eigen3 CONFIG REQUIRED)\nreturn()"))
+ (substitute* "cmake/recipes/external/catch2.cmake"
+ (("message.*")
+ "find_package(Catch2 CONFIG)\nreturn()"))
+ (substitute* "cmake/recipes/external/libigl_imgui_fonts.cmake"
+ (("if\\(TARGET igl::imgui_fonts\\)")
+ "if(true)"))
+ (substitute* "cmake/recipes/external/tinyxml2.cmake"
+ (("FetchContent_Populate\\(tinyxml2\\)")
+ "find_package(tinyxml2 CONFIG REQUIRED)\nreturn()"))
+ (substitute* "cmake/recipes/external/embree.cmake"
+ (("FetchContent_MakeAvailable\\(embree\\)")
+ (string-join (list "find_package(Embree 3 CONFIG)"
+ "add_library(embree::embree ALIAS embree)"
+ "return()")
+ "\n")))
+ (substitute* "cmake/recipes/external/glfw.cmake"
+ (("FetchContent_MakeAvailable\\(glfw\\)")
+ (string-join
+ (list "find_package(glfw3 CONFIG REQUIRED)"
+ "add_library(glfw::glfw ALIAS glfw)"
+ "return()")
+ "\n")))
+ (substitute* "cmake/recipes/external/imgui.cmake"
+ (("FetchContent_MakeAvailable\\(imgui\\)")
+ "return()"))))
+
+ (add-after 'unpack-external 'fix-assertions
+ (lambda _
+ ;; Current Tetgen version has a bug.
+ (substitute* "include/igl/copyleft/tetgen/tetgenio_to_tetmesh.cpp"
+ (("assert\\(out.numberofpoints == out.numberofpointmarkers\\);")
+ ";"))
+ ;; CGAL has a bug in assertion as well.
+ (substitute* "include/igl/copyleft/cgal/trim_with_solid.cpp"
+ (("assert\\(I.size\\(\\) == Vr.rows\\(\\)\\);")
+ ";"))))
+
+ ;; XXX: Install modules as CMake fails to install them.
+ (add-after 'install 'install-includes
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (include-dir (string-append out "/include/igl/")))
+ (for-each (lambda (module)
+ (copy-recursively (format #f
+ "../source/include/igl/~a"
+ module)
+ (format #f
+ "~a/~a"
+ include-dir
+ module)))
+ (list "copyleft/cgal"
+ "copyleft/opengl2"
+ "copyleft/tetgen"
+ "embree"
+ "opengl"
+ "predicates"
+ "xml"))))))))
+
+ (native-inputs (list catch2))
;; XXX: Inputs are currently only used to build tests.
;; We would need to patch the CMake recipe to build a shared library
;; with all of these.
(inputs
`(("boost" ,boost)
- ("catch2" ,catch2)
("cgal" ,cgal)
("eigen" ,eigen)
("embree" ,embree)
- ("glfw" ,glfw)
+ ("glfw" ,glfw-3.4)
("gmp" ,gmp)
("mesa" ,mesa)
("mpfr" ,mpfr)
("tbb" ,tbb)
("tinyxml2" ,tinyxml2)
+ ("openblas" ,openblas)
+ ("imgui" ,imgui)
+ ("spectra" ,spectra)
;; When updating this package, update commit fields below according to
;; the hashes listed in "cmake/LibiglDownloadExternal.cmake".
("libigl-test-data"
@@ -3614,15 +3687,20 @@ (define-public libigl
(url "https://github.com/libigl/libigl-tests-data")
(commit "19cedf96d70702d8b3a83eb27934780c542356fe")))
(file-name (git-file-name "libigl-test-data" version))
- (sha256 (base32 "1wxglrxw74xw4a4jmmjpm8719f3mnlbxbwygjb4ddfixxxyya4i2"))))
+ (sha256
+ (base32 "1wxglrxw74xw4a4jmmjpm8719f3mnlbxbwygjb4ddfixxxyya4i2"))))
("libigl-glad"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/libigl/libigl-glad")
- (commit "09b4969c56779f7ddf8e6176ec1873184aec890f")))
- (file-name (git-file-name "libigl-glad" version))
- (sha256 (base32 "0rwrs7513ylp6gxv7crjzflapcg9p7x04nzfvywgl665vl53rawk"))))
+ ,(let* ((commit "ead2d21fd1d9f566d8f9a9ce99ddf85829258c7a")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/libigl-glad")
+ (commit commit)))
+ (file-name (git-file-name "libigl-glad" version))
+ (sha256
+ (base32 "079fd5yrbd713nq7slhhgq79wns85pc564ydlkjl9gf43d3220ay")))))
("libigl-stb"
,(origin
(method git-fetch)
@@ -3630,24 +3708,67 @@ (define-public libigl
(url "https://github.com/libigl/libigl-stb.git")
(commit "cd0fa3fcd90325c83be4d697b00214e029f94ca3")))
(file-name (git-file-name "libigl-stb" version))
- (sha256 (base32 "0wwlb370z40y63ic3ny6q7lxibhixg2k1pjdkl4ymzv79zld28kj"))))
+ (sha256
+ (base32 "0wwlb370z40y63ic3ny6q7lxibhixg2k1pjdkl4ymzv79zld28kj"))))
("libigl-predicates"
+ ,(let* ((commit "50c2149e7a520d13cd10e9aeff698bd68edd5a4f")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/libigl-predicates.git")
+ (commit commit)))
+ (file-name (git-file-name "libigl-predicates" version))
+ (sha256
+ (base32 "0yiqhzry2qhb1p0v9sldlnpqsn4y8cln8r6y08lafkc9kc4qy8jz")))))
+ ;; TODO: Package tetgen separately from <http://www.tetgen.org>
+ ("libigl-tetgen"
+ ,(let* ((commit "4f3bfba3997f20aa1f96cfaff604313a8c2c85b6")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/tetgen.git")
+ (commit commit)))
+ (file-name (git-file-name "libigl-tetgen" version))
+ (sha256
+ (base32 "1k724syssw37py7kwmibk3sfwkkgyjyy7qkijnhn6rjm91g8qxsg")))))
+ ("libigl-comiso"
+ ,(let* ((commit "562efe333edc8e649dc101469614f43378b1eb55")
+ (revision "0")
+ (version (git-version "0.0.0" revision commit)))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libigl/comiso.git")
+ (commit commit)))
+ (file-name (git-file-name "libigl-comiso" version))
+ (sha256
+ (base32 "048zryh9ydd1dqwzs14vj7r3fd6yyq6n4zl6d1b0yb1iwrqfy6ba")))))
+ ("libigl-triangle"
,(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/libigl/libigl-predicates.git")
- (commit "488242fa2b1f98a9c5bd1441297fb4a99a6a9ae4")))
- (file-name (git-file-name "libigl-predicates" version))
- (sha256 (base32 "13bd98g8lgcq37i3crj66433z09grnb2xjrcqpwqmyn147rp5wyh"))))
- ;; TODO: Package tetgen separately from <http://www.tetgen.org>
- ("libigl-tetgen"
+ (url "https://github.com/libigl/triangle.git")
+ (commit "6bbd92c7ddd6c803c403e005e1132eadb38fbe68")))
+ (file-name (git-file-name "libigl-triangle" version))
+ (sha256
+ (base32 "0d35mfqwdk99xn1lpjzz9w5axq016r6xy5vr00lb4mvb05limxl3"))))
+
+ ;; XXX: This is a source-only library which is currently required only
+ ;; for libigl.
+
+ ("imguizmo"
,(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/libigl/tetgen.git")
- (commit "4f3bfba3997f20aa1f96cfaff604313a8c2c85b6")))
- (file-name (git-file-name "libigl-tetgen" version))
- (sha256 (base32 "1k724syssw37py7kwmibk3sfwkkgyjyy7qkijnhn6rjm91g8qxsg"))))))
+ (url "https://github.com/CedricGuillemet/ImGuizmo")
+ (commit "1.83")))
+ (file-name (git-file-name "imguizmo" version))
+ (sha256
+ (base32 "14ywf96nvxf5c081pwypyzjwx9vyq78glbzinc81558v1sxiy2v0"))))))
(home-page "https://libigl.github.io/")
(synopsis "Simple C++ geometry processing library")
(description "This library provides functionality for shape modelling,
--
2.45.2
A
A
Artyom V. Poptsov wrote on 13 Jul 13:13 +0200
[PATCH v3 6/8] gnu: Add prusa-libbgcode.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
beabc04aa4aaf7df23c74dbe1c89afd1e12f557a.1720869087.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (prusa-libbgcode): New variable.

Change-Id: I1f18c399d0fe36987c613ce4c0c3845c803beb45
---
gnu/packages/engineering.scm | 46 ++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5dfb1e1be3..30eb5a7773 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3775,6 +3775,52 @@ (define-public libigl
visualization, matrix manipulation.")
(license (list license:gpl3 license:mpl2.0))))
+(define-public prusa-libbgcode
+ ;; Use the latest commit since there are no proper releases nor tags.
+ (let ((commit "8ae75bd0eea622f0e34cae311b3bd065b55eae9b")
+ (revision "0"))
+ (package
+ (name "prusa-libbgcode")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/prusa3d/libbgcode")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0fjx2ijz9zqpqs486lcrrrhqvmfzrpb8j6v57l0jiynavwv3kznw"))))
+ (native-inputs (list catch2))
+ (propagated-inputs (list zlib boost heatshrink))
+ (build-system cmake-build-system)
+ (home-page "https://github.com/prusa3d/libbgcode")
+ (synopsis "Prusa Block and Binary G-code reader/writer/converter")
+ (description
+ "Binary G-code is a new standard for encoding and compressing ASCII G-code
+files. G-code files are easy to read and interpret, but their downside is that the
+data is not saved efficiently, and the file size is often very large. Compression of
+the file is problematic because the printers usually run on limited hardware and they
+may not have enough memory and/or CPU power to decompress it.
+
+Block and Binary G-Code is a new G-code file format featuring the following
+improvements over the legacy G-code:
+@itemize
+@item Block structure with distinct blocks for metadata vs. G-code.
+@item Faster navigation.
+@item Coding and compression for smaller file size.
+@item Checksum for data validity.
+@item Extensibility through new (custom) blocks. For example, a file signature block
+may be welcome by corporate customers.
+@end itemize
+
+The binary G-code format is flexible and the encoding and compression of individual
+blocks is variable. @code{libbgcode} library contains the routines to convert ASCII
+G-codes to binary and vice versa.")
+ ;; See
+ ;; <https://github.com/prusa3d/libbgcode/blob/main/pyproject.toml>
+ (license license:agpl3+))))
+
(define-public prusa-slicer
(package
(name "prusa-slicer")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 13 Jul 13:13 +0200
[PATCH v3 7/8] gnu: Add prusa-wxwidgets.
(address . 70880@debbugs.gnu.org)
c7b116f93e7f98d284e37d985a924bd7e415d177.1720869087.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (prusa-wxwidgets): New variable.
* gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register
"prusa-wxwidgets-makefile-fix.patch".

Co-authored-by: Nikita Domnitskii <nikita@domnitskii.me>
Change-Id: I9043c2acc95986275ee24d9c5d944e5fe2702e99
---
gnu/local.mk | 1 +
.../prusa-wxwidgets-makefile-fix.patch | 112 ++++++++++++++++++
gnu/packages/wxwidgets.scm | 39 ++++++
3 files changed, 152 insertions(+)
create mode 100644 gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch

Toggle diff (189 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 4726e2c128..541f636c35 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1847,6 +1847,7 @@ dist_patch_DATA = \
%D%/packages/patches/prusa-slicer-boost-fixes.patch \
%D%/packages/patches/prusa-slicer-fix-tests.patch \
%D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \
+ %D%/packages/patches/prusa-wxwidgets-makefile-fix.patch \
%D%/packages/patches/pthreadpool-system-libraries.patch \
%D%/packages/patches/python-3.12-fix-tests.patch \
%D%/packages/patches/python-accupy-use-matplotx.patch \
diff --git a/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch b/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch
new file mode 100644
index 0000000000..aadf976588
--- /dev/null
+++ b/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch
@@ -0,0 +1,112 @@
+diff --git a/Makefile.in b/Makefile.in
+index 8f33aa2ff4..39928382da 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -4358,7 +4358,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS = \
+ monodll_msw_utils.o \
+ monodll_utilsexc.o \
+ monodll_fswatcher.o \
+- monodll_msw_secretstore.o
++ monodll_msw_secretstore.o \
+ monodll_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS \
+@@ -5284,7 +5284,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS = \
+ monodll_uuid.o \
+ monodll_msw_evtloop.o \
+ monodll_access.o \
+- monodll_dark_mode.o
++ monodll_dark_mode.o \
+ monodll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS = \
+@@ -6196,7 +6196,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1 = \
+ monodll_uuid.o \
+ monodll_msw_evtloop.o \
+ monodll_access.o \
+- monodll_dark_mode.o
++ monodll_dark_mode.o \
+ monodll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_1 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_1 = \
+@@ -6371,7 +6371,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1 = \
+ monolib_msw_utils.o \
+ monolib_utilsexc.o \
+ monolib_fswatcher.o \
+- monolib_msw_secretstore.o
++ monolib_msw_secretstore.o \
+ monolib_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_1 \
+@@ -7297,7 +7297,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2 = \
+ monolib_uuid.o \
+ monolib_msw_evtloop.o \
+ monolib_access.o \
+- monolib_dark_mode.o
++ monolib_dark_mode.o \
+ monolib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_2 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_2 = \
+@@ -8209,7 +8209,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3 = \
+ monolib_uuid.o \
+ monolib_msw_evtloop.o \
+ monolib_access.o \
+- monolib_dark_mode.o
++ monolib_dark_mode.o \
+ monolib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_3 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_3 = \
+@@ -8436,7 +8436,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2 = \
+ basedll_msw_utils.o \
+ basedll_utilsexc.o \
+ basedll_fswatcher.o \
+- basedll_msw_secretstore.o
++ basedll_msw_secretstore.o \
+ basedll_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_2 \
+@@ -8523,7 +8523,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3 = \
+ baselib_msw_utils.o \
+ baselib_utilsexc.o \
+ baselib_fswatcher.o \
+- baselib_msw_secretstore.o
++ baselib_msw_secretstore.o \
+ baselib_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_3 \
+@@ -9464,7 +9464,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4 = \
+ coredll_uuid.o \
+ coredll_msw_evtloop.o \
+ coredll_access.o \
+- coredll_dark_mode.o
++ coredll_dark_mode.o \
+ coredll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_4 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_4 = \
+@@ -10376,7 +10376,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5 = \
+ coredll_uuid.o \
+ coredll_msw_evtloop.o \
+ coredll_access.o \
+- coredll_dark_mode.o
++ coredll_dark_mode.o \
+ coredll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_5 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_5 = \
+@@ -11204,7 +11204,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6 = \
+ corelib_uuid.o \
+ corelib_msw_evtloop.o \
+ corelib_access.o \
+- corelib_dark_mode.o
++ corelib_dark_mode.o \
+ corelib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_6 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_6 = \
+@@ -12116,7 +12116,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7 = \
+ corelib_uuid.o \
+ corelib_msw_evtloop.o \
+ corelib_access.o \
+- corelib_dark_mode.o
++ corelib_dark_mode.o \
+ corelib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_7 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_7 = \
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index 973e962fb1..11c2ac2154 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -46,6 +46,7 @@ (define-module (gnu packages wxwidgets)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gl)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages graphics)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
@@ -265,6 +266,44 @@ (define-public wxwidgets-2
(("-Wall") "-Wall -Wno-narrowing"))
#t)))))))
+(define-public prusa-wxwidgets
+ ;; There is no proper tag/release, all patches are in separate branches based on
+ ;; the wxWidgets release (e.g. this commit is taken from "v3.2.0-patched" branch".)
+ (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26")
+ (revision "0"))
+ (package
+ (inherit wxwidgets)
+ (name "prusa-wxwidgets")
+ (version (git-version "3.2.0" revision commit))
+ (home-page "https://github.com/prusa3d/wxWidgets")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url home-page)
+ (commit commit)))
+ (file-name (git-file-name name version))
+ ;; The patch is taken from the NixOS nixpkgs repository (see
+ ;; <https://github.com/NixOS/nixpkgs/commit/0e724ac89f3dbf6ed31d647290a371b44a85e5ad>.)
+ (patches (search-patches "prusa-wxwidgets-makefile-fix.patch"))
+ (sha256
+ (base32
+ "1xk6w7q4xv4cj906xa5dwam5q51mc8bszbkkz7l8d3wjmsz73rwv"))))
+ (native-inputs (modify-inputs (package-native-inputs wxwidgets)
+ (prepend nanosvg)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments wxwidgets)
+ ((#:configure-flags flags)
+ ;; To fix 3D rendering in PrusaSlicer, wxWidgets must be compiled with
+ ;; "--disable-glcanvasegl" flag (see
+ ;; <https://github.com/NixOS/nixpkgs/issues/193135>.)
+ #~(cons "--disable-glcanvasegl" #$flags))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'copy-nanosvg-source
+ (lambda _
+ (copy-recursively #$(package-source nanosvg) "3rdparty/nanosvg/"))))))))))
+
(define-public python-wxpython
(package
(name "python-wxpython")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 13 Jul 13:13 +0200
[PATCH v3 8/8] gnu: prusa-slicer: Update to 2.7.4.
(address . 70880@debbugs.gnu.org)(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)
c1a91e02b14ef67a370ccd2ec609c6428ada781d.1720869087.git.poptsov.artyom@gmail.com
* gnu/packages/engineering.scm (prusa-slicer): Update to 2.7.4. [source]:
Remove "prusa-slicer-boost-fixes.patch" and
"prusa-slicer-with-cereal-1.3.1.patch". Move some part of the snippet code to
custom build phases.
[arguments] <configure-flags>: Add paths to external libraries. Add
"fix-include-paths" phase.
[native-inputs]: Add catch2.
[inputs]: Use prusa-wxwidgets instead of wxwidgets to fix segfaults. Add
qhull, nanosvg, heatshrink and prusa-libbgcode. Sort inputs aphabetically.
* gnu/packages/patches/prusa-slicer-boost-fixes.patch,
gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch: Remove unused
patches.
* gnu/local.mk (dist_patch_DATA): De-register "prusa-slicer-boost-fixes.patch"
and "prusa-slicer-with-cereal-1.3.1.patch".

Change-Id: I15e85d63c9ad6c731c8040ef2d8ec8b2f31f2ab7
---
gnu/local.mk | 2 -
gnu/packages/engineering.scm | 55 +++++++----
.../patches/prusa-slicer-boost-fixes.patch | 97 -------------------
.../prusa-slicer-with-cereal-1.3.1.patch | 52 ----------
4 files changed, 36 insertions(+), 170 deletions(-)
delete mode 100644 gnu/packages/patches/prusa-slicer-boost-fixes.patch
delete mode 100644 gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch

Toggle diff (292 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 541f636c35..92bbe821cd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1844,9 +1844,7 @@ dist_patch_DATA = \
%D%/packages/patches/pokerth-boost.patch \
%D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \
%D%/packages/patches/procps-strtod-test.patch \
- %D%/packages/patches/prusa-slicer-boost-fixes.patch \
%D%/packages/patches/prusa-slicer-fix-tests.patch \
- %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch \
%D%/packages/patches/prusa-wxwidgets-makefile-fix.patch \
%D%/packages/patches/pthreadpool-system-libraries.patch \
%D%/packages/patches/python-3.12-fix-tests.patch \
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 30eb5a7773..f017d75f2e 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3824,7 +3824,7 @@ (define-public prusa-libbgcode
(define-public prusa-slicer
(package
(name "prusa-slicer")
- (version "2.5.2")
+ (version "2.7.4")
(source
(origin
(method git-fetch)
@@ -3833,13 +3833,11 @@ (define-public prusa-slicer
(url "https://github.com/prusa3d/PrusaSlicer")
(commit (string-append "version_" version))))
(file-name (git-file-name name version))
- (sha256 (base32 "02qcrw3fa0d8ldbp73hp14l1qxbp3f4608j4csc07ny00ra42151"))
- (patches (search-patches "prusa-slicer-boost-fixes.patch"
- "prusa-slicer-fix-tests.patch"
- "prusa-slicer-with-cereal-1.3.1.patch"))
+ (sha256 (base32 "0s1cfvhfilyv0y98asr61c6rwlgyr1hf5v5hg8q9zwmzm2bkcql3"))
+ (patches (search-patches "prusa-slicer-fix-tests.patch"))
(modules '((guix build utils)))
(snippet
- '(begin
+ `(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.
@@ -3847,10 +3845,12 @@ (define-public prusa-slicer
(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\\(libigl\\)" all)
- (string-append
- all "\ninclude_directories(libigl INTERFACE libigl::core)"))
(("add_subdirectory\\(hidapi\\)")
"pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
(("include_directories\\(hidapi/include\\)")
@@ -3863,13 +3863,26 @@ (define-public prusa-slicer
(("\\bhidapi\\b") "${HIDAPI_LIBRARIES}"))))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
- '("-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")))
+ (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))
+ (list pkg-config catch2))
(inputs
(list boost
cereal
@@ -3877,11 +3890,13 @@ (define-public prusa-slicer
curl
dbus
eigen
+ eudev
expat
glew
glib
gmp
gtk+
+ heatshrink
hidapi
ilmbase
libigl
@@ -3889,15 +3904,17 @@ (define-public prusa-slicer
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
- eudev
- ;; prusa-slicer 2.5 segfaults on startup with wxwidgets 3.2
- ;; See https://github.com/prusa3d/PrusaSlicer/issues/8299
- wxwidgets-3.0
zlib))
(home-page "https://www.prusa3d.com/prusaslicer/")
(synopsis "G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)")
diff --git a/gnu/packages/patches/prusa-slicer-boost-fixes.patch b/gnu/packages/patches/prusa-slicer-boost-fixes.patch
deleted file mode 100644
index 5bca271625..0000000000
--- a/gnu/packages/patches/prusa-slicer-boost-fixes.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-Fixes for Boost compatibility.
-This patch comes from Gentoo:
- portage/media-gfx/prusaslicer/files/prusaslicer-2.5.0_alpha2-boost-fixes.patch
-
---- a/src/hints/HintsToPot.cpp
-+++ b/src/hints/HintsToPot.cpp
-@@ -1,6 +1,7 @@
- #include <iostream>
- #include <vector>
- #include <string>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/dll.hpp>
- #include <boost/property_tree/ini_parser.hpp>
-@@ -9,7 +10,7 @@
-
- bool write_to_pot(boost::filesystem::path path, const std::vector<std::pair<std::string, std::string>>& data)
- {
-- boost::filesystem::ofstream file(std::move(path), std::ios_base::app);
-+ boost::nowide::ofstream file(std::move(path), std::ios_base::app);
- for (const auto& element : data)
- {
- //Example of .pot element
---- a/src/libslic3r/Preset.cpp
-+++ b/src/libslic3r/Preset.cpp
-@@ -25,6 +25,7 @@
- #include <stdexcept>
- #include <unordered_map>
- #include <boost/format.hpp>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/filesystem/fstream.hpp>
- #include <boost/algorithm/string.hpp>
-@@ -84,7 +85,7 @@ ConfigFileType guess_config_file_type(const ptree &tree)
- VendorProfile VendorProfile::from_ini(const boost::filesystem::path &path, bool load_all)
- {
- ptree tree;
-- boost::filesystem::ifstream ifs(path);
-+ boost::nowide::ifstream ifs(path);
- boost::property_tree::read_ini(ifs, tree);
- return VendorProfile::from_ini(tree, path, load_all);
- }
---- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp
-+++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
-@@ -10,6 +10,7 @@
- #include "libslic3r/Platform.hpp"
- #include "libslic3r/Config.hpp"
-
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/log/trivial.hpp>
- #include <boost/dll/runtime_symbol_info.hpp>
-@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog()
-
- } // namespace GUI
- } // namespace Slic3r
--#endif // __linux__
-\ No newline at end of file
-+#endif // __linux__
---- a/src/slic3r/GUI/GUI_App.cpp
-+++ b/src/slic3r/GUI/GUI_App.cpp
-@@ -13,6 +13,7 @@
- #include <cstdlib>
- #include <regex>
- #include <string_view>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/algorithm/string/predicate.hpp>
- #include <boost/algorithm/string.hpp>
- #include <boost/format.hpp>
---- a/src/slic3r/GUI/HintNotification.cpp
-+++ b/src/slic3r/GUI/HintNotification.cpp
-@@ -15,6 +15,7 @@
- #include "libslic3r/PrintConfig.hpp"
-
- #include <boost/algorithm/string/replace.hpp>
-+#include <boost/nowide/fstream.hpp>
- #include <boost/filesystem.hpp>
- #include <boost/nowide/fstream.hpp>
- #include <boost/log/trivial.hpp>
-@@ -65,7 +66,7 @@ inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, f
-
- void write_used_binary(const std::vector<std::string>& ids)
- {
-- boost::filesystem::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary);
-+ boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary);
- cereal::BinaryOutputArchive archive(file);
- HintsCerealData cd { ids };
- try
-@@ -84,7 +85,7 @@ void read_used_binary(std::vector<std::string>& ids)
- BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string();
- return;
- }
-- boost::filesystem::ifstream file(path);
-+ boost::nowide::ifstream file(path);
- cereal::BinaryInputArchive archive(file);
- HintsCerealData cd;
- try
diff --git a/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch b/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
deleted file mode 100644
index affa506b1c..0000000000
--- a/gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Fix for building with cereal>=1.3.1.
-This patch comes from Gentoo:
- portage/media-gfx/prusaslicer/files/prusaslicer-2.5.0_rc1-cereal-1.3.1.patch
-
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -127,7 +127,7 @@
- set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
- endif ()
-
--target_link_libraries(PrusaSlicer libslic3r cereal)
-+target_link_libraries(PrusaSlicer libslic3r libcereal)
-
- if (APPLE)
- # add_compile_options(-stdlib=libc++)
---- a/src/slic3r/CMakeLists.txt
-+++ b/src/slic3r/CMakeLists.txt
-@@ -260,7 +260,7 @@
-
- encoding_check(libslic3r_gui)
-
--target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
-+target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
-
- if (MSVC)
- target_link_libraries(libslic3r_gui Setupapi.lib)
---- a/src/libslic3r/CMakeLists.txt
-+++ b/src/libslic3r/CMakeLists.txt
-@@ -395,7 +395,7 @@
- target_link_libraries(libslic3r
- libnest2d
- admesh
-- cereal
-+ libcereal
- libigl
- miniz
- boost_libs
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -446,6 +446,12 @@
-
- # Find the Cereal serialization library
- find_package(cereal REQUIRED)
-+add_library(libcereal INTERFACE)
-+if (NOT TARGET cereal::cereal)
-+ target_link_libraries(libcereal INTERFACE cereal)
-+else()
-+ target_link_libraries(libcereal INTERFACE cereal::cereal)
-+endif()
-
- # l10n
- set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
--
2.45.2
A
A
Artyom V. Poptsov wrote on 13 Jul 15:05 +0200
Re: [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 70880@debbugs.gnu.org)
87ttgt8mt6.fsf@gmail.com
Hello Maxim!

I've sent the patchset v3 with fixes, could you please review it when
you have time?

Thanks!

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmaSe4kZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfhvbD/4m13fPxLxYJF2Y+0T3dgSJ
d8vrA8ttyZZWx5eek0QoCZCAFuIukahY7xit6oaYKyIsOWmf+TZpTFz+D0Gomzkq
9VHW6TIAcWZF5a6dZY+V8eKz/xsSJXQlCNKHI1uOspCvrDcjOAMblXUBzUDykKhz
JFr1z0Gd6lQbaAAKJNofcgpjf0u63CcrmbtyTG6GVAQwYYU8rjOsbPqbl1Q9/+ly
Mh835kM7r4TGKJu750FJxdLdeP+eZdRVfPuPoX/iCyS2yodNh30oXzevd/R+dx9P
mFliI72ZPBr1OiD323HMb9O4toE+hBwe1/469jIJMDNp2pDKTzqxcq2mSIcsbDRn
jkMzJe1F5feJ9oQJeDWrWUt3vxcq4+589HiU+hy355dHYwhOVvq/p5TMDNvviDDy
OKfESg10EuQTkxeK9airOgANlwq9zAYjN8nkDTbRcJdmc5QztKJsbbQXikfsEKG/
BetAp+0qDdMZqqz6wnqOcheLCea+Se7Yc7rnQ4dZTMoCyLETJuzWwovfWy3pPp93
PDcw+Qyr3t3BObVSWKTZAk7htwhDCOe4kAJ2iYu26+ABUnMRnWdESZMtRfJNzmOr
aGx4r72urz5zY0zPOnsbTDxTGdYPLgwliAiFqnNzV4PU10goPJDVKh3LPA5PuiFm
yVE7v481gL1vnS2FQNjMdA==
=0jU1
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 18 Jul 21:44 +0200
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 70880@debbugs.gnu.org)
87bk2u1o3r.fsf@gmail.com
Hello Maxim Cournoyer!

Have you had any chance to review the new patchset?

Looking forward to start my work on the further PrusaSlicer updating.
:-)

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmaZcLwZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfurtD/0XdTXzefZc8Snft9GpH6/v
hT6nCmSfqoTjKPOf1/pjADhZ9vEtQWPARwHO6tFAUb6McnisaPoC0CEDBGZ0mgRh
bYCay2PsGCjI1KDb9+/SMytUgzKZyenMzygqoRfT3r2LWtMqlU+7ufGbInngJA9w
NK2QphKfbq4Ad/4hgRxWzXmcoorvEd10c0jrQzgP+zdl69fdDJMqk+0W/0JrobKk
RE2jfLD+UYxBjgvwIpGlV+puGMnscmeLTqtkCfW8V1pVng2R2pcovZAsVktReauP
pd4phEYizBnGpEvFzGXQumkj10ph1F6zpijJF7TjCV8ZiCcYP53pDctMycFZV6jo
oww7a7djoB0D2Njfvf4rxS7mjG7Xw8cSuztp3ULrr5iKKl2g8J/QifJnK3lwLRCz
krISApOXyhCXrMUwZAYUMfQNugaDoQJ98Xo0iBSGodD06ua2+rMlgVuBpsiu8Xug
18SPrZjCA4VZxTHm9gEHsvfrw+7gNG3cxbXZQkoauPz5Xen/McYjGD9pEUnjSwJW
ifTfTK0R5YCXqylOuxfMeExV//m+B8KXxnL5z7pX5x97+iC/R1VhBMFcD55WV1Uf
t1APScy5oF1GXxqctdutNggUGa3wm3XgRl2I5pHnf1lr/eutsmi6zpH4bTdBX8Vs
Wmus4z/Cpp25nUKhKa5YHw==
=Uhek
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 29 Jul 06:08 +0200
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 70880@debbugs.gnu.org)
87cymwj0v8.fsf@gmail.com
Hello!

Just a little ping. ;-)

It's been more than two weeks since I've sent the patch set.

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmanFeEZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfpUqEACrMoSrBiT8Wg5r+5vbY/go
0SwHF9Gwk85QVykJYDbgPiwBFkBB+MtX9xILBx/tCzxrc5To9z9eSDf7I2hUuImG
pwa4LkDf6n4IJ9461ZQFfLmK4Mp/Su7w9SA9TWne/esGv0oy5feBw/kiZarHefUJ
LaES3RmZGVggaEhviSwdlPyWqjrqlWLBHN7x53/WqwabkWu4ohQakqP2R2jddibH
SEWv/RhATZZrCUOMYJF2u6u+zEE0krwkPCOspuOpfWCeq+At4NXd9MRo5zHprUYr
sUF5NpEY4Bb6L7O1uL47bap2KGto6wF1No6DxK3IDWdCh/KeKlcn1DD61uGJ6ZRv
3QIkbtn482nABLT4NK4IK2qPKHJxq5Au3+j98cmLk88h8V/xm8U9eAeFhMXqkJCy
FCYLGpVBMPRiP0buu5zcE5qQmeGU3aDEr2BWVNyQscyK7E+SGvaz2bdYMVTqCmRx
MUS7J9b/+JGJEKc8utZZk3jcqeCgL/G+1VzW0gC9e5tCwG+/3kJX4n4JIaw70w+R
5LGAtZKUgOj/iynPRwhsSirfkyKGvH11sHFpP2r4IQ7Du/M2nyQOrvo4au2GrJ87
q0StUDV8GxBMkkaHCE/EH8IJtr4kONOaQTdB9Yl9/CZdhF9ivNXnfGQZIuGDZmrc
y+LAG6QBtbK6wbLE3hNvFg==
=/hvV
-----END PGP SIGNATURE-----

A
A
Artyom V. Poptsov wrote on 7 Aug 20:45 +0200
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 70880@debbugs.gnu.org)
87ikwcnpdz.fsf@gmail.com
Hello!

Just a little ping. ;-)

It's been more than three weeks since I've sent the patch set.

- avp

--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEEAf2F9Bp7f4IFgwalk16+BzbchX4FAmazwL8ZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRCTXr4HNtyFfsEAEAC5iGmfpwfwRlvm9BQH8A66
/kIf0hZuTfx9Rj4CO0PP91Xbc3FlaUkADYJoBP6/KD4713OyJl6Zx6+8ORwSa3Pk
wMH/Z9IeABbKhYE35z5HRx47DC8rZlxoejE2laWxemmztZutwp++5h8VDXl4XJgK
E3y2X6avkCJyu7iBEoA5FB3L/qSQcpnJTrYzOcL5mfa0y/OGGZVcOHk6OLHUQYIR
rQOsCVSUOSnIZYg7mkWYYcK/z73q9MKKA9XYBqfARtwbAdABu27KTH5XKN56NaPW
BXXA4vCYf4j2tdGh9V8nNpGpTJRsbsb8iZQCpQRAOTfcZhUnnBmyJc/H3Gn573W0
XkWqNl2jvZlACC3vUt4oK2p1XnByAoGFMUKAvaGAjSg/ox8L0grYirI7KfJCpT07
A1k3S6eMDcSfdxMN15cK4LItFI1oXOhaN6ihUQzXxxrhI5geE9f62WA1lLQSCV2J
JR/SmA0UESL8TeP8y8ppoKhagjBMNwjvo7NLVhxKpCvH99u81IIsqm51Au8HGZGc
4eyx3Nsc/2jSrL6z+48rCnXD1sUDmlherst0eR+F1cOYQZsIiApS6SFxKx4Cdd7P
gT3jpWe2zoSjKPy/mVrKnTv1Vc4LY+/s6eK97BSDm6ic9yCsv1SfX+ytDDKwo1R7
4M2v1BHDFlaxnBGCMPIxMA==
=ISXa
-----END PGP SIGNATURE-----

S
S
Sharlatan Hellseher wrote on 13 Aug 00:41 +0200
[PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4.
(address . 70880-done@debbugs.gnu.org)
87zfphz7n7.fsf@gmail.com
Hi,

Pushed v3 as adea135c8c...fe7c622ab0 to master.

--
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAma6j4wACgkQdtcnv/Ys
0rVh7Q//YRRiixdu83mKwPq37dmCPAcECmyGys8t4kWeZDwpTS2DLfWWbeEZP8YC
rwyx6NJq9h/7Aeh9u4q7cQT+hAsWGePSdQkNW4dn+MHRtaQr44LXN4uBvMygIcZR
BJ7ijjnFxPRBWKebrKXGmBEi3f3x+7bg9RU9lDRohxbIeZekyOohJHTPJnQvXGgJ
u7oFnQUhCrDYL5+ooQxEqauZoglSnjniYPE5ZPV1VWC+BRyalCr8bWxDFLus0j9l
TGpE3xNy73CP0153p5y6TShcztCfxEP1SIB2omPXYUeRDfx9onQI2E3rrRRl5TN/
iBocqndpOFuGd9XVzJQ/u0DkFiU/HbwoS/b3K5e6yKVQzpf8TdSR3GJu+vNyHpGG
NGcoEbUSj4vBCV4Uw234cJ6X10KjG2K5cjka7nvlT39V+ZtdQKRoaaJClVb9JJ43
WvQ2SQxOy86HIXTEiVeqiDJT7LTHEpwdNeA5NUpSVAScjZ+KGUogMxBKDbrdyIem
JcE9TOuEYTIS2RNXeIbeE591WG3abSza7c2aDvh/tEyYg8inNfac+APuaaGblq4k
9NY1hM6a8oXvRtwYW2Qpkv+WLguuJFQFGUbH7nyE9GmRhyqDqW3FOGGmNC+sE8++
NFdQvrWPfJXbQJx9/qfTrPkmoJe2YlHbKk+n8rjbfg2csMjkxPo=
=85xA
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 70880@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 70880
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