unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#27421] OpenTTD OpenGFX patches
@ 2017-06-18 17:37 Kei Kebreau
  2017-06-18 17:44 ` [bug#27421] [PATCH 1/5] gnu: Add nml Kei Kebreau
  2017-06-18 17:45 ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Kei Kebreau
  0 siblings, 2 replies; 16+ messages in thread
From: Kei Kebreau @ 2017-06-18 17:37 UTC (permalink / raw)
  To: 27421

[-- Attachment #1: Type: text/plain, Size: 119 bytes --]

This patch series allows a user to have a playable OpenTTD game "out of
the box" by including the game's OpenGFX data.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 1/5] gnu: Add nml.
  2017-06-18 17:37 [bug#27421] OpenTTD OpenGFX patches Kei Kebreau
@ 2017-06-18 17:44 ` Kei Kebreau
  2017-06-18 18:01   ` Marius Bakke
  2017-06-18 17:45 ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Kei Kebreau
  1 sibling, 1 reply; 16+ messages in thread
From: Kei Kebreau @ 2017-06-18 17:44 UTC (permalink / raw)
  To: 27421; +Cc: Kei Kebreau

* gnu/packages/game-development.scm (nml): New variable.
---
 gnu/packages/game-development.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 2/5] gnu: Add dos2unix.
  2017-06-18 17:37 [bug#27421] OpenTTD OpenGFX patches Kei Kebreau
  2017-06-18 17:44 ` [bug#27421] [PATCH 1/5] gnu: Add nml Kei Kebreau
@ 2017-06-18 17:45 ` Kei Kebreau
  2017-06-18 17:45   ` [bug#27421] [PATCH 3/5] gnu: Add grfcodec Kei Kebreau
                     ` (3 more replies)
  1 sibling, 4 replies; 16+ messages in thread
From: Kei Kebreau @ 2017-06-18 17:45 UTC (permalink / raw)
  To: 27421; +Cc: Kei Kebreau

* gnu/packages/textutils.scm (dos2unix): New variable.
---
 gnu/packages/textutils.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 3/5] gnu: Add grfcodec.
  2017-06-18 17:45 ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Kei Kebreau
@ 2017-06-18 17:45   ` Kei Kebreau
  2017-06-18 18:04     ` Marius Bakke
  2017-06-18 17:45   ` [bug#27421] [PATCH 4/5] gnu: Add openttd-opengfx Kei Kebreau
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 16+ messages in thread
From: Kei Kebreau @ 2017-06-18 17:45 UTC (permalink / raw)
  To: 27421; +Cc: Kei Kebreau

* gnu/packages/game-development.scm (grfcodec): New variable.
---
 gnu/packages/game-development.scm | 59 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 4/5] gnu: Add openttd-opengfx.
  2017-06-18 17:45 ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Kei Kebreau
  2017-06-18 17:45   ` [bug#27421] [PATCH 3/5] gnu: Add grfcodec Kei Kebreau
@ 2017-06-18 17:45   ` Kei Kebreau
  2017-06-18 18:24     ` Marius Bakke
  2017-06-18 17:45   ` [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase Kei Kebreau
  2017-06-18 18:02   ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Marius Bakke
  3 siblings, 1 reply; 16+ messages in thread
From: Kei Kebreau @ 2017-06-18 17:45 UTC (permalink / raw)
  To: 27421; +Cc: Kei Kebreau

* gnu/packages/games.scm (openttd-opengfx): New variable.
---
 gnu/packages/games.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase.
  2017-06-18 17:45 ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Kei Kebreau
  2017-06-18 17:45   ` [bug#27421] [PATCH 3/5] gnu: Add grfcodec Kei Kebreau
  2017-06-18 17:45   ` [bug#27421] [PATCH 4/5] gnu: Add openttd-opengfx Kei Kebreau
@ 2017-06-18 17:45   ` Kei Kebreau
  2017-06-18 18:33     ` Marius Bakke
  2017-06-18 18:02   ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Marius Bakke
  3 siblings, 1 reply; 16+ messages in thread
From: Kei Kebreau @ 2017-06-18 17:45 UTC (permalink / raw)
  To: 27421; +Cc: Kei Kebreau

* 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(-)

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 1/5] gnu: Add nml.
  2017-06-18 17:44 ` [bug#27421] [PATCH 1/5] gnu: Add nml Kei Kebreau
@ 2017-06-18 18:01   ` Marius Bakke
  2017-06-18 19:01     ` Kei Kebreau
  0 siblings, 1 reply; 16+ messages in thread
From: Marius Bakke @ 2017-06-18 18:01 UTC (permalink / raw)
  To: Kei Kebreau, 27421

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

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?

> +    (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!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 2/5] gnu: Add dos2unix.
  2017-06-18 17:45 ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Kei Kebreau
                     ` (2 preceding siblings ...)
  2017-06-18 17:45   ` [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase Kei Kebreau
@ 2017-06-18 18:02   ` Marius Bakke
  3 siblings, 0 replies; 16+ messages in thread
From: Marius Bakke @ 2017-06-18 18:02 UTC (permalink / raw)
  To: Kei Kebreau, 27421

[-- Attachment #1: Type: text/plain, Size: 107 bytes --]

Kei Kebreau <kei@openmailbox.org> writes:

> * gnu/packages/textutils.scm (dos2unix): New variable.

LGTM.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 3/5] gnu: Add grfcodec.
  2017-06-18 17:45   ` [bug#27421] [PATCH 3/5] gnu: Add grfcodec Kei Kebreau
@ 2017-06-18 18:04     ` Marius Bakke
  0 siblings, 0 replies; 16+ messages in thread
From: Marius Bakke @ 2017-06-18 18:04 UTC (permalink / raw)
  To: Kei Kebreau, 27421

[-- Attachment #1: Type: text/plain, Size: 114 bytes --]

Kei Kebreau <kei@openmailbox.org> writes:

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

LGTM!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 4/5] gnu: Add openttd-opengfx.
  2017-06-18 17:45   ` [bug#27421] [PATCH 4/5] gnu: Add openttd-opengfx Kei Kebreau
@ 2017-06-18 18:24     ` Marius Bakke
  2017-06-18 18:51       ` Kei Kebreau
  0 siblings, 1 reply; 16+ messages in thread
From: Marius Bakke @ 2017-06-18 18:24 UTC (permalink / raw)
  To: Kei Kebreau, 27421

[-- Attachment #1: Type: text/plain, Size: 2101 bytes --]

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.

> +       ;; 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)

> +    (license license:gpl2)))

Indeed version 2 only.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase.
  2017-06-18 17:45   ` [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase Kei Kebreau
@ 2017-06-18 18:33     ` Marius Bakke
  2017-06-18 21:03       ` Kei Kebreau
  0 siblings, 1 reply; 16+ messages in thread
From: Marius Bakke @ 2017-06-18 18:33 UTC (permalink / raw)
  To: Kei Kebreau, 27421

[-- Attachment #1: Type: text/plain, Size: 376 bytes --]

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?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 4/5] gnu: Add openttd-opengfx.
  2017-06-18 18:24     ` Marius Bakke
@ 2017-06-18 18:51       ` Kei Kebreau
  0 siblings, 0 replies; 16+ messages in thread
From: Kei Kebreau @ 2017-06-18 18:51 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27421

[-- Attachment #1: Type: text/plain, Size: 2396 bytes --]

Marius Bakke <mbakke@fastmail.com> writes:

> 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.

>> + ;; 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.

>

>> +    (license license:gpl2)))
>
> Indeed version 2 only.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 1/5] gnu: Add nml.
  2017-06-18 18:01   ` Marius Bakke
@ 2017-06-18 19:01     ` Kei Kebreau
  0 siblings, 0 replies; 16+ messages in thread
From: Kei Kebreau @ 2017-06-18 19:01 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27421

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

Marius Bakke <mbakke@fastmail.com> writes:

> 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.

>
>> +    (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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase.
  2017-06-18 18:33     ` Marius Bakke
@ 2017-06-18 21:03       ` Kei Kebreau
  2017-06-20 19:28         ` Marius Bakke
  0 siblings, 1 reply; 16+ messages in thread
From: Kei Kebreau @ 2017-06-18 21:03 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27421


[-- Attachment #1.1: Type: text/plain, Size: 571 bytes --]

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.


[-- Attachment #1.2: 0001-gnu-openttd-Add-install-data-phase.patch --]
[-- Type: text/plain, Size: 1584 bytes --]

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(-)

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase.
  2017-06-18 21:03       ` Kei Kebreau
@ 2017-06-20 19:28         ` Marius Bakke
  2017-06-20 23:51           ` bug#27421: " Kei Kebreau
  0 siblings, 1 reply; 16+ messages in thread
From: Marius Bakke @ 2017-06-20 19:28 UTC (permalink / raw)
  To: Kei Kebreau; +Cc: 27421

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

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!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* bug#27421: [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase.
  2017-06-20 19:28         ` Marius Bakke
@ 2017-06-20 23:51           ` Kei Kebreau
  0 siblings, 0 replies; 16+ messages in thread
From: Kei Kebreau @ 2017-06-20 23:51 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27421-done

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]

Marius Bakke <mbakke@fastmail.com> writes:

> 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!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-06-21  2:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-18 17:37 [bug#27421] OpenTTD OpenGFX patches Kei Kebreau
2017-06-18 17:44 ` [bug#27421] [PATCH 1/5] gnu: Add nml Kei Kebreau
2017-06-18 18:01   ` Marius Bakke
2017-06-18 19:01     ` Kei Kebreau
2017-06-18 17:45 ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Kei Kebreau
2017-06-18 17:45   ` [bug#27421] [PATCH 3/5] gnu: Add grfcodec Kei Kebreau
2017-06-18 18:04     ` Marius Bakke
2017-06-18 17:45   ` [bug#27421] [PATCH 4/5] gnu: Add openttd-opengfx Kei Kebreau
2017-06-18 18:24     ` Marius Bakke
2017-06-18 18:51       ` Kei Kebreau
2017-06-18 17:45   ` [bug#27421] [PATCH 5/5] gnu: openttd-engine: Add 'install-data' phase Kei Kebreau
2017-06-18 18:33     ` Marius Bakke
2017-06-18 21:03       ` Kei Kebreau
2017-06-20 19:28         ` Marius Bakke
2017-06-20 23:51           ` bug#27421: " Kei Kebreau
2017-06-18 18:02   ` [bug#27421] [PATCH 2/5] gnu: Add dos2unix Marius Bakke

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).