all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4.
@ 2024-05-11 17:56 Artyom V. Poptsov
  2024-05-11 17:58 ` [bug#70880] [PATCH 1/8] gnu: cgal: Update to 5.6.1 Artyom V. Poptsov
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-05-11 17:56 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

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





^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 1/8] gnu: cgal: Update to 5.6.1.
  2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
@ 2024-05-11 17:58 ` Artyom V. Poptsov
  2024-05-11 17:58 ` [bug#70880] [PATCH 2/8] gnu: glfw: Update to 3.3.10 Artyom V. Poptsov
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-05-11 17:58 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

* 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@gmail.com>
 ;;; Copyright © 2023 David Thompson <dthompson2@worcester.edu>
 ;;; Copyright © 2023 Eric Bavier <bavier@posteo.net>
-;;; Copyright © 2023 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+;;; Copyright © 2023, 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -775,7 +775,7 @@ (define-public openshadinglanguage
 (define-public cgal
   (package
     (name "cgal")
-    (version "5.2.2")
+    (version "5.6.1")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -783,7 +783,7 @@ (define-public cgal
                     "/CGAL-" version ".tar.xz"))
               (sha256
                (base32
-                "0yjzq12ivizp23y7zqm30x20psv9gzwbcdrhyd3f7h0ds94m1c40"))))
+                "0dsqvnyd2ic50pr28gfz34bpnyx3i2csf1rikmc661hywdz5xcfd"))))
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 2/8] gnu: glfw: Update to 3.3.10.
  2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
  2024-05-11 17:58 ` [bug#70880] [PATCH 1/8] gnu: cgal: Update to 5.6.1 Artyom V. Poptsov
@ 2024-05-11 17:58 ` Artyom V. Poptsov
  2024-05-11 17:58 ` [bug#70880] [PATCH 3/8] gnu: glfw-3.4: New variable Artyom V. Poptsov
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-05-11 17:58 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

* 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@protonmail.com>
 ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2024 Liliana Marie Prikler <liliana.prikler@gmail.com>
+;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -924,7 +925,7 @@ (define-public soil
 (define-public glfw
   (package
     (name "glfw")
-    (version "3.3.9")
+    (version "3.3.10")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/glfw/glfw"
@@ -932,7 +933,7 @@ (define-public glfw
                                   "/glfw-" version ".zip"))
               (sha256
                (base32
-                "023dn97n4h14n5lbjpzjv0y6a2plj254c0w3rr3wraf3z08189jm"))))
+                "1f5xs4cj1y5wk1jimv1mylk6n6vh7433js28mfd1kf7p2zw3whz8"))))
     (build-system cmake-build-system)
     (arguments
      (list
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 3/8] gnu: glfw-3.4: New variable.
  2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
  2024-05-11 17:58 ` [bug#70880] [PATCH 1/8] gnu: cgal: Update to 5.6.1 Artyom V. Poptsov
  2024-05-11 17:58 ` [bug#70880] [PATCH 2/8] gnu: glfw: Update to 3.3.10 Artyom V. Poptsov
@ 2024-05-11 17:58 ` Artyom V. Poptsov
  2024-05-11 17:58 ` [bug#70880] [PATCH 4/8] gnu: libigl: Update to 2.4.0 Artyom V. Poptsov
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-05-11 17:58 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

* 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





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 4/8] gnu: libigl: Update to 2.4.0.
  2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
                   ` (2 preceding siblings ...)
  2024-05-11 17:58 ` [bug#70880] [PATCH 3/8] gnu: glfw-3.4: New variable Artyom V. Poptsov
@ 2024-05-11 17:58 ` Artyom V. Poptsov
  2024-05-11 17:58 ` [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable Artyom V. Poptsov
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-05-11 17:58 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

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





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable.
  2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
                   ` (3 preceding siblings ...)
  2024-05-11 17:58 ` [bug#70880] [PATCH 4/8] gnu: libigl: Update to 2.4.0 Artyom V. Poptsov
@ 2024-05-11 17:58 ` Artyom V. Poptsov
  2024-06-24  3:22   ` Maxim Cournoyer
  2024-06-24  3:24   ` Maxim Cournoyer
  2024-05-11 17:58 ` [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode Artyom V. Poptsov
                   ` (3 subsequent siblings)
  8 siblings, 2 replies; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-05-11 17:58 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

* gnu/packages/compression.scm (heatshrink): New variable.
* gnu/packages/patches/heatshrink-add-cmake.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add "heatshrink-add-cmake.patch".

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

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





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode.
  2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
                   ` (4 preceding siblings ...)
  2024-05-11 17:58 ` [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable Artyom V. Poptsov
@ 2024-05-11 17:58 ` Artyom V. Poptsov
  2024-06-24  3:18   ` Maxim Cournoyer
  2024-05-11 17:58 ` [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-05-11 17:58 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

* 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





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets.
  2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
                   ` (5 preceding siblings ...)
  2024-05-11 17:58 ` [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode Artyom V. Poptsov
@ 2024-05-11 17:58 ` Artyom V. Poptsov
  2024-06-24  3:28   ` Maxim Cournoyer
  2024-06-24  3:30   ` Maxim Cournoyer
  2024-05-11 17:58 ` [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
  2024-06-08 14:27 ` [bug#70880] [PATCH 0/8] " Artyom V. Poptsov
  8 siblings, 2 replies; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-05-11 17:58 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov, Nikita Domnitskii

* gnu/packages/engineering.scm (prusa-wxwidgets): New variable.

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

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b1776484b5..08ff06fa94 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3798,6 +3798,33 @@ (define-public prusa-libbgcode
        "Prusa Block & Binary G-code reader/writer/converter.")
       (license license:agpl3))))
 
+(define-public prusa-wxwidgets
+  ;; There is no tag/release, all patches are in separate branch.
+  (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26"))
+    (package
+      (inherit wxwidgets)
+      (name "prusa-wxwidgets")
+      (version "3.2.0")
+      (home-page "https://github.com/prusa3d/wxWidgets")
+      (source
+       (origin
+         (inherit (package-source wxwidgets))
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url home-page)
+           (commit commit)
+           (recursive? #t)))
+         (file-name (git-file-name name version))
+         (patches (search-patches "prusa-wxwidgets-makefile-fix.patch"))
+         (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





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4.
  2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
                   ` (6 preceding siblings ...)
  2024-05-11 17:58 ` [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
@ 2024-05-11 17:58 ` Artyom V. Poptsov
  2024-06-24  3:38   ` Maxim Cournoyer
  2024-06-08 14:27 ` [bug#70880] [PATCH 0/8] " Artyom V. Poptsov
  8 siblings, 1 reply; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-05-11 17:58 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

* 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





^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4.
  2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
                   ` (7 preceding siblings ...)
  2024-05-11 17:58 ` [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
@ 2024-06-08 14:27 ` Artyom V. Poptsov
  8 siblings, 0 replies; 16+ messages in thread
From: Artyom V. Poptsov @ 2024-06-08 14:27 UTC (permalink / raw)
  To: 70880

[-- Attachment #1: Type: text/plain, Size: 356 bytes --]

Hello!

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

Thanks!

- avp

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 869 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode.
  2024-05-11 17:58 ` [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode Artyom V. Poptsov
@ 2024-06-24  3:18   ` Maxim Cournoyer
  0 siblings, 0 replies; 16+ messages in thread
From: Maxim Cournoyer @ 2024-06-24  3:18 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880

Hello,

"Artyom V. Poptsov" <poptsov.artyom@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




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable.
  2024-05-11 17:58 ` [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable Artyom V. Poptsov
@ 2024-06-24  3:22   ` Maxim Cournoyer
  2024-06-24  3:24   ` Maxim Cournoyer
  1 sibling, 0 replies; 16+ messages in thread
From: Maxim Cournoyer @ 2024-06-24  3:22 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880

Hi,

"Artyom V. Poptsov" <poptsov.artyom@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@163.com>
>  ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
>  ;;; Copyright © 2024 Vinicius Monego <monego@posteo.net>
> +;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -570,6 +571,59 @@ (define-public xz
>     (license (list license:gpl2+ license:lgpl2.1+)) ; bits of both
>     (home-page "https://tukaani.org/xz/")))
>  
> +(define-public heatshrink
> +  (package
> +    (name "heatshrink")
> +    (version "0.4.1")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/atomicobject/heatshrink/")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0sdhvk27yz8kahw18j8pddbpkgl78v8rh8fx6wspc3acj7w7yvrn"))
> +       ;; Add CMake build script, wanted by prusa-slicer and libbgcode, which are the
> +       ;; only users of this library.
> +       ;;
> +       ;; See
> +       ;; <https://github.com/NixOS/nixpkgs/pull/269758/commits/fa36136ceed0e2c58e0c9e21492a7e60c3a64470>
> +       (patches (search-patches "heatshrink-add-cmake.patch"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     (list
> +      ;; XXX: No tests available with CMake.
> +      ;; See <https://github.com/atomicobject/heatshrink/pull/77>
> +      #:tests? #f))
> +    (home-page "https://github.com/atomicobject/heatshrink/")
> +    (synopsis "Data compression library for embedded/real-time systems")
> +    (description
> +     "A data compression/decompression library for embedded/real-time systems.
> +
> +Key features:

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

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




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable.
  2024-05-11 17:58 ` [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable Artyom V. Poptsov
  2024-06-24  3:22   ` Maxim Cournoyer
@ 2024-06-24  3:24   ` Maxim Cournoyer
  1 sibling, 0 replies; 16+ messages in thread
From: Maxim Cournoyer @ 2024-06-24  3:24 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880

Another nitpick: the commit summary line should read 'gnu: Add heatshrink.'

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets.
  2024-05-11 17:58 ` [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
@ 2024-06-24  3:28   ` Maxim Cournoyer
  2024-06-24  3:30   ` Maxim Cournoyer
  1 sibling, 0 replies; 16+ messages in thread
From: Maxim Cournoyer @ 2024-06-24  3:28 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880, Nikita Domnitskii

Hi,

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

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

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

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




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets.
  2024-05-11 17:58 ` [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
  2024-06-24  3:28   ` Maxim Cournoyer
@ 2024-06-24  3:30   ` Maxim Cournoyer
  1 sibling, 0 replies; 16+ messages in thread
From: Maxim Cournoyer @ 2024-06-24  3:30 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880, Nikita Domnitskii

Hi,

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

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

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

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4.
  2024-05-11 17:58 ` [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
@ 2024-06-24  3:38   ` Maxim Cournoyer
  0 siblings, 0 replies; 16+ messages in thread
From: Maxim Cournoyer @ 2024-06-24  3:38 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880

Hi Artyom,

"Artyom V. Poptsov" <poptsov.artyom@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




^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-06-24  3:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 1/8] gnu: cgal: Update to 5.6.1 Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 2/8] gnu: glfw: Update to 3.3.10 Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 3/8] gnu: glfw-3.4: New variable Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 4/8] gnu: libigl: Update to 2.4.0 Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable Artyom V. Poptsov
2024-06-24  3:22   ` Maxim Cournoyer
2024-06-24  3:24   ` Maxim Cournoyer
2024-05-11 17:58 ` [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode Artyom V. Poptsov
2024-06-24  3:18   ` Maxim Cournoyer
2024-05-11 17:58 ` [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
2024-06-24  3:28   ` Maxim Cournoyer
2024-06-24  3:30   ` Maxim Cournoyer
2024-05-11 17:58 ` [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
2024-06-24  3:38   ` Maxim Cournoyer
2024-06-08 14:27 ` [bug#70880] [PATCH 0/8] " Artyom V. Poptsov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.