gnu: love: Update to 0.10.0.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Julian Graham <joolean@gmail.com>
5 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
7 ;;;
8 ;;; This file is part of GNU Guix.
9 ;;;
10 ;;; GNU Guix is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or (at
13 ;;; your option) any later version.
14 ;;;
15 ;;; GNU Guix is distributed in the hope that it will be useful, but
16 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22
23 (define-module (gnu packages game-development)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system gnu)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages databases)
31 #:use-module (gnu packages doxygen)
32 #:use-module (gnu packages glib)
33 #:use-module (gnu packages gnunet)
34 #:use-module (gnu packages guile)
35 #:use-module (gnu packages multiprecision)
36 #:use-module (gnu packages ncurses)
37 #:use-module (gnu packages qt)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages zip)
40 #:use-module (gnu packages gl)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages xorg)
43 #:use-module (gnu packages fontutils)
44 #:use-module (gnu packages image)
45 #:use-module (gnu packages audio)
46 #:use-module (gnu packages pulseaudio)
47 #:use-module (gnu packages gnome)
48 #:use-module (gnu packages gtk)
49 #:use-module (gnu packages sdl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages xiph)
52 #:use-module (gnu packages lua)
53 #:use-module (gnu packages mp3))
54
55 (define-public bullet
56 (package
57 (name "bullet")
58 (version "2.82-r2704")
59 (source (origin
60 (method url-fetch)
61 (uri (string-append "https://bullet.googlecode.com/files/bullet-"
62 version ".tgz"))
63 (sha256
64 (base32
65 "1lnfksxa9b1slyfcxys313ymsllvbsnxh9np06azkbgpfvmwkr37"))))
66 (build-system cmake-build-system)
67 (arguments '(#:tests? #f ; no 'test' target
68 #:configure-flags (list
69 (string-append
70 "-DCMAKE_CXX_FLAGS=-fPIC "
71 (or (getenv "CXXFLAGS") "")))))
72 (home-page "http://bulletphysics.org/")
73 (synopsis "3D physics engine library")
74 (description
75 "Bullet is a physics engine library usable for collision detection. It
76 is used in some video games and movies.")
77 (license license:zlib)))
78
79 (define-public gzochi
80 (package
81 (name "gzochi")
82 (version "0.9")
83 (source (origin
84 (method url-fetch)
85 (uri (string-append "mirror://savannah/gzochi/gzochi-"
86 version ".tar.gz"))
87 (sha256
88 (base32
89 "1nf8naqbc4hmhy99b8n70yswg9j71nh5mfpwwh6d8pdw5mp9b46a"))))
90 (build-system gnu-build-system)
91 (arguments
92 '(#:phases (modify-phases %standard-phases
93 (add-before 'configure 'remove-Werror
94 (lambda _
95 ;; We can't build with '-Werror', notably
96 ;; because deprecated functions of
97 ;; libmicrohttpd are being used.
98 (substitute* (find-files "." "^Makefile\\.in$")
99 (("-Werror")
100 ""))
101 #t)))))
102 (native-inputs `(("pkgconfig" ,pkg-config)))
103 (inputs `(("bdb" ,bdb)
104 ("glib" ,glib)
105 ("gmp" ,gmp)
106 ("guile" ,guile-2.0)
107 ("libmicrohttpd" ,libmicrohttpd)
108 ("ncurses" ,ncurses)
109 ("sdl" ,sdl)
110 ("zlib" ,zlib)))
111 (home-page "http://www.nongnu.org/gzochi/")
112 (synopsis "Scalable middleware for multiplayer games")
113 (description
114 "gzochi is a framework for developing massively multiplayer online games.
115 A server container provides services to deployed games, which are written in
116 Guile Scheme, that abstract and simplify some of the most challenging and
117 error-prone aspects of online game development: Concurrency, data persistence,
118 and network communications. A very thin client library can be embedded to
119 provide connectivity for client applications written in any language.")
120 (license license:gpl3+)))
121
122 (define-public tiled
123 (package
124 (name "tiled")
125 (version "0.13.1")
126 (source (origin
127 (method url-fetch)
128 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
129 version ".tar.gz"))
130 (file-name (string-append name "-" version ".tar.gz"))
131 (sha256
132 (base32
133 "057a5cna3vhznpl9hyql2sxz995aprv43r8wva89x4vdphxv04lm"))))
134 (build-system gnu-build-system)
135 (inputs `(("qt" ,qt)
136 ("zlib" ,zlib)))
137 (arguments
138 '(#:phases
139 (alist-replace
140 'configure
141 (lambda* (#:key outputs #:allow-other-keys)
142 (let ((out (assoc-ref outputs "out")))
143 (system* "qmake"
144 (string-append "PREFIX=" out))))
145 %standard-phases)))
146 (home-page "http://www.mapeditor.org/")
147 (synopsis "Tile map editor")
148 (description
149 "Tiled is a general purpose tile map editor. It is meant to be used for
150 editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
151 clone.")
152
153 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
154 ;; under BSD-2.
155 (license license:gpl2+)))
156
157 (define-public sfml
158 (package
159 (name "sfml")
160 (version "2.3.2")
161 (source (origin
162 (method url-fetch)
163 ;; Do not fetch the archives from
164 ;; http://mirror0.sfml-dev.org/files/ because files there seem
165 ;; to be changed in place.
166 (uri (string-append "https://github.com/SFML/SFML/archive/"
167 version ".tar.gz"))
168 (file-name (string-append name "-" version ".tar.gz"))
169 (sha256
170 (base32
171 "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
172 (build-system cmake-build-system)
173 (arguments
174 '(#:tests? #f)) ; no tests
175 (inputs
176 `(("mesa" ,mesa)
177 ("glew" ,glew)
178 ("flac" ,flac)
179 ("libvorbis" ,libvorbis)
180 ("libx11" ,libx11)
181 ("xcb-util-image" ,xcb-util-image)
182 ("libxrandr" ,libxrandr)
183 ("eudev" ,eudev)
184 ("freetype" ,freetype)
185 ("libjpeg" ,libjpeg)
186 ("libsndfile" ,libsndfile)
187 ("openal" ,openal)))
188 (home-page "http://www.sfml-dev.org")
189 (synopsis "Simple and Fast Multimedia Library")
190 (description
191 "SFML provides a simple interface to the various computer components,
192 to ease the development of games and multimedia applications. It is composed
193 of five modules: system, window, graphics, audio and network.")
194 (license license:zlib)))
195
196 (define-public sfxr
197 (package
198 (name "sfxr")
199 (version "1.2.1")
200 (source (origin
201 (method url-fetch)
202 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
203 (sha256
204 (base32
205 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
206 (build-system gnu-build-system)
207 (arguments
208 `(#:phases (modify-phases %standard-phases
209 (delete 'configure) ; no configure script
210 (add-before 'build 'patch-makefile
211 (lambda* (#:key outputs #:allow-other-keys)
212 (let ((out (assoc-ref outputs "out")))
213 (substitute* "Makefile"
214 (("\\$\\(DESTDIR\\)/usr") out))
215 (substitute* "main.cpp"
216 (("/usr/share")
217 (string-append out "/share")))
218 #t))))
219 #:tests? #f)) ; no tests
220 (native-inputs
221 `(("pkg-config" ,pkg-config)
222 ("desktop-file-utils" ,desktop-file-utils)))
223 (inputs
224 `(("sdl" ,sdl)
225 ("gtk+" ,gtk+)))
226 (synopsis "Simple sound effect generator")
227 (description "Sfxr is a tool for quickly generating simple sound effects.
228 Originally created for use in video game prototypes, it can generate random
229 sounds from presets such as \"explosion\" or \"powerup\".")
230 (home-page "http://www.drpetter.se/project_sfxr.html")
231 (license license:expat)))
232
233 (define-public physfs
234 (package
235 (name "physfs")
236 (version "2.0.3")
237 (source (origin
238 (method url-fetch)
239 (uri (string-append
240 "http://icculus.org/physfs/downloads/physfs-"
241 version ".tar.bz2"))
242 (file-name (string-append name "-" version ".tar.gz"))
243 (sha256
244 (base32
245 "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na"))))
246 (build-system cmake-build-system)
247 (arguments
248 '(#:tests? #f)) ; no check target
249 (inputs
250 `(("zlib" ,zlib)))
251 (native-inputs
252 `(("doxygen" ,doxygen)))
253 (home-page "http://icculus.org/physfs")
254 (synopsis "File system abstraction library")
255 (description
256 "PhysicsFS is a library to provide abstract access to various archives.
257 It is intended for use in video games. For security, no file writing done
258 through the PhysicsFS API can leave a defined @emph{write directory}. For
259 file reading, a @emph{search path} with archives and directories is defined,
260 and it becomes a single, transparent hierarchical file system. So archive
261 files can be accessed in the same way as you access files directly on a disk,
262 and it makes it easy to ship a new archive that will override a previous
263 archive on a per-file basis.")
264 (license license:zlib)))
265
266 (define-public love
267 (package
268 (name "love")
269 (version "0.10.0")
270 (source (origin
271 (method url-fetch)
272 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
273 "love-" version "-linux-src.tar.gz"))
274 (sha256
275 (base32
276 "1r2n1nrw3hcdvy14fjbwz3l9swcy65v3lqwpj2frnkkcwncdz94p"))))
277 (build-system gnu-build-system)
278 (native-inputs
279 `(("pkg-config" ,pkg-config)))
280 (inputs
281 `(("devil" ,devil)
282 ("freetype" ,freetype)
283 ("libmodplug" ,libmodplug)
284 ("libtheora" ,libtheora)
285 ("libvorbis" ,libvorbis)
286 ("luajit" ,luajit)
287 ("mesa" ,mesa)
288 ("mpg123" ,mpg123)
289 ("openal" ,openal)
290 ("physfs" ,physfs)
291 ("sdl2" ,sdl2)
292 ("zlib" ,zlib)))
293 (synopsis "2D game framework for Lua")
294 (description "LÖVE is a framework for making 2D games in the Lua
295 programming language.")
296 (home-page "https://love2d.org/")
297 (license license:zlib)))