From 01877f5f7a7beed2d52729c4ca5577cccc495a88 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Sun, 19 Jan 2020 16:59:57 +0100 Subject: [PATCH] gnu: Add libtcod. * gnu/packages/game-development.scm (libtcod): New variable. --- gnu/packages/game-development.scm | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index ee8dea23b5..f03321281e 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2019, 2020 Leo Prikler ;;; Copyright © 2019 Jethro Cao ;;; Copyright © 2020 Nicolas Goaziou +;;; Copyright © 2020 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; @@ -86,6 +87,7 @@ #:use-module (gnu packages sphinx) #:use-module (gnu packages stb) #:use-module (gnu packages texinfo) + #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages video) #:use-module (gnu packages xdisorg) @@ -2049,3 +2051,46 @@ computer games, 3D authoring tools and simulation tools.") (description "Chipmunk is a simple, lightweight, fast and portable 2D rigid body physics library written in C.") (license license:expat))) + +(define-public libtcod + (package + (name "libtcod") + (version "1.15.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libtcod/libtcod.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0pzr8ajmbqvh43ldjajx962xirj3rf8ayh344p6mqlrmb8gxrfr5")) + (modules '((guix build utils))) + (snippet '(begin + (delete-file-recursively "src/vendor/zlib") + #t)))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'change-to-build-dir + (lambda _ + (chdir "buildsys/autotools") + (patch-shebang "get_version.py") + #t))))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("python" ,python) + ("pkg-config" ,pkg-config) + ("sdl2" ,sdl2))) + (inputs + `(("zlib" ,zlib))) + (home-page "https://github.com/libtcod/libtcod") + (synopsis "Library specifically designed for writing roguelikes") + (description + "libtcod is a free, fast, portable and uncomplicated API for roguelike +developers providing an advanced true color console, input, and lots of other +utilities frequently used in roguelikes.") + (license license:bsd-3))) -- 2.25.0