gnu: f3d: Update to 1.3.1.

* gnu/packages/graphics.scm (f3d): Update to 1.3.1.
[snippet]: Use G-expression.
[arguments]<#:configure-flags>: Update option name to
F3D_INSTALL_MIME_TYPES_FILES.

Signed-off-by: Marius Bakke <marius@gnu.org>
This commit is contained in:
Paul A. Patience 2022-09-07 13:33:42 +00:00 committed by Marius Bakke
parent 08c6fd9511
commit c56e8eabb4
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA

View File

@ -2306,97 +2306,89 @@ a tetrahedral mesh, isovalue discretization and Lagrangian movement;
(license license:lgpl3+))) (license license:lgpl3+)))
(define-public f3d (define-public f3d
;; There have been many improvements since the last tagged version (1.2.1, (package
;; released in December 2021), including support for the Alembic file (name "f3d")
;; format. (version "1.3.1")
(let ((commit "46df21fe9409349917af5e6f7d1cb931f4c68e59") (source
(revision "0")) (origin
(package (method git-fetch)
(name "f3d") (uri (git-reference
;; F3D has not actually been tagged as 1.3.0-pre, but upstream commit (url "https://github.com/f3d-app/f3d")
;; 401d4d27b2094568378c07f400fbad48b7af3168 updated the version string (commit (string-append "v" version))))
;; to 1.3.0. (file-name (git-file-name name version))
(version (git-version "1.3.0-pre" revision commit)) (sha256
(source (base32 "0hdfgwf5d24ykab634xg4vv9r09nh96ss7hhnqnh5nmw4abhxzg7"))
(origin (modules '((guix build utils)))
(method git-fetch) (snippet
(uri (git-reference #~(begin
(url "https://github.com/f3d-app/f3d") (delete-file "application/cxxopts.hpp")
(commit commit))) (delete-file "application/json.hpp")
(file-name (git-file-name name version)) (substitute* "application/F3DOptionsParser.cxx"
(sha256 (("^#include \"cxxopts\\.hpp\"")
(base32 "0x0jw9vqf1b8pxh84xpr47hzcjynk07dp8q7r2xihh9cd00kglp1")) "#include <cxxopts.hpp>")
(modules '((guix build utils))) (("^#include \"json\\.hpp\"")
(snippet "#include <nlohmann/json.hpp>"))))))
'(begin (build-system cmake-build-system)
(delete-file "application/cxxopts.hpp") ;; The package cannot easily be split into out and lib outputs because
(delete-file "application/json.hpp") ;; VTK's vtkModule.cmake complains, and also the CMake files in
(substitute* "application/F3DOptionsParser.cxx" ;; /lib/cmake/f3d expect the f3d executable and library to be available,
(("^#include \"cxxopts\\.hpp\"") ;; as they set up targets for both of them.
"#include <cxxopts.hpp>") (arguments
(("^#include \"json\\.hpp\"") (list
"#include <nlohmann/json.hpp>")))))) ;; Many tests require files supplied by git-lfs.
(build-system cmake-build-system) ;; Also, some tests segfault (after an exception?) but the tested
;; The package cannot easily be split into out and lib outputs because ;; behavior, i.e., when the program is run manually, does not (for
;; VTK's vtkModule.cmake complains, and also the CMake files in ;; example, TestNonExistentConfigFile and TestInvalidConfigFile).
;; /lib/cmake/f3d expect the f3d executable and library to be available, ;; Upstream is aware of occasionally flaky tests [1], but the tests
;; as they set up targets for both of them. ;; run in CI seem to be passing.
(arguments ;; Anyway, the program runs and is able to open at least STL files
(list ;; without issue.
;; Many tests require files supplied by git-lfs. ;;
;; Also, some tests segfault (after an exception?) but the tested ;; [1]: https://github.com/f3d-app/f3d/issues/92
;; behavior, i.e., when the program is run manually, does not (for #:tests? #f
;; example, TestNonExistentConfigFile and TestInvalidConfigFile). #:configure-flags
;; Upstream is aware of occasionally flaky tests [1], but the tests #~(list (string-append "-DCMAKE_INSTALL_DOCDIR=" #$output
;; run in CI seem to be passing. "/share/doc/" #$name "-" #$version)
;; Anyway, the program runs and is able to open at least STL files "-DBUILD_TESTING=OFF"
;; without issue. "-DF3D_GENERATE_MAN=ON"
;; "-DF3D_INSTALL_DEFAULT_CONFIGURATION_FILE=ON"
;; [1]: https://github.com/f3d-app/f3d/issues/92 "-DF3D_INSTALL_DEFAULT_CONFIGURATION_FILE_IN_PREFIX=ON"
#:tests? #f "-DF3D_INSTALL_MIME_TYPES_FILES=ON"
#:configure-flags "-DF3D_INSTALL_THUMBNAILER_FILES=ON"
#~(list (string-append "-DCMAKE_INSTALL_DOCDIR=" #$output "-DF3D_MODULE_ALEMBIC=ON"
"/share/doc/" #$name "-" #$version) "-DF3D_MODULE_ASSIMP=ON"
"-DBUILD_TESTING=OFF" "-DF3D_MODULE_EXTERNAL_RENDERING=ON"
"-DF3D_GENERATE_MAN=ON" "-DF3D_MODULE_OCCT=ON")))
"-DF3D_INSTALL_DEFAULT_CONFIGURATION_FILE=ON" (native-inputs
"-DF3D_INSTALL_DEFAULT_CONFIGURATION_FILE_IN_PREFIX=ON" (list cxxopts
"-DF3D_INSTALL_MIME_TYPES_FILE=ON" help2man
"-DF3D_INSTALL_THUMBNAILER_FILES=ON" json-modern-cxx))
"-DF3D_MODULE_ALEMBIC=ON" (inputs
"-DF3D_MODULE_ASSIMP=ON" (list alembic
"-DF3D_MODULE_EXTERNAL_RENDERING=ON" assimp
"-DF3D_MODULE_OCCT=ON"))) double-conversion
(native-inputs eigen
(list cxxopts expat
help2man fontconfig
json-modern-cxx)) freetype
(inputs glew
(list alembic hdf5
assimp imath
double-conversion jsoncpp
eigen libjpeg-turbo
expat libpng
fontconfig libtiff
freetype libx11
glew lz4
hdf5 netcdf
imath opencascade-occt
jsoncpp vtk
libjpeg-turbo zlib))
libpng (home-page "https://f3d-app.github.io/f3d/")
libtiff (synopsis "VTK-based 3D viewer")
libx11 (description "F3D (pronounced @samp{/fɛd/}) is a VTK-based 3D viewer with
lz4 simple interaction mechanisms and which is fully controllable using arguments
netcdf on the command line. It supports a range of file formats (including animated
opencascade-occt glTF, STL, STEP, PLY, OBJ, FBX), and provides numerous rendering and texturing
vtk options.")
zlib)) (license license:bsd-3)))
(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
with simple interaction mechanisms and which 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))))