unofficial mirror of guix-patches@gnu.org 
 help / color / Atom feed
* [bug#40495] [PATCH] Add taisei, and spirv-cross
@ 2020-04-07 19:52 Vitaliy Shatrov via Guix-patches via
  2020-04-08  6:54 ` Vitaliy Shatrov via Guix-patches via
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-04-07 19:52 UTC (permalink / raw)
  To: 40495


[-- Attachment #1.1: Type: text/plain, Size: 710 bytes --]

Hi;  taisei is a game, it has three renderers: gl33, gles20, and gles30.  To support later two it need a SPIRV-Cross tool.

   I was told on IRC that the game wasn't playable due to graphics issues, but it worked fine on my machine;  testing and help are welcome.

Game build is "developer" build; it enables cheats, but greatly improves the diagnostics (output to console).  If configured as "debugoptimized" with "-Ddeveloper=false", then it's diagnostics are same as for "release".  I didn't notice any impact on performance with my 7-years old laptop, from those options.

SPIRV-Cross seem to have tests, but i didn't get how to start them yet.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #1.2: Type: text/html, Size: 1099 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-taisei-and-spirv-cross.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-taisei-and-spirv-cross.patch", Size: 4861 bytes --]

From aa3c292907ac78b3df095867f39289b4a7497472 Mon Sep 17 00:00:00 2001
From: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Date: Wed, 8 Apr 2020 02:28:20 +0700
Subject: [PATCH] gnu: Add taisei, and spirv-cross

* gnu/packages/games.scm  (taisei):      new variable
* gnu/packages/vulkan.scm (spirv-cross): new variable
---
 gnu/packages/games.scm  | 56 +++++++++++++++++++++++++++++++++++++++++
 gnu/packages/vulkan.scm | 31 +++++++++++++++++++++++
 2 files changed, 87 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 1efc50e6d1..711f4779c7 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -10471,3 +10471,59 @@ and shovers to get to the goal.  Race against the clock to collect coins to
 earn extra balls.  Also included is Neverputt, which is a 3D miniature golf
 game.")  ;thanks to Debian for description
       (license license:gpl2+))))
+
+(define-public taisei
+  (package
+    (name "taisei")
+    (version "1.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/taisei-project/"
+                           "taisei/releases/download/v" version
+                           "/taisei-v" version ".tar.xz"))
+       (sha256
+        (base32
+         "11f9mlqmzy1lszwcc1nsbar9q1hs4ml6pbm52hqfd4q0f4x3ln46"))))
+    (build-system meson-build-system)
+    (arguments
+     `(;;configure option developer=true enables the diagnostics
+       ;;needed for bug reports.  it is 'true' if not "release"
+       ;;#:build-type "release"
+       #:configure-flags
+       (list "-Dr_gles30=true"
+             "-Dshader_transpiler=true"
+             "-Dr_gles20=true")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python-docutils" ,python-docutils)
+       ("python-pygments" ,python-pygments)))
+    (inputs
+     `(("freetype" ,freetype)
+       ("libpng" ,libpng)
+       ("libwebp" ,libwebp)
+       ("libzip" ,libzip)
+       ("mesa" ,mesa)
+       ("openssl" ,openssl)
+       ("opusfile" ,opusfile)
+       ("sdl2" ,sdl2)
+       ("sdl2-mixer" ,sdl2-mixer)
+       ("shaderc" ,shaderc)
+       ("spirv-cross" ,spirv-cross)
+       ("zlib" ,zlib)))
+    (home-page "https://taisei-project.org/")
+    (synopsis "Fangame and libre clone of Touhou Project")
+    (description
+     "Taisei is a shoot-em-up game: The player controls a character (one of
+three: \"Good\", \"Bad\", and \"Dead\"), dodges the missiles (lots of it cover
+the screen, but the character's \"hitbox\" is very small), and shoot at the
+adversaries that keep appear on the screen.  At the same time, player lose one
+\"life\" when being hit.  If player are out of \"lives\", it’s a Game Over.
+Player have a few \"Continues\" to keep playing (but without scores).")
+    (license (list license:expat      ;game
+                   license:cc-by4.0   ;resources/00-taisei.pkgdir/bgm/
+                                        ;atlas/portraits/
+                   ;;miscellaneous
+                   license:cc0
+                   license:public-domain))))
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 6a2c219aac..e0a031141f 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -107,6 +107,37 @@ SPIR-V modules.  The project includes an assembler, binary module
 parser,disassembler, validator, and optimizer for SPIR-V.")
     (license license:asl2.0)))
 
+(define-public spirv-cross
+  (package
+    (name "spirv-cross")
+    (version "2020-04-03")
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/KhronosGroup/SPIRV-Cross")
+            (commit (string-append version))))
+      (sha256
+       (base32 "0489s29kqgq20clxqg22y299yxz23p0yjh87yhka705hm9skx4sa"))
+      (file-name (git-file-name name version))))
+    (build-system cmake-build-system)
+    (arguments  ;TODO: solve "No tests were found!!!"
+     `(#:configure-flags
+       (list "-DSPIRV_CROSS_SHARED=YES")))
+    (inputs `(("spirv-headers" ,spirv-headers)))
+    (native-inputs `(("pkg-config" ,pkg-config)
+                     ("python" ,python)))
+    (home-page "https://github.com/KhronosGroup/SPIRV-Cross")
+    (synopsis "Parser for and converter of SPIR-V to other shader languages")
+    (description
+     "SPIRV-Cross tries hard to emit readable and clean output from the
+SPIR-V.  The goal is to emit GLSL or MSL that looks like it was written by a
+human and not awkward IR/assembly-like code.  NOTE: Individual features are
+expected to be mostly complete, but it is possible that certain obscure GLSL
+features are not yet supported.  However, most missing features are expected
+to be \"trivial\" improvements at this stage.")
+    (license license:asl2.0)))
+
 (define-public glslang
   (package
     (name "glslang")
-- 
2.25.1


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

* [bug#40495] [PATCH] Add taisei, and spirv-cross
  2020-04-07 19:52 [bug#40495] [PATCH] Add taisei, and spirv-cross Vitaliy Shatrov via Guix-patches via
@ 2020-04-08  6:54 ` Vitaliy Shatrov via Guix-patches via
  2020-04-10 17:13   ` Nicolas Goaziou
  2020-04-11  7:31 ` [bug#40495] Update Vitaliy Shatrov via Guix-patches via
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-04-08  6:54 UTC (permalink / raw)
  To: 40495

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

UPDATE:  Game reported playable with gles30 instead of default gl33 (both work for me, so maybe we need to change the default?)
http://logs.guix.gnu.org/2020-04-07.log#163939

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #2: Type: text/html, Size: 577 bytes --]

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

* [bug#40495] [PATCH] Add taisei, and spirv-cross
  2020-04-08  6:54 ` Vitaliy Shatrov via Guix-patches via
@ 2020-04-10 17:13   ` Nicolas Goaziou
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2020-04-10 17:13 UTC (permalink / raw)
  To: 40495; +Cc: D0dyBo0D0dyBo0

Hello,

Vitaliy Shatrov via Guix-patches via <guix-patches@gnu.org> writes:

> UPDATE:  Game reported playable with gles30 instead of default gl33 (both work for me, so maybe we need to change the default?)
> http://logs.guix.gnu.org/2020-04-07.log#163939

FWIW gl33 works fine here. 

Some notes: you can drop quotes from descrption. They are not needed an
"..." is not a correct quoting in Texinfo.

Also, I'm not sure the last part of the description is useful. I mean,
this is the same for many arcade games, isn't it?

OOC, don't use need to add (recursive? #t) to `url'?

Regards,

-- 
Nicolas Goaziou

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

* [bug#40495] Update
  2020-04-07 19:52 [bug#40495] [PATCH] Add taisei, and spirv-cross Vitaliy Shatrov via Guix-patches via
  2020-04-08  6:54 ` Vitaliy Shatrov via Guix-patches via
@ 2020-04-11  7:31 ` Vitaliy Shatrov via Guix-patches via
  2020-04-11 11:11 ` [bug#40495] v2, spirv tests steel fail Vitaliy Shatrov via Guix-patches via
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-04-11  7:31 UTC (permalink / raw)
  To: 40495

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

(substitute* "CMakeLists.txt" with assoc-refs of respective tools enable tests... will refine further.  Thanks for a kick.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #2: Type: text/html, Size: 450 bytes --]

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

* [bug#40495] v2, spirv tests steel fail
  2020-04-07 19:52 [bug#40495] [PATCH] Add taisei, and spirv-cross Vitaliy Shatrov via Guix-patches via
  2020-04-08  6:54 ` Vitaliy Shatrov via Guix-patches via
  2020-04-11  7:31 ` [bug#40495] Update Vitaliy Shatrov via Guix-patches via
@ 2020-04-11 11:11 ` Vitaliy Shatrov via Guix-patches via
  2020-04-11 12:29 ` [bug#40495] v3-- fixed indentation Vitaliy Shatrov via Guix-patches via
  2020-04-12  4:10 ` [bug#40495] update Vitaliy Shatrov via Guix-patches via
  4 siblings, 0 replies; 9+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-04-11 11:11 UTC (permalink / raw)
  To: 40495


[-- Attachment #1.1: Type: text/plain, Size: 471 bytes --]

>>> gl33 works
gl33: http://logs.guix.gnu.org/guix/2020-04-07.log#115246
Please also test with gles30 (it's default now).

>>> quotes, description
removed, cut.

>>> (recursive? #t)
spirv-cross:  gives nothing (to me at least).  I'd used `substitute*` to make tests work, but they're fail.
spirv-tools is a dependency for spirv-cross tests, and spirv-tools tests also fails.  Tests fails, idk how to fix them.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #1.2: Type: text/html, Size: 962 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-taisei-and-spirv-cross.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-taisei-and-spirv-cross.patch", Size: 5667 bytes --]

From c39a46fabdd33aafa00c7f190bbc4e11b6e3aae7 Mon Sep 17 00:00:00 2001
From: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Date: Sat, 11 Apr 2020 18:02:59 +0700
Subject: [PATCH] gnu: Add taisei, and spirv-cross

* gnu/packages/games.scm  (taisei):      new variable
* gnu/packages/vulkan.scm (spirv-cross): new variable
---
 gnu/packages/games.scm  | 55 +++++++++++++++++++++++++++++++++++++++++
 gnu/packages/vulkan.scm | 51 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4f5bca866e..26da35176a 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -10471,3 +10471,58 @@ and shovers to get to the goal.  Race against the clock to collect coins to
 earn extra balls.  Also included is Neverputt, which is a 3D miniature golf
 game.")  ;thanks to Debian for description
       (license license:gpl2+))))
+
+(define-public taisei
+  (package
+    (name "taisei")
+    (version "1.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/taisei-project/"
+                           "taisei/releases/download/v" version
+                           "/taisei-v" version ".tar.xz"))
+       (sha256
+        (base32
+         "11f9mlqmzy1lszwcc1nsbar9q1hs4ml6pbm52hqfd4q0f4x3ln46"))))
+    (build-system meson-build-system)
+    (arguments
+     `(;;configure option developer=true enables the diagnostics
+       ;;needed for bug reports.  it is 'true' if not "release"
+       ;;#:build-type "release"
+       #:configure-flags
+       (list "-Dr_default=gles30"
+             "-Dr_gles20=true"
+             "-Dr_gles30=true"
+             "-Dshader_transpiler=true")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python-docutils" ,python-docutils)
+       ("python-pygments" ,python-pygments)))
+    (inputs
+     `(("freetype" ,freetype)
+       ("libpng" ,libpng)
+       ("libwebp" ,libwebp)
+       ("libzip" ,libzip)
+       ("mesa" ,mesa)
+       ("openssl" ,openssl)
+       ("opusfile" ,opusfile)
+       ("sdl2" ,sdl2)
+       ("sdl2-mixer" ,sdl2-mixer)
+       ("shaderc" ,shaderc)
+       ("spirv-cross" ,spirv-cross)
+       ("zlib" ,zlib)))
+    (home-page "https://taisei-project.org/")
+    (synopsis "Fangame and libre clone of Touhou Project")
+    (description
+     "Taisei is a shoot-em-up game: The player controls a character (one of
+three: Good, Bad, and Dead), dodges the missiles (lots of it cover the screen,
+but the character's hitbox is very small), and shoot at the adversaries that
+keep appear on the screen.")
+    (license (list license:expat      ;game
+                   license:cc-by4.0   ;resources/00-taisei.pkgdir/bgm/
+                                        ;atlas/portraits/
+                   ;;miscellaneous
+                   license:cc0
+                   license:public-domain))))
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 6a2c219aac..39dd5215b6 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -107,6 +107,57 @@ SPIR-V modules.  The project includes an assembler, binary module
 parser,disassembler, validator, and optimizer for SPIR-V.")
     (license license:asl2.0)))
 
+(define-public spirv-cross
+  (package
+    (name "spirv-cross")
+    (version "2020-04-03")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/KhronosGroup/SPIRV-Cross")
+             (commit (string-append version))))
+       (sha256
+        (base32
+         "0489s29kqgq20clxqg22y299yxz23p0yjh87yhka705hm9skx4sa"))
+       (file-name (git-file-name name version))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f  ;FIXME: Tests fail.
+       #:configure-flags
+       (list "-DSPIRV_CROSS_SHARED=YES")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-tests-to-find-deps
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "CMakeLists.txt"
+               (((string-append "PATHS "
+                                "\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}"
+                                "/external/glslang-build/output/bin"))
+                (string-append "PATHS "
+                               (assoc-ref inputs "glslang") "/bin")))
+             (substitute* "CMakeLists.txt"
+               (((string-append "PATHS "
+                                "\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}"
+                                "/external/spirv-tools-build/output/bin"))
+                (string-append "PATHS "
+                               (assoc-ref inputs "spirv-tools") "/bin")))
+             #t)))))
+    (native-inputs `(("glslang" ,glslang)
+                     ("python" ,python)
+                     ("spirv-headers" ,spirv-headers)
+                     ("spirv-tools" ,spirv-tools)))
+       (home-page "https://github.com/KhronosGroup/SPIRV-Cross")
+       (synopsis "Parser for and converter of SPIR-V to other shader languages")
+       (description
+        "SPIRV-Cross tries hard to emit readable and clean output from the
+SPIR-V.  The goal is to emit GLSL or MSL that looks like it was written by a
+human and not awkward IR/assembly-like code.  NOTE: Individual features are
+expected to be mostly complete, but it is possible that certain obscure GLSL
+features are not yet supported.  However, most missing features are expected
+to be \"trivial\" improvements at this stage.")
+       (license license:asl2.0)))
+
 (define-public glslang
   (package
     (name "glslang")
-- 
2.26.0


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

* [bug#40495] v3-- fixed indentation
  2020-04-07 19:52 [bug#40495] [PATCH] Add taisei, and spirv-cross Vitaliy Shatrov via Guix-patches via
                   ` (2 preceding siblings ...)
  2020-04-11 11:11 ` [bug#40495] v2, spirv tests steel fail Vitaliy Shatrov via Guix-patches via
@ 2020-04-11 12:29 ` Vitaliy Shatrov via Guix-patches via
  2020-04-11 20:23   ` Nicolas Goaziou
  2020-04-12  4:10 ` [bug#40495] update Vitaliy Shatrov via Guix-patches via
  4 siblings, 1 reply; 9+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-04-11 12:29 UTC (permalink / raw)
  To: 40495


[-- Attachment #1.1: Type: text/plain, Size: 72 bytes --]

i'm sorry.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #1.2: Type: text/html, Size: 314 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-taisei-and-spirv-cross.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-taisei-and-spirv-cross.patch", Size: 5652 bytes --]

From c4135b2f783e1c6f042a24b4575092f6fc0fc9a6 Mon Sep 17 00:00:00 2001
From: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Date: Sat, 11 Apr 2020 19:26:39 +0700
Subject: [PATCH] gnu: Add taisei, and spirv-cross

* gnu/packages/games.scm  (taisei):      new variable
* gnu/packages/vulkan.scm (spirv-cross): new variable
---
 gnu/packages/games.scm  | 55 +++++++++++++++++++++++++++++++++++++++++
 gnu/packages/vulkan.scm | 51 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4f5bca866e..26da35176a 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -10471,3 +10471,58 @@ and shovers to get to the goal.  Race against the clock to collect coins to
 earn extra balls.  Also included is Neverputt, which is a 3D miniature golf
 game.")  ;thanks to Debian for description
       (license license:gpl2+))))
+
+(define-public taisei
+  (package
+    (name "taisei")
+    (version "1.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/taisei-project/"
+                           "taisei/releases/download/v" version
+                           "/taisei-v" version ".tar.xz"))
+       (sha256
+        (base32
+         "11f9mlqmzy1lszwcc1nsbar9q1hs4ml6pbm52hqfd4q0f4x3ln46"))))
+    (build-system meson-build-system)
+    (arguments
+     `(;;configure option developer=true enables the diagnostics
+       ;;needed for bug reports.  it is 'true' if not "release"
+       ;;#:build-type "release"
+       #:configure-flags
+       (list "-Dr_default=gles30"
+             "-Dr_gles20=true"
+             "-Dr_gles30=true"
+             "-Dshader_transpiler=true")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python-docutils" ,python-docutils)
+       ("python-pygments" ,python-pygments)))
+    (inputs
+     `(("freetype" ,freetype)
+       ("libpng" ,libpng)
+       ("libwebp" ,libwebp)
+       ("libzip" ,libzip)
+       ("mesa" ,mesa)
+       ("openssl" ,openssl)
+       ("opusfile" ,opusfile)
+       ("sdl2" ,sdl2)
+       ("sdl2-mixer" ,sdl2-mixer)
+       ("shaderc" ,shaderc)
+       ("spirv-cross" ,spirv-cross)
+       ("zlib" ,zlib)))
+    (home-page "https://taisei-project.org/")
+    (synopsis "Fangame and libre clone of Touhou Project")
+    (description
+     "Taisei is a shoot-em-up game: The player controls a character (one of
+three: Good, Bad, and Dead), dodges the missiles (lots of it cover the screen,
+but the character's hitbox is very small), and shoot at the adversaries that
+keep appear on the screen.")
+    (license (list license:expat      ;game
+                   license:cc-by4.0   ;resources/00-taisei.pkgdir/bgm/
+                                        ;atlas/portraits/
+                   ;;miscellaneous
+                   license:cc0
+                   license:public-domain))))
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 6a2c219aac..962670b36d 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -107,6 +107,57 @@ SPIR-V modules.  The project includes an assembler, binary module
 parser,disassembler, validator, and optimizer for SPIR-V.")
     (license license:asl2.0)))
 
+(define-public spirv-cross
+  (package
+    (name "spirv-cross")
+    (version "2020-04-03")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/KhronosGroup/SPIRV-Cross")
+             (commit (string-append version))))
+       (sha256
+        (base32
+         "0489s29kqgq20clxqg22y299yxz23p0yjh87yhka705hm9skx4sa"))
+       (file-name (git-file-name name version))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f  ;FIXME: Tests fail.
+       #:configure-flags
+       (list "-DSPIRV_CROSS_SHARED=YES")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-tests-to-find-deps
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "CMakeLists.txt"
+               (((string-append "PATHS "
+                                "\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}"
+                                "/external/glslang-build/output/bin"))
+                (string-append "PATHS "
+                               (assoc-ref inputs "glslang") "/bin")))
+             (substitute* "CMakeLists.txt"
+               (((string-append "PATHS "
+                                "\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}"
+                                "/external/spirv-tools-build/output/bin"))
+                (string-append "PATHS "
+                               (assoc-ref inputs "spirv-tools") "/bin")))
+             #t)))))
+    (native-inputs `(("glslang" ,glslang)
+                     ("python" ,python)
+                     ("spirv-headers" ,spirv-headers)
+                     ("spirv-tools" ,spirv-tools)))
+    (home-page "https://github.com/KhronosGroup/SPIRV-Cross")
+    (synopsis "Parser for and converter of SPIR-V to other shader languages")
+    (description
+     "SPIRV-Cross tries hard to emit readable and clean output from the
+SPIR-V.  The goal is to emit GLSL or MSL that looks like it was written by a
+human and not awkward IR/assembly-like code.  NOTE: Individual features are
+expected to be mostly complete, but it is possible that certain obscure GLSL
+features are not yet supported.  However, most missing features are expected
+to be \"trivial\" improvements at this stage.")
+    (license license:asl2.0)))
+
 (define-public glslang
   (package
     (name "glslang")
-- 
2.26.0


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

* [bug#40495] v3-- fixed indentation
  2020-04-11 12:29 ` [bug#40495] v3-- fixed indentation Vitaliy Shatrov via Guix-patches via
@ 2020-04-11 20:23   ` Nicolas Goaziou
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2020-04-11 20:23 UTC (permalink / raw)
  To: 40495; +Cc: D0dyBo0D0dyBo0

Hello,

Vitaliy Shatrov via Guix-patches via <guix-patches@gnu.org> writes:

> Subject: [PATCH] gnu: Add taisei, and spirv-cross
>
> * gnu/packages/games.scm  (taisei):      new variable
> * gnu/packages/vulkan.scm (spirv-cross): new variable

It works nicely, thank you.

> +     `(;;configure option developer=true enables the diagnostics
> +       ;;needed for bug reports.  it is 'true' if not "release"
> +       ;;#:build-type "release"

So, what do you suggest here? Use release or developer build?

> +    (synopsis "Fangame and libre clone of Touhou Project")

I would suggest something like

  Shoot'em up game set in a world full of Japanese folklore

> +    (description
> +     "Taisei is a shoot-em-up game: The player controls a character (one of
> +three: Good, Bad, and Dead), dodges the missiles (lots of it cover the screen,
> +but the character's hitbox is very small), and shoot at the adversaries that
> +keep appear on the screen.")


> +    (license (list license:expat      ;game
> +                   license:cc-by4.0   ;resources/00-taisei.pkgdir/bgm/
> +                                        ;atlas/portraits/
> +                   ;;miscellaneous
> +                   license:cc0
> +                   license:public-domain))))

It would be clearer to explain in a comment above the license field what
is subject to what terms.

> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/KhronosGroup/SPIRV-Cross")
> +             (commit (string-append version))))

You can remove the `string-append' here.

> +       (sha256
> +        (base32
> +         "0489s29kqgq20clxqg22y299yxz23p0yjh87yhka705hm9skx4sa"))
> +       (file-name (git-file-name name version))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     `(#:tests? #f  ;FIXME: Tests fail.

IMO, this is not a blocker. However, if you have more information than
"Tests fail", it would be nice to add it in a comment.

> +       #:configure-flags
> +       (list "-DSPIRV_CROSS_SHARED=YES")
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'fix-tests-to-find-deps
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (substitute* "CMakeLists.txt"
> +               (((string-append "PATHS "
> +                                "\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}"
> +                                "/external/glslang-build/output/bin"))

Why do you need this? What about simply writing the full string without
`string-append'?

> +             (substitute* "CMakeLists.txt"
> +               (((string-append "PATHS "
> +                                "\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}"
> +                                "/external/spirv-tools-build/output/bin"))

Ditto.

> +    (native-inputs `(("glslang" ,glslang)
> +                     ("python" ,python)
> +                     ("spirv-headers" ,spirv-headers)
> +                     ("spirv-tools" ,spirv-tools)))

Nitpick: I would move the inputs below the `native-inputs' line.

> +    (description
> +     "SPIRV-Cross tries hard to emit readable and clean output from the
> +SPIR-V.  The goal is to emit GLSL or MSL that looks like it was written by a
> +human and not awkward IR/assembly-like code.  NOTE: Individual features are

You can drop the "NOTE:" prefix. 

Actually, I think you can drop everything after "NOTE:". Is it useful
information for someone looking at the package?

> +expected to be mostly complete, but it is possible that certain obscure GLSL
> +features are not yet supported.  However, most missing features are expected
> +to be \"trivial\" improvements at this stage.")

If you disagree with my suggestion, you need to remove these double
quotes. Texinfo uses ``trivial'', but you could also write
@emph{trivial}.

Regards,

-- 
Nicolas Goaziou

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

* [bug#40495] update
  2020-04-07 19:52 [bug#40495] [PATCH] Add taisei, and spirv-cross Vitaliy Shatrov via Guix-patches via
                   ` (3 preceding siblings ...)
  2020-04-11 12:29 ` [bug#40495] v3-- fixed indentation Vitaliy Shatrov via Guix-patches via
@ 2020-04-12  4:10 ` Vitaliy Shatrov via Guix-patches via
  2020-06-30 15:27   ` Nicolas Goaziou
  4 siblings, 1 reply; 9+ messages in thread
From: Vitaliy Shatrov via Guix-patches via @ 2020-04-12  4:10 UTC (permalink / raw)
  To: 40495


[-- Attachment #1.1: Type: text/plain, Size: 923 bytes --]

### taisei ###
>>> 'release' or 'developer'?
   IDK how valuable those diagnostics is, but during testing found the 'developer' mode cheat-keys to easy to hit.  Changed to 'release'.

>>> (synopsis "Shoot'em up game set in a world full of Japanese folklore")
   I know nothing about Japan (seen this variant too).  Changed to "Shoot'em up fangame and libre clone of Touhou Project"..?

>>> comments in '(license'
done

### spirv-cross ###
>>> remove '(string-append' from '(commit'
done

>>> tests fail, more info
nckx may know (idk, sorry): http://logs.guix.gnu.org/guix/2020-04-11.log#172304
("-cross yet have a multiple failures").

>>> (substitute*
Why: 'fix-tests-to-find-deps, i can't fix tests myself, thought i'm prepare the ground.
'(string-append' is to stay < 80 cols.

>>> (native-inputs, (inputs order
seems done

>>> drop 'note:', \"
done
________

Sent with [ProtonMail](https://protonmail.com) Secure Email.

[-- Attachment #1.2: Type: text/html, Size: 1725 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-taisei-and-spirv-cross.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-taisei-and-spirv-cross.patch", Size: 5308 bytes --]

From 0440101d84decf1e8cb21904dbf4258dcf12335b Mon Sep 17 00:00:00 2001
From: Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com>
Date: Sun, 12 Apr 2020 11:08:30 +0700
Subject: [PATCH] gnu: Add taisei, and spirv-cross

* gnu/packages/games.scm  (taisei):      new variable
* gnu/packages/vulkan.scm (spirv-cross): new variable
---
 gnu/packages/games.scm  | 54 +++++++++++++++++++++++++++++++++++++++++
 gnu/packages/vulkan.scm | 48 ++++++++++++++++++++++++++++++++++++
 2 files changed, 102 insertions(+)

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 31e1936795..82b47d4643 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -10534,3 +10534,57 @@ and shovers to get to the goal.  Race against the clock to collect coins to
 earn extra balls.  Also included is Neverputt, which is a 3D miniature golf
 game.")  ;thanks to Debian for description
       (license license:gpl2+))))
+
+(define-public taisei
+  (package
+    (name "taisei")
+    (version "1.3.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/taisei-project/"
+                           "taisei/releases/download/v" version
+                           "/taisei-v" version ".tar.xz"))
+       (sha256
+        (base32
+         "11f9mlqmzy1lszwcc1nsbar9q1hs4ml6pbm52hqfd4q0f4x3ln46"))))
+    (build-system meson-build-system)
+    (arguments
+     `(#:build-type "release"  ;comment out for bug-reporting (and cheats)
+       #:configure-flags
+       (list "-Dr_default=gles30"
+             "-Dr_gles20=true"
+             "-Dr_gles30=true"
+             "-Dshader_transpiler=true")))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("python" ,python)
+       ("python-docutils" ,python-docutils)
+       ("python-pygments" ,python-pygments)))
+    (inputs
+     `(("freetype" ,freetype)
+       ("libpng" ,libpng)
+       ("libwebp" ,libwebp)
+       ("libzip" ,libzip)
+       ("mesa" ,mesa)
+       ("openssl" ,openssl)
+       ("opusfile" ,opusfile)
+       ("sdl2" ,sdl2)
+       ("sdl2-mixer" ,sdl2-mixer)
+       ("shaderc" ,shaderc)
+       ("spirv-cross" ,spirv-cross)
+       ("zlib" ,zlib)))
+    (home-page "https://taisei-project.org/")
+    (synopsis "Shoot'em up fangame and libre clone of Touhou Project")
+    (description
+     "The player controls a character (one of three: Good, Bad, and Dead),
+dodges the missiles (lots of it cover the screen, but the character's hitbox
+is very small), and shoot at the adversaries that keep appear on the screen.")
+    (license (list ;;game
+                   license:expat
+                   ;;resources/00-taisei.pkgdir/bgm/
+                   ;;atlas/portraits/
+                   license:cc-by4.0
+                   ;;miscellaneous
+                   license:cc0
+                   license:public-domain))))
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 6a2c219aac..f8ab357349 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -107,6 +107,54 @@ SPIR-V modules.  The project includes an assembler, binary module
 parser,disassembler, validator, and optimizer for SPIR-V.")
     (license license:asl2.0)))
 
+(define-public spirv-cross
+  (package
+    (name "spirv-cross")
+    (version "2020-04-03")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/KhronosGroup/SPIRV-Cross")
+             (commit version)))
+       (sha256
+        (base32
+         "0489s29kqgq20clxqg22y299yxz23p0yjh87yhka705hm9skx4sa"))
+       (file-name (git-file-name name version))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f  ;FIXME: Tests fail.
+       #:configure-flags
+       (list "-DSPIRV_CROSS_SHARED=YES")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-tests-to-find-deps
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "CMakeLists.txt"
+               (((string-append "PATHS "
+                                "\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}"
+                                "/external/glslang-build/output/bin"))
+                (string-append "PATHS "
+                               (assoc-ref inputs "glslang") "/bin")))
+             (substitute* "CMakeLists.txt"
+               (((string-append "PATHS "
+                                "\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}"
+                                "/external/spirv-tools-build/output/bin"))
+                (string-append "PATHS "
+                               (assoc-ref inputs "spirv-tools") "/bin")))
+             #t)))))
+    (native-inputs `(("glslang" ,glslang)
+                     ("python" ,python)
+                     ("spirv-headers" ,spirv-headers)
+                     ("spirv-tools" ,spirv-tools)))
+    (home-page "https://github.com/KhronosGroup/SPIRV-Cross")
+    (synopsis "Parser for and converter of SPIR-V to other shader languages")
+    (description
+     "SPIRV-Cross tries hard to emit readable and clean output from the
+SPIR-V.  The goal is to emit GLSL or MSL that looks like it was written by a
+human and not awkward IR/assembly-like code.")
+    (license license:asl2.0)))
+
 (define-public glslang
   (package
     (name "glslang")
-- 
2.26.0


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

* [bug#40495] update
  2020-04-12  4:10 ` [bug#40495] update Vitaliy Shatrov via Guix-patches via
@ 2020-06-30 15:27   ` Nicolas Goaziou
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2020-06-30 15:27 UTC (permalink / raw)
  To: 40495; +Cc: 40495-done, Vitaliy Shatrov

Hello,

Vitaliy Shatrov via Guix-patches via <guix-patches@gnu.org> writes:

> Subject: [PATCH] gnu: Add taisei, and spirv-cross

Sorry for the looong delay!

spirv-cross was recently updated and added to Guix. I pushed taisei.

Thank you!

Regards,
-- 
Nicolas Goaziou




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

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 19:52 [bug#40495] [PATCH] Add taisei, and spirv-cross Vitaliy Shatrov via Guix-patches via
2020-04-08  6:54 ` Vitaliy Shatrov via Guix-patches via
2020-04-10 17:13   ` Nicolas Goaziou
2020-04-11  7:31 ` [bug#40495] Update Vitaliy Shatrov via Guix-patches via
2020-04-11 11:11 ` [bug#40495] v2, spirv tests steel fail Vitaliy Shatrov via Guix-patches via
2020-04-11 12:29 ` [bug#40495] v3-- fixed indentation Vitaliy Shatrov via Guix-patches via
2020-04-11 20:23   ` Nicolas Goaziou
2020-04-12  4:10 ` [bug#40495] update Vitaliy Shatrov via Guix-patches via
2020-06-30 15:27   ` Nicolas Goaziou

unofficial mirror of guix-patches@gnu.org 

Archives are clonable:
	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git