diff options
author | Albin Söderqvist <albin@fripost.org> | 2016-04-13 03:50:36 +0200 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2016-04-15 11:32:37 +0300 |
commit | e9687748e1d0c92de4cb4c1db5dbe90d30486a2f (patch) | |
tree | 213a870e33f6a9bc5544ab0cf6cb8367828fa2a3 /gnu | |
parent | 117195c28d945e27ce47b0f52821e61284abb1d0 (diff) | |
download | gnu-guix-e9687748e1d0c92de4cb4c1db5dbe90d30486a2f.tar gnu-guix-e9687748e1d0c92de4cb4c1db5dbe90d30486a2f.tar.gz |
gnu: Add openttd.
* gnu/packages/games.scm (openttd-engine): New variable (private).
(openttd): Inherit it. New variable (public).
Signed-off-by: Alex Kost <alezost@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/games.scm | 70 |
1 files changed, 70 insertions, 0 deletions
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 <thylakoid@openmailbox.org> ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com> ;;; Copyright © 2016 Nils Gillmann <niasterisk@grrlz.net> +;;; Copyright © 2016 Albin Söderqvist <albin@fripost.org> ;;; ;;; 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") |