gnu: physfs: Update to 3.0.2.
[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 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 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 ((guix licenses) #:prefix license:)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module (guix utils)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system python)
44 #:use-module (guix build-system scons)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages audio)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages boost)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages curl)
51 #:use-module (gnu packages documentation)
52 #:use-module (gnu packages fltk)
53 #:use-module (gnu packages fonts)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages freedesktop)
56 #:use-module (gnu packages fribidi)
57 #:use-module (gnu packages dbm)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages gnunet)
62 #:use-module (gnu packages graphics)
63 #:use-module (gnu packages graphviz)
64 #:use-module (gnu packages gtk)
65 #:use-module (gnu packages guile)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages linux)
68 #:use-module (gnu packages lua)
69 #:use-module (gnu packages m4)
70 #:use-module (gnu packages mp3)
71 #:use-module (gnu packages multiprecision)
72 #:use-module (gnu packages music)
73 #:use-module (gnu packages ncurses)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages pulseaudio)
76 #:use-module (gnu packages python)
77 #:use-module (gnu packages python-xyz)
78 #:use-module (gnu packages qt)
79 #:use-module (gnu packages sdl)
80 #:use-module (gnu packages stb)
81 #:use-module (gnu packages texinfo)
82 #:use-module (gnu packages tls)
83 #:use-module (gnu packages video)
84 #:use-module (gnu packages xdisorg)
85 #:use-module (gnu packages xiph)
86 #:use-module (gnu packages xml)
87 #:use-module (gnu packages xorg))
88
89 (define-public bullet
90 (package
91 (name "bullet")
92 (version "2.88")
93 (source (origin
94 (method git-fetch)
95 (uri (git-reference
96 (url "https://github.com/bulletphysics/bullet3/")
97 (commit version)))
98 (file-name (git-file-name name version))
99 (sha256
100 (base32
101 "00qkif245yj7n2f262bgjaxv1bz3wmmcsfnjgy3qpzvlpzpns5z8"))
102 (modules '((guix build utils)))
103 (snippet
104 '(begin
105 (for-each delete-file (find-files "build3" "premake*"))
106 (with-directory-excursion "examples/ThirdPartyLibs"
107 (for-each delete-file-recursively
108 '("Gwen" "clsocket" "enet" "glad" "imgui"
109 "lua-5.2.3" "midi" "minizip" "openvr"
110 "optionalX11" "serial" "zlib")))
111 ;; These need files from ThirdPartyLibs
112 (substitute* "Extras/CMakeLists.txt"
113 (("BulletRobotics") "")
114 (("obj2sdf") ""))
115 ;; Tests fail on linking, cannot find -lBussIK
116 (substitute* "test/CMakeLists.txt"
117 ((" InverseDynamics")
118 "../examples/ThirdPartyLibs/BussIK InverseDynamics"))
119 ; (("SharedMemory") ""))
120 #t))))
121 (build-system cmake-build-system)
122 (arguments
123 '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON"
124 "-DBUILD_CPU_DEMOS=OFF"
125 "-DBUILD_OPENGL3_DEMOS=OFF"
126 "-DBUILD_BULLET2_DEMOS=OFF"
127 (string-append "-DCMAKE_CXX_FLAGS=-fPIC "
128 (or (getenv "CXXFLAGS") "")))
129 #:phases
130 (modify-phases %standard-phases
131 (add-after 'unpack 'remove-failing-tests
132 ;; These tests fail specifically after removing 3rd party code
133 (lambda _
134 (substitute* "test/SharedMemory/CMakeLists.txt"
135 (("ADD_TEST") "# ADD_TEST"))
136 (substitute* "test/InverseDynamics/CMakeLists.txt"
137 (("ADD_TEST\\(Test_BulletInverseForward")
138 "# ADD_TEST(Test_BulletInverseForward"))
139 #t)))))
140 (inputs
141 `(("glu" ,glu)
142 ("libx11" ,libx11)
143 ("mesa" ,mesa)))
144 (home-page "https://pybullet.org/wordpress/")
145 (synopsis "3D physics engine library")
146 (description
147 "Bullet is a physics engine library usable for collision detection. It
148 is used in some video games and movies.")
149 (license license:zlib)))
150
151 (define-public deutex
152 (package
153 (name "deutex")
154 (version "5.1.2")
155 (source (origin
156 (method url-fetch)
157 (uri (string-append "https://github.com/Doom-Utils/" name
158 "/releases/download/v" version "/"
159 name "-" version ".tar.xz"))
160 (sha256
161 (base32
162 "1rj3w4xa0n4jixy4j7p6gbclylbgxvhdnji7xnkydrqii9rxnbp4"))))
163 (build-system gnu-build-system)
164 (native-inputs `(("asciidoc" ,asciidoc)))
165 (home-page "https://github.com/Doom-Utils/deutex")
166 (synopsis "WAD file composer for Doom and related games")
167 (description
168 "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be
169 used to extract the lumps of a wad and save them as individual files.
170 Conversely, it can also build a wad from separate files. When extracting a
171 lump to a file, it does not just copy the raw data, it converts it to an
172 appropriate format (such as PPM for graphics, Sun audio for samples, etc.).
173 Conversely, when it reads files for inclusion in pwads, it does the necessary
174 conversions (for example, from PPM to Doom picture format). In addition,
175 DeuTex has functions such as merging wads, etc.")
176 (license license:gpl2+)))
177
178 (define-public grfcodec
179 (package
180 (name "grfcodec")
181 (version "6.0.6")
182 (source (origin
183 (method url-fetch)
184 (uri (string-append "http://binaries.openttd.org/extra/"
185 name "/" version "/" name "-" version
186 "-source.tar.xz"))
187 (sha256
188 (base32
189 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
190 (build-system gnu-build-system)
191 (arguments
192 '(#:tests? #f ; no check target
193 #:phases
194 (modify-phases %standard-phases
195 (delete 'configure) ; no configure script
196 (replace 'install ; no install target
197 (lambda* (#:key outputs #:allow-other-keys)
198 (let* ((out (assoc-ref outputs "out"))
199 (bin (string-append out "/bin"))
200 (doc (string-append out "/share/doc"))
201 (man (string-append out "/share/man/man1")))
202 (for-each (lambda (file)
203 (install-file file bin))
204 '("grfcodec" "grfid" "grfstrip" "nforenum"))
205 (install-file "COPYING" doc)
206 (with-directory-excursion "docs"
207 (for-each (lambda (file)
208 (install-file (string-append file ".txt") doc))
209 '("auto_correct" "commands" "grf" "grfcodec" "grftut"
210 "readme" "readme.rpn"))
211 (for-each (lambda (file)
212 (install-file file man))
213 (find-files "." "\\.1"))))
214 #t)))))
215 (inputs
216 `(("boost" ,boost)
217 ("libpng" ,libpng)
218 ("zlib" ,zlib)))
219 (synopsis "GRF development tools")
220 (description
221 "The @dfn{Graphics Resource File} (GRF) development tools are a set of
222 tools for developing (New)GRFs. It includes a number of smaller programs, each
223 with a specific task:
224 @enumerate
225 @item @code{grfcodec} decodes and encodes GRF files for OpenTTD.
226 @item @code{grfid} extracts the so-called \"GRF ID\" from a GRF.
227 @item @code{grfstrip} strips all sprites from a GRF.
228 @item @code{nforenum} checks NFO code for errors, making corrections when
229 necessary.
230 @end enumerate")
231 (home-page "http://dev.openttdcoop.org/projects/grfcodec")
232 ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
233 ;; NFORenum is under the GPL2+.
234 ;; The MD5 implementation contained in GRFID is under the zlib license.
235 (license (list license:gpl2 license:gpl2+ license:zlib))))
236
237 (define-public catcodec
238 (package
239 (name "catcodec")
240 (version "1.0.5")
241 (source
242 (origin
243 (method url-fetch)
244 (uri (string-append "https://binaries.openttd.org/extra/catcodec/"
245 version "/catcodec-" version "-source.tar.xz"))
246 (sha256
247 (base32
248 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
249 (build-system gnu-build-system)
250 (arguments
251 `(#:tests? #f ; no tests
252 #:make-flags (list (string-append "prefix=" %output))
253 #:phases (modify-phases %standard-phases
254 (delete 'configure))))
255 (home-page "http://dev.openttdcoop.org/projects/catcodec")
256 (synopsis "Encode/decode OpenTTD sounds")
257 (description "catcodec encodes and decodes sounds for OpenTTD. These
258 sounds are not much more than some metadata (description and filename) and raw
259 PCM data.")
260 (license license:gpl2)))
261
262 (define-public gzochi
263 (package
264 (name "gzochi")
265 (version "0.12")
266 (source (origin
267 (method url-fetch)
268 (uri (string-append "mirror://savannah/gzochi/gzochi-"
269 version ".tar.gz"))
270 (sha256
271 (base32
272 "0h8yvk7154kd8zdfa9nqy73blrjq2x19kv305jcnwlmm09vvss59"))))
273 (build-system gnu-build-system)
274 (arguments
275 '(#:phases (modify-phases %standard-phases
276 (add-before 'build 'no-Werror
277 (lambda _
278 ;; Don't abort builds due to things like GLib
279 ;; deprecation warnings.
280 (substitute* (find-files "." "^Makefile\\.in$")
281 (("-Werror") ""))
282 #t)))))
283 (native-inputs `(("pkgconfig" ,pkg-config)))
284 (inputs `(("bdb" ,bdb)
285 ("glib" ,glib)
286 ("guile" ,guile-2.2)
287 ("libmicrohttpd" ,libmicrohttpd)
288 ("ncurses" ,ncurses)
289 ("sdl" ,sdl)
290 ("zlib" ,zlib)))
291 (home-page "https://www.nongnu.org/gzochi/")
292 (synopsis "Scalable middleware for multiplayer games")
293 (description
294 "gzochi is a framework for developing massively multiplayer online games.
295 A server container provides services to deployed games, which are written in
296 Guile Scheme, that abstract and simplify some of the most challenging and
297 error-prone aspects of online game development: Concurrency, data persistence,
298 and network communications. A very thin client library can be embedded to
299 provide connectivity for client applications written in any language.")
300 (license license:gpl3+)))
301
302 (define-public nml
303 (package
304 (name "nml")
305 (version "0.4.5")
306 (source
307 (origin
308 (method url-fetch)
309 (uri (string-append "http://bundles.openttdcoop.org/nml/releases/"
310 version "/nml-" version ".tar.gz"))
311 (sha256
312 (base32
313 "1pmvvm3sgnpngfa7884mqhq3fwdjh9sr0ca07ypnidcg0y341w53"))))
314 (build-system python-build-system)
315 (propagated-inputs
316 `(("python-pillow" ,python-pillow)
317 ("python-ply" ,python-ply)))
318 (home-page "https://dev.openttdcoop.org/projects/nml")
319 (synopsis "NML compiler")
320 (description
321 "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
322 compiling NML files (along with their associated language, sound and graphic
323 files) into @file{.grf} and/or @file{.nfo} files.")
324 (license license:gpl2+)))
325
326 (define-public python-sge-pygame
327 (package
328 (name "python-sge-pygame")
329 (version "1.5.1")
330 (source
331 (origin
332 (method url-fetch)
333 (uri (string-append "mirror://savannah/stellarengine/"
334 (version-major+minor version) "/sge-pygame-"
335 version ".tar.gz"))
336 (file-name (string-append name "-" version ".tar.gz"))
337 (sha256
338 (base32
339 "1rl3xjzh78sl0sq3xl8rl7cgp9v9v3h7s2pfwn7nj1vrmffzkcpd"))))
340 (build-system python-build-system)
341 (propagated-inputs
342 `(("python-pygame" ,python-pygame)
343 ("python-six" ,python-six)
344 ("python-uniseg" ,python-uniseg)))
345 (home-page "http://stellarengine.nongnu.org")
346 (synopsis "2D game engine for Python")
347 (description
348 "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
349 general-purpose 2D game engine. It takes care of several details for you so
350 you can focus on the game itself. This makes more rapid game development
351 possible, and it also makes the SGE easy to learn.")
352 (license license:lgpl3+)))
353
354 (define-public python2-sge-pygame
355 (package-with-python2 python-sge-pygame))
356
357 (define-public python-tmx
358 (package
359 (name "python-tmx")
360 (version "1.10")
361 (source
362 (origin
363 (method url-fetch)
364 (uri (string-append "mirror://savannah/python-tmx/"
365 (version-major+minor version) "/tmx-"
366 version ".tar.gz"))
367 (sha256
368 (base32
369 "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0"))))
370 (build-system python-build-system)
371 (propagated-inputs
372 `(("python-six" ,python-six)))
373 (home-page "http://python-tmx.nongnu.org")
374 (synopsis "Python library for the @code{Tiled} TMX format")
375 (description
376 "Python TMX reads and writes the @code{Tiled} TMX format in a simple way.
377 This is useful for map editors or generic level editors, and it's also useful
378 for using a map editor or generic level editor like Tiled to edit your game's
379 levels.")
380 (license (list license:asl2.0
381 ;; Documentation (only available in the source tarball) is
382 ;; under the CC0 license.
383 license:cc0))))
384
385 (define-public python2-tmx
386 (let ((python2-tmx (package-with-python2 python-tmx)))
387 (package
388 (inherit python2-tmx)
389 (propagated-inputs
390 `(("python2-pathlib" ,python2-pathlib)
391 ,@(package-propagated-inputs python2-tmx))))))
392
393 (define-public python-xsge
394 (package
395 (name "python-xsge")
396 (version "2018.02.26")
397 (source (origin
398 (method url-fetch)
399 (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
400 version ".tar.gz"))
401 (sha256
402 (base32
403 "0bx93hgf7cgdw2gsygbh59y8vpw37pgsa279rajw3fkdpl8vrc40"))))
404 (build-system python-build-system)
405 (arguments
406 '(#:phases
407 (modify-phases %standard-phases
408 ;; xSGE's setup.py script does not support one of the Python build
409 ;; system's default flags, "--single-version-externally-managed".
410 (replace 'install
411 (lambda* (#:key outputs #:allow-other-keys)
412 (invoke "python" "setup.py" "install"
413 (string-append "--prefix=" (assoc-ref outputs "out"))
414 "--root=/"))))
415 #:tests? #f)) ; no check target
416 (propagated-inputs
417 `(("python-sge-pygame" ,python-sge-pygame)
418 ("python-pygame" ,python-pygame)
419 ("python-six" ,python-six)
420 ("python-tmx" ,python-tmx)))
421 (home-page "http://xsge.nongnu.org")
422 (synopsis "Extensions for the SGE Game Engine")
423 (description
424 "xSGE is a collection of modules that make doing certain tasks with the SGE
425 Game Engine easier. In addition to SGE's conveniences, the user has access to a
426 GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
427 support.")
428 (license license:gpl3+)))
429
430 (define-public python2-xsge
431 (package-with-python2 python-xsge))
432
433 (define-public tiled
434 (package
435 (name "tiled")
436 (version "1.2.3")
437 (source (origin
438 (method git-fetch)
439 (uri (git-reference
440 (url "https://github.com/bjorn/tiled.git")
441 (commit (string-append "v" version))))
442 (file-name (git-file-name name version))
443 (sha256
444 (base32
445 "1nfyigfkl10n9r82p1qxhpr09jn2kwalh9n5r209bcaj8dxspph8"))))
446 (build-system gnu-build-system)
447 (inputs
448 `(("qtbase" ,qtbase)
449 ("qtsvg" ,qtsvg)
450 ("zlib" ,zlib)))
451 (native-inputs
452 `(("qttools" ,qttools)))
453 (arguments
454 '(#:phases
455 (modify-phases %standard-phases
456 (replace 'configure
457 (lambda* (#:key inputs outputs #:allow-other-keys)
458 (substitute* "translations/translations.pro"
459 (("LRELEASE =.*")
460 (string-append "LRELEASE = "
461 (assoc-ref inputs "qttools")
462 "/bin/lrelease\n")))
463 (let ((out (assoc-ref outputs "out")))
464 (invoke "qmake"
465 (string-append "PREFIX=" out))))))))
466 (home-page "http://www.mapeditor.org/")
467 (synopsis "Tile map editor")
468 (description
469 "Tiled is a general purpose tile map editor. It is meant to be used for
470 editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
471 clone.")
472
473 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
474 ;; under BSD-2.
475 (license license:gpl2+)))
476
477 (define-public sfml
478 (package
479 (name "sfml")
480 (version "2.5.1")
481 (source (origin
482 (method git-fetch)
483 ;; Do not fetch the archives from
484 ;; http://mirror0.sfml-dev.org/files/ because files there seem
485 ;; to be changed in place.
486 (uri (git-reference
487 (url "https://github.com/SFML/SFML.git")
488 (commit version)))
489 (file-name (git-file-name name version))
490 (sha256
491 (base32
492 "0abr8ri2ssfy9ylpgjrr43m6rhrjy03wbj9bn509zqymifvq5pay"))
493 (modules '((guix build utils)))
494 (snippet
495 '(begin
496 ;; Ensure system libraries are used.
497 (delete-file-recursively "extlibs")
498 #t))))
499 (build-system cmake-build-system)
500 (arguments
501 '(#:configure-flags
502 (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE"
503 "-DSFML_OS_PKGCONFIG_DIR=lib/pkgconfig")
504 #:tests? #f)) ; no tests
505 (native-inputs
506 `(("pkg-config" ,pkg-config)))
507 (inputs
508 `(("mesa" ,mesa)
509 ("glew" ,glew)
510 ("libx11" ,libx11)
511 ("xcb-util-image" ,xcb-util-image)
512 ("libxrandr" ,libxrandr)
513 ("eudev" ,eudev)
514 ("libjpeg" ,libjpeg)
515 ("libsndfile" ,libsndfile)
516 ("stb-image" ,stb-image)
517 ("stb-image-write" ,stb-image-write)))
518 (propagated-inputs
519 ;; In Requires.private of pkg-config files.
520 `(("flac" ,flac)
521 ("freetype" ,freetype)
522 ("libvorbis" ,libvorbis)
523 ("openal" ,openal)))
524 (home-page "https://www.sfml-dev.org")
525 (synopsis "Simple and Fast Multimedia Library")
526 (description
527 "SFML provides a simple interface to the various computer components,
528 to ease the development of games and multimedia applications. It is composed
529 of five modules: system, window, graphics, audio and network.")
530 (license license:zlib)))
531
532 (define-public sfxr
533 (package
534 (name "sfxr")
535 (version "1.2.1")
536 (source (origin
537 (method url-fetch)
538 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
539 (sha256
540 (base32
541 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
542 (build-system gnu-build-system)
543 (arguments
544 `(#:phases (modify-phases %standard-phases
545 (delete 'configure) ; no configure script
546 (add-before 'build 'patch-makefile
547 (lambda* (#:key outputs #:allow-other-keys)
548 (let ((out (assoc-ref outputs "out")))
549 (substitute* "Makefile"
550 (("\\$\\(DESTDIR\\)/usr") out))
551 (substitute* "main.cpp"
552 (("/usr/share")
553 (string-append out "/share")))
554 #t))))
555 #:tests? #f)) ; no tests
556 (native-inputs
557 `(("pkg-config" ,pkg-config)
558 ("desktop-file-utils" ,desktop-file-utils)))
559 (inputs
560 `(("sdl" ,sdl)
561 ("gtk+" ,gtk+)))
562 (synopsis "Simple sound effect generator")
563 (description "Sfxr is a tool for quickly generating simple sound effects.
564 Originally created for use in video game prototypes, it can generate random
565 sounds from presets such as \"explosion\" or \"powerup\".")
566 (home-page "http://www.drpetter.se/project_sfxr.html")
567 (license license:expat)))
568
569 (define-public physfs
570 (package
571 (name "physfs")
572 (version "3.0.2")
573 (source (origin
574 (method url-fetch)
575 (uri (string-append
576 "https://icculus.org/physfs/downloads/physfs-"
577 version ".tar.bz2"))
578 (file-name (string-append name "-" version ".tar.gz"))
579 (sha256
580 (base32
581 "0qzqz4r88gvd8m7sh2z5hvqcr0jfr4wb2f77c19xycyn0rigfk9h"))))
582 (build-system cmake-build-system)
583 (arguments
584 '(#:tests? #f ; no check target
585 #:phases (modify-phases %standard-phases
586 (add-after 'unpack 'patch-CMakeLists.txt
587 (lambda _
588 (substitute* "CMakeLists.txt"
589 ;; XXX: For some reason CMakeLists.txt disables
590 ;; RUNPATH manipulation when the compiler is GCC.
591 (("CMAKE_COMPILER_IS_GNUCC") "FALSE"))
592 #t)))))
593 (inputs
594 `(("zlib" ,zlib)))
595 (native-inputs
596 `(("doxygen" ,doxygen)))
597 (home-page "https://icculus.org/physfs")
598 (synopsis "File system abstraction library")
599 (description
600 "PhysicsFS is a library to provide abstract access to various archives.
601 It is intended for use in video games. For security, no file writing done
602 through the PhysicsFS API can leave a defined @emph{write directory}. For
603 file reading, a @emph{search path} with archives and directories is defined,
604 and it becomes a single, transparent hierarchical file system. So archive
605 files can be accessed in the same way as you access files directly on a disk,
606 and it makes it easy to ship a new archive that will override a previous
607 archive on a per-file basis.")
608 (license license:zlib)))
609
610 (define-public love
611 (package
612 (name "love")
613 (version "11.1")
614 (source (origin
615 (method url-fetch)
616 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
617 "love-" version "-linux-src.tar.gz"))
618 (sha256
619 (base32
620 "1pkwiszmjs0xrwk0wqbc5cp9108b1y8gwsid0gqk1s0x09q9lpmw"))))
621 (build-system gnu-build-system)
622 (native-inputs
623 `(("pkg-config" ,pkg-config)))
624 (inputs
625 `(("devil" ,devil)
626 ("freetype" ,freetype)
627 ("libmodplug" ,libmodplug)
628 ("libtheora" ,libtheora)
629 ("libvorbis" ,libvorbis)
630 ("luajit" ,luajit)
631 ("mesa" ,mesa)
632 ("mpg123" ,mpg123)
633 ("openal" ,openal)
634 ("physfs" ,physfs)
635 ("sdl2" ,sdl2)
636 ("zlib" ,zlib)))
637 (synopsis "2D game framework for Lua")
638 (description "LÖVE is a framework for making 2D games in the Lua
639 programming language.")
640 (home-page "https://love2d.org/")
641 (license license:zlib)))
642
643 (define-public allegro-4
644 (package
645 (name "allegro")
646 (version "4.4.3")
647 (source (origin
648 (method url-fetch)
649 (uri (string-append "https://github.com/liballeg/allegro5/"
650 "releases/download/" version "/allegro-"
651 version ".tar.gz"))
652 (sha256
653 (base32
654 "1d5ws3ihvpa6f4qc6a6drq31pajw6bblxifr4kcxzqj9br1nw28y"))))
655 (build-system cmake-build-system)
656 (arguments
657 '(#:phases
658 (modify-phases %standard-phases
659 (add-after 'unpack 'patch-build-system
660 (lambda _
661 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
662 ;; via a command line option doesn't work because it is
663 ;; unconditionally clobbered in the build script.
664 (substitute* '("CMakeLists.txt")
665 (("ADDON_LINKAGE STATIC")
666 "ADDON_LINKAGE SHARED"))
667 #t)))))
668 (inputs
669 `(("glu" ,glu)
670 ("libpng" ,libpng)
671 ("libvorbis" ,libvorbis)
672 ("mesa" ,mesa)
673 ("zlib" ,zlib)))
674 (synopsis "Game programming library")
675 (description "Allegro is a library mainly aimed at video game and
676 multimedia programming. It handles common, low-level tasks such as creating
677 windows, accepting user input, loading data, drawing images, playing sounds,
678 etc.")
679 (home-page "http://liballeg.org")
680 (license license:giftware)))
681
682 (define-public allegro
683 (package
684 (name "allegro")
685 (version "5.2.4.0")
686 (source (origin
687 (method url-fetch)
688 (uri (string-append "https://github.com/liballeg/allegro5/releases"
689 "/download/" version "/allegro-"
690 version ".tar.gz"))
691 (patches (search-patches
692 "allegro-mesa-18.2.5-and-later.patch"))
693 (sha256
694 (base32
695 "1w9a5yqi5q03b2qvmx5ff90paz0xbr9cy7i7f0xiqa65ava66q9l"))))
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 url-fetch)
1041 (uri
1042 (string-append "https://github.com/MyGUI/" name
1043 "/archive/MyGUI" version ".tar.gz"))
1044 (sha256
1045 (base32
1046 "13x7cydmj7gjmsg702sqjbfi53z265iv6j7binv3r6a7ibndfa0a"))))
1047 (build-system cmake-build-system)
1048 (arguments
1049 '(#:tests? #f ; No test target
1050 #:configure-flags
1051 (list "-DMYGUI_INSTALL_DOCS=TRUE"
1052 (string-append "-DOGRE_INCLUDE_DIR="
1053 (assoc-ref %build-inputs "ogre")
1054 "/include/OGRE"))))
1055 (native-inputs
1056 `(("boost" ,boost)
1057 ("doxygen" ,doxygen)
1058 ("pkg-config" ,pkg-config)))
1059 (inputs
1060 `(("font-dejavu" ,font-dejavu)
1061 ("freetype" ,freetype)
1062 ("graphviz" ,graphviz)
1063 ("libx11" ,libx11)
1064 ("ogre" ,ogre)
1065 ("ois" ,ois)))
1066 (synopsis "Fast, flexible and simple GUI")
1067 (description
1068 "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games
1069 and 3D applications. The main goals of mygui are: speed, flexibility and ease
1070 of use.")
1071 (home-page "http://mygui.info/")
1072 (license license:expat)))
1073
1074 (define-public openmw
1075 (package
1076 (name "openmw")
1077 (version "0.44.0")
1078 (source
1079 (origin
1080 (method url-fetch)
1081 (uri
1082 (string-append "https://github.com/OpenMW/openmw/archive/"
1083 name "-" version ".tar.gz"))
1084 (sha256
1085 (base32
1086 "03fgm2f2r7y0aqlgp038pdlnllgvm3jimrp968p4nhz1sffvjzcy"))))
1087 (build-system cmake-build-system)
1088 (arguments
1089 `(#:tests? #f ; No test target
1090 #:configure-flags
1091 (list "-DDESIRED_QT_VERSION=5")))
1092 (native-inputs
1093 `(("boost" ,boost)
1094 ("doxygen" ,doxygen)
1095 ("pkg-config" ,pkg-config)))
1096 (inputs
1097 `(("bullet" ,bullet)
1098 ("ffmpeg" ,ffmpeg)
1099 ("libxt" ,libxt)
1100 ("mygui" ,mygui)
1101 ("openal" ,openal)
1102 ("openscenegraph" ,openscenegraph)
1103 ("qtbase" ,qtbase)
1104 ("sdl" ,sdl2)
1105 ("unshield" ,unshield)))
1106 (synopsis "Re-implementation of the RPG Morrowind engine")
1107 (description
1108 "OpenMW is a game engine which reimplements and extends the one that runs
1109 the 2002 open-world RPG Morrowind. The engine comes with its own editor,
1110 called OpenMW-CS which allows the user to edit or create their own original
1111 games.")
1112 (home-page "https://openmw.org")
1113 (license license:gpl3)))
1114
1115 (define-public godot
1116 (package
1117 (name "godot")
1118 (version "3.0.6")
1119 (source (origin
1120 (method git-fetch)
1121 (uri (git-reference
1122 (url "https://github.com/godotengine/godot")
1123 (commit (string-append version "-stable"))))
1124 (file-name (git-file-name name version))
1125 (sha256
1126 (base32
1127 "0g64h0x8dlv6aa9ggfcidk2mknkfl5li7z1phcav8aqp9srj8avf"))
1128 (modules '((guix build utils)))
1129 (snippet
1130 '(begin
1131 ;; Drop libraries that we take from Guix. Note that some
1132 ;; of these may be modified; see "thirdparty/README.md".
1133 (with-directory-excursion "thirdparty"
1134 (for-each delete-file-recursively
1135 '("freetype"
1136 "libogg"
1137 "libpng"
1138 "libtheora"
1139 "libvorbis"
1140 "libvpx"
1141 "libwebp"
1142 "openssl"
1143 "opus"
1144 "zlib"))
1145 #t)))))
1146 (build-system scons-build-system)
1147 (arguments
1148 `(#:scons ,scons-python2
1149 #:scons-flags (list "platform=x11"
1150 ,@(if (string-prefix? "aarch64" (or (%current-target-system)
1151 (%current-system)))
1152 `("CCFLAGS=-DNO_THREADS")
1153 '())
1154 ;; Avoid using many of the bundled libs.
1155 ;; Note: These options can be found in the SConstruct file.
1156 "builtin_freetype=no"
1157 "builtin_glew=no"
1158 "builtin_libmpdec=no"
1159 "builtin_libogg=no"
1160 "builtin_libpng=no"
1161 "builtin_libtheora=no"
1162 "builtin_libvorbis=no"
1163 "builtin_libvpx=no"
1164 "builtin_libwebp=no"
1165 "builtin_openssl=no"
1166 "builtin_opus=no"
1167 "builtin_zlib=no")
1168 #:tests? #f ; There are no tests
1169 #:phases
1170 (modify-phases %standard-phases
1171 (add-after 'unpack 'scons-use-env
1172 (lambda _
1173 ;; Scons does not use the environment variables by default,
1174 ;; but this substitution makes it do so.
1175 (substitute* "SConstruct"
1176 (("env_base = Environment\\(tools=custom_tools\\)")
1177 (string-append
1178 "env_base = Environment(tools=custom_tools)\n"
1179 "env_base = Environment(ENV=os.environ)")))
1180 #t))
1181 (replace 'install
1182 (lambda* (#:key outputs #:allow-other-keys)
1183 (let* ((out (assoc-ref outputs "out"))
1184 (bin (string-append out "/bin")))
1185 (with-directory-excursion "bin"
1186 (if (file-exists? "godot.x11.tools.64")
1187 (rename-file "godot.x11.tools.64" "godot")
1188 (rename-file "godot.x11.tools.32" "godot"))
1189 (install-file "godot" bin))
1190 #t)))
1191 (add-after 'install 'install-godot-desktop
1192 (lambda* (#:key outputs #:allow-other-keys)
1193 (let* ((out (assoc-ref outputs "out"))
1194 (desktop (string-append out "/share/applications"))
1195 (icon-dir (string-append out "/share/pixmaps")))
1196 (rename-file "icon.png" "godot.png")
1197 (install-file "godot.png" icon-dir)
1198 (mkdir-p desktop)
1199 (with-output-to-file
1200 (string-append desktop "/godot.desktop")
1201 (lambda _
1202 (format #t
1203 "[Desktop Entry]~@
1204 Name=godot~@
1205 Comment=The godot game engine~@
1206 Exec=~a/bin/godot~@
1207 TryExec=~@*~a/bin/godot~@
1208 Icon=godot~@
1209 Type=Application~%"
1210 out)))
1211 #t))))))
1212 (native-inputs `(("pkg-config" ,pkg-config)))
1213 (inputs `(("alsa-lib" ,alsa-lib)
1214 ("freetype" ,freetype)
1215 ("glew" ,glew)
1216 ("glu" ,glu)
1217 ("libtheora" ,libtheora)
1218 ("libvorbis" ,libvorbis)
1219 ("libvpx" ,libvpx)
1220 ("libwebp" ,libwebp)
1221 ("libx11" ,libx11)
1222 ("libxcursor" ,libxcursor)
1223 ("libxi" ,libxi)
1224 ("libxinerama" ,libxinerama)
1225 ("libxrandr" ,libxrandr)
1226 ("mesa" ,mesa)
1227 ("openssl" ,openssl)
1228 ("opusfile" ,opusfile)
1229 ("pulseaudio" ,pulseaudio)))
1230 (home-page "https://godotengine.org/")
1231 (synopsis "Advanced 2D and 3D game engine")
1232 (description
1233 "Godot is an advanced multi-platform game engine written in C++. If
1234 features design tools such as a visual editor, can import 3D models and
1235 provide high-quality 3D rendering, it contains an animation editor, and can be
1236 scripted in a Python-like language.")
1237 (license license:expat)))
1238
1239 (define-public eureka
1240 (package
1241 (name "eureka")
1242 (version "1.24")
1243 (source (origin
1244 (method url-fetch)
1245 (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/"
1246 version "/eureka-"
1247 ;; version without dots e.g 1.21 => 121
1248 (string-join (string-split version #\.) "")
1249 "-source.tar.gz"))
1250 (sha256
1251 (base32
1252 "1x4idjniz9sma3j9ss6ni7fafmz22zs2jnpsqw4my9rsnmra5d9v"))))
1253 (build-system gnu-build-system)
1254 (arguments
1255 '(#:tests? #f
1256 #:make-flags
1257 (let ((out (assoc-ref %outputs "out")))
1258 (list (string-append "PREFIX=" out)))
1259 #:phases
1260 (modify-phases %standard-phases
1261 (delete 'configure)
1262 (add-before 'build 'prepare-install-directories
1263 (lambda* (#:key outputs #:allow-other-keys)
1264 (let ((out (assoc-ref outputs "out")))
1265 (mkdir-p (string-append out "/bin"))
1266 (mkdir-p (string-append out "/share"))
1267
1268 (with-fluids ((%default-port-encoding #f))
1269 (substitute* "./src/main.cc"
1270 (("/usr/local") out)))
1271
1272 (substitute* "Makefile"
1273 (("-o root") ""))))))))
1274 (inputs `(("mesa" ,mesa)
1275 ("libxft" ,libxft)
1276 ("libxinerama" ,libxinerama)
1277 ("libfontconfig" ,fontconfig)
1278 ("libjpeg" ,libjpeg)
1279 ("libpng" ,libpng)
1280 ("fltk" ,fltk)
1281 ("zlib" ,zlib)))
1282 (native-inputs `(("pkg-config" ,pkg-config)
1283 ("xdg-utils" ,xdg-utils)))
1284 (synopsis "Doom map editor")
1285 (description "Eureka is a map editor for the classic DOOM games, and a few
1286 related games such as Heretic and Hexen. It comes with a 3d preview mode and
1287 a 2D editor view.")
1288 (home-page "http://eureka-editor.sourceforge.net/")
1289 (license license:gpl2+)))
1290
1291 (define-public guile-chickadee
1292 (package
1293 (name "guile-chickadee")
1294 (version "0.3.0")
1295 (source (origin
1296 (method url-fetch)
1297 (uri (string-append "https://files.dthompson.us/chickadee/"
1298 "chickadee-" version ".tar.gz"))
1299 (sha256
1300 (base32
1301 "0jl223dybsj5gvs7z4q60gnafj1b7kgi5mx0kj58m5knrp8qwg5h"))))
1302 (build-system gnu-build-system)
1303 (arguments
1304 '(#:make-flags '("GUILE_AUTO_COMPILE=0")
1305 #:phases
1306 (modify-phases %standard-phases
1307 (add-before 'configure 'patch-godir
1308 (lambda _
1309 ;; Install compiled '.go' files into the site directory.
1310 (substitute* "Makefile.in"
1311 (("/ccache") "/site-ccache")))))))
1312 (propagated-inputs
1313 `(("guile-opengl" ,guile-opengl)
1314 ("guile-sdl2" ,guile-sdl2)))
1315 (inputs
1316 `(("guile" ,guile-2.2)))
1317 (native-inputs
1318 `(("pkg-config" ,pkg-config)
1319 ("texinfo" ,texinfo)))
1320 (home-page "https://dthompson.us/projects/chickadee.html")
1321 (synopsis "Game development toolkit for Guile Scheme with SDL2 and OpenGL")
1322 (description "Chickadee is a game development toolkit for Guile Scheme
1323 built on top of SDL2 and OpenGL. Chickadee aims to provide all the features
1324 that parenthetically inclined game developers need to make 2D (and eventually
1325 3D) games in Scheme, such as:
1326
1327 @enumerate
1328 @item extensible, fixed-timestep game loop
1329 @item OpenGL-based rendering engine
1330 @item keyboard, mouse, controller input
1331 @item REPL-driven development model
1332 @end enumerate\n")
1333 (license license:gpl3+)))
1334
1335 (define-public bennu-game-development
1336 (package
1337 (name "bennu-game-development")
1338 (version "348")
1339 (source (origin
1340 (method svn-fetch)
1341 (uri (svn-reference
1342 (url "http://svn.code.sf.net/p/bennugd/code")
1343 (revision (string->number version))))
1344 (file-name (string-append name "-" version))
1345 (sha256
1346 (base32
1347 "0wpzsbh4zi3931493dnyl5ffmh1b7fj2sx3mzrq304z9zs4d6lqq"))
1348 (modules '((guix build utils)))
1349 (snippet
1350 '(begin
1351 (delete-file-recursively "3rdparty") #t))))
1352 (build-system gnu-build-system)
1353 (arguments
1354 '(#:phases
1355 (modify-phases %standard-phases
1356 (add-after 'unpack 'patch-configure-to-use-openssl
1357 (lambda* (#:key outputs #:allow-other-keys)
1358 (chdir "core")
1359 (delete-file "configure")
1360 (substitute* "configure.in"
1361 (("i\\*86\\)")
1362 "*)
1363 COMMON_CFLAGS=\"$COMMON_CFLAGS -DUSE_OPENSSL\"
1364 COMMON_LDFLAGS=\"$COMMON_LDFLAGS\"
1365 LIBSSL=\"crypto\"
1366 USE_OPENSSL=yes
1367 ;;
1368
1369 i*86)"))
1370 #t)))))
1371 (inputs `(("openssl" ,openssl)
1372 ("zlib" ,zlib)))
1373 (native-inputs `(("pkg-config" ,pkg-config)
1374 ("autoconf" ,autoconf)
1375 ("automake" ,automake)
1376 ("libtool" ,libtool)))
1377 (synopsis "Programming language to create games")
1378 (description "Bennu Game Development, also known as bennudg, is a
1379 programming language tailored at game development. It is the successor of
1380 Fenix.")
1381 (home-page "https://sourceforge.net/projects/bennugd/")
1382 (license license:zlib)))
1383
1384 (define-public bennu-game-development-modules
1385 (package
1386 (inherit bennu-game-development)
1387 (name "bennu-game-development-modules")
1388 (arguments
1389 '(#:phases
1390 (modify-phases %standard-phases
1391 (add-after 'unpack 'patch-conflicting-definitions
1392 (lambda _
1393 (with-fluids ((%default-port-encoding #f))
1394 (substitute* "core/include/fmath.h"
1395 (("extern fixed fmul\\( int x, int y \\);") "")
1396 (("extern fixed fdiv\\( int x, int y \\);") "")))
1397 (chdir "modules"))))))
1398 (inputs `(("zlib" ,zlib)
1399 ("libpng" ,libpng)
1400 ("openssl" ,openssl)
1401 ("sdl-mixer" ,sdl-mixer)
1402 ("bennu-game-development" ,bennu-game-development)))
1403 (synopsis "Modules for the Bennu Game Developement programming language")
1404 (description "This package contains a collection of modules for the Bennu
1405 Game Developement programming language, from CD handling through SDL to
1406 joystick support.")))