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