From: Arun Isaac <arunisaac@systemreboot.net>
To: 28453@debbugs.gnu.org
Subject: [bug#28453] [PATCH 5/5] gnu: openttd-opengfx: Change installation directory.
Date: Thu, 14 Sep 2017 06:21:32 +0530 [thread overview]
Message-ID: <9ae46039.AEAAP-tS9XsAAAAAAAAAAAPrHR4AAAACwQwAAAAAAAW9WABZudLR@mailjet.com> (raw)
In-Reply-To: <20170914005132.26608-1-arunisaac@systemreboot.net>
* gnu/packages/games.scm (openttd-opengfx)[arguments]: Change installation
directory from /share/openttd/baseset/opengfx to
/share/games/openttd/baseset/opengfx.
(openttd-engine)[arguments]: Support #:configure-flags keyword argument in
'configure' phase.
(openttd)[inputs]: Add timidity++.
[native-inputs]: Add openttd-openmsx and openttd-opensfx.
[arguments]: Configure with timidity as MIDI player. Install data from
openttd-openmsx and openttd-opensfx.
---
gnu/packages/games.scm | 57 ++++++++++++++++++++++++++------------------------
1 file changed, 30 insertions(+), 27 deletions(-)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 67e987bff..406eb5471 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -2427,17 +2427,19 @@ and a game metadata scraper.")
;; The build process fails if the configure script is passed the
;; option "--enable-fast-install".
(replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
+ (lambda* (#:key inputs outputs (configure-flags '())
+ #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(lzo (assoc-ref inputs "lzo")))
(zero?
- (system* "./configure"
- (string-append "--prefix=" out)
- ;; Provide the "lzo" path.
- (string-append "--with-liblzo2="
- lzo "/lib/liblzo2.a")
- ;; Put the binary in 'bin' instead of 'games'.
- "--binary-dir=bin"))))))))
+ (apply system* "./configure"
+ (string-append "--prefix=" out)
+ ;; Provide the "lzo" path.
+ (string-append "--with-liblzo2="
+ lzo "/lib/liblzo2.a")
+ ;; Put the binary in 'bin' instead of 'games'.
+ "--binary-dir=bin"
+ configure-flags))))))))
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs
`(("allegro" ,allegro-4)
@@ -2464,10 +2466,6 @@ engine. When you start it you will be prompted to download a graphics set.")
;; different terms.
(license (list license:bsd-3 license:gpl2 license:lgpl2.1+ license:zlib))))
-;; TODO Add 'openttd-opengfx' and 'openttd-openmsx' packages and make
-;; '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")
@@ -2485,7 +2483,7 @@ engine. When you start it you will be prompted to download a graphics set.")
'(#:make-flags (list "CC=gcc"
(string-append "INSTALL_DIR="
(assoc-ref %outputs "out")
- "/share/openttd/baseset"))
+ "/share/games/openttd/baseset/opengfx"))
#:phases
(modify-phases %standard-phases
(replace 'configure
@@ -2598,22 +2596,27 @@ Transport Tycoon Deluxe.")
(inherit openttd-engine)
(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))))))
+ `(#:configure-flags
+ (list (string-append "--with-midi=" (assoc-ref %build-inputs "timidity++")
+ "/bin/timidity"))
+ ,@(substitute-keyword-arguments (package-arguments openttd-engine)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'install 'install-data
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (for-each
+ (lambda (input)
+ (copy-recursively (assoc-ref inputs input)
+ (assoc-ref outputs "out")))
+ (list "opengfx" "openmsx" "opensfx"))
+ #t)))))))
+ (inputs
+ `(("timidity++" ,timidity++)
+ ,@(package-inputs openttd-engine)))
(native-inputs
`(("opengfx" ,openttd-opengfx)
+ ("openmsx" ,openttd-openmsx)
+ ("opensfx" ,openttd-opensfx)
,@(package-native-inputs openttd-engine)))))
(define-public pinball
--
2.14.1
next prev parent reply other threads:[~2017-09-14 0:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170914005132.26608-1-arunisaac@systemreboot.net>
2017-09-14 0:51 ` [bug#28453] [PATCH 2/5] licenses: Add CC-Sampling+ 1.0 Arun Isaac
2017-09-14 22:46 ` Kei Kebreau
2017-09-14 0:51 ` [bug#28453] [PATCH 3/5] gnu: Add openttd-opensfx Arun Isaac
2017-09-14 22:50 ` Kei Kebreau
2017-09-16 17:04 ` Arun Isaac
2017-09-14 0:51 ` [bug#28453] [PATCH 4/5] gnu: Add openttd-openmsx Arun Isaac
2017-09-14 22:52 ` Kei Kebreau
2017-09-16 17:06 ` Arun Isaac
2017-09-17 17:06 ` Kei Kebreau
2017-09-18 13:54 ` Arun Isaac
2017-09-14 0:51 ` Arun Isaac [this message]
2017-09-14 22:59 ` [bug#28453] [PATCH 5/5] gnu: openttd-opengfx: Change installation directory Kei Kebreau
2017-09-16 17:08 ` Arun Isaac
2017-09-17 21:53 ` Kei Kebreau
2017-09-18 20:32 ` Kei Kebreau
2017-09-19 19:54 ` Arun Isaac
[not found] ` <87poaltdpm.fsf@posteo.net>
[not found] ` <878th7szrv.fsf@posteo.net>
2017-09-23 3:32 ` Arun Isaac
[not found] ` <20170914005132.26608-5-arunisaac@systemreboot.net>
2017-09-14 21:01 ` Arun Isaac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ae46039.AEAAP-tS9XsAAAAAAAAAAAPrHR4AAAACwQwAAAAAAAW9WABZudLR@mailjet.com \
--to=arunisaac@systemreboot.net \
--cc=28453@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).