unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39825] [PATCH] gnu: Add warsow-qfusion.
@ 2020-02-28 16:04 Pierre Neidhardt
  2020-02-29 19:13 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Pierre Neidhardt @ 2020-02-28 16:04 UTC (permalink / raw)
  To: 39825

* gnu/packages/game-development.scm (warsow-qfusion): New variable.
* gnu/packages/patches/warsow-fix-bool-return-type.patch: New file.
* gnu/local.mk: Add patch.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/game-development.scm             | 49 +++++++++++++++++++
 .../patches/warsow-fix-bool-return-type.patch | 24 +++++++++
 3 files changed, 74 insertions(+)
 create mode 100644 gnu/packages/patches/warsow-fix-bool-return-type.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 857345cfad..82d5490dd8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1482,6 +1482,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/vsearch-unbundle-cityhash.patch		\
   %D%/packages/patches/vte-CVE-2012-2738-pt1.patch			\
   %D%/packages/patches/vte-CVE-2012-2738-pt2.patch			\
+  %D%/packages/patches/warsow-fix-bool-return-type.patch	\
   %D%/packages/patches/weasyprint-library-paths.patch		\
   %D%/packages/patches/websocketpp-fix-for-boost-1.70.patch	\
   %D%/packages/patches/wicd-bitrate-none-fix.patch		\
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 05e026a846..f0b1b5f066 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -2188,3 +2188,52 @@ rigid body physics library written in C.")
 developers providing an advanced true color console, input, and lots of other
 utilities frequently used in roguelikes.")
     (license license:bsd-3)))
+
+(define-public warsow-qfusion
+  (let ((commit "5ec6887887850fa9e6f0a4418ab2b776f54fb395"))
+    (package
+      (name "warsow-qfusion")
+      (version (git-version "2.1.0" "1" commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/Warsow/qfusion/")
+                      (commit commit)
+                      (recursive? #t)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0bfwyikpwgwqcli33hxscdp557li1hkwyxy069csx5dy6sfvci6q"))
+                ;; Issue reported here: https://github.com/Warsow/qfusion/issues/46
+                (patches (search-patches "warsow-fix-bool-return-type.patch"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #f                    ; No tests.
+         #:configure-flags '("-DQFUSION_GAME=Warsow")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'change-to-build-dir
+             (lambda _
+               (chdir "source")
+               #t)))))
+      (inputs
+       `(("sdl2" ,sdl2)
+         ("libjpeg" ,libjpeg)
+         ("libpng" ,libpng)
+         ("libvorbis" ,libvorbis)
+         ("libogg" ,libogg)
+         ("libtheora" ,libtheora)
+         ("freetype" ,freetype)
+         ("mesa" ,mesa)
+         ("openal" ,openal)
+         ("zlib" ,zlib)
+         ("curl" ,curl)
+         ("qtbase" ,qtbase)
+         ("qtdeclarative" ,qtdeclarative)
+         ("uuid.h" ,util-linux)))
+      (home-page "https://github.com/Warsow/qfusion")
+      (synopsis "Warsow's fork of qfusion, the id Tech 2 derived game engine")
+      (description
+       "This package contains Warsow's fork of qfusion, the id Tech 2 derived
+game engine.  id Tech 2 is the engine originally behind Quake 2.")
+      (license license:gpl2))))
diff --git a/gnu/packages/patches/warsow-fix-bool-return-type.patch b/gnu/packages/patches/warsow-fix-bool-return-type.patch
new file mode 100644
index 0000000000..cd2c58afef
--- /dev/null
+++ b/gnu/packages/patches/warsow-fix-bool-return-type.patch
@@ -0,0 +1,24 @@
+diff --git a/source/ref/imagelib.cpp b/source/ref/imagelib.cpp
+index 33337ac..bb9a156 100644
+--- a/source/ref/imagelib.cpp
++++ b/source/ref/imagelib.cpp
+@@ -762,7 +762,7 @@ static void q_jpg_noop( j_decompress_ptr cinfo ) {
+
+ static boolean q_jpg_fill_input_buffer( j_decompress_ptr cinfo ) {
+ 	Com_DPrintf( "Premature end of jpeg file\n" );
+-	return 1;
++	return TRUE;
+ }
+
+ static void q_jpg_skip_input_data( j_decompress_ptr cinfo, long num_bytes ) {
+@@ -955,7 +955,7 @@ bool WriteJPG( const char *name, r_imginfo_t *info, int quality ) {
+ 	}
+
+ 	// start compression
+-	qjpeg_start_compress( &cinfo, true );
++	qjpeg_start_compress( &cinfo, TRUE );
+
+ 	// feed scanline data
+ 	w3 = cinfo.image_width * info->samples;
+--
+2.25.1
-- 
2.25.1

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

* [bug#39825] [PATCH] gnu: Add warsow-qfusion.
  2020-02-28 16:04 [bug#39825] [PATCH] gnu: Add warsow-qfusion Pierre Neidhardt
@ 2020-02-29 19:13 ` Nicolas Goaziou
  2020-02-29 21:48   ` Tobias Geerinckx-Rice via Guix-patches via
  2020-03-02  8:46   ` Pierre Neidhardt
  0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2020-02-29 19:13 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 39825

Hello,

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> +(define-public warsow-qfusion

Thank you!

> +  (let ((commit "5ec6887887850fa9e6f0a4418ab2b776f54fb395"))
> +    (package
> +      (name "warsow-qfusion")
> +      (version (git-version "2.1.0" "1" commit))

You may add a comment explaining why we don't provide (outdated) stable
version.

> +      (inputs
> +       `(("sdl2" ,sdl2)
> +         ("libjpeg" ,libjpeg)
> +         ("libpng" ,libpng)
> +         ("libvorbis" ,libvorbis)
> +         ("libogg" ,libogg)
> +         ("libtheora" ,libtheora)
> +         ("freetype" ,freetype)
> +         ("mesa" ,mesa)
> +         ("openal" ,openal)
> +         ("zlib" ,zlib)
> +         ("curl" ,curl)
> +         ("qtbase" ,qtbase)
> +         ("qtdeclarative" ,qtdeclarative)
> +         ("uuid.h" ,util-linux)))

Could you re-order the inputs?

> +      (home-page "https://github.com/Warsow/qfusion")
> +      (synopsis "Warsow's fork of qfusion, the id Tech 2 derived game engine")
> +      (description
> +       "This package contains Warsow's fork of qfusion, the id Tech 2 derived
> +game engine.  id Tech 2 is the engine originally behind Quake 2.")

Even though it is spelled "id" in the repository, I think this is really
"ID".

> +      (license license:gpl2))))

AFAICT, this is gpl2+.

Otherwise, FWIW, LGTM!

Regards,

-- 
Nicolas Goaziou

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

* [bug#39825] [PATCH] gnu: Add warsow-qfusion.
  2020-02-29 19:13 ` Nicolas Goaziou
@ 2020-02-29 21:48   ` Tobias Geerinckx-Rice via Guix-patches via
  2020-02-29 22:56     ` Nicolas Goaziou
  2020-03-02  8:46   ` Pierre Neidhardt
  1 sibling, 1 reply; 6+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2020-02-29 21:48 UTC (permalink / raw)
  To: 39825

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

Nicolas Goaziou 写道:
> Even though it is spelled "id" in the repository, I think this 
> is really
> "ID".

‘Id’.

Kind regards,

T G-R

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

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

* [bug#39825] [PATCH] gnu: Add warsow-qfusion.
  2020-02-29 21:48   ` Tobias Geerinckx-Rice via Guix-patches via
@ 2020-02-29 22:56     ` Nicolas Goaziou
  2020-03-03 12:57       ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2020-02-29 22:56 UTC (permalink / raw)
  To: 39825; +Cc: me

Hello,

Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org>
writes:

> Nicolas Goaziou 写道:
>> Even though it is spelled "id" in the repository, I think this is
>> really
>> "ID".
>
> ‘Id’.

<nitpick>
Actually, I think we're both wrong. That should be "id Software", per
<https://en.wikipedia.org/wiki/Id_Software>
</nitpick>

Regards,

-- 
Nicolas Goaziou

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

* [bug#39825] [PATCH] gnu: Add warsow-qfusion.
  2020-02-29 19:13 ` Nicolas Goaziou
  2020-02-29 21:48   ` Tobias Geerinckx-Rice via Guix-patches via
@ 2020-03-02  8:46   ` Pierre Neidhardt
  1 sibling, 0 replies; 6+ messages in thread
From: Pierre Neidhardt @ 2020-03-02  8:46 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 39825

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

Thanks for the review!

> Even though it is spelled "id" in the repository, I think this is really
> "ID".

Actually nope :)

https://en.wikipedia.org/wiki/Id_tech

-- 
Pierre Neidhardt
https://ambrevar.xyz/

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

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

* [bug#39825] [PATCH] gnu: Add warsow-qfusion.
  2020-02-29 22:56     ` Nicolas Goaziou
@ 2020-03-03 12:57       ` Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 0 replies; 6+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2020-03-03 12:57 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 39825

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

Nicolas Goaziou 写道:
> <nitpick>
> Actually, I think we're both wrong. That should be "id 
> Software", per
> <https://en.wikipedia.org/wiki/Id_Software>
> </nitpick>

<ahkshually>
Id read that article as well and was… surprised: Wikipedia does 
not take kindly to marketingCase™, let alone promote it.

id obviously gets ‘special’ treatment from sympathetic editors in 
a certain age bracket.  ;-)  Any other brand would be forced to 
use Regularcase.

I wrote ‘Id’ just to make clear that it's a word, not an 
abbreviation, and because GNU doesn't recognise trademarks either, 
and oh god none of this matters let's go play in the sun.

Just don't call them I.D.
</ahkshually>

Kind regards,

T G-R, now installing gzdoom again

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

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

end of thread, other threads:[~2020-03-03 12:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-28 16:04 [bug#39825] [PATCH] gnu: Add warsow-qfusion Pierre Neidhardt
2020-02-29 19:13 ` Nicolas Goaziou
2020-02-29 21:48   ` Tobias Geerinckx-Rice via Guix-patches via
2020-02-29 22:56     ` Nicolas Goaziou
2020-03-03 12:57       ` Tobias Geerinckx-Rice via Guix-patches via
2020-03-02  8:46   ` Pierre Neidhardt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).