[bug#77813,4/4] gnu: opencascade-occt: style

Message ID 20250415011509.2138157-4-nomike@nomike.com
State New
Headers
Series [bug#77810,1/4] gnu: opencascade-occt: Fix new version detection |

Commit Message

nomike April 15, 2025, 1:15 a.m. UTC
  Change-Id: Icbeccf64e2328eecfc62b5e03260e46cde05e8d3
---
 gnu/packages/maths.scm | 104 ++++++++++++++++++++---------------------
 1 file changed, 51 insertions(+), 53 deletions(-)
  

Comments

Andreas Enge April 15, 2025, 8:21 p.m. UTC | #1
#77813 depends on
   https://issues.guix.gnu.org/77811

Could you maybe try to send a new series of two patches as a v2 to
77811@debbugs.gnu.org ? I am closing the other one to regroup the issues.

Concerning the update (to version 7.9.0, not 7.9.8), QA has apparently
picked up the complete series nevertheless:
   https://qa.guix.gnu.org/issue/77810
and it turns out that the current prusa-slicer does require the older
version of opencascade-occt:
   https://data.qa.guix.gnu.org/gnu/store/33a52hfl83jw112pwrqifqg5wchz5di5-prusa-slicer-2.7.4.drv
But there is also a new prusa-slicer version, maybe updating prusa-slicer
will solve the problem.

When sending a new patch series, please cc me so that I am informed of
the update.

Thanks,

Andreas
  
Andreas Enge April 15, 2025, 9:01 p.m. UTC | #2
Am Tue, Apr 15, 2025 at 10:21:07PM +0200 schrieb Andreas Enge:
> and it turns out that the current prusa-slicer does require the older
> version of opencascade-occt:
>    https://data.qa.guix.gnu.org/gnu/store/33a52hfl83jw112pwrqifqg5wchz5di5-prusa-slicer-2.7.4.drv
> But there is also a new prusa-slicer version, maybe updating prusa-slicer
> will solve the problem.

Actually, on the contrary: Instead of a *newer*, they have switched back
to an *older* version of what we currently have:
   https://github.com/prusa3d/PrusaSlicer/commit/c6a02106fd1d3caa9a48a6b7c2bdd04546b24485

So the easiest solution would be to keep everything as it is;
is there a good reason to update opencascade-occt?

Andreas
  
nomike April 17, 2025, 11:30 p.m. UTC | #3
On 15.04.25 23:01, Andreas Enge wrote:
> Actually, on the contrary: Instead of a*newer*, they have switched back
> to an*older* version of what we currently have:
>     https://github.com/prusa3d/PrusaSlicer/commit/c6a02106fd1d3caa9a48a6b7c2bdd04546b24485
>
> So the easiest solution would be to keep everything as it is;
> is there a good reason to update opencascade-occt?

Yeah, I found that as well in the meantime.

The folks at Prusa have downgraded from version 7.6.2 to version 7.6.1 
in August 2024 as the newer version seems to have a bug impacting 
PrusaSlicer [0].
Since then they did not change this.

I submitted a new patch (https://issues.guix.gnu.org/77881) which adds 
version 7.6.1 in addition to the currently available 7.6.2, so that 
other programs (e.g. freecad) are unaffected but I'm still able to 
upgrade prusa-slicer.

So I believe this ticket here could be closed for now. I plan to keep 
track of prusa-slicer upgrades in the future, so if things change and 
prusa-slicer switches to a newer version of opencascade-occt which no 
longer has this bug, I will know and will submit a new patch.

[0] 
https://github.com/prusa3d/PrusaSlicer/commit/c6a02106fd1d3caa9a48a6b7c2bdd04546b24485
  

Patch

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5461650e3e..7f2afcce76 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -68,6 +68,7 @@ 
 ;;; Copyright © 2024, 2025 Artyom V. Poptsov <poptsov.artyom@gmail.com>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2025 Luca Cirrottola <luca.cirrottola@inria.fr>
+;;; Copyright © 2025 nomike Postmann <nomike@nomike.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3328,37 +3329,37 @@  (define-public opencascade-occt
   (package
     (name "opencascade-occt")
     (version "7.9.0")
-    (properties
-      '((release-tag-prefix . "^V")
-        (release-tag-suffix . "")
-        (release-tag-version-delimiter . "_")))
+    (properties '((release-tag-prefix . "^V") (release-tag-suffix . "")
+                  (release-tag-version-delimiter . "_")))
     (source
-      (origin
-        (method git-fetch)
-        (uri (git-reference
-              (url "https://git.dev.opencascade.org/repos/occt.git")
-              (commit
-               (string-append "V"
-                              (string-map (lambda (x) (if (eq? x #\.) #\_ x))
-                                          version)))))
-        (file-name (git-file-name name version))
-        (sha256
-         (base32 "1j6g6h5cqrcwslqnz7nkn9jxxa94gavz3s2h7b51r2ic484kd2df"))
-        (modules '((guix build utils)))
-        (snippet
-         '(begin
-            ;; Remove files specific to non-free operating systems.
-            (delete-file-recursively "samples/ios")
-            (delete-file-recursively "samples/mfc")
-            (delete-file-recursively "samples/qt/FuncDemo")
-            ;; Remove references to deleted files.
-            (substitute* "dox/FILES_HTML.txt"
-              ((".*standard.*") "" )
-              ((".*UIKitSample.*") ""))
-            #t))))
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.dev.opencascade.org/repos/occt.git")
+             (commit (string-append "V"
+                                    (string-map (lambda (x)
+                                                  (if (eq? x #\.) #\_ x))
+                                                version)))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1j6g6h5cqrcwslqnz7nkn9jxxa94gavz3s2h7b51r2ic484kd2df"))
+       (modules '((guix build utils)))
+       (snippet '(begin
+                   ;; Remove files specific to non-free operating systems.
+                   (delete-file-recursively "samples/ios")
+                   (delete-file-recursively "samples/mfc")
+                   (delete-file-recursively "samples/qt/FuncDemo")
+                   ;; Remove references to deleted files.
+                   (substitute* "dox/FILES_HTML.txt"
+                     ((".*standard.*")
+                      "")
+                     ((".*UIKitSample.*")
+                      ""))
+                   #t))))
     (build-system cmake-build-system)
     (arguments
-     '(;; There is no test target for make.  OCCT provides an
+     '( ;There is no test target for make.  OCCT provides an
+       
        ;; 'Automated Testing System', which may be accessed after
        ;; installation via the draw.sh script.  draw.sh is located in
        ;; the bin directory. For details see:
@@ -3368,27 +3369,24 @@  (define-public opencascade-occt
        ;; Configure without freeimage: attempting to link against the
        ;; freeimage version 3.17 library leads to 'undefined
        ;; reference' errors.
-       #:configure-flags
-        (list "-DUSE_FREEIMAGE:BOOL=OFF"
-              "-DUSE_TBB:BOOL=ON"
-              "-DUSE_VTK:BOOL=OFF"
-              "-DBUILD_DOC_Overview:BOOL=OFF"
-              "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
-              "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
-              "-UCMAKE_INSTALL_LIBDIR")))
-    (native-inputs (list fontconfig
-                         doxygen))
-    (inputs
-     (list freetype
-           ;("freeimage" ,freeimage)
-           glu
-           libxext
-           libxi
-           libxmu
-           mesa
-           tbb
-           tcl
-           tk))
+       #:configure-flags (list "-DUSE_FREEIMAGE:BOOL=OFF"
+                               "-DUSE_TBB:BOOL=ON"
+                               "-DUSE_VTK:BOOL=OFF"
+                               "-DBUILD_DOC_Overview:BOOL=OFF"
+                               "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
+                               "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
+                               "-UCMAKE_INSTALL_LIBDIR")))
+    (native-inputs (list fontconfig doxygen))
+    (inputs (list freetype
+                  ;; ("freeimage" ,freeimage)
+                  glu
+                  libxext
+                  libxi
+                  libxmu
+                  mesa
+                  tbb
+                  tcl
+                  tk))
     ;; TODO: build Overview documentation and add 'doc' output.
     (home-page "https://www.opencascade.com")
     (synopsis "Libraries for 3D modeling and numerical simulation")
@@ -3402,15 +3400,15 @@  (define-public opencascade-occt
 control (CAQ) domains.
 
 This is the certified version of the Open Cascade Technology (OCCT) library.")
-    (license (list ;; OCCT library:
-                   license:lgpl2.1; with an exception for the use of header
-                                  ; files, see OCCT_LGPL_EXCEPTION.txt.
+    (license (list ;OCCT library:
+                   license:lgpl2.1 ;with an exception for the use of header
+                   ;; files, see OCCT_LGPL_EXCEPTION.txt.
                    ;; Files src/OpenGl/glext.h, adm/cmake/cotire.cmake and
                    ;; src/OpenGl/OpenGl_HaltonSampler.hxx:
                    license:expat
                    ;; Files src/ExprIntrp/ExprIntrp.tab.* and
                    ;; src/StepFile/step.tab.*:
-                   license:gpl3+  ; with Bison 2.2 exception.
+                   license:gpl3+ ;with Bison 2.2 exception.
                    ;; File src/NCollection/NCollection_UtfIterator.lxx:
                    (license:non-copyleft
                     "https://www.unicode.org/license.html")