From patchwork Thu Jul 14 17:06:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 40651 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1CA5227BBEA; Thu, 14 Jul 2022 18:07:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 51A3727BBE9 for ; Thu, 14 Jul 2022 18:07:21 +0100 (BST) Received: from localhost ([::1]:48954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oC2J6-0001ou-Ey for patchwork@mira.cbaines.net; Thu, 14 Jul 2022 13:07:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oC2Io-0001n5-6X for guix-patches@gnu.org; Thu, 14 Jul 2022 13:07:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40964) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oC2In-0002F9-RZ for guix-patches@gnu.org; Thu, 14 Jul 2022 13:07:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oC2In-0007ti-N9 for guix-patches@gnu.org; Thu, 14 Jul 2022 13:07:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55819] [PATCH v3] gnu: Add f3d. References: <20220606105824.901227-1-paul@apatience.com> In-Reply-To: <20220606105824.901227-1-paul@apatience.com> Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Jul 2022 17:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55819 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: "55819@debbugs.gnu.org" <55819@debbugs.gnu.org> Received: via spool by 55819-submit@debbugs.gnu.org id=B55819.165781841130337 (code B ref 55819); Thu, 14 Jul 2022 17:07:01 +0000 Received: (at 55819) by debbugs.gnu.org; 14 Jul 2022 17:06:51 +0000 Received: from localhost ([127.0.0.1]:38723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2Ic-0007tF-Ba for submit@debbugs.gnu.org; Thu, 14 Jul 2022 13:06:50 -0400 Received: from mail-4018.proton.ch ([185.70.40.18]:14595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oC2IY-0007sy-QI for 55819@debbugs.gnu.org; Thu, 14 Jul 2022 13:06:49 -0400 Date: Thu, 14 Jul 2022 17:06:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1657818399; x=1658077599; bh=A56UrA1FeKToHA58mdVqLtGk0id2sapATegk7qDihNI=; h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc: Date:Subject:Reply-To:Feedback-ID:Message-ID; b=PJ0sKOjkBDGJdLD5Ej3HbOi2bKmShfx78Tuas1MR+KsvwKpzOJYiyCWERJIdQsg9v 7Q3b3r0VmTRL7rfc8DkAEr7Mc1EwXpC+PZX4pO+oTJaJtLQN4loO4iTsmWz0yVV6G0 KsD/YJ6tP/7kbzbt2+leu5KVGdWPprhLwy6ZK15eDP96eHvoW3MJ2bsHN4yoDYNsj1 yfZrUVHvFae8+B7cqjYMGMY9rv1v5jAjKj21sZ5srHJSqU3WUsraOUDy5Co8Xo3VKH OrXTVkIHxY9S9R3tH6BosSKHPbWXyIBkoYQr7PupTHeKZP/gjwCoWcFXm8txTxlf78 RHQxUSs22VgRQ== From: "Paul A. Patience" Message-ID: Feedback-ID: 19227857:user:proton MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: "Paul A. Patience" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Updated to the latest commit. From f80bd6d46185b544271154a83ca42056f4e4f7ad Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Mon, 6 Jun 2022 06:33:27 -0400 Subject: [PATCH v3 2/2] gnu: Add f3d. * 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 c193be1efb..0ccb79e665 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -31,6 +31,7 @@ ;;; Copyright © 2022 John Kehayias ;;; Copyright © 2022 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2022 Tobias Kortkamp +;;; Copyright © 2022 Paul A. Patience ;;; ;;; This file is part of GNU Guix. ;;; @@ -2120,3 +2121,112 @@ (define-public azpainter @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)) + #: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.1