unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Paul A. Patience" <paul@apatience.com>
To: 57550@debbugs.gnu.org
Cc: "Paul A. Patience" <paul@apatience.com>
Subject: [bug#57550] [PATCH] gnu: f3d: Update to 1.3.0-pre-0.46df21f.
Date: Fri, 02 Sep 2022 19:03:12 +0000	[thread overview]
Message-ID: <20220902190300.6498-1-paul@apatience.com> (raw)

* gnu/packages/graphics.scm (f3d): Update to 1.3.0-pre-0.46df21f.
[source](modules, snippet): New fields.
[arguments]<#:configure-flags>: Generate manual page, install various
resource files, and enable the now-optional external rendering feature.
[native-inputs]: New field.
[synopsis]: Add hyphen.
[description]: Reword.
---
 gnu/packages/graphics.scm | 64 ++++++++++++++++++++++++++++-----------
 1 file changed, 46 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index fdc72d5a8d..5908bb76c0 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -61,6 +61,7 @@ (define-module (gnu packages graphics)
   #:use-module (gnu packages cdrom)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages documentation)
@@ -88,6 +89,7 @@ (define-module (gnu packages graphics)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages llvm)
   #:use-module (gnu packages lua)
+  #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mp3)
   #:use-module (gnu packages multiprecision)
@@ -2299,11 +2301,14 @@ (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")
+  (let ((commit "46df21fe9409349917af5e6f7d1cb931f4c68e59")
         (revision "0"))
     (package
       (name "f3d")
-      (version (git-version "1.2.1" revision commit))
+      ;; F3D has not actually been tagged as 1.3.0-pre, but upstream commit
+      ;; 401d4d27b2094568378c07f400fbad48b7af3168 updated the version string
+      ;; to 1.3.0.
+      (version (git-version "1.3.0-pre" revision commit))
       (source
        (origin
          (method git-fetch)
@@ -2312,29 +2317,52 @@ (define-public f3d
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "041gqi2wfny2br4j68vhifg0bd18kbl0qsaallkz7yywk47njxfi"))))
+          (base32 "0x0jw9vqf1b8pxh84xpr47hzcjynk07dp8q7r2xihh9cd00kglp1"))
+         (modules '((guix build utils)))
+         (snippet
+          '(begin
+             (delete-file "application/cxxopts.hpp")
+             (delete-file "application/json.hpp")
+             (substitute* "application/F3DOptionsParser.cxx"
+               (("^#include \"cxxopts\\.hpp\"")
+                "#include <cxxopts.hpp>")
+               (("^#include \"json\\.hpp\"")
+                "#include <nlohmann/json.hpp>"))))))
       (build-system cmake-build-system)
+      ;; The package cannot easily be split into out and lib outputs because
+      ;; VTK's vtkModule.cmake complains, and also the CMake files in
+      ;; /lib/cmake/f3d expect the f3d executable and library to be available,
+      ;; as they set up targets for both of them.
       (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.
+        ;; Upstream is aware of occasionally flaky tests [1], 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.
+        ;;
+        ;; [1]: https://github.com/f3d-app/f3d/issues/92
         #:tests? #f
         #:configure-flags
-        #~(list "-DBUILD_TESTING=OFF"
+        #~(list (string-append "-DCMAKE_INSTALL_DOCDIR=" #$output
+                               "/share/doc/" #$name "-" #$version)
+                "-DBUILD_TESTING=OFF"
+                "-DF3D_GENERATE_MAN=ON"
+                "-DF3D_INSTALL_DEFAULT_CONFIGURATION_FILE=ON"
+                "-DF3D_INSTALL_DEFAULT_CONFIGURATION_FILE_IN_PREFIX=ON"
+                "-DF3D_INSTALL_MIME_TYPES_FILE=ON"
+                "-DF3D_INSTALL_THUMBNAILER_FILES=ON"
                 "-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))))
+                "-DF3D_MODULE_EXTERNAL_RENDERING=ON"
+                "-DF3D_MODULE_OCCT=ON")))
+      (native-inputs
+       (list cxxopts
+             help2man
+             json-modern-cxx))
       (inputs
        (list alembic
              assimp
@@ -2357,10 +2385,10 @@ (define-public f3d
              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.")
+      (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))))
--
2.37.2






             reply	other threads:[~2022-09-02 19:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02 19:03 Paul A. Patience [this message]
2022-09-04 18:01 ` bug#57550: [PATCH] gnu: f3d: Update to 1.3.0-pre-0.46df21f Christopher Baines

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220902190300.6498-1-paul@apatience.com \
    --to=paul@apatience.com \
    --cc=57550@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).