gnu: foo2zjs: Update to 20171202.
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
CommitLineData
6cb89466
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
f586c877 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
c24fff61 4;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
0f6139b1 5;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
68c6110c 6;;; Copyright © 2015, 2016, 2017 David Thompson <davet@gnu.org>
82654d95 7;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
3c8ba11a 8;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
19d311b4 9;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
a812aff9 10;;; Copyright © 2016, 2017 Julian Graham <joolean@gmail.com>
167f0e82 11;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
42d0d13d 12;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
194b4e7d 13;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
3c399e9b 14;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
0ea2364f 15;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
6cb89466
16;;;
17;;; This file is part of GNU Guix.
18;;;
19;;; GNU Guix is free software; you can redistribute it and/or modify it
20;;; under the terms of the GNU General Public License as published by
21;;; the Free Software Foundation; either version 3 of the License, or (at
22;;; your option) any later version.
23;;;
24;;; GNU Guix is distributed in the hope that it will be useful, but
25;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27;;; GNU General Public License for more details.
28;;;
29;;; You should have received a copy of the GNU General Public License
30;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32(define-module (gnu packages game-development)
b0910aad 33 #:use-module ((guix licenses) #:prefix license:)
6cb89466
34 #:use-module (guix packages)
35 #:use-module (guix download)
2a068aec 36 #:use-module (guix git-download)
be4d26f5 37 #:use-module (guix utils)
6cb89466 38 #:use-module (guix build-system cmake)
b0910aad 39 #:use-module (guix build-system gnu)
4bc37bf0 40 #:use-module (guix build-system python)
92b51d12 41 #:use-module (guix build-system scons)
b0910aad 42 #:use-module (gnu packages)
c608fe8c 43 #:use-module (gnu packages autotools)
94a66dd9 44 #:use-module (gnu packages boost)
2a068aec 45 #:use-module (gnu packages curl)
c24fff61 46 #:use-module (gnu packages databases)
99828fa7 47 #:use-module (gnu packages documentation)
531003be 48 #:use-module (gnu packages fltk)
42d0d13d 49 #:use-module (gnu packages fonts)
d2cc38b7 50 #:use-module (gnu packages fontutils)
324b0040 51 #:use-module (gnu packages freedesktop)
d2cc38b7 52 #:use-module (gnu packages fribidi)
c24fff61
JG
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gnunet)
42d0d13d
MR
55 #:use-module (gnu packages graphics)
56 #:use-module (gnu packages graphviz)
c24fff61 57 #:use-module (gnu packages guile)
c608fe8c 58 #:use-module (gnu packages m4)
c24fff61 59 #:use-module (gnu packages multiprecision)
4bc37bf0 60 #:use-module (gnu packages music)
c24fff61 61 #:use-module (gnu packages ncurses)
4bc37bf0 62 #:use-module (gnu packages python)
b0910aad 63 #:use-module (gnu packages qt)
4bc37bf0 64 #:use-module (gnu packages video)
5809ffcc 65 #:use-module (gnu packages compression)
5809ffcc
DT
66 #:use-module (gnu packages gl)
67 #:use-module (gnu packages linux)
68 #:use-module (gnu packages xorg)
2a068aec 69 #:use-module (gnu packages xdisorg)
5809ffcc
DT
70 #:use-module (gnu packages fontutils)
71 #:use-module (gnu packages image)
72 #:use-module (gnu packages audio)
d620ea88
DT
73 #:use-module (gnu packages pulseaudio)
74 #:use-module (gnu packages gnome)
75 #:use-module (gnu packages gtk)
76 #:use-module (gnu packages sdl)
240f2785 77 #:use-module (gnu packages pkg-config)
83a4a70b
DT
78 #:use-module (gnu packages xiph)
79 #:use-module (gnu packages lua)
2a068aec 80 #:use-module (gnu packages mp3)
194b4e7d
PM
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages tls))
6cb89466
83
84(define-public bullet
85 (package
86 (name "bullet")
fd22791e 87 (version "2.86.1")
6cb89466
88 (source (origin
89 (method url-fetch)
937bc2d1
EF
90 (uri (string-append "https://github.com/bulletphysics/bullet3/"
91 "archive/" version ".tar.gz"))
92 (file-name (string-append name "-" version ".tar.gz"))
6cb89466
93 (sha256
94 (base32
fd22791e 95 "0nghzcl84p8di215p7xj0gy1hyy072hw2xk9cnmav9hv6bjb4n60"))))
6cb89466 96 (build-system cmake-build-system)
937bc2d1
EF
97 (arguments
98 '(#:configure-flags (list (string-append
99 "-DBUILD_SHARED_LIBS=ON "
100 "-DCMAKE_CXX_FLAGS=-fPIC "
101 (or (getenv "CXXFLAGS") "")))))
102 (inputs
103 `(("glu" ,glu)
104 ("libx11" ,libx11)
105 ("mesa" ,mesa)))
6cb89466
106 (home-page "http://bulletphysics.org/")
107 (synopsis "3D physics engine library")
108 (description
109 "Bullet is a physics engine library usable for collision detection. It
110is used in some video games and movies.")
b0910aad
DT
111 (license license:zlib)))
112
1a0c4437
KK
113(define-public deutex
114 (package
115 (name "deutex")
63dc7638 116 (version "5.1.0")
1a0c4437
KK
117 (source (origin
118 (method url-fetch)
119 (uri (string-append "https://github.com/Doom-Utils/" name
f7b60fdc
KK
120 "/releases/download/v" version "/"
121 name "-" version ".tar.xz"))
1a0c4437
KK
122 (sha256
123 (base32
63dc7638 124 "0hwkm0q2w16ddmiwh7x3jcfp58zjb40a5dh7c3sybwm9bar37pn1"))))
1a0c4437 125 (build-system gnu-build-system)
f7b60fdc 126 (native-inputs `(("asciidoc" ,asciidoc)))
1a0c4437
KK
127 (home-page "https://github.com/Doom-Utils/deutex")
128 (synopsis "WAD file composer for Doom and related games")
129 (description
130 "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be
131used to extract the lumps of a wad and save them as individual files.
132Conversely, it can also build a wad from separate files. When extracting a
133lump to a file, it does not just copy the raw data, it converts it to an
134appropriate format (such as PPM for graphics, Sun audio for samples, etc.).
135Conversely, when it reads files for inclusion in pwads, it does the necessary
136conversions (for example, from PPM to Doom picture format). In addition,
137DeuTex has functions such as merging wads, etc.")
138 (license license:gpl2+)))
139
94a66dd9
KK
140(define-public grfcodec
141 (package
142 (name "grfcodec")
143 (version "6.0.6")
144 (source (origin
145 (method url-fetch)
146 (uri (string-append "http://binaries.openttd.org/extra/"
147 name "/" version "/" name "-" version
148 "-source.tar.xz"))
149 (sha256
150 (base32
151 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
152 (build-system gnu-build-system)
153 (arguments
154 '(#:tests? #f ; no check target
155 #:phases
156 (modify-phases %standard-phases
157 (delete 'configure) ; no configure script
158 (replace 'install ; no install target
159 (lambda* (#:key outputs #:allow-other-keys)
160 (let* ((out (assoc-ref outputs "out"))
161 (bin (string-append out "/bin"))
162 (doc (string-append out "/share/doc"))
163 (man (string-append out "/share/man/man1")))
164 (for-each (lambda (file)
165 (install-file file bin))
166 '("grfcodec" "grfid" "grfstrip" "nforenum"))
167 (install-file "COPYING" doc)
168 (with-directory-excursion "docs"
169 (for-each (lambda (file)
170 (install-file (string-append file ".txt") doc))
171 '("auto_correct" "commands" "grf" "grfcodec" "grftut"
172 "readme" "readme.rpn"))
173 (for-each (lambda (file)
174 (install-file file man))
175 (find-files "." "\\.1"))))
176 #t)))))
177 (inputs
178 `(("boost" ,boost)
179 ("libpng" ,libpng)
180 ("zlib" ,zlib)))
181 (synopsis "GRF development tools")
182 (description
3d77785a 183 "The @dfn{Graphics Resource File} (GRF) development tools are a set of
94a66dd9
KK
184tools for developing (New)GRFs. It includes a number of smaller programs, each
185with a specific task:
186@enumerate
187@item @code{grfcodec} decodes and encodes GRF files for OpenTTD.
188@item @code{grfid} extracts the so-called \"GRF ID\" from a GRF.
189@item @code{grfstrip} strips all sprites from a GRF.
190@item @code{nforenum} checks NFO code for errors, making corrections when
191necessary.
192@end enumerate")
193 (home-page "http://dev.openttdcoop.org/projects/grfcodec")
194 ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
195 ;; NFORenum is under the GPL2+.
196 ;; The MD5 implementation contained in GRFID is under the zlib license.
197 (license (list license:gpl2 license:gpl2+ license:zlib))))
198
3c399e9b
AI
199(define-public catcodec
200 (package
201 (name "catcodec")
202 (version "1.0.5")
203 (source
204 (origin
205 (method url-fetch)
206 (uri (string-append "https://binaries.openttd.org/extra/catcodec/"
207 version "/catcodec-" version "-source.tar.xz"))
208 (sha256
209 (base32
210 "1qg0c2i4p29sxj0q6qp2jynlrzm5pphz2xhcjqlxa69ycrnlxzs7"))))
211 (build-system gnu-build-system)
212 (arguments
213 `(#:tests? #f ; no tests
214 #:make-flags (list (string-append "prefix=" %output))
215 #:phases (modify-phases %standard-phases
216 (delete 'configure))))
217 (home-page "http://dev.openttdcoop.org/projects/catcodec")
218 (synopsis "Encode/decode OpenTTD sounds")
219 (description "catcodec encodes and decodes sounds for OpenTTD. These
220sounds are not much more than some metadata (description and filename) and raw
221PCM data.")
222 (license license:gpl2)))
223
c24fff61
JG
224(define-public gzochi
225 (package
226 (name "gzochi")
a812aff9 227 (version "0.11.1")
c24fff61
JG
228 (source (origin
229 (method url-fetch)
230 (uri (string-append "mirror://savannah/gzochi/gzochi-"
231 version ".tar.gz"))
232 (sha256
233 (base32
a812aff9 234 "13j1m92zhxwkaaja3lg5x0h0b28mrrawdzk9d3hd19031akfxwb3"))))
c24fff61 235 (build-system gnu-build-system)
c24fff61
JG
236 (native-inputs `(("pkgconfig" ,pkg-config)))
237 (inputs `(("bdb" ,bdb)
238 ("glib" ,glib)
c24fff61
JG
239 ("guile" ,guile-2.0)
240 ("libmicrohttpd" ,libmicrohttpd)
241 ("ncurses" ,ncurses)
242 ("sdl" ,sdl)
243 ("zlib" ,zlib)))
244 (home-page "http://www.nongnu.org/gzochi/")
245 (synopsis "Scalable middleware for multiplayer games")
246 (description
247 "gzochi is a framework for developing massively multiplayer online games.
248A server container provides services to deployed games, which are written in
249Guile Scheme, that abstract and simplify some of the most challenging and
250error-prone aspects of online game development: Concurrency, data persistence,
251and network communications. A very thin client library can be embedded to
252provide connectivity for client applications written in any language.")
253 (license license:gpl3+)))
254
7357fcf2
KK
255(define-public nml
256 (package
257 (name "nml")
258 (version "0.4.4")
259 (source
260 (origin
261 (method url-fetch)
262 (uri (string-append "http://bundles.openttdcoop.org/nml/releases/"
263 version "/nml-" version ".tar.gz"))
264 (sha256
265 (base32
266 "0wk9ls5qyjwkra54rkj1gg94xbwzi7b84a5fh1ma1q7pbimi8rmg"))))
267 (build-system python-build-system)
268 (propagated-inputs
269 `(("python-pillow" ,python-pillow)
270 ("python-ply" ,python-ply)))
271 (home-page "http://dev.openttdcoop.org/projects/nml")
272 (synopsis "NML compiler")
273 (description
a7cbe727 274 "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
7357fcf2
KK
275compiling NML files (along with their associated language, sound and graphic
276files) into @file{.grf} and/or @file{.nfo} files.")
277 (license license:gpl2+)))
278
45f8e7f7
KK
279(define-public python-sge-pygame
280 (package
281 (name "python-sge-pygame")
b1d1a10c 282 (version "1.5.1")
45f8e7f7
KK
283 (source
284 (origin
285 (method url-fetch)
7f652029
KK
286 (uri (string-append "mirror://savannah/stellarengine/"
287 (version-major+minor version) "/sge-pygame-"
288 version ".tar.gz"))
289 (file-name (string-append name "-" version ".tar.gz"))
45f8e7f7
KK
290 (sha256
291 (base32
b1d1a10c 292 "1rl3xjzh78sl0sq3xl8rl7cgp9v9v3h7s2pfwn7nj1vrmffzkcpd"))))
45f8e7f7
KK
293 (build-system python-build-system)
294 (propagated-inputs
295 `(("python-pygame" ,python-pygame)
81353514
KK
296 ("python-six" ,python-six)
297 ("python-uniseg" ,python-uniseg)))
45f8e7f7
KK
298 (home-page "http://stellarengine.nongnu.org")
299 (synopsis "2D game engine for Python")
300 (description
301 "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
302general-purpose 2D game engine. It takes care of several details fro you so
303you can focus on the game itself. This makes more rapid game development
304possible, and it also makes the SGE easy to learn.")
305 (license license:lgpl3+)))
306
307(define-public python2-sge-pygame
308 (package-with-python2 python-sge-pygame))
309
1b775fd1
KK
310(define-public python-tmx
311 (package
312 (name "python-tmx")
95c1324a 313 (version "1.10")
1b775fd1
KK
314 (source
315 (origin
316 (method url-fetch)
be4d26f5
KK
317 (uri (string-append "mirror://savannah/python-tmx/"
318 (version-major+minor version) "/tmx-"
1b775fd1
KK
319 version ".tar.gz"))
320 (sha256
321 (base32
95c1324a 322 "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0"))))
1b775fd1
KK
323 (build-system python-build-system)
324 (propagated-inputs
325 `(("python-six" ,python-six)))
326 (home-page "http://python-tmx.nongnu.org")
327 (synopsis "Python library for the @code{Tiled} TMX format")
328 (description
329 "Python TMX reads and writes the @code{Tiled} TMX format in a simple way.
330This is useful for map editors or generic level editors, and it's also useful
331for using a map editor or generic level editor like Tiled to edit your game's
332levels.")
333 (license (list license:asl2.0
334 ;; Documentation (only available in the source tarball) is
335 ;; under the CC0 license.
336 license:cc0))))
337
338(define-public python2-tmx
339 (let ((python2-tmx (package-with-python2 python-tmx)))
340 (package
341 (inherit python2-tmx)
342 (propagated-inputs
343 `(("python2-pathlib" ,python2-pathlib)
344 ,@(package-propagated-inputs python2-tmx))))))
345
e99039b5
KK
346(define-public python-xsge
347 (package
348 (name "python-xsge")
cde208da 349 (version "2017.06.09")
e99039b5
KK
350 (source (origin
351 (method url-fetch)
795f3a00 352 (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
e99039b5
KK
353 version ".tar.gz"))
354 (sha256
355 (base32
cde208da 356 "1vy7c2y7ihvmggs93zgfv2h3049s384wid8a5snzrrba8bhbb89p"))))
e99039b5
KK
357 (build-system python-build-system)
358 (arguments
359 '(#:phases
360 (modify-phases %standard-phases
361 ;; xSGE's setup.py script does not support one of the Python build
362 ;; system's default flags, "--single-version-externally-managed".
363 (replace 'install
364 (lambda* (#:key outputs #:allow-other-keys)
365 (zero?
366 (system* "python" "setup.py" "install"
367 (string-append "--prefix=" (assoc-ref outputs "out"))
368 "--root=/")))))
369 #:tests? #f)) ; no check target
370 (propagated-inputs
371 `(("python-sge-pygame" ,python-sge-pygame)
372 ("python-pygame" ,python-pygame)
373 ("python-six" ,python-six)
374 ("python-tmx" ,python-tmx)))
375 (home-page "http://xsge.nongnu.org")
376 (synopsis "Extensions for the SGE Game Engine")
377 (description
378 "xSGE is a collection of modules that make doing certain tasks with the SGE
379Game Engine easier. In addition to SGE's conveniences, the user has access to a
380GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
381support.")
382 (license license:gpl3+)))
383
384(define-public python2-xsge
385 (package-with-python2 python-xsge))
386
b0910aad
DT
387(define-public tiled
388 (package
389 (name "tiled")
c8320d10 390 (version "1.1.0")
b0910aad
DT
391 (source (origin
392 (method url-fetch)
393 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
394 version ".tar.gz"))
f586c877 395 (file-name (string-append name "-" version ".tar.gz"))
b0910aad
DT
396 (sha256
397 (base32
c8320d10 398 "1xxvy5xyi32pbdva1hp05xq5l8403ck8hqdkv52lbscy92avvvp8"))))
b0910aad 399 (build-system gnu-build-system)
864cc7ef
RW
400 (inputs
401 `(("qtbase" ,qtbase)
402 ("qtsvg" ,qtsvg)
403 ("zlib" ,zlib)))
404 (native-inputs
405 `(("qttools" ,qttools)))
b0910aad
DT
406 (arguments
407 '(#:phases
d06fc008
EF
408 (modify-phases %standard-phases
409 (replace 'configure
864cc7ef
RW
410 (lambda* (#:key inputs outputs #:allow-other-keys)
411 (substitute* "translations/translations.pro"
412 (("LRELEASE =.*")
413 (string-append "LRELEASE = "
414 (assoc-ref inputs "qttools")
415 "/bin/lrelease\n")))
d06fc008
EF
416 (let ((out (assoc-ref outputs "out")))
417 (system* "qmake"
418 (string-append "PREFIX=" out))))))))
b0910aad
DT
419 (home-page "http://www.mapeditor.org/")
420 (synopsis "Tile map editor")
421 (description
422 "Tiled is a general purpose tile map editor. It is meant to be used for
423editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
424clone.")
425
426 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
427 ;; under BSD-2.
428 (license license:gpl2+)))
5809ffcc
DT
429
430(define-public sfml
431 (package
432 (name "sfml")
7d1b5022 433 (version "2.3.2")
5809ffcc
DT
434 (source (origin
435 (method url-fetch)
7d1b5022
RW
436 ;; Do not fetch the archives from
437 ;; http://mirror0.sfml-dev.org/files/ because files there seem
438 ;; to be changed in place.
439 (uri (string-append "https://github.com/SFML/SFML/archive/"
440 version ".tar.gz"))
441 (file-name (string-append name "-" version ".tar.gz"))
5809ffcc
DT
442 (sha256
443 (base32
7d1b5022 444 "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
5809ffcc
DT
445 (build-system cmake-build-system)
446 (arguments
a6e25a50
RW
447 '(#:configure-flags
448 (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE")
449 #:tests? #f)) ; no tests
5809ffcc
DT
450 (inputs
451 `(("mesa" ,mesa)
452 ("glew" ,glew)
240f2785
RW
453 ("flac" ,flac)
454 ("libvorbis" ,libvorbis)
5809ffcc 455 ("libx11" ,libx11)
240f2785 456 ("xcb-util-image" ,xcb-util-image)
5809ffcc
DT
457 ("libxrandr" ,libxrandr)
458 ("eudev" ,eudev)
459 ("freetype" ,freetype)
460 ("libjpeg" ,libjpeg)
461 ("libsndfile" ,libsndfile)
462 ("openal" ,openal)))
167f0e82 463 (home-page "https://www.sfml-dev.org")
5809ffcc
DT
464 (synopsis "Simple and Fast Multimedia Library")
465 (description
466 "SFML provides a simple interface to the various computer components,
467to ease the development of games and multimedia applications. It is composed
468of five modules: system, window, graphics, audio and network.")
469 (license license:zlib)))
d620ea88
DT
470
471(define-public sfxr
472 (package
473 (name "sfxr")
474 (version "1.2.1")
475 (source (origin
476 (method url-fetch)
477 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
478 (sha256
479 (base32
480 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
481 (build-system gnu-build-system)
482 (arguments
483 `(#:phases (modify-phases %standard-phases
484 (delete 'configure) ; no configure script
485 (add-before 'build 'patch-makefile
486 (lambda* (#:key outputs #:allow-other-keys)
487 (let ((out (assoc-ref outputs "out")))
488 (substitute* "Makefile"
489 (("\\$\\(DESTDIR\\)/usr") out))
490 (substitute* "main.cpp"
491 (("/usr/share")
492 (string-append out "/share")))
493 #t))))
494 #:tests? #f)) ; no tests
495 (native-inputs
496 `(("pkg-config" ,pkg-config)
497 ("desktop-file-utils" ,desktop-file-utils)))
498 (inputs
499 `(("sdl" ,sdl)
500 ("gtk+" ,gtk+)))
501 (synopsis "Simple sound effect generator")
502 (description "Sfxr is a tool for quickly generating simple sound effects.
503Originally created for use in video game prototypes, it can generate random
504sounds from presets such as \"explosion\" or \"powerup\".")
505 (home-page "http://www.drpetter.se/project_sfxr.html")
506 (license license:expat)))
0f6139b1
AK
507
508(define-public physfs
509 (package
510 (name "physfs")
511 (version "2.0.3")
512 (source (origin
513 (method url-fetch)
514 (uri (string-append
167f0e82 515 "https://icculus.org/physfs/downloads/physfs-"
0f6139b1
AK
516 version ".tar.bz2"))
517 (file-name (string-append name "-" version ".tar.gz"))
518 (sha256
519 (base32
520 "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na"))))
521 (build-system cmake-build-system)
522 (arguments
523 '(#:tests? #f)) ; no check target
524 (inputs
525 `(("zlib" ,zlib)))
526 (native-inputs
527 `(("doxygen" ,doxygen)))
167f0e82 528 (home-page "https://icculus.org/physfs")
0f6139b1
AK
529 (synopsis "File system abstraction library")
530 (description
531 "PhysicsFS is a library to provide abstract access to various archives.
532It is intended for use in video games. For security, no file writing done
533through the PhysicsFS API can leave a defined @emph{write directory}. For
534file reading, a @emph{search path} with archives and directories is defined,
535and it becomes a single, transparent hierarchical file system. So archive
536files can be accessed in the same way as you access files directly on a disk,
537and it makes it easy to ship a new archive that will override a previous
538archive on a per-file basis.")
539 (license license:zlib)))
83a4a70b
DT
540
541(define-public love
542 (package
543 (name "love")
2c1d46b2 544 (version "0.10.2")
83a4a70b
DT
545 (source (origin
546 (method url-fetch)
547 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
548 "love-" version "-linux-src.tar.gz"))
549 (sha256
550 (base32
2c1d46b2 551 "11x346pw0gqad8nmkmywzx4xpcbfc3dslbrdw5x94n1i25mk0sxj"))))
83a4a70b
DT
552 (build-system gnu-build-system)
553 (native-inputs
554 `(("pkg-config" ,pkg-config)))
555 (inputs
556 `(("devil" ,devil)
557 ("freetype" ,freetype)
558 ("libmodplug" ,libmodplug)
05d48c52 559 ("libtheora" ,libtheora)
83a4a70b
DT
560 ("libvorbis" ,libvorbis)
561 ("luajit" ,luajit)
562 ("mesa" ,mesa)
563 ("mpg123" ,mpg123)
564 ("openal" ,openal)
565 ("physfs" ,physfs)
566 ("sdl2" ,sdl2)
567 ("zlib" ,zlib)))
568 (synopsis "2D game framework for Lua")
569 (description "LÖVE is a framework for making 2D games in the Lua
570programming language.")
571 (home-page "https://love2d.org/")
572 (license license:zlib)))
154f6156
DT
573
574(define-public allegro-4
575 (package
576 (name "allegro")
577 (version "4.4.2")
578 (source (origin
579 (method url-fetch)
3a12e21c
EF
580 (uri (string-append "https://github.com/liballeg/allegro5/"
581 "releases/download/" version "/allegro-"
582 version ".tar.gz"))
154f6156
DT
583 (sha256
584 (base32
585 "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v"))))
586 (build-system cmake-build-system)
587 (arguments
588 '(#:phases
589 (modify-phases %standard-phases
590 (add-after 'unpack 'patch-build-system
591 (lambda _
592 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
593 ;; via a command line option doesn't work because it is
594 ;; unconditionally clobbered in the build script.
595 (substitute* '("CMakeLists.txt")
596 (("ADDON_LINKAGE STATIC")
597 "ADDON_LINKAGE SHARED"))
598 #t)))))
599 (inputs
600 `(("glu" ,glu)
601 ("libpng" ,libpng)
602 ("libvorbis" ,libvorbis)
603 ("mesa" ,mesa)
604 ("zlib" ,zlib)))
605 (synopsis "Game programming library")
606 (description "Allegro is a library mainly aimed at video game and
607multimedia programming. It handles common, low-level tasks such as creating
608windows, accepting user input, loading data, drawing images, playing sounds,
609etc.")
610 (home-page "http://liballeg.org")
611 (license license:giftware)))
2a068aec 612
19d311b4
RW
613(define-public allegro
614 (package
615 (name "allegro")
8d2832e3 616 (version "5.2.2.0")
19d311b4
RW
617 (source (origin
618 (method url-fetch)
3a12e21c
EF
619 (uri (string-append "https://github.com/liballeg/allegro5/releases"
620 "/download/" version "/allegro-"
621 (if (equal? "0" (string-take-right version 1))
622 (string-drop-right version 2)
623 version)
624 ".tar.gz"))
19d311b4
RW
625 (sha256
626 (base32
8d2832e3 627 "1z4lrrlmn471wb7vzbd9iw7g379vj0k964vy1s64hcvv5bhvk1g2"))))
19d311b4
RW
628 (build-system cmake-build-system)
629 (arguments `(#:tests? #f)) ; there are no tests
630 (inputs
631 ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb
632 `(("flac" ,flac)
633 ("freetype" ,freetype)
634 ("glu" ,glu)
635 ("gtk" ,gtk+-2)
636 ("libjpeg" ,libjpeg)
637 ("libpng" ,libpng)
638 ("libtheora" ,libtheora)
639 ("libvorbis" ,libvorbis)
640 ("libxcursor" ,libxcursor)
641 ("libxinerama" ,libxinerama)
642 ("libxrandr" ,libxrandr)
643 ("mesa" ,mesa)
644 ("openal" ,openal)
645 ("physfs" ,physfs)
646 ("zlib" ,zlib)))
647 (native-inputs
648 `(("pkg-config" ,pkg-config)))
649 (synopsis "Game programming library")
650 (description "Allegro is a library mainly aimed at video game and
651multimedia programming. It handles common, low-level tasks such as creating
652windows, accepting user input, loading data, drawing images, playing sounds,
653etc.")
654 (home-page "http://liballeg.org")
655 (license license:bsd-3)))
656
cdf8f391
RW
657(define-public allegro-5.0
658 (package (inherit allegro)
659 (name "allegro")
660 (version "5.0.11")
661 (source (origin
662 (method url-fetch)
3a12e21c
EF
663 (uri (string-append "https://github.com/liballeg/allegro5/releases"
664 "/download/" version "/allegro-"
665 (if (equal? "0" (string-take-right version 1))
666 (string-drop-right version 2)
667 version)
668 ".tar.gz"))
cdf8f391
RW
669 (sha256
670 (base32
671 "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9"))))))
672
2a068aec
DT
673(define-public aseprite
674 (package
675 (name "aseprite")
82654d95 676 (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL.
ff4dc16e 677 ;; TODO: Unbundle third party software.
2a068aec 678 (source (origin
ff4dc16e
MB
679 (method url-fetch/zipbomb)
680 (uri (string-append "https://github.com/aseprite/aseprite"
681 "/releases/download/v" version
682 "/Aseprite-v" version "-Source.zip"))
2a068aec
DT
683 (sha256
684 (base32
82654d95 685 "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv"))))
2a068aec
DT
686 (build-system cmake-build-system)
687 (arguments
688 '(#:configure-flags
689 ;; Use shared libraries instead of building bundled source.
690 (list "-DWITH_WEBP_SUPPORT=1"
691 "-DUSE_SHARED_CURL=1"
692 "-DUSE_SHARED_GIFLIB=1"
693 "-DUSE_SHARED_JPEGLIB=1"
694 "-DUSE_SHARED_ZLIB=1"
695 "-DUSE_SHARED_LIBPNG=1"
696 "-DUSE_SHARED_LIBLOADPNG=1"
697 "-DUSE_SHARED_LIBWEBP=1"
698 "-DUSE_SHARED_TINYXML=1"
699 "-DUSE_SHARED_PIXMAN=1"
700 "-DUSE_SHARED_FREETYPE=1"
701 "-DUSE_SHARED_ALLEGRO4=1"
702 "-DENABLE_UPDATER=0" ; no auto-updates
703 (string-append "-DFREETYPE_INCLUDE_DIR="
704 (assoc-ref %build-inputs "freetype")
de1d68a2 705 "/include/freetype2"))))
2a068aec
DT
706 (native-inputs
707 `(("pkg-config" ,pkg-config)))
708 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
709 ;; patched version is bundled with Aseprite, but the patches should be
710 ;; extracted and applied on top of a standalone Allegro 4 package.
711 (inputs
712 `(("allegro" ,allegro-4)
713 ("curl" ,curl)
714 ("freetype" ,freetype)
715 ("giflib" ,giflib)
716 ("libjpeg" ,libjpeg)
717 ("libpng" ,libpng)
718 ("libwebp" ,libwebp)
719 ("libx11" ,libx11)
720 ("libxext" ,libxext)
721 ("libxxf86vm" ,libxxf86vm)
722 ("pixman" ,pixman)
723 ("tinyxml" ,tinyxml)
724 ("zlib" ,zlib)))
725 (synopsis "Animated sprite editor and pixel art tool")
726 (description "Aseprite is a tool for creating 2D pixel art for video
727games. In addition to basic pixel editing features, Aseprite can assist in
728the creation of animations, tiled graphics, texture atlases, and more.")
167f0e82 729 (home-page "https://www.aseprite.org/")
2a068aec 730 (license license:gpl2+)))
966dff3b
KY
731
732(define-public qqwing
733 (package
734 (name "qqwing")
735 (version "1.3.4")
736 (source (origin
737 (method url-fetch)
738 (uri (string-append
739 "https://qqwing.com/"
740 name "-" version ".tar.gz"))
741 (sha256
742 (base32
743 "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp"))))
744 (build-system gnu-build-system)
745 (native-inputs
746 `(("pkg-config" ,pkg-config)))
747 (home-page "https://qqwing.com/")
748 (synopsis "Sudoku puzzle solver and generator")
749 (description
750 "QQWing is a Sudoku puzzle generator and solver.
751It offers the following features:
752@enumerate
753@item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds.
754@item Uses logic. Uses as many solve techniques as possible when solving
755 puzzles rather than guessing.
756@item Rates puzzles. Most generators don't give an indication of the difficulty
757 of a Sudoku puzzle. QQwing does.
758@item Can print solve instructions for any puzzle.
759@item Customizable output style, including a CSV style that is easy to
760 import into a database.
761@end enumerate")
762 (license license:gpl2+)))
d2cc38b7
KK
763
764(define-public quesoglc
765 (package
766 (name "quesoglc")
767 (version "0.7.2")
768 (source (origin
769 (method url-fetch)
770 (uri (string-append "mirror://sourceforge/" name "/" version "/"
771 name "-" version "-free.tar.bz2"))
772 (sha256
773 (base32
774 "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks"))))
775 (build-system gnu-build-system)
776 (native-inputs `(("pkg-config" ,pkg-config)))
777 (inputs `(("fontconfig" ,fontconfig)
778 ("freeglute" ,freeglut)
779 ("fribidi" ,fribidi)
780 ("glew" ,glew)))
781 (home-page "http://quesoglc.sourceforge.net")
782 (synopsis "Implementation of the OpenGL Character Renderer (GLC)")
783 (description
784 "The OpenGL Character Renderer (GLC) is a state machine that provides
785OpenGL programs with character rendering services via an application programming
786interface (API).")
787 (license (list license:expat license:lgpl2.1+))))
4bc37bf0
KK
788
789(define-public python-pygame
790 (package
791 (name "python-pygame")
052f75da 792 (version "1.9.3")
4bc37bf0
KK
793 (source (origin
794 (method url-fetch)
052f75da 795 (uri (pypi-uri "pygame" version))
4bc37bf0
KK
796 (sha256
797 (base32
052f75da 798 "1hlydiyygl444bq5m5g8n3jsxsgrdyxlm42ipmfbw36wkf0j243m"))))
4bc37bf0
KK
799 (build-system python-build-system)
800 (arguments
052f75da 801 `(#:tests? #f ; Tests require pygame to be installed first.
4bc37bf0
KK
802 #:phases
803 (modify-phases %standard-phases
804 ;; Set the paths to the dependencies manually because
805 ;; the configure script does not allow passing them as
806 ;; parameters. This also means we can skip the configure
807 ;; phase.
808 (add-before 'build 'set-library-paths
809 (lambda* (#:key inputs outputs #:allow-other-keys)
810 (let ((sdl-ref (assoc-ref inputs "sdl"))
811 (font-ref (assoc-ref inputs "sdl-ttf"))
812 (image-ref (assoc-ref inputs "sdl-image"))
813 (mixer-ref (assoc-ref inputs "sdl-mixer"))
814 (smpeg-ref (assoc-ref inputs "libsmpeg"))
815 (png-ref (assoc-ref inputs "libpng"))
816 (jpeg-ref (assoc-ref inputs "libjpeg"))
052f75da 817 (freetype-ref (assoc-ref inputs "freetype"))
4bc37bf0
KK
818 (v4l-ref (assoc-ref inputs "v4l-utils"))
819 (out-ref (assoc-ref outputs "out")))
820 (substitute* "Setup.in"
821 (("SDL = -I/usr/include/SDL")
822 (string-append "SDL = -I" sdl-ref "/include/SDL -I.")))
823 (substitute* "Setup.in"
824 (("FONT = -lSDL_ttf")
825 (string-append "FONT = -I" font-ref "/include/SDL -L"
826 font-ref "/lib -lSDL_ttf")))
827 (substitute* "Setup.in"
828 (("IMAGE = -lSDL_image")
829 (string-append "IMAGE = -I" image-ref "/include/SDL -L"
830 image-ref "/lib -lSDL_image")))
831 (substitute* "Setup.in"
832 (("MIXER = -lSDL_mixer")
833 (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
834 mixer-ref "/lib -lSDL_mixer")))
835 (substitute* "Setup.in"
836 (("SMPEG = -lsmpeg")
837 (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
838 smpeg-ref "/lib -lsmpeg")))
839 (substitute* "Setup.in"
840 (("PNG = -lpng")
841 (string-append "PNG = -I" png-ref "/include -L"
842 png-ref "/lib -lpng")))
843 (substitute* "Setup.in"
844 (("JPEG = -ljpeg")
845 (string-append "JPEG = -I" jpeg-ref "/include -L"
846 jpeg-ref "/lib -ljpeg")))
052f75da
DM
847
848 (substitute* "Setup.in"
849 (("FREETYPE = -lfreetype")
850 (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L"
851 freetype-ref "/lib -lfreetype")))
852
4bc37bf0
KK
853 (substitute* "Setup.in"
854 (("^pypm") "#pypm"))
4bc37bf0
KK
855 ;; Create a path to a header file provided by v4l-utils.
856 (system* "mkdir" "linux")
857 (system* "ln" "--symbolic"
858 (string-append v4l-ref "/include/libv4l1-videodev.h")
859 "linux/videodev.h")
860 (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
4bc37bf0 861 (inputs
052f75da
DM
862 `(("freetype" ,freetype)
863 ("sdl" ,sdl)
4bc37bf0
KK
864 ("sdl-image" ,sdl-image)
865 ("sdl-mixer" ,sdl-mixer)
866 ("sdl-ttf" ,sdl-ttf)
867 ("sdl-gfx" ,sdl-gfx)
868 ("libjpeg" ,libjpeg)
869 ("libpng" ,libpng)
870 ("libX11" ,libx11)
871 ("libsmpeg" ,libsmpeg)
872 ("portmidi" ,portmidi)
873 ("v4l-utils" ,v4l-utils)))
167f0e82 874 (home-page "https://www.pygame.org")
4bc37bf0
KK
875 (synopsis "SDL wrapper for Python")
876 (description "Pygame is a set of Python modules designed for writing games.
877Pygame adds functionality on top of the excellent SDL library. This allows you
878to create fully featured games and multimedia programs in the python language.")
879 (license (list license:bsd-2
880 ;; python numeric license as listed by Debian looks like
881 ;; an Expat-style license with a warranty disclaimer for
882 ;; the U.S. government and the University of California.
883 license:expat
884 license:lgpl2.0+
885 license:lgpl2.1+
886 license:gpl3+
887 license:psfl
888 license:public-domain
889 license:lgpl2.1+))))
052f75da
DM
890
891(define-public python2-pygame
892 (package-with-python2 python-pygame))
68c6110c
DT
893
894(define-public grafx2
895 (package
896 (name "grafx2")
897 (version "2.4")
898 (source (origin
899 (method url-fetch)
900 ;; XXX: There is no URL that contains the version. :(
901 (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21")
902 (sha256
903 (base32
904 "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q"))))
905 (build-system gnu-build-system)
906 (arguments
907 '(#:phases
908 (modify-phases %standard-phases
909 (delete 'configure) ; no configure script
910 (add-before 'build 'change-to-src-directory
911 (lambda _
912 (chdir "src")
913 #t)))
914 #:make-flags
915 ;; SDL header files are referenced without the preceeding "SDL/".
916 (list (string-append "CFLAGS=-I"
917 (assoc-ref %build-inputs "sdl-union")
918 "/include/SDL")
919 (string-append "prefix="
920 (assoc-ref %outputs "out")))
921 #:tests? #f)) ; no check target
922 (native-inputs
923 `(("pkg-config" ,pkg-config)))
924 (inputs
925 `(("libpng" ,libpng)
926 ("lua" ,lua-5.1)
927 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf)))))
928 (synopsis "Bitmap paint program")
929 (description "GrafX2 is a bitmap paint program inspired by the Amiga
7432d3ae 930programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it
68c6110c
DT
931includes a very large number of tools and effects that make it particularly
932suitable for pixel art, game graphics, and generally any detailed graphics
933painted with a mouse.")
934 (home-page "http://pulkomandy.tk/projects/GrafX2")
935 (license license:gpl2))) ; GPLv2 only
c608fe8c
MR
936
937(define-public ois
938 (package
939 (name "ois")
940 (version "1.3")
941 (source
942 (origin
943 ;; Development has moved to github and there are no recent tarball
944 ;; releases.
945 (method git-fetch)
946 (uri (git-reference
947 (url "https://github.com/wgois/OIS.git")
948 (commit "bb75ccc1aabc1c547195579963601ff6080ca2f2")))
949 (file-name (string-append name "-" version))
950 (sha256
951 (base32
952 "0w0pamjc3vj0jr718hysrw8x076fq6n9rd6wcb36sn2jd0lqvi98"))))
953 (build-system gnu-build-system)
954 (arguments
955 `(#:phases
956 (modify-phases %standard-phases
957 (add-after 'unpack 'bootstrap
958 (lambda _ (zero? (system* "sh" "bootstrap")))))))
959 (native-inputs
960 `(("autoconf" ,autoconf)
961 ("automake" ,automake)
962 ("libtool" ,libtool)
963 ("m4" ,m4)
964 ("pkg-config" ,pkg-config)))
965 (inputs
966 `(("libxaw" ,libxaw)))
967 (synopsis "Object Oriented Input System")
968 (description
969 "Cross Platform Object Oriented Input Lib System is a cross platform,
970simple solution for using all kinds of Input Devices (Keyboards, Mice,
971Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very
972robust and compatible with many systems and operating systems.")
973 (home-page "https://github.com/wgois/OIS")
974 (license license:zlib)))
42d0d13d
MR
975
976(define-public mygui
977 (package
978 (name "mygui")
979 (version "3.2.2")
980 (source
981 (origin
982 (method url-fetch)
983 (uri
984 (string-append "https://github.com/MyGUI/" name
985 "/archive/MyGUI" version ".tar.gz"))
986 (sha256
987 (base32
988 "13x7cydmj7gjmsg702sqjbfi53z265iv6j7binv3r6a7ibndfa0a"))))
989 (build-system cmake-build-system)
990 (arguments
991 '(#:tests? #f ; No test target
992 #:configure-flags
993 (list "-DMYGUI_INSTALL_DOCS=TRUE"
994 (string-append "-DOGRE_INCLUDE_DIR="
995 (assoc-ref %build-inputs "ogre")
996 "/include/OGRE"))))
997 (native-inputs
998 `(("boost" ,boost)
999 ("doxygen" ,doxygen)
1000 ("pkg-config" ,pkg-config)))
1001 (inputs
1002 `(("font-dejavu" ,font-dejavu)
1003 ("freetype" ,freetype)
1004 ("graphviz" ,graphviz)
1005 ("libx11" ,libx11)
1006 ("ogre" ,ogre)
1007 ("ois" ,ois)))
1008 (synopsis "Fast, flexible and simple GUI")
1009 (description
1010 "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games
1011and 3D applications. The main goals of mygui are: speed, flexibility and ease
1012of use.")
1013 (home-page "http://mygui.info/")
1014 (license license:expat)))
e9a599cd
MR
1015
1016(define-public openmw
1017 (package
1018 (name "openmw")
0ea2364f 1019 (version "0.43.0")
e9a599cd
MR
1020 (source
1021 (origin
1022 (method url-fetch)
1023 (uri
1024 (string-append "https://github.com/OpenMW/openmw/archive/"
1025 name "-" version ".tar.gz"))
1026 (sha256
1027 (base32
0ea2364f 1028 "11phjx7b3mv4n295xgq25lkcwq0mgr35i5k05hf1h77y6n6jbw64"))))
e9a599cd
MR
1029 (build-system cmake-build-system)
1030 (arguments
1031 `(#:tests? #f ; No test target
1032 #:configure-flags
1033 (list "-DDESIRED_QT_VERSION=5")))
1034 (native-inputs
1035 `(("boost" ,boost)
1036 ("doxygen" ,doxygen)
1037 ("pkg-config" ,pkg-config)))
1038 (inputs
1039 `(("bullet" ,bullet)
1040 ("ffmpeg" ,ffmpeg)
1041 ("libxt" ,libxt)
1042 ("mygui" ,mygui)
1043 ("openal" ,openal)
1044 ("openscenegraph" ,openscenegraph)
1045 ("qtbase" ,qtbase)
1046 ("sdl" ,sdl2)
1047 ("unshield" ,unshield)))
5a80c15c 1048 (synopsis "Re-implementation of the RPG Morrowind engine")
e9a599cd 1049 (description
5a80c15c
RW
1050 "OpenMW is a game engine which reimplements and extends the one that runs
1051the 2002 open-world RPG Morrowind. The engine comes with its own editor,
1052called OpenMW-CS which allows the user to edit or create their own original
1053games.")
e9a599cd
MR
1054 (home-page "https://openmw.org")
1055 (license license:gpl3)))
194b4e7d
PM
1056
1057(define-public godot
1058 (package
1059 (name "godot")
1060 (version "2.1.4")
1061 (source (origin
1062 (method url-fetch)
1063 (uri
1064 (string-append "https://github.com/godotengine/godot/archive/"
1065 version "-stable.tar.gz"))
1066 (file-name (string-append name "-" version))
1067 (sha256
1068 (base32 "1mz89nafc1m7srbqvy7iagxrxmqvf5hbqi7i0lwaapkx6q0kpkq7"))))
92b51d12 1069 (build-system scons-build-system)
194b4e7d 1070 (arguments
92b51d12
AI
1071 `(#:scons ,scons-python2
1072 #:scons-flags (list "platform=x11"
1073 ;; Avoid using many of the bundled libs.
1074 ;; Note: These options can be found in the SConstruct file.
1075 "builtin_freetype=no"
1076 "builtin_glew=no"
1077 "builtin_libmpdec=no"
1078 "builtin_libogg=no"
1079 "builtin_libpng=no"
1080 "builtin_libtheora=no"
1081 "builtin_libvorbis=no"
1082 "builtin_libwebp=no"
1083 "builtin_openssl=no"
1084 "builtin_opus=no"
1085 "builtin_zlib=no")
1086 #:tests? #f ; There are no tests
194b4e7d
PM
1087 #:phases
1088 (modify-phases %standard-phases
194b4e7d
PM
1089 (add-after 'unpack 'scons-use-env
1090 (lambda _
1091 ;; Scons does not use the environment variables by default,
1092 ;; but this substitution makes it do so.
1093 (substitute* "SConstruct"
1094 (("env_base = Environment\\(tools=custom_tools\\)")
1095 (string-append
1096 "env_base = Environment(tools=custom_tools)\n"
1097 "env_base = Environment(ENV=os.environ)")))
1098 #t))
194b4e7d
PM
1099 (replace 'install
1100 (lambda* (#:key outputs #:allow-other-keys)
1101 (let* ((out (assoc-ref outputs "out"))
1102 (bin (string-append out "/bin")))
1103 (with-directory-excursion "bin"
1104 (if (file-exists? "godot.x11.tools.64")
1105 (rename-file "godot.x11.tools.64" "godot")
1106 (rename-file "godot.x11.tools.32" "godot"))
1107 (install-file "godot" bin)))))
1108 (add-after 'install 'install-godot-desktop
1109 (lambda* (#:key outputs #:allow-other-keys)
1110 (let* ((out (assoc-ref outputs "out"))
1111 (desktop (string-append out "/share/applications"))
1112 (icon-dir (string-append out "/share/pixmaps")))
1113 (mkdir-p desktop)
1114 (mkdir-p icon-dir)
1115 (rename-file "icon.png" "godot.png")
1116 (install-file "godot.png" icon-dir)
1117 (with-output-to-file
1118 (string-append desktop "/godot.desktop")
1119 (lambda _
1120 (format #t
1121 "[Desktop Entry]~@
1122 Name=godot~@
1123 Comment=The godot game engine~@
1124 Exec=~a/bin/godot~@
1125 TryExec=~@*~a/bin/godot~@
1126 Icon=godot~@
1127 Type=Application~%"
1128 out)))
1129 #t))))))
92b51d12 1130 (native-inputs `(("pkg-config" ,pkg-config)))
194b4e7d
PM
1131 (inputs `(("alsa-lib" ,alsa-lib)
1132 ("freetype" ,freetype)
1133 ("glew" ,glew)
1134 ("glu" ,glu)
1135 ("libtheora" ,libtheora)
1136 ("libvorbis" ,libvorbis)
1137 ("libwebp" ,libwebp)
1138 ("libx11" ,libx11)
1139 ("libxcursor" ,libxcursor)
1140 ("libxinerama" ,libxinerama)
1141 ("libxrandr" ,libxrandr)
1142 ("mesa" ,mesa)
1143 ("openssl" ,openssl)
1144 ("opusfile" ,opusfile)
92b51d12 1145 ("pulseaudio" ,pulseaudio)))
194b4e7d
PM
1146 (home-page "https://godotengine.org/")
1147 (synopsis "Advanced 2D and 3D game engine")
1148 (description
1149 "Godot is an advanced multi-platform game engine written in C++. If
1150features design tools such as a visual editor, can import 3D models and
1151provide high-quality 3D rendering, it contains an animation editor, and can be
1152scripted in a Python-like language.")
1153 (license license:expat)))
531003be 1154
1155(define-public eureka
1156 (package
1157 (name "eureka")
1158 (version "1.21")
1159 (source (origin
1160 (method url-fetch)
1161 (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/"
1162 version "/eureka-"
1163 ;; version without dots e.g 1.21 => 121
1164 (string-join (string-split version #\.) "")
1165 "-source.tar.gz"))
1166 (sha256
1167 (base32
1168 "1a7pf7xi56fcz7jc8layih5gq5m66g2ss4x5j61kzgip07j6rkir"))))
1169 (build-system gnu-build-system)
1170 (arguments
1171 '(#:tests? #f
1172 #:make-flags
1173 (let ((out (assoc-ref %outputs "out")))
1174 (list (string-append "PREFIX=" out)))
1175 #:phases
1176 (modify-phases %standard-phases
1177 (delete 'configure)
1178 (add-before 'build 'prepare-install-directories
1179 (lambda* (#:key outputs #:allow-other-keys)
1180 (let ((out (assoc-ref outputs "out")))
1181 (mkdir-p (string-append out "/bin"))
1182 (mkdir-p (string-append out "/share"))
1183
1184 (with-fluids ((%default-port-encoding #f))
1185 (substitute* "./src/main.cc"
1186 (("/usr/local") out)))
1187
1188 (substitute* "Makefile"
1189 (("-o root") ""))))))))
1190 (inputs `(("mesa" ,mesa)
1191 ("libxft" ,libxft)
1192 ("libxinerama" ,libxinerama)
1193 ("libfontconfig" ,fontconfig)
1194 ("libjpeg" ,libjpeg)
1195 ("libpng" ,libpng)
1196 ("fltk" ,fltk)
1197 ("zlib" ,zlib)))
1198 (native-inputs `(("pkg-config" ,pkg-config)
1199 ("xdg-utils" ,xdg-utils)))
1200 (synopsis "Doom map editor")
1201 (description "Eureka is a map editor for the classic DOOM games, and a few
1202related games such as Heretic and Hexen. It comes with a 3d preview mode and
1203a 2D editor view.")
1204 (home-page "http://eureka-editor.sourceforge.net/")
1205 (license license:gpl2+)))