[PATCH] Add Ri-li

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Nicolas Goaziou
Severity
normal
N
N
Nicolas Goaziou wrote on 2 Jun 2019 01:07
(address . guix-patches@gnu.org)
87imtox5uc.fsf@nicolasgoaziou.fr
Hello,

The following patch adds Ri-li game.

Regards,

--
Nicolas Goaziou
From 05d43ade01c809d25d675e255468d1c85b877635 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date: Sun, 2 Jun 2019 01:03:08 +0200
Subject: [PATCH] gnu: Add ri-li.

* gnu/packages/games.scm (ri-li): New variable.
---
gnu/packages/games.scm | 70 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)

Toggle diff (80 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4fdc9b01e6..55f0df225d 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -7336,3 +7336,73 @@ Unfortunately, Hacker is not aware of Drascula's real ambitions: DOMINATING
the World and demonstrating that he is even more evil than his brother Vlad.")
;; Drascula uses a BSD-like license.
(license (license:non-copyleft "file:///readme.txt"))))
+
+(define-public ri-li
+ (package
+ (name "ri-li")
+ (version "2.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/ri-li/"
+ "Ri-li%20Linux_Unix/Ri-li%20V" version "/"
+ "Ri-li-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "1gcdsgnnbbn1mb1hkpwniv3fhkaj1nn8gq33v5c16q3wqchcq77p"))
+ ;; Taken from
+ ;; <https://github.com/NixOS/nixpkgs/blob/master/pkgs/games/rili/moderinze_cpp.patch>.
+ ;; It doesn't build otherwise.
+ (patches (search-patches "ri-li-modernize_cpp.patch"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; Remove "gentoo" subdirectory from Makefile, as it is
+ ;; missing a make file and generates a build failure.
+ (add-after 'configure 'fix-build
+ (lambda _
+ (substitute* "Makefile"
+ ((" gentoo") ""))
+ #t))
+ (add-after 'install 'install-desktop-file
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (apps (string-append out "/share/applications"))
+ (pixmaps (string-append out "/share/pixmaps")))
+ (for-each (lambda (f) (install-file f pixmaps))
+ (find-files "data" "\\.(png|ico)$"))
+ (mkdir-p apps)
+ (with-output-to-file (string-append apps "/ri-li.desktop")
+ (lambda _
+ (format #t
+ "[Desktop Entry]~@
+ Name=Ri-li~@
+ Exec=~a/bin/Ri_li~@
+ Icon=~a/Ri-li-icon-32x32.png~@
+ Categories=Game;ArcadeGame;~@
+ Keywords=toy;train;wooden;snake-like;engine;~@
+ Comment=a toy simulator game~@
+ Comment[de]=Ein Spiel mit einem kleinen Zug~@
+ Comment[fr]=un jeu de petit train~@
+ Comment[ro_RO]=un joc cu un tren de juc?rie~@
+ Terminal=false~@
+ Type=Application~%"
+ out pixmaps))))
+ #t))
+ (add-after 'install-desktop-file 'remove-spurious-files
+ ;; Delete redundant files already installed somewhere else.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each delete-file
+ (find-files (string-append out "/share/Ri-li")
+ "\\.(png|ico)|COPYING"))
+ #t))))))
+ (inputs
+ `(("sdl" ,(sdl-union (list sdl sdl-mixer)))))
+ (home-page "http://www.ri-li.org")
+ (synopsis "Toy train simulation game")
+ (description "Ri-li is a game in which you drive a wooden toy
+steam locomotive across many levels and collect all the coaches to
+win.")
+ ;; The project is dual-licensed GPL2+ and GPL3+.
+ (license (list license:gpl2+ license:gpl3+))))
--
2.21.0
L
L
Ludovic Courtès wrote on 13 Jun 2019 10:49
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 36049@debbugs.gnu.org)
87blz16fa5.fsf@gnu.org
Hi Nicolas,

Nicolas Goaziou <mail@nicolasgoaziou.fr> skribis:

Toggle quote (7 lines)
>>From 05d43ade01c809d25d675e255468d1c85b877635 Mon Sep 17 00:00:00 2001
> From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
> Date: Sun, 2 Jun 2019 01:03:08 +0200
> Subject: [PATCH] gnu: Add ri-li.
>
> * gnu/packages/games.scm (ri-li): New variable.

[...]

Toggle quote (11 lines)
> + (uri (string-append "mirror://sourceforge/ri-li/"
> + "Ri-li%20Linux_Unix/Ri-li%20V" version "/"
> + "Ri-li-" version ".tar.bz2"))
> + (sha256
> + (base32
> + "1gcdsgnnbbn1mb1hkpwniv3fhkaj1nn8gq33v5c16q3wqchcq77p"))
> + ;; Taken from
> + ;; <https://github.com/NixOS/nixpkgs/blob/master/pkgs/games/rili/moderinze_cpp.patch>.
> + ;; It doesn't build otherwise.
> + (patches (search-patches "ri-li-modernize_cpp.patch"))))

Looks like you forgot the patch in this patch. :-)

The rest LGTM.

Ludo’.
N
N
Nicolas Goaziou wrote on 13 Jun 2019 14:01
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 36049-done@debbugs.gnu.org)
8736kdr8wi.fsf@nicolasgoaziou.fr
Hello,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (7 lines)
>> + ;; Taken from
>> + ;; <https://github.com/NixOS/nixpkgs/blob/master/pkgs/games/rili/moderinze_cpp.patch>.
>> + ;; It doesn't build otherwise.
>> + (patches (search-patches "ri-li-modernize_cpp.patch"))))
>
> Looks like you forgot the patch in this patch. :-)

True. Peer review is a boon…

Applied. Thank you.

Regards,

--
Nicolas Goaziou
Closed
?