all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#70319] [PATCH 0/2] Add Draco (3d graphics compression).
@ 2024-04-10  0:10 Vinicius Monego
  2024-04-10  0:12 ` [bug#70319] [PATCH 1/2] gnu: Add tinygltf Vinicius Monego
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Vinicius Monego @ 2024-04-10  0:10 UTC (permalink / raw)
  To: 70319; +Cc: Vinicius Monego

Vinicius Monego (2):
  gnu: Add tinygltf.
  gnu: Add draco.

 gnu/packages/compression.scm | 42 +++++++++++++++++++++++++++++++++
 gnu/packages/graphics.scm    | 45 ++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)


base-commit: 51de844a0ff6ea224367a384092896bce6848b9f
-- 
2.39.2





^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#70319] [PATCH 1/2] gnu: Add tinygltf.
  2024-04-10  0:10 [bug#70319] [PATCH 0/2] Add Draco (3d graphics compression) Vinicius Monego
@ 2024-04-10  0:12 ` Vinicius Monego
  2024-05-14 12:33   ` Nicolas Graves via Guix-patches via
  2024-04-10  0:12 ` [bug#70319] [PATCH 2/2] gnu: Add draco Vinicius Monego
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Vinicius Monego @ 2024-04-10  0:12 UTC (permalink / raw)
  To: 70319; +Cc: Vinicius Monego

* 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





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#70319] [PATCH 2/2] gnu: Add draco.
  2024-04-10  0:10 [bug#70319] [PATCH 0/2] Add Draco (3d graphics compression) Vinicius Monego
  2024-04-10  0:12 ` [bug#70319] [PATCH 1/2] gnu: Add tinygltf Vinicius Monego
@ 2024-04-10  0:12 ` Vinicius Monego
  2024-05-14 19:45 ` [bug#70319] [PATCH v2 1/2] gnu: Add tinygltf Nicolas Graves via Guix-patches via
  2024-05-15 10:05 ` bug#70319: [PATCH 0/2] Add Draco (3d graphics compression) Guillaume Le Vaillant
  3 siblings, 0 replies; 7+ messages in thread
From: Vinicius Monego @ 2024-04-10  0:12 UTC (permalink / raw)
  To: 70319; +Cc: Vinicius Monego

* gnu/packages/compression.scm (draco): New variable.

Change-Id: Ibba9180ac2ee176aa445684472fa7d34327f8ce5
---
 gnu/packages/compression.scm | 42 ++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 02a20e5c62..cbed6d947c 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -71,6 +71,7 @@ (define-module (gnu packages compression)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages backup)
@@ -79,6 +80,7 @@ (define-module (gnu packages compression)
   #:use-module (gnu packages benchmark)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages file)
@@ -86,6 +88,7 @@ (define-module (gnu packages compression)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages graphics)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages java)
   #:use-module (gnu packages llvm)
@@ -831,6 +834,45 @@ (define-public sfarkxtc
 sfArk file format to the uncompressed sf2 format.")
       (license license:gpl3+))))
 
+(define-public draco
+  (package
+    (name "draco")
+    (version "1.5.7")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/google/draco")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1v1idvqr9mww9wi36yzb10lq66ls78dlrgnxchjjjv5paw2g0mk3"))))
+    (build-system cmake-build-system)
+    (inputs (list eigen gulrak-filesystem tinygltf))
+    (arguments
+     ;; There is a testdata directory but apparently no actual tests.
+     (list #:tests? #f
+           #:configure-flags
+           #~(list "-DBUILD_SHARED_LIBS=true"
+                   (string-append "-DDRACO_EIGEN_PATH="
+                                  #$(this-package-input "eigen"))
+                   (string-append "-DDRACO_FILESYSTEM_PATH="
+                                  #$(this-package-input "gulrak-filesystem"))
+                   (string-append "-DDRACO_TINYGLTF_PATH="
+                                  #$(this-package-input "tinygltf")))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'delete-static-lib
+                 (lambda _
+                   (delete-file (string-append #$output
+                                               "/lib/libdraco.a")))))))
+    (home-page "https://google.github.io/draco/")
+    (synopsis "Compress and decompress 3D geometric meshes and point clouds")
+    (description "Draco is a library for compressing and decompressing 3D
+geometric meshes and point clouds.  It is intended to improve the storage and
+transmission of 3D graphics.")
+    (license license:asl2.0)))
+
 (define-public libmspack
   (package
     (name "libmspack")
-- 
2.39.2





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#70319] [PATCH 1/2] gnu: Add tinygltf.
  2024-04-10  0:12 ` [bug#70319] [PATCH 1/2] gnu: Add tinygltf Vinicius Monego
@ 2024-05-14 12:33   ` Nicolas Graves via Guix-patches via
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-05-14 12:33 UTC (permalink / raw)
  To: Vinicius Monego, 70319; +Cc: Vinicius Monego

On 2024-04-10 00:12, Vinicius Monego wrote:

> * 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"))

These are pretty big files. It would be more adapated to remove them in
a snippet from origin. This is because it avoids them in the nar archive
in Guix substitute servers.

Plus, it seems that we can possibly also remove catch, which is packaged
in Guix.

> +              (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)))

If we can't remove catch, we should add a Boost license : 
https://github.com/syoyo/tinygltf/tree/v2.8.21?tab=readme-ov-file#third-party-licenses

> +
>  (define-public monado
>    (package
>      (name "monado")

-- 
Best regards,
Nicolas Graves




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#70319] [PATCH v2 1/2] gnu: Add tinygltf.
  2024-04-10  0:10 [bug#70319] [PATCH 0/2] Add Draco (3d graphics compression) Vinicius Monego
  2024-04-10  0:12 ` [bug#70319] [PATCH 1/2] gnu: Add tinygltf Vinicius Monego
  2024-04-10  0:12 ` [bug#70319] [PATCH 2/2] gnu: Add draco Vinicius Monego
@ 2024-05-14 19:45 ` 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
  3 siblings, 1 reply; 7+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-05-14 19:45 UTC (permalink / raw)
  To: 70319; +Cc: Vinicius Monego, ngraves

From: Vinicius Monego <monego@posteo.net>

* gnu/packages/graphics.scm (tinygltf): New variable.

Change-Id: I749ced85142b8dd2ebbe916533f27bf6d167bbff
---
 gnu/packages/graphics.scm | 67 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index ca2d74224f1..fd0330c0b6f 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -2413,6 +2413,73 @@ (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"))
+       (modules '((guix build utils)))
+       (snippet #~(begin
+                    (for-each delete-file-recursively
+                              (list "examples" ".github"))
+                    ;; tinygltf bundles json, stb-image and stb-image-write
+                    ;; headers. Delete those, and use symlink ours instead.
+                    (for-each delete-file
+                              (list "json.hpp"
+                                    "stb_image.h"
+                                    "stb_image_write.h"
+                                    "tests/catch.hpp"))))))
+    (build-system cmake-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'use-our-packages
+            (lambda* (#:key inputs #:allow-other-keys)
+              (symlink (search-input-file inputs "include/nlohmann/json.hpp")
+                       "json.hpp")
+              (symlink (search-input-file inputs "include/stb_image.h")
+                       "stb_image.h")
+              (symlink (search-input-file inputs "include/stb_image_write.h")
+                       "stb_image_write.h")
+              (symlink (search-input-file inputs "include/catch.hpp")
+                       "catch.hpp")))
+          (add-after 'install 'delete-static-lib
+            (lambda _
+              (delete-file (string-append #$output
+                                          "/lib/libtinygltf.a"))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (if tests?
+                  (with-directory-excursion "../source/tests"
+                    (invoke "make")
+                    (invoke "./tester")
+                    (invoke "./tester_noexcept"))
+                  (format #t "test suite not run~%")))))))
+    (inputs (list nlohmann-json stb-image stb-image-write))
+    (native-inputs (list catch-framework clang))
+    (home-page "https://github.com/syoyo/tinygltf")
+    (synopsis "Header only GL Transmission Format library")
+    (description "This package provides a header only C++11
+@url{https://github.com/KhronosGroup/glTF, glTF} (GL Transmission Format) 2.0
+library.
+
+GL Transmission Format (glTF) is a royalty-free specification for the
+efficient transmission and loading of 3D scenes and models by applications.
+glTF minimizes both the size of 3D assets, and the runtime processing needed
+to unpack and use those assets. glTF defines an extensible, common publishing
+format for 3D content tools and services that streamlines authoring workflows
+and enables interoperable use of content across the industry.")
+    (license license:expat)))
+
 (define-public monado
   (package
     (name "monado")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#70319] [PATCH v2 2/2] gnu: Add draco.
  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   ` Nicolas Graves via Guix-patches via
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Graves via Guix-patches via @ 2024-05-14 19:45 UTC (permalink / raw)
  To: 70319; +Cc: Vinicius Monego, ngraves

From: Vinicius Monego <monego@posteo.net>

* gnu/packages/compression.scm (draco): New variable.

Change-Id: Ibba9180ac2ee176aa445684472fa7d34327f8ce5
---
 gnu/packages/compression.scm | 44 ++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 55784a70deb..dd88fce9ca3 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -71,6 +71,7 @@ (define-module (gnu packages compression)
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages assembly)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages backup)
@@ -79,6 +80,7 @@ (define-module (gnu packages compression)
   #:use-module (gnu packages benchmark)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages cpp)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages file)
@@ -86,6 +88,7 @@ (define-module (gnu packages compression)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
   #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages graphics)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages java)
   #:use-module (gnu packages llvm)
@@ -861,6 +864,47 @@ (define-public sfarkxtc
 sfArk file format to the uncompressed sf2 format.")
       (license license:gpl3+))))
 
+(define-public draco
+  (package
+    (name "draco")
+    (version "1.5.7")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/google/draco")
+                    (commit version)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1v1idvqr9mww9wi36yzb10lq66ls78dlrgnxchjjjv5paw2g0mk3"))))
+    (build-system cmake-build-system)
+    (arguments
+     ;; There is a testdata directory but apparently no actual tests.
+     ;; src/draco/tools/install_test contains a sanity check, but this
+     ;; check is useless here.
+     (list #:tests? #f
+           #:configure-flags
+           #~(list "-DBUILD_SHARED_LIBS=true"
+                   (string-append "-DDRACO_EIGEN_PATH="
+                                  #$(this-package-input "eigen"))
+                   (string-append "-DDRACO_FILESYSTEM_PATH="
+                                  #$(this-package-input "gulrak-filesystem"))
+                   (string-append "-DDRACO_TINYGLTF_PATH="
+                                  #$(this-package-input "tinygltf")))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'delete-static-lib
+                 (lambda _
+                   (delete-file (string-append #$output
+                                               "/lib/libdraco.a")))))))
+    (inputs (list eigen gulrak-filesystem tinygltf))
+    (home-page "https://google.github.io/draco/")
+    (synopsis "Compress and decompress 3D geometric meshes and point clouds")
+    (description "Draco is a library for compressing and decompressing 3D
+geometric meshes and point clouds.  It is intended to improve the storage and
+transmission of 3D graphics.")
+    (license license:asl2.0)))
+
 (define-public libmspack
   (package
     (name "libmspack")
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#70319: [PATCH 0/2] Add Draco (3d graphics compression).
  2024-04-10  0:10 [bug#70319] [PATCH 0/2] Add Draco (3d graphics compression) Vinicius Monego
                   ` (2 preceding siblings ...)
  2024-05-14 19:45 ` [bug#70319] [PATCH v2 1/2] gnu: Add tinygltf Nicolas Graves via Guix-patches via
@ 2024-05-15 10:05 ` Guillaume Le Vaillant
  3 siblings, 0 replies; 7+ messages in thread
From: Guillaume Le Vaillant @ 2024-05-15 10:05 UTC (permalink / raw)
  To: 70319-done

[-- Attachment #1: Type: text/plain, Size: 83 bytes --]

Patches applied as 7f4c9fe5304a4608d47e7526cd886be329d2381e and
following.
Thanks.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-15 10:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10  0:10 [bug#70319] [PATCH 0/2] Add Draco (3d graphics compression) Vinicius Monego
2024-04-10  0:12 ` [bug#70319] [PATCH 1/2] gnu: Add tinygltf Vinicius Monego
2024-05-14 12:33   ` 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

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.