diff mbox series

[bug#44045,02/10] gnu: Add cura-engine.

Message ID 20201017103547.13769-2-malte.f.gerdes@gmail.com
State Accepted
Headers show
Series WIP Ultimaker Cura | expand

Checks

Context Check Description
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Malte Frank Gerdes Oct. 17, 2020, 10:35 a.m. UTC
* gnu/packages/engineering.scm (cura-engine): New variable.
---
 gnu/packages/engineering.scm | 46 ++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 5c5db6a17e..c06b9aebf9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -107,6 +107,7 @@ 
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages stb)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages tbb)
   #:use-module (gnu packages tcl)
@@ -2872,3 +2873,48 @@  messages based on the Protocol Buffers library.  It is designed to
 facilitate the communication between Cura and its backend and similar code.")
       (license license:lgpl3))))
 
+(define-public cura-engine
+  (package
+    (name "cura-engine")
+    (version "4.7.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+               (url "https://github.com/Ultimaker/CuraEngine")
+               (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "177fk6j4gn3ssi8j1qxj8p4486f7jkz328vc75agxnh7vhd4mwsm"))))
+    (build-system cmake-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("googletest" ,googletest)))
+    (inputs
+     `(("protobuf" ,protobuf)
+       ("libArcus" ,libArcus)
+       ("stb-image" ,stb-image)))
+    (arguments
+     `(#:configure-flags '("-DBUILD_TESTS=ON")
+       #:phases (modify-phases %standard-phases
+                  (add-before 'configure 'patch-source
+                    (lambda* (#:key inputs #:allow-other-keys)
+                      (substitute* "../source/cmake/FindStb.cmake"
+                        (("/usr/include")
+                         (string-append (assoc-ref inputs "stb-image")
+                                        "/include"))
+                        (("stb/stb_image_resize.h")
+                         "stb_image.h"))
+                      (substitute*
+                          "../source/src/infill/ImageBasedDensityProvider.cpp"
+                        (("stb/stb_image.h")
+                         "stb_image.h"))
+                      #true)))))
+    (home-page "https://github.com/Ultimaker/CuraEngine")
+    (synopsis "Cura slicing engine")
+    (description "CuraEngine is a powerful, fast and robust engine for
+processing 3D models into 3D printing instruction for Ultimaker and other
+GCode based 3D printers.  It is part of the larger open source project called
+Cura.")
+    (license license:agpl3)))
+