From: Vinicius Monego <monego@posteo.net>
To: 70319@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#70319] [PATCH 1/2] gnu: Add tinygltf.
Date: Wed, 10 Apr 2024 00:12:02 +0000 [thread overview]
Message-ID: <769daf7ae2277aecea26723b2a8e3165aa92e146.1712707652.git.monego@posteo.net> (raw)
In-Reply-To: <cover.1712707652.git.monego@posteo.net>
* gnu/packages/graphics.scm (tinygltf): New variable.
Change-Id: I749ced85142b8dd2ebbe916533f27bf6d167bbff
---
gnu/packages/graphics.scm | 45 +++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index a63629823a..d04fcbfd6d 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -2367,6 +2367,51 @@ (define-public openxr
;; Dual licensed. Either license applies.
(license (list license:asl2.0 license:expat))))
+(define-public tinygltf
+ (package
+ (name "tinygltf")
+ (version "2.8.21")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/syoyo/tinygltf")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14712lndwlk4y001jxf2rxhwrw0w5gbc2hyh9kpik1galdzg41ii"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f ; tests are not managed by CMake
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'use-our-packages
+ ;; tinygltf ships json.hpp, stb_image.h and stb_image_write.h
+ ;; into the repo as common files. Delete those, and use the
+ ;; files from our packages instead.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (for-each delete-file
+ (list "json.hpp"
+ "stb_image.h"
+ "stb_image_write.h"))
+ (symlink (search-input-file inputs "json.hpp")
+ "json.hpp")
+ (symlink (search-input-file inputs "stb_image.h")
+ "stb_image.h")
+ (symlink (search-input-file inputs "stb_image_write.h")
+ "stb_image_write.h")))
+ (add-after 'install 'delete-static-lib
+ (lambda _
+ (delete-file (string-append #$output
+ "/lib/libtinygltf.a")))))))
+ (inputs (list nlohmann-json stb-image stb-image-write))
+ (home-page "https://github.com/syoyo/tinygltf")
+ (synopsis "Header only C++11 tiny glTF 2.0 library")
+ (description "TinyGLTF is a header only C++11 tiny
+@url{https://github.com/KhronosGroup/glTF, glTF} 2.0 library.")
+ (license license:expat)))
+
(define-public monado
(package
(name "monado")
--
2.39.2
next prev parent reply other threads:[~2024-04-10 0:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-10 0:10 [bug#70319] [PATCH 0/2] Add Draco (3d graphics compression) Vinicius Monego
2024-04-10 0:12 ` Vinicius Monego [this message]
2024-05-14 12:33 ` [bug#70319] [PATCH 1/2] gnu: Add tinygltf Nicolas Graves via Guix-patches via
2024-04-10 0:12 ` [bug#70319] [PATCH 2/2] gnu: Add draco Vinicius Monego
2024-05-14 19:45 ` [bug#70319] [PATCH v2 1/2] gnu: Add tinygltf Nicolas Graves via Guix-patches via
2024-05-14 19:45 ` [bug#70319] [PATCH v2 2/2] gnu: Add draco Nicolas Graves via Guix-patches via
2024-05-15 10:05 ` bug#70319: [PATCH 0/2] Add Draco (3d graphics compression) Guillaume Le Vaillant
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=769daf7ae2277aecea26723b2a8e3165aa92e146.1712707652.git.monego@posteo.net \
--to=monego@posteo.net \
--cc=70319@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.