[PATCH] gnu: Add sdlpop.

  • Done
  • quality assurance status badge
Details
3 participants
  • Nicolas Goaziou
  • phodina
  • Xinglu Chen
Owner
unassigned
Submitted by
phodina
Severity
normal
P
P
phodina wrote on 18 Sep 2021 11:49
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
-p2XzmyUeU34-LyC3z50Id77Y3mrwZAnC3s3bUigV4CSc1rE9Pz-FYX9HxF97dLz1oBPpUEx06AoVSLT5eJGyZRZOFmCSfXlSzKHc5U8iCc=@protonmail.com
* gnu/packages/games.scm (sdlpop): New variable.
[copyright]: Sort by date pkill9@runbox.com.

Toggle diff (84 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index c39770c260..0eed238f32 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -45,6 +45,7 @@
;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
+;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
;;; Copyright © 2020 Naga Malleswari <nagamalli@riseup.net>
@@ -63,7 +64,7 @@
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
-;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -12480,6 +12481,62 @@ do so you need to explore the island, find food, build a shelter and try to
get attention, so you get found.")
(license license:cc-by4.0))))

+(define-public sdlpop
+ (package
+ (name "sdlpop")
+ (version "1.22")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/NagyD/SDLPoP")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1yy5r1r0hv0xggk8qd8bwk2zy7abpv89nikq4flqgi53fc5q9xl7"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'prepare-build
+ ;; Set correct environment for SDL.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "CPATH"
+ (string-append (assoc-ref inputs "sdl")
+ "/include/SDL2:"
+ (or (getenv "CPATH") "")))))
+ (add-after 'unpack 'chdir
+ (lambda* _
+ (chdir "src")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (opt (string-append out "/opt/sdlpop"))
+ (app (string-append out "/usr/share/applications"))
+ (template "src/SDLPoP.desktop.template"))
+ (chdir "..")
+ (install-file "prince" bin)
+ (substitute* template (("\\$ROOT") out))
+ (install-file template app)
+ (rename-file (string-append app "/SDLPoP.desktop.template")
+ (string-append app "/SDLPoP.desktop"))
+ (install-file "SDLPoP.ini" opt)
+ (copy-recursively "data" (string-append bin "/data"))
+ (copy-recursively "doc" opt)
+ (copy-recursively "mods" opt)))))))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs `(("sdl" ,(sdl-union (list sdl2
+ sdl2-image
+ sdl2-mixer)))))
+ (synopsis "Open-source port of Prince of Persia")
+ (description "Open-source port of Prince of Persia, based on the disassembly
+of the DOS version, extended with new features.")
+ (home-page "https://github.com/NagyD/SDLPoP")
+ (license license:gpl3)))
+
(define-public fheroes2
(package
(name "fheroes2")
--
2.32.0
X
X
Xinglu Chen wrote on 20 Sep 2021 14:19
87y27rfnht.fsf@yoctocell.xyz
On Sat, Sep 18 2021, phodina via Guix-patches via wrote:

Toggle quote (22 lines)
> * gnu/packages/games.scm (sdlpop): New variable.
> [copyright]: Sort by date pkill9@runbox.com.
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index c39770c260..0eed238f32 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -45,6 +45,7 @@
> ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
> ;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
> ;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
> +;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
> ;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
> ;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
> ;;; Copyright © 2020 Naga Malleswari <nagamalli@riseup.net>
> @@ -63,7 +64,7 @@
> ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
> ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
> ;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
> -;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
> +;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>

I don’t think sorting copyright lines is necessary.

Toggle quote (24 lines)
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -12480,6 +12481,62 @@ do so you need to explore the island, find food, build a shelter and try to
> get attention, so you get found.")
> (license license:cc-by4.0))))
>
> +(define-public sdlpop
> + (package
> + (name "sdlpop")
> + (version "1.22")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/NagyD/SDLPoP")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1yy5r1r0hv0xggk8qd8bwk2zy7abpv89nikq4flqgi53fc5q9xl7"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f

What’s the reason for disabling tests? There should a comment
explaining why.

Toggle quote (13 lines)
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure)
> + (add-before 'build 'prepare-build
> + ;; Set correct environment for SDL.
> + (lambda* (#:key inputs #:allow-other-keys)
> + (setenv "CPATH"
> + (string-append (assoc-ref inputs "sdl")
> + "/include/SDL2:"
> + (or (getenv "CPATH") "")))))
> + (add-after 'unpack 'chdir
> + (lambda* _

Just ‘lambda’ would work.

Toggle quote (26 lines)
> + (chdir "src")))
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin"))
> + (opt (string-append out "/opt/sdlpop"))
> + (app (string-append out "/usr/share/applications"))
> + (template "src/SDLPoP.desktop.template"))
> + (chdir "..")
> + (install-file "prince" bin)
> + (substitute* template (("\\$ROOT") out))
> + (install-file template app)
> + (rename-file (string-append app "/SDLPoP.desktop.template")
> + (string-append app "/SDLPoP.desktop"))
> + (install-file "SDLPoP.ini" opt)
> + (copy-recursively "data" (string-append bin "/data"))
> + (copy-recursively "doc" opt)
> + (copy-recursively "mods" opt)))))))
> + (native-inputs `(("pkg-config" ,pkg-config)))
> + (inputs `(("sdl" ,(sdl-union (list sdl2
> + sdl2-image
> + sdl2-mixer)))))
> + (synopsis "Open-source port of Prince of Persia")
> + (description "Open-source port of Prince of Persia, based on the disassembly
> +of the DOS version, extended with new features.")

The description should consist of one or more complete sentences, and
try to keep lines <=80 characters.

Toggle quote (3 lines)
> + (license license:gpl3)))

The ‘src/GPLv3.h’ file says GPLv3 or later, so it should be
‘license:gpl3+’.

Could you send an updated patch?
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFIfE8VHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5GWYQAKohmEzCLac7qAXyAXAeYl+p15RO
fzt9DHMgJHRd0z9VbseFgLeXsYRUsa7cv9Oiso4n82rbRyA/7TbpJmFkYtbAn61s
pYdugqIVG4PkSq5PLhliJD3iuGj55mBvwZnxjDQQE+dfYIagnIh619bibpGRjXPQ
Kh2vTzUme5mRnc9H2PC0b7wk4gomB7Ky/13tm9F/IISgDzG3cQM51szmpC0Zmyf2
gHl4cwFAyZV7wXHmELgabZqEc84j34u8qBciiKCZ7PXlJDYBRliaQSidBUdIHQq7
bdO/+9x6xuxfac1c0DkXq/bLt+2doNRoiKvaEBI1z5IrJtEW+sBCXWm3nWp2T+Io
EvK3qtNExQlKpKDfBdU/D7pQ2AoE+0nefjbVL9p9qYMFzHxkDQcKNgsAWKmZiLxE
DHn9aUm9GqcwIH6OBzElHdnv0bHe1TC3rce+3MGgswJFYcW3A2PvAHgC4CVImjqp
MkHUMS4qh8gbWUhJ/OcQ2g8xhDzox+LtU2ATdyTGCRUiU2sTlVkQuINWoiv9zhd1
Gb25xA03lHmSDFHovgJhUShIJgDQ+8hrdli+Tl9aAM+TSSwkFzKNipBCz+y/zzgT
g508vhA0S4Boy648JLLmYeW+Y7qkowyOdpgyvK2gqp+GjQPobws9KvhwxqW8BEjC
FqH1TptA2WpUgKlf
=Uzt9
-----END PGP SIGNATURE-----

P
P
phodina wrote on 28 Sep 2021 00:16
[PATCH v2] gnu: Add sdlpop.
(name . Xinglu Chen)(address . public@yoctocell.xyz)(address . 50653@debbugs.gnu.org)
NV2CpEToNIsXR-A690qHJjXRsQuCnKZybavSHx9eDxNmA_GW4azRgv-HlcnwnqQWf4r6US-cRyavvOVQAoT53HE1KArZveuuAEu1RPjB1OM=@protonmail.com
Hi Xinglu,

thank you for the review and comments. Here's the updated patch.

If you or anyone committing the patch disagrees with the copyright sorting then be my guest and remove it. Otherwise IMHO the list should be sorted to maintain order :-)

Toggle snippet (90 lines)
* gnu/packages/games.scm (sdlpop): New variable.
[copyright]: Sort by date pkill9@runbox.com.

diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index c39770c260..9a6e36ccc1 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -45,6 +45,7 @@
;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
+;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
;;; Copyright © 2020 Naga Malleswari <nagamalli@riseup.net>
@@ -63,7 +64,7 @@
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
-;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -12480,6 +12481,62 @@ do so you need to explore the island, find food, build a shelter and try to
get attention, so you get found.")
(license license:cc-by4.0))))

+(define-public sdlpop
+ (package
+ (name "sdlpop")
+ (version "1.22")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/NagyD/SDLPoP")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1yy5r1r0hv0xggk8qd8bwk2zy7abpv89nikq4flqgi53fc5q9xl7"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no tests provided
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'build 'prepare-build
+ ;; Set correct environment for SDL.
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "CPATH"
+ (string-append (assoc-ref inputs "sdl")
+ "/include/SDL2:"
+ (or (getenv "CPATH") "")))))
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "src")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (opt (string-append out "/opt/sdlpop"))
+ (app (string-append out "/usr/share/applications"))
+ (template "src/SDLPoP.desktop.template"))
+ (chdir "..")
+ (install-file "prince" bin)
+ (substitute* template (("\\$ROOT") out))
+ (install-file template app)
+ (rename-file (string-append app "/SDLPoP.desktop.template")
+ (string-append app "/SDLPoP.desktop"))
+ (install-file "SDLPoP.ini" opt)
+ (copy-recursively "data" (string-append bin "/data"))
+ (copy-recursively "doc" opt)
+ (copy-recursively "mods" opt)))))))
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs `(("sdl" ,(sdl-union (list sdl2
+ sdl2-image
+ sdl2-mixer)))))
+ (synopsis "Open-source port of Prince of Persia")
+ (description "This package provides port of Prince of Persia, based on the
+disassembly of the DOS version, extended with new features.")
+ (home-page "https://github.com/NagyD/SDLPoP")
+ (license license:gpl3+)))
+
(define-public fheroes2
(package
(name "fheroes2")
--
2.32.0
X
X
Xinglu Chen wrote on 28 Sep 2021 21:10
(name . phodina)(address . phodina@protonmail.com)(address . 50653@debbugs.gnu.org)
87h7e4348v.fsf@yoctocell.xyz
On Mon, Sep 27 2021, phodina wrote:

Toggle quote (8 lines)
> Hi Xinglu,
>
> thank you for the review and comments. Here's the updated patch.
>
> If you or anyone committing the patch disagrees with the copyright
> sorting then be my guest and remove it. Otherwise IMHO the list should
> be sorted to maintain order :-)

I don’t have any objections; I just don’t think it really matters.

Toggle quote (2 lines)
> --8<---------------cut here---------------start------------->8---

Not sure why you put this here.

Toggle quote (85 lines)
> * gnu/packages/games.scm (sdlpop): New variable.
> [copyright]: Sort by date pkill9@runbox.com.
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index c39770c260..9a6e36ccc1 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -45,6 +45,7 @@
> ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
> ;;; Copyright © 2019, 2020 Timotej Lazar <timotej.lazar@araneo.si>
> ;;; Copyright © 2019 Josh Holland <josh@inv.alid.pw>
> +;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
> ;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
> ;;; Copyright © 2020 Alberto Eleuterio Flores Guerrero <barbanegra+guix@posteo.mx>
> ;;; Copyright © 2020 Naga Malleswari <nagamalli@riseup.net>
> @@ -63,7 +64,7 @@
> ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
> ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
> ;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
> -;;; Copyright © 2019 Pkill -9 <pkill9@runbox.com>
> +;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -12480,6 +12481,62 @@ do so you need to explore the island, find food, build a shelter and try to
> get attention, so you get found.")
> (license license:cc-by4.0))))
>
> +(define-public sdlpop
> + (package
> + (name "sdlpop")
> + (version "1.22")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/NagyD/SDLPoP")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1yy5r1r0hv0xggk8qd8bwk2zy7abpv89nikq4flqgi53fc5q9xl7"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; no tests provided
> + #:phases
> + (modify-phases %standard-phases
> + (delete 'configure)
> + (add-before 'build 'prepare-build
> + ;; Set correct environment for SDL.
> + (lambda* (#:key inputs #:allow-other-keys)
> + (setenv "CPATH"
> + (string-append (assoc-ref inputs "sdl")
> + "/include/SDL2:"
> + (or (getenv "CPATH") "")))))
> + (add-after 'unpack 'chdir
> + (lambda _
> + (chdir "src")))
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin"))
> + (opt (string-append out "/opt/sdlpop"))
> + (app (string-append out "/usr/share/applications"))
> + (template "src/SDLPoP.desktop.template"))
> + (chdir "..")
> + (install-file "prince" bin)
> + (substitute* template (("\\$ROOT") out))
> + (install-file template app)
> + (rename-file (string-append app "/SDLPoP.desktop.template")
> + (string-append app "/SDLPoP.desktop"))
> + (install-file "SDLPoP.ini" opt)
> + (copy-recursively "data" (string-append bin "/data"))
> + (copy-recursively "doc" opt)
> + (copy-recursively "mods" opt)))))))
> + (native-inputs `(("pkg-config" ,pkg-config)))
> + (inputs `(("sdl" ,(sdl-union (list sdl2
> + sdl2-image
> + sdl2-mixer)))))
> + (synopsis "Open-source port of Prince of Persia")
> + (description "This package provides port of Prince of Persia, based on the
> +disassembly of the DOS version, extended with new features.")
> + (home-page "https://github.com/NagyD/SDLPoP")
> + (license license:gpl3+)))
> +

The updated patch LGTM!
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFTaMAVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5YwAP/ifh1PH9zk4XpmNE512Tti3r9Db4
AHr26JNKLJXlkMXpDix/PdnzTXJ7m2IBosdikU9R+gWrVMlBcLJqSspm0Ry1KscR
8XRZO3jyxC16EAG0cyleph8fy9oujcfDt7U88QIWwi5C4xwEkF3STGvIY7PZodd3
SOrtaKaXYNGf2rc+ZNf3L3W2705C1lVwXtonfttV8V8xsIIQ8qNLaDHq0vuRZR3C
gasJiEvwRw16Pdk0Gg2PzhGB6O2kAGLQjOne2wkZoGTAa2pm+ywFhzBELgtfxvlJ
tGnsuyvtqRvk91EHhptxi8iAA2+w7VWX/3afh6stD00HXSsjKRGOtq0/hhHrH6tr
xJ4jjCG1Uc+RCU5dUDSweBM/e6rXJediUYZ23oe8uNXg9PSse+QkTvdGyOsHv9gh
sPn6ASUBGlS/wOgZR1SmXt9E1t0Z4hpiCz8LsOLwQVTXL+DWiV/WNydLtwRubFsT
FdLFVfbUkq/QqehQFpSYIu85CYZUd516syM4zGIzSJ5jJNcnm8xUKJPCk7zTNYUI
UkSJ3qqA3dRqllCnjvXhXY1U3lG9s1+ZGs8Enq92DcvGFBAzH2Kp3uTL4cYnE4yW
8dGujquuw+/7IOSFnBNadZDTDKtLren+j7BDYr3SkAzFw9NGBbNaRB/HLIfRJlg3
NgPHNNbGxaTC33Sz
=R4ld
-----END PGP SIGNATURE-----

N
N
Nicolas Goaziou wrote on 28 Sep 2021 21:37
Re: [bug#50653] [PATCH v2] gnu: Add sdlpop.
(name . Xinglu Chen)(address . public@yoctocell.xyz)
87a6jwze2x.fsf@nicolasgoaziou.fr
Hello,

Xinglu Chen <public@yoctocell.xyz> writes:

Toggle quote (2 lines)
> The updated patch LGTM!

Thank you for the review. I removed "Open-source" from the synopsis and
pushed.

Thanks to phodina for the patch.

Regards,
--
Nicolas Goaziou
Closed
?