summary refs log tree commit diff
path: root/gnu/packages/graphics.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/graphics.scm')
-rw-r--r--gnu/packages/graphics.scm130
1 files changed, 127 insertions, 3 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 4fd16d7ce5..a777d19d65 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -31,6 +31,7 @@
 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2022 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -571,6 +572,45 @@ vertices, sorting by primitive type, merging of redundant materials and many
 more.")
     (license license:bsd-3)))
 
+(define-public mikktspace
+  ;; The latest commit is used as there is no release.
+  (let ((commit   "3e895b49d05ea07e4c2133156cfa94369e19e409")
+        (revision "0"))
+    (package
+      (name "mikktspace")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/mmikk/MikkTSpace")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1rjh9zflx51hdhnfadal87v4hhkrbprkv692hjkg9wkxx0ch39zi"))))
+      (build-system gnu-build-system)
+      (arguments
+       (list #:tests? #f
+             #:phases
+             #~(modify-phases %standard-phases
+                 (delete 'configure)
+                 (replace 'build
+                   (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
+                     (invoke #$(cc-for-target) "mikktspace.c" "-O2" "-g" "-fPIC"
+                             "-shared" "-o" "libmikktspace.so")))
+                 (replace 'install
+                   (lambda _
+                     (install-file "mikktspace.h"
+                                   (string-append #$output "/include"))
+                     (install-file "libmikktspace.so"
+                                   (string-append #$output "/lib")))))))
+      (home-page "http://www.mikktspace.com/")
+      (synopsis "Library for a common standard for tangent spaces")
+      (description
+       "This package provides a common standard tangent space library used in
+baking tools to produce normal maps.")
+      (license license:zlib))))
+
 (define-public openshadinglanguage
   (package
     (name "openshadinglanguage")
@@ -797,6 +837,20 @@ basic geometries.")
     ;; https://gitlab.com/inkscape/inkscape/issues/784).
     (license license:gpl3+)))
 
+(define-public lib2geom-1.2
+  (package
+    (inherit lib2geom)
+    (version "1.2")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/inkscape/lib2geom")
+                    (commit version)))
+              (file-name (git-file-name "lib2geom" version))
+              (sha256
+               (base32
+                "0dq981g894hmvhd6rmfl1w32mksg9hpvpjs1qvfxrnz87rhkknj8"))))))
+
 (define-public python-booleanoperations
   (package
     (name "python-booleanoperations")
@@ -1425,7 +1479,7 @@ exec -a \"$0\" ~a/.brdf-real~%"
                             (chmod "brdf" #o555)))
                         #t)))))
       (native-inputs
-       (list qttools)) ;for 'qmake'
+       (list qttools-5)) ;for 'qmake'
       (inputs
        (list qtbase-5 mesa glew freeglut zlib))
       (home-page "https://www.disneyanimation.com/technology/brdf.html")
@@ -1952,8 +2006,8 @@ Automated palette selection is supported.")
              ;; ("miniupnpc" ,miniupnpc) ;segfaults for some reason
              qtbase-5
              qtkeychain
-             qtmultimedia
-             qtsvg
+             qtmultimedia-5
+             qtsvg-5
              qtx11extras))
       (home-page "https://drawpile.net")
       (synopsis "Collaborative drawing program")
@@ -2107,3 +2161,73 @@ Features include:
 @end itemize
 ")
     (license license:gpl3+)))
+
+(define-public f3d
+  ;; There have been many improvements since the last tagged version (1.2.1,
+  ;; released in December 2021), including support for the Alembic file
+  ;; format.
+  (let ((commit "9cc79b65ed750b178f58012dbba091aa24722dab")
+        (revision "0"))
+    (package
+      (name "f3d")
+      (version (git-version "1.2.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/f3d-app/f3d")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "041gqi2wfny2br4j68vhifg0bd18kbl0qsaallkz7yywk47njxfi"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        ;; Many tests require files supplied by git-lfs.
+        ;; Also, some tests segfault (after an exception?) but the tested
+        ;; behavior, i.e., when the program is run manually, does not (for
+        ;; example, TestNonExistentConfigFile and TestInvalidConfigFile).
+        ;; Upstream is aware of occasionally flaky tests (see
+        ;; https://github.com/f3d-app/f3d/issues/92) but the tests run in CI
+        ;; seem to be passing.
+        ;; Anyway, the program runs and is able to open at least STL files
+        ;; without issue.
+        #:tests? #f
+        #:configure-flags
+        #~(list "-DBUILD_TESTING=OFF"
+                "-DF3D_MODULE_ALEMBIC=ON"
+                "-DF3D_MODULE_ASSIMP=ON"
+                "-DF3D_MODULE_OCCT=ON"
+                ;; Prefer Guix's versioned documentation directory to F3D's
+                ;; unversioned one.
+                (string-append "-DCMAKE_INSTALL_DOCDIR=" #$output
+                               "/share/doc/" #$name "-" #$version))))
+      (inputs
+       (list alembic
+             assimp
+             double-conversion
+             eigen
+             expat
+             fontconfig
+             freetype
+             glew
+             hdf5
+             imath
+             jsoncpp
+             libjpeg-turbo
+             libpng
+             libtiff
+             libx11
+             lz4
+             netcdf
+             opencascade-occt
+             vtk
+             zlib))
+      (home-page "https://f3d-app.github.io/f3d/")
+      (synopsis "VTK based 3D viewer")
+      (description "F3D (pronounced @samp{/fɛd/}) is a VTK-based 3D viewer, it
+has simple interaction mechanisms and is fully controllable using arguments on
+the command line.  It supports a range of file formats (including animated
+glTF, STL, STEP, PLY, OBJ, FBX), and provides numerous rendering and texturing
+options.")
+      (license license:bsd-3))))