gnu: tiled: Update to 0.15.1.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
CommitLineData
6cb89466
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
f586c877 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
c24fff61
JG
4;;; Copyright © 2015 Julian Graham <joolean@gmail.com>
5;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
0f6139b1 6;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
154f6156 7;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
e8ea01d9 8;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
6cb89466
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25(define-module (gnu packages game-development)
b0910aad 26 #:use-module ((guix licenses) #:prefix license:)
6cb89466
27 #:use-module (guix packages)
28 #:use-module (guix download)
2a068aec 29 #:use-module (guix git-download)
6cb89466 30 #:use-module (guix build-system cmake)
b0910aad
DT
31 #:use-module (guix build-system gnu)
32 #:use-module (gnu packages)
2a068aec 33 #:use-module (gnu packages curl)
c24fff61 34 #:use-module (gnu packages databases)
0f6139b1 35 #:use-module (gnu packages doxygen)
c24fff61
JG
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gnunet)
38 #:use-module (gnu packages guile)
39 #:use-module (gnu packages multiprecision)
40 #:use-module (gnu packages ncurses)
b0910aad 41 #:use-module (gnu packages qt)
5809ffcc
DT
42 #:use-module (gnu packages compression)
43 #:use-module (gnu packages zip)
44 #:use-module (gnu packages gl)
45 #:use-module (gnu packages linux)
46 #:use-module (gnu packages xorg)
2a068aec 47 #:use-module (gnu packages xdisorg)
5809ffcc
DT
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages image)
50 #:use-module (gnu packages audio)
d620ea88
DT
51 #:use-module (gnu packages pulseaudio)
52 #:use-module (gnu packages gnome)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages sdl)
240f2785 55 #:use-module (gnu packages pkg-config)
83a4a70b
DT
56 #:use-module (gnu packages xiph)
57 #:use-module (gnu packages lua)
2a068aec
DT
58 #:use-module (gnu packages mp3)
59 #:use-module (gnu packages xml))
6cb89466
60
61(define-public bullet
62 (package
63 (name "bullet")
64 (version "2.82-r2704")
65 (source (origin
66 (method url-fetch)
67 (uri (string-append "https://bullet.googlecode.com/files/bullet-"
68 version ".tgz"))
69 (sha256
70 (base32
71 "1lnfksxa9b1slyfcxys313ymsllvbsnxh9np06azkbgpfvmwkr37"))))
72 (build-system cmake-build-system)
73 (arguments '(#:tests? #f ; no 'test' target
74 #:configure-flags (list
75 (string-append
76 "-DCMAKE_CXX_FLAGS=-fPIC "
77 (or (getenv "CXXFLAGS") "")))))
78 (home-page "http://bulletphysics.org/")
79 (synopsis "3D physics engine library")
80 (description
81 "Bullet is a physics engine library usable for collision detection. It
82is used in some video games and movies.")
b0910aad
DT
83 (license license:zlib)))
84
c24fff61
JG
85(define-public gzochi
86 (package
87 (name "gzochi")
88 (version "0.9")
89 (source (origin
90 (method url-fetch)
91 (uri (string-append "mirror://savannah/gzochi/gzochi-"
92 version ".tar.gz"))
93 (sha256
94 (base32
95 "1nf8naqbc4hmhy99b8n70yswg9j71nh5mfpwwh6d8pdw5mp9b46a"))))
96 (build-system gnu-build-system)
97 (arguments
98 '(#:phases (modify-phases %standard-phases
99 (add-before 'configure 'remove-Werror
100 (lambda _
101 ;; We can't build with '-Werror', notably
102 ;; because deprecated functions of
103 ;; libmicrohttpd are being used.
104 (substitute* (find-files "." "^Makefile\\.in$")
105 (("-Werror")
106 ""))
107 #t)))))
108 (native-inputs `(("pkgconfig" ,pkg-config)))
109 (inputs `(("bdb" ,bdb)
110 ("glib" ,glib)
111 ("gmp" ,gmp)
112 ("guile" ,guile-2.0)
113 ("libmicrohttpd" ,libmicrohttpd)
114 ("ncurses" ,ncurses)
115 ("sdl" ,sdl)
116 ("zlib" ,zlib)))
117 (home-page "http://www.nongnu.org/gzochi/")
118 (synopsis "Scalable middleware for multiplayer games")
119 (description
120 "gzochi is a framework for developing massively multiplayer online games.
121A server container provides services to deployed games, which are written in
122Guile Scheme, that abstract and simplify some of the most challenging and
123error-prone aspects of online game development: Concurrency, data persistence,
124and network communications. A very thin client library can be embedded to
125provide connectivity for client applications written in any language.")
126 (license license:gpl3+)))
127
b0910aad
DT
128(define-public tiled
129 (package
130 (name "tiled")
e8ea01d9 131 (version "0.15.1")
b0910aad
DT
132 (source (origin
133 (method url-fetch)
134 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
135 version ".tar.gz"))
f586c877 136 (file-name (string-append name "-" version ".tar.gz"))
b0910aad
DT
137 (sha256
138 (base32
e8ea01d9 139 "10bbjdv5r36229r1dqg32bxcj9yvpkx9jgs9v4s1qb71v856b15h"))))
b0910aad
DT
140 (build-system gnu-build-system)
141 (inputs `(("qt" ,qt)
142 ("zlib" ,zlib)))
143 (arguments
144 '(#:phases
145 (alist-replace
146 'configure
147 (lambda* (#:key outputs #:allow-other-keys)
148 (let ((out (assoc-ref outputs "out")))
149 (system* "qmake"
150 (string-append "PREFIX=" out))))
151 %standard-phases)))
152 (home-page "http://www.mapeditor.org/")
153 (synopsis "Tile map editor")
154 (description
155 "Tiled is a general purpose tile map editor. It is meant to be used for
156editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
157clone.")
158
159 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
160 ;; under BSD-2.
161 (license license:gpl2+)))
5809ffcc
DT
162
163(define-public sfml
164 (package
165 (name "sfml")
7d1b5022 166 (version "2.3.2")
5809ffcc
DT
167 (source (origin
168 (method url-fetch)
7d1b5022
RW
169 ;; Do not fetch the archives from
170 ;; http://mirror0.sfml-dev.org/files/ because files there seem
171 ;; to be changed in place.
172 (uri (string-append "https://github.com/SFML/SFML/archive/"
173 version ".tar.gz"))
174 (file-name (string-append name "-" version ".tar.gz"))
5809ffcc
DT
175 (sha256
176 (base32
7d1b5022 177 "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
5809ffcc
DT
178 (build-system cmake-build-system)
179 (arguments
180 '(#:tests? #f)) ; no tests
5809ffcc
DT
181 (inputs
182 `(("mesa" ,mesa)
183 ("glew" ,glew)
240f2785
RW
184 ("flac" ,flac)
185 ("libvorbis" ,libvorbis)
5809ffcc 186 ("libx11" ,libx11)
240f2785 187 ("xcb-util-image" ,xcb-util-image)
5809ffcc
DT
188 ("libxrandr" ,libxrandr)
189 ("eudev" ,eudev)
190 ("freetype" ,freetype)
191 ("libjpeg" ,libjpeg)
192 ("libsndfile" ,libsndfile)
193 ("openal" ,openal)))
194 (home-page "http://www.sfml-dev.org")
195 (synopsis "Simple and Fast Multimedia Library")
196 (description
197 "SFML provides a simple interface to the various computer components,
198to ease the development of games and multimedia applications. It is composed
199of five modules: system, window, graphics, audio and network.")
200 (license license:zlib)))
d620ea88
DT
201
202(define-public sfxr
203 (package
204 (name "sfxr")
205 (version "1.2.1")
206 (source (origin
207 (method url-fetch)
208 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
209 (sha256
210 (base32
211 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
212 (build-system gnu-build-system)
213 (arguments
214 `(#:phases (modify-phases %standard-phases
215 (delete 'configure) ; no configure script
216 (add-before 'build 'patch-makefile
217 (lambda* (#:key outputs #:allow-other-keys)
218 (let ((out (assoc-ref outputs "out")))
219 (substitute* "Makefile"
220 (("\\$\\(DESTDIR\\)/usr") out))
221 (substitute* "main.cpp"
222 (("/usr/share")
223 (string-append out "/share")))
224 #t))))
225 #:tests? #f)) ; no tests
226 (native-inputs
227 `(("pkg-config" ,pkg-config)
228 ("desktop-file-utils" ,desktop-file-utils)))
229 (inputs
230 `(("sdl" ,sdl)
231 ("gtk+" ,gtk+)))
232 (synopsis "Simple sound effect generator")
233 (description "Sfxr is a tool for quickly generating simple sound effects.
234Originally created for use in video game prototypes, it can generate random
235sounds from presets such as \"explosion\" or \"powerup\".")
236 (home-page "http://www.drpetter.se/project_sfxr.html")
237 (license license:expat)))
0f6139b1
AK
238
239(define-public physfs
240 (package
241 (name "physfs")
242 (version "2.0.3")
243 (source (origin
244 (method url-fetch)
245 (uri (string-append
246 "http://icculus.org/physfs/downloads/physfs-"
247 version ".tar.bz2"))
248 (file-name (string-append name "-" version ".tar.gz"))
249 (sha256
250 (base32
251 "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na"))))
252 (build-system cmake-build-system)
253 (arguments
254 '(#:tests? #f)) ; no check target
255 (inputs
256 `(("zlib" ,zlib)))
257 (native-inputs
258 `(("doxygen" ,doxygen)))
259 (home-page "http://icculus.org/physfs")
260 (synopsis "File system abstraction library")
261 (description
262 "PhysicsFS is a library to provide abstract access to various archives.
263It is intended for use in video games. For security, no file writing done
264through the PhysicsFS API can leave a defined @emph{write directory}. For
265file reading, a @emph{search path} with archives and directories is defined,
266and it becomes a single, transparent hierarchical file system. So archive
267files can be accessed in the same way as you access files directly on a disk,
268and it makes it easy to ship a new archive that will override a previous
269archive on a per-file basis.")
270 (license license:zlib)))
83a4a70b
DT
271
272(define-public love
273 (package
274 (name "love")
05d48c52 275 (version "0.10.0")
83a4a70b
DT
276 (source (origin
277 (method url-fetch)
278 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
279 "love-" version "-linux-src.tar.gz"))
280 (sha256
281 (base32
05d48c52 282 "1r2n1nrw3hcdvy14fjbwz3l9swcy65v3lqwpj2frnkkcwncdz94p"))))
83a4a70b
DT
283 (build-system gnu-build-system)
284 (native-inputs
285 `(("pkg-config" ,pkg-config)))
286 (inputs
287 `(("devil" ,devil)
288 ("freetype" ,freetype)
289 ("libmodplug" ,libmodplug)
05d48c52 290 ("libtheora" ,libtheora)
83a4a70b
DT
291 ("libvorbis" ,libvorbis)
292 ("luajit" ,luajit)
293 ("mesa" ,mesa)
294 ("mpg123" ,mpg123)
295 ("openal" ,openal)
296 ("physfs" ,physfs)
297 ("sdl2" ,sdl2)
298 ("zlib" ,zlib)))
299 (synopsis "2D game framework for Lua")
300 (description "LÖVE is a framework for making 2D games in the Lua
301programming language.")
302 (home-page "https://love2d.org/")
303 (license license:zlib)))
154f6156
DT
304
305(define-public allegro-4
306 (package
307 (name "allegro")
308 (version "4.4.2")
309 (source (origin
310 (method url-fetch)
311 (uri (string-append "http://download.gna.org/allegro/allegro/"
312 version "/allegro-" version ".tar.gz"))
313 (sha256
314 (base32
315 "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v"))))
316 (build-system cmake-build-system)
317 (arguments
318 '(#:phases
319 (modify-phases %standard-phases
320 (add-after 'unpack 'patch-build-system
321 (lambda _
322 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
323 ;; via a command line option doesn't work because it is
324 ;; unconditionally clobbered in the build script.
325 (substitute* '("CMakeLists.txt")
326 (("ADDON_LINKAGE STATIC")
327 "ADDON_LINKAGE SHARED"))
328 #t)))))
329 (inputs
330 `(("glu" ,glu)
331 ("libpng" ,libpng)
332 ("libvorbis" ,libvorbis)
333 ("mesa" ,mesa)
334 ("zlib" ,zlib)))
335 (synopsis "Game programming library")
336 (description "Allegro is a library mainly aimed at video game and
337multimedia programming. It handles common, low-level tasks such as creating
338windows, accepting user input, loading data, drawing images, playing sounds,
339etc.")
340 (home-page "http://liballeg.org")
341 (license license:giftware)))
2a068aec
DT
342
343(define-public aseprite
344 (package
345 (name "aseprite")
346 (version "1.1.1")
347 ;; The release tarball isn't good enough because it's missing some
348 ;; necessary code that is only in git submodules.
349 (source (origin
350 (method git-fetch)
351 (uri (git-reference
352 (url "https://github.com/aseprite/aseprite.git")
353 (commit "v1.1.1")
354 (recursive? #t)))
355 (sha256
356 (base32
357 "1yr0l3bc68lyrffrzxgw98zznv8yz5ldl98lyvp6s5grny4s4jyk"))))
358 (build-system cmake-build-system)
359 (arguments
360 '(#:configure-flags
361 ;; Use shared libraries instead of building bundled source.
362 (list "-DWITH_WEBP_SUPPORT=1"
363 "-DUSE_SHARED_CURL=1"
364 "-DUSE_SHARED_GIFLIB=1"
365 "-DUSE_SHARED_JPEGLIB=1"
366 "-DUSE_SHARED_ZLIB=1"
367 "-DUSE_SHARED_LIBPNG=1"
368 "-DUSE_SHARED_LIBLOADPNG=1"
369 "-DUSE_SHARED_LIBWEBP=1"
370 "-DUSE_SHARED_TINYXML=1"
371 "-DUSE_SHARED_PIXMAN=1"
372 "-DUSE_SHARED_FREETYPE=1"
373 "-DUSE_SHARED_ALLEGRO4=1"
374 "-DENABLE_UPDATER=0" ; no auto-updates
375 (string-append "-DFREETYPE_INCLUDE_DIR="
376 (assoc-ref %build-inputs "freetype")
377 "/include/freetype2"))
378 #:phases
379 (modify-phases %standard-phases
380 (add-after 'unpack 'patch-freetype-utils
381 (lambda _
382 ;; Fix C preprocessor include directive.
383 (substitute* '("src/app/util/freetype_utils.cpp")
384 (("freetype/") ""))
385 #t)))))
386 (native-inputs
387 `(("pkg-config" ,pkg-config)))
388 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
389 ;; patched version is bundled with Aseprite, but the patches should be
390 ;; extracted and applied on top of a standalone Allegro 4 package.
391 (inputs
392 `(("allegro" ,allegro-4)
393 ("curl" ,curl)
394 ("freetype" ,freetype)
395 ("giflib" ,giflib)
396 ("libjpeg" ,libjpeg)
397 ("libpng" ,libpng)
398 ("libwebp" ,libwebp)
399 ("libx11" ,libx11)
400 ("libxext" ,libxext)
401 ("libxxf86vm" ,libxxf86vm)
402 ("pixman" ,pixman)
403 ("tinyxml" ,tinyxml)
404 ("zlib" ,zlib)))
405 (synopsis "Animated sprite editor and pixel art tool")
406 (description "Aseprite is a tool for creating 2D pixel art for video
407games. In addition to basic pixel editing features, Aseprite can assist in
408the creation of animations, tiled graphics, texture atlases, and more.")
409 (home-page "http://www.aseprite.org/")
410 (license license:gpl2+)))