gnu: linux-libre@5.4: Update to 5.4.64.
[jackhill/guix/guix.git] / gnu / packages / engineering.scm
index b34eb41..bd89cef 100644 (file)
@@ -19,6 +19,7 @@
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
+;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -95,6 +96,8 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages parallel)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -763,12 +766,7 @@ fonts to gEDA.")
                 (sha256
                  (base32
                   "0ryv2hcbrwqc087w7rrs4a2irkcpmqync00g4dh8n7jn10w2jkim"))
-                (file-name (git-file-name name version))
-                (snippet
-                 ;; Remove bundled catch since we provide our own.
-                 '(begin
-                    (delete-file "libfive/test/catch.hpp")
-                    #t))))
+                (file-name (git-file-name name version))))
       (build-system cmake-build-system)
       (arguments
        `(#:test-target "libfive-test"
@@ -777,19 +775,11 @@ fonts to gEDA.")
            (add-after 'unpack 'remove-native-compilation
              (lambda _
                (substitute* "CMakeLists.txt" (("-march=native") ""))
-               #t))
-           (add-after 'unpack 'find-catch
-             (lambda* (#:key inputs #:allow-other-keys)
-               (setenv "CPLUS_INCLUDE_PATH"
-                       (string-append (assoc-ref inputs "catch")
-                                      "/include/catch:"
-                                      (or (getenv "CPLUS_INCLUDE_PATH") "")))
                #t)))))
       (native-inputs
        `(("pkg-config" ,pkg-config)))
       (inputs
        `(("boost" ,boost)
-         ("catch" ,catch-framework2)
          ("libpng" ,libpng)
          ("qtbase" ,qtbase)
          ("eigen" ,eigen)
@@ -805,6 +795,51 @@ language.")
       (license (list license:mpl2.0               ;library
                      license:gpl2+)))))           ;Guile bindings and GUI
 
+(define-public inspekt3d
+  (let ((commit "703f52ccbfedad2bf5240bf8183d1b573c9d54ef")
+        (revision "0"))
+    (package
+      (name "inspekt3d")
+      (version (git-version "0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://gitlab.com/kavalogic-inc/inspekt3d.git")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0lan6930g5a9z4ack9jj0zdd0mb2s6q2xzpiwcjdc3pvl9b1nbw4"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-libfive-guile-location
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "inspekt3d/library.scm"
+                 (("\"libfive-guile")
+                  (string-append "\""
+                                 (assoc-ref inputs "libfive")
+                                 "/lib/libfive-guile")))
+               #t)))))
+      (native-inputs
+       `(("autoconf" ,autoconf)
+         ("automake" ,automake)
+         ("pkg-config" ,pkg-config)))
+      (inputs
+       `(("mesa" ,mesa)
+         ("guile" ,guile-2.2)))
+      (propagated-inputs
+       `(("libfive" ,libfive)
+         ("guile-opengl" ,guile-opengl)))
+      (home-page "https://gitlab.com/kavalogic-inc/inspekt3d/")
+      (synopsis "Lightweight 3D viewer for Libfive written in Guile Scheme")
+      (description
+       "Inspekt3d is a lightweight 3D viewer for Libfive written in Guile Scheme.
+The viewer can be used interactively with a REPL (for example Geiser in
+Emacs).")
+      (license license:gpl3+))))
+
 ;; TODO Add doc https://gitlab.com/kicad/services/kicad-doc/-/tree/master
 (define-public kicad
   (package
@@ -1075,6 +1110,35 @@ provides a machine-independent interface to select the best such procedures to
 use on a given system.")
     (license license:gpl3+)))
 
+(define-public libredwg
+  (package
+    (name "libredwg")
+    (version "0.11")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://gnu/libredwg/libredwg-"
+             version ".tar.xz"))
+       (sha256
+        (base32 "1vd7ii32k5447z7k4w9s005hv1ffpj6dyf1w40x6c53qksrblny2"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags '("--disable-bindings")))
+    (native-inputs
+     `(("libxml2" ,libxml2)
+       ("parallel" ,parallel)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python-libxml2" ,python-libxml2)))
+    (inputs
+     `(("pcre2" ,pcre2)))
+    (home-page "https://www.gnu.org/software/libredwg/")
+    (synopsis "C library to handle DWG (CAD-related) files")
+    (description
+     "GNU LibreDWG is a C library to handle DWG files.  It aims to be a free
+replacement for the OpenDWG libraries.")
+    (license license:gpl3+)))
+
 (define-public minicom
   (package
     (name "minicom")