From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsd87-0000cT-C0 for guix-patches@gnu.org; Thu, 14 Sep 2017 19:01:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsd82-0003Io-Hu for guix-patches@gnu.org; Thu, 14 Sep 2017 19:01:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:32968) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dsd82-0003Ih-E4 for guix-patches@gnu.org; Thu, 14 Sep 2017 19:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dsd82-0002Vt-0t for guix-patches@gnu.org; Thu, 14 Sep 2017 19:01:02 -0400 Subject: [bug#28453] [PATCH 5/5] gnu: openttd-opengfx: Change installation directory. Resent-Message-ID: From: Kei Kebreau References: <20170914005132.26608-1-arunisaac@systemreboot.net> <9ae46039.AEAAP-tS9XsAAAAAAAAAAAPrHR4AAAACwQwAAAAAAAW9WABZudLR@mailjet.com> Date: Thu, 14 Sep 2017 18:59:20 -0400 In-Reply-To: <9ae46039.AEAAP-tS9XsAAAAAAAAAAAPrHR4AAAACwQwAAAAAAAW9WABZudLR@mailjet.com> (Arun Isaac's message of "Thu, 14 Sep 2017 06:21:32 +0530") Message-ID: <87d16sc2ev.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Arun Isaac Cc: 28453@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Arun Isaac writes: > * 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=3D" out) > - ;; Provide the "lzo" path. > - (string-append "--with-liblzo2=3D" > - lzo "/lib/liblzo2.a") > - ;; Put the binary in 'bin' instead of 'games'. > - "--binary-dir=3Dbin")))))))) > + (apply system* "./configure" > + (string-append "--prefix=3D" out) > + ;; Provide the "lzo" path. > + (string-append "--with-liblzo2=3D" > + lzo "/lib/liblzo2.a") > + ;; Put the binary in 'bin' instead of 'games'. > + "--binary-dir=3Dbin" > + 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:z= lib)))) >=20=20 > -;; 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=3Dgcc" > (string-append "INSTALL_DIR=3D" > (assoc-ref %outputs "out") > - "/share/openttd/baseset")) > + "/share/games/openttd/baseset/o= pengfx")) > #: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/opengf= x"))) > - (mkdir-p gfx-dir) > - (copy-recursively opengfx gfx-dir)) > - #t)))))) > + `(#:configure-flags > + (list (string-append "--with-midi=3D" (assoc-ref %build-inputs "t= imidity++") > + "/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))))) >=20=20 > (define-public pinball LGTM. Also, could you please clean up after my earlier mistake and disable parallel building for openttd-opengfx? It wouldn't build reliably for me without that change (and I wondered if it gave anyone else trouble). Thanks for working on this! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlm7CcgACgkQ5qXuPBlG eg1rDQ/+I9PO8MICsaYt+eNcHjYneRz5wJQUkOV4gCU+2HAEDkI0n9bG2rFag83l 6Z2/g+AEw+/Ldmqs8DsWzDgGUKHscP4f3GLYrxWsmtfKGIKzps1498+jlci7+slT scWVHh8Y6sWUFJSkMj1Xh3p7cIwSk7B6JlsRsjcpuyO91UJtTXTOIRolqyk2skI7 OHJYo29b7tEx/Acvf0yTkOCGA0bQiXudRqj9Ik4dcnoMmefYJgZ+nkJQT+3z4V4f hPoynQyKbJSIklv1W+QTif0Pfnjo/R5hWbzerUQYKZ4Xpea2l3zu2awg406hTKKD kWW4SbzRLOYHCi8Bt3U4Skk8K2iNHvMxhX2UOizjAz5rK6gCuFUQdw306rx0ODvW upDIxqoHhVBH/8nDD7hJJIowzE3VclaEKT1zkVAEo2782L2r8OVmOCQNV6y03Cym Vwpyuy/YhDA47GM5Hz0HnGHt+V06jBkD39b5E7ffsL07O1UNF4h13RL8N23QCY9h yd96bMGSPg8U+6Xy1LYlCeua06xzmYXUsYr/g8Uguq0+t50mC6ygRHdTErxTStVK z74EgGx0RE+KgsCqoLHSLgh6UVJw0T9C0/kvMs0mfSlUQjwmJHISj9l76tWBBTys oIVy4pve1mkucBH5YZxb3y6zipSu5toUFGsqagw/QTih0iIwRYY= =Tb1I -----END PGP SIGNATURE----- --=-=-=--