GNU bug report logs - #36615
[PATCH] gnu: Add opencascade-occt.

Previous Next

Package: guix-patches;

Reported by: Paul Garlick <pgarlick <at> tourbillion-technology.com>

Date: Fri, 12 Jul 2019 10:10:01 UTC

Severity: normal

Tags: fixed, patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

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

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

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


Report forwarded to guix-patches <at> gnu.org:
bug#36615; Package guix-patches. (Fri, 12 Jul 2019 10:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Garlick <pgarlick <at> tourbillion-technology.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 12 Jul 2019 10:10:02 GMT) Full text and rfc822 format available.

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

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: guix-patches <at> gnu.org
Cc: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Subject: [PATCH] gnu: Add opencascade-occt.
Date: Fri, 12 Jul 2019 11:07:48 +0100
* gnu/packages/maths.scm (opencascade-occt): New variable.
---
 gnu/packages/maths.scm | 87 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 86 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 7d2c479..8b23459 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -15,7 +15,7 @@
 ;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2016, 2017 Thomas Danckaert <post <at> thomasdanckaert.be>
-;;; Copyright © 2017, 2018 Paul Garlick <pgarlick <at> tourbillion-technology.com>
+;;; Copyright © 2017, 2018, 2019 Paul Garlick <pgarlick <at> tourbillion-technology.com>
 ;;; Copyright © 2017 ng0 <ng0 <at> n0.is>
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben <at> gmail.com>
 ;;; Copyright © 2017 Theodoros Foradis <theodoros <at> foradis.org>
@@ -1618,6 +1618,91 @@ Open CASCADE library.")
                    license:expat; file src/OpenGl/OpenGl_glext.h
                    license:bsd-3)))); test framework gtest
 
+(define-public opencascade-occt
+  (package
+    (name "opencascade-occt")
+    (version "7.3.0p3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "https://git.dev.opencascade.org/gitweb/?p=occt.git;"
+              "a=snapshot;sf=tgz;h=refs/tags/V"
+              (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)))
+        (file-name (string-append name "-" version ".tar.gz"))
+        (sha256
+         (base32 "06zjsirydlz9i0ww4s3fgwy6qjflli7041m6i0di64skwyrnvm7v"))
+        (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")
+            (delete-file "genconf.bat")
+            (delete-file "gendoc.bat")
+            (delete-file "genproj.bat")
+            (delete-file "upgrade.bat")
+            ;; 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.
+       #:tests? #f
+       ;; 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")))
+    (inputs
+     `(("doxygen" ,doxygen)
+       ;("freeimage" ,freeimage)
+       ("freetype" ,freetype)
+       ("glu" ,glu)
+       ("libxext" ,libxext)
+       ("libxi" ,libxi)
+       ("libxmu" ,libxmu)
+       ("mesa" ,mesa)
+       ("tbb" ,tbb)
+       ("tcl" ,tcl)
+       ("tk" ,tk)))
+    ;; TODO: build Overview documentation and add 'doc' output.
+    (home-page "https://www.opencascade.com")
+    (synopsis "Libraries for 3D modeling and numerical simulation")
+    (description
+     "Open CASCADE is a set of libraries for the development of applications
+dealing with 3D CAD data or requiring industrial 3D capabilities.  It includes
+C++ class libraries providing services for 3D surface and solid modeling, CAD
+data exchange, and visualization.  It is used for development of specialized
+software dealing with 3D models in design (CAD), manufacturing (CAM),
+numerical simulation (CAE), measurement equipment (CMM), and quality
+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.
+                   ;; 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.
+                   ;; File src/NCollection/NCollection_UtfIterator.lxx:
+                   (license:non-copyleft
+                    "https://www.unicode.org/license.html")
+                   ;; File src/NCollection/NCollection_StdAllocator.hxx:
+                   license:public-domain))))
+
 (define-public gmsh
   (package
     (name "gmsh")
-- 
1.8.3.1





Information forwarded to guix-patches <at> gnu.org:
bug#36615; Package guix-patches. (Fri, 12 Jul 2019 21:52:01 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 36615 <at> debbugs.gnu.org
Subject: Re: [bug#36615] [PATCH] gnu: Add opencascade-occt.
Date: Fri, 12 Jul 2019 23:51:31 +0200
Hi Paul,

Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

> * gnu/packages/maths.scm (opencascade-occt): New variable.

[...]

> +      (origin
> +        (method url-fetch)
> +        (uri (string-append
> +              "https://git.dev.opencascade.org/gitweb/?p=occt.git;"
> +              "a=snapshot;sf=tgz;h=refs/tags/V"
> +              (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)))

I think you should use ‘git-fetch’ instead because generated tarballs
are notoriously prone to silent change.

> +    (arguments
> +     '(;; There is no test target for make.
> +       #:tests? #f

Sometimes CMake-based packages have a configure-time option like
-DWITH_TESTS=ON.  Is there something like that here?

Apart from that it LGTM.  Thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36615; Package guix-patches. (Mon, 15 Jul 2019 18:34:02 GMT) Full text and rfc822 format available.

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

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36615 <at> debbugs.gnu.org
Subject: Re: [bug#36615] [PATCH] gnu: Add opencascade-occt.
Date: Mon, 15 Jul 2019 19:33:20 +0100
[Message part 1 (text/plain, inline)]
Hi Ludo,

Many thanks for your review.  I attach the revised patch.


> I think you should use ‘git-fetch’ instead because generated tarballs
> are notoriously prone to silent change.

'git-fetch' it is.  There is a clone-via-https option for OpenCASCADE
so I have updated the 'origin' section accordingly.


> Sometimes CMake-based packages have a configure-time option like
> -DWITH_TESTS=ON.  Is there something like that here?

Not in this case, AFAICS.  There is a test system that is accessible
after installation, via a shell script, so I have included a comment
and a link to the documentation for that.

This version of OpenCASCADE is the upstream version.  In recent times
it has been updated more regularly than the oce version.

Best regards,

Paul.


[0001-gnu-Add-opencascade-occt.patch (text/x-patch, inline)]
From 3f50efc7447e7d511cca0ca05ec3539df73838fa Mon Sep 17 00:00:00 2001
From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Date: Fri, 12 Jul 2019 10:56:41 +0100
Subject: [PATCH] gnu: Add opencascade-occt.

* gnu/packages/maths.scm (opencascade-occt): New variable.
---
 gnu/packages/maths.scm | 91 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 90 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 7d2c479..afeac50 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -15,7 +15,7 @@
 ;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2016 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2016, 2017 Thomas Danckaert <post <at> thomasdanckaert.be>
-;;; Copyright © 2017, 2018 Paul Garlick <pgarlick <at> tourbillion-technology.com>
+;;; Copyright © 2017, 2018, 2019 Paul Garlick <pgarlick <at> tourbillion-technology.com>
 ;;; Copyright © 2017 ng0 <ng0 <at> n0.is>
 ;;; Copyright © 2017 Ben Woodcroft <donttrustben <at> gmail.com>
 ;;; Copyright © 2017 Theodoros Foradis <theodoros <at> foradis.org>
@@ -1618,6 +1618,95 @@ Open CASCADE library.")
                    license:expat; file src/OpenGl/OpenGl_glext.h
                    license:bsd-3)))); test framework gtest
 
+(define-public opencascade-occt
+  (package
+    (name "opencascade-occt")
+    (version "7.3.0p3")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://git.dev.opencascade.org/repos/occt.git")
+              (commit "e1c158598a585694ad769cde5fe705a23dd586f0")))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0bdywwxb6mk0ykbiajlvsb37295akqjp0a60y672qjfa67k0ljv4"))
+        (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")
+            (delete-file "genconf.bat")
+            (delete-file "gendoc.bat")
+            (delete-file "genproj.bat")
+            (delete-file "upgrade.bat")
+            ;; 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
+       ;; '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:
+       ;; https://www.opencascade.com/doc/occt-7.3.0/overview/html/\
+       ;; occt_dev_guides__tests.html
+       #:tests? #f
+       ;; 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")))
+    (inputs
+     `(("doxygen" ,doxygen)
+       ;("freeimage" ,freeimage)
+       ("freetype" ,freetype)
+       ("glu" ,glu)
+       ("libxext" ,libxext)
+       ("libxi" ,libxi)
+       ("libxmu" ,libxmu)
+       ("mesa" ,mesa)
+       ("tbb" ,tbb)
+       ("tcl" ,tcl)
+       ("tk" ,tk)))
+    ;; TODO: build Overview documentation and add 'doc' output.
+    (home-page "https://www.opencascade.com")
+    (synopsis "Libraries for 3D modeling and numerical simulation")
+    (description
+     "Open CASCADE is a set of libraries for the development of applications
+dealing with 3D CAD data or requiring industrial 3D capabilities.  It includes
+C++ class libraries providing services for 3D surface and solid modeling, CAD
+data exchange, and visualization.  It is used for development of specialized
+software dealing with 3D models in design (CAD), manufacturing (CAM),
+numerical simulation (CAE), measurement equipment (CMM), and quality
+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.
+                   ;; 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.
+                   ;; File src/NCollection/NCollection_UtfIterator.lxx:
+                   (license:non-copyleft
+                    "https://www.unicode.org/license.html")
+                   ;; File src/NCollection/NCollection_StdAllocator.hxx:
+                   license:public-domain))))
+
 (define-public gmsh
   (package
     (name "gmsh")
-- 
1.8.3.1


Information forwarded to guix-patches <at> gnu.org:
bug#36615; Package guix-patches. (Mon, 15 Jul 2019 20:00:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Paul Garlick <pgarlick <at> tourbillion-technology.com>
Cc: 36615 <at> debbugs.gnu.org
Subject: Re: [bug#36615] [PATCH] gnu: Add opencascade-occt.
Date: Mon, 15 Jul 2019 21:59:23 +0200
Hi Paul,

Paul Garlick <pgarlick <at> tourbillion-technology.com> skribis:

>> Sometimes CMake-based packages have a configure-time option like
>> -DWITH_TESTS=ON.  Is there something like that here?
>
> Not in this case, AFAICS.  There is a test system that is accessible
> after installation, via a shell script, so I have included a comment
> and a link to the documentation for that.

OK, sounds good.

> This version of OpenCASCADE is the upstream version.  In recent times
> it has been updated more regularly than the oce version.

I see.

> From 3f50efc7447e7d511cca0ca05ec3539df73838fa Mon Sep 17 00:00:00 2001
> From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
> Date: Fri, 12 Jul 2019 10:56:41 +0100
> Subject: [PATCH] gnu: Add opencascade-occt.
>
> * gnu/packages/maths.scm (opencascade-occt): New variable.

[...]

> +    (version "7.3.0p3")
> +    (source
> +      (origin
> +        (method git-fetch)
> +        (uri (git-reference
> +              (url "https://git.dev.opencascade.org/repos/occt.git")
> +              (commit "e1c158598a585694ad769cde5fe705a23dd586f0")))

If there’s a “v7.3.0p3” tag or similar, please use that in the ‘commit’
field to make it clear that the commit matches the version string.

> +            ;; Remove references to deleted files.
> +            (substitute* "dox/FILES_HTML.txt"
> +                         ((".*standard.*") "" )
> +                         ((".*UIKitSample.*") ""))
                            ^
Nitpick: this is usually aligned below the first ‘u’ of ‘substitute*’.
:-)

OK to push with these changes, thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#36615; Package guix-patches. (Tue, 16 Jul 2019 21:33:02 GMT) Full text and rfc822 format available.

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

From: Paul Garlick <pgarlick <at> tourbillion-technology.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 36615 <at> debbugs.gnu.org
Subject: Re: [bug#36615] [PATCH] gnu: Add opencascade-occt.
Date: Tue, 16 Jul 2019 22:32:18 +0100
Hi Ludo,

> OK to push with these changes, thank you!

Pushed as commit 37dc29200c44adc0474476b8df46ed44e8a1d41a.

Thanks!

Paul.





Added tag(s) fixed. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 17 Jul 2019 12:55:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 36615 <at> debbugs.gnu.org and Paul Garlick <pgarlick <at> tourbillion-technology.com> Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 17 Jul 2019 12:55:05 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 15 Aug 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 256 days ago.

Previous Next


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