[PATCH] gnu: Add freedoom.

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Allan Webber
  • Kei Kebreau
Owner
unassigned
Submitted by
Kei Kebreau
Severity
normal
K
K
Kei Kebreau wrote on 20 Mar 2017 04:09
(address . guix-patches@gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170320030947.9295-1-kei@openmailbox.org
* gnu/packages/games.scm (freedoom): New variable.
---
gnu/packages/games.scm | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)

Toggle diff (99 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index f264ef206..95a13b8c4 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -58,6 +58,7 @@
#:use-module (gnu packages audio)
#:use-module (gnu packages avahi)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages documentation)
#:use-module (gnu packages fltk)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages game-development)
@@ -69,6 +70,7 @@
#:use-module (gnu packages gperf)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
+ #:use-module (gnu packages imagemagick)
#:use-module (gnu packages libcanberra)
#:use-module (gnu packages libunwind)
#:use-module (gnu packages haskell)
@@ -113,6 +115,76 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system trivial))
+(define-public freedoom
+ (package
+ (name "freedoom")
+ (version "0.11.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/" name "/" name
+ "/archive/v" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "060dqppd9fi079yw6c82klsjaslcabq6xan67wf9hs0cy39i0kpv"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags `(,(string-append "prefix=" (assoc-ref %outputs "out")))
+ #:parallel-build? #f
+ #:tests? #f ; no check target
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'unpack 'no (lambda _ #t))
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((dejavu (assoc-ref inputs "font-dejavu"))
+ (freedoom (assoc-ref outputs "out"))
+ (wad-dir (string-append freedoom "/share/games/doom")))
+ ;; Replace the font-searching function in a shell
+ ;; script with a direct path to the required font.
+ ;; This is necessary because ImageMagick can only find the
+ ;; most basic fonts while in the build environment.
+ (substitute* "graphics/titlepic/create_caption"
+ (("font=\\$\\(find_font.*$")
+ (string-append
+ "font=" dejavu
+ "/share/fonts/truetype/DejaVuSansCondensed-Bold.ttf\n")))
+ ;; Make icon creation reproducible.
+ (substitute* "dist/Makefile"
+ (("freedm.png")
+ "-define png:exclude-chunks=date freedm.png")
+ (("freedoom1.png")
+ "-define png:exclude-chunks=date freedoom1.png")
+ (("freedoom2.png")
+ "-define png:exclude-chunks=date freedoom2.png"))
+ ;; Make sure that the install scripts know where to find
+ ;; the appropriate WAD files.
+ (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")))
+ #t))))))
+ (native-inputs
+ `(("asciidoc" ,asciidoc)
+ ("deutex" ,deutex)
+ ("font-dejavu" ,font-dejavu)
+ ("imagemagick" ,imagemagick)
+ ("python" ,python-2)))
+ (inputs
+ `(("prboom-plus" ,prboom-plus)))
+ (home-page "https://freedoom.github.io/")
+ (synopsis "Free content game based on the Doom engine")
+ (description
+ "The Freedoom project aims to create a complete free content first person
+shooter game. But Freedoom by itself is just the raw material for a game: it
+must be paired with a compatible game engine to be played. Freedoom
+complements the Doom engine with free levels, artwork, sound effects and music
+to make a completely free game.")
+ (license license:bsd-3)))
+
(define-public gnubg
(package
(name "gnubg")
--
2.12.0
C
C
Christopher Allan Webber wrote on 20 Mar 2017 18:07
(name . Kei Kebreau)(address . kei@openmailbox.org)(address . 26185@debbugs.gnu.org)
87mvcfswqx.fsf@dustycloud.org
Ooooooh! I love freedoom.

Kei Kebreau writes:

Toggle quote (95 lines)
> * gnu/packages/games.scm (freedoom): New variable.
> ---
> gnu/packages/games.scm | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index f264ef206..95a13b8c4 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -58,6 +58,7 @@
> #:use-module (gnu packages audio)
> #:use-module (gnu packages avahi)
> #:use-module (gnu packages boost)
> + #:use-module (gnu packages documentation)
> #:use-module (gnu packages fltk)
> #:use-module (gnu packages fribidi)
> #:use-module (gnu packages game-development)
> @@ -69,6 +70,7 @@
> #:use-module (gnu packages gperf)
> #:use-module (gnu packages gtk)
> #:use-module (gnu packages guile)
> + #:use-module (gnu packages imagemagick)
> #:use-module (gnu packages libcanberra)
> #:use-module (gnu packages libunwind)
> #:use-module (gnu packages haskell)
> @@ -113,6 +115,76 @@
> #:use-module (guix build-system cmake)
> #:use-module (guix build-system trivial))
>
> +(define-public freedoom
> + (package
> + (name "freedoom")
> + (version "0.11.1")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "https://github.com/" name "/" name
> + "/archive/v" version ".tar.gz"))
> + (file-name (string-append name "-" version ".tar.gz"))
> + (sha256
> + (base32
> + "060dqppd9fi079yw6c82klsjaslcabq6xan67wf9hs0cy39i0kpv"))))
> + (build-system gnu-build-system)
> + (arguments
> + '(#:make-flags `(,(string-append "prefix=" (assoc-ref %outputs "out")))
> + #:parallel-build? #f
> + #:tests? #f ; no check target
> + #:phases
> + (modify-phases %standard-phases
> + (add-before 'unpack 'no (lambda _ #t))
> + (replace 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let* ((dejavu (assoc-ref inputs "font-dejavu"))
> + (freedoom (assoc-ref outputs "out"))
> + (wad-dir (string-append freedoom "/share/games/doom")))
> + ;; Replace the font-searching function in a shell
> + ;; script with a direct path to the required font.
> + ;; This is necessary because ImageMagick can only find the
> + ;; most basic fonts while in the build environment.
> + (substitute* "graphics/titlepic/create_caption"
> + (("font=\\$\\(find_font.*$")
> + (string-append
> + "font=" dejavu
> + "/share/fonts/truetype/DejaVuSansCondensed-Bold.ttf\n")))
> + ;; Make icon creation reproducible.
> + (substitute* "dist/Makefile"
> + (("freedm.png")
> + "-define png:exclude-chunks=date freedm.png")
> + (("freedoom1.png")
> + "-define png:exclude-chunks=date freedoom1.png")
> + (("freedoom2.png")
> + "-define png:exclude-chunks=date freedoom2.png"))
> + ;; Make sure that the install scripts know where to find
> + ;; the appropriate WAD files.
> + (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")))
> + #t))))))
> + (native-inputs
> + `(("asciidoc" ,asciidoc)
> + ("deutex" ,deutex)
> + ("font-dejavu" ,font-dejavu)
> + ("imagemagick" ,imagemagick)
> + ("python" ,python-2)))
> + (inputs
> + `(("prboom-plus" ,prboom-plus)))
> + (home-page "https://freedoom.github.io/")
> + (synopsis "Free content game based on the Doom engine")
> + (description
> + "The Freedoom project aims to create a complete free content first person
> +shooter game. But Freedoom by itself is just the raw material for a game: it

I think the "But" can be removed here.

Toggle quote (2 lines)
> +must be paired with a compatible game engine to be played. Freedoom

How about saying "(such as prboom-plus)" ? That way people know what to install.

Toggle quote (8 lines)
> +complements the Doom engine with free levels, artwork, sound effects and music
> +to make a completely free game.")
> + (license license:bsd-3)))
> +
> (define-public gnubg
> (package
> (name "gnubg")

Otherwise, looks good! I booted it up and it worked great. Lost 15
minutes into shooting up zombified soldiers...

One comment about the submission: maybe it would be better in the future
to post a patch formatted using git format-patch? It would be easier to
apply and push.

But it looks like you have commit access, so with the couple of
description nits adjusted, I think it's okay to push! Nice work!

Freedoooooooom!
K
K
Kei Kebreau wrote on 20 Mar 2017 19:32
(name . Christopher Allan Webber)(address . cwebber@dustycloud.org)(address . 26185-done@debbugs.gnu.org)
871str6bow.fsf@openmailbox.org
Christopher Allan Webber <cwebber@dustycloud.org> writes:

Toggle quote (102 lines)
> Ooooooh! I love freedoom.
>
> Kei Kebreau writes:
>
>> * gnu/packages/games.scm (freedoom): New variable.
>> ---
>> gnu/packages/games.scm | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 72 insertions(+)
>>
>> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
>> index f264ef206..95a13b8c4 100644
>> --- a/gnu/packages/games.scm
>> +++ b/gnu/packages/games.scm
>> @@ -58,6 +58,7 @@
>> #:use-module (gnu packages audio)
>> #:use-module (gnu packages avahi)
>> #:use-module (gnu packages boost)
>> + #:use-module (gnu packages documentation)
>> #:use-module (gnu packages fltk)
>> #:use-module (gnu packages fribidi)
>> #:use-module (gnu packages game-development)
>> @@ -69,6 +70,7 @@
>> #:use-module (gnu packages gperf)
>> #:use-module (gnu packages gtk)
>> #:use-module (gnu packages guile)
>> + #:use-module (gnu packages imagemagick)
>> #:use-module (gnu packages libcanberra)
>> #:use-module (gnu packages libunwind)
>> #:use-module (gnu packages haskell)
>> @@ -113,6 +115,76 @@
>> #:use-module (guix build-system cmake)
>> #:use-module (guix build-system trivial))
>>
>> +(define-public freedoom
>> + (package
>> + (name "freedoom")
>> + (version "0.11.1")
>> + (source (origin
>> + (method url-fetch)
>> + (uri (string-append "https://github.com/" name "/" name
>> + "/archive/v" version ".tar.gz"))
>> + (file-name (string-append name "-" version ".tar.gz"))
>> + (sha256
>> + (base32
>> + "060dqppd9fi079yw6c82klsjaslcabq6xan67wf9hs0cy39i0kpv"))))
>> + (build-system gnu-build-system)
>> + (arguments
>> + '(#:make-flags `(,(string-append "prefix=" (assoc-ref %outputs "out")))
>> + #:parallel-build? #f
>> + #:tests? #f ; no check target
>> + #:phases
>> + (modify-phases %standard-phases
>> + (add-before 'unpack 'no (lambda _ #t))
>> + (replace 'configure
>> + (lambda* (#:key inputs outputs #:allow-other-keys)
>> + (let* ((dejavu (assoc-ref inputs "font-dejavu"))
>> + (freedoom (assoc-ref outputs "out"))
>> + (wad-dir (string-append freedoom "/share/games/doom")))
>> + ;; Replace the font-searching function in a shell
>> + ;; script with a direct path to the required font.
>> + ;; This is necessary because ImageMagick can only find the
>> + ;; most basic fonts while in the build environment.
>> + (substitute* "graphics/titlepic/create_caption"
>> + (("font=\\$\\(find_font.*$")
>> + (string-append
>> + "font=" dejavu
>> + "/share/fonts/truetype/DejaVuSansCondensed-Bold.ttf\n")))
>> + ;; Make icon creation reproducible.
>> + (substitute* "dist/Makefile"
>> + (("freedm.png")
>> + "-define png:exclude-chunks=date freedm.png")
>> + (("freedoom1.png")
>> + "-define png:exclude-chunks=date freedoom1.png")
>> + (("freedoom2.png")
>> + "-define png:exclude-chunks=date freedoom2.png"))
>> + ;; Make sure that the install scripts know where to find
>> + ;; the appropriate WAD files.
>> + (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")))
>> + #t))))))
>> + (native-inputs
>> + `(("asciidoc" ,asciidoc)
>> + ("deutex" ,deutex)
>> + ("font-dejavu" ,font-dejavu)
>> + ("imagemagick" ,imagemagick)
>> + ("python" ,python-2)))
>> + (inputs
>> + `(("prboom-plus" ,prboom-plus)))
>> + (home-page "https://freedoom.github.io/")
>> + (synopsis "Free content game based on the Doom engine")
>> + (description
>> + "The Freedoom project aims to create a complete free content first person
>> +shooter game. But Freedoom by itself is just the raw material for a game: it
>
> I think the "But" can be removed here.
>

Removed.

Toggle quote (5 lines)
>> +must be paired with a compatible game engine to be played. Freedoom
>
> How about saying "(such as prboom-plus)" ? That way people know what to install.
>

Added, using @code{prboom-plus}.

Toggle quote (16 lines)
>> +complements the Doom engine with free levels, artwork, sound effects and music
>> +to make a completely free game.")
>> + (license license:bsd-3)))
>> +
>> (define-public gnubg
>> (package
>> (name "gnubg")
>
> Otherwise, looks good! I booted it up and it worked great. Lost 15
> minutes into shooting up zombified soldiers...
>
> One comment about the submission: maybe it would be better in the future
> to post a patch formatted using git format-patch? It would be easier to
> apply and push.
>

If I recall correctly, I did use `git format-patch -1` to make the
patch and `git send-mail` to send it. Perhaps something went wrong in
the process?

Toggle quote (5 lines)
> But it looks like you have commit access, so with the couple of
> description nits adjusted, I think it's okay to push! Nice work!
>
> Freedoooooooom!

Thanks for the review! Just pushed to master as
0b5d078f8ba7953a51343fde087e157fbc4a0308.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAljQIE8ACgkQ5qXuPBlG
eg2YlxAAmZxQl3ikjf8cukpadTjjhSPIKJuIFpbHBwBcJVbm3dSuenNR/a/g58a8
R77nfRhx9p2LCrLLdPnzi2yfL+vldVG8tdjUNH39yrpkkJo4WxdBF4aixm7XxOIp
YZgaZelsQzOQmUXr4yJX591ifND7sVHsWDAgOER7mYPZ3xuAYamrUZqMP2LJpa41
6UQDTZn+x3xtrBsog3N4Dq55veHAmlqq2vkUxaxDBO4qxdb8j6KUbba6rECaQlbt
Qc8Iup45Mh7Kc7Bq+3E9fqNnciu0bptQffrOb7Esf0ry6fX4iFKl/rAIhU0kDHfh
FSFqFcxwI5ltkkHuPgs8AQ1bCczQZh+RTqb/poQ30NaaMGSw7PlfcpOYkswHbXSN
ntSdyN04qdy8JLYpE/FrY1S52qG8G4I5k0DL4Io5iuIG6r3U4oB0d8xpFzx5onfy
phBuzHURQmJ7OSZGknQUg23IhDsjFSsMGAtmxNPxgsCdIZEm8PN/IeMaSyuWarSG
kwD8SHiRv5faKC2Lidz1UqBEsT5HPnV2Zwn9gHEhbX07jK8kJkwUx2wB6Hb/VaAf
RF2wChK1uC37bCqVwuScQgxOFDjToJxkqmpi6WX+R09fVKPfAtSjwAwY884NmVUt
CK4vrDP9Jny+cfG+ca1a6gYN6hFpq55HEooC5M/X928NIgqY2js=
=IBQA
-----END PGP SIGNATURE-----

Closed
?