GNU bug report logs - #55819
[PATCH 0/2] gnu: Add f3d.

Previous Next

Package: guix-patches;

Reported by: "Paul A. Patience" <paul <at> apatience.com>

Date: Mon, 6 Jun 2022 10:59:01 UTC

Severity: normal

Tags: patch

Done: Bruno Victal <mirai <at> makinata.eu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55819 in the body.
You can then email your comments to 55819 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#55819; Package guix-patches. (Mon, 06 Jun 2022 10:59:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Paul A. Patience" <paul <at> apatience.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 06 Jun 2022 10:59:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: guix-patches <at> gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH 0/2] gnu: Add f3d.
Date: Mon, 06 Jun 2022 10:58:41 +0000
Paul A. Patience (2):
  gnu: vtk: Enable the RenderingExternal module.
  gnu: Add f3d.

 gnu/packages/graphics.scm         | 111 ++++++++++++++++++++++++++++++
 gnu/packages/image-processing.scm |   1 +
 2 files changed, 112 insertions(+)

--
2.36.0






Information forwarded to guix-patches <at> gnu.org:
bug#55819; Package guix-patches. (Mon, 06 Jun 2022 11:02:01 GMT) Full text and rfc822 format available.

Message #8 received at 55819 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 55819 <at> debbugs.gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH 1/2] gnu: vtk: Enable the RenderingExternal module.
Date: Mon, 06 Jun 2022 11:01:33 +0000
* gnu/packages/image-processing.scm (vtk)[arguments]<#:configure-flags>:
Add -DVTK_MODULE_ENABLE_VTK_RenderingExternal=YES.
---
 gnu/packages/image-processing.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index f4bf1724b4..249f916489 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -360,6 +360,7 @@ (define-public vtk
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_theora=ON"
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_tiff=ON"
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_zlib=ON"
+                           "-DVTK_MODULE_ENABLE_VTK_RenderingExternal=YES" ; For F3D
                            "-DVTK_WRAP_PYTHON=ON"
                            "-DVTK_PYTHON_VERSION:STRING=3"
                            )
--
2.36.0






Information forwarded to guix-patches <at> gnu.org:
bug#55819; Package guix-patches. (Mon, 06 Jun 2022 11:02:02 GMT) Full text and rfc822 format available.

Message #11 received at 55819 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 55819 <at> debbugs.gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH 2/2] gnu: Add f3d.
Date: Mon, 06 Jun 2022 11:01:37 +0000
* gnu/packages/graphics.scm (f3d): New variable.
---
 gnu/packages/graphics.scm | 111 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 111 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 64286bf68d..d850a9cf06 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -30,6 +30,7 @@
 ;;; Copyright © 2022 Michael Rohleder <mike <at> rohleder.de>
 ;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com>
 ;;; Copyright © 2022 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2022 Paul A. Patience <paul <at> apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2054,3 +2055,113 @@ (define-public monado
 such as VR and AR on mobile, PC/desktop, and any other device.  Monado aims to be
 a complete and conforming implementation of the OpenXR API made by Khronos.")
     (license license:boost1.0)))
+
+(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 "d80fd4558f1851a31d13dfbb62d7648b7b2d36f8")
+        (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 "11lj63rfhqp0zwifl2d3rlp7cfbxgr2jb3j7pqh8lhsr2pa94f6s"))))
+      (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 (string-append "-DVTK_DIR=" #$output "/lib")
+                "-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))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'adjust-titles-and-descriptions
+              (lambda _
+                (substitute* '("CMakeLists.txt"
+                               "resources/f3d.desktop.in"
+                               "resources/io.github.f3d_app.f3d.metainfo.xml")
+                  (("A fast and minimalist 3D viewer")
+                   "Fast and minimalistic 3D viewer"))
+                (substitute* "resources/io.github.f3d_app.f3d.metainfo.xml"
+                  (("it is minimalist,")
+                   "it is minimalistic,")
+                  (("arguments in the command line\\.")
+                   "arguments on the command line."))
+                ;; Keep the title bar short.
+                (substitute* "application/F3DConfig.h.in"
+                  (("AppTitle = \"@PROJECT_DESCRIPTION@\";")
+                   "AppTitle = \"F3D\";"))))
+            (add-after 'unpack 'fix-typos
+              (lambda _
+                (substitute* '("application/F3DOptionsParser.cxx"
+                               "application/F3DStarter.cxx"
+                               "cmake/testing.cmake"
+                               "library/testing/TestSDKHelpers.h")
+                  (("does not exists")
+                   "does not exist"))))
+            ;; Skip checking for the relative-to-executable configuration file
+            ;; (located in ../../argv[0]) when the user configuration file
+            ;; doesn't exist, because the check fails and prints a warning
+            ;; message upon each invocation of the program.
+            ;; Besides, the usefulness of this configuration file is unclear,
+            ;; because F3D reads /etc/f3d/config.json as a fallback system
+            ;; configuration file.
+            (add-after 'unpack 'ignore-binary-config-file-dir
+              (lambda _
+                (substitute* "application/F3DOptionsParser.cxx"
+                  (("^ +filePath = .*->GetBinaryConfigFileDirectory\\(\\) .*")
+                   "")))))))
+      (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 "Fast and minimalistic 3D viewer")
+      (description "F3D (pronounced @samp{/fɛd/}) is a VTK-based 3D viewer
+following the KISS principle, so it is minimalistic, efficient, has no GUI,
+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))))
--
2.36.0






Information forwarded to guix-patches <at> gnu.org:
bug#55819; Package guix-patches. (Mon, 06 Jun 2022 19:58:01 GMT) Full text and rfc822 format available.

Message #14 received at 55819 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 55819 <at> debbugs.gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH v2 0/2] gnu: Add f3d.
Date: Mon, 06 Jun 2022 19:57:00 +0000
Removed VTK_DIR, which is actually superfluous (and was incorrectly set with
‘#$output’ rather than ‘#$(this-package-input)’).

Paul A. Patience (2):
  gnu: vtk: Enable the RenderingExternal module.
  gnu: Add f3d.

 gnu/packages/graphics.scm         | 110 ++++++++++++++++++++++++++++++
 gnu/packages/image-processing.scm |   1 +
 2 files changed, 111 insertions(+)

--
2.36.0






Information forwarded to guix-patches <at> gnu.org:
bug#55819; Package guix-patches. (Mon, 06 Jun 2022 19:58:02 GMT) Full text and rfc822 format available.

Message #17 received at 55819 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 55819 <at> debbugs.gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH v2 1/2] gnu: vtk: Enable the RenderingExternal module.
Date: Mon, 06 Jun 2022 19:57:10 +0000
* gnu/packages/image-processing.scm (vtk)[arguments]<#:configure-flags>:
Add -DVTK_MODULE_ENABLE_VTK_RenderingExternal=YES.
---
 gnu/packages/image-processing.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm
index f4bf1724b4..249f916489 100644
--- a/gnu/packages/image-processing.scm
+++ b/gnu/packages/image-processing.scm
@@ -360,6 +360,7 @@ (define-public vtk
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_theora=ON"
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_tiff=ON"
                            "-DVTK_MODULE_USE_EXTERNAL_VTK_zlib=ON"
+                           "-DVTK_MODULE_ENABLE_VTK_RenderingExternal=YES" ; For F3D
                            "-DVTK_WRAP_PYTHON=ON"
                            "-DVTK_PYTHON_VERSION:STRING=3"
                            )
--
2.36.0






Information forwarded to guix-patches <at> gnu.org:
bug#55819; Package guix-patches. (Mon, 06 Jun 2022 19:58:02 GMT) Full text and rfc822 format available.

Message #20 received at 55819 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: 55819 <at> debbugs.gnu.org
Cc: "Paul A. Patience" <paul <at> apatience.com>
Subject: [PATCH v2 2/2] gnu: Add f3d.
Date: Mon, 06 Jun 2022 19:57:17 +0000
* gnu/packages/graphics.scm (f3d): New variable.
---
 gnu/packages/graphics.scm | 110 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 110 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index 64286bf68d..3b81f57e60 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -30,6 +30,7 @@
 ;;; Copyright © 2022 Michael Rohleder <mike <at> rohleder.de>
 ;;; Copyright © 2022 John Kehayias <john.kehayias <at> protonmail.com>
 ;;; Copyright © 2022 Zheng Junjie <873216071 <at> qq.com>
+;;; Copyright © 2022 Paul A. Patience <paul <at> apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2054,3 +2055,112 @@ (define-public monado
 such as VR and AR on mobile, PC/desktop, and any other device.  Monado aims to be
 a complete and conforming implementation of the OpenXR API made by Khronos.")
     (license license:boost1.0)))
+
+(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 "d80fd4558f1851a31d13dfbb62d7648b7b2d36f8")
+        (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 "11lj63rfhqp0zwifl2d3rlp7cfbxgr2jb3j7pqh8lhsr2pa94f6s"))))
+      (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))
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'adjust-titles-and-descriptions
+              (lambda _
+                (substitute* '("CMakeLists.txt"
+                               "resources/f3d.desktop.in"
+                               "resources/io.github.f3d_app.f3d.metainfo.xml")
+                  (("A fast and minimalist 3D viewer")
+                   "Fast and minimalistic 3D viewer"))
+                (substitute* "resources/io.github.f3d_app.f3d.metainfo.xml"
+                  (("it is minimalist,")
+                   "it is minimalistic,")
+                  (("arguments in the command line\\.")
+                   "arguments on the command line."))
+                ;; Keep the title bar short.
+                (substitute* "application/F3DConfig.h.in"
+                  (("AppTitle = \"@PROJECT_DESCRIPTION@\";")
+                   "AppTitle = \"F3D\";"))))
+            (add-after 'unpack 'fix-typos
+              (lambda _
+                (substitute* '("application/F3DOptionsParser.cxx"
+                               "application/F3DStarter.cxx"
+                               "cmake/testing.cmake"
+                               "library/testing/TestSDKHelpers.h")
+                  (("does not exists")
+                   "does not exist"))))
+            ;; Skip checking for the relative-to-executable configuration file
+            ;; (located in ../../argv[0]) when the user configuration file
+            ;; doesn't exist, because the check fails and prints a warning
+            ;; message upon each invocation of the program.
+            ;; Besides, the usefulness of this configuration file is unclear,
+            ;; because F3D reads /etc/f3d/config.json as a fallback system
+            ;; configuration file.
+            (add-after 'unpack 'ignore-binary-config-file-dir
+              (lambda _
+                (substitute* "application/F3DOptionsParser.cxx"
+                  (("^ +filePath = .*->GetBinaryConfigFileDirectory\\(\\) .*")
+                   "")))))))
+      (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 "Fast and minimalistic 3D viewer")
+      (description "F3D (pronounced @samp{/fɛd/}) is a VTK-based 3D viewer
+following the KISS principle, so it is minimalistic, efficient, has no GUI,
+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))))
--
2.36.0






Information forwarded to guix-patches <at> gnu.org:
bug#55819; Package guix-patches. (Thu, 14 Jul 2022 17:07:01 GMT) Full text and rfc822 format available.

Message #23 received at 55819 <at> debbugs.gnu.org (full text, mbox):

From: "Paul A. Patience" <paul <at> apatience.com>
To: "55819 <at> debbugs.gnu.org" <55819 <at> debbugs.gnu.org>
Subject: [PATCH v3] gnu: Add f3d.
Date: Thu, 14 Jul 2022 17:06:31 +0000
[Message part 1 (text/plain, inline)]
Updated to the latest commit.
[0001-gnu-vtk-Enable-the-RenderingExternal-module.patch (text/x-patch, attachment)]
[0002-gnu-Add-f3d.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#55819; Package guix-patches. (Thu, 11 Aug 2022 09:04:01 GMT) Full text and rfc822 format available.

Message #26 received at 55819 <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: "Paul A. Patience" <paul <at> apatience.com>
Cc: "55819 <at> debbugs.gnu.org" <55819 <at> debbugs.gnu.org>
Subject: Re: bug#55819: [PATCH 0/2] gnu: Add f3d.
Date: Thu, 11 Aug 2022 17:02:53 +0800
"Paul A. Patience" <paul <at> apatience.com> writes:

Hello, I had pushed those patches, with adjusted f3d synopsis and
description (remove "fast", "minimalistic", "KISS"), and also phases.

> [...]
> +        #:phases
> +        #~(modify-phases %standard-phases
> +            (add-after 'unpack 'adjust-titles-and-descriptions
> +              (lambda _
> +                (substitute* '("CMakeLists.txt"
> +                               "resources/f3d.desktop.in"
> +                               "resources/io.github.f3d_app.f3d.metainfo.xml")
> +                  (("A fast and minimalist 3D viewer")
> +                   "Fast and minimalistic 3D viewer"))
> +                (substitute* "resources/io.github.f3d_app.f3d.metainfo.xml"
> +                  (("it is minimalist,")
> +                   "it is minimalistic,")
> +                  (("arguments in the command line\\.")
> +                   "arguments on the command line."))
> +                ;; Keep the title bar short.
> +                (substitute* "application/F3DConfig.h.in"
> +                  (("AppTitle = \"@PROJECT_DESCRIPTION@\";")
> +                   "AppTitle = \"F3D\";"))))
> +            (add-after 'unpack 'fix-typos
> +              (lambda _
> +                (substitute* '("application/F3DOptionsParser.cxx"
> +                               "application/F3DStarter.cxx"
> +                               "cmake/testing.cmake"
> +                               "library/testing/TestSDKHelpers.h")
> +                  (("does not exists")
> +                   "does not exist"))))
> +            ;; Skip checking for the relative-to-executable configuration file
> +            ;; (located in ../../argv[0]) when the user configuration file
> +            ;; doesn't exist, because the check fails and prints a warning
> +            ;; message upon each invocation of the program.
> +            ;; Besides, the usefulness of this configuration file is unclear
> +            ;; because F3D reads /etc/f3d/config.json as a fallback system
> +            ;; configuration file.
> +            (add-after 'unpack 'ignore-binary-config-file-dir
> +              (lambda _
> +                (substitute* "application/F3DOptionsParser.cxx"
> +                  (("^ +filePath = .*->GetBinaryConfigFileDirectory\\(\\) .*")
> +                   "")))))))

I think those titles, descriptions, typos, and warning should go direct
to the upstream, since they don't change the function of f3d, so I pushed
this patch without those modifications first.


Thank you!




bug closed, send any further explanations to 55819 <at> debbugs.gnu.org and "Paul A. Patience" <paul <at> apatience.com> Request was from Bruno Victal <mirai <at> makinata.eu> to control <at> debbugs.gnu.org. (Thu, 30 Mar 2023 23:01:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 Apr 2023 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.