gnu: openscenegraph: Update to 3.6.4 and build JPEG plugin.
[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>
189be331 4;;; Copyright © 2015, 2018 Ludovic Courtès <ludo@gnu.org>
a6dec13b 5;;; Copyright © 2015, 2018 Alex Kost <alezost@gmail.com>
68c6110c 6;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org>
d5c60e0a 7;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
3c8ba11a 8;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
cd528946 9;;; Copyright © 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
cd6ae1ce 10;;; Copyright © 2016, 2017, 2018 Julian Graham <joolean@gmail.com>
b2cf5597 11;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
42d0d13d 12;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
194b4e7d 13;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
3c399e9b 14;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
6bc30a57 15;;; Copyright © 2017, 2019 Rutger Helling <rhelling@mykolab.com>
5b8d2ace 16;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
4041fabb 17;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
6cb89466
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages game-development)
9fd50db3 35 #:use-module (srfi srfi-1)
b0910aad 36 #:use-module ((guix licenses) #:prefix license:)
6cb89466
37 #:use-module (guix packages)
38 #:use-module (guix download)
2a068aec 39 #:use-module (guix git-download)
4041fabb 40 #:use-module (guix svn-download)
be4d26f5 41 #:use-module (guix utils)
6cb89466 42 #:use-module (guix build-system cmake)
b0910aad 43 #:use-module (guix build-system gnu)
4bc37bf0 44 #:use-module (guix build-system python)
92b51d12 45 #:use-module (guix build-system scons)
b0910aad 46 #:use-module (gnu packages)
1297bc05 47 #:use-module (gnu packages audio)
c608fe8c 48 #:use-module (gnu packages autotools)
e4ff9dff 49 #:use-module (gnu packages base)
94a66dd9 50 #:use-module (gnu packages boost)
1297bc05 51 #:use-module (gnu packages compression)
2a068aec 52 #:use-module (gnu packages curl)
99828fa7 53 #:use-module (gnu packages documentation)
531003be 54 #:use-module (gnu packages fltk)
42d0d13d 55 #:use-module (gnu packages fonts)
d2cc38b7 56 #:use-module (gnu packages fontutils)
324b0040 57 #:use-module (gnu packages freedesktop)
d2cc38b7 58 #:use-module (gnu packages fribidi)
255d1bbe 59 #:use-module (gnu packages dbm)
1297bc05 60 #:use-module (gnu packages gl)
c24fff61 61 #:use-module (gnu packages glib)
1297bc05 62 #:use-module (gnu packages gnome)
c24fff61 63 #:use-module (gnu packages gnunet)
42d0d13d
MR
64 #:use-module (gnu packages graphics)
65 #:use-module (gnu packages graphviz)
1297bc05 66 #:use-module (gnu packages gtk)
c24fff61 67 #:use-module (gnu packages guile)
1297bc05
EF
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages lua)
c608fe8c 71 #:use-module (gnu packages m4)
1297bc05 72 #:use-module (gnu packages mp3)
c24fff61 73 #:use-module (gnu packages multiprecision)
4bc37bf0 74 #:use-module (gnu packages music)
c24fff61 75 #:use-module (gnu packages ncurses)
1297bc05
EF
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages pulseaudio)
4bc37bf0 78 #:use-module (gnu packages python)
44d10b1f 79 #:use-module (gnu packages python-xyz)
b0910aad 80 #:use-module (gnu packages qt)
1297bc05 81 #:use-module (gnu packages sdl)
67c127c9 82 #:use-module (gnu packages stb)
00fca594 83 #:use-module (gnu packages texinfo)
1297bc05 84 #:use-module (gnu packages tls)
4bc37bf0 85 #:use-module (gnu packages video)
2a068aec 86 #:use-module (gnu packages xdisorg)
83a4a70b 87 #:use-module (gnu packages xiph)
194b4e7d 88 #:use-module (gnu packages xml)
1297bc05 89 #:use-module (gnu packages xorg))
6cb89466
90
91(define-public bullet
92 (package
93 (name "bullet")
fbb456dd 94 (version "2.88")
6cb89466 95 (source (origin
fbb456dd
EF
96 (method git-fetch)
97 (uri (git-reference
98 (url "https://github.com/bulletphysics/bullet3/")
99 (commit version)))
100 (file-name (git-file-name name version))
6cb89466
101 (sha256
102 (base32
fbb456dd
EF
103 "00qkif245yj7n2f262bgjaxv1bz3wmmcsfnjgy3qpzvlpzpns5z8"))
104 (modules '((guix build utils)))
105 (snippet
106 '(begin
107 (for-each delete-file (find-files "build3" "premake*"))
108 (with-directory-excursion "examples/ThirdPartyLibs"
109 (for-each delete-file-recursively
110 '("Gwen" "clsocket" "enet" "glad" "imgui"
111 "lua-5.2.3" "midi" "minizip" "openvr"
112 "optionalX11" "serial" "zlib")))
113 ;; These need files from ThirdPartyLibs
114 (substitute* "Extras/CMakeLists.txt"
115 (("BulletRobotics") "")
116 (("obj2sdf") ""))
117 ;; Tests fail on linking, cannot find -lBussIK
118 (substitute* "test/CMakeLists.txt"
119 ((" InverseDynamics")
120 "../examples/ThirdPartyLibs/BussIK InverseDynamics"))
121 ; (("SharedMemory") ""))
122 #t))))
6cb89466 123 (build-system cmake-build-system)
937bc2d1 124 (arguments
fbb456dd
EF
125 '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
126 "-DBUILD_CPU_DEMOS=OFF"
127 "-DBUILD_OPENGL3_DEMOS=OFF"
128 "-DBUILD_BULLET2_DEMOS=OFF"
129 (string-append "-DCMAKE_CXX_FLAGS=-fPIC "
130 (or (getenv "CXXFLAGS") "")))
131 #:phases
132 (modify-phases %standard-phases
133 (add-after 'unpack 'remove-failing-tests
134 ;; These tests fail specifically after removing 3rd party code
135 (lambda _
136 (substitute* "test/SharedMemory/CMakeLists.txt"
137 (("ADD_TEST") "# ADD_TEST"))
138 (substitute* "test/InverseDynamics/CMakeLists.txt"
139 (("ADD_TEST\\(Test_BulletInverseForward")
140 "# ADD_TEST(Test_BulletInverseForward"))
141 #t)))))
937bc2d1
EF
142 (inputs
143 `(("glu" ,glu)
144 ("libx11" ,libx11)
145 ("mesa" ,mesa)))
9b811f69 146 (home-page "https://pybullet.org/wordpress/")
6cb89466
147 (synopsis "3D physics engine library")
148 (description
149 "Bullet is a physics engine library usable for collision detection. It
150is used in some video games and movies.")
b0910aad
DT
151 (license license:zlib)))
152
1a0c4437
KK
153(define-public deutex
154 (package
155 (name "deutex")
ec5987f8 156 (version "5.2.0")
1a0c4437
KK
157 (source (origin
158 (method url-fetch)
5fbb9f0b 159 (uri (string-append "https://github.com/Doom-Utils/deutex"
f7b60fdc 160 "/releases/download/v" version "/"
5fbb9f0b 161 "deutex-" version ".tar.xz"))
1a0c4437
KK
162 (sha256
163 (base32
ec5987f8 164 "1d536d3i78k4ch8mjg7lqnamnyfpp2x5x7mzx5smqi9ad8lb6hqz"))))
1a0c4437 165 (build-system gnu-build-system)
f7b60fdc 166 (native-inputs `(("asciidoc" ,asciidoc)))
1a0c4437
KK
167 (home-page "https://github.com/Doom-Utils/deutex")
168 (synopsis "WAD file composer for Doom and related games")
169 (description
170 "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be
171used to extract the lumps of a wad and save them as individual files.
172Conversely, it can also build a wad from separate files. When extracting a
173lump to a file, it does not just copy the raw data, it converts it to an
174appropriate format (such as PPM for graphics, Sun audio for samples, etc.).
175Conversely, when it reads files for inclusion in pwads, it does the necessary
176conversions (for example, from PPM to Doom picture format). In addition,
177DeuTex has functions such as merging wads, etc.")
178 (license license:gpl2+)))
179
94a66dd9
KK
180(define-public grfcodec
181 (package
182 (name "grfcodec")
183 (version "6.0.6")
184 (source (origin
185 (method url-fetch)
186 (uri (string-append "http://binaries.openttd.org/extra/"
187 name "/" version "/" name "-" version
188 "-source.tar.xz"))
189 (sha256
190 (base32
191 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
192 (build-system gnu-build-system)
193 (arguments
194 '(#:tests? #f ; no check target
195 #:phases
196 (modify-phases %standard-phases
197 (delete 'configure) ; no configure script
198 (replace 'install ; no install target
199 (lambda* (#:key outputs #:allow-other-keys)
200 (let* ((out (assoc-ref outputs "out"))
201 (bin (string-append out "/bin"))
202 (doc (string-append out "/share/doc"))
203 (man (string-append out "/share/man/man1")))
204 (for-each (lambda (file)
205 (install-file file bin))
206 '("grfcodec" "grfid" "grfstrip" "nforenum"))
207 (install-file "COPYING" doc)
208 (with-directory-excursion "docs"
209 (for-each (lambda (file)
210 (install-file (string-append file ".txt") doc))
211 '("auto_correct" "commands" "grf" "grfcodec" "grftut"
212 "readme" "readme.rpn"))
213 (for-each (lambda (file)
214 (install-file file man))
215 (find-files "." "\\.1"))))
216 #t)))))
217 (inputs
218 `(("boost" ,boost)
219 ("libpng" ,libpng)
220 ("zlib" ,zlib)))
221 (synopsis "GRF development tools")
222 (description
3d77785a 223 "The @dfn{Graphics Resource File} (GRF) development tools are a set of
94a66dd9
KK
224tools for developing (New)GRFs. It includes a number of smaller programs, each
225with a specific task:
226@enumerate
227@item @code{grfcodec} decodes and encodes GRF files for OpenTTD.
228@item @code{grfid} extracts the so-called \"GRF ID\" from a GRF.
229@item @code{grfstrip} strips all sprites from a GRF.
230@item @code{nforenum} checks NFO code for errors, making corrections when
231necessary.
232@end enumerate")
233 (home-page "http://dev.openttdcoop.org/projects/grfcodec")
234 ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
235 ;; NFORenum is under the GPL2+.
236 ;; The MD5 implementation contained in GRFID is under the zlib license.
237 (license (list license:gpl2 license:gpl2+ license:zlib))))
238
3c399e9b
AI
239(define-public catcodec
240 (package
241 (name "catcodec")
242 (version "1.0.5")
243 (source
244 (origin
245 (method url-fetch)
246 (uri (string-append "https://binaries.openttd.org/extra/catcodec/"
247 version "/catcodec-" version "-source.tar.xz"))
248 (sha256
249 (base32
250 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
251 (build-system gnu-build-system)
252 (arguments
253 `(#:tests? #f ; no tests
254 #:make-flags (list (string-append "prefix=" %output))
255 #:phases (modify-phases %standard-phases
256 (delete 'configure))))
257 (home-page "http://dev.openttdcoop.org/projects/catcodec")
258 (synopsis "Encode/decode OpenTTD sounds")
259 (description "catcodec encodes and decodes sounds for OpenTTD. These
260sounds are not much more than some metadata (description and filename) and raw
261PCM data.")
262 (license license:gpl2)))
263
c24fff61
JG
264(define-public gzochi
265 (package
266 (name "gzochi")
cd6ae1ce 267 (version "0.12")
c24fff61
JG
268 (source (origin
269 (method url-fetch)
270 (uri (string-append "mirror://savannah/gzochi/gzochi-"
271 version ".tar.gz"))
272 (sha256
273 (base32
cd6ae1ce 274 "0h8yvk7154kd8zdfa9nqy73blrjq2x19kv305jcnwlmm09vvss59"))))
c24fff61 275 (build-system gnu-build-system)
1798e9ee
LC
276 (arguments
277 '(#:phases (modify-phases %standard-phases
278 (add-before 'build 'no-Werror
279 (lambda _
280 ;; Don't abort builds due to things like GLib
281 ;; deprecation warnings.
282 (substitute* (find-files "." "^Makefile\\.in$")
283 (("-Werror") ""))
284 #t)))))
c24fff61
JG
285 (native-inputs `(("pkgconfig" ,pkg-config)))
286 (inputs `(("bdb" ,bdb)
287 ("glib" ,glib)
0e4885af 288 ("guile" ,guile-2.2)
c24fff61
JG
289 ("libmicrohttpd" ,libmicrohttpd)
290 ("ncurses" ,ncurses)
291 ("sdl" ,sdl)
292 ("zlib" ,zlib)))
340978d7 293 (home-page "https://www.nongnu.org/gzochi/")
c24fff61
JG
294 (synopsis "Scalable middleware for multiplayer games")
295 (description
296 "gzochi is a framework for developing massively multiplayer online games.
297A server container provides services to deployed games, which are written in
298Guile Scheme, that abstract and simplify some of the most challenging and
299error-prone aspects of online game development: Concurrency, data persistence,
300and network communications. A very thin client library can be embedded to
301provide connectivity for client applications written in any language.")
302 (license license:gpl3+)))
303
7357fcf2
KK
304(define-public nml
305 (package
306 (name "nml")
41770337 307 (version "0.4.5")
7357fcf2
KK
308 (source
309 (origin
310 (method url-fetch)
311 (uri (string-append "http://bundles.openttdcoop.org/nml/releases/"
312 version "/nml-" version ".tar.gz"))
313 (sha256
314 (base32
41770337 315 "1pmvvm3sgnpngfa7884mqhq3fwdjh9sr0ca07ypnidcg0y341w53"))))
7357fcf2 316 (build-system python-build-system)
e877f4d0
JL
317 (arguments
318 `(#:phases
319 (modify-phases %standard-phases
320 (add-before 'build 'fix-pillow
321 (lambda _
322 ;; pillow's version is not in PIL.Image.VERSION anymore
323 (substitute* "nml/version_info.py"
324 (("from PIL import Image") "import PIL")
325 (("Image.VERSION") "PIL.__version__"))
326 #t)))))
7357fcf2
KK
327 (propagated-inputs
328 `(("python-pillow" ,python-pillow)
329 ("python-ply" ,python-ply)))
df0fd7bf 330 (home-page "https://dev.openttdcoop.org/projects/nml")
7357fcf2
KK
331 (synopsis "NML compiler")
332 (description
a7cbe727 333 "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
7357fcf2
KK
334compiling NML files (along with their associated language, sound and graphic
335files) into @file{.grf} and/or @file{.nfo} files.")
336 (license license:gpl2+)))
337
45f8e7f7
KK
338(define-public python-sge-pygame
339 (package
340 (name "python-sge-pygame")
b1d1a10c 341 (version "1.5.1")
45f8e7f7
KK
342 (source
343 (origin
344 (method url-fetch)
7f652029
KK
345 (uri (string-append "mirror://savannah/stellarengine/"
346 (version-major+minor version) "/sge-pygame-"
347 version ".tar.gz"))
348 (file-name (string-append name "-" version ".tar.gz"))
45f8e7f7
KK
349 (sha256
350 (base32
b1d1a10c 351 "1rl3xjzh78sl0sq3xl8rl7cgp9v9v3h7s2pfwn7nj1vrmffzkcpd"))))
45f8e7f7
KK
352 (build-system python-build-system)
353 (propagated-inputs
354 `(("python-pygame" ,python-pygame)
81353514
KK
355 ("python-six" ,python-six)
356 ("python-uniseg" ,python-uniseg)))
45f8e7f7
KK
357 (home-page "http://stellarengine.nongnu.org")
358 (synopsis "2D game engine for Python")
359 (description
360 "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
ffbe2dc1 361general-purpose 2D game engine. It takes care of several details for you so
45f8e7f7
KK
362you can focus on the game itself. This makes more rapid game development
363possible, and it also makes the SGE easy to learn.")
364 (license license:lgpl3+)))
365
366(define-public python2-sge-pygame
367 (package-with-python2 python-sge-pygame))
368
1b775fd1
KK
369(define-public python-tmx
370 (package
371 (name "python-tmx")
95c1324a 372 (version "1.10")
1b775fd1
KK
373 (source
374 (origin
375 (method url-fetch)
be4d26f5
KK
376 (uri (string-append "mirror://savannah/python-tmx/"
377 (version-major+minor version) "/tmx-"
1b775fd1
KK
378 version ".tar.gz"))
379 (sha256
380 (base32
95c1324a 381 "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0"))))
1b775fd1
KK
382 (build-system python-build-system)
383 (propagated-inputs
384 `(("python-six" ,python-six)))
385 (home-page "http://python-tmx.nongnu.org")
386 (synopsis "Python library for the @code{Tiled} TMX format")
387 (description
388 "Python TMX reads and writes the @code{Tiled} TMX format in a simple way.
389This is useful for map editors or generic level editors, and it's also useful
390for using a map editor or generic level editor like Tiled to edit your game's
391levels.")
392 (license (list license:asl2.0
393 ;; Documentation (only available in the source tarball) is
394 ;; under the CC0 license.
395 license:cc0))))
396
397(define-public python2-tmx
398 (let ((python2-tmx (package-with-python2 python-tmx)))
399 (package
400 (inherit python2-tmx)
401 (propagated-inputs
402 `(("python2-pathlib" ,python2-pathlib)
403 ,@(package-propagated-inputs python2-tmx))))))
404
e99039b5
KK
405(define-public python-xsge
406 (package
407 (name "python-xsge")
6e92fba4 408 (version "2018.02.26")
e99039b5
KK
409 (source (origin
410 (method url-fetch)
795f3a00 411 (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
e99039b5
KK
412 version ".tar.gz"))
413 (sha256
414 (base32
6e92fba4 415 "0bx93hgf7cgdw2gsygbh59y8vpw37pgsa279rajw3fkdpl8vrc40"))))
e99039b5
KK
416 (build-system python-build-system)
417 (arguments
418 '(#:phases
419 (modify-phases %standard-phases
420 ;; xSGE's setup.py script does not support one of the Python build
421 ;; system's default flags, "--single-version-externally-managed".
422 (replace 'install
423 (lambda* (#:key outputs #:allow-other-keys)
6e92fba4
KK
424 (invoke "python" "setup.py" "install"
425 (string-append "--prefix=" (assoc-ref outputs "out"))
426 "--root=/"))))
e99039b5
KK
427 #:tests? #f)) ; no check target
428 (propagated-inputs
429 `(("python-sge-pygame" ,python-sge-pygame)
430 ("python-pygame" ,python-pygame)
431 ("python-six" ,python-six)
432 ("python-tmx" ,python-tmx)))
433 (home-page "http://xsge.nongnu.org")
434 (synopsis "Extensions for the SGE Game Engine")
435 (description
436 "xSGE is a collection of modules that make doing certain tasks with the SGE
437Game Engine easier. In addition to SGE's conveniences, the user has access to a
438GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
439support.")
440 (license license:gpl3+)))
441
442(define-public python2-xsge
443 (package-with-python2 python-xsge))
444
b0910aad
DT
445(define-public tiled
446 (package
447 (name "tiled")
fdcb881f 448 (version "1.2.4")
b0910aad 449 (source (origin
902068b4
RW
450 (method git-fetch)
451 (uri (git-reference
452 (url "https://github.com/bjorn/tiled.git")
453 (commit (string-append "v" version))))
454 (file-name (git-file-name name version))
b0910aad
DT
455 (sha256
456 (base32
fdcb881f 457 "04v738h298pvcwb70mwd1r2yj7578f6gkfzs0165j9fqy7avwm18"))))
b0910aad 458 (build-system gnu-build-system)
864cc7ef
RW
459 (inputs
460 `(("qtbase" ,qtbase)
461 ("qtsvg" ,qtsvg)
462 ("zlib" ,zlib)))
463 (native-inputs
464 `(("qttools" ,qttools)))
b0910aad
DT
465 (arguments
466 '(#:phases
d06fc008
EF
467 (modify-phases %standard-phases
468 (replace 'configure
864cc7ef
RW
469 (lambda* (#:key inputs outputs #:allow-other-keys)
470 (substitute* "translations/translations.pro"
471 (("LRELEASE =.*")
472 (string-append "LRELEASE = "
473 (assoc-ref inputs "qttools")
474 "/bin/lrelease\n")))
d06fc008 475 (let ((out (assoc-ref outputs "out")))
9dafb647
KK
476 (invoke "qmake"
477 (string-append "PREFIX=" out))))))))
88b028f3 478 (home-page "https://www.mapeditor.org/")
b0910aad
DT
479 (synopsis "Tile map editor")
480 (description
481 "Tiled is a general purpose tile map editor. It is meant to be used for
482editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
483clone.")
484
485 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
486 ;; under BSD-2.
487 (license license:gpl2+)))
5809ffcc
DT
488
489(define-public sfml
490 (package
491 (name "sfml")
9ac59ad3 492 (version "2.5.1")
5809ffcc 493 (source (origin
95f6adae 494 (method git-fetch)
7d1b5022
RW
495 ;; Do not fetch the archives from
496 ;; http://mirror0.sfml-dev.org/files/ because files there seem
497 ;; to be changed in place.
95f6adae
TGR
498 (uri (git-reference
499 (url "https://github.com/SFML/SFML.git")
500 (commit version)))
501 (file-name (git-file-name name version))
5809ffcc
DT
502 (sha256
503 (base32
9ac59ad3 504 "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay"))
67c127c9
MB
505 (modules '((guix build utils)))
506 (snippet
507 '(begin
508 ;; Ensure system libraries are used.
509 (delete-file-recursively "extlibs")
510 #t))))
5809ffcc
DT
511 (build-system cmake-build-system)
512 (arguments
a6e25a50 513 '(#:configure-flags
0bc27248
MB
514 (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE"
515 "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig")
a6e25a50 516 #:tests? #f)) ; no tests
0bc27248
MB
517 (native-inputs
518 `(("pkg-config" ,pkg-config)))
5809ffcc
DT
519 (inputs
520 `(("mesa" ,mesa)
521 ("glew" ,glew)
522 ("libx11" ,libx11)
240f2785 523 ("xcb-util-image" ,xcb-util-image)
5809ffcc
DT
524 ("libxrandr" ,libxrandr)
525 ("eudev" ,eudev)
5809ffcc 526 ("libjpeg" ,libjpeg)
67c127c9
MB
527 ("libsndfile" ,libsndfile)
528 ("stb-image" ,stb-image)
529 ("stb-image-write" ,stb-image-write)))
0bc27248
MB
530 (propagated-inputs
531 ;; In Requires.private of pkg-config files.
532 `(("flac" ,flac)
533 ("freetype" ,freetype)
534 ("libvorbis" ,libvorbis)
5809ffcc 535 ("openal" ,openal)))
167f0e82 536 (home-page "https://www.sfml-dev.org")
5809ffcc
DT
537 (synopsis "Simple and Fast Multimedia Library")
538 (description
539 "SFML provides a simple interface to the various computer components,
540to ease the development of games and multimedia applications. It is composed
541of five modules: system, window, graphics, audio and network.")
542 (license license:zlib)))
d620ea88
DT
543
544(define-public sfxr
545 (package
546 (name "sfxr")
547 (version "1.2.1")
548 (source (origin
549 (method url-fetch)
550 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
551 (sha256
552 (base32
553 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
554 (build-system gnu-build-system)
555 (arguments
556 `(#:phases (modify-phases %standard-phases
557 (delete 'configure) ; no configure script
558 (add-before 'build 'patch-makefile
559 (lambda* (#:key outputs #:allow-other-keys)
560 (let ((out (assoc-ref outputs "out")))
561 (substitute* "Makefile"
562 (("\\$\\(DESTDIR\\)/usr") out))
563 (substitute* "main.cpp"
564 (("/usr/share")
565 (string-append out "/share")))
566 #t))))
567 #:tests? #f)) ; no tests
568 (native-inputs
569 `(("pkg-config" ,pkg-config)
570 ("desktop-file-utils" ,desktop-file-utils)))
571 (inputs
572 `(("sdl" ,sdl)
573 ("gtk+" ,gtk+)))
574 (synopsis "Simple sound effect generator")
575 (description "Sfxr is a tool for quickly generating simple sound effects.
576Originally created for use in video game prototypes, it can generate random
577sounds from presets such as \"explosion\" or \"powerup\".")
578 (home-page "http://www.drpetter.se/project_sfxr.html")
579 (license license:expat)))
0f6139b1
AK
580
581(define-public physfs
582 (package
583 (name "physfs")
d00a8b84 584 (version "3.0.2")
0f6139b1
AK
585 (source (origin
586 (method url-fetch)
587 (uri (string-append
167f0e82 588 "https://icculus.org/physfs/downloads/physfs-"
0f6139b1
AK
589 version ".tar.bz2"))
590 (file-name (string-append name "-" version ".tar.gz"))
591 (sha256
592 (base32
d00a8b84 593 "0qzqz4r88gvd8m7sh2z5hvqcr0jfr4wb2f77c19xycyn0rigfk9h"))))
0f6139b1
AK
594 (build-system cmake-build-system)
595 (arguments
08e977d2
MB
596 '(#:tests? #f ; no check target
597 #:phases (modify-phases %standard-phases
598 (add-after 'unpack 'patch-CMakeLists.txt
599 (lambda _
600 (substitute* "CMakeLists.txt"
601 ;; XXX: For some reason CMakeLists.txt disables
602 ;; RUNPATH manipulation when the compiler is GCC.
603 (("CMAKE_COMPILER_IS_GNUCC") "FALSE"))
604 #t)))))
0f6139b1
AK
605 (inputs
606 `(("zlib" ,zlib)))
607 (native-inputs
608 `(("doxygen" ,doxygen)))
167f0e82 609 (home-page "https://icculus.org/physfs")
0f6139b1
AK
610 (synopsis "File system abstraction library")
611 (description
612 "PhysicsFS is a library to provide abstract access to various archives.
613It is intended for use in video games. For security, no file writing done
614through the PhysicsFS API can leave a defined @emph{write directory}. For
615file reading, a @emph{search path} with archives and directories is defined,
616and it becomes a single, transparent hierarchical file system. So archive
617files can be accessed in the same way as you access files directly on a disk,
618and it makes it easy to ship a new archive that will override a previous
619archive on a per-file basis.")
620 (license license:zlib)))
83a4a70b
DT
621
622(define-public love
623 (package
624 (name "love")
bd7a147e 625 (version "11.1")
83a4a70b
DT
626 (source (origin
627 (method url-fetch)
628 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
629 "love-" version "-linux-src.tar.gz"))
630 (sha256
631 (base32
a288ab1f 632 "1pkwiszmjs0xrwk0wqbc5cp9108b1y8gwsid0gqk1s0x09q9lpmw"))))
83a4a70b
DT
633 (build-system gnu-build-system)
634 (native-inputs
635 `(("pkg-config" ,pkg-config)))
636 (inputs
637 `(("devil" ,devil)
638 ("freetype" ,freetype)
639 ("libmodplug" ,libmodplug)
05d48c52 640 ("libtheora" ,libtheora)
83a4a70b
DT
641 ("libvorbis" ,libvorbis)
642 ("luajit" ,luajit)
643 ("mesa" ,mesa)
644 ("mpg123" ,mpg123)
645 ("openal" ,openal)
646 ("physfs" ,physfs)
647 ("sdl2" ,sdl2)
648 ("zlib" ,zlib)))
649 (synopsis "2D game framework for Lua")
650 (description "LÖVE is a framework for making 2D games in the Lua
651programming language.")
652 (home-page "https://love2d.org/")
653 (license license:zlib)))
154f6156
DT
654
655(define-public allegro-4
656 (package
657 (name "allegro")
b2cf5597 658 (version "4.4.3")
154f6156
DT
659 (source (origin
660 (method url-fetch)
3a12e21c
EF
661 (uri (string-append "https://github.com/liballeg/allegro5/"
662 "releases/download/" version "/allegro-"
663 version ".tar.gz"))
154f6156
DT
664 (sha256
665 (base32
b2cf5597 666 "1d5ws3ihvpa6f4qc6a6drq31pajw6bblxifr4kcxzqj9br1nw28y"))))
154f6156
DT
667 (build-system cmake-build-system)
668 (arguments
669 '(#:phases
670 (modify-phases %standard-phases
671 (add-after 'unpack 'patch-build-system
672 (lambda _
673 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
674 ;; via a command line option doesn't work because it is
675 ;; unconditionally clobbered in the build script.
676 (substitute* '("CMakeLists.txt")
677 (("ADDON_LINKAGE STATIC")
678 "ADDON_LINKAGE SHARED"))
679 #t)))))
680 (inputs
681 `(("glu" ,glu)
682 ("libpng" ,libpng)
683 ("libvorbis" ,libvorbis)
684 ("mesa" ,mesa)
685 ("zlib" ,zlib)))
686 (synopsis "Game programming library")
687 (description "Allegro is a library mainly aimed at video game and
688multimedia programming. It handles common, low-level tasks such as creating
689windows, accepting user input, loading data, drawing images, playing sounds,
690etc.")
691 (home-page "http://liballeg.org")
692 (license license:giftware)))
2a068aec 693
19d311b4
RW
694(define-public allegro
695 (package
696 (name "allegro")
49405aaf 697 (version "5.2.5.0")
19d311b4
RW
698 (source (origin
699 (method url-fetch)
3a12e21c
EF
700 (uri (string-append "https://github.com/liballeg/allegro5/releases"
701 "/download/" version "/allegro-"
b15a020d 702 version ".tar.gz"))
19d311b4
RW
703 (sha256
704 (base32
49405aaf 705 "06dpkfnac8w3pq36834nn2iij3ajz6prladqd0w92lq39aiqv5jr"))))
19d311b4 706 (build-system cmake-build-system)
49405aaf 707 (arguments `(#:tests? #f)) ; there are no tests
19d311b4
RW
708 (inputs
709 ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb
710 `(("flac" ,flac)
711 ("freetype" ,freetype)
712 ("glu" ,glu)
713 ("gtk" ,gtk+-2)
714 ("libjpeg" ,libjpeg)
715 ("libpng" ,libpng)
716 ("libtheora" ,libtheora)
717 ("libvorbis" ,libvorbis)
718 ("libxcursor" ,libxcursor)
719 ("libxinerama" ,libxinerama)
720 ("libxrandr" ,libxrandr)
721 ("mesa" ,mesa)
722 ("openal" ,openal)
723 ("physfs" ,physfs)
724 ("zlib" ,zlib)))
725 (native-inputs
726 `(("pkg-config" ,pkg-config)))
727 (synopsis "Game programming library")
728 (description "Allegro is a library mainly aimed at video game and
729multimedia programming. It handles common, low-level tasks such as creating
730windows, accepting user input, loading data, drawing images, playing sounds,
731etc.")
732 (home-page "http://liballeg.org")
733 (license license:bsd-3)))
734
cdf8f391
RW
735(define-public allegro-5.0
736 (package (inherit allegro)
737 (name "allegro")
738 (version "5.0.11")
739 (source (origin
740 (method url-fetch)
3a12e21c
EF
741 (uri (string-append "https://github.com/liballeg/allegro5/releases"
742 "/download/" version "/allegro-"
743 (if (equal? "0" (string-take-right version 1))
744 (string-drop-right version 2)
745 version)
746 ".tar.gz"))
0109b89c
EF
747 (patches (search-patches
748 "allegro-mesa-18.2.5-and-later.patch"))
cdf8f391
RW
749 (sha256
750 (base32
751 "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9"))))))
752
2a068aec
DT
753(define-public aseprite
754 (package
755 (name "aseprite")
82654d95 756 (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL.
ff4dc16e 757 ;; TODO: Unbundle third party software.
2a068aec 758 (source (origin
ff4dc16e
MB
759 (method url-fetch/zipbomb)
760 (uri (string-append "https://github.com/aseprite/aseprite"
761 "/releases/download/v" version
762 "/Aseprite-v" version "-Source.zip"))
2a068aec
DT
763 (sha256
764 (base32
82654d95 765 "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv"))))
2a068aec
DT
766 (build-system cmake-build-system)
767 (arguments
768 '(#:configure-flags
769 ;; Use shared libraries instead of building bundled source.
770 (list "-DWITH_WEBP_SUPPORT=1"
771 "-DUSE_SHARED_CURL=1"
772 "-DUSE_SHARED_GIFLIB=1"
773 "-DUSE_SHARED_JPEGLIB=1"
774 "-DUSE_SHARED_ZLIB=1"
775 "-DUSE_SHARED_LIBPNG=1"
776 "-DUSE_SHARED_LIBLOADPNG=1"
777 "-DUSE_SHARED_LIBWEBP=1"
778 "-DUSE_SHARED_TINYXML=1"
779 "-DUSE_SHARED_PIXMAN=1"
780 "-DUSE_SHARED_FREETYPE=1"
781 "-DUSE_SHARED_ALLEGRO4=1"
782 "-DENABLE_UPDATER=0" ; no auto-updates
783 (string-append "-DFREETYPE_INCLUDE_DIR="
784 (assoc-ref %build-inputs "freetype")
de1d68a2 785 "/include/freetype2"))))
2a068aec
DT
786 (native-inputs
787 `(("pkg-config" ,pkg-config)))
788 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
789 ;; patched version is bundled with Aseprite, but the patches should be
790 ;; extracted and applied on top of a standalone Allegro 4 package.
791 (inputs
792 `(("allegro" ,allegro-4)
793 ("curl" ,curl)
794 ("freetype" ,freetype)
795 ("giflib" ,giflib)
796 ("libjpeg" ,libjpeg)
797 ("libpng" ,libpng)
798 ("libwebp" ,libwebp)
799 ("libx11" ,libx11)
800 ("libxext" ,libxext)
801 ("libxxf86vm" ,libxxf86vm)
802 ("pixman" ,pixman)
803 ("tinyxml" ,tinyxml)
804 ("zlib" ,zlib)))
805 (synopsis "Animated sprite editor and pixel art tool")
806 (description "Aseprite is a tool for creating 2D pixel art for video
807games. In addition to basic pixel editing features, Aseprite can assist in
808the creation of animations, tiled graphics, texture atlases, and more.")
167f0e82 809 (home-page "https://www.aseprite.org/")
2a068aec 810 (license license:gpl2+)))
966dff3b
KY
811
812(define-public qqwing
813 (package
814 (name "qqwing")
815 (version "1.3.4")
816 (source (origin
817 (method url-fetch)
818 (uri (string-append
819 "https://qqwing.com/"
820 name "-" version ".tar.gz"))
821 (sha256
822 (base32
823 "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp"))))
824 (build-system gnu-build-system)
825 (native-inputs
826 `(("pkg-config" ,pkg-config)))
827 (home-page "https://qqwing.com/")
828 (synopsis "Sudoku puzzle solver and generator")
829 (description
830 "QQWing is a Sudoku puzzle generator and solver.
831It offers the following features:
832@enumerate
833@item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds.
834@item Uses logic. Uses as many solve techniques as possible when solving
835 puzzles rather than guessing.
836@item Rates puzzles. Most generators don't give an indication of the difficulty
837 of a Sudoku puzzle. QQwing does.
838@item Can print solve instructions for any puzzle.
839@item Customizable output style, including a CSV style that is easy to
840 import into a database.
841@end enumerate")
842 (license license:gpl2+)))
d2cc38b7
KK
843
844(define-public quesoglc
845 (package
846 (name "quesoglc")
847 (version "0.7.2")
848 (source (origin
849 (method url-fetch)
850 (uri (string-append "mirror://sourceforge/" name "/" version "/"
851 name "-" version "-free.tar.bz2"))
852 (sha256
853 (base32
854 "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks"))))
855 (build-system gnu-build-system)
856 (native-inputs `(("pkg-config" ,pkg-config)))
857 (inputs `(("fontconfig" ,fontconfig)
858 ("freeglute" ,freeglut)
859 ("fribidi" ,fribidi)
860 ("glew" ,glew)))
861 (home-page "http://quesoglc.sourceforge.net")
862 (synopsis "Implementation of the OpenGL Character Renderer (GLC)")
863 (description
864 "The OpenGL Character Renderer (GLC) is a state machine that provides
865OpenGL programs with character rendering services via an application programming
866interface (API).")
867 (license (list license:expat license:lgpl2.1+))))
4bc37bf0
KK
868
869(define-public python-pygame
870 (package
871 (name "python-pygame")
a9db93c1 872 (version "1.9.4")
4bc37bf0
KK
873 (source (origin
874 (method url-fetch)
052f75da 875 (uri (pypi-uri "pygame" version))
4bc37bf0
KK
876 (sha256
877 (base32
a9db93c1 878 "1dn0nb86jl7yr8709cncxdr0yrmviqakw7zx3g8jbbwrr60if3bh"))))
4bc37bf0
KK
879 (build-system python-build-system)
880 (arguments
a9db93c1 881 `(#:tests? #f ; tests require pygame to be installed first
4bc37bf0
KK
882 #:phases
883 (modify-phases %standard-phases
884 ;; Set the paths to the dependencies manually because
885 ;; the configure script does not allow passing them as
886 ;; parameters. This also means we can skip the configure
887 ;; phase.
888 (add-before 'build 'set-library-paths
889 (lambda* (#:key inputs outputs #:allow-other-keys)
890 (let ((sdl-ref (assoc-ref inputs "sdl"))
891 (font-ref (assoc-ref inputs "sdl-ttf"))
892 (image-ref (assoc-ref inputs "sdl-image"))
893 (mixer-ref (assoc-ref inputs "sdl-mixer"))
894 (smpeg-ref (assoc-ref inputs "libsmpeg"))
895 (png-ref (assoc-ref inputs "libpng"))
896 (jpeg-ref (assoc-ref inputs "libjpeg"))
052f75da 897 (freetype-ref (assoc-ref inputs "freetype"))
4bc37bf0
KK
898 (v4l-ref (assoc-ref inputs "v4l-utils"))
899 (out-ref (assoc-ref outputs "out")))
900 (substitute* "Setup.in"
901 (("SDL = -I/usr/include/SDL")
902 (string-append "SDL = -I" sdl-ref "/include/SDL -I.")))
903 (substitute* "Setup.in"
904 (("FONT = -lSDL_ttf")
905 (string-append "FONT = -I" font-ref "/include/SDL -L"
a9db93c1 906 font-ref "/lib -lSDL_ttf")))
4bc37bf0
KK
907 (substitute* "Setup.in"
908 (("IMAGE = -lSDL_image")
909 (string-append "IMAGE = -I" image-ref "/include/SDL -L"
a9db93c1 910 image-ref "/lib -lSDL_image")))
4bc37bf0
KK
911 (substitute* "Setup.in"
912 (("MIXER = -lSDL_mixer")
913 (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
a9db93c1 914 mixer-ref "/lib -lSDL_mixer")))
4bc37bf0
KK
915 (substitute* "Setup.in"
916 (("SMPEG = -lsmpeg")
917 (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
a9db93c1 918 smpeg-ref "/lib -lsmpeg")))
4bc37bf0
KK
919 (substitute* "Setup.in"
920 (("PNG = -lpng")
921 (string-append "PNG = -I" png-ref "/include -L"
a9db93c1 922 png-ref "/lib -lpng")))
4bc37bf0
KK
923 (substitute* "Setup.in"
924 (("JPEG = -ljpeg")
925 (string-append "JPEG = -I" jpeg-ref "/include -L"
926 jpeg-ref "/lib -ljpeg")))
052f75da
DM
927
928 (substitute* "Setup.in"
929 (("FREETYPE = -lfreetype")
930 (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L"
931 freetype-ref "/lib -lfreetype")))
932
4bc37bf0
KK
933 (substitute* "Setup.in"
934 (("^pypm") "#pypm"))
4bc37bf0
KK
935 ;; Create a path to a header file provided by v4l-utils.
936 (system* "mkdir" "linux")
937 (system* "ln" "--symbolic"
938 (string-append v4l-ref "/include/libv4l1-videodev.h")
939 "linux/videodev.h")
940 (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
4bc37bf0 941 (inputs
052f75da
DM
942 `(("freetype" ,freetype)
943 ("sdl" ,sdl)
4bc37bf0
KK
944 ("sdl-image" ,sdl-image)
945 ("sdl-mixer" ,sdl-mixer)
946 ("sdl-ttf" ,sdl-ttf)
947 ("sdl-gfx" ,sdl-gfx)
948 ("libjpeg" ,libjpeg)
949 ("libpng" ,libpng)
950 ("libX11" ,libx11)
951 ("libsmpeg" ,libsmpeg)
952 ("portmidi" ,portmidi)
953 ("v4l-utils" ,v4l-utils)))
167f0e82 954 (home-page "https://www.pygame.org")
4bc37bf0
KK
955 (synopsis "SDL wrapper for Python")
956 (description "Pygame is a set of Python modules designed for writing games.
957Pygame adds functionality on top of the excellent SDL library. This allows you
958to create fully featured games and multimedia programs in the python language.")
959 (license (list license:bsd-2
960 ;; python numeric license as listed by Debian looks like
961 ;; an Expat-style license with a warranty disclaimer for
962 ;; the U.S. government and the University of California.
963 license:expat
964 license:lgpl2.0+
965 license:lgpl2.1+
966 license:gpl3+
967 license:psfl
968 license:public-domain
969 license:lgpl2.1+))))
052f75da
DM
970
971(define-public python2-pygame
972 (package-with-python2 python-pygame))
68c6110c
DT
973
974(define-public grafx2
975 (package
976 (name "grafx2")
977 (version "2.4")
978 (source (origin
979 (method url-fetch)
980 ;; XXX: There is no URL that contains the version. :(
981 (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21")
982 (sha256
983 (base32
984 "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q"))))
985 (build-system gnu-build-system)
986 (arguments
987 '(#:phases
988 (modify-phases %standard-phases
989 (delete 'configure) ; no configure script
990 (add-before 'build 'change-to-src-directory
991 (lambda _
992 (chdir "src")
993 #t)))
994 #:make-flags
995 ;; SDL header files are referenced without the preceeding "SDL/".
996 (list (string-append "CFLAGS=-I"
997 (assoc-ref %build-inputs "sdl-union")
998 "/include/SDL")
999 (string-append "prefix="
1000 (assoc-ref %outputs "out")))
1001 #:tests? #f)) ; no check target
1002 (native-inputs
1003 `(("pkg-config" ,pkg-config)))
1004 (inputs
1005 `(("libpng" ,libpng)
1006 ("lua" ,lua-5.1)
1007 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf)))))
1008 (synopsis "Bitmap paint program")
1009 (description "GrafX2 is a bitmap paint program inspired by the Amiga
7432d3ae 1010programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it
68c6110c
DT
1011includes a very large number of tools and effects that make it particularly
1012suitable for pixel art, game graphics, and generally any detailed graphics
1013painted with a mouse.")
1014 (home-page "http://pulkomandy.tk/projects/GrafX2")
1015 (license license:gpl2))) ; GPLv2 only
c608fe8c
MR
1016
1017(define-public ois
1018 (package
1019 (name "ois")
006345c1 1020 (version "1.5")
c608fe8c
MR
1021 (source
1022 (origin
c608fe8c
MR
1023 (method git-fetch)
1024 (uri (git-reference
1025 (url "https://github.com/wgois/OIS.git")
006345c1
TGR
1026 (commit (string-append "v" version))))
1027 (file-name (git-file-name name version))
c608fe8c 1028 (sha256
006345c1
TGR
1029 (base32 "0g8krgq5bdx2rw7ig0xva4kqv4x815672i7z6lljp3n8847wmypa"))))
1030 (build-system cmake-build-system)
1031 (arguments
1032 `(#:tests? #f)) ; no test suite
c608fe8c 1033 (inputs
006345c1 1034 `(("libx11" ,libx11)))
c608fe8c
MR
1035 (synopsis "Object Oriented Input System")
1036 (description
1037 "Cross Platform Object Oriented Input Lib System is a cross platform,
1038simple solution for using all kinds of Input Devices (Keyboards, Mice,
1039Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very
1040robust and compatible with many systems and operating systems.")
1041 (home-page "https://github.com/wgois/OIS")
1042 (license license:zlib)))
42d0d13d
MR
1043
1044(define-public mygui
1045 (package
1046 (name "mygui")
1047 (version "3.2.2")
1048 (source
1049 (origin
47f4d5d3
PN
1050 (method git-fetch)
1051 (uri (git-reference
1052 (url "https://github.com/MyGUI/mygui")
1053 (commit (string-append "MyGUI" version))))
1054 (file-name (git-file-name name version))
42d0d13d
MR
1055 (sha256
1056 (base32
47f4d5d3 1057 "1wk7jmwm55rhlqqcyvqsxdmwvl70bysl9azh4kd9n57qlmgk3zmw"))))
42d0d13d
MR
1058 (build-system cmake-build-system)
1059 (arguments
1060 '(#:tests? #f ; No test target
1061 #:configure-flags
1062 (list "-DMYGUI_INSTALL_DOCS=TRUE"
1063 (string-append "-DOGRE_INCLUDE_DIR="
1064 (assoc-ref %build-inputs "ogre")
47f4d5d3
PN
1065 "/include/OGRE")
1066 ;; Demos and tools are Windows-specific:
1067 ;; https://github.com/MyGUI/mygui/issues/24.
1068 "-DMYGUI_BUILD_DEMOS=FALSE"
1069 "-DMYGUI_BUILD_TOOLS=FALSE")))
42d0d13d
MR
1070 (native-inputs
1071 `(("boost" ,boost)
1072 ("doxygen" ,doxygen)
1073 ("pkg-config" ,pkg-config)))
1074 (inputs
1075 `(("font-dejavu" ,font-dejavu)
1076 ("freetype" ,freetype)
1077 ("graphviz" ,graphviz)
1078 ("libx11" ,libx11)
1079 ("ogre" ,ogre)
1080 ("ois" ,ois)))
1081 (synopsis "Fast, flexible and simple GUI")
1082 (description
1083 "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games
1084and 3D applications. The main goals of mygui are: speed, flexibility and ease
1085of use.")
1086 (home-page "http://mygui.info/")
1087 (license license:expat)))
e9a599cd 1088
9fd50db3
PN
1089(define-public mygui-gl
1090 ;; Closure size is reduced by some 800 MiB.
1091 (package
1092 (inherit mygui)
1093 (name "mygui-gl")
1094 (version "3.2.2")
1095 (arguments
1096 (substitute-keyword-arguments (package-arguments mygui)
1097 ((#:configure-flags _)
1098 `(cons* "-DMYGUI_RENDERSYSTEM=4" ; 3 is Ogre, 4 is OpenGL.
1099 ;; We can't reuse the flags because of the mention to Ogre.
1100 (list "-DMYGUI_INSTALL_DOCS=TRUE"
1101 ;; Demos and tools are Windows-specific:
1102 ;; https://github.com/MyGUI/mygui/issues/24.
1103 "-DMYGUI_BUILD_DEMOS=FALSE"
1104 "-DMYGUI_BUILD_TOOLS=FALSE")))))
1105 (inputs
1106 `(("mesa" ,mesa)
1107 ("glu" ,glu)
1108 ,@(fold alist-delete (package-inputs mygui)
1109 '("ogre"))))
1110 (synopsis "Fast, flexible and simple GUI (OpenGL backend)")))
1111
e9a599cd
MR
1112(define-public openmw
1113 (package
1114 (name "openmw")
6bc30a57 1115 (version "0.45.0")
e9a599cd
MR
1116 (source
1117 (origin
8b1f8f64
AK
1118 (method url-fetch)
1119 (uri
1120 (string-append "https://github.com/OpenMW/openmw/archive/"
37bf216d 1121 "openmw-" version ".tar.gz"))
e9a599cd
MR
1122 (sha256
1123 (base32
6bc30a57 1124 "0r0wgvv1faan8z8lbply8lks4hcnppifjrcz04l5zvq6yiqzjg5n"))))
e9a599cd
MR
1125 (build-system cmake-build-system)
1126 (arguments
1127 `(#:tests? #f ; No test target
1128 #:configure-flags
1129 (list "-DDESIRED_QT_VERSION=5")))
1130 (native-inputs
1131 `(("boost" ,boost)
1132 ("doxygen" ,doxygen)
1133 ("pkg-config" ,pkg-config)))
1134 (inputs
1135 `(("bullet" ,bullet)
1136 ("ffmpeg" ,ffmpeg)
1137 ("libxt" ,libxt)
0655c16e 1138 ("mygui" ,mygui-gl) ; OpenMW does not need Ogre.
e9a599cd
MR
1139 ("openal" ,openal)
1140 ("openscenegraph" ,openscenegraph)
1141 ("qtbase" ,qtbase)
1142 ("sdl" ,sdl2)
1143 ("unshield" ,unshield)))
5a80c15c 1144 (synopsis "Re-implementation of the RPG Morrowind engine")
e9a599cd 1145 (description
5a80c15c
RW
1146 "OpenMW is a game engine which reimplements and extends the one that runs
1147the 2002 open-world RPG Morrowind. The engine comes with its own editor,
1148called OpenMW-CS which allows the user to edit or create their own original
1149games.")
e9a599cd 1150 (home-page "https://openmw.org")
8b1f8f64 1151 (license license:gpl3)))
194b4e7d
PM
1152
1153(define-public godot
1154 (package
1155 (name "godot")
fc346e30 1156 (version "3.0.6")
194b4e7d 1157 (source (origin
39f516cb
TGR
1158 (method git-fetch)
1159 (uri (git-reference
1160 (url "https://github.com/godotengine/godot")
1161 (commit (string-append version "-stable"))))
1162 (file-name (git-file-name name version))
194b4e7d 1163 (sha256
9766c6e2 1164 (base32
fc346e30 1165 "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
5b8d2ace
MB
1166 (modules '((guix build utils)))
1167 (snippet
1168 '(begin
1169 ;; Drop libraries that we take from Guix. Note that some
1170 ;; of these may be modified; see "thirdparty/README.md".
1171 (with-directory-excursion "thirdparty"
1172 (for-each delete-file-recursively
1173 '("freetype"
1174 "libogg"
1175 "libpng"
1176 "libtheora"
1177 "libvorbis"
1178 "libvpx"
1179 "libwebp"
1180 "openssl"
1181 "opus"
1182 "zlib"))
1183 #t)))))
92b51d12 1184 (build-system scons-build-system)
194b4e7d 1185 (arguments
92b51d12
AI
1186 `(#:scons ,scons-python2
1187 #:scons-flags (list "platform=x11"
d6e8a84e
EF
1188 ,@(if (string-prefix? "aarch64" (or (%current-target-system)
1189 (%current-system)))
1190 `("CCFLAGS=-DNO_THREADS")
1191 '())
92b51d12
AI
1192 ;; Avoid using many of the bundled libs.
1193 ;; Note: These options can be found in the SConstruct file.
1194 "builtin_freetype=no"
1195 "builtin_glew=no"
1196 "builtin_libmpdec=no"
1197 "builtin_libogg=no"
1198 "builtin_libpng=no"
1199 "builtin_libtheora=no"
1200 "builtin_libvorbis=no"
5b8d2ace 1201 "builtin_libvpx=no"
92b51d12
AI
1202 "builtin_libwebp=no"
1203 "builtin_openssl=no"
1204 "builtin_opus=no"
1205 "builtin_zlib=no")
1206 #:tests? #f ; There are no tests
194b4e7d
PM
1207 #:phases
1208 (modify-phases %standard-phases
194b4e7d
PM
1209 (add-after 'unpack 'scons-use-env
1210 (lambda _
1211 ;; Scons does not use the environment variables by default,
1212 ;; but this substitution makes it do so.
1213 (substitute* "SConstruct"
1214 (("env_base = Environment\\(tools=custom_tools\\)")
1215 (string-append
1216 "env_base = Environment(tools=custom_tools)\n"
1217 "env_base = Environment(ENV=os.environ)")))
1218 #t))
194b4e7d
PM
1219 (replace 'install
1220 (lambda* (#:key outputs #:allow-other-keys)
1221 (let* ((out (assoc-ref outputs "out"))
1222 (bin (string-append out "/bin")))
1223 (with-directory-excursion "bin"
1224 (if (file-exists? "godot.x11.tools.64")
1225 (rename-file "godot.x11.tools.64" "godot")
1226 (rename-file "godot.x11.tools.32" "godot"))
7da5db8e
TGR
1227 (install-file "godot" bin))
1228 #t)))
194b4e7d
PM
1229 (add-after 'install 'install-godot-desktop
1230 (lambda* (#:key outputs #:allow-other-keys)
1231 (let* ((out (assoc-ref outputs "out"))
1232 (desktop (string-append out "/share/applications"))
1233 (icon-dir (string-append out "/share/pixmaps")))
194b4e7d
PM
1234 (rename-file "icon.png" "godot.png")
1235 (install-file "godot.png" icon-dir)
7da5db8e 1236 (mkdir-p desktop)
194b4e7d
PM
1237 (with-output-to-file
1238 (string-append desktop "/godot.desktop")
1239 (lambda _
1240 (format #t
1241 "[Desktop Entry]~@
1242 Name=godot~@
1243 Comment=The godot game engine~@
1244 Exec=~a/bin/godot~@
1245 TryExec=~@*~a/bin/godot~@
1246 Icon=godot~@
1247 Type=Application~%"
1248 out)))
1249 #t))))))
92b51d12 1250 (native-inputs `(("pkg-config" ,pkg-config)))
194b4e7d
PM
1251 (inputs `(("alsa-lib" ,alsa-lib)
1252 ("freetype" ,freetype)
1253 ("glew" ,glew)
1254 ("glu" ,glu)
1255 ("libtheora" ,libtheora)
1256 ("libvorbis" ,libvorbis)
5b8d2ace 1257 ("libvpx" ,libvpx)
194b4e7d
PM
1258 ("libwebp" ,libwebp)
1259 ("libx11" ,libx11)
1260 ("libxcursor" ,libxcursor)
9766c6e2 1261 ("libxi" ,libxi)
194b4e7d
PM
1262 ("libxinerama" ,libxinerama)
1263 ("libxrandr" ,libxrandr)
1264 ("mesa" ,mesa)
1265 ("openssl" ,openssl)
1266 ("opusfile" ,opusfile)
92b51d12 1267 ("pulseaudio" ,pulseaudio)))
194b4e7d
PM
1268 (home-page "https://godotengine.org/")
1269 (synopsis "Advanced 2D and 3D game engine")
1270 (description
1271 "Godot is an advanced multi-platform game engine written in C++. If
1272features design tools such as a visual editor, can import 3D models and
1273provide high-quality 3D rendering, it contains an animation editor, and can be
1274scripted in a Python-like language.")
1275 (license license:expat)))
531003be 1276
1277(define-public eureka
1278 (package
1279 (name "eureka")
75f66e4a 1280 (version "1.24")
531003be 1281 (source (origin
1282 (method url-fetch)
1283 (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/"
1284 version "/eureka-"
1285 ;; version without dots e.g 1.21 => 121
1286 (string-join (string-split version #\.) "")
1287 "-source.tar.gz"))
1288 (sha256
1289 (base32
75f66e4a 1290 "1x4idjniz9sma3j9ss6ni7fafmz22zs2jnpsqw4my9rsnmra5d9v"))))
531003be 1291 (build-system gnu-build-system)
1292 (arguments
1293 '(#:tests? #f
1294 #:make-flags
1295 (let ((out (assoc-ref %outputs "out")))
1296 (list (string-append "PREFIX=" out)))
1297 #:phases
1298 (modify-phases %standard-phases
1299 (delete 'configure)
1300 (add-before 'build 'prepare-install-directories
1301 (lambda* (#:key outputs #:allow-other-keys)
1302 (let ((out (assoc-ref outputs "out")))
1303 (mkdir-p (string-append out "/bin"))
1304 (mkdir-p (string-append out "/share"))
1305
1306 (with-fluids ((%default-port-encoding #f))
1307 (substitute* "./src/main.cc"
1308 (("/usr/local") out)))
1309
1310 (substitute* "Makefile"
1311 (("-o root") ""))))))))
1312 (inputs `(("mesa" ,mesa)
1313 ("libxft" ,libxft)
1314 ("libxinerama" ,libxinerama)
1315 ("libfontconfig" ,fontconfig)
1316 ("libjpeg" ,libjpeg)
1317 ("libpng" ,libpng)
1318 ("fltk" ,fltk)
1319 ("zlib" ,zlib)))
1320 (native-inputs `(("pkg-config" ,pkg-config)
1321 ("xdg-utils" ,xdg-utils)))
1322 (synopsis "Doom map editor")
1323 (description "Eureka is a map editor for the classic DOOM games, and a few
1324related games such as Heretic and Hexen. It comes with a 3d preview mode and
1325a 2D editor view.")
1326 (home-page "http://eureka-editor.sourceforge.net/")
1327 (license license:gpl2+)))
00fca594
RW
1328
1329(define-public guile-chickadee
1330 (package
1331 (name "guile-chickadee")
f6ea5237 1332 (version "0.4.0")
00fca594
RW
1333 (source (origin
1334 (method url-fetch)
1335 (uri (string-append "https://files.dthompson.us/chickadee/"
1336 "chickadee-" version ".tar.gz"))
1337 (sha256
1338 (base32
f6ea5237 1339 "1fdicsgls5cp0yffcm5vjmav67gv9bxhz1s3jvdvinspxb485x7l"))))
00fca594 1340 (build-system gnu-build-system)
00fca594
RW
1341 (propagated-inputs
1342 `(("guile-opengl" ,guile-opengl)
1343 ("guile-sdl2" ,guile-sdl2)))
1344 (inputs
1345 `(("guile" ,guile-2.2)))
1346 (native-inputs
1347 `(("pkg-config" ,pkg-config)
1348 ("texinfo" ,texinfo)))
1349 (home-page "https://dthompson.us/projects/chickadee.html")
1350 (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL")
1351 (description "Chickadee is a game development toolkit for Guile Scheme
1352built on top of SDL2 and OpenGL. Chickadee aims to provide all the features
1353that parenthetically inclined game developers need to make 2D (and eventually
13543D) games in Scheme, such as:
1355
1356@enumerate
1357@item extensible, fixed-timestep game loop
1358@item OpenGL-based rendering engine
1359@item keyboard, mouse, controller input
1360@item REPL-driven development model
1361@end enumerate\n")
1362 (license license:gpl3+)))
4041fabb
PN
1363
1364(define-public bennu-game-development
1365 (package
1366 (name "bennu-game-development")
1367 (version "348")
1368 (source (origin
1369 (method svn-fetch)
1370 (uri (svn-reference
1371 (url "http://svn.code.sf.net/p/bennugd/code")
1372 (revision (string->number version))))
1373 (file-name (string-append name "-" version))
1374 (sha256
1375 (base32
edf1ce60
EF
1376 "0wpzsbh4zi3931493dnyl5ffmh1b7fj2sx3mzrq304z9zs4d6lqq"))
1377 (modules '((guix build utils)))
1378 (snippet
1379 '(begin
1380 (delete-file-recursively "3rdparty") #t))))
4041fabb
PN
1381 (build-system gnu-build-system)
1382 (arguments
1383 '(#:phases
1384 (modify-phases %standard-phases
f0e4cfcb 1385 (add-after 'unpack 'patch-configure-to-use-openssl
4041fabb
PN
1386 (lambda* (#:key outputs #:allow-other-keys)
1387 (chdir "core")
1388 (delete-file "configure")
1389 (substitute* "configure.in"
1390 (("i\\*86\\)")
f0e4cfcb 1391 "*)
4041fabb
PN
1392 COMMON_CFLAGS=\"$COMMON_CFLAGS -DUSE_OPENSSL\"
1393 COMMON_LDFLAGS=\"$COMMON_LDFLAGS\"
1394 LIBSSL=\"crypto\"
1395 USE_OPENSSL=yes
1396 ;;
1397
f0e4cfcb
EF
1398 i*86)"))
1399 #t)))))
4041fabb
PN
1400 (inputs `(("openssl" ,openssl)
1401 ("zlib" ,zlib)))
1402 (native-inputs `(("pkg-config" ,pkg-config)
1403 ("autoconf" ,autoconf)
1404 ("automake" ,automake)
1405 ("libtool" ,libtool)))
1406 (synopsis "Programming language to create games")
1407 (description "Bennu Game Development, also known as bennudg, is a
1408programming language tailored at game development. It is the successor of
1409Fenix.")
1410 (home-page "https://sourceforge.net/projects/bennugd/")
1411 (license license:zlib)))
24c4b012
PN
1412
1413(define-public bennu-game-development-modules
1414 (package
1415 (inherit bennu-game-development)
1416 (name "bennu-game-development-modules")
1417 (arguments
1418 '(#:phases
1419 (modify-phases %standard-phases
1420 (add-after 'unpack 'patch-conflicting-definitions
1421 (lambda _
1422 (with-fluids ((%default-port-encoding #f))
1423 (substitute* "core/include/fmath.h"
1424 (("extern fixed fmul\\( int x, int y \\);") "")
1425 (("extern fixed fdiv\\( int x, int y \\);") "")))
1426 (chdir "modules"))))))
1427 (inputs `(("zlib" ,zlib)
1428 ("libpng" ,libpng)
1429 ("openssl" ,openssl)
1430 ("sdl-mixer" ,sdl-mixer)
1431 ("bennu-game-development" ,bennu-game-development)))
0525864b 1432 (synopsis "Modules for the Bennu Game Development programming language")
24c4b012 1433 (description "This package contains a collection of modules for the Bennu
0525864b 1434Game Development programming language, from CD handling through SDL to
24c4b012 1435joystick support.")))
cd528946
RW
1436
1437(define-public plib
1438 (package
1439 (name "plib")
1440 (version "1.8.5")
1441 (source (origin
1442 (method url-fetch)
1443 (uri (string-append "http://plib.sourceforge.net/dist/"
1444 "plib-" version ".tar.gz"))
1445 (sha256
1446 (base32
05f386f1
EF
1447 "0cha71mflpa10vh2l7ipyqk67dq2y0k5xbafwdks03fwdyzj4ns8"))
1448 (patches (search-patches "plib-CVE-2011-4620.patch"
1449 "plib-CVE-2012-4552.patch"))))
cd528946
RW
1450 (build-system gnu-build-system)
1451 (inputs
1452 `(("mesa" ,mesa)
1453 ("libxi" ,libxi)
1454 ("libxmu" ,libxmu)))
1455 (native-inputs
1456 `(("pkg-config" ,pkg-config)))
1457 (home-page "http://plib.sourceforge.net/")
1458 (synopsis "Suite of portable game libraries")
1459 (description "PLIB is a set of libraries that will permit programmers to
1460write games and other realtime interactive applications that are 100% portable
1461across a wide range of hardware and operating systems. PLIB includes sound
1462effects, music, a complete 3D engine, font rendering, a simple Windowing
1463library, a game scripting language, a GUI, networking, 3D math library and a
1464collection of handy utility functions. All are 100% portable across nearly
1465all modern computing platforms. Each library component is fairly independent
1466of the others")
1467 (license license:lgpl2.0+)))
e4ff9dff
PN
1468
1469(define-public ioquake3
1470 ;; We follow master since it seems that there won't be releases after 1.3.6.
1471 (let ((commit "95b9cab4d644fa3bf757cfff821cc4f7d76e38b0"))
1472 (package
1473 (name "ioquake3")
1474 (version (git-version "1.3.6" "1" commit))
1475 (source
1476 (origin
1477 (method git-fetch)
1478 (uri (git-reference
1479 (url "https://github.com/ioquake/ioq3.git")
1480 (commit commit)))
1481 (file-name (git-file-name name version))
1482 (sha256
1483 (base32
1484 "1vflk028z9gccg5yfi5451y1k5wxjdh3qbhjf4x6r7w2pzlxh16z"))))
1485 (build-system gnu-build-system)
1486 (inputs
1487 `(("sdl2" ,sdl2)
1488 ("libjpeg" ,libjpeg)
1489 ("openal" ,openal)
1490 ("curl" ,curl)
1491 ("opusfile" ,opusfile)
1492 ("opus" ,opus)
1493 ("libvorbis" ,libvorbis)
1494 ("freetype" ,freetype)
1495 ("libogg" ,libogg)))
1496 (native-inputs
1497 `(("which" ,which) ; Else SDL_version.h won't be found.
1498 ("pkg-config" ,pkg-config)))
1499 (arguments
1500 '(#:tests? #f ; No tests.
1501 #:make-flags '("CC=gcc"
1502 "USE_INTERNAL_LIBS=0"
1503 "USE_FREETYPE=1"
1504 "USE_RENDERER_DLOPEN=0"
1505 "USE_OPENAL_DLOPEN=0"
1506 "USE_CURL_DLOPEN=0")
1507 #:phases
1508 (modify-phases %standard-phases
1509 (delete 'configure)
1510 (replace 'install
1511 (lambda* (#:key outputs #:allow-other-keys)
1512 (invoke "make" "copyfiles" "CC=gcc"
1513 "USE_INTERNAL_LIBS=0"
1514 (string-append "COPYDIR="
1515 (assoc-ref outputs "out")
1516 "/bin")))))))
1517 (home-page "https://ioquake3.org/")
1518 (synopsis "FPS game engine based on Quake 3")
1519 (description "ioquake3 is a free software first person shooter engine
1520based on the Quake 3: Arena and Quake 3: Team Arena source code. Compared to
1521the original, ioquake3 has been cleaned up, bugs have been fixed and features
1522added. The permanent goal is to create the open source Quake 3 distribution
1523upon which people base their games, ports to new platforms, and other
1524projects.")
e4ff9dff 1525 (license license:gpl2))))
545946f6
PN
1526
1527(define-public openvr
1528 (package
1529 (name "openvr")
1530 (version "1.4.18")
1531 (home-page "https://github.com/ValveSoftware/openvr/")
1532 (source
1533 (origin
1534 (method git-fetch)
1535 (uri (git-reference
1536 (url home-page)
1537 (commit (string-append "v" version))))
1538 (file-name (git-file-name name version))
1539 (sha256
1540 (base32
1541 "0m92634j6g0f2xybbzklm79cnq20vidbk1jc62pnz12aabwixvyh"))))
1542 (build-system cmake-build-system)
1543 (arguments
1544 ;; No tests.
1545 '(#:tests? #f
1546 #:configure-flags (list "-DBUILD_SHARED=1")))
1547 (synopsis "Virtual reality software development kit")
1548 (description "OpenVR is an API and runtime that allows access to VR
1549hardware from multiple vendors without requiring that applications have
1550specific knowledge of the hardware they are targeting.")
1551 (license license:bsd-3)))