diff mbox series

[bug#44045,06/10] gnu: Add libSavitar.

Message ID 20201017103547.13769-6-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 (libSavitar): New variable.
---
 gnu/packages/engineering.scm | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 27d4eae948..a65cbb81e8 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -3033,3 +3033,45 @@  from Ultimaker.")
 belongs to the Cura project from Ultimaker.")
     (license license:lgpl3)))
 
+(define-public libSavitar
+  (let ((commit "85abbec0d947e6646b5172b6716c49c17e241632")
+        (revision "0"))
+    (package
+      (name "libSavitar")
+      (version (string-append  "4.7.1-" revision "."
+                               (string-take commit 7)))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/Ultimaker/libSavitar")
+               (commit commit)))
+         (file-name (string-append name "-" version "-checkout"))
+         (sha256
+          (base32 "1i895d5r7c32z61m88xjkqs9j72bwmxllshs4y2rwgzxpq3rk1k5"))))
+      (build-system cmake-build-system)
+      (inputs
+       `(("python" ,python)
+         ("sip" ,python-sip)))
+      (arguments
+       `(#:tests? #false ;; this library doesn't have tests
+         #:phases (modify-phases %standard-phases
+                    (add-before 'configure 'fix-python-sitearch
+                      (lambda* (#:key outputs #:allow-other-keys)
+                        (let ((path (string-append (assoc-ref outputs "out")
+                                                   "/lib/python"
+                                                   ,(version-major+minor
+                                                     (package-version python))
+                                                   "/site-packages")))
+                          (substitute* "cmake/FindSIP.cmake"
+                            (("\\$\\{_process_output\\} Python3_SITEARCH")
+                             (string-append path " Python3_SITEARCH"))
+                            (("\\$\\{_process_output\\} Python3_SITELIB")
+                             (string-append path " Python3_SITELIB"))))
+                        #true)))))
+      (home-page "https://github.com/Ultimaker/libSavitar")
+      (synopsis "C++ implementation of 3mf loading with SIP python bindings")
+      (description "libSavitar is a C++ implementation of 3mf loading with SIP
+python bindings.  It belongs to the Cura project from Ultimaker.")
+      (license license:lgpl3))))
+