unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Ekaitz Zarraga <ekaitz@elenq.tech>
To: Leo Famulari <leo@famulari.name>,
	"45573@debbugs.gnu.org" <45573@debbugs.gnu.org>
Subject: [bug#45573] [PATCH] Correct freecad runtime errors
Date: Fri, 01 Jan 2021 14:37:39 +0000	[thread overview]
Message-ID: <TQfDzzG0TKkwRtg4mmmxbY9ptCT7JGE-ij8Nl2xmDj23f7w0rTG3QfZEYfNaq6Mzh_CDNAbtJxKVhTFL4IP1YgQgImlaG4STqV6DdGoauQc=@elenq.tech> (raw)
In-Reply-To: <6b2IbqX7a-q86Pjb_nOtz_XcCOrATSHf2T7vfIU5qrXWhYtQFsoex3XlfmDVhLt8UXjnOonMiLCS-1oKUzxXpp8x3HSUjNkzUjhUsKGc3Iw=@elenq.tech>

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

Hi,

I attach the corrected patch set.
If something is missing please let me know.

Thanks.

Happy new year.

Ekaitz

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-coin3D-4.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-coin3D-4.patch, Size: 2696 bytes --]

From 8c8c82dfc52a8775b01a0d038ddf42ba453624e5 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Fri, 1 Jan 2021 15:16:07 +0100
Subject: [PATCH 1/6] gnu: Add coin3D-4.

    * gnu/packages/graphics.scm (coin3D-4): New variable.
---
 gnu/packages/graphics.scm | 51 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 7a61084f24..86c95ef11b 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -1732,6 +1732,57 @@ standard graphics library for 3D visualization and visual simulation
 software in the scientific and engineering community.")
       (license license:bsd-3))))
 
+(define-public coin3D-4
+    (package
+    (name "coin3D-4")
+    (version "4.0.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/coin3d/coin")
+               (commit (string-append "Coin-" version))
+               (recursive? #t)))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "1ayg0hl8wanhadahm5xbghghxw1qjwqbrs3dl3ngnff027hsyf8p"))
+        (modules '((guix build utils)))
+        (snippet
+          '(begin
+             ;; Delete binaries
+             (for-each delete-file
+                       '("cfg/csubst.exe"
+                         "cfg/wrapmsvc.exe"))
+             ;; Delete references to packaging tool cpack
+             (substitute* "CMakeLists.txt"
+               ((".*cpack.d.*") ""))
+             #t))))
+    (build-system cmake-build-system)
+    (native-inputs
+      `(("doxygen" ,doxygen)
+        ("graphviz" ,graphviz)))
+    (inputs
+      `(("boost" ,boost)
+        ("freeglut" ,freeglut)
+        ("glew" ,glew)))
+    (arguments
+      `(#:configure-flags
+        (list
+          "-DCOIN_BUILD_DOCUMENTATION_MAN=ON"
+          (string-append "-DBOOST_ROOT="
+                         (assoc-ref %build-inputs "boost")))))
+    (home-page "https://github.com/coin3d/coin")
+    (synopsis
+      "High-level 3D visualization library with Open Inventor 2.1 API")
+    (description
+      "Coin is a 3D graphics library with an Application Programming Interface
+based on the Open Inventor 2.1 API.  For those who are not familiar with Open
+Inventor, it is a scene-graph based retain-mode rendering and model interaction
+library, written in C++, which has become the de facto standard graphics
+library for 3D visualization and visual simulation software in the scientific
+and engineering community.")
+      (license license:bsd-3)))
+
 (define-public superfamiconv
   (package
     (name "superfamiconv")
-- 
2.29.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-soqt.patch --]
[-- Type: text/x-patch; name=0002-gnu-Add-soqt.patch, Size: 2142 bytes --]

From 97b6ebf7e1c0dfe5728c9e8dc72cd6f7cb237909 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Fri, 1 Jan 2021 15:17:06 +0100
Subject: [PATCH 2/6] gnu: Add soqt.

    * gnu/packages/qt.scm (soqt): New variable.
---
 gnu/packages/qt.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 2e621e758c..3e93bc55f4 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -67,6 +67,7 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphics)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages icu4c)
@@ -2824,3 +2825,35 @@ being fully customizable and easy to extend.")
     ;; According to LICENSE, either version 2 or version 3 of the GNU GPL may
     ;; be used.
     (license (list license:gpl2 license:gpl3))))
+
+
+(define-public soqt
+  (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d")
+        (revision "1"))
+    (package
+    (name "soqt")
+    (version (git-version "1.6.0" revision commit-ref))
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/coin3d/soqt")
+               (commit commit-ref)
+               (recursive? #t)))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "16vikb3fy8rmk10sg5g0gy2c343hi3x7zccsga90ssnkzpq6m032"))))
+    (build-system cmake-build-system)
+    (arguments '(#:tests? #f)) ; There are no tests
+    (native-inputs
+      `(("pkg-config" ,pkg-config)
+        ("cmake" ,cmake)))
+    (inputs
+      `(("qtbase" ,qtbase)
+        ("coin3D-4" ,coin3D-4)))
+    (home-page "https://github.com/coin3d/soqt")
+    (synopsis "Qt GUI component toolkit library for Coin")
+    (description "SoQt is a Qt GUI component toolkit library for Coin.  It is
+also compatible with SGI and TGS Open Inventor, and the API is based on the API
+of the InventorXt GUI component toolkit.")
+    (license license:bsd-3))))
-- 
2.29.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0005-gnu-freecad-move-python-pyside-2-tools-to-native-inp.patch --]
[-- Type: text/x-patch; name=0005-gnu-freecad-move-python-pyside-2-tools-to-native-inp.patch, Size: 1325 bytes --]

From d823feac3d4a0e05d1c452a0caeaeb528cb01587 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Fri, 1 Jan 2021 15:24:54 +0100
Subject: [PATCH 5/6] gnu: freecad: move python-pyside-2-tools to native-inputs

    * gnu/packages/engineering.scm (freecad):
    [inputs]: Remove python-pyside-2-tools.
    [native-inputs]: Add python-pyside-2-tools.
---
 gnu/packages/engineering.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 4bb7f68939..113766d453 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2453,6 +2453,7 @@ full programmatic control over your models.")
        ("graphviz" ,graphviz)
        ("qttools" ,qttools)
        ("pkg-config" ,pkg-config)
+       ("python-pyside-2-tools" ,python-pyside-2-tools)
        ("swig" ,swig)))
     (inputs
      `(("boost" ,boost)
@@ -2470,7 +2471,6 @@ full programmatic control over your models.")
        ("opencascade-occt" ,opencascade-occt)
        ("python-matplotlib" ,python-matplotlib)
        ("python-pyside-2" ,python-pyside-2)
-       ("python-pyside-2-tools" ,python-pyside-2-tools)
        ("python-shiboken-2" ,python-shiboken-2)
        ("python-pivy" ,python-pivy)
        ("python-wrapper" ,python-wrapper)
-- 
2.29.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0006-gnu-freecad-Add-qtwebkit-input.patch --]
[-- Type: text/x-patch; name=0006-gnu-freecad-Add-qtwebkit-input.patch, Size: 1014 bytes --]

From 273b0e5cc9813c2e1965531a11b3778bea46e057 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Fri, 1 Jan 2021 15:28:09 +0100
Subject: [PATCH 6/6] gnu: freecad: Add qtwebkit input.

    * gnu/packages/engineering.scm (freecad):
    [inputs]: Add qtwebkit.
---
 gnu/packages/engineering.scm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 113766d453..30846bc1ad 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2478,9 +2478,7 @@ full programmatic control over your models.")
        ("qtsvg" ,qtsvg)
        ("qtx11extras" ,qtx11extras)
        ("qtxmlpatterns" ,qtxmlpatterns)
-       ;; qtwebkit is optional. We remove it currently, because it takes
-       ;; much time to compile and substitutes are often unavailable
-       ;;("qtwebkit" ,qtwebkit)
+       ("qtwebkit" ,qtwebkit)
        ("tbb" ,tbb)
        ("vtk" ,vtk)
        ("xerces-c" ,xerces-c)
-- 
2.29.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0003-gnu-Add-python-pivy.patch --]
[-- Type: text/x-patch; name=0003-gnu-Add-python-pivy.patch, Size: 2531 bytes --]

From beb817f850a334ecc3b773499bbd4845ab6d835f Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Fri, 1 Jan 2021 15:17:37 +0100
Subject: [PATCH 3/6] gnu: Add python-pivy.

    * gnu/packages/python-xyz.scm (python-pivy): New variable.
---
 gnu/packages/python-xyz.scm | 44 +++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d07c91121a..183cfa2894 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -175,6 +175,7 @@
   #:use-module (gnu packages shells)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages ssh)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages terminals)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages texinfo)
@@ -23238,3 +23239,46 @@ process.")
      "Gamera is a toolkit for building document image recognition systems.")
     (home-page "https://gamera.informatik.hsnr.de/")
     (license license:gpl2+)))
+
+(define-public python-pivy
+  (package
+    (name "python-pivy")
+    (version "0.6.5")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/coin3d/pivy")
+               (commit version)))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
+    (build-system python-build-system)
+    (arguments
+      `(#:tests? #f ; Tests are broken
+        #:phases
+        (modify-phases %standard-phases
+          (add-after 'unpack 'patch-cmake-include-dirs
+           (lambda _
+             ;; Patch buildsystem to respect Coin3D include directory
+             (substitute* "CMakeLists.txt"
+                          (("\\$\\{SoQt_INCLUDE_DIRS}")
+                           "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
+             #t)))))
+    (native-inputs
+      `(("cmake" ,cmake)
+        ("swig" ,swig)))
+    (inputs
+      `(("python-wrapper" ,python-wrapper)
+        ("qtbase" ,qtbase)
+        ("libxi" ,libxi)
+        ("libice" ,libice)
+        ("soqt" ,soqt)
+        ("glew" ,glew)
+        ("coin3D-4" ,coin3D-4)))
+    (home-page "https://github.com/coin3d/pivy")
+    (synopsis "Python bindings to Coin3D")
+    (description
+      "Pivy provides python bindings for Coin, a 3D graphics library with an
+Application Programming Interface based on the Open Inventor 2.1 API.")
+    (license license:isc)))
-- 
2.29.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0004-gnu-FreeCad-Update-to-0.18.5-1.7616153.patch --]
[-- Type: text/x-patch; name=0004-gnu-FreeCad-Update-to-0.18.5-1.7616153.patch, Size: 2737 bytes --]

From 42a78d572abdddbed86b69de0e87468823bfe8d9 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Fri, 1 Jan 2021 15:22:02 +0100
Subject: [PATCH 4/6] gnu: FreeCad: Update to 0.18.5-1.7616153.

Fixes Draft module import errors

    * gnu/packages/engineering.scm (freecad): Update to 0.18.5-1.7616153.
    [inputs]: Add python-pivy.
---
 gnu/packages/engineering.scm | 41 ++++++++++++++++--------------------
 1 file changed, 18 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index e436994492..4bb7f68939 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2432,28 +2432,21 @@ full programmatic control over your models.")
     (license license:gpl2+)))
 
 (define-public freecad
-  (package
-    (name "freecad")
-    (version "0.18.5")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/FreeCAD/FreeCAD")
-             (commit version)))
-       (modules '((guix build utils)))
-       (snippet
-        '(begin
-           ;; Fix build with Python 3.8, see
-           ;; <https://tracker.freecadweb.org/view.php?id=4143>.
-           (substitute* "src/Base/swigpyrun.inl"
-             (("PyObject \\*modules = interp->modules;")
-              "PyObject *modules = PyEval_GetBuiltins();"))
-           #t))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "0r31jzzkamf76l19fb175hhv48irk06fpi8ldxdlr31w8c1ix4aa"))))
+  (let ((commit-ref "7616153b3c31ace006169cdc2fdafab484498858")
+        (revision "1"))
+    (package
+      (name "freecad")
+      (version (git-version "0.18.5" revision commit-ref))
+      (source
+        (origin
+          (method git-fetch)
+          (uri (git-reference
+                 (url "https://github.com/FreeCAD/FreeCAD")
+                 (commit commit-ref)))
+          (file-name (git-file-name name version))
+          (sha256
+            (base32
+              "16965yxnp2pq7nm8z3p0pjkzjdyq62vfrj8j3nk26bwc898czyn2"))))
     (build-system qt-build-system)
     (native-inputs
      `(("doxygen" ,doxygen)
@@ -2479,6 +2472,7 @@ full programmatic control over your models.")
        ("python-pyside-2" ,python-pyside-2)
        ("python-pyside-2-tools" ,python-pyside-2-tools)
        ("python-shiboken-2" ,python-shiboken-2)
+       ("python-pivy" ,python-pivy)
        ("python-wrapper" ,python-wrapper)
        ("qtbase" ,qtbase)
        ("qtsvg" ,qtsvg)
@@ -2546,7 +2540,8 @@ customization.")
       license:lgpl2.1+
       license:lgpl2.0+
       license:gpl3+
-      license:bsd-3))))
+      license:bsd-3)))))
+
 
 (define-public libmedfile
   (package
-- 
2.29.2


  reply	other threads:[~2021-01-01 14:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31 18:47 [bug#45573] [PATCH] Correct freecad runtime errors Ekaitz Zarraga
2020-12-31 22:36 ` Leo Famulari
2020-12-31 23:23   ` Ekaitz Zarraga
2021-01-01 14:37     ` Ekaitz Zarraga [this message]
2021-01-04  0:13       ` Leo Famulari
2021-01-04 12:01         ` Ekaitz Zarraga
2021-01-04  0:18       ` Leo Famulari
2021-01-04 12:15         ` Ekaitz Zarraga
2021-01-04 20:12           ` bug#45573: " Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='TQfDzzG0TKkwRtg4mmmxbY9ptCT7JGE-ij8Nl2xmDj23f7w0rTG3QfZEYfNaq6Mzh_CDNAbtJxKVhTFL4IP1YgQgImlaG4STqV6DdGoauQc=@elenq.tech' \
    --to=ekaitz@elenq.tech \
    --cc=45573@debbugs.gnu.org \
    --cc=leo@famulari.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).