all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#70880] [PATCH v2 1/8] gnu: cgal: Update to 5.6.1.
       [not found] <cover.1719853592.git.poptsov.artyom@gmail.com>
@ 2024-07-01 17:07 ` Artyom V. Poptsov
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 2/8] gnu: glfw: Update to 3.3.10 Artyom V. Poptsov
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-01 17:07 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 | 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





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

* [bug#70880] [PATCH v2 2/8] gnu: glfw: Update to 3.3.10.
       [not found] <cover.1719853592.git.poptsov.artyom@gmail.com>
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 1/8] gnu: cgal: Update to 5.6.1 Artyom V. Poptsov
@ 2024-07-01 17:07 ` Artyom V. Poptsov
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 3/8] gnu: glfw-3.4: New variable Artyom V. Poptsov
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-01 17:07 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.45.2





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

* [bug#70880] [PATCH v2 3/8] gnu: glfw-3.4: New variable.
       [not found] <cover.1719853592.git.poptsov.artyom@gmail.com>
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 1/8] gnu: cgal: Update to 5.6.1 Artyom V. Poptsov
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 2/8] gnu: glfw: Update to 3.3.10 Artyom V. Poptsov
@ 2024-07-01 17:07 ` Artyom V. Poptsov
  2024-07-10  2:11   ` Maxim Cournoyer
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0 Artyom V. Poptsov
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-01 17:07 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.45.2





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

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





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

* [bug#70880] [PATCH v2 5/8] gnu: Add heatshrink.
       [not found] <cover.1719853592.git.poptsov.artyom@gmail.com>
                   ` (3 preceding siblings ...)
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0 Artyom V. Poptsov
@ 2024-07-01 17:07 ` Artyom V. Poptsov
  2024-07-10  2:24   ` Maxim Cournoyer
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode Artyom V. Poptsov
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-01 17:07 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                  |  42 +++++++
 .../patches/heatshrink-add-cmake.patch        | 111 ++++++++++++++++++
 3 files changed, 154 insertions(+)
 create mode 100644 gnu/packages/patches/heatshrink-add-cmake.patch

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





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

* [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode.
       [not found] <cover.1719853592.git.poptsov.artyom@gmail.com>
                   ` (4 preceding siblings ...)
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 5/8] gnu: Add heatshrink Artyom V. Poptsov
@ 2024-07-01 17:07 ` Artyom V. Poptsov
  2024-07-10  2:30   ` Maxim Cournoyer
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
  7 siblings, 1 reply; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-01 17:07 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

* 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





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

* [bug#70880] [PATCH v2 7/8] gnu: Add prusa-wxwidgets.
       [not found] <cover.1719853592.git.poptsov.artyom@gmail.com>
                   ` (5 preceding siblings ...)
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode Artyom V. Poptsov
@ 2024-07-01 17:07 ` Artyom V. Poptsov
  2024-07-10  2:35   ` Maxim Cournoyer
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
  7 siblings, 1 reply; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-01 17:07 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov, Nikita Domnitskii

* gnu/packages/engineering.scm (prusa-wxwidgets): New variable.
* gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register
  "prusa-wxwidgets-makefile-fix.patch".

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

diff --git a/gnu/local.mk b/gnu/local.mk
index e263261986..29107a618b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1842,6 +1842,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/prusa-slicer-boost-fixes.patch		\
   %D%/packages/patches/prusa-slicer-fix-tests.patch		\
   %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch	\
+  %D%/packages/patches/prusa-wxwidgets-makefile-fix.patch	\
   %D%/packages/patches/pthreadpool-system-libraries.patch	\
   %D%/packages/patches/python-3.12-fix-tests.patch		\
   %D%/packages/patches/python-accupy-use-matplotx.patch		\
diff --git a/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch b/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch
new file mode 100644
index 0000000000..aadf976588
--- /dev/null
+++ b/gnu/packages/patches/prusa-wxwidgets-makefile-fix.patch
@@ -0,0 +1,112 @@
+diff --git a/Makefile.in b/Makefile.in
+index 8f33aa2ff4..39928382da 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -4358,7 +4358,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS =  \
+ 	monodll_msw_utils.o \
+ 	monodll_utilsexc.o \
+ 	monodll_fswatcher.o \
+-	monodll_msw_secretstore.o
++	monodll_msw_secretstore.o \
+ 	monodll_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS \
+@@ -5284,7 +5284,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS =  \
+ 	monodll_uuid.o \
+ 	monodll_msw_evtloop.o \
+ 	monodll_access.o \
+-	monodll_dark_mode.o
++	monodll_dark_mode.o \
+ 	monodll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS = \
+@@ -6196,7 +6196,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1 =  \
+ 	monodll_uuid.o \
+ 	monodll_msw_evtloop.o \
+ 	monodll_access.o \
+-	monodll_dark_mode.o
++	monodll_dark_mode.o \
+ 	monodll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_1 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_1)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_1 = \
+@@ -6371,7 +6371,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1 =  \
+ 	monolib_msw_utils.o \
+ 	monolib_utilsexc.o \
+ 	monolib_fswatcher.o \
+-	monolib_msw_secretstore.o
++	monolib_msw_secretstore.o \
+ 	monolib_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_1 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_1)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_1 \
+@@ -7297,7 +7297,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2 =  \
+ 	monolib_uuid.o \
+ 	monolib_msw_evtloop.o \
+ 	monolib_access.o \
+-	monolib_dark_mode.o
++	monolib_dark_mode.o \
+ 	monolib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_2 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_2)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_2 = \
+@@ -8209,7 +8209,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3 =  \
+ 	monolib_uuid.o \
+ 	monolib_msw_evtloop.o \
+ 	monolib_access.o \
+-	monolib_dark_mode.o
++	monolib_dark_mode.o \
+ 	monolib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_3 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_3)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_3 = \
+@@ -8436,7 +8436,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2 =  \
+ 	basedll_msw_utils.o \
+ 	basedll_utilsexc.o \
+ 	basedll_fswatcher.o \
+-	basedll_msw_secretstore.o
++	basedll_msw_secretstore.o \
+ 	basedll_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_2 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_2)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_2 \
+@@ -8523,7 +8523,7 @@ COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3 =  \
+ 	baselib_msw_utils.o \
+ 	baselib_utilsexc.o \
+ 	baselib_fswatcher.o \
+-	baselib_msw_secretstore.o
++	baselib_msw_secretstore.o \
+ 	baselib_msw_uilocale.o
+ @COND_PLATFORM_WIN32_1@__BASE_PLATFORM_SRC_OBJECTS_3 = $(COND_PLATFORM_WIN32_1___BASE_PLATFORM_SRC_OBJECTS_3)
+ @COND_PLATFORM_WIN32_1@__BASE_AND_GUI_PLATFORM_SRC_OBJECTS_3 \
+@@ -9464,7 +9464,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4 =  \
+ 	coredll_uuid.o \
+ 	coredll_msw_evtloop.o \
+ 	coredll_access.o \
+-	coredll_dark_mode.o
++	coredll_dark_mode.o \
+ 	coredll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_4 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_4)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_4 = \
+@@ -10376,7 +10376,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5 =  \
+ 	coredll_uuid.o \
+ 	coredll_msw_evtloop.o \
+ 	coredll_access.o \
+-	coredll_dark_mode.o
++	coredll_dark_mode.o \
+ 	coredll_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_5 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_5)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_5 = \
+@@ -11204,7 +11204,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6 =  \
+ 	corelib_uuid.o \
+ 	corelib_msw_evtloop.o \
+ 	corelib_access.o \
+-	corelib_dark_mode.o
++	corelib_dark_mode.o \
+ 	corelib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_6 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_6)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_6 = \
+@@ -12116,7 +12116,7 @@ COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7 =  \
+ 	corelib_uuid.o \
+ 	corelib_msw_evtloop.o \
+ 	corelib_access.o \
+-	corelib_dark_mode.o
++	corelib_dark_mode.o \
+ 	corelib_msw_bmpbndl.o
+ @COND_TOOLKIT_MSW@__LOWLEVEL_SRC_OBJECTS_7 = $(COND_TOOLKIT_MSW___LOWLEVEL_SRC_OBJECTS_7)
+ @COND_TOOLKIT_OSX_COCOA@__LOWLEVEL_SRC_OBJECTS_7 = \
diff --git a/gnu/packages/wxwidgets.scm b/gnu/packages/wxwidgets.scm
index 973e962fb1..2cf2ceba56 100644
--- a/gnu/packages/wxwidgets.scm
+++ b/gnu/packages/wxwidgets.scm
@@ -265,6 +265,35 @@ (define-public wxwidgets-2
                (("-Wall") "-Wall -Wno-narrowing"))
              #t)))))))
 
+(define-public prusa-wxwidgets
+  ;; There is no tag/release, all patches are in separate branch.
+  (let ((commit "78aa2dc0ea7ce99dc19adc1140f74c3e2e3f3a26"))
+    (package
+      (inherit wxwidgets)
+      (name "prusa-wxwidgets")
+      (version "3.2.0")
+      (home-page "https://github.com/prusa3d/wxWidgets")
+      (source
+       (origin
+         (inherit (package-source wxwidgets))
+         (method git-fetch)
+         (uri (git-reference
+               (url home-page)
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (patches (search-patches "prusa-wxwidgets-makefile-fix.patch"))
+         (sha256
+          (base32
+           "02nd07c23xbclnf1jjfbv6r5vqjb80gsdy2l559c5qzgdcvfd2xd"))))
+      (arguments
+       (substitute-keyword-arguments (package-arguments wxwidgets)
+         ((#:configure-flags flags)
+          ;; To fix 3D rendering in PrusaSlicer, wxWidgets must be compiled with
+          ;; "--disable-glcanvasegl" flag.
+          ;;
+          ;; See <https://github.com/NixOS/nixpkgs/issues/193135>
+          #~(cons "--disable-glcanvasegl" #$flags)))))))
+
 (define-public python-wxpython
   (package
     (name "python-wxpython")
-- 
2.45.2





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

* [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
       [not found] <cover.1719853592.git.poptsov.artyom@gmail.com>
                   ` (6 preceding siblings ...)
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
@ 2024-07-01 17:07 ` Artyom V. Poptsov
  2024-07-10  2:42   ` Maxim Cournoyer
  7 siblings, 1 reply; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-01 17:07 UTC (permalink / raw)
  To: 70880; +Cc: Artyom V. Poptsov

* 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





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

* [bug#70880] [PATCH v2 3/8] gnu: glfw-3.4: New variable.
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 3/8] gnu: glfw-3.4: New variable Artyom V. Poptsov
@ 2024-07-10  2:11   ` Maxim Cournoyer
  0 siblings, 0 replies; 21+ messages in thread
From: Maxim Cournoyer @ 2024-07-10  2:11 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880

Hello,

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




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

* [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0.
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0 Artyom V. Poptsov
@ 2024-07-10  2:20   ` Maxim Cournoyer
  2024-07-13  9:30     ` Artyom V. Poptsov
  0 siblings, 1 reply; 21+ messages in thread
From: Maxim Cournoyer @ 2024-07-10  2:20 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880

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

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

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




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

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

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

  Blablabla text (see: $URL).

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

-- 
Thanks,
Maxim




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

* [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode.
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode Artyom V. Poptsov
@ 2024-07-10  2:30   ` Maxim Cournoyer
  2024-07-13  9:41     ` Artyom V. Poptsov
  0 siblings, 1 reply; 21+ messages in thread
From: Maxim Cournoyer @ 2024-07-10  2:30 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880

Hi,

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




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

* [bug#70880] [PATCH v2 7/8] gnu: Add prusa-wxwidgets.
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
@ 2024-07-10  2:35   ` Maxim Cournoyer
  0 siblings, 0 replies; 21+ messages in thread
From: Maxim Cournoyer @ 2024-07-10  2:35 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880, Nikita Domnitskii

Hello,

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

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

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




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

* [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
  2024-07-01 17:07 ` [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
@ 2024-07-10  2:42   ` Maxim Cournoyer
  2024-07-13 13:05     ` Artyom V. Poptsov
  0 siblings, 1 reply; 21+ messages in thread
From: Maxim Cournoyer @ 2024-07-10  2:42 UTC (permalink / raw)
  To: Artyom V. Poptsov; +Cc: 70880

Hello,

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




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

* [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0.
  2024-07-10  2:20   ` Maxim Cournoyer
@ 2024-07-13  9:30     ` Artyom V. Poptsov
  0 siblings, 0 replies; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-13  9:30 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 70880

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

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@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] 21+ messages in thread

* [bug#70880] [PATCH v2 5/8] gnu: Add heatshrink.
  2024-07-10  2:24   ` Maxim Cournoyer
@ 2024-07-13  9:35     ` Artyom V. Poptsov
  0 siblings, 0 replies; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-13  9:35 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 70880

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


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

Fixed.

- avp

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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] 21+ messages in thread

* [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode.
  2024-07-10  2:30   ` Maxim Cournoyer
@ 2024-07-13  9:41     ` Artyom V. Poptsov
  0 siblings, 0 replies; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-13  9:41 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 70880

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

> Sorry for missing that in my first review: there should be an
> explanatory comment here mentioning which commit to use and why (e.g.:
> "Use the latest commit since there are no proper releases nor tags.")
> [...]
> Nitpick: when there are few inputs (< 5), it's OK to list them inline if
> it fits the 80 columns rule, like:
>
>   (propagated-inputs (list zlib boost heatshrink))
>
> I think this is what 'guix style' would do.
> [...]
> It looks like this package does not provide the Python bindings, so it
> may be best to drop that part of the last sentence mentioning their
> existence, as it would be misleading for Guix users.

Fixed.

- avp

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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] 21+ messages in thread

* [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
  2024-07-10  2:42   ` Maxim Cournoyer
@ 2024-07-13 13:05     ` Artyom V. Poptsov
  2024-07-18 19:44       ` Artyom V. Poptsov
  0 siblings, 1 reply; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-13 13:05 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 70880

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

Hello Maxim!

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

Thanks!

- avp

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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] 21+ messages in thread

* [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
  2024-07-13 13:05     ` Artyom V. Poptsov
@ 2024-07-18 19:44       ` Artyom V. Poptsov
  2024-07-29  4:08         ` Artyom V. Poptsov
  0 siblings, 1 reply; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-18 19:44 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 70880

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

Hello Maxim Cournoyer!

Have you had any chance to review the new patchset?

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

- avp

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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] 21+ messages in thread

* [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
  2024-07-18 19:44       ` Artyom V. Poptsov
@ 2024-07-29  4:08         ` Artyom V. Poptsov
  2024-08-07 18:45           ` Artyom V. Poptsov
  0 siblings, 1 reply; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-07-29  4:08 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 70880

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

Hello!

Just a little ping.  ;-)

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

- avp

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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] 21+ messages in thread

* [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4.
  2024-07-29  4:08         ` Artyom V. Poptsov
@ 2024-08-07 18:45           ` Artyom V. Poptsov
  0 siblings, 0 replies; 21+ messages in thread
From: Artyom V. Poptsov @ 2024-08-07 18:45 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 70880

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

Hello!

Just a little ping.  ;-)

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

- avp

-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
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] 21+ messages in thread

end of thread, other threads:[~2024-08-07 18:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1719853592.git.poptsov.artyom@gmail.com>
2024-07-01 17:07 ` [bug#70880] [PATCH v2 1/8] gnu: cgal: Update to 5.6.1 Artyom V. Poptsov
2024-07-01 17:07 ` [bug#70880] [PATCH v2 2/8] gnu: glfw: Update to 3.3.10 Artyom V. Poptsov
2024-07-01 17:07 ` [bug#70880] [PATCH v2 3/8] gnu: glfw-3.4: New variable Artyom V. Poptsov
2024-07-10  2:11   ` Maxim Cournoyer
2024-07-01 17:07 ` [bug#70880] [PATCH v2 4/8] gnu: libigl: Update to 2.4.0 Artyom V. Poptsov
2024-07-10  2:20   ` Maxim Cournoyer
2024-07-13  9:30     ` Artyom V. Poptsov
2024-07-01 17:07 ` [bug#70880] [PATCH v2 5/8] gnu: Add heatshrink Artyom V. Poptsov
2024-07-10  2:24   ` Maxim Cournoyer
2024-07-13  9:35     ` Artyom V. Poptsov
2024-07-01 17:07 ` [bug#70880] [PATCH v2 6/8] gnu: Add prusa-libbgcode Artyom V. Poptsov
2024-07-10  2:30   ` Maxim Cournoyer
2024-07-13  9:41     ` Artyom V. Poptsov
2024-07-01 17:07 ` [bug#70880] [PATCH v2 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
2024-07-10  2:35   ` Maxim Cournoyer
2024-07-01 17:07 ` [bug#70880] [PATCH v2 8/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
2024-07-10  2:42   ` Maxim Cournoyer
2024-07-13 13:05     ` Artyom V. Poptsov
2024-07-18 19:44       ` Artyom V. Poptsov
2024-07-29  4:08         ` Artyom V. Poptsov
2024-08-07 18:45           ` 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.