From e9687748e1d0c92de4cb4c1db5dbe90d30486a2f Mon Sep 17 00:00:00 2001 From: Albin Söderqvist Date: Wed, 13 Apr 2016 03:50:36 +0200 Subject: gnu: Add openttd. * gnu/packages/games.scm (openttd-engine): New variable (private). (openttd): Inherit it. New variable (public). Signed-off-by: Alex Kost --- gnu/packages/games.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 3fb30af9e2..c514671c35 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2016 Rodger Fox ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis ;;; Copyright © 2016 Nils Gillmann +;;; Copyright © 2016 Albin Söderqvist ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,6 +62,7 @@ #:use-module (gnu packages libunwind) #:use-module (gnu packages haskell) #:use-module (gnu packages mp3) + #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages ncurses) #:use-module (gnu packages python) @@ -1858,6 +1860,74 @@ and a game metadata scraper.") (home-page "http://www.emulationstation.org") (license license:expat))) +(define openttd-engine + (package + (name "openttd-engine") + (version "1.6.0") + (source + (origin (method url-fetch) + (uri (string-append "http://binaries.openttd.org/releases/" + version "/openttd-" version "-source.tar.xz")) + (sha256 + (base32 + "1cjf9gz7d0sn7893wv9d00q724sxv3d81bgb0c5f5ppz2ssyc4jc")) + (modules '((guix build utils))) + (snippet + ;; The DOS port contains proprietary software. + '(delete-file-recursively "os/dos")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no "check" target + #:phases + (modify-phases %standard-phases + ;; The build process fails if the configure script is passed the + ;; option "--enable-fast-install". + (replace 'configure + (lambda* (#:key inputs outputs #: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")))))))) + (native-inputs `(("pkg-config" ,pkg-config))) + (inputs + `(("allegro" ,allegro-4) + ("fontconfig" ,fontconfig) + ("freetype" ,freetype) + ("icu4c" ,icu4c) + ("libpng" ,libpng) + ("lzo" ,lzo) + ("sdl" ,sdl) + ("xz" ,xz) + ("zlib" ,zlib))) + (synopsis "Transportation economics simulator") + (description "OpenTTD is a game in which you transport goods and +passengers by land, water and air. It is a re-implementation of Transport +Tycoon Deluxe with many enhancements including multiplayer mode, +internationalization support, conditional orders and the ability to clone, +autoreplace and autoupdate vehicles.") + (home-page "http://openttd.org/") + ;; This package is GPLv2, except for a few files located in + ;; "src/3rdparty/" which are under the 3-clause BSD, LGPLv2.1+ and Zlib + ;; licenses. In addition, this software contains an in-game downloader + ;; from which the user may find non-functional data licensed under + ;; 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-public openttd + (package + (inherit openttd-engine) + (name "openttd"))) + (define-public pinball (package (name "pinball") -- cgit v1.2.3