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