OpenTTD OpenGFX patches

  • 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)
87injt42pu.fsf@openmailbox.org
This patch series allows a user to have a playable OpenTTD game "out of
the box" by including the game's OpenGFX data.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJZRro9AAoJEOal7jwZRnoNfu8P/A4MuZ7ZNLroS1KFl73XnohX
k5f51q3MVymwr6JvdM6YnzTn85199TMO9xV6FSpdJvFwnM5OcerA1bXvU5LvlCbh
ig4qnCGcFvuxuxp8ErbuiTE6FWOCDEDhA1Qw3TqMjzw4Fq/jtmaKBiqVoq2pOQ+b
i1Z9fbruenJRlsECM+M4LTSa9LTIUQ6wJlR9oilQvf8HUVflhqFR4pRV2hMw5zou
xqbEni4g6hQgTP1g1dFlFR3rjNeas3x19QH0oWW5xTc/wSkY9Ywum+QfJwPKLsS9
85X3eezrG65PmAh/8wIj1NFZRRE3RhygkKU3KaNgDjVbo+HD3tsKXdB2uWezVkby
dcC2JPIfo1uDl+bkxuMDqs7gpNRdyBKhkJf/sLWNp1MBwG6jHDwZ+vVcCN8zzVDn
qeig2Pm9znKuEYrzY6rWumFp/WlI5E7bOifN13aieynn0+MhhgzC0aFmz7Fwz11r
yUEcZDIC51qObooDltouEFlnb2f6jJyDGATX0xWuRB0adzJdQ0mCIxRQes+a9w75
sV/EYOB2bIR3D5CAM6Jz/GYYtSEr/j87T4uiz+Yy9UG3BKRxZs0zbrLPZqTXZNNx
/IubsWO6smjDZdw6Q5PROx3OeZKNaHXqyL0NOhNqcfEQ3+8bmvj5TmnU+fPsK39/
kNXbL4DLChGXVqeq81KZ
=qOIa
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
[PATCH 1/5] gnu: Add nml.
(address . 27421@debbugs.gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170618174443.32690-1-kei@openmailbox.org
* gnu/packages/game-development.scm (nml): New variable.
---
gnu/packages/game-development.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 18ce2ae4a..034713596 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -189,6 +189,30 @@ and network communications. A very thin client library can be embedded to
provide connectivity for client applications written in any language.")
(license license:gpl3+)))
+(define-public nml
+ (package
+ (name "nml")
+ (version "0.4.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://bundles.openttdcoop.org/nml/releases/"
+ version "/nml-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0wk9ls5qyjwkra54rkj1gg94xbwzi7b84a5fh1ma1q7pbimi8rmg"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-pillow" ,python-pillow)
+ ("python-ply" ,python-ply)))
+ (home-page "http://dev.openttdcoop.org/projects/nml")
+ (synopsis "NML compiler")
+ (description
+ "NML is a a python-based compiler, capable of compiling NML files (along
+with their associated language, sound and graphic files) into grf and/or nfo
+files.")
+ (license license:gpl2+)))
+
(define-public python-sge-pygame
(package
(name "python-sge-pygame")
--
2.13.0
Kei Kebreau wrote 8 years ago
[PATCH 2/5] gnu: Add dos2unix.
(address . 27421@debbugs.gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170618174519.32747-1-kei@openmailbox.org
* gnu/packages/textutils.scm (dos2unix): New variable.
---
gnu/packages/textutils.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (57 lines)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 7bc2fc47f..a94ae39c8 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2017 Kei Kebreau <kei@openmailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -38,6 +39,7 @@
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages gettext)
#:use-module (gnu packages java)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
@@ -47,6 +49,34 @@
#:use-module (gnu packages slang)
#:use-module (gnu packages zip))
+(define-public dos2unix
+ (package
+ (name "dos2unix")
+ (version "7.3.4")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://waterlan.home.xs4all.nl/" name "/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1i9hbxn0br7xa18z4bjpkdv7mrzmbfxhm44mzpd07yd2qnxsgkcc"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags (list "CC=gcc"
+ (string-append "prefix=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)))) ; no configure script
+ (native-inputs
+ `(("gettext" ,gettext-minimal)
+ ("perl" ,perl)))
+ (home-page "https://waterlan.home.xs4all.nl/dos2unix.html")
+ (synopsis "DOS/Mac to Unix and vice versa text file format converter")
+ (description
+ "dos2unix is a tool to convert line breaks in a text file from Unix format
+to DOS format and vice versa.")
+ (license license:bsd-2)))
+
(define-public recode
(package
(name "recode")
--
2.13.0
Kei Kebreau wrote 8 years ago
[PATCH 3/5] gnu: Add grfcodec.
(address . 27421@debbugs.gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170618174519.32747-2-kei@openmailbox.org
* gnu/packages/game-development.scm (grfcodec): New variable.
---
gnu/packages/game-development.scm | 59 +++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)

Toggle diff (79 lines)
diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm
index 034713596..404061eff 100644
--- a/gnu/packages/game-development.scm
+++ b/gnu/packages/game-development.scm
@@ -35,6 +35,7 @@
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (gnu packages)
+ #:use-module (gnu packages boost)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages documentation)
@@ -147,6 +148,64 @@ conversions (for example, from PPM to Doom picture format). In addition,
DeuTex has functions such as merging wads, etc.")
(license license:gpl2+)))
+(define-public grfcodec
+ (package
+ (name "grfcodec")
+ (version "6.0.6")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://binaries.openttd.org/extra/"
+ name "/" version "/" name "-" version
+ "-source.tar.xz"))
+ (sha256
+ (base32
+ "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ; no check target
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; no configure script
+ (replace 'install ; no install target
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (doc (string-append out "/share/doc"))
+ (man (string-append out "/share/man/man1")))
+ (for-each (lambda (file)
+ (install-file file bin))
+ '("grfcodec" "grfid" "grfstrip" "nforenum"))
+ (install-file "COPYING" doc)
+ (with-directory-excursion "docs"
+ (for-each (lambda (file)
+ (install-file (string-append file ".txt") doc))
+ '("auto_correct" "commands" "grf" "grfcodec" "grftut"
+ "readme" "readme.rpn"))
+ (for-each (lambda (file)
+ (install-file file man))
+ (find-files "." "\\.1"))))
+ #t)))))
+ (inputs
+ `(("boost" ,boost)
+ ("libpng" ,libpng)
+ ("zlib" ,zlib)))
+ (synopsis "GRF (Graphics Resource File) development tools")
+ (description
+ "The GRF development tools are a set of tools for developing (New)GRFs. It
+includes a number of smaller programs, each with a specific task:
+@enumerate
+@item @code{grfcodec} decodes and encodes GRF files for OpenTTD.
+@item @code{grfid} extracts the so-called \"GRF ID\" from a GRF.
+@item @code{grfstrip} strips all sprites from a GRF.
+@item @code{nforenum} checks NFO code for errors, making corrections when
+necessary.
+@end enumerate")
+ (home-page "http://dev.openttdcoop.org/projects/grfcodec")
+ ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
+ ;; NFORenum is under the GPL2+.
+ ;; The MD5 implementation contained in GRFID is under the zlib license.
+ (license (list license:gpl2 license:gpl2+ license:zlib))))
+
(define-public gzochi
(package
(name "gzochi")
--
2.13.0
Kei Kebreau wrote 8 years ago
[PATCH 4/5] gnu: Add openttd-opengfx.
(address . 27421@debbugs.gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170618174519.32747-3-kei@openmailbox.org
* gnu/packages/games.scm (openttd-opengfx): New variable.
---
gnu/packages/games.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)

Toggle diff (70 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 2c5294737..4214a2f75 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -73,6 +73,7 @@
#:use-module (gnu packages game-development)
#:use-module (gnu packages gettext)
#:use-module (gnu packages ghostscript)
+ #:use-module (gnu packages gimp)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
@@ -2299,6 +2300,55 @@ engine. When you start it you will be prompted to download a graphics set.")
;; 'openttd' a wrapper around them. The engine is playable by itself,
;; but it asks a user to download graphics if it's not found.
+(define openttd-opengfx
+ (package
+ (name "openttd-opengfx")
+ (version "0.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://binaries.openttd.org/extra/opengfx/"
+ version "/opengfx-" version "-source.tar.xz"))
+ (sha256
+ (base32
+ "0iz66q7p1mf00njfjbc4vibh3jaybki7armkl18iz7p6x4chp9zv"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags (list "CC=gcc"
+ (string-append "INSTALL_DIR="
+ (assoc-ref %outputs "out")
+ "/share/openttd/baseset"))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ ;; Make sure HOME is writable for GIMP.
+ (setenv "HOME" (getcwd))
+
+ ;; Redirect stdout to /dev/null instead of stderr. This prevents
+ ;; dos2unix from receiving its version information as a flag.
+ (substitute* "Makefile"
+ (("\\$\\(UNIX2DOS\\) -q --version 2>/dev/null")
+ "$(UNIX2DOS) -q --version 1>/dev/null")))))
+ ;; The check phase for this package only checks the md5sums of the built
+ ;; GRF files against the md5sums of the release versions. Because we use
+ ;; different software versions than upstream does, some of the md5sums
+ ;; are different. However, the package is still reproducible, it's safe
+ ;; to disable this test.
+ #:tests? #f))
+ (native-inputs `(("dos2unix" ,dos2unix)
+ ("gimp" ,gimp)
+ ("grfcodec" ,grfcodec)
+ ("nml" ,nml)
+ ("python" ,python-2)))
+ (home-page "http://dev.openttdcoop.org/projects/opengfx")
+ (synopsis "Base graphics set for OpenTTD")
+ (description
+ "The OpenGFX project is a free replacement of the base graphics so that
+OpenTTD can be shipped finally fully functional without the need for additional
+downloads.")
+ (license license:gpl2)))
+
(define-public openttd
(package
(inherit openttd-engine)
--
2.13.0
Kei Kebreau wrote 8 years ago
[PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase.
(address . 27421@debbugs.gnu.org)(name . Kei Kebreau)(address . kei@openmailbox.org)
20170618174519.32747-4-kei@openmailbox.org
* gnu/packages/games.scm (openttd-engine): Rename package to openttd.
[arguments]: Add it.
[native-inputs]: Add openttd-opengfx.
---
gnu/packages/games.scm | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)

Toggle diff (63 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 4214a2f75..112e1c3db 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2236,9 +2236,9 @@ and a game metadata scraper.")
(home-page "http://www.emulationstation.org")
(license license:expat))))
-(define openttd-engine
+(define-public openttd
(package
- (name "openttd-engine")
+ (name "openttd")
(version "1.7.1")
(source
(origin (method url-fetch)
@@ -2269,8 +2269,20 @@ and a game metadata scraper.")
(string-append "--with-liblzo2="
lzo "/lib/liblzo2.a")
;; Put the binary in 'bin' instead of 'games'.
- "--binary-dir=bin"))))))))
- (native-inputs `(("pkg-config" ,pkg-config)))
+ "--binary-dir=bin")))))
+ (add-after 'install 'install-data
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let*
+ ((opengfx (assoc-ref inputs "opengfx"))
+ (out (assoc-ref outputs "out"))
+ (gfx-dir
+ (string-append out "/share/games/openttd/baseset/opengfx")))
+ (mkdir-p gfx-dir)
+ (copy-recursively opengfx gfx-dir))
+ #t)))))
+ (native-inputs
+ `(("opengfx" ,openttd-opengfx)
+ ("pkg-config" ,pkg-config)))
(inputs
`(("allegro" ,allegro-4)
("fontconfig" ,fontconfig)
@@ -2316,8 +2328,7 @@ engine. When you start it you will be prompted to download a graphics set.")
(arguments
'(#:make-flags (list "CC=gcc"
(string-append "INSTALL_DIR="
- (assoc-ref %outputs "out")
- "/share/openttd/baseset"))
+ (assoc-ref %outputs "out")))
#:phases
(modify-phases %standard-phases
(replace 'configure
@@ -2349,11 +2360,6 @@ OpenTTD can be shipped finally fully functional without the need for additional
downloads.")
(license license:gpl2)))
-(define-public openttd
- (package
- (inherit openttd-engine)
- (name "openttd")))
-
(define-public pinball
(package
(name "pinball")
--
2.13.0
Marius Bakke wrote 8 years ago
Re: [bug#27421] [PATCH 1/5] gnu: Add nml.
(name . Kei Kebreau)(address . kei@openmailbox.org)
87o9tlfa4i.fsf@fastmail.com
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (2 lines)
> * gnu/packages/game-development.scm (nml): New variable.

[...]

Toggle quote (5 lines)
> + (build-system python-build-system)
> + (inputs
> + `(("python-pillow" ,python-pillow)
> + ("python-ply" ,python-ply)))

Should these not be propagated?

Toggle quote (7 lines)
> + (synopsis "NML compiler")
> + (description
> + "NML is a a python-based compiler, capable of compiling NML files (along
> +with their associated language, sound and graphic files) into grf and/or nfo
> +files.")

Could you mention what NML is here with a @dfn{}? Maybe also add
@file{.grf} and @file{.nfo} if they are file extensions. LGTM otherwise!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllGv/0ACgkQoqBt8qM6
VPpGBQgAildtq5cf20KZ+sIng32OvpgcDJWTDM1sboBLRbU86uQypdNHvkO6VuIT
JhTt4ufhmWFLsjlLWKw6P2kyayAviTg8xhIMs36CvAIt7rHKvFYy5pPxa8XCDZ68
FJ6zcZfQs1r62gNUTtGbr8U4PPTy+QXHei19UCDRk1SlDcvu5uhHxPc2tf/dMwVu
nLdmX1V1zvdy5Qc13XmCAOImP+32EuNqT7K7UBBrBPfTpR/m/eHX+n/2EIXz3hdM
bCHJcUuhEW6j5HgbPLM99Pmvh7eRXF152+88J7w893C0TxPLl2OdtjNZFal8+/SZ
/zkiiNUk9rEtWnAVingQB2rpDgfPJQ==
=0k4l
-----END PGP SIGNATURE-----

Marius Bakke wrote 8 years ago
Re: [bug#27421] [PATCH 2/5] gnu: Add dos2unix.
(name . Kei Kebreau)(address . kei@openmailbox.org)
87lgopfa27.fsf@fastmail.com
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (2 lines)
> * gnu/packages/textutils.scm (dos2unix): New variable.

LGTM.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllGwFAACgkQoqBt8qM6
VPpqQAgApqMK/Nu2r/pNvORH/aziqolcIBEhvwJrnSLBSJtdAUSODY42VLyiBtkN
M69hTZCx7Oi+kQOH3LAY1uY2+iqGSATBlxLSfIyDQjZTMO6jJAIR2rCaAbtZgGvs
7FNtScofmY/Dls7v0AqRZreBZuigwKWjhzAd7YNkfqiQGLuYamNwlxszvuexLlkk
kVeAptAEja8k1FlwOblilhEa4BhmYcM0ZobbUa0KFxd1YyLPm8TK2gGx7cQ+ulgH
LhjpdDbHnQUfCe/gsraUK1PHN2Hk51WnA4FOGUjUO0IWVY35w9LEGJoXKipfFx0p
QbGBaSLukz2YmaK6/2kkscvn9ZDvwg==
=cKa0
-----END PGP SIGNATURE-----

Marius Bakke wrote 8 years ago
Re: [bug#27421] [PATCH 3/5] gnu: Add grfcodec.
(name . Kei Kebreau)(address . kei@openmailbox.org)
87injtf9yy.fsf@fastmail.com
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (2 lines)
> * gnu/packages/game-development.scm (grfcodec): New variable.

LGTM!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllGwMUACgkQoqBt8qM6
VPqgFgf/Wzbxhjn6SCxPQ92XLmvlVEqEJQ5+goIiPVW+UBpYKMJ5dqGv7j7TE80R
Gqc7p91njIhNLnbjTAYYy3bHxrUKKNQMbBzuEYbNaYhALhqEndXheRNkznciyfSD
/0b/XZczp8qjirJMzELyOM7wTiJtyFojDTDIaz6BubeeegG4K/BQIGBn+Plm7uFj
rekGW9QFuFpk8DbbGn56Nut2/AAY375tP3u3dZEjbBC1gxhrTyMvASo0tjwbpUlA
ICTRc82Nv/bEoOEfWy9Dor4nW5JatmfP8wWTKse7pasu3/pR884bD7IWThfyBrzx
4lKjQa3YdKebx+bDkAWEpnqftpVJcA==
=WYzE
-----END PGP SIGNATURE-----

Marius Bakke wrote 8 years ago
Re: [bug#27421] [PATCH 4/5] gnu: Add openttd-opengfx.
(name . Kei Kebreau)(address . kei@openmailbox.org)
87fuexf92e.fsf@fastmail.com
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (2 lines)
> * gnu/packages/games.scm (openttd-opengfx): New variable.

[...]

Toggle quote (6 lines)
> + ;; Redirect stdout to /dev/null instead of stderr. This prevents
> + ;; dos2unix from receiving its version information as a flag.
> + (substitute* "Makefile"
> + (("\\$\\(UNIX2DOS\\) -q --version 2>/dev/null")
> + "$(UNIX2DOS) -q --version 1>/dev/null")))))

I'm a bit confused as to why this is necessary. I guess it's a behavior
change in recent versions, that --version prints on stdout? LGTM anyway.

Toggle quote (18 lines)
> + ;; The check phase for this package only checks the md5sums of the built
> + ;; GRF files against the md5sums of the release versions. Because we use
> + ;; different software versions than upstream does, some of the md5sums
> + ;; are different. However, the package is still reproducible, it's safe
> + ;; to disable this test.
> + #:tests? #f))
> + (native-inputs `(("dos2unix" ,dos2unix)
> + ("gimp" ,gimp)
> + ("grfcodec" ,grfcodec)
> + ("nml" ,nml)
> + ("python" ,python-2)))
> + (home-page "http://dev.openttdcoop.org/projects/opengfx")
> + (synopsis "Base graphics set for OpenTTD")
> + (description
> + "The OpenGFX project is a free replacement of the base graphics so that
> +OpenTTD can be shipped finally fully functional without the need for additional
> +downloads.")

Yay! I'm thinking we should mention this is one of many available
grahics sets for OpenTTD. Maybe something like..

"The OpenGFX projects is an implementation of the OpenTTD base grahics
set that aims to ensure the best possible out-of-the-box experience.

OpenGFX provides you with...
@enumerate
@item All graphics you need to enjoy OpenTTD.
@item Uniquely drawn rail vehicles for every climate.
@item Completely snow-aware rivers.
@item Different river and sea water.
@item Snow-aware buoys.
@end enumerate"

(Adapted from readme.ptxt)

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

Indeed version 2 only.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllGxVkACgkQoqBt8qM6
VPoGTgf/QfJrtd/rmH54usVjoThLzU7ehf/coO1qkXOsnfK9yxhSNivtPrx83nTB
w1iBvkVt7liW30Vlxd94f89UTPyY8zHtv+i7sW2uuohYHtbK4pYirC9NL0wAdb3C
tz6Hk8+Al+4wS8a8JVR8eBPrOWz1J0LKq5q8cVJsrwoKIhRSFVaSA9ZiQgMk13bf
r20MXXePYxNSghp5kh3anELQqfptjAFivigXp8j1uhLTgSUDTofcXsQXqL5LUVg6
W+lbr6wK521mg2RoQxdWAQbdLNrjFHyYHsNsqnBAeQYfcHgmWtWJbPnteZ+wcBWl
0GcKUDMPUVn6oX0HM6BPKzgblud6ew==
=ucSE
-----END PGP SIGNATURE-----

Marius Bakke wrote 8 years ago
Re: [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase.
(name . Kei Kebreau)(address . kei@openmailbox.org)
87d1a1f8n6.fsf@fastmail.com
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (4 lines)
> * gnu/packages/games.scm (openttd-engine): Rename package to openttd.
> [arguments]: Add it.
> [native-inputs]: Add openttd-opengfx.

This should also mention that the (openttd) variable is now gone.
However, I would prefer keeping "openttd-engine" and only add these
changes to the inherited "openttd" package. What do you think?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllGx30ACgkQoqBt8qM6
VPr+Xgf+LsuLgPuFugmju6/EoWIw59hHMWbWTCzPzFhzkmXjMqJUHVX6HBHkQf4/
qj42LQPef+Z2lwdfghHJiA72Gqotg29aVpCRV+ltrRrJ/WbV1mfvCoRjJcrGo3uH
EIlWzp1V1yb9cxkEQBYYKktvarS3UhbwLX6fDjyyA8rIzsHpbo0sljQSGoI6PRbo
3PRztoK1IA3BD8HxEOFM4aGxde2RCGISQ15qHaaI+4limiga+SJG3M5p+Ye18j10
LzqFJpqih1gkMK+QuxsWhtzB3j2o6j2RYCg5k0tKKG2ZdK03knyZuXz07MwrX+Xe
RKfU4qA4JOhcxbnXkqYCpNSmJG9+sw==
=swtS
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
Re: [bug#27421] [PATCH 4/5] gnu: Add openttd-opengfx.
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 27421@debbugs.gnu.org)
874lvdcep1.fsf@openmailbox.org
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (16 lines)
> Kei Kebreau <kei@openmailbox.org> writes:
>
>> * gnu/packages/games.scm (openttd-opengfx): New variable.
>
> [...]
>
>> + ;; Redirect stdout to /dev/null instead of stderr. This prevents
>> + ;; dos2unix from receiving its version information as a flag.
>> + (substitute* "Makefile"
>> + (("\\$\\(UNIX2DOS\\) -q --version 2>/dev/null")
>> + "$(UNIX2DOS) -q --version 1>/dev/null")))))
>
> I'm a bit confused as to why this is necessary. I guess it's a behavior
> change in recent versions, that --version prints on stdout? LGTM anyway.
>

I haven't used old versions of dos2unix, so I wouldn't know better. I've
rephrased the comment to make it a bit clearer.

Toggle quote (39 lines)
>> + ;; The check phase for this package only checks the md5sums of the
>> built
>> + ;; GRF files against the md5sums of the release versions. Because
>> we use
>> + ;; different software versions than upstream does, some of the md5sums
>> + ;; are different. However, the package is still reproducible, it's
>> safe
>> + ;; to disable this test.
>> + #:tests? #f))
>> + (native-inputs `(("dos2unix" ,dos2unix)
>> + ("gimp" ,gimp)
>> + ("grfcodec" ,grfcodec)
>> + ("nml" ,nml)
>> + ("python" ,python-2)))
>> + (home-page "http://dev.openttdcoop.org/projects/opengfx")
>> + (synopsis "Base graphics set for OpenTTD")
>> + (description
>> + "The OpenGFX project is a free replacement of the base graphics so that
>> +OpenTTD can be shipped finally fully functional without the need
>> for additional
>> +downloads.")
>
> Yay! I'm thinking we should mention this is one of many available
> grahics sets for OpenTTD. Maybe something like..
>
> "The OpenGFX projects is an implementation of the OpenTTD base grahics
> set that aims to ensure the best possible out-of-the-box experience.
>
> OpenGFX provides you with...
> @enumerate
> @item All graphics you need to enjoy OpenTTD.
> @item Uniquely drawn rail vehicles for every climate.
> @item Completely snow-aware rivers.
> @item Different river and sea water.
> @item Snow-aware buoys.
> @end enumerate"
>
> (Adapted from readme.ptxt)

Why didn't I do this???
I'm totally using this description.

Toggle quote (5 lines)
>

>> + (license license:gpl2)))
>
> Indeed version 2 only.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAllGy5oACgkQ5qXuPBlG
eg0sEQ/+JPkCWJSTHGKGur4ast/wg37Ob0T9X4gSCLzepMXfEf0tXa8jl/5R6pIJ
XFI5CsNOvquxXVrkrpt8wn40k/pWDIi5GWhc/uWxNmHNMhXYP2wktZSXJeQb5DmR
8OquOYAsJv7r5rTfe0VvuzpXgr/NN9BgR3TWTYRrBsC/A5weJkMQFy6DeMspUfGV
7c3iHR9Pa1l8Gzc5xEVeyZ7yL82vaObc3v6opVMnoz4xFrUMkjPcBTek0yLayU1A
ElDaoEmzJh/OIu3Jo2g2Ep+DKSvlx8CJ379YTG7fSVbNcYycj7vg/uRtFmKXmqE5
uN8BEjj2jdQFApVG9Hwm6gp6/1gy1ZA8V9wzd7eiMymLKkkzJqokgqI0O3zSQ3td
ImtEBg+uBDxe9/Xe+lDkhk2vmHJaxdUvHgODGLMVt3c+QLXKhnbS9ugwFbvx+N7m
YqOBVNJBH1U2DogvEMy1pnVn+cWu+tKM/esEpSkp2CGOvpcb3HVW/G016M9H1HIG
cWVTCrKE3HPpYL2e4k26acpiR0ffS+eXiAjT67dw3FKGlJOxpMkoqVJgcXFZTuit
tEFMJCWiJONk8ZgjM5Fc75D6NJdMBP3Rz7CLXQQIRCzphnEuNK0sO3ex9AxWDsep
Oe5R8xmSkQFACFQzBrEEbYBaFNme6FmfkZMp7Z7bLJot3msee0I=
=9Ag8
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
Re: [bug#27421] [PATCH 1/5] gnu: Add nml.
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 27421@debbugs.gnu.org)
87y3spazmp.fsf@openmailbox.org
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (13 lines)
> Kei Kebreau <kei@openmailbox.org> writes:
>
>> * gnu/packages/game-development.scm (nml): New variable.
>
> [...]
>
>> + (build-system python-build-system)
>> + (inputs
>> + `(("python-pillow" ,python-pillow)
>> + ("python-ply" ,python-ply)))
>
> Should these not be propagated?

They should! Nice catch.

Toggle quote (11 lines)
>
>> + (home-page "http://dev.openttdcoop.org/projects/nml")
>> + (synopsis "NML compiler")
>> + (description
>> + "NML is a a python-based compiler, capable of compiling NML files (along
>> +with their associated language, sound and graphic files) into grf and/or nfo
>> +files.")
>
> Could you mention what NML is here with a @dfn{}? Maybe also add
> @file{.grf} and @file{.nfo} if they are file extensions. LGTM otherwise!

Sure thing. I am doing the same for "GRF" in the grfcodec description.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAllGzh4ACgkQ5qXuPBlG
eg33mBAAtBHlLGOw6EdH1MU6pMLzVWIsnst2xzWgnZbJVPRpnDRokDz8LOQklyTA
hqK7Vv3EVGu5IdSQ9t765dBJmXheX+xLiIKhCM9RYJPlXQ2ANkAJ2/ueRQ5tOHf9
bzowDNsmtyh2Gny0VFCbDMDL4YjOG73HyZMprr/CTmi9JBPyHvcIwUKDsaiQEluo
Vq1LW9doPsTUX7afIDwtQP0aUK7Z369EaDZps1fXIdNofHRGR4YYRC+cECFNiGOj
M5866PgMWMaCgkBmMvk5pJzq90cdnEiki2cwkgWjsKh4afhZsJbArE/JxOa5A/pt
ws2RNK+VMLvlnCmYw//NiX+YBXOkvPjmPQedzQ+B9IpOOFBZsKr6sOQLCTub4nyi
RmQl4SmXqK8sMOMF33ANXteHpCnLNh4mRn32n7jI8Zh3WAcJ4SbVY6VAHQ2VVYyq
oyGSzvbjISO7aV5K5sErK9KOtgZ30d39b5NsIpBkuAxf5C+0KFLr7ta/AA/DvQ42
a+uckXlLeXdqL6RMyVzCHIc9TbiqFeobo5m+/JpaDuvjYmilp/5J8Z4PzzkDFpzy
gn2yQh5pN7FB7PBmO0GivipKsuf/EE8BpB54Hzj4JjYaH6VE6pGGZpxk4gq43FCT
YF4rQYy9gP1u6Otwwyh87lIT8lCXCnC93/vv3tev6vLBMPT3XGU=
=EIJt
-----END PGP SIGNATURE-----

Kei Kebreau wrote 8 years ago
Re: [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase.
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 27421@debbugs.gnu.org)
87tw3datzg.fsf@openmailbox.org
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (10 lines)
> Kei Kebreau <kei@openmailbox.org> writes:
>
>> * gnu/packages/games.scm (openttd-engine): Rename package to openttd.
>> [arguments]: Add it.
>> [native-inputs]: Add openttd-opengfx.
>
> This should also mention that the (openttd) variable is now gone.
> However, I would prefer keeping "openttd-engine" and only add these
> changes to the inherited "openttd" package. What do you think?

That would be a more logical progression given the comment about adding
openttd-opengfx. I've attached the change you're talking about.
From d02c7d59d268199a04c2e57da0c9d2646052f980 Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kei@openmailbox.org>
Date: Sun, 18 Jun 2017 13:45:19 -0400
Subject: [PATCH] gnu: openttd: Add 'install-data' phase.

* gnu/packages/games.scm (openttd)[arguments]: Add it.
[native-inputs]: Add openttd-opengfx.
---
gnu/packages/games.scm | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)

Toggle diff (33 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index df680d11d..b8ca8dc15 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2360,7 +2360,25 @@ OpenGFX provides you with...
(define-public openttd
(package
(inherit openttd-engine)
- (name "openttd")))
+ (name "openttd")
+ (arguments
+ (substitute-keyword-arguments (package-arguments openttd-engine)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'install 'install-data
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let*
+ ((opengfx (assoc-ref inputs "opengfx"))
+ (out (assoc-ref outputs "out"))
+ (gfx-dir
+ (string-append out
+ "/share/games/openttd/baseset/opengfx")))
+ (mkdir-p gfx-dir)
+ (copy-recursively opengfx gfx-dir))
+ #t))))))
+ (native-inputs
+ `(("opengfx" ,openttd-opengfx)
+ ,@(package-native-inputs openttd-engine)))))
(define-public pinball
(package
--
2.13.1
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAllG6rQACgkQ5qXuPBlG
eg36MA//dfP6vvH5vnKWLaHNPUW/1ePQO5lrz+GLRNJ471avCxiuJEM1u1zE/OvG
8CpWecahIxIerHoxLL9R1gdT5bpYqFwM+c65Qy8R4q0wjUx5QXATQaC4ud6GV0VV
cOh9Gm1AfTMZ5Aszy4fGufehupE6W8npxUPb3X7fJmjXjDY9A46NEItz+gNXscEP
tNOtvUipuBRk3tiTL7HMF8Hd9KAnynbS96k44V8O6JwQp1XdnuBadBulGY/GAwGX
xu4KG1EA0R/0n703QWxS9yeVTgzB8ctDDgqyaqnjMnIvEgAshqT8hxPEPsBZG/0e
QvzFCM5+GLzO6cVE731bqLg3xN4Ha6DZcPu/puvMUxwKtLHJJy16FkZMe+zDR7vy
6JaWK4yyM/D71zw/oT3NFRUNEqjQntfyTiXDPuc0Qqtb4GqY78DKjoKaPZZ4H+ib
53jIZAVIMt1vowl2ZjdXiPADYeaB6ytBWCRnKvEXiq85lqn9dOWGAbPm51Dkfnog
ckGwfqDdKUo8x1Ytt1fof2X/mNqmMdfEntgdeUvUytbPhASN7Gu+RLgn37E65i7X
zle78gJhguT4FkNVx0nGNlX5HiqyLUMCJbVS5eLm0kFJeAfDndCQ0zu+PkKqk+ra
d3bo3Fm8VntRR16pbQM0GENSkn1RfHMH5M5cskOMzsA09vprCqQ=
=A2ES
-----END PGP SIGNATURE-----

Marius Bakke wrote 8 years ago
(name . Kei Kebreau)(address . kei@openmailbox.org)(address . 27421@debbugs.gnu.org)
871sqepife.fsf@fastmail.com
Kei Kebreau <kei@openmailbox.org> writes:

Toggle quote (15 lines)
> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Kei Kebreau <kei@openmailbox.org> writes:
>>
>>> * gnu/packages/games.scm (openttd-engine): Rename package to openttd.
>>> [arguments]: Add it.
>>> [native-inputs]: Add openttd-opengfx.
>>
>> This should also mention that the (openttd) variable is now gone.
>> However, I would prefer keeping "openttd-engine" and only add these
>> changes to the inherited "openttd" package. What do you think?
>
> That would be a more logical progression given the comment about adding
> openttd-opengfx. I've attached the change you're talking about.

LGTM, thanks!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllJd3UACgkQoqBt8qM6
VPoRVAf/THkNDgj1RrEhAP03bCy6lZlTD02NC8r954GHztUM4Hyxpm5FHHYq1weS
Zxuy9H63SDai4WSLhTxX8BYZ0Vnz58o16ISFHqtc52sBeMqCR9U+xQOX67R1z2Eu
jpLnTq+DiPf+zJgr/lwzW+gla50tP/ETeQ53uI8Np1tlYAIqk1z3VcibAXFac2hj
ytLxeWVtZjwo9JHxKKgpTNdRGmyyEIXpaiyReAXv6D7tOXjkeqGjY9qFlZ5wtZ2+
+BIeA62pMDvMQ6jjFiOahWxOYGraR7+/uxW6GKiX9TdcpjIanvVNqeJNO+sSx/Aa
KTsfBCfWgn8MKencuOSPcpft6ueMFw==
=Gz1g
-----END PGP SIGNATURE-----

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

Toggle quote (19 lines)
> Kei Kebreau <kei@openmailbox.org> writes:
>
>> Marius Bakke <mbakke@fastmail.com> writes:
>>
>>> Kei Kebreau <kei@openmailbox.org> writes:
>>>
>>>> * gnu/packages/games.scm (openttd-engine): Rename package to openttd.
>>>> [arguments]: Add it.
>>>> [native-inputs]: Add openttd-opengfx.
>>>
>>> This should also mention that the (openttd) variable is now gone.
>>> However, I would prefer keeping "openttd-engine" and only add these
>>> changes to the inherited "openttd" package. What do you think?
>>
>> That would be a more logical progression given the comment about adding
>> openttd-opengfx. I've attached the change you're talking about.
>
> LGTM, thanks!

All five patches pushed to master. Thanks for the review, Marius!
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAllJtPcACgkQ5qXuPBlG
eg1BlQ/9FzOQM9CPLm1th+QXVWkIkERvzdeie4fw070oO/NWW2gSg24bFEE+HGAz
f6gaVn5Ar7IsLonB/FKCqX8NLy0RmEL6iMBi03tVzHeHZw/hTf9lmOQgIjTlwSW9
5Rw/08plUrO3x45lEBNqk71FfufJof4/uqr3v484QkyaYSqMgWsI1ukHtenasBVE
pqChvQNmppGnQysfHi2jOkE98ag47R2UfGxu3A67eEravnxf+3HkM+Orq+fYD4mF
Wgx59Ks9GvAU9Dny25bU6E22HFxqpGbVYHCmcnZ0lc6O4osA6L4EmQI/o79VPAxD
4ZLGQlH+7v5wO2jYcMe4bB5mR/gcjHtj+J4e98AcqIloltYX5nsGSZNPcTKqkUxf
pGvMhJmpBImwqWW4jQDshak4GQ8LFG91fhfsFJWIN083j1t4vkP9bttanVZ0wK0Z
4zuCN70anYFbIX34MisolUDJ01n42vJVf+QMyY51DqCPEKS4eq4CGWoiBMJqzqa7
8nsf0cL8PrjkvRto9eMmraFPnim2Yixo7ryBftsWbXNXD2V9Pt3Zq3SVlQjCc+oR
nzrGiFd0UNQ/1HqcMyhMBM7E7CtFdhVvlV8St03z5gMhPmci9dpfHOpAxGpWdb16
C3h2vwai2GcjAn7hO8RHm317mIibmuTMQAr1prgtfyO+GOLXjnc=
=YHzj
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 27421
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