[PATCH] gnu: Add warsow-qfusion.

  • Done
  • quality assurance status badge
Details
3 participants
  • Pierre Neidhardt
  • Nicolas Goaziou
  • Tobias Geerinckx-Rice
Owner
unassigned
Submitted by
Pierre Neidhardt
Severity
normal
P
P
Pierre Neidhardt wrote on 28 Feb 2020 17:04
(address . guix-patches@gnu.org)
20200228160451.22644-1-mail@ambrevar.xyz
* 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

Toggle diff (101 lines)
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
N
N
Nicolas Goaziou wrote on 29 Feb 2020 20:13
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 39825@debbugs.gnu.org)
871rqd437e.fsf@nicolasgoaziou.fr
Hello,

Pierre Neidhardt <mail@ambrevar.xyz> writes:

Toggle quote (2 lines)
> +(define-public warsow-qfusion

Thank you!

Toggle quote (5 lines)
> + (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.

Toggle quote (16 lines)
> + (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?

Toggle quote (6 lines)
> + (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".

Toggle quote (2 lines)
> + (license license:gpl2))))

AFAICT, this is gpl2+.

Otherwise, FWIW, LGTM!

Regards,

--
Nicolas Goaziou
T
T
Tobias Geerinckx-Rice wrote on 29 Feb 2020 22:48
(address . 39825@debbugs.gnu.org)
87imjp6p57.fsf@nckx
Nicolas Goaziou ???
Toggle quote (4 lines)
> Even though it is spelled "id" in the repository, I think this
> is really
> "ID".

‘Id’.

Kind regards,

T G-R
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl5a3DQACgkQ2Imw8BjF
STwebQ//VfcvlGhaX1MUWbmQEzbBkfYK4d0CTyI4O71MAel80NBQaYy4RKW89W7s
WkEo0QZFuVNaN8SRorKBPPK0vEYVb3pAIvPhz/JrEBv5wVhVuI2Wwu4jjKYSgp0X
vTcr+5sHRER82cfqYt1K+he75l4CWQKAefuQHkSYZzaUNc2gtYDd7o+M5qQEXU3g
zF7Uhz1BrfLVVSwqgCJlTNuFjwJ7jibE3m00F7QXbpUMTPIVZhp9x37uHko1DL0c
yOvPMSj4M1aR9wYIpE1caDnx2F+uL0BKNtUIsu/HGcJgYIPT2u24q5SXPVEKbRIF
b6Ig4vdJ7tA1bJMpQwXj6SuDBdkCvNS7/HEznKeRqPNI4w9fYKFjS5JyTuhACLTJ
kOqeIXgRo//lZuY+AMxCkzLa+0H3rF67l68Md95Lg6w02BuKGHtlUFoJqAng1+PE
e0A9LP/xxEUi5sfQnQziUr7yMAhaCWJ47mo8xcwy5Ka8rqpSfHBcCd6m2GxUHYhZ
0fePLdbcR6XAkOIkVrLMKMyyaNDyHcc256559jZwpbO8S1Nlhz0LOHs1DglbH8+T
AmOjqbis6iI4BKHMRBbfLYRAsGcie02Wes935zv5q8hebYzaZBgq2f4/ckdv4jwX
Wh1jiTtflj88GfZ1gU2b118+/eAUuEZshnSWBKtccoj9wwE9/as=
=UuV4
-----END PGP SIGNATURE-----

N
N
Nicolas Goaziou wrote on 29 Feb 2020 23:56
(name . Tobias Geerinckx-Rice via Guix-patches via)(address . guix-patches@gnu.org)
87o8th2eau.fsf@nicolasgoaziou.fr
Hello,

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

Toggle quote (7 lines)
> 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
</nitpick>

Regards,

--
Nicolas Goaziou
P
P
Pierre Neidhardt wrote on 2 Mar 2020 09:46
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 39825@debbugs.gnu.org)
877e03400i.fsf@ambrevar.xyz
Thanks for the review!

Toggle quote (3 lines)
> Even though it is spelled "id" in the repository, I think this is really
> "ID".

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5cx+0ACgkQm9z0l6S7
zH8I7wf/ahZc7WXlIBSNGGdiS457LWiIfLql+53+a5WwSk51xDgCc9CDWAmENQPI
ser276VQgPNLI6XqV0bLc6P8+RcWxBKkDrwa2OtLUhgmaSK2SQYieO7nYaGKQn/x
bD37XzMvvjzgPGWX3VcRHGBhTCkQn0tXuPZnr0Yv8q32B5mMXZAQ5RZouM4h6azI
N9iqQCpn6YRwp2RpLVvHEPw6nZHPRJUhqWasGVgfNWNSdFZSwkZG2EEM+PSn+h3r
fn3/6Awo7KSNCjy53qGY4uLNeCcW1/56BOMpGBYHkKT0M1tvlgaLn6JuXXh0Zlj7
pvSPqJgGLCbVu0BwRmA5oLzKfyw2+g==
=CWsr
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 3 Mar 2020 11:35
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
87lfoh20a9.fsf@ambrevar.xyz
I'm trying to use commit c4de15df559410aff0ca6643724e24cddb0ecbbd as
suggested upstream
git-fetch fails with

Toggle snippet (19 lines)
Submodule 'libsrcs' (https://github.com/Warsow/qfusion-libsrcs.git) registered for path 'libsrcs'
Submodule 'third-party/angelscript' (https://github.com/Qfusion/angelscript.git) registered for path 'third-party/angelscript'
Submodule 'third-party/libRocket' (https://github.com/Qfusion/libRocket) registered for path 'third-party/libRocket'
Submodule 'third-party/openal-soft' (https://github.com/Warsow/openal-soft.git) registered for path 'third-party/openal-soft'
Submodule 'third-party/recastnavigation' (https://github.com/Warsow/recastnavigation.git) registered for path 'third-party/recastnavigation'
Submodule 'third-party/sqlite-amalgamation' (https://github.com/Warsow/sqlite-amalgamation.git) registered for path 'third-party/sqlite-amalgamation'
Cloning into '/gnu/store/l4bjqp1yjkx0hczz0y2i9h0gzayfdx11-warsow-qfusion-2.5-1.c4de15d-checkout/libsrcs'...
Cloning into '/gnu/store/l4bjqp1yjkx0hczz0y2i9h0gzayfdx11-warsow-qfusion-2.5-1.c4de15d-checkout/third-party/angelscript'...
Cloning into '/gnu/store/l4bjqp1yjkx0hczz0y2i9h0gzayfdx11-warsow-qfusion-2.5-1.c4de15d-checkout/third-party/libRocket'...
Cloning into '/gnu/store/l4bjqp1yjkx0hczz0y2i9h0gzayfdx11-warsow-qfusion-2.5-1.c4de15d-checkout/third-party/openal-soft'...
Cloning into '/gnu/store/l4bjqp1yjkx0hczz0y2i9h0gzayfdx11-warsow-qfusion-2.5-1.c4de15d-checkout/third-party/recastnavigation'...
Cloning into '/gnu/store/l4bjqp1yjkx0hczz0y2i9h0gzayfdx11-warsow-qfusion-2.5-1.c4de15d-checkout/third-party/sqlite-amalgamation'...
Submodule path 'libsrcs': checked out 'd3c01feeed14aa2f24c1839fedfb43b4c38a3412'
Submodule path 'third-party/angelscript': checked out '478944145ce6d278abc2a119355c425b332482df'
error: Server does not allow request for unadvertised object 867fc72f980b40325c35d2a9182f741e8e0ca876
Fetched in submodule path 'third-party/libRocket', but it did not contain 867fc72f980b40325c35d2a9182f741e8e0ca876. Direct fetching of that commit failed.
git-fetch: '/gnu/store/zm51w1zv9zchx3n3xjw81zrjnlaswawa-git-minimal-2.25.1/bin/git submodule update --init --recursive' failed with exit code 1

Indeed, 867fc72f980b40325c35d2a9182f741e8e0ca876 does not exist in
libRocket, so I suspect it was removed, but isn't Git supposed to fetch
master? Where did it guess this commit from. I don't understand how
this is possible. The .gitmodules file is

Toggle snippet (20 lines)
[submodule "third-party/libRocket"]
path = third-party/libRocket
url = https://github.com/Qfusion/libRocket
[submodule "third-party/angelscript"]
path = third-party/angelscript
url = https://github.com/Qfusion/angelscript.git
[submodule "third-party/recastnavigation"]
path = third-party/recastnavigation
url = https://github.com/Warsow/recastnavigation.git
[submodule "third-party/openal-soft"]
path = third-party/openal-soft
url = https://github.com/Warsow/openal-soft.git
[submodule "third-party/sqlite-amalgamation"]
path = third-party/sqlite-amalgamation
url = https://github.com/Warsow/sqlite-amalgamation.git
[submodule "libsrcs"]
path = libsrcs
url = https://github.com/Warsow/qfusion-libsrcs.git

and

Toggle snippet (9 lines)
> git submodule status --recursive
d3c01feeed14aa2f24c1839fedfb43b4c38a3412 libsrcs (d3c01fe)
478944145ce6d278abc2a119355c425b332482df third-party/angelscript (heads/master)
+4889e4c100920cbd0fc9004566d6380771bd77a7 third-party/libRocket (release-1.2.1-1264-g4889e4c1)
6761218e51699f46bf25c377e65b3e9ea5e434b9 third-party/openal-soft (openal-soft-1.18.1-694-g6761218e)
2c85309280dbc9c82029e7ab16dfb01b9235c74e third-party/recastnavigation (1.5.0-78-g2c85309)
bc1dd8284590b5092a9bed4deb80a49e01cfb911 third-party/sqlite-amalgamation (heads/master)

I must be missing something about Git submodules...

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5eMw4ACgkQm9z0l6S7
zH8s9QgAir57vWPqRrC7NmNp4Ho3gioWUj1cqQusSbgGS8vS+ZiXpx7UOZvth0Fp
Oyhw6k5K2c6ca7uRblyUhYziKjopTZDDM3xSOK83wquQODoUyZJLmq/tIfNWKu9p
GyafQI34cZmiHadJdkB3kfyjX6LfpqIt6IPnWsFY1A+KygrfmLXIpYklD/5x4+Yz
IasiH6+iPD5NALRXdLd2EmtxGLhImtj6FbxwE1KHw/8wJXanXDL+KH9jbMQVrVd3
3mGJvXHuMvc7ZPyYWQHX8sLn7Q6yHegEWxzOmR5IVyA0Mv2Omk+vNoxUTIGK0qmH
sVyb+0l0M8WfifmetILfDhIH2ZDrQQ==
=/e8y
-----END PGP SIGNATURE-----

T
T
Tobias Geerinckx-Rice wrote on 3 Mar 2020 13:57
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 39825@debbugs.gnu.org)
87wo814mug.fsf@nckx
Nicolas Goaziou ???
Toggle quote (6 lines)
> <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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEfo+u0AlEeO9y5k0W2Imw8BjFSTwFAl5eVFcACgkQ2Imw8BjF
STyUTA//QM4YIa/oPUmXY+thphcizX28RA2DPHO2gyZl628rSmieMdG9ERzNrgry
YpM+OcK3lWxKJpOfPfmqJPM3nEJ+I1un5+txCmQCGRAQHO6SuDzrlG+9TadhI48o
qVJuMU4MxuDpxmrg36IT6ncVXF0PBDACUPvMLguV4IFV87A6rgZDOF/euOFaLnlf
t+/mTYnv1xlBZi72PPP4m1/zb9BpJ9mrDF9vyqO3vvnxdGqzIhAfZu2mZmS8C6G0
41wBVLO5HEy1V+MdsOCv5/uJgqYRDBeMT5arkM/vdJa7ZWIOYQsO/u0h4l935Cg7
IdtmeYCehOUNZH6+ctCLemreNyNrUgrCHOmCZA+Qoap222ehU92fWUAfkWQRyNjN
/VW3qdX92Na7/xtzeJ9RfOBGe5LESfp2fiUJnf2uTNvKVbfYCfnwlogIpVOcjVqc
XsgC0x5bOCnf+YoPJSNE2+5LzIV9gFUwCr5vYM1snKVC1ygoB3dBAk8QVu/75cAs
8YOde6xWf+c9a5Ovu/vPa1JyUMzFZ+z7kLj5mcQGSXoZ0Uig0C0wpGfW+nu/Tt+R
cFvLW0HqqyXqHPZxdlVxICl69HIn8nvgvX6tJlmx/fcmPmuLEB/07Zuu+KxlrcxJ
J2sOfSjTaCOJldDKpiYiSeLLjxgWP1tXnlGem4Vk3MGanp2xWdw=
=98fJ
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 2 May 2020 16:02
control message for bug #39825
(address . control@debbugs.gnu.org)
87ees2cu5j.fsf@ambrevar.xyz
close 39825
quit
P
P
Pierre Neidhardt wrote on 2 May 2020 16:03
Re: [bug#39825] [PATCH] gnu: Add warsow-qfusion.
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)
87bln6cu3q.fsf@ambrevar.xyz
Somehow this issue went away by itself.

I've fixed added sound support to the package definition.

Merged with 39f1806ca1d04b9aee70e897e06466aadbbee152.

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl6tfZkACgkQm9z0l6S7
zH/NZQf/dAqrV0tixuOAj1SEdCb8kY7o1cq8I+7rorMG7rtXuf4MHRcmkRZ1UqpN
jGhnytgHFAYNzdMupzS39xBo0D4MY1Rd7zLx4tslpPn1q581Wj+6/wivICEXQrFR
T2RpXleeCtBAzNU7jGLTSjGfx1+NcA48KmFdrCNnW/f/H2xUn8qXjLId2OOVe6J6
lvhqeXoX2fm4gilNeGVn5sf/TMLYcsywqtfCmsuXIaDOTPMQUPNIaW1MH9SZ+6np
Vl2t2TvmcA3UXcyf5KvqMoSPrPXDrwkyUDS5OiymMugsCm6a4pqIN1vtpSyysmoK
/HpSftl4pGWcanTKARgZRYNn1AGXLQ==
=6Kx1
-----END PGP SIGNATURE-----

?