[PATCH] gnu: freedoom: Avoid the need to propagate prboom-plus.

  • Done
  • quality assurance status badge
Details
2 participants
  • Kei Kebreau
  • Marius Bakke
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal

Debbugs page

Kei Kebreau wrote 8 years ago
(address . guix-patches@gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170323023539.23855-1-kei@openmailbox.org
* gnu/packages/games.scm (freedoom)[arguments]: Substitute shell
variable assignment in start script for a direct engine launch.
---
gnu/packages/games.scm | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 67fcb7b49..401ba4444 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -162,14 +162,19 @@
(("freedoom2.png")
"-define png:exclude-chunks=date freedoom2.png"))
;; Make sure that the install scripts know where to find
- ;; the appropriate WAD files.
+ ;; the appropriate WAD files and Doom engine.
+ ;; Do this by turning a shell variable assignment into a
+ ;; direct engine launch and exit.
(substitute* "dist/freedoom"
- (("IWAD=freedm.wad")
- (string-append "IWAD=" wad-dir "/freedm.wad"))
- (("IWAD=freedoom1.wad")
- (string-append "IWAD=" wad-dir "/freedoom1.wad"))
- (("IWAD=freedoom2.wad")
- (string-append "IWAD=" wad-dir "/freedoom2.wad")))
+ (("IWAD=")
+ (string-append (assoc-ref inputs "prboom-plus")
+ "/bin/prboom-plus -iwad "))
+ (("freedm.wad")
+ (string-append wad-dir "/freedm.wad \"$@\"; exit $?"))
+ (("freedoom1.wad")
+ (string-append wad-dir "/freedoom1.wad \"$@\"; exit $?"))
+ (("freedoom2.wad")
+ (string-append wad-dir "/freedoom2.wad \"$@\"; exit $?")))
#t))))))
(native-inputs
`(("asciidoc" ,asciidoc)
--
2.12.0
Marius Bakke wrote 8 years ago
Re: bug#26222: [PATCH] gnu: freedoom: Avoid the need to propagate prboom-plus.
(name . Kei Kebreau)(address . kei@openmailbox.org)
877f3f6fzb.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (35 lines)
> * gnu/packages/games.scm (freedoom)[arguments]: Substitute shell
> variable assignment in start script for a direct engine launch.
> ---
> gnu/packages/games.scm | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 67fcb7b49..401ba4444 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -162,14 +162,19 @@
> (("freedoom2.png")
> "-define png:exclude-chunks=date freedoom2.png"))
> ;; Make sure that the install scripts know where to find
> - ;; the appropriate WAD files.
> + ;; the appropriate WAD files and Doom engine.
> + ;; Do this by turning a shell variable assignment into a
> + ;; direct engine launch and exit.
> (substitute* "dist/freedoom"
> - (("IWAD=freedm.wad")
> - (string-append "IWAD=" wad-dir "/freedm.wad"))
> - (("IWAD=freedoom1.wad")
> - (string-append "IWAD=" wad-dir "/freedoom1.wad"))
> - (("IWAD=freedoom2.wad")
> - (string-append "IWAD=" wad-dir "/freedoom2.wad")))
> + (("IWAD=")
> + (string-append (assoc-ref inputs "prboom-plus")
> + "/bin/prboom-plus -iwad "))
> + (("freedm.wad")
> + (string-append wad-dir "/freedm.wad \"$@\"; exit $?"))
> + (("freedoom1.wad")
> + (string-append wad-dir "/freedoom1.wad \"$@\"; exit $?"))
> + (("freedoom2.wad")
> + (string-append wad-dir "/freedoom2.wad \"$@\"; exit $?")))

From reading the "dist/freedoom" shell script, it looks like it tries
prboom-plus automatically if it exists in PATH. Does this not work? It
also tries a bunch of other engines, so I don't think we should hard
code one.

Toggle quote (5 lines)
> #t))))))
> (native-inputs
> `(("asciidoc" ,asciidoc)
> --
> 2.12.0
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAljUCpgACgkQoqBt8qM6
VPrH7Af/an2VDAnXQOAJbExgrlGsVzQEC1nxUXeH8KwV7CPr7AupTIV0J1Zzj1KI
kXq5x0T4jlErPv1ktIQH68c8C9YUmsix+KmhkGy2tAwRn4f9zDC1u+OiUFysOxSm
Lt9xOJCsBBc0ew/tiwa4AhWhsfKNisf9dvAq1EZOapkjeT8Nx2lbCj3oZKdm18J+
Db7N0wJI2JdF1MYuZhgw3HPHKsoTbrImuRBNZLyLeBLaB7vngXCZvsJ8EUavHa1+
YcMaVAqgyTvvdlc1l2Xfh1W5lbREgdNXQ+P7ZIA2demVnD7c0lMTP/dULRuKgz/p
oZngLivVkHGin5UAnsl7iY/iqE8rXg==
=PIGX
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 26222@debbugs.gnu.org)
87poh72xzo.fsf@openmailbox.org
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (43 lines)
> Kei Kebreau <kei@openmailbox.org> writes:
>
>> * gnu/packages/games.scm (freedoom)[arguments]: Substitute shell
>> variable assignment in start script for a direct engine launch.
>> ---
>> gnu/packages/games.scm | 19 ++++++++++++-------
>> 1 file changed, 12 insertions(+), 7 deletions(-)
>>
>> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
>> index 67fcb7b49..401ba4444 100644
>> --- a/gnu/packages/games.scm
>> +++ b/gnu/packages/games.scm
>> @@ -162,14 +162,19 @@
>> (("freedoom2.png")
>> "-define png:exclude-chunks=date freedoom2.png"))
>> ;; Make sure that the install scripts know where to find
>> - ;; the appropriate WAD files.
>> + ;; the appropriate WAD files and Doom engine.
>> + ;; Do this by turning a shell variable assignment into a
>> + ;; direct engine launch and exit.
>> (substitute* "dist/freedoom"
>> - (("IWAD=freedm.wad")
>> - (string-append "IWAD=" wad-dir "/freedm.wad"))
>> - (("IWAD=freedoom1.wad")
>> - (string-append "IWAD=" wad-dir "/freedoom1.wad"))
>> - (("IWAD=freedoom2.wad")
>> - (string-append "IWAD=" wad-dir "/freedoom2.wad")))
>> + (("IWAD=")
>> + (string-append (assoc-ref inputs "prboom-plus")
>> + "/bin/prboom-plus -iwad "))
>> + (("freedm.wad")
>> + (string-append wad-dir "/freedm.wad \"$@\"; exit $?"))
>> + (("freedoom1.wad")
>> + (string-append wad-dir "/freedoom1.wad \"$@\"; exit $?"))
>> + (("freedoom2.wad")
>> + (string-append wad-dir "/freedoom2.wad \"$@\"; exit $?")))
>
> From reading the "dist/freedoom" shell script, it looks like it tries
> prboom-plus automatically if it exists in PATH. Does this not work? It
> also tries a bunch of other engines, so I don't think we should hard
> code one.
>

In that case, we could instead leave the package as is and have users
install prboom-plus (or future engines when they are packaged)
manually. Freedoom's package description already mentions that it needs
a compatible engine to run. If you think that's enough for a casual user
to notice, I'm fine with dropping the patch.

Toggle quote (5 lines)
>> #t))))))
>> (native-inputs
>> `(("asciidoc" ,asciidoc)
>> --
>> 2.12.0
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAljUiGsACgkQ5qXuPBlG
eg0xcA//TIt/oP/FktVIjohce9owitWOGW2aGt51ed3GpSWIoOhr1zO3oh/r9KYl
F8D/zqZj814GTdTfN+h5iLvE9cVwiMPkm4O2QMobOmP+O2gR0vNzwgK+pOpBYC7N
bKRx3P4wPknTPARmZbsHk51RlplluL8ALTgbziTIDipJ8sa7HXG2FQXxeU49WjDj
iEYRJMmIzoO3YzAR22o0nWkF7usRdXCdezsoY7u+SDYE+P1q7EHT2CFr1x/t0arS
69DlPO+O95jox+ER5ow6hMSWHipIcHOPoO91Rl09g91gHv8A7nc70eMOSGpV7j5G
0X8KvAviiwct2d8XXDCicz7hUjhHbl0uYX+ORppiEmavkd40SI4ah18FymnFcE4S
7MN1FhoPlrCZuhPuDwdknqwBrsW7ZA3R56OTXUzVRYkDJNUN5jN9wZ3t0vxZTcgw
tlH/ns29XEcgrcloYoYfPmZ3qEvrTzZKyiZT/H3BSp7nK+L6+0m6Gahu7XyFwj/k
TmPND64YU+MK49HqGQakMbbKu7Lqc9FnRnR4RjhOK4VXrFnZni5aJSe0Z3fBYoAG
GiX1R6QTkzN7Qo5c+StYWw60AM/0oHJSxe+//ttMiVJdF5cxzChHmDSdWx6FLbBU
Ru3ml5xshXzFxfNteRkQnzlEFUHw1bE9ZgUdvqnth9KT3L7BZ1o=
=WFR1
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 26222-done@debbugs.gnu.org)
874ly767i9.fsf@openmailbox.org
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (17 lines)
> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Kei Kebreau <kei@openmailbox.org> writes:
>>
>> From reading the "dist/freedoom" shell script, it looks like it tries
>> prboom-plus automatically if it exists in PATH. Does this not work? It
>> also tries a bunch of other engines, so I don't think we should hard
>> code one.
>>
>
> In that case, we could instead leave the package as is and have users
> install prboom-plus (or future engines when they are packaged)
> manually. Freedoom's package description already mentions that it needs
> a compatible engine to run. If you think that's enough for a casual user
> to notice, I'm fine with dropping the patch.
>

I've decided against this patch, as we may have other Doom engines
available in the future. Thank you for your time, Marius.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAljgNX8ACgkQ5qXuPBlG
eg1Z0Q//bN0GXF7iyG5fsNOO6kOzPp2583VsTSIlteYOieDhYBS8xUXDEjCgEV83
eArEjVFu6rBrEiomjMck3UpWREyLKIuy41LWCy8opIIlpsPhd84unvt8tpxYCaUb
r+juXcAwNlAQI7V01OaWf5DG68hPyJDSa8TV7slqxQAnn85TmlQjqitb6Pr+wfni
+DHfbhjc8bkIz2eaZdbdjFMYld+BIzQx3ZMRc8VlQ1/rbhXrP1HuhT9FUm49/KOX
xcMp1b2ONmHj91l6Mgr6XHrsgzex+3mjseBQrSlA7bbj3IBh2SLmDe6Bqlqp1m13
ZMzqNwYor9PWzII94Ils9JUq/FYgptoYjwAy8ENj0w8SUb3y2YIbl3g/Cg11TeSH
qxxh2bon8U4IfUuwUjjySIjZKWpP73cWFaqVq0yagnwcKpgywRIk3T+8mNzAhigT
8OypxZDioHTwxibjJ76/ph39V8Wz4M07eZDCYmb62XvLoH4+bpc8hvn0+OX6y4Zf
em89zaY7HShf3ZKZsTV9vf49xfG9+HVv28jyP6JbV7aNJaLYBVUNgtVyrXo30vWe
xuqCc7Ur8UlDous80Xs5iGrmFyJ7A159fi8yDnep0eWciptmxrKNaLM650bsZXlh
fSOdkS1cF88dNQHzXhDmn2byreC9ImcCLPlhAJHu0en6tS0g4iA=
=1s1O
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 26222@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 26222
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help