unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#36440] [PATCH] Add FreeCAD
@ 2019-06-30  2:39 John Soo
  2019-07-02  7:06 ` Björn Höfling
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: John Soo @ 2019-06-30  2:39 UTC (permalink / raw)
  To: 36440


[-- Attachment #1.1: Type: text/plain, Size: 344 bytes --]

Hi all,

I've done linting, and indentation checks.  There are still some issues
with licenses that I've marked and I don't know where to put the changes
that I've included in llvm.scm.  Also I discovered some non-determinism in
the build of freecad just now. I thought it would be good to share my work,
though. It's been long enough.

- John

[-- Attachment #1.2: Type: text/html, Size: 455 bytes --]

[-- Attachment #2: 0001-gnu-Add-FreeCAD.patch --]
[-- Type: text/x-patch, Size: 24553 bytes --]

From 6c84c3a3f723d43145d9105f5c2929a3abeb978b Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Wed, 19 Jun 2019 06:16:52 -0700
Subject: [PATCH] gnu: Add FreeCAD.

 - Dependencies: pyside 2 toolchain and llvm dependencies, Coin3D and soqt
---
 gnu/packages/engineering.scm | 197 +++++++++++++++++++++++++++++++++++
 gnu/packages/graphics.scm    |  80 ++++++++++++++
 gnu/packages/llvm.scm        | 105 +++++++++++++++++++
 gnu/packages/python-xyz.scm  | 151 +++++++++++++++++++++++++++
 4 files changed, 533 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 7d48414889..f000d7eeaa 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -48,9 +48,11 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages fpga)
@@ -63,10 +65,13 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
@@ -87,6 +92,7 @@
   #:use-module (gnu packages tex)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
 (define-public librecad
@@ -2062,3 +2068,194 @@ purpose circuit simulator and can perform DC and transient analyses, fourier
 analysis and AC analysis.  The engine is designed to do true mixed-mode
 simulation.")
     (license license:gpl3+)))
+
+;; FreeCAD
+(define-public freecad
+  (let ((commit "dbb4cc6415bac848a294f03b80f65e888d531742")
+        (revision "1"))
+    (package
+      (name "freecad")
+      (version (git-version "0.18.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/FreeCAD/FreeCAD.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "01ay9wdacm1hymnaw67y8sg63pv0ar1n72ap77q12dv3qibmwz75"))))
+      (build-system cmake-build-system)
+      (native-inputs
+       `(("doxygen" ,doxygen)
+         ("graphviz" ,graphviz)
+         ("qttools" ,qttools)
+         ("pkg-config" ,pkg-config)
+         ("swig" ,swig)))
+      (inputs
+       `(("boost" ,boost)
+         ("coin3D" ,coin3D)
+         ("eigen" ,eigen)
+         ("freetype" ,freetype)
+         ("glew" ,glew)
+         ("hdf5" ,hdf5)
+         ("libarea" ,libarea)
+         ("libspnav" ,libspnav)
+         ("medfile" ,medfile)
+         ("openmpi" ,openmpi)
+         ("opencascade-oce" ,opencascade-oce)
+         ("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-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtsvg" ,qtsvg)
+         ("qtx11extras" ,qtx11extras)
+         ("qtxmlpatterns" ,qtxmlpatterns)
+         ("qtwebkit" ,qtwebkit)
+         ("soqt" ,soqt)
+         ("vtk" ,vtk)
+         ("xerces-c" ,xerces-c)
+         ("zlib" ,zlib)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags
+         (list
+          "-DBUILD_QT5=ON"
+          (string-append "-DCMAKE_INSTALL_LIBDIR="
+                         (assoc-ref %outputs "out") "/lib"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'configure 'restore-pythonpath
+             (lambda _
+               (substitute* "src/Main/MainGui.cpp"
+                 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
+               #t))
+           (add-after 'install 'wrap-pythonpath
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/FreeCAD")
+                   (list "PYTHONPATH"
+                         'prefix (list (getenv "PYTHONPATH")))))
+               #t)))))
+      (home-page "https://www.freecadweb.org/")
+      (synopsis "Your Own 3D Parametric Modeler")
+      (description
+       "FreeCAD is a general purpose feature-based, parametric 3D modeler for
+CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
+product design but also fits a wider range of uses in engineering, such as
+architecture or other engineering specialties.  It is 100% Open Source (LGPL2+
+license) and extremely modular, allowing for very advanced extension and
+customization.")
+      ;; Help!
+      (license license:lgpl2.1+))))
+
+(define medfile
+  (package
+    (name "medfile")
+    (version "3.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://files.salome-platform.org/Salome/other/med-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "1215sal10xp6xirgggdszay2bmx0sxhn9pgh7x0wg2w32gw1wqyx"))))
+    (build-system cmake-build-system)
+    (inputs `(("hdf5" ,hdf5)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-test-output
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file-recursively
+                (string-append out "/bin/testc"))
+               #t))))))
+    (home-page "https://www.salome-platform.org")
+    (synopsis "Library to read and write MED files")
+    (description "Library to read and write MED files")
+    (license license:lgpl2.1)))
+
+(define libarea
+  (let ((revision "1")
+        (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
+    (package
+      (name "libarea")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url "https://github.com/Heeks/libarea.git")
+                             (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
+      (build-system gnu-build-system)
+      (inputs `(("boost" ,boost)
+                ("python-wrapper" ,python-wrapper)))
+      (native-inputs
+       `(("cmake" ,cmake)))
+      (arguments
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'configure 'cmake-configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (cmake (assoc-ref inputs "cmake")))
+                 (mkdir-p "build")
+                 (invoke "cmake"
+                         (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
+           (delete 'configure))))
+      (home-page "https://github.com/Heeks/libarea")
+      (synopsis
+       "Library and python module for pocketing and profiling operations")
+      (description
+       "Area is a CAM-related software for pocketing operation.
+
+This project provides library and associated python-module to compute pocket
+operations.")
+      (license license:bsd-3))))
+
+(define libspnav
+  (let ((commit "20961617eecc845b23fcf9e06acd1a6bb340b88b")
+        (revision "1"))
+    (package
+      (name "libspnav")
+      (version (git-version "0.2.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/FreeSpacenav/libspnav")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1ib5jxcpz76lr90f69vb50yn2q9ss45axlgil29layh36dnyifac"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("libx11" ,libx11)))
+      (arguments `(#:tests? #f))
+      (home-page "http://spacenav.sourceforge.net/")
+      (synopsis
+       "Library for communicating with spacenavd or 3dxsrv")
+      (description
+       "The libspnav library is provided as a replacement of the magellan
+library.  It provides a cleaner, and more orthogonal interface.  libspnav
+supports both the original X11 protocol for communicating with the driver, and
+the new alternative non-X protocol.  Programs that choose to use the X11
+protocol, are automatically compatible with either the free spacenavd driver
+or the official 3dxserv, as if they were using the magellan SDK.
+
+Also, libspnav provides a magellan API wrapper on top of the new API.  So, any
+applications that were using the magellan library, can switch to libspnav
+without any changes.  And programmers that are familliar with the magellan API
+can continue using it with a free library without the restrictions of the
+official SDK.")
+      (license license:bsd-3))))
+;; End FreeCAD
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index f9baf49fe9..7f0b99476b 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -52,6 +52,7 @@
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
@@ -73,6 +74,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -961,3 +963,81 @@ your terminal.  It comes bundled with predefined styles:
 look.  The result can be uploaded on any web server without additional
 requirements.")
     (license license:gpl2+)))
+
+(define-public coin3D
+  (let ((changeset  "8d860d7ba112b22c4e9b289268fd8b3625ab81d3")
+        (revision "1"))
+    (package
+      (name "coin3D")
+      (version
+       (string-append "4.0.0a-" revision "." (string-take changeset 7)))
+      (source
+       (origin
+         (method hg-fetch)
+         (uri (hg-reference (url "https://bitbucket.org/Coin3D/coin")
+                            (changeset changeset)))
+         (sha256
+          (base32
+           "0kgg782j8lkd4bicd8x207mj66vali6kxh6idczjszcxq2iifsr0"))
+         (file-name (git-file-name "coin3D" version))))
+      (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://bitbucket.org/Coin3D/coin/wiki/Home")
+      (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 soqt
+  (let ((changeset "58b495aa6bed9e58542e60df28843f58e2ab8db4")
+        (revision "1"))
+    (package
+      (name "soqt")
+      (version
+       (string-append "1.6.0-" revision "." (string-take changeset 7)))
+      (source
+       (origin
+         (method hg-fetch)
+         (uri (hg-reference (url "https://bitbucket.org/Coin3d/soqt")
+                            (changeset changeset)))
+         (sha256
+          (base32
+           "023rhf8piwcmgi08d3xyqj1cj83v30z6l3zbd5qs1y1mkw9lqfpz"))
+         (file-name (git-file-name "soqt" version))))
+      (build-system cmake-build-system)
+      (native-inputs
+       `(("doxygen" ,doxygen)
+         ("graphviz" ,graphviz)))
+      (inputs
+       `(("coin3D" ,coin3D)
+         ("glew" ,glew)
+         ("libcxx" ,libcxx)
+         ("qtbase" ,qtbase)))
+      (arguments `(#:tests? #f))
+      (home-page "https://bitbucket.org/Coin3D/soqt")
+      (synopsis
+       "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))))
+
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 0315740bcd..4a044ce9f6 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -37,6 +37,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages bootstrap)           ;glibc-dynamic-linker
@@ -667,3 +668,107 @@ C/C++/Obj-C code according to a set of style options, see
     (synopsis "Rename every occurrence of a symbol using clang-rename")
     (description "This package renames every occurrence of a symbol at point
 using @code{clang-rename}.")))
+
+;; PySide2 docs recommend using a bundled version of libclang
+;; See https://wiki.qt.io/Qt_for_Python/GettingStarted
+;; The source they recommend: https://download.qt.io/development_releases/prebuilt/libclang/
+(define-public llvm-toolchain-6
+  (package
+    (inherit llvm-6)
+    (name "llvm-toolchain")
+    (build-system trivial-build-system)
+    (inputs
+     `(("clang-6" ,clang-6)
+       ("llvm-6" ,llvm-6)))
+    (arguments
+     `(#:modules ((guix build union)
+                  (guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build union)
+                      (ice-9 match)
+                      (srfi srfi-1))
+         (union-build
+          (assoc-ref %outputs "out")
+          (filter-map
+           (match-lambda
+             ((name . dir)
+              (if (or (string=? name "clang-6")
+                      (string=? name "llvm-6"))
+                  dir
+                  #f)))
+           %build-inputs))
+         #t)))
+    (license license:ncsa)))
+
+;; See https://bugreports.qt.io/browse/PYSIDE-787
+;; STL headers are not parsed correctly, so only send in some headers
+(define-public python-pyside-2-libcxx-headers
+  (package
+    (inherit libcxx)
+    (name "python-pyside-2-libcxx-headers")
+    (version (package-version llvm-6))
+    (source
+     (origin
+       (inherit (package-source libcxx))
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/libcxx-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'use-only-required-headers
+           (lambda* (#:key outputs #:allow-other-keys)
+             (use-modules ((srfi srfi-1)))
+             (let ((out (assoc-ref outputs "out"))
+                   (required-headers
+                    '("type_traits"
+                      "__config"
+                      "cstddef"
+                      "__nullptr"
+                      "utility"
+                      "__tuple"
+                      "initializer_list"
+                      "cstring"
+                      "cstdint"
+                      "__debug")))
+               (for-each
+                delete-file
+                (filter
+                 (lambda (file)
+                   (not
+                    (fold
+                     (lambda (acc header)
+                       (or acc (string-contains file header)))
+                     #f
+                     required-headers)))
+                 (find-files (string-append out "/include/c++/v1"))))
+               (delete-file-recursively (string-append out "/include/c++/v1/ext"))
+               (delete-file-recursively (string-append out "/include/c++/v1/support"))
+               (delete-file-recursively (string-append out "/lib")))
+             #t)))))
+    (synopsis
+     "Libcxx files specifically used by PySide2.")
+    (description
+     "Libcxx files specifically used by PySide2.")))
+
+(define-public libcxx-6
+  (package
+    (inherit libcxx)
+    (version (package-version llvm-6))
+    (source
+     (origin
+       (inherit (package-source libcxx))
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/libcxx-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)))))
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 181899da36..315682294b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -86,6 +86,7 @@
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
@@ -15803,3 +15804,153 @@ hash, recno, and queue.  Complete support of Berkeley DB distributed
 transactions.  Complete support for Berkeley DB Replication Manager.
 Complete support for Berkeley DB Base Replication.  Support for RPC.")
     (license license:bsd-3)))
+
+(define-public python-pyside-2
+  (let ((revision "1")
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-pyside-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2-libcxx-headers" ,python-pyside-2-libcxx-headers)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("qtbase" ,qtbase)
+         ("qtdatavis3d" ,qtdatavis3d)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtquickcontrols" ,qtquickcontrols) ;; ??
+         ("qtscript" ,qtscript)
+         ("qtscxml" ,qtscxml)
+         ("qtsensors" ,qtsensors)
+         ("qtspeech" ,qtspeech)
+         ("qtsvg" ,qtsvg)
+         ("qtwebchannel" ,qtwebchannel)
+         ("qtwebsockets" ,qtwebsockets)
+         ("qtx11extras" ,qtx11extras)))
+      (native-inputs
+       `(("cmake" ,cmake)
+         ("git" ,git)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("python-wrapper" ,python-wrapper)
+         ("qttools" ,qttools)
+         ("which" ,which)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'go-to-source-dir
+             (lambda _ (chdir "sources/pyside2") #t))
+           (add-before 'configure 'set-clang-dir
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((clang-dir (assoc-ref inputs "llvm-toolchain-6"))
+                     (libcxx-dir (assoc-ref inputs "python-pyside-2-libcxx-headers")))
+                 (setenv "CLANG_INSTALL_DIR" clang-dir)
+                 (substitute* "cmake/Macros/PySideModules.cmake"
+                   (("--include-paths=")
+                    (string-append "--include-paths=" libcxx-dir "/include/c++/v1:")))
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications.")
+      (description
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications.  It lets Python developers utilize the full potential of Qt, using the PySide2 module.  The PySide2 module provides access to the individual Qt modules such as QtCore, QtGui, and so on.  Qt for Python also comes with the Shiboken2 CPython binding code generator, which can be used to generate Python bindings for your C or C++ code.")
+      ;; Help!
+      (license
+       `(,license:fdl1.3+
+         ,license:gpl2+
+         ,license:gpl3+
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
+         ,license:lgpl3)))))
+
+(define-public python-shiboken-2
+  (let ((revision "1")
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-shiboken-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("python-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'use-shiboken-dir-only
+             (lambda _ (chdir "sources/shiboken2") #t))
+           (add-before 'configure 'set-build-env
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((llvm-toolchain-dir (assoc-ref inputs "llvm-toolchain-6")))
+                 (setenv "CLANG_INSTALL_DIR" llvm-toolchain-dir)
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      (description
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      ;; Help!
+      (license `(,license:gpl2+
+                 ,license:llgpl)))))
+
+(define-public python-pyside-2-tools
+  (let ((revision "1")
+        (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
+    (package
+      (name "python-pyside-2-tools")
+      (version (git-version "v5.11.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2" ,python-pyside-2)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("qtbase" ,qtbase)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Contains lupdate, rcc and uic tools for PySide2")
+      (description
+       "Contains lupdate, rcc and uic tools for PySide2")
+      ;; Help! (This is from arch)
+      (license license:lgpl2.1+))))
-- 
2.22.0


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

* [bug#36440] [PATCH] Add FreeCAD
  2019-06-30  2:39 [bug#36440] [PATCH] Add FreeCAD John Soo
@ 2019-07-02  7:06 ` Björn Höfling
       [not found]   ` <CAKf5CqXWCGX4y3nJ3KeV2=fxrR2XA8-E-g1=i1zdQqEv-h6XcQ@mail.gmail.com>
  2019-07-19 20:40 ` Jonathan Brielmaier
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 27+ messages in thread
From: Björn Höfling @ 2019-07-02  7:06 UTC (permalink / raw)
  To: John Soo; +Cc: 36440

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

On Sun, 30 Jun 2019 02:39:52 +0000
John Soo <jsoo1@asu.edu> wrote:

> Hi all,
> 
> I've done linting, and indentation checks.  There are still some
> issues with licenses that I've marked and I don't know where to put
> the changes that I've included in llvm.scm.  Also I discovered some
> non-determinism in the build of freecad just now. I thought it would
> be good to share my work, though. It's been long enough.
> 
> - John

Hi John,

thank you very much for working on FreeCAD! And thanks for sharing this
work even if it is not 100% polished.

The first thing I noticed is that you packed everything into one
commit. Could you please split it up in one commit per added/modified
package? That's the usual way Guix expects commits, and it would make
the reviewing easier, you can concentrate on each package as a reviewer
and you better see the dependency structure right away.

Thanks,

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* [bug#36440] Fwd: [bug#36440] [PATCH] Add FreeCAD
       [not found]   ` <CAKf5CqXWCGX4y3nJ3KeV2=fxrR2XA8-E-g1=i1zdQqEv-h6XcQ@mail.gmail.com>
@ 2019-07-08  1:17     ` John Soo
  2019-07-10 14:02       ` John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-07-08  1:17 UTC (permalink / raw)
  To: 36440


[-- Attachment #1.1: Type: text/plain, Size: 92 bytes --]

Hi Bjorn,

Thanks for taking a look. Here are the patches with one package in each.

- John

[-- Attachment #1.2: Type: text/html, Size: 222 bytes --]

[-- Attachment #2: 0001-gnu-Add-coin3D.patch --]
[-- Type: application/x-patch, Size: 2620 bytes --]

[-- Attachment #3: 0003-gnu-Add-llvm-toolchain-6.patch --]
[-- Type: application/x-patch, Size: 2075 bytes --]

[-- Attachment #4: 0004-gnu-Add-python-shiboken-2.patch --]
[-- Type: application/x-patch, Size: 2522 bytes --]

[-- Attachment #5: 0005-gnu-Add-python-pyside-2-libcxx-headers.patch --]
[-- Type: application/x-patch, Size: 2723 bytes --]

[-- Attachment #6: 0006-gnu-Add-python-pyside-2.patch --]
[-- Type: application/x-patch, Size: 4314 bytes --]

[-- Attachment #7: 0007-gnu-Add-python-pyside-2-tools.patch --]
[-- Type: application/x-patch, Size: 1817 bytes --]

[-- Attachment #8: 0008-gnu-Add-libspnav.patch --]
[-- Type: application/x-patch, Size: 2344 bytes --]

[-- Attachment #9: 0009-gnu-Add-libarea.patch --]
[-- Type: application/x-patch, Size: 2752 bytes --]

[-- Attachment #10: 0010-gnu-Add-libmedfile.patch --]
[-- Type: application/x-patch, Size: 1684 bytes --]

[-- Attachment #11: 0011-gnu-Add-freecad.patch --]
[-- Type: application/x-patch, Size: 4841 bytes --]

[-- Attachment #12: 0002-gnu-Add-soqt.patch --]
[-- Type: application/x-patch, Size: 2187 bytes --]

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-07-08  1:17     ` [bug#36440] Fwd: " John Soo
@ 2019-07-10 14:02       ` John Soo
  0 siblings, 0 replies; 27+ messages in thread
From: John Soo @ 2019-07-10 14:02 UTC (permalink / raw)
  To: 36440


[-- Attachment #1.1: Type: text/plain, Size: 216 bytes --]

Updated patches with rebase on master.

- John

On Mon, Jul 8, 2019 at 1:17 AM John Soo <jsoo1@asu.edu> wrote:

> Hi Bjorn,
>
> Thanks for taking a look. Here are the patches with one package in each.
>
> - John
>
>

[-- Attachment #1.2: Type: text/html, Size: 648 bytes --]

[-- Attachment #2: 0002-gnu-Add-soqt.patch --]
[-- Type: text/x-patch, Size: 2187 bytes --]

From 543ee528f0e2c0aa056c16e7c5aeea24ab1d8881 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Thu, 4 Jul 2019 16:29:24 -0700
Subject: [PATCH 02/11] gnu: Add soqt.

---
 gnu/packages/graphics.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index b2689129ee..7f0b99476b 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -52,6 +52,7 @@
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
@@ -1005,3 +1006,38 @@ standard graphics library for 3D visualization and visual simulation
 software in the scientific and engineering community.")
       (license license:bsd-3))))
 
+(define-public soqt
+  (let ((changeset "58b495aa6bed9e58542e60df28843f58e2ab8db4")
+        (revision "1"))
+    (package
+      (name "soqt")
+      (version
+       (string-append "1.6.0-" revision "." (string-take changeset 7)))
+      (source
+       (origin
+         (method hg-fetch)
+         (uri (hg-reference (url "https://bitbucket.org/Coin3d/soqt")
+                            (changeset changeset)))
+         (sha256
+          (base32
+           "023rhf8piwcmgi08d3xyqj1cj83v30z6l3zbd5qs1y1mkw9lqfpz"))
+         (file-name (git-file-name "soqt" version))))
+      (build-system cmake-build-system)
+      (native-inputs
+       `(("doxygen" ,doxygen)
+         ("graphviz" ,graphviz)))
+      (inputs
+       `(("coin3D" ,coin3D)
+         ("glew" ,glew)
+         ("libcxx" ,libcxx)
+         ("qtbase" ,qtbase)))
+      (arguments `(#:tests? #f))
+      (home-page "https://bitbucket.org/Coin3D/soqt")
+      (synopsis
+       "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.22.0


[-- Attachment #3: 0005-gnu-Add-python-pyside-2-libcxx-headers.patch --]
[-- Type: text/x-patch, Size: 2723 bytes --]

From 121b8bbf68b06c4b18fef6ca87cbcaff7d4696d7 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 10:20:22 -0700
Subject: [PATCH 05/11] gnu: Add python-pyside-2-libcxx-headers.

---
 gnu/packages/llvm.scm | 55 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index a3f797b59c..5806fb9ec7 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -701,3 +701,58 @@ using @code{clang-rename}.")))
          #t)))
     (license license:ncsa)))
 
+;; See https://bugreports.qt.io/browse/PYSIDE-787
+;; STL headers are not parsed correctly, so only send in some headers
+(define-public python-pyside-2-libcxx-headers
+  (package
+    (inherit libcxx)
+    (name "python-pyside-2-libcxx-headers")
+    (version (package-version llvm-6))
+    (source
+     (origin
+       (inherit (package-source libcxx))
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/libcxx-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'use-only-required-headers
+           (lambda* (#:key outputs #:allow-other-keys)
+             (use-modules ((srfi srfi-1)))
+             (let ((out (assoc-ref outputs "out"))
+                   (required-headers
+                    '("type_traits"
+                      "__config"
+                      "cstddef"
+                      "__nullptr"
+                      "utility"
+                      "__tuple"
+                      "initializer_list"
+                      "cstring"
+                      "cstdint"
+                      "__debug")))
+               (for-each
+                delete-file
+                (filter
+                 (lambda (file)
+                   (not
+                    (fold
+                     (lambda (acc header)
+                       (or acc (string-contains file header)))
+                     #f
+                     required-headers)))
+                 (find-files (string-append out "/include/c++/v1"))))
+               (delete-file-recursively (string-append out "/include/c++/v1/ext"))
+               (delete-file-recursively (string-append out "/include/c++/v1/support"))
+               (delete-file-recursively (string-append out "/lib")))
+             #t)))))
+    (synopsis
+     "Libcxx files specifically used by PySide2")
+    (description
+     "Libcxx files specifically used by PySide2.")))
-- 
2.22.0


[-- Attachment #4: 0001-gnu-Add-coin3D.patch --]
[-- Type: text/x-patch, Size: 2620 bytes --]

From ffc90110fc85e5a781f158398bd6f59b42457034 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Wed, 3 Jul 2019 09:40:31 -0700
Subject: [PATCH 01/11] gnu: Add coin3D.

---
 gnu/packages/graphics.scm | 44 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index f9baf49fe9..b2689129ee 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -73,6 +73,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -961,3 +962,46 @@ your terminal.  It comes bundled with predefined styles:
 look.  The result can be uploaded on any web server without additional
 requirements.")
     (license license:gpl2+)))
+
+(define-public coin3D
+  (let ((changeset  "8d860d7ba112b22c4e9b289268fd8b3625ab81d3")
+        (revision "1"))
+    (package
+      (name "coin3D")
+      (version
+       (string-append "4.0.0a-" revision "." (string-take changeset 7)))
+      (source
+       (origin
+         (method hg-fetch)
+         (uri (hg-reference (url "https://bitbucket.org/Coin3D/coin")
+                            (changeset changeset)))
+         (sha256
+          (base32
+           "0kgg782j8lkd4bicd8x207mj66vali6kxh6idczjszcxq2iifsr0"))
+         (file-name (git-file-name "coin3D" version))))
+      (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://bitbucket.org/Coin3D/coin/wiki/Home")
+      (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))))
+
-- 
2.22.0


[-- Attachment #5: 0004-gnu-Add-python-shiboken-2.patch --]
[-- Type: text/x-patch, Size: 2478 bytes --]

From 85a7db97f1c7b944d05cb8e27496be021736ed78 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 09:13:50 -0700
Subject: [PATCH 04/11] gnu: Add python-shiboken-2.

---
 gnu/packages/python-xyz.scm | 46 +++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 49d5126e02..33689ced89 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15923,3 +15923,49 @@ Complete support for Berkeley DB Base Replication.  Support for RPC.")
 types for further processing.  It is primarily intended for batch jobs and
 one-off scripts.")
     (license license:expat)))
+
+(define-public python-shiboken-2
+  (let ((revision "1")
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-shiboken-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("python-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'use-shiboken-dir-only
+             (lambda _ (chdir "sources/shiboken2") #t))
+           (add-before 'configure 'set-build-env
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((llvm-toolchain-dir (assoc-ref inputs "llvm-toolchain-6")))
+                 (setenv "CLANG_INSTALL_DIR" llvm-toolchain-dir)
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      (description
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      ;; Help!
+      (license `(,license:gpl2+
+                 ,license:llgpl)))))
-- 
2.22.0


[-- Attachment #6: 0003-gnu-Add-llvm-toolchain-6.patch --]
[-- Type: text/x-patch, Size: 2075 bytes --]

From ff5c74d00016519e4017b68c2f9f07f6dbde5f96 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 08:34:24 -0700
Subject: [PATCH 03/11] gnu: Add llvm-toolchain-6.

---
 gnu/packages/llvm.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 1fe9af38e0..a3f797b59c 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -37,6 +37,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages bootstrap)           ;glibc-dynamic-linker
@@ -667,3 +668,36 @@ C/C++/Obj-C code according to a set of style options, see
     (synopsis "Rename every occurrence of a symbol using clang-rename")
     (description "This package renames every occurrence of a symbol at point
 using @code{clang-rename}.")))
+
+;; PySide2 docs recommend using a bundled version of libclang
+;; See https://wiki.qt.io/Qt_for_Python/GettingStarted
+;; The source they recommend: https://download.qt.io/development_releases/prebuilt/libclang/
+(define-public llvm-toolchain-6
+  (package
+    (inherit llvm-6)
+    (name "llvm-toolchain")
+    (build-system trivial-build-system)
+    (inputs
+     `(("clang-6" ,clang-6)
+       ("llvm-6" ,llvm-6)))
+    (arguments
+     `(#:modules ((guix build union)
+                  (guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build union)
+                      (ice-9 match)
+                      (srfi srfi-1))
+         (union-build
+          (assoc-ref %outputs "out")
+          (filter-map
+           (match-lambda
+             ((name . dir)
+              (if (or (string=? name "clang-6")
+                      (string=? name "llvm-6"))
+                  dir
+                  #f)))
+           %build-inputs))
+         #t)))
+    (license license:ncsa)))
+
-- 
2.22.0


[-- Attachment #7: 0006-gnu-Add-python-pyside-2.patch --]
[-- Type: text/x-patch, Size: 4268 bytes --]

From f873b469295ebf107eee6ecc599db04f12cb7d48 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 11:21:14 -0700
Subject: [PATCH 06/11] gnu: Add python-pyside-2.

---
 gnu/packages/python-xyz.scm | 77 +++++++++++++++++++++++++++++++++++++
 1 file changed, 77 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 33689ced89..b3a92ccf1e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -88,6 +88,7 @@
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
@@ -15924,6 +15925,82 @@ types for further processing.  It is primarily intended for batch jobs and
 one-off scripts.")
     (license license:expat)))
 
+(define-public python-pyside-2
+  (let ((revision "1")
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-pyside-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2-libcxx-headers" ,python-pyside-2-libcxx-headers)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("qtbase" ,qtbase)
+         ("qtdatavis3d" ,qtdatavis3d)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtquickcontrols" ,qtquickcontrols) ;; ??
+         ("qtscript" ,qtscript)
+         ("qtscxml" ,qtscxml)
+         ("qtsensors" ,qtsensors)
+         ("qtspeech" ,qtspeech)
+         ("qtsvg" ,qtsvg)
+         ("qtwebchannel" ,qtwebchannel)
+         ("qtwebsockets" ,qtwebsockets)
+         ("qtx11extras" ,qtx11extras)))
+      (native-inputs
+       `(("cmake" ,cmake)
+         ("git" ,git)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("python-wrapper" ,python-wrapper)
+         ("qttools" ,qttools)
+         ("which" ,which)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'go-to-source-dir
+             (lambda _ (chdir "sources/pyside2") #t))
+           (add-before 'configure 'set-clang-dir
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((clang-dir (assoc-ref inputs "llvm-toolchain-6"))
+                     (libcxx-dir (assoc-ref inputs "python-pyside-2-libcxx-headers")))
+                 (setenv "CLANG_INSTALL_DIR" clang-dir)
+                 (substitute* "cmake/Macros/PySideModules.cmake"
+                   (("--include-paths=")
+                    (string-append "--include-paths=" libcxx-dir "/include/c++/v1:")))
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications")
+      (description
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications.
+It lets Python developers utilize the full potential of Qt, using the PySide2 module.
+The PySide2 module provides access to the individual Qt modules such as QtCore, QtGui,
+and so on.  Qt for Python also comes with the Shiboken2 CPython binding code generator,
+which can be used to generate Python bindings for your C or C++ code.")
+      ;; Help!
+      (license
+       `(,license:fdl1.3+
+         ,license:gpl2+
+         ,license:gpl3+
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
+         ,license:lgpl3)))))
+
 (define-public python-shiboken-2
   (let ((revision "1")
         (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
-- 
2.22.0


[-- Attachment #8: 0008-gnu-Add-libspnav.patch --]
[-- Type: text/x-patch, Size: 2344 bytes --]

From eb021d7318e5a1f20dc7672f8b88729a08911005 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 19:05:37 -0700
Subject: [PATCH 08/11] gnu: Add libspnav

---
 gnu/packages/engineering.scm | 38 ++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 7d48414889..2c2f421fbc 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2062,3 +2062,41 @@ purpose circuit simulator and can perform DC and transient analyses, fourier
 analysis and AC analysis.  The engine is designed to do true mixed-mode
 simulation.")
     (license license:gpl3+)))
+
+(define-public libspnav
+  (let ((commit "20961617eecc845b23fcf9e06acd1a6bb340b88b")
+        (revision "1"))
+    (package
+      (name "libspnav")
+      (version (git-version "0.2.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/FreeSpacenav/libspnav")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1ib5jxcpz76lr90f69vb50yn2q9ss45axlgil29layh36dnyifac"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("libx11" ,libx11)))
+      (arguments `(#:tests? #f))
+      (home-page "http://spacenav.sourceforge.net/")
+      (synopsis
+       "Library for communicating with spacenavd or 3dxsrv")
+      (description
+       "The libspnav library is provided as a replacement of the magellan
+library.  It provides a cleaner, and more orthogonal interface.  libspnav
+supports both the original X11 protocol for communicating with the driver, and
+the new alternative non-X protocol.  Programs that choose to use the X11
+protocol, are automatically compatible with either the free spacenavd driver
+or the official 3dxserv, as if they were using the magellan SDK.
+
+Also, libspnav provides a magellan API wrapper on top of the new API.  So, any
+applications that were using the magellan library, can switch to libspnav
+without any changes.  And programmers that are familliar with the magellan API
+can continue using it with a free library without the restrictions of the
+official SDK.")
+      (license license:bsd-3))))
-- 
2.22.0


[-- Attachment #9: 0009-gnu-Add-libarea.patch --]
[-- Type: text/x-patch, Size: 2752 bytes --]

From 0406471b59e3a9635d481403999edd76377a67b3 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sun, 7 Jul 2019 10:03:38 -0700
Subject: [PATCH 09/11] gnu: Add libarea.

---
 gnu/packages/engineering.scm | 46 ++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 2c2f421fbc..8e36354862 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -48,6 +48,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -2063,6 +2064,51 @@ analysis and AC analysis.  The engine is designed to do true mixed-mode
 simulation.")
     (license license:gpl3+)))
 
+
+;; TODO: Try the google archive version with gplv3
+;; subversion url:
+;;   svn checkout http://libarea.googlecode.com/svn/trunk/ libarea
+(define-public libarea
+  (let ((revision "1")
+        (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
+    (package
+      (name "libarea")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url "https://github.com/Heeks/libarea.git")
+                             (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
+      (build-system gnu-build-system)
+      (inputs `(("boost" ,boost)
+                ("python-wrapper" ,python-wrapper)))
+      (native-inputs
+       `(("cmake" ,cmake)))
+      (arguments
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'configure 'cmake-configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (cmake (assoc-ref inputs "cmake")))
+                 (mkdir-p "build")
+                 (invoke "cmake"
+                         (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
+           (delete 'configure))))
+      (home-page "https://github.com/Heeks/libarea")
+      (synopsis
+       "Library and python module for pocketing and profiling operations")
+      (description
+       "Area is a CAM-related software for pocketing operation.
+
+This project provides library and associated python-module to compute pocket
+operations.")
+      (license license:bsd-3))))
+
 (define-public libspnav
   (let ((commit "20961617eecc845b23fcf9e06acd1a6bb340b88b")
         (revision "1"))
-- 
2.22.0


[-- Attachment #10: 0007-gnu-Add-python-pyside-2-tools.patch --]
[-- Type: text/x-patch, Size: 1817 bytes --]

From bb35a51e5f482f8dee8863f3866afb596730fe78 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 18:49:08 -0700
Subject: [PATCH 07/11] gnu: Add python-pyside-2-tools.

---
 gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b3a92ccf1e..f8838a5bc2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16046,3 +16046,35 @@ which can be used to generate Python bindings for your C or C++ code.")
       ;; Help!
       (license `(,license:gpl2+
                  ,license:llgpl)))))
+
+(define-public python-pyside-2-tools
+  (let ((revision "1")
+        (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
+    (package
+      (name "python-pyside-2-tools")
+      (version (git-version "v5.11.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2" ,python-pyside-2)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("qtbase" ,qtbase)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Contains lupdate, rcc and uic tools for PySide2")
+      (description
+       "Contains lupdate, rcc and uic tools for PySide2")
+      ;; Help! (This is from arch)
+      (license license:lgpl2.1+))))
-- 
2.22.0


[-- Attachment #11: 0010-gnu-Add-libmedfile.patch --]
[-- Type: text/x-patch, Size: 1684 bytes --]

From c942ab65f16ae4207faebcc1b153c88166940d2c Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sun, 7 Jul 2019 10:13:17 -0700
Subject: [PATCH 10/11] gnu: Add libmedfile.

---
 gnu/packages/engineering.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 8e36354862..dd7f15abe1 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2065,6 +2065,35 @@ simulation.")
     (license license:gpl3+)))
 
 
+(define-public libmedfile
+  (package
+    (name "libmedfile")
+    (version "3.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://files.salome-platform.org/Salome/other/med-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "1215sal10xp6xirgggdszay2bmx0sxhn9pgh7x0wg2w32gw1wqyx"))))
+    (build-system cmake-build-system)
+    (inputs `(("hdf5" ,hdf5)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-test-output
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file-recursively
+                (string-append out "/bin/testc"))
+               #t))))))
+    (home-page "https://www.salome-platform.org")
+    (synopsis "Library to read and write MED files")
+    (description "Library to read and write MED files")
+    (license license:lgpl2.1)))
+
 ;; TODO: Try the google archive version with gplv3
 ;; subversion url:
 ;;   svn checkout http://libarea.googlecode.com/svn/trunk/ libarea
-- 
2.22.0


[-- Attachment #12: 0011-gnu-Add-freecad.patch --]
[-- Type: text/x-patch, Size: 4841 bytes --]

From 2297370df3ccba58e3e0625af5835e730e04207d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sun, 7 Jul 2019 10:32:10 -0700
Subject: [PATCH 11/11] gnu: Add freecad.

---
 gnu/packages/engineering.scm | 85 ++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index dd7f15abe1..e2ee8ee40b 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -52,6 +52,7 @@
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages fpga)
@@ -64,10 +65,13 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
@@ -88,6 +92,7 @@
   #:use-module (gnu packages tex)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
 (define-public librecad
@@ -2064,6 +2069,86 @@ analysis and AC analysis.  The engine is designed to do true mixed-mode
 simulation.")
     (license license:gpl3+)))
 
+(define-public freecad
+  (let ((commit "dbb4cc6415bac848a294f03b80f65e888d531742")
+        (revision "1"))
+    (package
+      (name "freecad")
+      (version (git-version "0.18.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/FreeCAD/FreeCAD.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "01ay9wdacm1hymnaw67y8sg63pv0ar1n72ap77q12dv3qibmwz75"))))
+      (build-system cmake-build-system)
+      (native-inputs
+       `(("doxygen" ,doxygen)
+         ("graphviz" ,graphviz)
+         ("qttools" ,qttools)
+         ("pkg-config" ,pkg-config)
+         ("swig" ,swig)))
+      (inputs
+       `(("boost" ,boost)
+         ("coin3D" ,coin3D)
+         ("eigen" ,eigen)
+         ("freetype" ,freetype)
+         ("glew" ,glew)
+         ("hdf5" ,hdf5)
+         ("libarea" ,libarea)
+         ("libspnav" ,libspnav)
+         ("libmedfile" ,libmedfile)
+         ("openmpi" ,openmpi)
+         ("opencascade-oce" ,opencascade-oce)
+         ("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-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtsvg" ,qtsvg)
+         ("qtx11extras" ,qtx11extras)
+         ("qtxmlpatterns" ,qtxmlpatterns)
+         ("qtwebkit" ,qtwebkit)
+         ("soqt" ,soqt)
+         ("vtk" ,vtk)
+         ("xerces-c" ,xerces-c)
+         ("zlib" ,zlib)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags
+         (list
+          "-DBUILD_QT5=ON"
+          (string-append "-DCMAKE_INSTALL_LIBDIR="
+                         (assoc-ref %outputs "out") "/lib"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'configure 'restore-pythonpath
+             (lambda _
+               (substitute* "src/Main/MainGui.cpp"
+                 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
+               #t))
+           (add-after 'install 'wrap-pythonpath
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/FreeCAD")
+                   (list "PYTHONPATH"
+                         'prefix (list (getenv "PYTHONPATH")))))
+               #t)))))
+      (home-page "https://www.freecadweb.org/")
+      (synopsis "Your Own 3D Parametric Modeler")
+      (description
+       "FreeCAD is a general purpose feature-based, parametric 3D modeler for
+CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
+product design but also fits a wider range of uses in engineering, such as
+architecture or other engineering specialties.  It is 100% Open Source (LGPL2+
+license) and extremely modular, allowing for very advanced extension and
+customization.")
+      ;; Help!
+      (license license:lgpl2.1+))))
 
 (define-public libmedfile
   (package
-- 
2.22.0


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

* [bug#36440] [PATCH] Add FreeCAD
  2019-06-30  2:39 [bug#36440] [PATCH] Add FreeCAD John Soo
  2019-07-02  7:06 ` Björn Höfling
@ 2019-07-19 20:40 ` Jonathan Brielmaier
  2019-07-22 13:41 ` [bug#36440] Source commit, minor version difference, channel John Soo
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 27+ messages in thread
From: Jonathan Brielmaier @ 2019-07-19 20:40 UTC (permalink / raw)
  To: 36440

Is there a reason why you build every package from a commit of the
master branch instead of using the stable releases? I think at least
FreeCAD releases often enough, in the mean time the released version 0.18.3.

Do you have the patches also in some public git repo (Github, Gitlab etc.)?

~Jonathan

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

* [bug#36440] Source commit, minor version difference, channel
  2019-06-30  2:39 [bug#36440] [PATCH] Add FreeCAD John Soo
  2019-07-02  7:06 ` Björn Höfling
  2019-07-19 20:40 ` Jonathan Brielmaier
@ 2019-07-22 13:41 ` John Soo
  2019-07-22 14:11 ` [bug#36440] [PATCH] Add FreeCAD Björn Höfling
  2019-07-30 12:24 ` Paul Garlick
  4 siblings, 0 replies; 27+ messages in thread
From: John Soo @ 2019-07-22 13:41 UTC (permalink / raw)
  To: jonathan.brielmaier, 36440

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

Hi Jonathon,

I have based freecad on the commit for the release tag for version 0.18.2
(0.18.3 was released after my patches were submitted).  I looked at the
commit for 0.18.3 and I don't see why I couldn't use that one. I just need
to find the time to do the work.  As for a working version you can see my
prior work in the channel at https://github.com/jsoo1/guix-channel on
commit 9fd2815ed08317d27e174ca460e0d0a2be058aa7.

Thanks for your review!

- John

9fd2815ed08317d27e174ca460e0d0a2be058aa7

9fd2815ed08317d27e174ca460e0d0a2be058aa7

[-- Attachment #2: Type: text/html, Size: 803 bytes --]

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-06-30  2:39 [bug#36440] [PATCH] Add FreeCAD John Soo
                   ` (2 preceding siblings ...)
  2019-07-22 13:41 ` [bug#36440] Source commit, minor version difference, channel John Soo
@ 2019-07-22 14:11 ` Björn Höfling
  2019-07-22 17:57   ` Jonathan Brielmaier
  2019-07-30 12:24 ` Paul Garlick
  4 siblings, 1 reply; 27+ messages in thread
From: Björn Höfling @ 2019-07-22 14:11 UTC (permalink / raw)
  To: John Soo; +Cc: 36440

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

On Sun, 30 Jun 2019 02:39:52 +0000
John Soo <jsoo1@asu.edu> wrote:

> Hi all,
> 
> I've done linting, and indentation checks.  There are still some
> issues with licenses that I've marked and I don't know where to put
> the changes that I've included in llvm.scm.  Also I discovered some
> non-determinism in the build of freecad just now. I thought it would
> be good to share my work, though. It's been long enough.
> 
> - John

Hi John,

this is not a easy "guix import" package. Thanks for looking into this.

Here are some remarks from my side:

Commit-log: You have a summary line, but missing this:

* gnu/package/...scm (freecad): New variable.

This holds for all packages. See the manual
(https://guix.gnu.org/manual/en/guix.html#Submitting-Patches) and other
commits as reference. You might like to work with magit and yasnippets
to automate this.

Add a copyright line for yourself to all files you touched.

For the dependencies, you often used commits from the git/hg repository
instead of a released version. Was there specific reason for that? If
so, please add a comment on why you need this specific version.

For some (all), I found out that a proper release was only created
after you submitted/edited your patch. Maybe you can give it a try with
the released versions?

I wanted to give it a try for myself but failed: I could not build
qtwebkit locally, and no substitutes are available. I don't want to
hold back my comments any longer, so I postponed trying it out.

Also, I wanted to compare with the AppPack provided by FreeCAD, but I
wasn't able to extract it: I did not want to do it on my machine
directly, because you use the AppPack executable to extract it! And it
did not work in a Guix-VM, probably due to some "standard" library
paths being expected.

We should fix this package and then suggest them using Guix or at least
"guix pack" for really relocatable BLOBs :-)

coin3D:

There are two binaries in the source repository:


./cfg/csubst.exe
./cfg/wrapmsvc.exe

Also the .hg directory is included.

Could you please remove them with "snippets"?

You can search for "snippet" to find examples for that.

I did it like that:

+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (delete-file-recursively ".hg")
+           (for-each delete-file
+                     '("cfg/csubst.exe"
+                       "cfg/wrapmsvc.exe"))
+           #t))))


soqt:

Same snippets apply here too.

soqt: There is a 1.6.0-package available since some hours.
Would you like to use this?

Also, they say it is superseeded by Quarter. Would it be possible/better
to use this one? Is there anything known from FreeCAD side?

llvm-toolchain-6: I haven't looked into that yet.

pyside2/shiboken:

There are two Qt-bindings for Python: PyQt and PySide2. As we have PyQt
already in 
gnu/packages/qt.scm, I think it would make sense to move Pyside2 and
its binding generator Shiboken into that package instead of
python-xyz.scm.


PySide2/Qt version:

We currently have 5.11.3 in Guix. 5.12 is the current LTS available and
5.13 is also out since June.

The PySide homepage (https://wiki.qt.io/Qt_for_Python) says:

<quote>
The module was released mid June 2018 as a Technical Preview
(supporting Qt 5.11), and it was officially released without the
Technical Preview tag, in December 2018 for Qt 5.12. 
</quote>

What does it mean if we use it still with 5.11? Or do we need to update
to 5.12 first?

I wonder if we need the dependency on qtwebkit or if we can get rid of this, but I haven't investigated yet.

medfile: Is there a specific reason you chose 3.x, instead of the
available 4.0.0? If you, could you add a comment of why?

License is GPLv3+

libarea: Also licensed under GPL v3 (files under "pocket" directory).

freecad: Can you use the releasted sources instead of the git-version?

Björn







[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-07-22 14:11 ` [bug#36440] [PATCH] Add FreeCAD Björn Höfling
@ 2019-07-22 17:57   ` Jonathan Brielmaier
  2019-07-23 16:25     ` John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: Jonathan Brielmaier @ 2019-07-22 17:57 UTC (permalink / raw)
  To: Björn Höfling, John Soo; +Cc: 36440

Thanks Björn for having a look here :)

On 7/22/19 4:11 PM, Björn Höfling wrote:> I wanted to give it a try for
myself but failed: I could not build
> qtwebkit locally, and no substitutes are available. I don't want to
> hold back my comments any longer, so I postponed trying it out.

qtwebkit seems to fail on master as well and it needs long to build, so
I can't do it locally on my laptop:
http://ci.guix.gnu.org/build/1488065/details

> I wonder if we need the dependency on qtwebkit or if we can get rid of this, but I haven't investigated yet.

I think we need it as openSUSE and Debian have a build require on
qtwebkit-devel and it's noted at their wiki:
https://www.freecadweb.org/wiki/CompileOnUnix#Getting_the_dependencies

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-07-22 17:57   ` Jonathan Brielmaier
@ 2019-07-23 16:25     ` John Soo
  2019-07-23 16:29       ` John Soo
                         ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: John Soo @ 2019-07-23 16:25 UTC (permalink / raw)
  To: Jonathan Brielmaier; +Cc: 36440


[-- Attachment #1.1: Type: text/plain, Size: 4133 bytes --]

Hi Bjorn, Jonathon, and everyone,

FreeCAD was certainly not easy to package. I spent actually several months
just working on the pyside2 dependencies and I still do not have a working
build of Pivy from coin.  It is only thanks to the help of the upstream
maintainers that this package is even close to working.  I have attached
updated patches and my responses to Bjorn's notes below. Thanks for your
review!

As to QTWebKit - I do not know why it is a dependency. It may not be a hard
requirement. If you comment it out, I think the configure phase may
succeed. I included it for completion only.

* FreeCAD Notes

** DONE Add commit message details and copyright lines

** Coin3D

*** DONE Delete blobs

*** hg-fetch deletes .hg dirs (and all submodules' .hg dirs)

** SoQT vs. Quarter

*** Not interchangeable as far as I know.

*** FreeCAD requires SoQT specifically during configure.

** Pyside2

*** Does all of pyside2 belong in qt.scm? - there are three packages:
Shiboken2, Pyside2, and Pyside2-Tools

*** QT version compatibility

**** The pyside2 project has branches for the newest version with
compatibility with older QT versions (I am using the 5.11.3 compat branch)

 - That is also why I am using a git commit for the Pyside2 packages
 - https://code.qt.io/cgit/pyside/pyside-setup.git/
 - Pyside dependencies were by far the most challenging, and I had to track
some issues (of which, some are not resolved)

** libmedfile

*** Reason for old version is that what was released when I started

*** 4.0.0 requires hdf5 >= 1.10.2

**** HDF5 has some dependents:

guix refresh --list-dependent hdf5 Building the following 11 packages would
ensure 23 dependent packages are rebuilt:
r-ioniser@2.8.0 r-scone@1.8.0 r-lumi@2.36.0 r-yarn@1.10.0
r-illuminahumanmethylationepicmanifest@0.3.0 r-scdd@1.8.0 pigx@0.0.3
r-pore@0.24 r-yamss@1.10.0 r-xcms@3.6.1 r-msnid@1.18.0

**** HDF5 patches need updates when HDF5 updated to 1.10.5

*** DONE Change license to gpl3+

** libarea License questions and source locations:

**** I am using the source from github: https://github.com/Heeks/libarea

 - Should I use some other source? The google archive is unavailable.
 - I cannot find any license information in the github repository.

**** DONE Change to gpl3+

** Using releases over hg/git downloads (please advise)

1. Pyside2 packages - Done for compatibility reasons
2. Coin3D and SoQt - I don't think there are releases of these aside from
the bitbucket repository.
3. LLVM propagated packages (llvm-toolchain and pyside-libcxx-headers)
 - I am not sure these are the best way to accomplish the goal anyways.
 - Not sure where to find the right sources for llvm-toolchain-6 and the
pyside-libcxx-headers.
4. libarea - Seems like libarea is actually close to not even having source
available anymore, let alone a release
5. libspnav - Confused as to the best source to use here. If there is a
release or better version, I can update.
6. FreeCAD
 - I can use the releases if they exist. I do not think they have source
tarballs available.
 - I was packaging during a lot of active development of FreeCAD

Thank you for your review and advice.

- John

On Mon, Jul 22, 2019 at 5:57 PM Jonathan Brielmaier <
jonathan.brielmaier@web.de> wrote:

> Thanks Björn for having a look here :)
>
> On 7/22/19 4:11 PM, Björn Höfling wrote:> I wanted to give it a try for
> myself but failed: I could not build
> > qtwebkit locally, and no substitutes are available. I don't want to
> > hold back my comments any longer, so I postponed trying it out.
>
> qtwebkit seems to fail on master as well and it needs long to build, so
> I can't do it locally on my laptop:
> http://ci.guix.gnu.org/build/1488065/details
>
> > I wonder if we need the dependency on qtwebkit or if we can get rid of
> this, but I haven't investigated yet.
>
> I think we need it as openSUSE and Debian have a build require on
> qtwebkit-devel and it's noted at their wiki:
> https://www.freecadweb.org/wiki/CompileOnUnix#Getting_the_dependencies
>

[-- Attachment #1.2: Type: text/html, Size: 5634 bytes --]

[-- Attachment #2: 0001-gnu-Add-coin3D.patch --]
[-- Type: text/x-patch, Size: 3173 bytes --]

From 0ff20b2981ba0ddaf705bc2afb3577da9987acfa Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Wed, 3 Jul 2019 09:40:31 -0700
Subject: [PATCH 01/11] gnu: Add coin3D.

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

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 94a797c8f5..0e42f80a87 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2019 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -73,6 +74,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -975,3 +977,53 @@ your terminal.  It comes bundled with predefined styles:
 look.  The result can be uploaded on any web server without additional
 requirements.")
     (license license:gpl2+)))
+
+(define-public coin3D
+  (let ((changeset  "8d860d7ba112b22c4e9b289268fd8b3625ab81d3")
+        (revision "1"))
+    (package
+      (name "coin3D")
+      (version
+       (string-append "4.0.0a-" revision "." (string-take changeset 7)))
+      (source
+       (origin
+         (method hg-fetch)
+         (uri (hg-reference (url "https://bitbucket.org/Coin3D/coin")
+                            (changeset changeset)))
+         (sha256
+          (base32
+           "0kgg782j8lkd4bicd8x207mj66vali6kxh6idczjszcxq2iifsr0"))
+         (file-name (git-file-name "coin3D" version))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             (for-each delete-file
+                       '("cfg/csubst.exe"
+                         "cfg/wrapmsvc.exe"))
+             #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://bitbucket.org/Coin3D/coin/wiki/Home")
+      (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))))
+
-- 
2.22.0


[-- Attachment #3: 0005-gnu-Add-python-pyside-2-libcxx-headers.patch --]
[-- Type: text/x-patch, Size: 2795 bytes --]

From d037a21c11318db6beb615fd5334b75b42f5f7e5 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 10:20:22 -0700
Subject: [PATCH 05/11] gnu: Add python-pyside-2-libcxx-headers.

* gnu/packages/llvm.scm (python-pyside-2-libcxx-headers): New variable.
---
 gnu/packages/llvm.scm | 55 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 188d0bb267..3641ad068e 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -702,3 +702,58 @@ using @code{clang-rename}.")))
          #t)))
     (license license:ncsa)))
 
+;; See https://bugreports.qt.io/browse/PYSIDE-787
+;; STL headers are not parsed correctly, so only send in some headers
+(define-public python-pyside-2-libcxx-headers
+  (package
+    (inherit libcxx)
+    (name "python-pyside-2-libcxx-headers")
+    (version (package-version llvm-6))
+    (source
+     (origin
+       (inherit (package-source libcxx))
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/libcxx-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'use-only-required-headers
+           (lambda* (#:key outputs #:allow-other-keys)
+             (use-modules ((srfi srfi-1)))
+             (let ((out (assoc-ref outputs "out"))
+                   (required-headers
+                    '("type_traits"
+                      "__config"
+                      "cstddef"
+                      "__nullptr"
+                      "utility"
+                      "__tuple"
+                      "initializer_list"
+                      "cstring"
+                      "cstdint"
+                      "__debug")))
+               (for-each
+                delete-file
+                (filter
+                 (lambda (file)
+                   (not
+                    (fold
+                     (lambda (acc header)
+                       (or acc (string-contains file header)))
+                     #f
+                     required-headers)))
+                 (find-files (string-append out "/include/c++/v1"))))
+               (delete-file-recursively (string-append out "/include/c++/v1/ext"))
+               (delete-file-recursively (string-append out "/include/c++/v1/support"))
+               (delete-file-recursively (string-append out "/lib")))
+             #t)))))
+    (synopsis
+     "Libcxx files specifically used by PySide2")
+    (description
+     "Libcxx files specifically used by PySide2.")))
-- 
2.22.0


[-- Attachment #4: 0004-gnu-Add-python-shiboken-2.patch --]
[-- Type: text/x-patch, Size: 2775 bytes --]

From 1562b14afb469b7f31121145b2899a37eeb346ba Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 09:13:50 -0700
Subject: [PATCH 04/11] gnu: Add python-shiboken-2.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d8f144893d..e1a3e387a1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -64,6 +64,7 @@
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -16041,3 +16042,49 @@ one-off scripts.")
 time-or-computationally-expensive properties quick and easy and works in Python
 2 or 3.")
     (license license:bsd-3)))
+
+(define-public python-shiboken-2
+  (let ((revision "1")
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-shiboken-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("python-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'use-shiboken-dir-only
+             (lambda _ (chdir "sources/shiboken2") #t))
+           (add-before 'configure 'set-build-env
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((llvm-toolchain-dir (assoc-ref inputs "llvm-toolchain-6")))
+                 (setenv "CLANG_INSTALL_DIR" llvm-toolchain-dir)
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      (description
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      ;; Help!
+      (license `(,license:gpl2+
+                 ,license:llgpl)))))
-- 
2.22.0


[-- Attachment #5: 0002-gnu-Add-soqt.patch --]
[-- Type: text/x-patch, Size: 2237 bytes --]

From 0ea619013412883a6f6e77a9cdd3cae2c61dae52 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Thu, 4 Jul 2019 16:29:24 -0700
Subject: [PATCH 02/11] gnu: Add soqt.

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

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 0e42f80a87..75d43c346f 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -53,6 +53,7 @@
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
@@ -1027,3 +1028,38 @@ standard graphics library for 3D visualization and visual simulation
 software in the scientific and engineering community.")
       (license license:bsd-3))))
 
+(define-public soqt
+  (let ((changeset "58b495aa6bed9e58542e60df28843f58e2ab8db4")
+        (revision "1"))
+    (package
+      (name "soqt")
+      (version
+       (string-append "1.6.0-" revision "." (string-take changeset 7)))
+      (source
+       (origin
+         (method hg-fetch)
+         (uri (hg-reference (url "https://bitbucket.org/Coin3d/soqt")
+                            (changeset changeset)))
+         (sha256
+          (base32
+           "023rhf8piwcmgi08d3xyqj1cj83v30z6l3zbd5qs1y1mkw9lqfpz"))
+         (file-name (git-file-name "soqt" version))))
+      (build-system cmake-build-system)
+      (native-inputs
+       `(("doxygen" ,doxygen)
+         ("graphviz" ,graphviz)))
+      (inputs
+       `(("coin3D" ,coin3D)
+         ("glew" ,glew)
+         ("libcxx" ,libcxx)
+         ("qtbase" ,qtbase)))
+      (arguments `(#:tests? #f))
+      (home-page "https://bitbucket.org/Coin3D/soqt")
+      (synopsis
+       "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.22.0


[-- Attachment #6: 0003-gnu-Add-llvm-toolchain-6.patch --]
[-- Type: text/x-patch, Size: 2430 bytes --]

From 971abce6868ef86b241834786936e9a397bb06b4 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 08:34:24 -0700
Subject: [PATCH 03/11] gnu: Add llvm-toolchain-6.

* gnupackages/llvm.scm (llvm-toolchain-6): New variable.
---
 gnu/packages/llvm.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 1fe9af38e0..188d0bb267 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,6 +38,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages bootstrap)           ;glibc-dynamic-linker
@@ -667,3 +669,36 @@ C/C++/Obj-C code according to a set of style options, see
     (synopsis "Rename every occurrence of a symbol using clang-rename")
     (description "This package renames every occurrence of a symbol at point
 using @code{clang-rename}.")))
+
+;; PySide2 docs recommend using a bundled version of libclang
+;; See https://wiki.qt.io/Qt_for_Python/GettingStarted
+;; The source they recommend: https://download.qt.io/development_releases/prebuilt/libclang/
+(define-public llvm-toolchain-6
+  (package
+    (inherit llvm-6)
+    (name "llvm-toolchain")
+    (build-system trivial-build-system)
+    (inputs
+     `(("clang-6" ,clang-6)
+       ("llvm-6" ,llvm-6)))
+    (arguments
+     `(#:modules ((guix build union)
+                  (guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build union)
+                      (ice-9 match)
+                      (srfi srfi-1))
+         (union-build
+          (assoc-ref %outputs "out")
+          (filter-map
+           (match-lambda
+             ((name . dir)
+              (if (or (string=? name "clang-6")
+                      (string=? name "llvm-6"))
+                  dir
+                  #f)))
+           %build-inputs))
+         #t)))
+    (license license:ncsa)))
+
-- 
2.22.0


[-- Attachment #7: 0007-gnu-Add-python-pyside-2-tools.patch --]
[-- Type: text/x-patch, Size: 1886 bytes --]

From 83d720573955b0d4d7b613307d1e0821ab01cfad Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 18:49:08 -0700
Subject: [PATCH 07/11] gnu: Add python-pyside-2-tools.

* gnu/packages/python-xyz.scm (python-pyside-2-tools): New variable.
---
 gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3c724f1398..2a984cda4b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -16165,3 +16165,35 @@ which can be used to generate Python bindings for your C or C++ code.")
       ;; Help!
       (license `(,license:gpl2+
                  ,license:llgpl)))))
+
+(define-public python-pyside-2-tools
+  (let ((revision "1")
+        (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
+    (package
+      (name "python-pyside-2-tools")
+      (version (git-version "v5.11.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2" ,python-pyside-2)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("qtbase" ,qtbase)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Contains lupdate, rcc and uic tools for PySide2")
+      (description
+       "Contains lupdate, rcc and uic tools for PySide2")
+      ;; Help! (This is from arch)
+      (license license:lgpl2.1+))))
-- 
2.22.0


[-- Attachment #8: 0006-gnu-Add-python-pyside-2.patch --]
[-- Type: text/x-patch, Size: 4327 bytes --]

From 46c7ec4990291f437311064955621cdd9a69c4b1 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 11:21:14 -0700
Subject: [PATCH 06/11] gnu: Add python-pyside-2.

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e1a3e387a1..3c724f1398 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -90,6 +90,7 @@
   #:use-module (gnu packages backup)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages databases)
@@ -16043,6 +16044,82 @@ time-or-computationally-expensive properties quick and easy and works in Python
 2 or 3.")
     (license license:bsd-3)))
 
+(define-public python-pyside-2
+  (let ((revision "1")
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-pyside-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2-libcxx-headers" ,python-pyside-2-libcxx-headers)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("qtbase" ,qtbase)
+         ("qtdatavis3d" ,qtdatavis3d)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtquickcontrols" ,qtquickcontrols) ;; ??
+         ("qtscript" ,qtscript)
+         ("qtscxml" ,qtscxml)
+         ("qtsensors" ,qtsensors)
+         ("qtspeech" ,qtspeech)
+         ("qtsvg" ,qtsvg)
+         ("qtwebchannel" ,qtwebchannel)
+         ("qtwebsockets" ,qtwebsockets)
+         ("qtx11extras" ,qtx11extras)))
+      (native-inputs
+       `(("cmake" ,cmake)
+         ("git" ,git)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("python-wrapper" ,python-wrapper)
+         ("qttools" ,qttools)
+         ("which" ,which)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'go-to-source-dir
+             (lambda _ (chdir "sources/pyside2") #t))
+           (add-before 'configure 'set-clang-dir
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((clang-dir (assoc-ref inputs "llvm-toolchain-6"))
+                     (libcxx-dir (assoc-ref inputs "python-pyside-2-libcxx-headers")))
+                 (setenv "CLANG_INSTALL_DIR" clang-dir)
+                 (substitute* "cmake/Macros/PySideModules.cmake"
+                   (("--include-paths=")
+                    (string-append "--include-paths=" libcxx-dir "/include/c++/v1:")))
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications")
+      (description
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications.
+It lets Python developers utilize the full potential of Qt, using the PySide2 module.
+The PySide2 module provides access to the individual Qt modules such as QtCore, QtGui,
+and so on.  Qt for Python also comes with the Shiboken2 CPython binding code generator,
+which can be used to generate Python bindings for your C or C++ code.")
+      ;; Help!
+      (license
+       `(,license:fdl1.3+
+         ,license:gpl2+
+         ,license:gpl3+
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
+         ,license:lgpl3)))))
+
 (define-public python-shiboken-2
   (let ((revision "1")
         (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
-- 
2.22.0


[-- Attachment #9: 0008-gnu-Add-libspnav.patch --]
[-- Type: text/x-patch, Size: 2719 bytes --]

From d272d9c7d5582e85c8e35a6414b56ebe5d549f92 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sat, 6 Jul 2019 19:05:37 -0700
Subject: [PATCH 08/11] gnu: Add libspnav.

* gnu/packages/engineering.scm (libspnav): New variable.
---
 gnu/packages/engineering.scm | 39 ++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 7d48414889..366307cb2f 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018, 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2019 Tim Stahel <swedneck@swedneck.xyz>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2062,3 +2063,41 @@ purpose circuit simulator and can perform DC and transient analyses, fourier
 analysis and AC analysis.  The engine is designed to do true mixed-mode
 simulation.")
     (license license:gpl3+)))
+
+(define-public libspnav
+  (let ((commit "20961617eecc845b23fcf9e06acd1a6bb340b88b")
+        (revision "1"))
+    (package
+      (name "libspnav")
+      (version (git-version "0.2.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/FreeSpacenav/libspnav")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1ib5jxcpz76lr90f69vb50yn2q9ss45axlgil29layh36dnyifac"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("libx11" ,libx11)))
+      (arguments `(#:tests? #f))
+      (home-page "http://spacenav.sourceforge.net/")
+      (synopsis
+       "Library for communicating with spacenavd or 3dxsrv")
+      (description
+       "The libspnav library is provided as a replacement of the magellan
+library.  It provides a cleaner, and more orthogonal interface.  libspnav
+supports both the original X11 protocol for communicating with the driver, and
+the new alternative non-X protocol.  Programs that choose to use the X11
+protocol, are automatically compatible with either the free spacenavd driver
+or the official 3dxserv, as if they were using the magellan SDK.
+
+Also, libspnav provides a magellan API wrapper on top of the new API.  So, any
+applications that were using the magellan library, can switch to libspnav
+without any changes.  And programmers that are familliar with the magellan API
+can continue using it with a free library without the restrictions of the
+official SDK.")
+      (license license:bsd-3))))
-- 
2.22.0


[-- Attachment #10: 0009-gnu-Add-libarea.patch --]
[-- Type: text/x-patch, Size: 2808 bytes --]

From a9ba800f97e08b98e36c0a985e56be650f576c2d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sun, 7 Jul 2019 10:03:38 -0700
Subject: [PATCH 09/11] gnu: Add libarea.

* gnu/packages/engineering.scm (libarea): New variable.
---
 gnu/packages/engineering.scm | 46 ++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 366307cb2f..4c97b32bf9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -49,6 +49,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -2064,6 +2065,51 @@ analysis and AC analysis.  The engine is designed to do true mixed-mode
 simulation.")
     (license license:gpl3+)))
 
+
+;; TODO: Try the google archive version with gplv3
+;; subversion url:
+;;   svn checkout http://libarea.googlecode.com/svn/trunk/ libarea
+(define-public libarea
+  (let ((revision "1")
+        (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
+    (package
+      (name "libarea")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url "https://github.com/Heeks/libarea.git")
+                             (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
+      (build-system gnu-build-system)
+      (inputs `(("boost" ,boost)
+                ("python-wrapper" ,python-wrapper)))
+      (native-inputs
+       `(("cmake" ,cmake)))
+      (arguments
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'configure 'cmake-configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (cmake (assoc-ref inputs "cmake")))
+                 (mkdir-p "build")
+                 (invoke "cmake"
+                         (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
+           (delete 'configure))))
+      (home-page "https://github.com/Heeks/libarea")
+      (synopsis
+       "Library and python module for pocketing and profiling operations")
+      (description
+       "Area is a CAM-related software for pocketing operation.
+
+This project provides library and associated python-module to compute pocket
+operations.")
+      (license license:gpl3+))))
+
 (define-public libspnav
   (let ((commit "20961617eecc845b23fcf9e06acd1a6bb340b88b")
         (revision "1"))
-- 
2.22.0


[-- Attachment #11: 0010-gnu-Add-libmedfile.patch --]
[-- Type: text/x-patch, Size: 1742 bytes --]

From 013aa0d66718ba8692e6e5703a77e54527fa3fd5 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sun, 7 Jul 2019 10:13:17 -0700
Subject: [PATCH 10/11] gnu: Add libmedfile.

* gnu/packages/engineering.scm (libmedfile): New variable.
---
 gnu/packages/engineering.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 4c97b32bf9..f10b6dff98 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2066,6 +2066,35 @@ simulation.")
     (license license:gpl3+)))
 
 
+(define-public libmedfile
+  (package
+    (name "libmedfile")
+    (version "3.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://files.salome-platform.org/Salome/other/med-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "1215sal10xp6xirgggdszay2bmx0sxhn9pgh7x0wg2w32gw1wqyx"))))
+    (build-system cmake-build-system)
+    (inputs `(("hdf5" ,hdf5)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-test-output
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file-recursively
+                (string-append out "/bin/testc"))
+               #t))))))
+    (home-page "https://www.salome-platform.org")
+    (synopsis "Library to read and write MED files")
+    (description "Library to read and write MED files")
+    (license license:gpl3+)))
+
 ;; TODO: Try the google archive version with gplv3
 ;; subversion url:
 ;;   svn checkout http://libarea.googlecode.com/svn/trunk/ libarea
-- 
2.22.0


[-- Attachment #12: 0011-gnu-Add-freecad.patch --]
[-- Type: text/x-patch, Size: 4909 bytes --]

From 93c7a987e98e04ab0eb099a5cc8a6d53313f84a1 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Sun, 7 Jul 2019 10:32:10 -0700
Subject: [PATCH 11/11] gnu: Add freecad.

* gnu/packages/engineering.scm (freecad): New variable.
---
 gnu/packages/engineering.scm | 86 ++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index f10b6dff98..16e98b1dff 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -53,6 +53,7 @@
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages fpga)
@@ -65,10 +66,13 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
@@ -89,6 +93,7 @@
   #:use-module (gnu packages tex)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
 (define-public librecad
@@ -2065,6 +2070,87 @@ analysis and AC analysis.  The engine is designed to do true mixed-mode
 simulation.")
     (license license:gpl3+)))
 
+(define-public freecad
+  (let ((commit "3129ae4296e40ed20e7b3d460b86e6969acbe1c3")
+        (revision "1"))
+    (package
+      (name "freecad")
+      (version (git-version "0.18.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/FreeCAD/FreeCAD.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1ny29y0h8smg1bwi5yn4kcnyfprqh3v7v2z8837cmmhcwp8dr95m"))))
+      (build-system cmake-build-system)
+      (native-inputs
+       `(("doxygen" ,doxygen)
+         ("graphviz" ,graphviz)
+         ("qttools" ,qttools)
+         ("pkg-config" ,pkg-config)
+         ("swig" ,swig)))
+      (inputs
+       `(("boost" ,boost)
+         ("coin3D" ,coin3D)
+         ("eigen" ,eigen)
+         ("freetype" ,freetype)
+         ("glew" ,glew)
+         ("hdf5" ,hdf5)
+         ("libarea" ,libarea)
+         ("libspnav" ,libspnav)
+         ("libmedfile" ,libmedfile)
+         ("openmpi" ,openmpi)
+         ("opencascade-oce" ,opencascade-oce)
+         ("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-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtsvg" ,qtsvg)
+         ("qtx11extras" ,qtx11extras)
+         ("qtxmlpatterns" ,qtxmlpatterns)
+         ("qtwebkit" ,qtwebkit)
+         ("soqt" ,soqt)
+         ("vtk" ,vtk)
+         ("xerces-c" ,xerces-c)
+         ("zlib" ,zlib)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags
+         (list
+          "-DBUILD_QT5=ON"
+          (string-append "-DCMAKE_INSTALL_LIBDIR="
+                         (assoc-ref %outputs "out") "/lib"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'configure 'restore-pythonpath
+             (lambda _
+               (substitute* "src/Main/MainGui.cpp"
+                 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
+               #t))
+           (add-after 'install 'wrap-pythonpath
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/FreeCAD")
+                   (list "PYTHONPATH"
+                         'prefix (list (getenv "PYTHONPATH")))))
+               #t)))))
+      (home-page "https://www.freecadweb.org/")
+      (synopsis "Your Own 3D Parametric Modeler")
+      (description
+       "FreeCAD is a general purpose feature-based, parametric 3D modeler for
+CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
+product design but also fits a wider range of uses in engineering, such as
+architecture or other engineering specialties.  It is 100% Open Source (LGPL2+
+license) and extremely modular, allowing for very advanced extension and
+customization.")
+      ;; Help!
+      (license license:lgpl2.1+))))
 
 (define-public libmedfile
   (package
-- 
2.22.0


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

* [bug#36440] [PATCH] Add FreeCAD
  2019-07-23 16:25     ` John Soo
@ 2019-07-23 16:29       ` John Soo
  2019-07-24 21:59         ` Ricardo Wurmus
  2019-07-24  7:52       ` Jonathan Brielmaier
  2019-07-24 21:51       ` Ricardo Wurmus
  2 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-07-23 16:29 UTC (permalink / raw)
  To: Jonathan Brielmaier; +Cc: 36440


[-- Attachment #1.1: Type: text/plain, Size: 4538 bytes --]

Hi all,

I forgot to add some patches to start updating HDF5 with breaking builds.
It seems like the patches will need an update to start.

- John


On Tue, Jul 23, 2019 at 4:25 PM John Soo <jsoo1@asu.edu> wrote:

> Hi Bjorn, Jonathon, and everyone,
>
> FreeCAD was certainly not easy to package. I spent actually several months
> just working on the pyside2 dependencies and I still do not have a working
> build of Pivy from coin.  It is only thanks to the help of the upstream
> maintainers that this package is even close to working.  I have attached
> updated patches and my responses to Bjorn's notes below. Thanks for your
> review!
>
> As to QTWebKit - I do not know why it is a dependency. It may not be a
> hard requirement. If you comment it out, I think the configure phase may
> succeed. I included it for completion only.
>
> * FreeCAD Notes
>
> ** DONE Add commit message details and copyright lines
>
> ** Coin3D
>
> *** DONE Delete blobs
>
> *** hg-fetch deletes .hg dirs (and all submodules' .hg dirs)
>
> ** SoQT vs. Quarter
>
> *** Not interchangeable as far as I know.
>
> *** FreeCAD requires SoQT specifically during configure.
>
> ** Pyside2
>
> *** Does all of pyside2 belong in qt.scm? - there are three packages:
> Shiboken2, Pyside2, and Pyside2-Tools
>
> *** QT version compatibility
>
> **** The pyside2 project has branches for the newest version with
> compatibility with older QT versions (I am using the 5.11.3 compat branch)
>
>  - That is also why I am using a git commit for the Pyside2 packages
>  - https://code.qt.io/cgit/pyside/pyside-setup.git/
>  - Pyside dependencies were by far the most challenging, and I had to
> track some issues (of which, some are not resolved)
>
> ** libmedfile
>
> *** Reason for old version is that what was released when I started
>
> *** 4.0.0 requires hdf5 >= 1.10.2
>
> **** HDF5 has some dependents:
>
> guix refresh --list-dependent hdf5 Building the following 11 packages
> would ensure 23 dependent packages are rebuilt:
> r-ioniser@2.8.0 r-scone@1.8.0 r-lumi@2.36.0 r-yarn@1.10.0
> r-illuminahumanmethylationepicmanifest@0.3.0 r-scdd@1.8.0 pigx@0.0.3
> r-pore@0.24 r-yamss@1.10.0 r-xcms@3.6.1 r-msnid@1.18.0
>
> **** HDF5 patches need updates when HDF5 updated to 1.10.5
>
> *** DONE Change license to gpl3+
>
> ** libarea License questions and source locations:
>
> **** I am using the source from github: https://github.com/Heeks/libarea
>
>  - Should I use some other source? The google archive is unavailable.
>  - I cannot find any license information in the github repository.
>
> **** DONE Change to gpl3+
>
> ** Using releases over hg/git downloads (please advise)
>
> 1. Pyside2 packages - Done for compatibility reasons
> 2. Coin3D and SoQt - I don't think there are releases of these aside from
> the bitbucket repository.
> 3. LLVM propagated packages (llvm-toolchain and pyside-libcxx-headers)
>  - I am not sure these are the best way to accomplish the goal anyways.
>  - Not sure where to find the right sources for llvm-toolchain-6 and the
> pyside-libcxx-headers.
> 4. libarea - Seems like libarea is actually close to not even having
> source available anymore, let alone a release
> 5. libspnav - Confused as to the best source to use here. If there is a
> release or better version, I can update.
> 6. FreeCAD
>  - I can use the releases if they exist. I do not think they have source
> tarballs available.
>  - I was packaging during a lot of active development of FreeCAD
>
> Thank you for your review and advice.
>
> - John
>
> On Mon, Jul 22, 2019 at 5:57 PM Jonathan Brielmaier <
> jonathan.brielmaier@web.de> wrote:
>
>> Thanks Björn for having a look here :)
>>
>> On 7/22/19 4:11 PM, Björn Höfling wrote:> I wanted to give it a try for
>> myself but failed: I could not build
>> > qtwebkit locally, and no substitutes are available. I don't want to
>> > hold back my comments any longer, so I postponed trying it out.
>>
>> qtwebkit seems to fail on master as well and it needs long to build, so
>> I can't do it locally on my laptop:
>> http://ci.guix.gnu.org/build/1488065/details
>>
>> > I wonder if we need the dependency on qtwebkit or if we can get rid of
>> this, but I haven't investigated yet.
>>
>> I think we need it as openSUSE and Debian have a build require on
>> qtwebkit-devel and it's noted at their wiki:
>> https://www.freecadweb.org/wiki/CompileOnUnix#Getting_the_dependencies
>>
>

[-- Attachment #1.2: Type: text/html, Size: 6242 bytes --]

[-- Attachment #2: 0001-gnu-hdf5-Update-to-1.10.5.patch --]
[-- Type: text/x-patch, Size: 1495 bytes --]

From ab414fdaf465d932691d2186ebc3454f634091e9 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Tue, 23 Jul 2019 08:23:15 -0700
Subject: [PATCH 1/2] gnu: hdf5: Update to 1.10.5.

* gnu/packages/maths.scm (hdf5): Update to 1.10.5.
---
 gnu/packages/maths.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index b204b314c6..c2ebe36287 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -31,6 +31,7 @@
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -753,7 +754,7 @@ incompatible with HDF5.")
 (define-public hdf5
   (package
     (name "hdf5")
-    (version "1.8.21")
+    (version "1.10.5")
     (source
      (origin
       (method url-fetch)
@@ -768,7 +769,7 @@ incompatible with HDF5.")
                                    (string-append major minor)))
                                 "/src/hdf5-" version ".tar.bz2")))
       (sha256
-       (base32 "03glk4w4wyb1jyb443g53y3y1ncnf6mj2cqwm6avfr2awkgb3cg5"))
+       (base32 "0i3g6v521vigzbx8wpd32ibsiiw92r65ca3qdbn0d8fj8f4fmmk8"))
       (patches (search-patches "hdf5-config-date.patch"
                                "hdf5-1.8-mpi-deprecations.patch"))))
     (build-system gnu-build-system)
-- 
2.22.0


[-- Attachment #3: 0002-gnu-libmedfile-Update-to-4.0.0.patch --]
[-- Type: text/x-patch, Size: 1080 bytes --]

From ecd02d9750712a3935b7cfafc7141fc9e7ca8bd4 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo@panosoft.com>
Date: Tue, 23 Jul 2019 08:26:45 -0700
Subject: [PATCH 2/2] gnu: libmedfile: Update to 4.0.0.

* gnu/packages/engineering.scm (libmedfile): Update to 4.0.0.
---
 gnu/packages/engineering.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b5b2369690..546a913e35 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2155,7 +2155,7 @@ customization.")
 (define-public libmedfile
   (package
     (name "libmedfile")
-    (version "3.3.1")
+    (version "4.0.0")
     (source
      (origin
        (method url-fetch)
@@ -2164,7 +2164,7 @@ customization.")
              version ".tar.gz"))
        (sha256
         (base32
-         "1215sal10xp6xirgggdszay2bmx0sxhn9pgh7x0wg2w32gw1wqyx"))))
+         "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
     (build-system cmake-build-system)
     (inputs `(("hdf5" ,hdf5)))
     (arguments
-- 
2.22.0


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

* [bug#36440] [PATCH] Add FreeCAD
  2019-07-23 16:25     ` John Soo
  2019-07-23 16:29       ` John Soo
@ 2019-07-24  7:52       ` Jonathan Brielmaier
  2019-07-24 19:46         ` John Soo
  2019-07-24 21:51       ` Ricardo Wurmus
  2 siblings, 1 reply; 27+ messages in thread
From: Jonathan Brielmaier @ 2019-07-24  7:52 UTC (permalink / raw)
  To: John Soo; +Cc: 36440

I didn't build all the packages, because it failed to apply them on top
of current master. Did you rebased it on current master?

I only comment where I "know" something...

On 7/23/19 6:25 PM, John Soo wrote:
> ** Coin3D
>
> *** DONE Delete blobs
>
> *** hg-fetch deletes .hg dirs (and all submodules' .hg dirs)

- Usually the (arguments) section is right after the (build-system...)
but this is more optical :P
- Wikipedia uses https://bitbucket.org/Coin3D/coin/src but I think the
link to their wiki https://bitbucket.org/Coin3D/coin/wiki/Home is even
better :)

> ** SoQT vs. Quarter
>
> *** Not interchangeable as far as I know.
>
> *** FreeCAD requires SoQT specifically during configure.

Do we really need SoQT? Neither openSUSE
https://build.opensuse.org/package/show/science/FreeCAD nor ArchLinux
https://aur.archlinux.org/packages/freecad/ depending on SoQT

> ** Pyside2
>
> *** Does all of pyside2 belong in qt.scm? - there are three packages:
> Shiboken2, Pyside2, and Pyside2-Tools

qt.scm does already include python and python-xyz, so from this side
it's not a problem. If pyside* would be used by non QT projects, which
also doesn't depend on QT it would be good to have it in python-xyz
module, but I don't think that is the case. So leave them in qt.scm :)

python-shiboken-2
Maybe leave a comment that it's a source inside of pyside-setup, because
the first repo I found was this :)
https://code.qt.io/cgit/pyside/shiboken.git/

pyside-2-tools:
- Maybe elaborate a bit more in the description, I have no idead what
"lupdate, rcc and uic" is :P
- Is there a reason why we don't run the tests?

python-pyside-2:
- No newlines in the description after a sentence, just two whitespaces :)

> ** libmedfile

- description: What is a MED file?

> *** Reason for old version is that what was released when I started
>
> *** 4.0.0 requires hdf5 >= 1.10.2
>
> **** HDF5 has some dependents:
>
> guix refresh --list-dependent hdf5 Building the following 11 packages would
> ensure 23 dependent packages are rebuilt:
> r-ioniser@2.8.0 r-scone@1.8.0 r-lumi@2.36.0 r-yarn@1.10.0
> r-illuminahumanmethylationepicmanifest@0.3.0 r-scdd@1.8.0 pigx@0.0.3
> r-pore@0.24 r-yamss@1.10.0 r-xcms@3.6.1 r-msnid@1.18.0

20 rebuilds is not a problem.

> **** HDF5 patches need updates when HDF5 updated to 1.10.5

So they don't apply anymore at the moment?

> ** Using releases over hg/git downloads (please advise)
>
> 1. Pyside2 packages - Done for compatibility reasons
> 2. Coin3D and SoQt - I don't think there are releases of these aside from
> the bitbucket repository.

https://bitbucket.org/Coin3D/coin/downloads/

> 3. LLVM propagated packages (llvm-toolchain and pyside-libcxx-headers)
>  - I am not sure these are the best way to accomplish the goal anyways.
>  - Not sure where to find the right sources for llvm-toolchain-6 and the
> pyside-libcxx-headers.
> 4. libarea - Seems like libarea is actually close to not even having source
> available anymore, let alone a release
> 5. libspnav - Confused as to the best source to use here. If there is a
> release or better version, I can update.

This one:
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/libspnav#n13

> 6. FreeCAD
>  - I can use the releases if they exist. I do not think they have source
> tarballs available.
>  - I was packaging during a lot of active development of FreeCAD
>
> Thank you for your review and advice.

That's it from me at the moment. Strong work! Keep it up :)
~Jonathan

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-07-24  7:52       ` Jonathan Brielmaier
@ 2019-07-24 19:46         ` John Soo
  0 siblings, 0 replies; 27+ messages in thread
From: John Soo @ 2019-07-24 19:46 UTC (permalink / raw)
  To: Jonathan Brielmaier; +Cc: 36440

Hi Jonathon,

Thanks for your comments. I was able to apply the patches over current master this morning after a fetch. There are some dependencies between the patches. The only thing I can think of is to make sure you apply them in order. I’ll take a look and adjust to the rest of your comments in the next day or so.

Thanks again.

- John

> On Jul 24, 2019, at 12:52 AM, Jonathan Brielmaier <jonathan.brielmaier@web.de> wrote:
> 
> I didn't build all the packages, because it failed to apply them on top
> of current master. Did you rebased it on current master?
> 
> I only comment where I "know" something...
> 
>> On 7/23/19 6:25 PM, John Soo wrote:
>> ** Coin3D
>> 
>> *** DONE Delete blobs
>> 
>> *** hg-fetch deletes .hg dirs (and all submodules' .hg dirs)
> 
> - Usually the (arguments) section is right after the (build-system...)
> but this is more optical :P
> - Wikipedia uses https://bitbucket.org/Coin3D/coin/src but I think the
> link to their wiki https://bitbucket.org/Coin3D/coin/wiki/Home is even
> better :)
> 
>> ** SoQT vs. Quarter
>> 
>> *** Not interchangeable as far as I know.
>> 
>> *** FreeCAD requires SoQT specifically during configure.
> 
> Do we really need SoQT? Neither openSUSE
> https://build.opensuse.org/package/show/science/FreeCAD nor ArchLinux
> https://aur.archlinux.org/packages/freecad/ depending on SoQT
> 
>> ** Pyside2
>> 
>> *** Does all of pyside2 belong in qt.scm? - there are three packages:
>> Shiboken2, Pyside2, and Pyside2-Tools
> 
> qt.scm does already include python and python-xyz, so from this side
> it's not a problem. If pyside* would be used by non QT projects, which
> also doesn't depend on QT it would be good to have it in python-xyz
> module, but I don't think that is the case. So leave them in qt.scm :)
> 
> python-shiboken-2
> Maybe leave a comment that it's a source inside of pyside-setup, because
> the first repo I found was this :)
> https://code.qt.io/cgit/pyside/shiboken.git/
> 
> pyside-2-tools:
> - Maybe elaborate a bit more in the description, I have no idead what
> "lupdate, rcc and uic" is :P
> - Is there a reason why we don't run the tests?
> 
> python-pyside-2:
> - No newlines in the description after a sentence, just two whitespaces :)
> 
>> ** libmedfile
> 
> - description: What is a MED file?
> 
>> *** Reason for old version is that what was released when I started
>> 
>> *** 4.0.0 requires hdf5 >= 1.10.2
>> 
>> **** HDF5 has some dependents:
>> 
>> guix refresh --list-dependent hdf5 Building the following 11 packages would
>> ensure 23 dependent packages are rebuilt:
>> r-ioniser@2.8.0 r-scone@1.8.0 r-lumi@2.36.0 r-yarn@1.10.0
>> r-illuminahumanmethylationepicmanifest@0.3.0 r-scdd@1.8.0 pigx@0.0.3
>> r-pore@0.24 r-yamss@1.10.0 r-xcms@3.6.1 r-msnid@1.18.0
> 
> 20 rebuilds is not a problem.
> 
>> **** HDF5 patches need updates when HDF5 updated to 1.10.5
> 
> So they don't apply anymore at the moment?
> 
>> ** Using releases over hg/git downloads (please advise)
>> 
>> 1. Pyside2 packages - Done for compatibility reasons
>> 2. Coin3D and SoQt - I don't think there are releases of these aside from
>> the bitbucket repository.
> 
> https://bitbucket.org/Coin3D/coin/downloads/
> 
>> 3. LLVM propagated packages (llvm-toolchain and pyside-libcxx-headers)
>> - I am not sure these are the best way to accomplish the goal anyways.
>> - Not sure where to find the right sources for llvm-toolchain-6 and the
>> pyside-libcxx-headers.
>> 4. libarea - Seems like libarea is actually close to not even having source
>> available anymore, let alone a release
>> 5. libspnav - Confused as to the best source to use here. If there is a
>> release or better version, I can update.
> 
> This one:
> https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/libspnav#n13
> 
>> 6. FreeCAD
>> - I can use the releases if they exist. I do not think they have source
>> tarballs available.
>> - I was packaging during a lot of active development of FreeCAD
>> 
>> Thank you for your review and advice.
> 
> That's it from me at the moment. Strong work! Keep it up :)
> ~Jonathan

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-07-23 16:25     ` John Soo
  2019-07-23 16:29       ` John Soo
  2019-07-24  7:52       ` Jonathan Brielmaier
@ 2019-07-24 21:51       ` Ricardo Wurmus
  2 siblings, 0 replies; 27+ messages in thread
From: Ricardo Wurmus @ 2019-07-24 21:51 UTC (permalink / raw)
  To: John Soo; +Cc: 36440


John Soo <jsoo1@asu.edu> writes:

> *** 4.0.0 requires hdf5 >= 1.10.2
>
> **** HDF5 has some dependents:
>
> guix refresh --list-dependent hdf5 Building the following 11 packages would
> ensure 23 dependent packages are rebuilt:
> r-ioniser@2.8.0 r-scone@1.8.0 r-lumi@2.36.0 r-yarn@1.10.0
> r-illuminahumanmethylationepicmanifest@0.3.0 r-scdd@1.8.0 pigx@0.0.3
> r-pore@0.24 r-yamss@1.10.0 r-xcms@3.6.1 r-msnid@1.18.0
>
> **** HDF5 patches need updates when HDF5 updated to 1.10.5

We do have a later version of HDF5: hdf5-1.10, that’s version 1.10.4.
Is this enough?

-- 
Ricardo

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-07-23 16:29       ` John Soo
@ 2019-07-24 21:59         ` Ricardo Wurmus
  0 siblings, 0 replies; 27+ messages in thread
From: Ricardo Wurmus @ 2019-07-24 21:59 UTC (permalink / raw)
  To: John Soo; +Cc: 36440


Hi John,

> I forgot to add some patches to start updating HDF5 with breaking builds.
> It seems like the patches will need an update to start.

This is probably not needed as we have the hdf5-1.10 variable, which
provides version 1.10.4.

-- 
Ricardo

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-06-30  2:39 [bug#36440] [PATCH] Add FreeCAD John Soo
                   ` (3 preceding siblings ...)
  2019-07-22 14:11 ` [bug#36440] [PATCH] Add FreeCAD Björn Höfling
@ 2019-07-30 12:24 ` Paul Garlick
  2019-09-02 13:23   ` Ludovic Courtès
  4 siblings, 1 reply; 27+ messages in thread
From: Paul Garlick @ 2019-07-30 12:24 UTC (permalink / raw)
  To: 36440

Hi John, Hi Guix,

Marvellous progress in packaging FreeCAD for Guix!

One of the dependencies is OpenCASCADE.  You may wish to switch the
opencascade-oce input to opencascade-occt, which is now available.  See
commit 37dc29200c44adc0474476b8df46ed44e8a1d41a.  The occt version is
more up-to-date than the oce version.

Best regards,

Paul.

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-07-30 12:24 ` Paul Garlick
@ 2019-09-02 13:23   ` Ludovic Courtès
  2019-09-02 13:33     ` John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: Ludovic Courtès @ 2019-09-02 13:23 UTC (permalink / raw)
  To: Paul Garlick, John Soo; +Cc: 36440

Hi John & all,

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

> Marvellous progress in packaging FreeCAD for Guix!
>
> One of the dependencies is OpenCASCADE.  You may wish to switch the
> opencascade-oce input to opencascade-occt, which is now available.  See
> commit 37dc29200c44adc0474476b8df46ed44e8a1d41a.  The occt version is
> more up-to-date than the oce version.

John, did you have a chance to look into that?  We’d rather not let the
patch gather too much dust.  :-)

Thanks,
Ludo’.

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-02 13:23   ` Ludovic Courtès
@ 2019-09-02 13:33     ` John Soo
  2019-09-03  5:22       ` John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-09-02 13:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 36440, Paul Garlick

Hi!

Yes I’m sorry these patches are rather stale. I rebased them recently and addressed most of these issues. I got stuck working on the test questions. I will send what I have shortly. 

- John

> On Sep 2, 2019, at 6:23 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> 
> Hi John & all,
> 
> Paul Garlick <pgarlick@tourbillion-technology.com> skribis:
> 
>> Marvellous progress in packaging FreeCAD for Guix!
>> 
>> One of the dependencies is OpenCASCADE.  You may wish to switch the
>> opencascade-oce input to opencascade-occt, which is now available.  See
>> commit 37dc29200c44adc0474476b8df46ed44e8a1d41a.  The occt version is
>> more up-to-date than the oce version.
> 
> John, did you have a chance to look into that?  We’d rather not let the
> patch gather too much dust.  :-)
> 
> Thanks,
> Ludo’.

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-02 13:33     ` John Soo
@ 2019-09-03  5:22       ` John Soo
  2019-09-03 15:10         ` John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-09-03  5:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 36440, Paul Garlick


[-- Attachment #1.1: Type: text/plain, Size: 3430 bytes --]

Hi Ludo, Jonathon, Bjorn, RIcardo, Paul  and everyone,


* Paul:
> One of the dependencies is OpenCASCADE.  You may wish to switch the
> opencascade-oce input to opencascade-occt, which is now available.  See
> commit 37dc29200c44adc0474476b8df46ed44e8a1d41a.  The occt version is
> more up-to-date than the oce version.

I just tried building opencascade-occt and there was a failure in the test
suite: https://paste.debian.net/1098482/
I did replace opencascade-oce with occt in the hopes that it will have
better support in the future.
There is also the issue of the bundled (though heavily patched) SMESH
library. If I get some time soon, I can take another look at unbundling it.

* Bjorn and Jonathon, about qtwebkit:
> qtwebkit seems to fail on master as well and it needs long to build, so
> I can't do it locally on my laptop:
> It also seems that qtwebkit is failing to build in some cases for me now.
> http://ci.guix.gnu.org/build/1488065/details

I found qtwebkit failing for me, too, so I was unable to build freecad with
the most recent patches. The dependencies build ok though.

* Ricardo:
> We do have a later version of HDF5: hdf5-1.10, that’s version 1.10.4.
> Is this enough?

Yes it is, I used hdf5-1.10 for libmedfile.

> Do we really need SoQT?

I removed SoQT and freecad build properly before qtwebkit failed.

* Bjorn:
> medfile: Is there a specific reason you chose 3.x, instead of the
> available 4.0.0? If you, could you add a comment of why?

I was using what amounted to the pre-release of v4. I replaced with the
release version now that it is out.

> License is GPLv3+

I changed the license.

>libarea: Also licensed under GPL v3 (files under "pocket" directory).

I added this license instead

* Johnathon:
> - Maybe elaborate a bit more in the description, I have no idead what
> "lupdate, rcc and uic" is :P

I am sorry, I looked through the documentation and I don't know what they
are.

> - Is there a reason why we don't run the tests?

I recently tried to run the tests for all of the pyside tools (shiboken2,
pyside2, and pyside2-tools).
All fail to find libcxx files. I did not have a lot of time to work on it,
but I was successful in just using the official libcxx@6.X without tests.
Strangely the issue only happens when building the tests.  I have added
FIXME where appropriate.
Previously I had a hand-rolled package strictly for the pyside2 toolchain
which I removed.

> - No newlines in the description after a sentence, just two whitespaces :)

Thank you, I fill-paragraphed.

> - description: What is a MED file?

I added much more detail from the salome-platform Med documentation.

> https://bitbucket.org/Coin3D/coin/downloads/
> ...
> This one:
>
https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/libspnav#n13

I used the releases for coin3D and libspnav. I am worried now about coin3D
because bitbucket is going to drop support for mercurial repos next year.


* Some further notes:
There are now several optional qt modules that are not correctly found when
building pyside2.
I am not sure if this is a bug with pyside or our packages.  The package
builds properly and freecad runs, though (supposing opencascade-occt will
work).

All the patches are rebased to a pretty recent master (just a day or so
ago). Thanks for all your help!

- John

[-- Attachment #1.2: Type: text/html, Size: 5875 bytes --]

[-- Attachment #2: 0001-gnu-Add-coin3D.patch --]
[-- Type: text/x-patch, Size: 2878 bytes --]

From cd213b6fecd3fe01988aeb7bf05029de7d0150ea Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 3 Jul 2019 09:40:31 -0700
Subject: [PATCH 01/10] gnu: Add coin3D.

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

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index ee56dae54e..f90193e217 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +75,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -1018,3 +1020,49 @@ requirements.")
 performance subdivision surface (subdiv) evaluation on massively parallel CPU
 and GPU architectures.")
     (license license:asl2.0)))
+
+(define-public coin3D
+  (package
+    (name "coin3D")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://bitbucket.org/Coin3D/coin/downloads/coin-"
+             version "-src.zip"))
+       (sha256
+        (base32
+         "1mqwlqzvc9ydfxi0bfskwlil16mbnkphfz36p0zl2mvw6h05aqh0"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (for-each delete-file
+                     '("cfg/csubst.exe"
+                       "cfg/wrapmsvc.exe"))
+           #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://bitbucket.org/Coin3D/coin/wiki/Home")
+    (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)))
-- 
2.23.0


[-- Attachment #3: 0002-gnu-Add-llvm-toolchain-6.patch --]
[-- Type: text/x-patch, Size: 2426 bytes --]

From 41c4d8d88a14df9f7ae5a2a02cbe318b2c225a6f Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 08:34:24 -0700
Subject: [PATCH 02/10] gnu: Add llvm-toolchain-6.

* gnupackages/llvm.scm (llvm-toolchain-6): New variable.
---
 gnu/packages/llvm.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 9efb4a4841..19d5f63fd6 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,6 +38,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages bootstrap)           ;glibc-dynamic-linker
@@ -690,3 +692,36 @@ C/C++/Obj-C code according to a set of style options, see
     (synopsis "Rename every occurrence of a symbol using clang-rename")
     (description "This package renames every occurrence of a symbol at point
 using @code{clang-rename}.")))
+
+;; PySide2 docs recommend using a bundled version of libclang
+;; See https://wiki.qt.io/Qt_for_Python/GettingStarted
+;; The source they recommend: https://download.qt.io/development_releases/prebuilt/libclang/
+(define-public llvm-toolchain-6
+  (package
+    (inherit llvm-6)
+    (name "llvm-toolchain")
+    (build-system trivial-build-system)
+    (inputs
+     `(("clang-6" ,clang-6)
+       ("llvm-6" ,llvm-6)))
+    (arguments
+     `(#:modules ((guix build union)
+                  (guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build union)
+                      (ice-9 match)
+                      (srfi srfi-1))
+         (union-build
+          (assoc-ref %outputs "out")
+          (filter-map
+           (match-lambda
+             ((name . dir)
+              (if (or (string=? name "clang-6")
+                      (string=? name "llvm-6"))
+                  dir
+                  #f)))
+           %build-inputs))
+         #t)))
+    (license license:ncsa)))
+
-- 
2.23.0


[-- Attachment #4: 0004-gnu-Add-libcxx-6.patch --]
[-- Type: text/x-patch, Size: 1430 bytes --]

From 0d45421bc1f96ebed330b4970d7cb602d77ba7c3 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 11 Aug 2019 12:38:08 -0700
Subject: [PATCH 04/10] gnu: Add libcxx-6

* gnu/packages/llvm.scm (libcxx-6): New variable.
---
 gnu/packages/llvm.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 938f6b3518..24da1b4f7b 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -442,6 +442,27 @@ with that of libgomp, the GNU Offloading and Multi Processing Library.")
                    "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w"
                    #:patches '("clang-6.0-libc-search-path.patch")))
 
+(define-public libcxx-6
+  (package
+    (inherit libcxx)
+    (name "libcxx")
+    (version (package-version llvm-6))
+    (source
+     (origin
+       (inherit (package-source libcxx))
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/libcxx-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)))
+    (synopsis
+     "Libcxx files specifically used by PySide2")
+    (description
+     "Libcxx files specifically used by PySide2.")))
+
 (define-public llvm-3.9.1
   (package (inherit llvm)
     (name "llvm")
-- 
2.23.0


[-- Attachment #5: 0005-gnu-Add-python-pyside-2.patch --]
[-- Type: text/x-patch, Size: 3895 bytes --]

From acfc9b8a1d29f51018f286ac7f2408cce323239e Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Mon, 2 Sep 2019 07:27:15 -0700
Subject: [PATCH 05/10] gnu: Add python-pyside-2.

 * gnu/packages/qt.scm (python-pyside-2): New variable.
---
 gnu/packages/qt.scm | 80 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 4ccb8a84b2..63c8fc7da3 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2331,3 +2331,83 @@ color-related widgets.")
       ;; Help!
       (license `(,license:gpl2+
                  ,license:llgpl)))))
+
+(define-public python-pyside-2
+  (let ((revision "1")
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-pyside-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("libcxx" ,libcxx-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("qtbase" ,qtbase)
+         ("qtdatavis3d" ,qtdatavis3d)
+         ("qtlocation" ,qtlocation)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtquickcontrols" ,qtquickcontrols)
+         ("qtscript" ,qtscript)
+         ("qtscxml" ,qtscxml)
+         ("qtsensors" ,qtsensors)
+         ("qtspeech" ,qtspeech)
+         ("qtsvg" ,qtsvg)
+         ("qtwebchannel" ,qtwebchannel)
+         ("qtwebsockets" ,qtwebsockets)
+         ("qtx11extras" ,qtx11extras)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (native-inputs
+       `(("cmake" ,cmake)
+         ("git" ,git)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("python-wrapper" ,python-wrapper)
+         ("qttools" ,qttools)
+         ("which" ,which)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fail.
+         #:configure-flags '("-DBUILD_TESTS=FALSE")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'go-to-source-dir
+             (lambda _ (chdir "sources/pyside2") #t))
+           (add-before 'configure 'set-clang-dir
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((clang (assoc-ref inputs "llvm-toolchain-6"))
+                     (libcxx (assoc-ref inputs "libcxx")))
+                 (setenv "CLANG_INSTALL_DIR" clang)
+                 (substitute* "cmake/Macros/PySideModules.cmake"
+                   (("--include-paths=")
+                    (string-append "--include-paths=" libcxx "/include/c++/v1:")))
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications")
+      (description
+       "The Qt for Python product enables the use of Qt5 APIs in Python
+applications.  It lets Python developers utilize the full potential of Qt,
+using the PySide2 module.  The PySide2 module provides access to the
+individual Qt modules such as QtCore, QtGui,and so on.  Qt for Python also
+comes with the Shiboken2 CPython binding code generator, which can be used to
+generate Python bindings for your C or C++ code.")
+      ;; Help!
+      (license
+       `(,license:fdl1.3+
+         ,license:gpl2+
+         ,license:gpl3+
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
+         ,license:lgpl3)))))
-- 
2.23.0


[-- Attachment #6: 0003-gnu-Add-python-shiboken-2.patch --]
[-- Type: text/x-patch, Size: 4212 bytes --]

From 949094424f6b27c66ec2311e9dcf9743a5909f83 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 09:13:50 -0700
Subject: [PATCH 03/10] gnu: Add python-shiboken-2.

* gnu/packages/qt.scm (python-shiboken-2): New variable.
---
 gnu/packages/llvm.scm |  1 -
 gnu/packages/qt.scm   | 54 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 19d5f63fd6..938f6b3518 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -724,4 +724,3 @@ using @code{clang-rename}.")))
            %build-inputs))
          #t)))
     (license license:ncsa)))
-
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 52eb46cce0..4ccb8a84b2 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +39,9 @@
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages databases)
@@ -54,6 +57,7 @@
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages pciutils)
@@ -67,6 +71,7 @@
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages vulkan)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
@@ -2277,3 +2282,52 @@ user-friendly than the default @code{QColorDialog} and several other
 color-related widgets.")
       ;; Includes a license exception for combining with GPL2 code.
       (license license:lgpl3+))))
+
+(define-public python-shiboken-2
+  (let ((revision "1")
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-shiboken-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               ;; The latest versions of Shiboken live in the pyside repo.
+               ;; There is another standalone repo only for Shiboken
+               ;; but it is outdated
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("python-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fails
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'use-shiboken-dir-only
+             (lambda _ (chdir "sources/shiboken2") #t))
+           (add-before 'configure 'set-build-env
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((llvm (assoc-ref inputs "llvm-toolchain-6")))
+                 (setenv "CLANG_INSTALL_DIR" llvm)
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      (description
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      ;; Help!
+      (license `(,license:gpl2+
+                 ,license:llgpl)))))
-- 
2.23.0


[-- Attachment #7: 0006-gnu-Add-python-pyside-2-tools.patch --]
[-- Type: text/x-patch, Size: 1918 bytes --]

From 3560f20f8e67ef4e716cd7c4c5150468bac36c2b Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 18:49:08 -0700
Subject: [PATCH 06/10] gnu: Add python-pyside-2-tools.

* gnu/packages/qt.scm (python-pyside-2-tools): New variable.
---
 gnu/packages/qt.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 63c8fc7da3..84736ecd11 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2411,3 +2411,35 @@ generate Python bindings for your C or C++ code.")
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
          ,license:lgpl3)))))
+
+(define-public python-pyside-2-tools
+  (let ((revision "1")
+        (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
+    (package
+      (name "python-pyside-2-tools")
+      (version (git-version "v5.11.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2" ,python-pyside-2)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("qtbase" ,qtbase)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Contains command line tools for PySide2")
+      (description
+       "Contains lupdate, rcc and uic tools for PySide2")
+      ;; Help! (This is from arch)
+      (license license:lgpl2.1+))))
-- 
2.23.0


[-- Attachment #8: 0008-gnu-Add-libarea.patch --]
[-- Type: text/x-patch, Size: 2650 bytes --]

From 24cafe91df8898c44c3df4a4b05fc14cbaae5de9 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:03:38 -0700
Subject: [PATCH 08/10] gnu: Add libarea.

* gnu/packages/engineering.scm (libarea): New variable.
---
 gnu/packages/engineering.scm | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index e1f3f043d4..343f4b758b 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -50,6 +50,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -2111,6 +2112,47 @@ engineers for reverse engineers.")
     (license (list license:cc-by-sa3.0  ;the "Iconic" icon set
                    license:gpl3+))))    ;everything else
 
+(define-public libarea
+  (let ((revision "1")
+        (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
+    (package
+      (name "libarea")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url "https://github.com/Heeks/libarea.git")
+                             (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
+      (build-system gnu-build-system)
+      (inputs `(("boost" ,boost)
+                ("python-wrapper" ,python-wrapper)))
+      (native-inputs
+       `(("cmake" ,cmake)))
+      (arguments
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'configure 'cmake-configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (cmake (assoc-ref inputs "cmake")))
+                 (mkdir-p "build")
+                 (invoke "cmake"
+                         (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
+           (delete 'configure))))
+      (home-page "https://github.com/Heeks/libarea")
+      (synopsis
+       "Library and python module for pocketing and profiling operations")
+      (description
+       "Area is a CAM-related software for pocketing operation.
+
+This project provides library and associated python-module to compute pocket
+operations.")
+      (license license:gpl3+))))
+
 (define-public libspnav
   (package
     (name "libspnav")
-- 
2.23.0


[-- Attachment #9: 0009-gnu-Add-libmedfile.patch --]
[-- Type: text/x-patch, Size: 2677 bytes --]

From 6b1e4a5fc45dd3a54d20aed62e141162de8ead9d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:13:17 -0700
Subject: [PATCH 09/10] gnu: Add libmedfile.

* gnu/packages/engineering.scm (libmedfile): New variable.
---
 gnu/packages/engineering.scm | 45 ++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 343f4b758b..50844b0163 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2112,6 +2112,51 @@ engineers for reverse engineers.")
     (license (list license:cc-by-sa3.0  ;the "Iconic" icon set
                    license:gpl3+))))    ;everything else
 
+(define-public libmedfile
+  (package
+    (name "libmedfile")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://files.salome-platform.org/Salome/other/med-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
+    (build-system cmake-build-system)
+    (inputs `(("hdf5" ,hdf5-1.10)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-test-output
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file-recursively
+                (string-append out "/bin/testc"))
+               #t))))))
+    (home-page "https://www.salome-platform.org")
+    (synopsis "Library to read and write MED files")
+    (description
+     "The purpose of the MED module is to provide a standard for storing and
+recovering computer data associated to numerical meshes and fields, and to
+facilitate the exchange between codes and solvers.
+
+The persistent data storage is based upon HDF format (like CGNS, a standard
+developed by Boeing and NASA in the area of Computational Fluid Dynamic).
+
+MED also provides structures to hold data on meshes and fields. These
+structures are exchanged between solvers, hide the communication level (CORBA
+or MPI), and offer persistence (read/write in .med files).
+
+The main benefit of a common exchange format is reduced complexity of code
+coupling. It also allows sharing such high level functionalities as
+computation of nodal connectivity of sub-elements (faces and edges),
+arithmetic operations on fields, entity location functionalities, and
+interpolation toolkit.")
+    (license license:gpl3+)))
+
 (define-public libarea
   (let ((revision "1")
         (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
-- 
2.23.0


[-- Attachment #10: 0010-gnu-Add-freecad.patch --]
[-- Type: text/x-patch, Size: 5278 bytes --]

From 00391db58cb5a2d14c16a8e294b75567c92d2a4f Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:32:10 -0700
Subject: [PATCH 10/10] gnu: Add freecad.

* gnu/packages/engineering.scm (freecad): New variable.
---
 gnu/packages/engineering.scm | 88 +++++++++++++++++++++++++++++++++++-
 1 file changed, 87 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 50844b0163..296315417c 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -54,6 +54,7 @@
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages fpga)
@@ -66,10 +67,13 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
@@ -90,6 +94,7 @@
   #:use-module (gnu packages tex)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
 (define-public librecad
@@ -836,7 +841,7 @@ language.")
          ("libngspice" ,libngspice)
          ("libsm" ,libsm)
          ("mesa" ,mesa)
-         ("opencascade-oce" ,opencascade-oce)
+         ("opencascade-occt" ,opencascade-occt)
          ("openssl" ,openssl)
          ("python" ,python-2)
          ("wxwidgets" ,wxwidgets-gtk2)
@@ -2112,6 +2117,87 @@ engineers for reverse engineers.")
     (license (list license:cc-by-sa3.0  ;the "Iconic" icon set
                    license:gpl3+))))    ;everything else
 
+(define-public freecad
+  (let ((commit "3129ae4296e40ed20e7b3d460b86e6969acbe1c3")
+        (revision "1"))
+    (package
+      (name "freecad")
+      (version (git-version "0.18.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/FreeCAD/FreeCAD.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1ny29y0h8smg1bwi5yn4kcnyfprqh3v7v2z8837cmmhcwp8dr95m"))))
+      (build-system cmake-build-system)
+      (native-inputs
+       `(("doxygen" ,doxygen)
+         ("graphviz" ,graphviz)
+         ("qttools" ,qttools)
+         ("pkg-config" ,pkg-config)
+         ("swig" ,swig)))
+      (inputs
+       `(("boost" ,boost)
+         ("coin3D" ,coin3D)
+         ("eigen" ,eigen)
+         ("freetype" ,freetype)
+         ("glew" ,glew)
+         ("hdf5" ,hdf5)
+         ("libarea" ,libarea)
+         ("libspnav" ,libspnav)
+         ("libmedfile" ,libmedfile)
+         ("openmpi" ,openmpi)
+         ("opencascade-oce" ,opencascade-oce)
+         ("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-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtsvg" ,qtsvg)
+         ("qtx11extras" ,qtx11extras)
+         ("qtxmlpatterns" ,qtxmlpatterns)
+         ("qtwebkit" ,qtwebkit)
+         ("vtk" ,vtk)
+         ("xerces-c" ,xerces-c)
+         ("zlib" ,zlib)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags
+         (list
+          "-DBUILD_QT5=ON"
+          (string-append "-DCMAKE_INSTALL_LIBDIR="
+                         (assoc-ref %outputs "out") "/lib"))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'configure 'restore-pythonpath
+             (lambda _
+               (substitute* "src/Main/MainGui.cpp"
+                 (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
+               #t))
+           (add-after 'install 'wrap-pythonpath
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/FreeCAD")
+                   (list "PYTHONPATH"
+                         'prefix (list (getenv "PYTHONPATH")))))
+               #t)))))
+      (home-page "https://www.freecadweb.org/")
+      (synopsis "Your Own 3D Parametric Modeler")
+      (description
+       "FreeCAD is a general purpose feature-based, parametric 3D modeler for
+CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
+product design but also fits a wider range of uses in engineering, such as
+architecture or other engineering specialties.  It is 100% Open Source (LGPL2+
+license) and extremely modular, allowing for very advanced extension and
+customization.")
+      ;; Help!
+      (license license:lgpl2.1+))))
+
 (define-public libmedfile
   (package
     (name "libmedfile")
-- 
2.23.0


[-- Attachment #11: 0007-gnu-Add-libspnav.patch --]
[-- Type: text/x-patch, Size: 2531 bytes --]

From 69821078879e497bfec3d6ba1c7810aa8b62f4a4 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 19:05:37 -0700
Subject: [PATCH 07/10] gnu: Add libspnav.

* gnu/packages/engineering.scm (libspnav): New variable.
---
 gnu/packages/engineering.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index a1f222bed4..e1f3f043d4 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2019 Tim Stahel <swedneck@swedneck.xyz>
 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2109,3 +2110,38 @@ while keeping the user experience at mind.  Cutter is created by reverse
 engineers for reverse engineers.")
     (license (list license:cc-by-sa3.0  ;the "Iconic" icon set
                    license:gpl3+))))    ;everything else
+
+(define-public libspnav
+  (package
+    (name "libspnav")
+    (version "0.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://downloads.sourceforge.net/spacenav/libspnav-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "14qzbzpfdb0dfscj4n0g8h8n71fcmh0ix2c7nhldlpbagyxxgr3s"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libx11" ,libx11)))
+    (arguments `(#:tests? #f))
+    (home-page "http://spacenav.sourceforge.net/")
+    (synopsis
+     "Library for communicating with spacenavd or 3dxsrv")
+    (description
+     "The libspnav library is provided as a replacement of the magellan
+library.  It provides a cleaner, and more orthogonal interface.  libspnav
+supports both the original X11 protocol for communicating with the driver, and
+the new alternative non-X protocol.  Programs that choose to use the X11
+protocol, are automatically compatible with either the free spacenavd driver
+or the official 3dxserv, as if they were using the magellan SDK.
+
+Also, libspnav provides a magellan API wrapper on top of the new API.  So, any
+applications that were using the magellan library, can switch to libspnav
+without any changes.  And programmers that are familliar with the magellan API
+can continue using it with a free library without the restrictions of the
+official SDK.")
+    (license license:bsd-3)))
-- 
2.23.0


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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-03  5:22       ` John Soo
@ 2019-09-03 15:10         ` John Soo
  2019-09-03 19:45           ` Paul Garlick
  0 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-09-03 15:10 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 36440, Paul Garlick


[-- Attachment #1.1: Type: text/plain, Size: 4039 bytes --]

Hi all,

One quick update.  I fixed the freecad patch which included a bad change
and rebased on master of today.
QtWebKit succeeded this time and with opencascade-oce freecad builds and
runs.
Switching to opencascade-occt does not build. It fails with `ld: cannot
find -lXmu` when building the PartDesigner module.

Thanks again,

John

On Tue, Sep 3, 2019 at 5:22 AM John Soo <jsoo1@asu.edu> wrote:

> Hi Ludo, Jonathon, Bjorn, RIcardo, Paul  and everyone,
>
>
> * Paul:
> > One of the dependencies is OpenCASCADE.  You may wish to switch the
> > opencascade-oce input to opencascade-occt, which is now available.  See
> > commit 37dc29200c44adc0474476b8df46ed44e8a1d41a.  The occt version is
> > more up-to-date than the oce version.
>
> I just tried building opencascade-occt and there was a failure in the test
> suite: https://paste.debian.net/1098482/
> I did replace opencascade-oce with occt in the hopes that it will have
> better support in the future.
> There is also the issue of the bundled (though heavily patched) SMESH
> library. If I get some time soon, I can take another look at unbundling it.
>
> * Bjorn and Jonathon, about qtwebkit:
> > qtwebkit seems to fail on master as well and it needs long to build, so
> > I can't do it locally on my laptop:
> > It also seems that qtwebkit is failing to build in some cases for me now.
> > http://ci.guix.gnu.org/build/1488065/details
>
> I found qtwebkit failing for me, too, so I was unable to build freecad
> with the most recent patches. The dependencies build ok though.
>
> * Ricardo:
> > We do have a later version of HDF5: hdf5-1.10, that’s version 1.10.4.
> > Is this enough?
>
> Yes it is, I used hdf5-1.10 for libmedfile.
>
> > Do we really need SoQT?
>
> I removed SoQT and freecad build properly before qtwebkit failed.
>
> * Bjorn:
> > medfile: Is there a specific reason you chose 3.x, instead of the
> > available 4.0.0? If you, could you add a comment of why?
>
> I was using what amounted to the pre-release of v4. I replaced with the
> release version now that it is out.
>
> > License is GPLv3+
>
> I changed the license.
>
> >libarea: Also licensed under GPL v3 (files under "pocket" directory).
>
> I added this license instead
>
> * Johnathon:
> > - Maybe elaborate a bit more in the description, I have no idead what
> > "lupdate, rcc and uic" is :P
>
> I am sorry, I looked through the documentation and I don't know what they
> are.
>
> > - Is there a reason why we don't run the tests?
>
> I recently tried to run the tests for all of the pyside tools (shiboken2,
> pyside2, and pyside2-tools).
> All fail to find libcxx files. I did not have a lot of time to work on it,
> but I was successful in just using the official libcxx@6.X without tests.
> Strangely the issue only happens when building the tests.  I have added
> FIXME where appropriate.
> Previously I had a hand-rolled package strictly for the pyside2 toolchain
> which I removed.
>
> > - No newlines in the description after a sentence, just two whitespaces
> :)
>
> Thank you, I fill-paragraphed.
>
> > - description: What is a MED file?
>
> I added much more detail from the salome-platform Med documentation.
>
> > https://bitbucket.org/Coin3D/coin/downloads/
> > ...
> > This one:
> >
> https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/libspnav#n13
>
> I used the releases for coin3D and libspnav. I am worried now about coin3D
> because bitbucket is going to drop support for mercurial repos next year.
>
>
> * Some further notes:
> There are now several optional qt modules that are not correctly found
> when building pyside2.
> I am not sure if this is a bug with pyside or our packages.  The package
> builds properly and freecad runs, though (supposing opencascade-occt will
> work).
>
> All the patches are rebased to a pretty recent master (just a day or so
> ago). Thanks for all your help!
>
> - John
>
>
>
>
>
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 7803 bytes --]

[-- Attachment #2: 0001-gnu-Add-coin3D.patch --]
[-- Type: text/x-patch, Size: 2878 bytes --]

From dee0f37b105e58b3c05e7d6ff4738d47f42856bd Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 3 Jul 2019 09:40:31 -0700
Subject: [PATCH 01/10] gnu: Add coin3D.

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

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index b06a369325..4c1b9cf24f 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +75,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -1018,3 +1020,49 @@ requirements.")
 performance subdivision surface (subdiv) evaluation on massively parallel CPU
 and GPU architectures.")
     (license license:asl2.0)))
+
+(define-public coin3D
+  (package
+    (name "coin3D")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://bitbucket.org/Coin3D/coin/downloads/coin-"
+             version "-src.zip"))
+       (sha256
+        (base32
+         "1mqwlqzvc9ydfxi0bfskwlil16mbnkphfz36p0zl2mvw6h05aqh0"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (for-each delete-file
+                     '("cfg/csubst.exe"
+                       "cfg/wrapmsvc.exe"))
+           #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://bitbucket.org/Coin3D/coin/wiki/Home")
+    (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)))
-- 
2.23.0


[-- Attachment #3: 0002-gnu-Add-llvm-toolchain-6.patch --]
[-- Type: text/x-patch, Size: 2426 bytes --]

From 4db1ea8b81cddb753076f342de8c1afe1a8d28e1 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 08:34:24 -0700
Subject: [PATCH 02/10] gnu: Add llvm-toolchain-6.

* gnupackages/llvm.scm (llvm-toolchain-6): New variable.
---
 gnu/packages/llvm.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 9efb4a4841..19d5f63fd6 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,6 +38,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages bootstrap)           ;glibc-dynamic-linker
@@ -690,3 +692,36 @@ C/C++/Obj-C code according to a set of style options, see
     (synopsis "Rename every occurrence of a symbol using clang-rename")
     (description "This package renames every occurrence of a symbol at point
 using @code{clang-rename}.")))
+
+;; PySide2 docs recommend using a bundled version of libclang
+;; See https://wiki.qt.io/Qt_for_Python/GettingStarted
+;; The source they recommend: https://download.qt.io/development_releases/prebuilt/libclang/
+(define-public llvm-toolchain-6
+  (package
+    (inherit llvm-6)
+    (name "llvm-toolchain")
+    (build-system trivial-build-system)
+    (inputs
+     `(("clang-6" ,clang-6)
+       ("llvm-6" ,llvm-6)))
+    (arguments
+     `(#:modules ((guix build union)
+                  (guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build union)
+                      (ice-9 match)
+                      (srfi srfi-1))
+         (union-build
+          (assoc-ref %outputs "out")
+          (filter-map
+           (match-lambda
+             ((name . dir)
+              (if (or (string=? name "clang-6")
+                      (string=? name "llvm-6"))
+                  dir
+                  #f)))
+           %build-inputs))
+         #t)))
+    (license license:ncsa)))
+
-- 
2.23.0


[-- Attachment #4: 0005-gnu-Add-python-pyside-2.patch --]
[-- Type: text/x-patch, Size: 3953 bytes --]

From 5b74864be1690759141f5a971d11c2d5e4d889e3 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Mon, 2 Sep 2019 07:27:15 -0700
Subject: [PATCH 05/10] gnu: Add python-pyside-2.

 * gnu/packages/qt.scm (python-pyside-2): New variable.
---
 gnu/packages/qt.scm | 81 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index ce64ab5d09..2ad529dd19 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2332,3 +2332,84 @@ color-related widgets.")
       ;; Help!
       (license `(,license:gpl2+
                  ,license:llgpl)))))
+
+(define-public python-pyside-2
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-pyside-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("libcxx" ,libcxx-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("qtbase" ,qtbase)
+         ("qtdatavis3d" ,qtdatavis3d)
+         ("qtlocation" ,qtlocation)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtquickcontrols" ,qtquickcontrols)
+         ("qtscript" ,qtscript)
+         ("qtscxml" ,qtscxml)
+         ("qtsensors" ,qtsensors)
+         ("qtspeech" ,qtspeech)
+         ("qtsvg" ,qtsvg)
+         ("qtwebchannel" ,qtwebchannel)
+         ("qtwebsockets" ,qtwebsockets)
+         ("qtx11extras" ,qtx11extras)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (native-inputs
+       `(("cmake" ,cmake)
+         ("git" ,git)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("python-wrapper" ,python-wrapper)
+         ("qttools" ,qttools)
+         ("which" ,which)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fail.
+         #:configure-flags '("-DBUILD_TESTS=FALSE")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'go-to-source-dir
+             (lambda _ (chdir "sources/pyside2") #t))
+           (add-before 'configure 'set-clang-dir
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((clang (assoc-ref inputs "llvm-toolchain-6"))
+                     (libcxx (assoc-ref inputs "libcxx")))
+                 (setenv "CLANG_INSTALL_DIR" clang)
+                 (substitute* "cmake/Macros/PySideModules.cmake"
+                   (("--include-paths=")
+                    (string-append "--include-paths=" libcxx "/include/c++/v1:")))
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications")
+      (description
+       "The Qt for Python product enables the use of Qt5 APIs in Python
+applications.  It lets Python developers utilize the full potential of Qt,
+using the PySide2 module.  The PySide2 module provides access to the
+individual Qt modules such as QtCore, QtGui,and so on.  Qt for Python also
+comes with the Shiboken2 CPython binding code generator, which can be used to
+generate Python bindings for your C or C++ code.")
+      ;; Help!
+      (license
+       `(,license:fdl1.3+
+         ,license:gpl2+
+         ,license:gpl3+
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
+         ,license:lgpl3)))))
-- 
2.23.0


[-- Attachment #5: 0004-gnu-Add-libcxx-6.patch --]
[-- Type: text/x-patch, Size: 1430 bytes --]

From 73801611f8b878c442b220b06aa796063436936d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 11 Aug 2019 12:38:08 -0700
Subject: [PATCH 04/10] gnu: Add libcxx-6

* gnu/packages/llvm.scm (libcxx-6): New variable.
---
 gnu/packages/llvm.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 19d5f63fd6..0425591e50 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -442,6 +442,27 @@ with that of libgomp, the GNU Offloading and Multi Processing Library.")
                    "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w"
                    #:patches '("clang-6.0-libc-search-path.patch")))
 
+(define-public libcxx-6
+  (package
+    (inherit libcxx)
+    (name "libcxx")
+    (version (package-version llvm-6))
+    (source
+     (origin
+       (inherit (package-source libcxx))
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/libcxx-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)))
+    (synopsis
+     "Libcxx files specifically used by PySide2")
+    (description
+     "Libcxx files specifically used by PySide2.")))
+
 (define-public llvm-3.9.1
   (package (inherit llvm)
     (name "llvm")
-- 
2.23.0


[-- Attachment #6: 0003-gnu-Add-python-shiboken-2.patch --]
[-- Type: text/x-patch, Size: 3946 bytes --]

From 04945ef3be3a7c1d006e752e0a21f946c9bf06e6 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 09:13:50 -0700
Subject: [PATCH 03/10] gnu: Add python-shiboken-2.

* gnu/packages/qt.scm (python-shiboken-2): New variable.
---
 gnu/packages/qt.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 52eb46cce0..ce64ab5d09 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +39,9 @@
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages databases)
@@ -54,6 +57,7 @@
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages pciutils)
@@ -67,6 +71,7 @@
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages vulkan)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
@@ -2277,3 +2282,53 @@ user-friendly than the default @code{QColorDialog} and several other
 color-related widgets.")
       ;; Includes a license exception for combining with GPL2 code.
       (license license:lgpl3+))))
+
+(define-public python-shiboken-2
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-shiboken-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               ;; The latest versions of Shiboken live in the pyside repo.
+               ;; There is another standalone repo only for Shiboken
+               ;; but it is outdated
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("python-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fails
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'use-shiboken-dir-only
+             (lambda _ (chdir "sources/shiboken2") #t))
+           (add-before 'configure 'set-build-env
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((llvm (assoc-ref inputs "llvm-toolchain-6")))
+                 (setenv "CLANG_INSTALL_DIR" llvm)
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      (description
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      ;; Help!
+      (license `(,license:gpl2+
+                 ,license:llgpl)))))
-- 
2.23.0


[-- Attachment #7: 0006-gnu-Add-python-pyside-2-tools.patch --]
[-- Type: text/x-patch, Size: 1977 bytes --]

From 5ae82affcec8f78164b687f28daea8c028477eb1 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 18:49:08 -0700
Subject: [PATCH 06/10] gnu: Add python-pyside-2-tools.

* gnu/packages/qt.scm (python-pyside-2-tools): 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 2ad529dd19..a76e023fb6 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2413,3 +2413,36 @@ generate Python bindings for your C or C++ code.")
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
          ,license:lgpl3)))))
+
+(define-public python-pyside-2-tools
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
+    (package
+      (name "python-pyside-2-tools")
+      (version (git-version "v5.11.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2" ,python-pyside-2)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("qtbase" ,qtbase)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Contains command line tools for PySide2")
+      (description
+       "Contains lupdate, rcc and uic tools for PySide2")
+      ;; Help! (This is from arch)
+      (license license:lgpl2.1+))))
-- 
2.23.0


[-- Attachment #8: 0008-gnu-Add-libarea.patch --]
[-- Type: text/x-patch, Size: 2632 bytes --]

From 606613bf4d3fff71921a6ec22542c9e96620661a Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:03:38 -0700
Subject: [PATCH 08/10] gnu: Add libarea.

* gnu/packages/engineering.scm (libarea): New variable.
---
 gnu/packages/engineering.scm | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 9ef985b9f9..cd74c73d7e 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -51,6 +51,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -2147,6 +2148,47 @@ specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
 
+(define-public libarea
+  (let ((revision "1")
+        (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
+    (package
+      (name "libarea")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url "https://github.com/Heeks/libarea.git")
+                             (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
+      (build-system gnu-build-system)
+      (inputs `(("boost" ,boost)
+                ("python-wrapper" ,python-wrapper)))
+      (native-inputs
+       `(("cmake" ,cmake)))
+      (arguments
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'configure 'cmake-configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (cmake (assoc-ref inputs "cmake")))
+                 (mkdir-p "build")
+                 (invoke "cmake"
+                         (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
+           (delete 'configure))))
+      (home-page "https://github.com/Heeks/libarea")
+      (synopsis
+       "Library and python module for pocketing and profiling operations")
+      (description
+       "Area is a CAM-related software for pocketing operation.
+
+This project provides library and associated python-module to compute pocket
+operations.")
+      (license license:gpl3+))))
+
 (define-public libspnav
   (package
     (name "libspnav")
-- 
2.23.0


[-- Attachment #9: 0009-gnu-Add-libmedfile.patch --]
[-- Type: text/x-patch, Size: 2659 bytes --]

From 6cb467285036bcd3eedd304d2491bf62fe2f881d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:13:17 -0700
Subject: [PATCH 09/10] gnu: Add libmedfile.

* gnu/packages/engineering.scm (libmedfile): New variable.
---
 gnu/packages/engineering.scm | 45 ++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index cd74c73d7e..5dd50cef3a 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2148,6 +2148,51 @@ specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
 
+(define-public libmedfile
+  (package
+    (name "libmedfile")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://files.salome-platform.org/Salome/other/med-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
+    (build-system cmake-build-system)
+    (inputs `(("hdf5" ,hdf5-1.10)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-test-output
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file-recursively
+                (string-append out "/bin/testc"))
+               #t))))))
+    (home-page "https://www.salome-platform.org")
+    (synopsis "Library to read and write MED files")
+    (description
+     "The purpose of the MED module is to provide a standard for storing and
+recovering computer data associated to numerical meshes and fields, and to
+facilitate the exchange between codes and solvers.
+
+The persistent data storage is based upon HDF format (like CGNS, a standard
+developed by Boeing and NASA in the area of Computational Fluid Dynamic).
+
+MED also provides structures to hold data on meshes and fields. These
+structures are exchanged between solvers, hide the communication level (CORBA
+or MPI), and offer persistence (read/write in .med files).
+
+The main benefit of a common exchange format is reduced complexity of code
+coupling. It also allows sharing such high level functionalities as
+computation of nodal connectivity of sub-elements (faces and edges),
+arithmetic operations on fields, entity location functionalities, and
+interpolation toolkit.")
+    (license license:gpl3+)))
+
 (define-public libarea
   (let ((revision "1")
         (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
-- 
2.23.0


[-- Attachment #10: 0010-gnu-Add-freecad.patch --]
[-- Type: text/x-patch, Size: 4673 bytes --]

From 1168809afd35794f0d97d1845b5885ffca63cb85 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:32:10 -0700
Subject: [PATCH 10/10] gnu: Add freecad.

* gnu/packages/engineering.scm (freecad): New variable.
---
 gnu/packages/engineering.scm | 84 ++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5dd50cef3a..eb016f8771 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -55,6 +55,7 @@
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages fpga)
@@ -67,10 +68,13 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
@@ -91,6 +95,7 @@
   #:use-module (gnu packages tex)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
 (define-public librecad
@@ -2148,6 +2153,85 @@ specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
 
+(define-public freecad
+  (package
+    (name "freecad")
+    (version "0.18.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/FreeCAD/FreeCAD.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1ny29y0h8smg1bwi5yn4kcnyfprqh3v7v2z8837cmmhcwp8dr95m"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("graphviz" ,graphviz)
+       ("qttools" ,qttools)
+       ("pkg-config" ,pkg-config)
+       ("swig" ,swig)))
+    (inputs
+     `(("boost" ,boost)
+       ("coin3D" ,coin3D)
+       ("eigen" ,eigen)
+       ("freetype" ,freetype)
+       ("glew" ,glew)
+       ("hdf5" ,hdf5-1.10)
+       ("libarea" ,libarea)
+       ("libspnav" ,libspnav)
+       ("libmedfile" ,libmedfile)
+       ("openmpi" ,openmpi)
+       ("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-wrapper" ,python-wrapper)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
+       ("qtx11extras" ,qtx11extras)
+       ("qtxmlpatterns" ,qtxmlpatterns)
+       ("qtwebkit" ,qtwebkit)
+       ("vtk" ,vtk)
+       ("xerces-c" ,xerces-c)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       (list
+        "-DBUILD_QT5=ON"
+        (string-append "-DCMAKE_INSTALL_LIBDIR="
+                       (assoc-ref %outputs "out") "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'restore-pythonpath
+           (lambda _
+             (substitute* "src/Main/MainGui.cpp"
+               (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
+             #t))
+         (add-after 'install 'wrap-pythonpath
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/FreeCAD")
+                 (list "PYTHONPATH"
+                       'prefix (list (getenv "PYTHONPATH")))))
+             #t)))))
+    (home-page "https://www.freecadweb.org/")
+    (synopsis "Your Own 3D Parametric Modeler")
+    (description
+     "FreeCAD is a general purpose feature-based, parametric 3D modeler for
+CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
+product design but also fits a wider range of uses in engineering, such as
+architecture or other engineering specialties.  It is 100% Open Source (LGPL2+
+license) and extremely modular, allowing for very advanced extension and
+customization.")
+    ;; Help!
+    (license license:lgpl2.1+)))
+
 (define-public libmedfile
   (package
     (name "libmedfile")
-- 
2.23.0


[-- Attachment #11: 0007-gnu-Add-libspnav.patch --]
[-- Type: text/x-patch, Size: 2501 bytes --]

From 6149b0d87f87eee79372c8e95e62dcde945f048a Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 19:05:37 -0700
Subject: [PATCH 07/10] gnu: Add libspnav.

* gnu/packages/engineering.scm (libspnav): New variable.
---
 gnu/packages/engineering.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 54bf5a7b69..9ef985b9f9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2019 Tim Stahel <swedneck@swedneck.xyz>
 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2145,3 +2146,38 @@ well as conversion and validation tools for input and output data.  The
 specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
+
+(define-public libspnav
+  (package
+    (name "libspnav")
+    (version "0.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://downloads.sourceforge.net/spacenav/libspnav-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "14qzbzpfdb0dfscj4n0g8h8n71fcmh0ix2c7nhldlpbagyxxgr3s"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libx11" ,libx11)))
+    (arguments `(#:tests? #f))
+    (home-page "http://spacenav.sourceforge.net/")
+    (synopsis
+     "Library for communicating with spacenavd or 3dxsrv")
+    (description
+     "The libspnav library is provided as a replacement of the magellan
+library.  It provides a cleaner, and more orthogonal interface.  libspnav
+supports both the original X11 protocol for communicating with the driver, and
+the new alternative non-X protocol.  Programs that choose to use the X11
+protocol, are automatically compatible with either the free spacenavd driver
+or the official 3dxserv, as if they were using the magellan SDK.
+
+Also, libspnav provides a magellan API wrapper on top of the new API.  So, any
+applications that were using the magellan library, can switch to libspnav
+without any changes.  And programmers that are familliar with the magellan API
+can continue using it with a free library without the restrictions of the
+official SDK.")
+    (license license:bsd-3)))
-- 
2.23.0


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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-03 15:10         ` John Soo
@ 2019-09-03 19:45           ` Paul Garlick
  2019-09-04  5:44             ` John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: Paul Garlick @ 2019-09-03 19:45 UTC (permalink / raw)
  To: John Soo, Ludovic Courtès; +Cc: 36440

Hi John,

> Switching to opencascade-occt does not build. It fails with `ld:
> cannot find -lXmu` when building the PartDesigner module.

libxmu is one of the opencascade-occt dependencies.  It might make
sense to propagate this input in the opencascade-occt package
definition.

Could you test whether FreeCAD builds successfully with a libxmu input?
There may be other dependencies that need to be propagated too.

Best regards,

Paul.

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-03 19:45           ` Paul Garlick
@ 2019-09-04  5:44             ` John Soo
  2019-09-04  5:47               ` John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-09-04  5:44 UTC (permalink / raw)
  To: Paul Garlick; +Cc: 36440


[-- Attachment #1.1: Type: text/plain, Size: 1124 bytes --]

Hi Paul and everyone,

I added libxmu and libxi as inputs and that gets progress. I am not sure
whether we want to propagate them from opencascade-occt though. I can see
either way working well.

Now there is this error when building:

/tmp/guix-build-freecad-0.18.3.drv-0/source/src/Mod/Import/App/ImportOCAF.cpp:100:30:
fatal error: tbb/parallel_for.h: No such file or directory compilation
terminated.
make[2]: *** [src/Mod/Import/App/CMakeFiles/Import.dir/build.make:114:
src/Mod/Import/App/CMakeFiles/Import.dir/ImportOCAF.cpp.o] Error 1

Thanks again,

John


On Tue, Sep 3, 2019 at 7:45 PM Paul Garlick <
pgarlick@tourbillion-technology.com> wrote:

> Hi John,
>
> > Switching to opencascade-occt does not build. It fails with `ld:
> > cannot find -lXmu` when building the PartDesigner module.
>
> libxmu is one of the opencascade-occt dependencies.  It might make
> sense to propagate this input in the opencascade-occt package
> definition.
>
> Could you test whether FreeCAD builds successfully with a libxmu input?
> There may be other dependencies that need to be propagated too.
>
> Best regards,
>
> Paul.
>
>

[-- Attachment #1.2: Type: text/html, Size: 1645 bytes --]

[-- Attachment #2: 0001-gnu-Add-coin3D.patch --]
[-- Type: text/x-patch, Size: 2878 bytes --]

From dee0f37b105e58b3c05e7d6ff4738d47f42856bd Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 3 Jul 2019 09:40:31 -0700
Subject: [PATCH 01/10] gnu: Add coin3D.

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

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index b06a369325..4c1b9cf24f 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +75,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -1018,3 +1020,49 @@ requirements.")
 performance subdivision surface (subdiv) evaluation on massively parallel CPU
 and GPU architectures.")
     (license license:asl2.0)))
+
+(define-public coin3D
+  (package
+    (name "coin3D")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://bitbucket.org/Coin3D/coin/downloads/coin-"
+             version "-src.zip"))
+       (sha256
+        (base32
+         "1mqwlqzvc9ydfxi0bfskwlil16mbnkphfz36p0zl2mvw6h05aqh0"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (for-each delete-file
+                     '("cfg/csubst.exe"
+                       "cfg/wrapmsvc.exe"))
+           #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://bitbucket.org/Coin3D/coin/wiki/Home")
+    (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)))
-- 
2.23.0


[-- Attachment #3: 0002-gnu-Add-llvm-toolchain-6.patch --]
[-- Type: text/x-patch, Size: 2426 bytes --]

From 4db1ea8b81cddb753076f342de8c1afe1a8d28e1 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 08:34:24 -0700
Subject: [PATCH 02/10] gnu: Add llvm-toolchain-6.

* gnupackages/llvm.scm (llvm-toolchain-6): New variable.
---
 gnu/packages/llvm.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 9efb4a4841..19d5f63fd6 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,6 +38,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages bootstrap)           ;glibc-dynamic-linker
@@ -690,3 +692,36 @@ C/C++/Obj-C code according to a set of style options, see
     (synopsis "Rename every occurrence of a symbol using clang-rename")
     (description "This package renames every occurrence of a symbol at point
 using @code{clang-rename}.")))
+
+;; PySide2 docs recommend using a bundled version of libclang
+;; See https://wiki.qt.io/Qt_for_Python/GettingStarted
+;; The source they recommend: https://download.qt.io/development_releases/prebuilt/libclang/
+(define-public llvm-toolchain-6
+  (package
+    (inherit llvm-6)
+    (name "llvm-toolchain")
+    (build-system trivial-build-system)
+    (inputs
+     `(("clang-6" ,clang-6)
+       ("llvm-6" ,llvm-6)))
+    (arguments
+     `(#:modules ((guix build union)
+                  (guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build union)
+                      (ice-9 match)
+                      (srfi srfi-1))
+         (union-build
+          (assoc-ref %outputs "out")
+          (filter-map
+           (match-lambda
+             ((name . dir)
+              (if (or (string=? name "clang-6")
+                      (string=? name "llvm-6"))
+                  dir
+                  #f)))
+           %build-inputs))
+         #t)))
+    (license license:ncsa)))
+
-- 
2.23.0


[-- Attachment #4: 0003-gnu-Add-python-shiboken-2.patch --]
[-- Type: text/x-patch, Size: 3946 bytes --]

From 04945ef3be3a7c1d006e752e0a21f946c9bf06e6 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 09:13:50 -0700
Subject: [PATCH 03/10] gnu: Add python-shiboken-2.

* gnu/packages/qt.scm (python-shiboken-2): New variable.
---
 gnu/packages/qt.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 52eb46cce0..ce64ab5d09 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +39,9 @@
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages databases)
@@ -54,6 +57,7 @@
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages pciutils)
@@ -67,6 +71,7 @@
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages vulkan)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
@@ -2277,3 +2282,53 @@ user-friendly than the default @code{QColorDialog} and several other
 color-related widgets.")
       ;; Includes a license exception for combining with GPL2 code.
       (license license:lgpl3+))))
+
+(define-public python-shiboken-2
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-shiboken-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               ;; The latest versions of Shiboken live in the pyside repo.
+               ;; There is another standalone repo only for Shiboken
+               ;; but it is outdated
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("python-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fails
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'use-shiboken-dir-only
+             (lambda _ (chdir "sources/shiboken2") #t))
+           (add-before 'configure 'set-build-env
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((llvm (assoc-ref inputs "llvm-toolchain-6")))
+                 (setenv "CLANG_INSTALL_DIR" llvm)
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      (description
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      ;; Help!
+      (license `(,license:gpl2+
+                 ,license:llgpl)))))
-- 
2.23.0


[-- Attachment #5: 0005-gnu-Add-python-pyside-2.patch --]
[-- Type: text/x-patch, Size: 3953 bytes --]

From 5b74864be1690759141f5a971d11c2d5e4d889e3 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Mon, 2 Sep 2019 07:27:15 -0700
Subject: [PATCH 05/10] gnu: Add python-pyside-2.

 * gnu/packages/qt.scm (python-pyside-2): New variable.
---
 gnu/packages/qt.scm | 81 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index ce64ab5d09..2ad529dd19 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2332,3 +2332,84 @@ color-related widgets.")
       ;; Help!
       (license `(,license:gpl2+
                  ,license:llgpl)))))
+
+(define-public python-pyside-2
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-pyside-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("libcxx" ,libcxx-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("qtbase" ,qtbase)
+         ("qtdatavis3d" ,qtdatavis3d)
+         ("qtlocation" ,qtlocation)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtquickcontrols" ,qtquickcontrols)
+         ("qtscript" ,qtscript)
+         ("qtscxml" ,qtscxml)
+         ("qtsensors" ,qtsensors)
+         ("qtspeech" ,qtspeech)
+         ("qtsvg" ,qtsvg)
+         ("qtwebchannel" ,qtwebchannel)
+         ("qtwebsockets" ,qtwebsockets)
+         ("qtx11extras" ,qtx11extras)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (native-inputs
+       `(("cmake" ,cmake)
+         ("git" ,git)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("python-wrapper" ,python-wrapper)
+         ("qttools" ,qttools)
+         ("which" ,which)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fail.
+         #:configure-flags '("-DBUILD_TESTS=FALSE")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'go-to-source-dir
+             (lambda _ (chdir "sources/pyside2") #t))
+           (add-before 'configure 'set-clang-dir
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((clang (assoc-ref inputs "llvm-toolchain-6"))
+                     (libcxx (assoc-ref inputs "libcxx")))
+                 (setenv "CLANG_INSTALL_DIR" clang)
+                 (substitute* "cmake/Macros/PySideModules.cmake"
+                   (("--include-paths=")
+                    (string-append "--include-paths=" libcxx "/include/c++/v1:")))
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications")
+      (description
+       "The Qt for Python product enables the use of Qt5 APIs in Python
+applications.  It lets Python developers utilize the full potential of Qt,
+using the PySide2 module.  The PySide2 module provides access to the
+individual Qt modules such as QtCore, QtGui,and so on.  Qt for Python also
+comes with the Shiboken2 CPython binding code generator, which can be used to
+generate Python bindings for your C or C++ code.")
+      ;; Help!
+      (license
+       `(,license:fdl1.3+
+         ,license:gpl2+
+         ,license:gpl3+
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
+         ,license:lgpl3)))))
-- 
2.23.0


[-- Attachment #6: 0004-gnu-Add-libcxx-6.patch --]
[-- Type: text/x-patch, Size: 1430 bytes --]

From 73801611f8b878c442b220b06aa796063436936d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 11 Aug 2019 12:38:08 -0700
Subject: [PATCH 04/10] gnu: Add libcxx-6

* gnu/packages/llvm.scm (libcxx-6): New variable.
---
 gnu/packages/llvm.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 19d5f63fd6..0425591e50 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -442,6 +442,27 @@ with that of libgomp, the GNU Offloading and Multi Processing Library.")
                    "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w"
                    #:patches '("clang-6.0-libc-search-path.patch")))
 
+(define-public libcxx-6
+  (package
+    (inherit libcxx)
+    (name "libcxx")
+    (version (package-version llvm-6))
+    (source
+     (origin
+       (inherit (package-source libcxx))
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/libcxx-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)))
+    (synopsis
+     "Libcxx files specifically used by PySide2")
+    (description
+     "Libcxx files specifically used by PySide2.")))
+
 (define-public llvm-3.9.1
   (package (inherit llvm)
     (name "llvm")
-- 
2.23.0


[-- Attachment #7: 0007-gnu-Add-libspnav.patch --]
[-- Type: text/x-patch, Size: 2501 bytes --]

From 6149b0d87f87eee79372c8e95e62dcde945f048a Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 19:05:37 -0700
Subject: [PATCH 07/10] gnu: Add libspnav.

* gnu/packages/engineering.scm (libspnav): New variable.
---
 gnu/packages/engineering.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 54bf5a7b69..9ef985b9f9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2019 Tim Stahel <swedneck@swedneck.xyz>
 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2145,3 +2146,38 @@ well as conversion and validation tools for input and output data.  The
 specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
+
+(define-public libspnav
+  (package
+    (name "libspnav")
+    (version "0.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://downloads.sourceforge.net/spacenav/libspnav-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "14qzbzpfdb0dfscj4n0g8h8n71fcmh0ix2c7nhldlpbagyxxgr3s"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libx11" ,libx11)))
+    (arguments `(#:tests? #f))
+    (home-page "http://spacenav.sourceforge.net/")
+    (synopsis
+     "Library for communicating with spacenavd or 3dxsrv")
+    (description
+     "The libspnav library is provided as a replacement of the magellan
+library.  It provides a cleaner, and more orthogonal interface.  libspnav
+supports both the original X11 protocol for communicating with the driver, and
+the new alternative non-X protocol.  Programs that choose to use the X11
+protocol, are automatically compatible with either the free spacenavd driver
+or the official 3dxserv, as if they were using the magellan SDK.
+
+Also, libspnav provides a magellan API wrapper on top of the new API.  So, any
+applications that were using the magellan library, can switch to libspnav
+without any changes.  And programmers that are familliar with the magellan API
+can continue using it with a free library without the restrictions of the
+official SDK.")
+    (license license:bsd-3)))
-- 
2.23.0


[-- Attachment #8: 0006-gnu-Add-python-pyside-2-tools.patch --]
[-- Type: text/x-patch, Size: 1977 bytes --]

From 5ae82affcec8f78164b687f28daea8c028477eb1 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 18:49:08 -0700
Subject: [PATCH 06/10] gnu: Add python-pyside-2-tools.

* gnu/packages/qt.scm (python-pyside-2-tools): 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 2ad529dd19..a76e023fb6 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2413,3 +2413,36 @@ generate Python bindings for your C or C++ code.")
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
          ,license:lgpl3)))))
+
+(define-public python-pyside-2-tools
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
+    (package
+      (name "python-pyside-2-tools")
+      (version (git-version "v5.11.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2" ,python-pyside-2)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("qtbase" ,qtbase)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Contains command line tools for PySide2")
+      (description
+       "Contains lupdate, rcc and uic tools for PySide2")
+      ;; Help! (This is from arch)
+      (license license:lgpl2.1+))))
-- 
2.23.0


[-- Attachment #9: 0008-gnu-Add-libarea.patch --]
[-- Type: text/x-patch, Size: 2632 bytes --]

From 606613bf4d3fff71921a6ec22542c9e96620661a Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:03:38 -0700
Subject: [PATCH 08/10] gnu: Add libarea.

* gnu/packages/engineering.scm (libarea): New variable.
---
 gnu/packages/engineering.scm | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 9ef985b9f9..cd74c73d7e 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -51,6 +51,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -2147,6 +2148,47 @@ specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
 
+(define-public libarea
+  (let ((revision "1")
+        (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
+    (package
+      (name "libarea")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url "https://github.com/Heeks/libarea.git")
+                             (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
+      (build-system gnu-build-system)
+      (inputs `(("boost" ,boost)
+                ("python-wrapper" ,python-wrapper)))
+      (native-inputs
+       `(("cmake" ,cmake)))
+      (arguments
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'configure 'cmake-configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (cmake (assoc-ref inputs "cmake")))
+                 (mkdir-p "build")
+                 (invoke "cmake"
+                         (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
+           (delete 'configure))))
+      (home-page "https://github.com/Heeks/libarea")
+      (synopsis
+       "Library and python module for pocketing and profiling operations")
+      (description
+       "Area is a CAM-related software for pocketing operation.
+
+This project provides library and associated python-module to compute pocket
+operations.")
+      (license license:gpl3+))))
+
 (define-public libspnav
   (package
     (name "libspnav")
-- 
2.23.0


[-- Attachment #10: 0009-gnu-Add-libmedfile.patch --]
[-- Type: text/x-patch, Size: 2659 bytes --]

From 6cb467285036bcd3eedd304d2491bf62fe2f881d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:13:17 -0700
Subject: [PATCH 09/10] gnu: Add libmedfile.

* gnu/packages/engineering.scm (libmedfile): New variable.
---
 gnu/packages/engineering.scm | 45 ++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index cd74c73d7e..5dd50cef3a 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2148,6 +2148,51 @@ specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
 
+(define-public libmedfile
+  (package
+    (name "libmedfile")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://files.salome-platform.org/Salome/other/med-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
+    (build-system cmake-build-system)
+    (inputs `(("hdf5" ,hdf5-1.10)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-test-output
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file-recursively
+                (string-append out "/bin/testc"))
+               #t))))))
+    (home-page "https://www.salome-platform.org")
+    (synopsis "Library to read and write MED files")
+    (description
+     "The purpose of the MED module is to provide a standard for storing and
+recovering computer data associated to numerical meshes and fields, and to
+facilitate the exchange between codes and solvers.
+
+The persistent data storage is based upon HDF format (like CGNS, a standard
+developed by Boeing and NASA in the area of Computational Fluid Dynamic).
+
+MED also provides structures to hold data on meshes and fields. These
+structures are exchanged between solvers, hide the communication level (CORBA
+or MPI), and offer persistence (read/write in .med files).
+
+The main benefit of a common exchange format is reduced complexity of code
+coupling. It also allows sharing such high level functionalities as
+computation of nodal connectivity of sub-elements (faces and edges),
+arithmetic operations on fields, entity location functionalities, and
+interpolation toolkit.")
+    (license license:gpl3+)))
+
 (define-public libarea
   (let ((revision "1")
         (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
-- 
2.23.0


[-- Attachment #11: 0010-gnu-Add-freecad.patch --]
[-- Type: text/x-patch, Size: 4725 bytes --]

From 5196710f4fcec44fa93ea1f061dc6057b7bdc0a7 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:32:10 -0700
Subject: [PATCH 10/10] gnu: Add freecad.

* gnu/packages/engineering.scm (freecad): New variable.
---
 gnu/packages/engineering.scm | 86 ++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5dd50cef3a..627ce5e22c 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -55,6 +55,7 @@
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages fpga)
@@ -67,10 +68,13 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
@@ -91,6 +95,7 @@
   #:use-module (gnu packages tex)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
 (define-public librecad
@@ -2148,6 +2153,87 @@ specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
 
+(define-public freecad
+  (package
+    (name "freecad")
+    (version "0.18.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/FreeCAD/FreeCAD.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1ny29y0h8smg1bwi5yn4kcnyfprqh3v7v2z8837cmmhcwp8dr95m"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("graphviz" ,graphviz)
+       ("qttools" ,qttools)
+       ("pkg-config" ,pkg-config)
+       ("swig" ,swig)))
+    (inputs
+     `(("boost" ,boost)
+       ("coin3D" ,coin3D)
+       ("eigen" ,eigen)
+       ("freetype" ,freetype)
+       ("glew" ,glew)
+       ("hdf5" ,hdf5-1.10)
+       ("libarea" ,libarea)
+       ("libmedfile" ,libmedfile)
+       ("libspnav" ,libspnav)
+       ("libxi" ,libxi)
+       ("libxmu" ,libxmu)
+       ("openmpi" ,openmpi)
+       ("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-wrapper" ,python-wrapper)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
+       ("qtx11extras" ,qtx11extras)
+       ("qtxmlpatterns" ,qtxmlpatterns)
+       ("qtwebkit" ,qtwebkit)
+       ("vtk" ,vtk)
+       ("xerces-c" ,xerces-c)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       (list
+        "-DBUILD_QT5=ON"
+        (string-append "-DCMAKE_INSTALL_LIBDIR="
+                       (assoc-ref %outputs "out") "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'restore-pythonpath
+           (lambda _
+             (substitute* "src/Main/MainGui.cpp"
+               (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
+             #t))
+         (add-after 'install 'wrap-pythonpath
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/FreeCAD")
+                 (list "PYTHONPATH"
+                       'prefix (list (getenv "PYTHONPATH")))))
+             #t)))))
+    (home-page "https://www.freecadweb.org/")
+    (synopsis "Your Own 3D Parametric Modeler")
+    (description
+     "FreeCAD is a general purpose feature-based, parametric 3D modeler for
+CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
+product design but also fits a wider range of uses in engineering, such as
+architecture or other engineering specialties.  It is 100% Open Source (LGPL2+
+license) and extremely modular, allowing for very advanced extension and
+customization.")
+    ;; Help!
+    (license license:lgpl2.1+)))
+
 (define-public libmedfile
   (package
     (name "libmedfile")
-- 
2.23.0


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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-04  5:44             ` John Soo
@ 2019-09-04  5:47               ` John Soo
  2019-09-04  6:47                 ` John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-09-04  5:47 UTC (permalink / raw)
  To: Paul Garlick; +Cc: 36440

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

Oh wait, that's tbb, i will try with tbb as an input and report back.

On Wed, Sep 4, 2019 at 5:44 AM John Soo <jsoo1@asu.edu> wrote:

> Hi Paul and everyone,
>
> I added libxmu and libxi as inputs and that gets progress. I am not sure
> whether we want to propagate them from opencascade-occt though. I can see
> either way working well.
>
> Now there is this error when building:
>
>
> /tmp/guix-build-freecad-0.18.3.drv-0/source/src/Mod/Import/App/ImportOCAF.cpp:100:30:
> fatal error: tbb/parallel_for.h: No such file or directory compilation
> terminated.
> make[2]: *** [src/Mod/Import/App/CMakeFiles/Import.dir/build.make:114:
> src/Mod/Import/App/CMakeFiles/Import.dir/ImportOCAF.cpp.o] Error 1
>
> Thanks again,
>
> John
>
>
> On Tue, Sep 3, 2019 at 7:45 PM Paul Garlick <
> pgarlick@tourbillion-technology.com> wrote:
>
>> Hi John,
>>
>> > Switching to opencascade-occt does not build. It fails with `ld:
>> > cannot find -lXmu` when building the PartDesigner module.
>>
>> libxmu is one of the opencascade-occt dependencies.  It might make
>> sense to propagate this input in the opencascade-occt package
>> definition.
>>
>> Could you test whether FreeCAD builds successfully with a libxmu input?
>> There may be other dependencies that need to be propagated too.
>>
>> Best regards,
>>
>> Paul.
>>
>>

[-- Attachment #2: Type: text/html, Size: 2077 bytes --]

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-04  5:47               ` John Soo
@ 2019-09-04  6:47                 ` John Soo
  2019-09-11 14:19                   ` John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-09-04  6:47 UTC (permalink / raw)
  To: Paul Garlick; +Cc: 36440


[-- Attachment #1.1: Type: text/plain, Size: 1550 bytes --]

Ok FreeCAD now builds successfully with opencascade-occt!

What else is required to get this in?

Thanks everyone!

- John



On Wed, Sep 4, 2019 at 5:47 AM John Soo <jsoo1@asu.edu> wrote:

> Oh wait, that's tbb, i will try with tbb as an input and report back.
>
> On Wed, Sep 4, 2019 at 5:44 AM John Soo <jsoo1@asu.edu> wrote:
>
>> Hi Paul and everyone,
>>
>> I added libxmu and libxi as inputs and that gets progress. I am not sure
>> whether we want to propagate them from opencascade-occt though. I can see
>> either way working well.
>>
>> Now there is this error when building:
>>
>>
>> /tmp/guix-build-freecad-0.18.3.drv-0/source/src/Mod/Import/App/ImportOCAF.cpp:100:30:
>> fatal error: tbb/parallel_for.h: No such file or directory compilation
>> terminated.
>> make[2]: *** [src/Mod/Import/App/CMakeFiles/Import.dir/build.make:114:
>> src/Mod/Import/App/CMakeFiles/Import.dir/ImportOCAF.cpp.o] Error 1
>>
>> Thanks again,
>>
>> John
>>
>>
>> On Tue, Sep 3, 2019 at 7:45 PM Paul Garlick <
>> pgarlick@tourbillion-technology.com> wrote:
>>
>>> Hi John,
>>>
>>> > Switching to opencascade-occt does not build. It fails with `ld:
>>> > cannot find -lXmu` when building the PartDesigner module.
>>>
>>> libxmu is one of the opencascade-occt dependencies.  It might make
>>> sense to propagate this input in the opencascade-occt package
>>> definition.
>>>
>>> Could you test whether FreeCAD builds successfully with a libxmu input?
>>> There may be other dependencies that need to be propagated too.
>>>
>>> Best regards,
>>>
>>> Paul.
>>>
>>>

[-- Attachment #1.2: Type: text/html, Size: 2667 bytes --]

[-- Attachment #2: 0001-gnu-Add-coin3D.patch --]
[-- Type: text/x-patch, Size: 2878 bytes --]

From dee0f37b105e58b3c05e7d6ff4738d47f42856bd Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 3 Jul 2019 09:40:31 -0700
Subject: [PATCH 01/10] gnu: Add coin3D.

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

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index b06a369325..4c1b9cf24f 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
 ;;; Copyright © 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +75,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -1018,3 +1020,49 @@ requirements.")
 performance subdivision surface (subdiv) evaluation on massively parallel CPU
 and GPU architectures.")
     (license license:asl2.0)))
+
+(define-public coin3D
+  (package
+    (name "coin3D")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://bitbucket.org/Coin3D/coin/downloads/coin-"
+             version "-src.zip"))
+       (sha256
+        (base32
+         "1mqwlqzvc9ydfxi0bfskwlil16mbnkphfz36p0zl2mvw6h05aqh0"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (for-each delete-file
+                     '("cfg/csubst.exe"
+                       "cfg/wrapmsvc.exe"))
+           #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://bitbucket.org/Coin3D/coin/wiki/Home")
+    (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)))
-- 
2.23.0


[-- Attachment #3: 0002-gnu-Add-llvm-toolchain-6.patch --]
[-- Type: text/x-patch, Size: 2426 bytes --]

From 4db1ea8b81cddb753076f342de8c1afe1a8d28e1 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 08:34:24 -0700
Subject: [PATCH 02/10] gnu: Add llvm-toolchain-6.

* gnupackages/llvm.scm (llvm-toolchain-6): New variable.
---
 gnu/packages/llvm.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 9efb4a4841..19d5f63fd6 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,6 +38,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages bootstrap)           ;glibc-dynamic-linker
@@ -690,3 +692,36 @@ C/C++/Obj-C code according to a set of style options, see
     (synopsis "Rename every occurrence of a symbol using clang-rename")
     (description "This package renames every occurrence of a symbol at point
 using @code{clang-rename}.")))
+
+;; PySide2 docs recommend using a bundled version of libclang
+;; See https://wiki.qt.io/Qt_for_Python/GettingStarted
+;; The source they recommend: https://download.qt.io/development_releases/prebuilt/libclang/
+(define-public llvm-toolchain-6
+  (package
+    (inherit llvm-6)
+    (name "llvm-toolchain")
+    (build-system trivial-build-system)
+    (inputs
+     `(("clang-6" ,clang-6)
+       ("llvm-6" ,llvm-6)))
+    (arguments
+     `(#:modules ((guix build union)
+                  (guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build union)
+                      (ice-9 match)
+                      (srfi srfi-1))
+         (union-build
+          (assoc-ref %outputs "out")
+          (filter-map
+           (match-lambda
+             ((name . dir)
+              (if (or (string=? name "clang-6")
+                      (string=? name "llvm-6"))
+                  dir
+                  #f)))
+           %build-inputs))
+         #t)))
+    (license license:ncsa)))
+
-- 
2.23.0


[-- Attachment #4: 0003-gnu-Add-python-shiboken-2.patch --]
[-- Type: text/x-patch, Size: 3946 bytes --]

From 04945ef3be3a7c1d006e752e0a21f946c9bf06e6 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 09:13:50 -0700
Subject: [PATCH 03/10] gnu: Add python-shiboken-2.

* gnu/packages/qt.scm (python-shiboken-2): New variable.
---
 gnu/packages/qt.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 52eb46cce0..ce64ab5d09 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +39,9 @@
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages databases)
@@ -54,6 +57,7 @@
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages pciutils)
@@ -67,6 +71,7 @@
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages vulkan)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
@@ -2277,3 +2282,53 @@ user-friendly than the default @code{QColorDialog} and several other
 color-related widgets.")
       ;; Includes a license exception for combining with GPL2 code.
       (license license:lgpl3+))))
+
+(define-public python-shiboken-2
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-shiboken-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               ;; The latest versions of Shiboken live in the pyside repo.
+               ;; There is another standalone repo only for Shiboken
+               ;; but it is outdated
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("python-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fails
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'use-shiboken-dir-only
+             (lambda _ (chdir "sources/shiboken2") #t))
+           (add-before 'configure 'set-build-env
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((llvm (assoc-ref inputs "llvm-toolchain-6")))
+                 (setenv "CLANG_INSTALL_DIR" llvm)
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      (description
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      ;; Help!
+      (license `(,license:gpl2+
+                 ,license:llgpl)))))
-- 
2.23.0


[-- Attachment #5: 0004-gnu-Add-libcxx-6.patch --]
[-- Type: text/x-patch, Size: 1430 bytes --]

From 73801611f8b878c442b220b06aa796063436936d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 11 Aug 2019 12:38:08 -0700
Subject: [PATCH 04/10] gnu: Add libcxx-6

* gnu/packages/llvm.scm (libcxx-6): New variable.
---
 gnu/packages/llvm.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 19d5f63fd6..0425591e50 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -442,6 +442,27 @@ with that of libgomp, the GNU Offloading and Multi Processing Library.")
                    "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w"
                    #:patches '("clang-6.0-libc-search-path.patch")))
 
+(define-public libcxx-6
+  (package
+    (inherit libcxx)
+    (name "libcxx")
+    (version (package-version llvm-6))
+    (source
+     (origin
+       (inherit (package-source libcxx))
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/libcxx-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)))
+    (synopsis
+     "Libcxx files specifically used by PySide2")
+    (description
+     "Libcxx files specifically used by PySide2.")))
+
 (define-public llvm-3.9.1
   (package (inherit llvm)
     (name "llvm")
-- 
2.23.0


[-- Attachment #6: 0005-gnu-Add-python-pyside-2.patch --]
[-- Type: text/x-patch, Size: 3953 bytes --]

From 5b74864be1690759141f5a971d11c2d5e4d889e3 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Mon, 2 Sep 2019 07:27:15 -0700
Subject: [PATCH 05/10] gnu: Add python-pyside-2.

 * gnu/packages/qt.scm (python-pyside-2): New variable.
---
 gnu/packages/qt.scm | 81 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index ce64ab5d09..2ad529dd19 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2332,3 +2332,84 @@ color-related widgets.")
       ;; Help!
       (license `(,license:gpl2+
                  ,license:llgpl)))))
+
+(define-public python-pyside-2
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-pyside-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("libcxx" ,libcxx-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("qtbase" ,qtbase)
+         ("qtdatavis3d" ,qtdatavis3d)
+         ("qtlocation" ,qtlocation)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtquickcontrols" ,qtquickcontrols)
+         ("qtscript" ,qtscript)
+         ("qtscxml" ,qtscxml)
+         ("qtsensors" ,qtsensors)
+         ("qtspeech" ,qtspeech)
+         ("qtsvg" ,qtsvg)
+         ("qtwebchannel" ,qtwebchannel)
+         ("qtwebsockets" ,qtwebsockets)
+         ("qtx11extras" ,qtx11extras)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (native-inputs
+       `(("cmake" ,cmake)
+         ("git" ,git)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("python-wrapper" ,python-wrapper)
+         ("qttools" ,qttools)
+         ("which" ,which)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fail.
+         #:configure-flags '("-DBUILD_TESTS=FALSE")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'go-to-source-dir
+             (lambda _ (chdir "sources/pyside2") #t))
+           (add-before 'configure 'set-clang-dir
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((clang (assoc-ref inputs "llvm-toolchain-6"))
+                     (libcxx (assoc-ref inputs "libcxx")))
+                 (setenv "CLANG_INSTALL_DIR" clang)
+                 (substitute* "cmake/Macros/PySideModules.cmake"
+                   (("--include-paths=")
+                    (string-append "--include-paths=" libcxx "/include/c++/v1:")))
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications")
+      (description
+       "The Qt for Python product enables the use of Qt5 APIs in Python
+applications.  It lets Python developers utilize the full potential of Qt,
+using the PySide2 module.  The PySide2 module provides access to the
+individual Qt modules such as QtCore, QtGui,and so on.  Qt for Python also
+comes with the Shiboken2 CPython binding code generator, which can be used to
+generate Python bindings for your C or C++ code.")
+      ;; Help!
+      (license
+       `(,license:fdl1.3+
+         ,license:gpl2+
+         ,license:gpl3+
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
+         ,license:lgpl3)))))
-- 
2.23.0


[-- Attachment #7: 0006-gnu-Add-python-pyside-2-tools.patch --]
[-- Type: text/x-patch, Size: 1977 bytes --]

From 5ae82affcec8f78164b687f28daea8c028477eb1 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 18:49:08 -0700
Subject: [PATCH 06/10] gnu: Add python-pyside-2-tools.

* gnu/packages/qt.scm (python-pyside-2-tools): 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 2ad529dd19..a76e023fb6 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2413,3 +2413,36 @@ generate Python bindings for your C or C++ code.")
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
          ,license:lgpl3)))))
+
+(define-public python-pyside-2-tools
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
+    (package
+      (name "python-pyside-2-tools")
+      (version (git-version "v5.11.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2" ,python-pyside-2)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("qtbase" ,qtbase)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Contains command line tools for PySide2")
+      (description
+       "Contains lupdate, rcc and uic tools for PySide2")
+      ;; Help! (This is from arch)
+      (license license:lgpl2.1+))))
-- 
2.23.0


[-- Attachment #8: 0007-gnu-Add-libspnav.patch --]
[-- Type: text/x-patch, Size: 2501 bytes --]

From 6149b0d87f87eee79372c8e95e62dcde945f048a Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 19:05:37 -0700
Subject: [PATCH 07/10] gnu: Add libspnav.

* gnu/packages/engineering.scm (libspnav): New variable.
---
 gnu/packages/engineering.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 54bf5a7b69..9ef985b9f9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2019 Tim Stahel <swedneck@swedneck.xyz>
 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2145,3 +2146,38 @@ well as conversion and validation tools for input and output data.  The
 specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
+
+(define-public libspnav
+  (package
+    (name "libspnav")
+    (version "0.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://downloads.sourceforge.net/spacenav/libspnav-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "14qzbzpfdb0dfscj4n0g8h8n71fcmh0ix2c7nhldlpbagyxxgr3s"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libx11" ,libx11)))
+    (arguments `(#:tests? #f))
+    (home-page "http://spacenav.sourceforge.net/")
+    (synopsis
+     "Library for communicating with spacenavd or 3dxsrv")
+    (description
+     "The libspnav library is provided as a replacement of the magellan
+library.  It provides a cleaner, and more orthogonal interface.  libspnav
+supports both the original X11 protocol for communicating with the driver, and
+the new alternative non-X protocol.  Programs that choose to use the X11
+protocol, are automatically compatible with either the free spacenavd driver
+or the official 3dxserv, as if they were using the magellan SDK.
+
+Also, libspnav provides a magellan API wrapper on top of the new API.  So, any
+applications that were using the magellan library, can switch to libspnav
+without any changes.  And programmers that are familliar with the magellan API
+can continue using it with a free library without the restrictions of the
+official SDK.")
+    (license license:bsd-3)))
-- 
2.23.0


[-- Attachment #9: 0008-gnu-Add-libarea.patch --]
[-- Type: text/x-patch, Size: 2632 bytes --]

From 606613bf4d3fff71921a6ec22542c9e96620661a Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:03:38 -0700
Subject: [PATCH 08/10] gnu: Add libarea.

* gnu/packages/engineering.scm (libarea): New variable.
---
 gnu/packages/engineering.scm | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 9ef985b9f9..cd74c73d7e 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -51,6 +51,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -2147,6 +2148,47 @@ specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
 
+(define-public libarea
+  (let ((revision "1")
+        (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
+    (package
+      (name "libarea")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url "https://github.com/Heeks/libarea.git")
+                             (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
+      (build-system gnu-build-system)
+      (inputs `(("boost" ,boost)
+                ("python-wrapper" ,python-wrapper)))
+      (native-inputs
+       `(("cmake" ,cmake)))
+      (arguments
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'configure 'cmake-configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (cmake (assoc-ref inputs "cmake")))
+                 (mkdir-p "build")
+                 (invoke "cmake"
+                         (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
+           (delete 'configure))))
+      (home-page "https://github.com/Heeks/libarea")
+      (synopsis
+       "Library and python module for pocketing and profiling operations")
+      (description
+       "Area is a CAM-related software for pocketing operation.
+
+This project provides library and associated python-module to compute pocket
+operations.")
+      (license license:gpl3+))))
+
 (define-public libspnav
   (package
     (name "libspnav")
-- 
2.23.0


[-- Attachment #10: 0009-gnu-Add-libmedfile.patch --]
[-- Type: text/x-patch, Size: 2659 bytes --]

From 6cb467285036bcd3eedd304d2491bf62fe2f881d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:13:17 -0700
Subject: [PATCH 09/10] gnu: Add libmedfile.

* gnu/packages/engineering.scm (libmedfile): New variable.
---
 gnu/packages/engineering.scm | 45 ++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index cd74c73d7e..5dd50cef3a 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2148,6 +2148,51 @@ specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
 
+(define-public libmedfile
+  (package
+    (name "libmedfile")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://files.salome-platform.org/Salome/other/med-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
+    (build-system cmake-build-system)
+    (inputs `(("hdf5" ,hdf5-1.10)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-test-output
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file-recursively
+                (string-append out "/bin/testc"))
+               #t))))))
+    (home-page "https://www.salome-platform.org")
+    (synopsis "Library to read and write MED files")
+    (description
+     "The purpose of the MED module is to provide a standard for storing and
+recovering computer data associated to numerical meshes and fields, and to
+facilitate the exchange between codes and solvers.
+
+The persistent data storage is based upon HDF format (like CGNS, a standard
+developed by Boeing and NASA in the area of Computational Fluid Dynamic).
+
+MED also provides structures to hold data on meshes and fields. These
+structures are exchanged between solvers, hide the communication level (CORBA
+or MPI), and offer persistence (read/write in .med files).
+
+The main benefit of a common exchange format is reduced complexity of code
+coupling. It also allows sharing such high level functionalities as
+computation of nodal connectivity of sub-elements (faces and edges),
+arithmetic operations on fields, entity location functionalities, and
+interpolation toolkit.")
+    (license license:gpl3+)))
+
 (define-public libarea
   (let ((revision "1")
         (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
-- 
2.23.0


[-- Attachment #11: 0010-gnu-Add-freecad.patch --]
[-- Type: text/x-patch, Size: 5002 bytes --]

From 714e0cd469d0ade72fe6e9253cef4f80e1606fef Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:32:10 -0700
Subject: [PATCH 10/10] gnu: Add freecad.

* gnu/packages/engineering.scm (freecad): New variable.
---
 gnu/packages/engineering.scm | 88 ++++++++++++++++++++++++++++++++++++
 1 file changed, 88 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5dd50cef3a..86e8f77874 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -55,6 +55,7 @@
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages fpga)
@@ -67,10 +68,13 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gperf)
+  #:use-module (gnu packages graphics)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
@@ -85,12 +89,14 @@
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages swig)
+  #:use-module (gnu packages tbb)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
 (define-public librecad
@@ -2148,6 +2154,88 @@ specification can be downloaded at @url{http://3mf.io/specification/}.")
     (home-page "https://3mf.io/")
     (license license:bsd-2)))
 
+(define-public freecad
+  (package
+    (name "freecad")
+    (version "0.18.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/FreeCAD/FreeCAD.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1ny29y0h8smg1bwi5yn4kcnyfprqh3v7v2z8837cmmhcwp8dr95m"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("graphviz" ,graphviz)
+       ("qttools" ,qttools)
+       ("pkg-config" ,pkg-config)
+       ("swig" ,swig)))
+    (inputs
+     `(("boost" ,boost)
+       ("coin3D" ,coin3D)
+       ("eigen" ,eigen)
+       ("freetype" ,freetype)
+       ("glew" ,glew)
+       ("hdf5" ,hdf5-1.10)
+       ("libarea" ,libarea)
+       ("libmedfile" ,libmedfile)
+       ("libspnav" ,libspnav)
+       ("libxi" ,libxi)
+       ("libxmu" ,libxmu)
+       ("openmpi" ,openmpi)
+       ("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-wrapper" ,python-wrapper)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
+       ("qtx11extras" ,qtx11extras)
+       ("qtxmlpatterns" ,qtxmlpatterns)
+       ("qtwebkit" ,qtwebkit)
+       ("tbb" ,tbb)
+       ("vtk" ,vtk)
+       ("xerces-c" ,xerces-c)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       (list
+        "-DBUILD_QT5=ON"
+        (string-append "-DCMAKE_INSTALL_LIBDIR="
+                       (assoc-ref %outputs "out") "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'restore-pythonpath
+           (lambda _
+             (substitute* "src/Main/MainGui.cpp"
+               (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
+             #t))
+         (add-after 'install 'wrap-pythonpath
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/FreeCAD")
+                 (list "PYTHONPATH"
+                       'prefix (list (getenv "PYTHONPATH")))))
+             #t)))))
+    (home-page "https://www.freecadweb.org/")
+    (synopsis "Your Own 3D Parametric Modeler")
+    (description
+     "FreeCAD is a general purpose feature-based, parametric 3D modeler for
+CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
+product design but also fits a wider range of uses in engineering, such as
+architecture or other engineering specialties.  It is 100% Open Source (LGPL2+
+license) and extremely modular, allowing for very advanced extension and
+customization.")
+    ;; Help!
+    (license license:lgpl2.1+)))
+
 (define-public libmedfile
   (package
     (name "libmedfile")
-- 
2.23.0


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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-04  6:47                 ` John Soo
@ 2019-09-11 14:19                   ` John Soo
  2019-09-22  7:09                     ` bug#36440: " Björn Höfling
  0 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-09-11 14:19 UTC (permalink / raw)
  To: Paul Garlick; +Cc: 36440


[-- Attachment #1.1: Type: text/plain, Size: 64 bytes --]

Hi all,

I rebased the patches on master. Thanks again!

- John

[-- Attachment #1.2: Type: text/html, Size: 180 bytes --]

[-- Attachment #2: 0001-gnu-Add-coin3D.patch --]
[-- Type: text/x-patch, Size: 2930 bytes --]

From cf0fdce9e81605676c2717f7959b77317375e899 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 3 Jul 2019 09:40:31 -0700
Subject: [PATCH 01/10] gnu: Add coin3D.

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

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 988b519ffa..8b0fd58ac0 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -75,6 +76,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix hg-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix utils))
@@ -1059,3 +1061,49 @@ For example, two shapes can be combined by uniting them, by intersecting them,
 or by subtracting one shape from the other.")
       (home-page "http://www.opencsg.org/")
       (license license:gpl2))))
+
+(define-public coin3D
+  (package
+    (name "coin3D")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://bitbucket.org/Coin3D/coin/downloads/coin-"
+             version "-src.zip"))
+       (sha256
+        (base32
+         "1mqwlqzvc9ydfxi0bfskwlil16mbnkphfz36p0zl2mvw6h05aqh0"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (for-each delete-file
+                     '("cfg/csubst.exe"
+                       "cfg/wrapmsvc.exe"))
+           #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://bitbucket.org/Coin3D/coin/wiki/Home")
+    (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)))
-- 
2.23.0


[-- Attachment #3: 0003-gnu-Add-python-shiboken-2.patch --]
[-- Type: text/x-patch, Size: 3946 bytes --]

From c087e9be1661baee92aceae2cd50042d7e147b0f Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 09:13:50 -0700
Subject: [PATCH 03/10] gnu: Add python-shiboken-2.

* gnu/packages/qt.scm (python-shiboken-2): New variable.
---
 gnu/packages/qt.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 165b8fd7b4..fce15f733b 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2018 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2018 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +39,9 @@
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bison)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages cups)
   #:use-module (gnu packages databases)
@@ -54,6 +57,7 @@
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages llvm)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages pciutils)
@@ -67,6 +71,7 @@
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages vulkan)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
@@ -2283,3 +2288,53 @@ user-friendly than the default @code{QColorDialog} and several other
 color-related widgets.")
       ;; Includes a license exception for combining with GPL2 code.
       (license license:lgpl3+))))
+
+(define-public python-shiboken-2
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-shiboken-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               ;; The latest versions of Shiboken live in the pyside repo.
+               ;; There is another standalone repo only for Shiboken
+               ;; but it is outdated
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("python-wrapper" ,python-wrapper)
+         ("qtbase" ,qtbase)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fails
+         #:configure-flags '("-DBUILD_TESTS=off")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'use-shiboken-dir-only
+             (lambda _ (chdir "sources/shiboken2") #t))
+           (add-before 'configure 'set-build-env
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((llvm (assoc-ref inputs "llvm-toolchain-6")))
+                 (setenv "CLANG_INSTALL_DIR" llvm)
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      (description
+       "Shiboken generates bindings for C++ libraries using CPython source code")
+      ;; Help!
+      (license `(,license:gpl2+
+                 ,license:llgpl)))))
-- 
2.23.0


[-- Attachment #4: 0002-gnu-Add-llvm-toolchain-6.patch --]
[-- Type: text/x-patch, Size: 2426 bytes --]

From cc5ebe25c9c1ff8e9ed482815a334164304abd3e Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 08:34:24 -0700
Subject: [PATCH 02/10] gnu: Add llvm-toolchain-6.

* gnupackages/llvm.scm (llvm-toolchain-6): New variable.
---
 gnu/packages/llvm.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 9efb4a4841..19d5f63fd6 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,6 +38,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system emacs)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages bootstrap)           ;glibc-dynamic-linker
@@ -690,3 +692,36 @@ C/C++/Obj-C code according to a set of style options, see
     (synopsis "Rename every occurrence of a symbol using clang-rename")
     (description "This package renames every occurrence of a symbol at point
 using @code{clang-rename}.")))
+
+;; PySide2 docs recommend using a bundled version of libclang
+;; See https://wiki.qt.io/Qt_for_Python/GettingStarted
+;; The source they recommend: https://download.qt.io/development_releases/prebuilt/libclang/
+(define-public llvm-toolchain-6
+  (package
+    (inherit llvm-6)
+    (name "llvm-toolchain")
+    (build-system trivial-build-system)
+    (inputs
+     `(("clang-6" ,clang-6)
+       ("llvm-6" ,llvm-6)))
+    (arguments
+     `(#:modules ((guix build union)
+                  (guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build union)
+                      (ice-9 match)
+                      (srfi srfi-1))
+         (union-build
+          (assoc-ref %outputs "out")
+          (filter-map
+           (match-lambda
+             ((name . dir)
+              (if (or (string=? name "clang-6")
+                      (string=? name "llvm-6"))
+                  dir
+                  #f)))
+           %build-inputs))
+         #t)))
+    (license license:ncsa)))
+
-- 
2.23.0


[-- Attachment #5: 0005-gnu-Add-python-pyside-2.patch --]
[-- Type: text/x-patch, Size: 3953 bytes --]

From cb94ecb61fb8bd13207d4b8a454078168c22d7d6 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Mon, 2 Sep 2019 07:27:15 -0700
Subject: [PATCH 05/10] gnu: Add python-pyside-2.

 * gnu/packages/qt.scm (python-pyside-2): New variable.
---
 gnu/packages/qt.scm | 81 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index fce15f733b..7101ec43fa 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2338,3 +2338,84 @@ color-related widgets.")
       ;; Help!
       (license `(,license:gpl2+
                  ,license:llgpl)))))
+
+(define-public python-pyside-2
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "4018787a3cc01d632fdca7891ac8aa9487110c26"))
+    (package
+      (name "python-pyside-2")
+      (version (git-version "v5.11.3" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-setup")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "0g8jacm2iqd7lw2m7f1dp1nnrsk38bl3m8pihm8zz9gxs8d31sf5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("libcxx" ,libcxx-6)
+         ("libxml2" ,libxml2)
+         ("libxslt" ,libxslt)
+         ("llvm-toolchain-6" ,llvm-toolchain-6)
+         ("qtbase" ,qtbase)
+         ("qtdatavis3d" ,qtdatavis3d)
+         ("qtlocation" ,qtlocation)
+         ("qtmultimedia" ,qtmultimedia)
+         ("qtquickcontrols" ,qtquickcontrols)
+         ("qtscript" ,qtscript)
+         ("qtscxml" ,qtscxml)
+         ("qtsensors" ,qtsensors)
+         ("qtspeech" ,qtspeech)
+         ("qtsvg" ,qtsvg)
+         ("qtwebchannel" ,qtwebchannel)
+         ("qtwebsockets" ,qtwebsockets)
+         ("qtx11extras" ,qtx11extras)
+         ("qtxmlpatterns" ,qtxmlpatterns)))
+      (native-inputs
+       `(("cmake" ,cmake)
+         ("git" ,git)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("python-wrapper" ,python-wrapper)
+         ("qttools" ,qttools)
+         ("which" ,which)))
+      (arguments
+       `(#:tests? #f
+         ;; FIXME: Building tests fail.
+         #:configure-flags '("-DBUILD_TESTS=FALSE")
+         #:phases
+         (modify-phases
+             %standard-phases
+           (add-after 'unpack 'go-to-source-dir
+             (lambda _ (chdir "sources/pyside2") #t))
+           (add-before 'configure 'set-clang-dir
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((clang (assoc-ref inputs "llvm-toolchain-6"))
+                     (libcxx (assoc-ref inputs "libcxx")))
+                 (setenv "CLANG_INSTALL_DIR" clang)
+                 (substitute* "cmake/Macros/PySideModules.cmake"
+                   (("--include-paths=")
+                    (string-append "--include-paths=" libcxx "/include/c++/v1:")))
+                 #t))))))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "The Qt for Python product enables the use of Qt5 APIs in Python applications")
+      (description
+       "The Qt for Python product enables the use of Qt5 APIs in Python
+applications.  It lets Python developers utilize the full potential of Qt,
+using the PySide2 module.  The PySide2 module provides access to the
+individual Qt modules such as QtCore, QtGui,and so on.  Qt for Python also
+comes with the Shiboken2 CPython binding code generator, which can be used to
+generate Python bindings for your C or C++ code.")
+      ;; Help!
+      (license
+       `(,license:fdl1.3+
+         ,license:gpl2+
+         ,license:gpl3+
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
+         ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
+         ,license:lgpl3)))))
-- 
2.23.0


[-- Attachment #6: 0004-gnu-Add-libcxx-6.patch --]
[-- Type: text/x-patch, Size: 1430 bytes --]

From 4756901d44aa2a212b435f432167df418923cc6e Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 11 Aug 2019 12:38:08 -0700
Subject: [PATCH 04/10] gnu: Add libcxx-6

* gnu/packages/llvm.scm (libcxx-6): New variable.
---
 gnu/packages/llvm.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 19d5f63fd6..0425591e50 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -442,6 +442,27 @@ with that of libgomp, the GNU Offloading and Multi Processing Library.")
                    "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w"
                    #:patches '("clang-6.0-libc-search-path.patch")))
 
+(define-public libcxx-6
+  (package
+    (inherit libcxx)
+    (name "libcxx")
+    (version (package-version llvm-6))
+    (source
+     (origin
+       (inherit (package-source libcxx))
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/libcxx-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n"))))
+    (native-inputs
+     `(("clang" ,clang-6)
+       ("llvm" ,llvm-6)))
+    (synopsis
+     "Libcxx files specifically used by PySide2")
+    (description
+     "Libcxx files specifically used by PySide2.")))
+
 (define-public llvm-3.9.1
   (package (inherit llvm)
     (name "llvm")
-- 
2.23.0


[-- Attachment #7: 0007-gnu-Add-libspnav.patch --]
[-- Type: text/x-patch, Size: 2488 bytes --]

From 4bcb2cd913029f878770d190cc5d854e69ac051f Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 19:05:37 -0700
Subject: [PATCH 07/10] gnu: Add libspnav.

* gnu/packages/engineering.scm (libspnav): New variable.
---
 gnu/packages/engineering.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index c1c1b18ed3..4271669221 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2019 Tim Stahel <swedneck@swedneck.xyz>
 ;;; Copyright © 2019 Jovany Leandro G.C <bit4bit@riseup.net>
 ;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
+;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2214,3 +2215,38 @@ interactive modeler, OpenSCAD generates 3D models from a script, giving you
 full programmatic control over your models.")
     (home-page "https://www.openscad.org/")
     (license license:gpl2+)))
+
+(define-public libspnav
+  (package
+    (name "libspnav")
+    (version "0.2.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://downloads.sourceforge.net/spacenav/libspnav-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "14qzbzpfdb0dfscj4n0g8h8n71fcmh0ix2c7nhldlpbagyxxgr3s"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libx11" ,libx11)))
+    (arguments `(#:tests? #f))
+    (home-page "http://spacenav.sourceforge.net/")
+    (synopsis
+     "Library for communicating with spacenavd or 3dxsrv")
+    (description
+     "The libspnav library is provided as a replacement of the magellan
+library.  It provides a cleaner, and more orthogonal interface.  libspnav
+supports both the original X11 protocol for communicating with the driver, and
+the new alternative non-X protocol.  Programs that choose to use the X11
+protocol, are automatically compatible with either the free spacenavd driver
+or the official 3dxserv, as if they were using the magellan SDK.
+
+Also, libspnav provides a magellan API wrapper on top of the new API.  So, any
+applications that were using the magellan library, can switch to libspnav
+without any changes.  And programmers that are familliar with the magellan API
+can continue using it with a free library without the restrictions of the
+official SDK.")
+    (license license:bsd-3)))
-- 
2.23.0


[-- Attachment #8: 0006-gnu-Add-python-pyside-2-tools.patch --]
[-- Type: text/x-patch, Size: 1977 bytes --]

From 90ce48656878b5460eb82d7c69612e5909efc64b Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sat, 6 Jul 2019 18:49:08 -0700
Subject: [PATCH 06/10] gnu: Add python-pyside-2-tools.

* gnu/packages/qt.scm (python-pyside-2-tools): 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 7101ec43fa..feec70b21e 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -2419,3 +2419,36 @@ generate Python bindings for your C or C++ code.")
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.GPLv3-EXCEPT
          ;; https://code.qt.io/cgit/pyside/pyside-setup.git/tree/LICENSE.COMMERCIAL
          ,license:lgpl3)))))
+
+(define-public python-pyside-2-tools
+  (let ((revision "1")
+        ;; Pinned to branches with support for qt 5.11.3
+        (commit "f1b775537e7fbd718516749583b2abf1cb6adbce"))
+    (package
+      (name "python-pyside-2-tools")
+      (version (git-version "v5.11.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://code.qt.io/pyside/pyside-tools")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1w2g5afvww9r89wmdm9jx8sz67x4bzy9difkh72n4c73ya1n91ry"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python-pyside-2" ,python-pyside-2)
+         ("python-shiboken-2" ,python-shiboken-2)
+         ("qtbase" ,qtbase)))
+      (arguments
+       `(#:tests? #f
+         #:configure-flags '("-DBUILD_TESTS=off")))
+      (home-page "https://wiki.qt.io/Qt_for_Python")
+      (synopsis
+       "Contains command line tools for PySide2")
+      (description
+       "Contains lupdate, rcc and uic tools for PySide2")
+      ;; Help! (This is from arch)
+      (license license:lgpl2.1+))))
-- 
2.23.0


[-- Attachment #9: 0008-gnu-Add-libarea.patch --]
[-- Type: text/x-patch, Size: 2615 bytes --]

From 87f6fbe57df4a374ab3cb08a19d937245750900d Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:03:38 -0700
Subject: [PATCH 08/10] gnu: Add libarea.

* gnu/packages/engineering.scm (libarea): New variable.
---
 gnu/packages/engineering.scm | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 4271669221..f238b0cc98 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -51,6 +51,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cmake)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -2216,6 +2217,47 @@ full programmatic control over your models.")
     (home-page "https://www.openscad.org/")
     (license license:gpl2+)))
 
+(define-public libarea
+  (let ((revision "1")
+        (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
+    (package
+      (name "libarea")
+      (version (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url "https://github.com/Heeks/libarea.git")
+                             (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0pvqz6cabxqdz5y26wnj6alkn8v5d7gkx0d3h8xmg4lvy9r3kh3g"))))
+      (build-system gnu-build-system)
+      (inputs `(("boost" ,boost)
+                ("python-wrapper" ,python-wrapper)))
+      (native-inputs
+       `(("cmake" ,cmake)))
+      (arguments
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'configure 'cmake-configure
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (cmake (assoc-ref inputs "cmake")))
+                 (mkdir-p "build")
+                 (invoke "cmake"
+                         (string-append "-DCMAKE_INSTALL_PREFIX=" out)))))
+           (delete 'configure))))
+      (home-page "https://github.com/Heeks/libarea")
+      (synopsis
+       "Library and python module for pocketing and profiling operations")
+      (description
+       "Area is a CAM-related software for pocketing operation.
+
+This project provides library and associated python-module to compute pocket
+operations.")
+      (license license:gpl3+))))
+
 (define-public libspnav
   (package
     (name "libspnav")
-- 
2.23.0


[-- Attachment #10: 0010-gnu-Add-freecad.patch --]
[-- Type: text/x-patch, Size: 4725 bytes --]

From 8db608e1a274920b9d02b50bdc1112819a01e6ba Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:32:10 -0700
Subject: [PATCH 10/10] gnu: Add freecad.

* gnu/packages/engineering.scm (freecad): New variable.
---
 gnu/packages/engineering.scm | 86 ++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b02ce623af..fb85a4298f 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -55,6 +55,7 @@
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages fpga)
@@ -68,10 +69,12 @@
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gperf)
   #:use-module (gnu packages graphics)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages groff)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
+  #:use-module (gnu packages image-processing)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
@@ -86,6 +89,7 @@
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages swig)
+  #:use-module (gnu packages tbb)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
@@ -2217,6 +2221,88 @@ full programmatic control over your models.")
     (home-page "https://www.openscad.org/")
     (license license:gpl2+)))
 
+(define-public freecad
+  (package
+    (name "freecad")
+    (version "0.18.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/FreeCAD/FreeCAD.git")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1ny29y0h8smg1bwi5yn4kcnyfprqh3v7v2z8837cmmhcwp8dr95m"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("graphviz" ,graphviz)
+       ("qttools" ,qttools)
+       ("pkg-config" ,pkg-config)
+       ("swig" ,swig)))
+    (inputs
+     `(("boost" ,boost)
+       ("coin3D" ,coin3D)
+       ("eigen" ,eigen)
+       ("freetype" ,freetype)
+       ("glew" ,glew)
+       ("hdf5" ,hdf5-1.10)
+       ("libarea" ,libarea)
+       ("libmedfile" ,libmedfile)
+       ("libspnav" ,libspnav)
+       ("libxi" ,libxi)
+       ("libxmu" ,libxmu)
+       ("openmpi" ,openmpi)
+       ("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-wrapper" ,python-wrapper)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
+       ("qtx11extras" ,qtx11extras)
+       ("qtxmlpatterns" ,qtxmlpatterns)
+       ("qtwebkit" ,qtwebkit)
+       ("tbb" ,tbb)
+       ("vtk" ,vtk)
+       ("xerces-c" ,xerces-c)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       (list
+        "-DBUILD_QT5=ON"
+        (string-append "-DCMAKE_INSTALL_LIBDIR="
+                       (assoc-ref %outputs "out") "/lib"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'restore-pythonpath
+           (lambda _
+             (substitute* "src/Main/MainGui.cpp"
+               (("_?putenv\\(\"PYTHONPATH=\"\\);") ""))
+             #t))
+         (add-after 'install 'wrap-pythonpath
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/FreeCAD")
+                 (list "PYTHONPATH"
+                       'prefix (list (getenv "PYTHONPATH")))))
+             #t)))))
+    (home-page "https://www.freecadweb.org/")
+    (synopsis "Your Own 3D Parametric Modeler")
+    (description
+     "FreeCAD is a general purpose feature-based, parametric 3D modeler for
+CAD, MCAD, CAx, CAE and PLM, aimed directly at mechanical engineering and
+product design but also fits a wider range of uses in engineering, such as
+architecture or other engineering specialties.  It is 100% Open Source (LGPL2+
+license) and extremely modular, allowing for very advanced extension and
+customization.")
+    ;; Help!
+    (license license:lgpl2.1+)))
+
 (define-public libmedfile
   (package
     (name "libmedfile")
-- 
2.23.0


[-- Attachment #11: 0009-gnu-Add-libmedfile.patch --]
[-- Type: text/x-patch, Size: 2642 bytes --]

From ec65b56e11590682beaa94a66037a46308372002 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Sun, 7 Jul 2019 10:13:17 -0700
Subject: [PATCH 09/10] gnu: Add libmedfile.

* gnu/packages/engineering.scm (libmedfile): New variable.
---
 gnu/packages/engineering.scm | 45 ++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index f238b0cc98..b02ce623af 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2217,6 +2217,51 @@ full programmatic control over your models.")
     (home-page "https://www.openscad.org/")
     (license license:gpl2+)))
 
+(define-public libmedfile
+  (package
+    (name "libmedfile")
+    (version "4.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://files.salome-platform.org/Salome/other/med-"
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "017h9p0x533fm4gn6pwc8kmp72rvqmcn6vznx72nkkl2b05yjx54"))))
+    (build-system cmake-build-system)
+    (inputs `(("hdf5" ,hdf5-1.10)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'remove-test-output
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (delete-file-recursively
+                (string-append out "/bin/testc"))
+               #t))))))
+    (home-page "https://www.salome-platform.org")
+    (synopsis "Library to read and write MED files")
+    (description
+     "The purpose of the MED module is to provide a standard for storing and
+recovering computer data associated to numerical meshes and fields, and to
+facilitate the exchange between codes and solvers.
+
+The persistent data storage is based upon HDF format (like CGNS, a standard
+developed by Boeing and NASA in the area of Computational Fluid Dynamic).
+
+MED also provides structures to hold data on meshes and fields. These
+structures are exchanged between solvers, hide the communication level (CORBA
+or MPI), and offer persistence (read/write in .med files).
+
+The main benefit of a common exchange format is reduced complexity of code
+coupling. It also allows sharing such high level functionalities as
+computation of nodal connectivity of sub-elements (faces and edges),
+arithmetic operations on fields, entity location functionalities, and
+interpolation toolkit.")
+    (license license:gpl3+)))
+
 (define-public libarea
   (let ((revision "1")
         (commit "8f8bac811c10f1f01fda0d742a18591f61dd76ee"))
-- 
2.23.0


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

* bug#36440: [PATCH] Add FreeCAD
  2019-09-11 14:19                   ` John Soo
@ 2019-09-22  7:09                     ` Björn Höfling
  2019-09-22 16:00                       ` [bug#36440] " John Soo
  0 siblings, 1 reply; 27+ messages in thread
From: Björn Höfling @ 2019-09-22  7:09 UTC (permalink / raw)
  To: John Soo; +Cc: 36440-done, Paul Garlick

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

On Wed, 11 Sep 2019 14:19:19 +0000
John Soo <jsoo1@asu.edu> wrote:

> Hi all,
> 
> I rebased the patches on master. Thanks again!
> 
> - John

Hi John,

thanks for the efford you put into FreeCAD.

I pushed this as:

4cd9de6068f439c52f6874f00ec608c41156d095

with these changes:

I dropped the "llvm-toolchain-6" package, which is just a union-package
and instead used llvm-6 and clang-6 as inputs (Thanks to Ludo for
pointing at this).

libcxx-6: Left the description as inherited, added the speciality for
pyside2 as a comment.

libspnav: The linter had an issue with the sourceforge-sources? Then I
went directly to the github sources via git-fetch.

FreeCAD: Commented out the dependency on qtwebkit: It takes soo long to
compile and substitutes are rarely available.

Double-Checked licenses and fixed the ;;Help-comments on licenses field.

Björn


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-22  7:09                     ` bug#36440: " Björn Höfling
@ 2019-09-22 16:00                       ` John Soo
  2019-09-22 17:50                         ` Björn Höfling
  0 siblings, 1 reply; 27+ messages in thread
From: John Soo @ 2019-09-22 16:00 UTC (permalink / raw)
  To: Björn Höfling; +Cc: 36440-done, Paul Garlick

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

Hi Bjorn!

Thank you so much!  Whew what a journey.

I am glad that the union package of llvm and clang could be separated. When
I was working on the package in the very beginning pyside2 would not build
without clang and llvm living in the same parent directory.

I did just run the program and it does not look like it is functioning the
way it should. With the last patchset I submitted, it did work properly. I
will investigate...

Thanks again, it's been a real pleasure working with you.

- John

[-- Attachment #2: Type: text/html, Size: 705 bytes --]

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

* [bug#36440] [PATCH] Add FreeCAD
  2019-09-22 16:00                       ` [bug#36440] " John Soo
@ 2019-09-22 17:50                         ` Björn Höfling
  0 siblings, 0 replies; 27+ messages in thread
From: Björn Höfling @ 2019-09-22 17:50 UTC (permalink / raw)
  To: John Soo; +Cc: 36440-done, Paul Garlick

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

Hi John,

On Sun, 22 Sep 2019 16:00:36 +0000
John Soo <jsoo1@asu.edu> wrote:

> Thank you so much!  Whew what a journey.

I'm glad you went through that :-) I also wanted to do it in the first
place but then gave up because it was a bit hard and I had no longer
the priority to do so.

> I did just run the program and it does not look like it is
> functioning the way it should. With the last patchset I submitted, it
> did work properly. I will investigate...

what is not functioning at your side?

I started the program and it works for me (though I'm not yet familiar
with it, so I cannot say how exactly it SHOULD work :-)), otherwise I
wouldn't have pushed it.

What I can see is a red text on the Console:

No module named 'WebGui'

But that's of cause because I commented out the webkit. I still hope
this is more-or-less fine, otherwise we need to turn that on again.

What I noticed is that the binary is called "FreeCAD" and not
"freecad", that confused me first. I think that can be fixed with some
phase, but I couldn't quickly figure that out and I really didn't want
to postpone this any more.

Otherwise the first screen looks quite blank. But that's just a matter
of going through the menus:

View->Workbench->Part, etc. In that way, I was able to construct a
cylinder. Now I can no longer, but I think that's just because I forget
how to do it and I have to go through the tutorial again.

I also saw that Cuirass did not build it for x86 due to a dependency
problem, without saying what exactly went wrong:

https://ci.guix.gnu.org/build/1739605/details
https://ci.guix.gnu.org/build/1739601/details

For non-x86 it is even worse, some tests failed for some dependencies.
 
> Thanks again, it's been a real pleasure working with you.

Same for me.

Björn

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

end of thread, other threads:[~2019-09-22 17:51 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-30  2:39 [bug#36440] [PATCH] Add FreeCAD John Soo
2019-07-02  7:06 ` Björn Höfling
     [not found]   ` <CAKf5CqXWCGX4y3nJ3KeV2=fxrR2XA8-E-g1=i1zdQqEv-h6XcQ@mail.gmail.com>
2019-07-08  1:17     ` [bug#36440] Fwd: " John Soo
2019-07-10 14:02       ` John Soo
2019-07-19 20:40 ` Jonathan Brielmaier
2019-07-22 13:41 ` [bug#36440] Source commit, minor version difference, channel John Soo
2019-07-22 14:11 ` [bug#36440] [PATCH] Add FreeCAD Björn Höfling
2019-07-22 17:57   ` Jonathan Brielmaier
2019-07-23 16:25     ` John Soo
2019-07-23 16:29       ` John Soo
2019-07-24 21:59         ` Ricardo Wurmus
2019-07-24  7:52       ` Jonathan Brielmaier
2019-07-24 19:46         ` John Soo
2019-07-24 21:51       ` Ricardo Wurmus
2019-07-30 12:24 ` Paul Garlick
2019-09-02 13:23   ` Ludovic Courtès
2019-09-02 13:33     ` John Soo
2019-09-03  5:22       ` John Soo
2019-09-03 15:10         ` John Soo
2019-09-03 19:45           ` Paul Garlick
2019-09-04  5:44             ` John Soo
2019-09-04  5:47               ` John Soo
2019-09-04  6:47                 ` John Soo
2019-09-11 14:19                   ` John Soo
2019-09-22  7:09                     ` bug#36440: " Björn Höfling
2019-09-22 16:00                       ` [bug#36440] " John Soo
2019-09-22 17:50                         ` Björn Höfling

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).