diff mbox series

[bug#36440] Add FreeCAD

Message ID CAKf5CqUvi6nZB8Fq5Vsuhr7b013yDgmtgGtbKTukMmi3HKZPvQ@mail.gmail.com
State Accepted
Headers show
Series [bug#36440] Add FreeCAD | expand

Commit Message

John Soo Sept. 4, 2019, 6:47 a.m. UTC
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.
>>>
>>>
diff mbox series

Patch

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