GNU bug report logs - #70880
[PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4.

Previous Next

Package: guix-patches;

Reported by: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>

Date: Sat, 11 May 2024 17:58:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Sharlatan Hellseher <sharlatanus <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70880 in the body.
You can then email your comments to 70880 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 11 May 2024 17:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 11 May 2024 17:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Sat, 11 May 2024 20:56:23 +0300
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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 11 May 2024 18:00:05 GMT) Full text and rfc822 format available.

Message #8 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH 1/8] gnu: cgal: Update to 5.6.1.
Date: Sat, 11 May 2024 20:58:29 +0300
* 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(-)

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 <at> gmail.com>
 ;;; Copyright © 2023 David Thompson <dthompson2 <at> worcester.edu>
 ;;; Copyright © 2023 Eric Bavier <bavier <at> posteo.net>
-;;; Copyright © 2023 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
+;;; Copyright © 2023, 2024 Artyom V. Poptsov <poptsov.artyom <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 11 May 2024 18:00:05 GMT) Full text and rfc822 format available.

Message #11 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH 2/8] gnu: glfw: Update to 3.3.10.
Date: Sat, 11 May 2024 20:58:30 +0300
* 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(-)

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 <at> protonmail.com>
 ;;; Copyright © 2023, 2024 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 11 May 2024 18:01:02 GMT) Full text and rfc822 format available.

Message #14 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH 3/8] gnu: glfw-3.4: New variable.
Date: Sat, 11 May 2024 20:58:31 +0300
* 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)))))
+
 (define-public nanovg-for-extempore
   (let ((version "0.7.1")
         (revision "0")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 11 May 2024 18:01:02 GMT) Full text and rfc822 format available.

Message #17 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH 4/8] gnu: libigl: Update to 2.4.0.
Date: Sat, 11 May 2024 20:58:32 +0300
* 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.

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 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 <at> gmail.com>
 ;;; Copyright © 2022 Konstantinos Agiannis <agiannis.kon <at> gmail.com>
 ;;; Copyright © 2022 Greg Hogan <code <at> greghogan.com>
-;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
+;;; Copyright © 2022-2024 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022, 2023 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2023 Theofilos Pechlivanis <theofilos.pechlivanis <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 11 May 2024 18:01:03 GMT) Full text and rfc822 format available.

Message #20 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH 6/8] gnu: Add prusa-libbgcode.
Date: Sat, 11 May 2024 20:58:34 +0300
* 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")
+      (description
+       "Prusa Block & Binary G-code reader/writer/converter.")
+      (license license:agpl3))))
+
 (define-public prusa-slicer
   (package
     (name "prusa-slicer")
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 11 May 2024 18:01:03 GMT) Full text and rfc822 format available.

Message #23 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH 5/8] gnu: heatshrink: New variable.
Date: Sat, 11 May 2024 20:58:33 +0300
* 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 <at> 163.com>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
 ;;; Copyright © 2024 Vinicius Monego <monego <at> posteo.net>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> 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 <at> 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 <at> Targets.cmake)
++    include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME <at> Targets.cmake")
++endif ()
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 11 May 2024 18:01:03 GMT) Full text and rfc822 format available.

Message #26 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>,
 Nikita Domnitskii <nikita <at> domnitskii.me>
Subject: [PATCH 7/8] gnu: Add prusa-wxwidgets.
Date: Sat, 11 May 2024 20:58:35 +0300
* gnu/packages/engineering.scm (prusa-wxwidgets): New variable.

Co-authored-by: Nikita Domnitskii <nikita <at> 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"))
+         (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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 11 May 2024 18:01:04 GMT) Full text and rfc822 format available.

Message #29 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Sat, 11 May 2024 20:58:36 +0300
* 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

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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 08 Jun 2024 14:28:02 GMT) Full text and rfc822 format available.

Message #32 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Sat, 08 Jun 2024 17:27:15 +0300
[Message part 1 (text/plain, inline)]
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 <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 08 Jun 2024 14:29:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 24 Jun 2024 03:20:01 GMT) Full text and rfc822 format available.

Message #38 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode.
Date: Sun, 23 Jun 2024 23:18:26 -0400
Hello,

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

> * 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/

> +      (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.

> +      (license license:agpl3))))

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

-- 
Thanks,
Maxim




Added tag(s) moreinfo. Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 24 Jun 2024 03:20:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 24 Jun 2024 03:25:02 GMT) Full text and rfc822 format available.

Message #43 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable.
Date: Sun, 23 Jun 2024 23:22:53 -0400
Hi,

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

> * 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 <at> 163.com>
>  ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
>  ;;; Copyright © 2024 Vinicius Monego <monego <at> posteo.net>
> +;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> 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: "

> +@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




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 24 Jun 2024 03:26:01 GMT) Full text and rfc822 format available.

Message #46 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable.
Date: Sun, 23 Jun 2024 23:24:05 -0400
Another nitpick: the commit summary line should read 'gnu: Add heatshrink.'

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 24 Jun 2024 03:31:02 GMT) Full text and rfc822 format available.

Message #49 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org, Nikita Domnitskii <nikita <at> domnitskii.me>
Subject: Re: [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets.
Date: Sun, 23 Jun 2024 23:28:52 -0400
Hi,

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

> * gnu/packages/engineering.scm (prusa-wxwidgets): New variable.
>
> Co-authored-by: Nikita Domnitskii <nikita <at> 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').

> +      (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.

> +         (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.

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

Could you please send a v2?

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 24 Jun 2024 03:32:02 GMT) Full text and rfc822 format available.

Message #52 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org, Nikita Domnitskii <nikita <at> domnitskii.me>
Subject: Re: [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets.
Date: Sun, 23 Jun 2024 23:30:01 -0400
Hi,

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

> * gnu/packages/engineering.scm (prusa-wxwidgets): New variable.
>
> Co-authored-by: Nikita Domnitskii <nikita <at> 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




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 24 Jun 2024 03:40:02 GMT) Full text and rfc822 format available.

Message #55 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Sun, 23 Jun 2024 23:38:14 -0400
Hi Artyom,

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

> * 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.

> 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.

>
> 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.

> +           #: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.

>      (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




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 01 Jul 2024 16:28:02 GMT) Full text and rfc822 format available.

Message #58 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode.
Date: Mon, 01 Jul 2024 19:25:38 +0300
[Message part 1 (text/plain, inline)]
Hello Maxim,

first of all, thanks for reviewing my patches!

> s/&/and/

Fixed.

> 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
<https://help.prusa3d.com/article/binary-g-code_646763>

> 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:
<https://github.com/prusa3d/libbgcode/blob/8ae75bd0eea622f0e34cae311b3bd065b55eae9b/pyproject.toml#L12>

Fixed.

- avp

-- 
Artyom "avp" Poptsov <poptsov.artyom <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 01 Jul 2024 17:09:02 GMT) Full text and rfc822 format available.

Message #61 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v2 3/8] gnu: glfw-3.4: New variable.
Date: Mon,  1 Jul 2024 20:07:05 +0300
* 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)))))
+
 (define-public nanovg-for-extempore
   (let ((version "0.7.1")
         (revision "0")
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 01 Jul 2024 17:09:02 GMT) Full text and rfc822 format available.

Message #64 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v2 1/8] gnu: cgal: Update to 5.6.1.
Date: Mon,  1 Jul 2024 20:07:03 +0300
* 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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 01 Jul 2024 17:09:03 GMT) Full text and rfc822 format available.

Message #67 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v2 2/8] gnu: glfw: Update to 3.3.10.
Date: Mon,  1 Jul 2024 20:07:04 +0300
* 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(-)

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 <at> protonmail.com>
 ;;; Copyright © 2023, 2024 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 01 Jul 2024 17:09:03 GMT) Full text and rfc822 format available.

Message #70 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v2 4/8] gnu: libigl: Update to 2.4.0.
Date: Mon,  1 Jul 2024 20:07:06 +0300
* 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.

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 <at> gmail.com>
 ;;; Copyright © 2022 Konstantinos Agiannis <agiannis.kon <at> gmail.com>
 ;;; Copyright © 2022 Greg Hogan <code <at> greghogan.com>
-;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
+;;; Copyright © 2022-2024 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022, 2023 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2023 Theofilos Pechlivanis <theofilos.pechlivanis <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 01 Jul 2024 17:09:04 GMT) Full text and rfc822 format available.

Message #73 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v2 5/8] gnu: Add heatshrink.
Date: Mon,  1 Jul 2024 20:07:07 +0300
* 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 <at> hotmail.com>
 ;;; Copyright © 2024 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2024 David Elsing <david.elsing <at> posteo.net>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> 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 <at> 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 <at> Targets.cmake)
++    include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME <at> Targets.cmake")
++endif ()
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 01 Jul 2024 17:09:04 GMT) Full text and rfc822 format available.

Message #76 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v2 6/8] gnu: Add prusa-libbgcode.
Date: Mon,  1 Jul 2024 20:07:08 +0300
* 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
+  (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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 01 Jul 2024 17:09:04 GMT) Full text and rfc822 format available.

Message #79 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>,
 Nikita Domnitskii <nikita <at> domnitskii.me>
Subject: [PATCH v2 7/8] gnu: Add prusa-wxwidgets.
Date: Mon,  1 Jul 2024 20:07:09 +0300
* 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 <at> 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 @@
+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 <at> __BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS)
+ @COND_PLATFORM_WIN32_1 <at> __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 <at> __LOWLEVEL_SRC_OBJECTS = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_1 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1)
+ @COND_PLATFORM_WIN32_1 <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_2 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_3 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2)
+ @COND_PLATFORM_WIN32_1 <at> __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 <at> __BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3)
+ @COND_PLATFORM_WIN32_1 <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_4 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_5 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_6 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_7 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7)
+ @COND_TOOLKIT_OSX_COCOA <at> __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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 01 Jul 2024 17:09:05 GMT) Full text and rfc822 format available.

Message #82 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Mon,  1 Jul 2024 20:07:10 +0300
* 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

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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Tue, 09 Jul 2024 19:01:01 GMT) Full text and rfc822 format available.

Message #85 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode.
Date: Tue, 09 Jul 2024 21:59:10 +0300
[Message part 1 (text/plain, inline)]
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 <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Wed, 10 Jul 2024 02:13:02 GMT) Full text and rfc822 format available.

Message #88 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 3/8] gnu: glfw-3.4: New variable.
Date: Tue, 09 Jul 2024 22:11:48 -0400
Hello,

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

> * 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




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Wed, 10 Jul 2024 02:22:01 GMT) Full text and rfc822 format available.

Message #91 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0.
Date: Tue, 09 Jul 2024 22:20:42 -0400
"Artyom V. Poptsov" <poptsov.artyom <at> gmail.com> writes:

> * 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.

> 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 <at> gmail.com>
>  ;;; Copyright © 2022 Konstantinos Agiannis <agiannis.kon <at> gmail.com>
>  ;;; Copyright © 2022 Greg Hogan <code <at> greghogan.com>
> -;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
> +;;; Copyright © 2022-2024 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
>  ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
>  ;;; Copyright © 2022, 2023 Felix Gruber <felgru <at> posteo.net>
>  ;;; Copyright © 2023 Theofilos Pechlivanis <theofilos.pechlivanis <at> 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.

>           (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.

> +         (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




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Wed, 10 Jul 2024 02:26:02 GMT) Full text and rfc822 format available.

Message #94 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 5/8] gnu: Add heatshrink.
Date: Tue, 09 Jul 2024 22:24:18 -0400
Hi,

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

> * 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 <at> hotmail.com>
>  ;;; Copyright © 2024 Vinicius Monego <monego <at> posteo.net>
>  ;;; Copyright © 2024 David Elsing <david.elsing <at> posteo.net>
> +;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> 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 <at> gmail>

-- 
Thanks,
Maxim




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Wed, 10 Jul 2024 02:32:02 GMT) Full text and rfc822 format available.

Message #97 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode.
Date: Tue, 09 Jul 2024 22:30:25 -0400
Hi,

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

> * 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.")

> +  (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.

> +      (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} ...
                       
> +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




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Wed, 10 Jul 2024 02:37:01 GMT) Full text and rfc822 format available.

Message #100 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org, Nikita Domnitskii <nikita <at> domnitskii.me>
Subject: Re: [bug#70880] [PATCH v2 7/8] gnu: Add prusa-wxwidgets.
Date: Tue, 09 Jul 2024 22:35:28 -0400
Hello,

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

> * 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 <at> 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.

> +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 <at> __BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS)
> + @COND_PLATFORM_WIN32_1 <at> __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 <at> __LOWLEVEL_SRC_OBJECTS = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS)
> + @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_1 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1)
> + @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1)
> + @COND_PLATFORM_WIN32_1 <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_2 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2)
> + @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_3 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3)
> + @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2)
> + @COND_PLATFORM_WIN32_1 <at> __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 <at> __BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3)
> + @COND_PLATFORM_WIN32_1 <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_4 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4)
> + @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_5 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5)
> + @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_6 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6)
> + @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_7 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7)
> + @COND_TOOLKIT_OSX_COCOA <at> __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'.

> +  ;; There is no tag/release, all patches are in separate branch.

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

> +  (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




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Wed, 10 Jul 2024 02:44:01 GMT) Full text and rfc822 format available.

Message #103 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Tue, 09 Jul 2024 22:42:22 -0400
Hello,

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

> * 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 :-)

>   "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.

>   [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.

> * 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




Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 09:32:01 GMT) Full text and rfc822 format available.

Message #106 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0.
Date: Sat, 13 Jul 2024 12:30:37 +0300
[Message part 1 (text/plain, inline)]
Hello!

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

Okay, fixed that.

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

Done.

> 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.

> 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:

--8<---------------cut here---------------start------------->8---
       ("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"))))
--8<---------------cut here---------------end--------------->8---

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 <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 09:37:02 GMT) Full text and rfc822 format available.

Message #109 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 5/8] gnu: Add heatshrink.
Date: Sat, 13 Jul 2024 12:35:09 +0300
[Message part 1 (text/plain, inline)]
> Not a hard requirement, but there's some loose convention used in Guix
> for referencing URLs:

Fixed.

- avp

-- 
Artyom "avp" Poptsov <poptsov.artyom <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 09:43:01 GMT) Full text and rfc822 format available.

Message #112 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode.
Date: Sat, 13 Jul 2024 12:41:48 +0300
[Message part 1 (text/plain, inline)]
> 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 <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 11:15:01 GMT) Full text and rfc822 format available.

Message #115 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v3 1/8] gnu: cgal: Update to 5.6.1.
Date: Sat, 13 Jul 2024 14:13:10 +0300
* 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(-)

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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 11:15:02 GMT) Full text and rfc822 format available.

Message #118 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v3 2/8] gnu: glfw: Update to 3.3.10.
Date: Sat, 13 Jul 2024 14:13:11 +0300
* 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(-)

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 <at> protonmail.com>
 ;;; Copyright © 2023, 2024 Zheng Junjie <873216071 <at> qq.com>
 ;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler <at> gmail.com>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 11:15:02 GMT) Full text and rfc822 format available.

Message #121 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v3 5/8] gnu: Add heatshrink.
Date: Sat, 13 Jul 2024 14:13:14 +0300
* 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

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 <at> hotmail.com>
 ;;; Copyright © 2024 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2024 David Elsing <david.elsing <at> posteo.net>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> 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 <at> 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 <at> Targets.cmake)
++    include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME <at> Targets.cmake")
++endif ()
-- 
2.45.2





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 11:15:03 GMT) Full text and rfc822 format available.

Message #124 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v3 3/8] gnu: glfw-3.4: New variable.
Date: Sat, 13 Jul 2024 14:13:12 +0300
* 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..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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 11:15:03 GMT) Full text and rfc822 format available.

Message #127 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v3 4/8] gnu: libigl: Update to 2.4.0.
Date: Sat, 13 Jul 2024 14:13:13 +0300
* 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.

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

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 <at> gmail.com>
 ;;; Copyright © 2022 Konstantinos Agiannis <agiannis.kon <at> gmail.com>
 ;;; Copyright © 2022 Greg Hogan <code <at> greghogan.com>
-;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
+;;; Copyright © 2022-2024 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022, 2023 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2023 Theofilos Pechlivanis <theofilos.pechlivanis <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 11:15:04 GMT) Full text and rfc822 format available.

Message #130 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v3 6/8] gnu: Add prusa-libbgcode.
Date: Sat, 13 Jul 2024 14:13:15 +0300
* 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 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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 11:15:04 GMT) Full text and rfc822 format available.

Message #133 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>,
 Nikita Domnitskii <nikita <at> domnitskii.me>
Subject: [PATCH v3 7/8] gnu: Add prusa-wxwidgets.
Date: Sat, 13 Jul 2024 14:13:16 +0300
* 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 <at> 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

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 <at> __BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS)
+ @COND_PLATFORM_WIN32_1 <at> __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 <at> __LOWLEVEL_SRC_OBJECTS = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_1 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1)
+ @COND_PLATFORM_WIN32_1 <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_2 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_3 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2)
+ @COND_PLATFORM_WIN32_1 <at> __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 <at> __BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3)
+ @COND_PLATFORM_WIN32_1 <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_4 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_5 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_6 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6)
+ @COND_TOOLKIT_OSX_COCOA <at> __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 <at> __LOWLEVEL_SRC_OBJECTS_7 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7)
+ @COND_TOOLKIT_OSX_COCOA <at> __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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 11:15:04 GMT) Full text and rfc822 format available.

Message #136 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: 70880 <at> debbugs.gnu.org
Cc: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
Subject: [PATCH v3 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Sat, 13 Jul 2024 14:13:17 +0300
* 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

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





Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Sat, 13 Jul 2024 13:07:02 GMT) Full text and rfc822 format available.

Message #139 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Sat, 13 Jul 2024 16:05:09 +0300
[Message part 1 (text/plain, inline)]
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 <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Thu, 18 Jul 2024 19:47:01 GMT) Full text and rfc822 format available.

Message #142 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Thu, 18 Jul 2024 22:44:56 +0300
[Message part 1 (text/plain, inline)]
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 <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Mon, 29 Jul 2024 04:11:02 GMT) Full text and rfc822 format available.

Message #145 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Mon, 29 Jul 2024 07:08:59 +0300
[Message part 1 (text/plain, inline)]
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 <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#70880; Package guix-patches. (Wed, 07 Aug 2024 18:47:01 GMT) Full text and rfc822 format available.

Message #148 received at 70880 <at> debbugs.gnu.org (full text, mbox):

From: "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 70880 <at> debbugs.gnu.org
Subject: Re: [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Wed, 07 Aug 2024 21:45:12 +0300
[Message part 1 (text/plain, inline)]
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 <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Reply sent to Sharlatan Hellseher <sharlatanus <at> gmail.com>:
You have taken responsibility. (Mon, 12 Aug 2024 22:44:02 GMT) Full text and rfc822 format available.

Notification sent to "Artyom V. Poptsov" <poptsov.artyom <at> gmail.com>:
bug acknowledged by developer. (Mon, 12 Aug 2024 22:44:02 GMT) Full text and rfc822 format available.

Message #153 received at 70880-done <at> debbugs.gnu.org (full text, mbox):

From: Sharlatan Hellseher <sharlatanus <at> gmail.com>
To: 70880-done <at> debbugs.gnu.org
Subject: [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Mon, 12 Aug 2024 23:41:16 +0100
[Message part 1 (text/plain, inline)]
Hi,

Pushed v3 as adea135c8c...fe7c622ab0 to master.

--
Oleg
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 10 Sep 2024 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.