Merge branch 'staging'
[jackhill/guix/guix.git] / gnu / packages / game-development.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Tomáš Čech <sleep_walker@suse.cz>
3 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 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 (native-inputs `(("pkgconfig" ,pkg-config)))
237 (inputs `(("bdb" ,bdb)
238 ("glib" ,glib)
239 ("guile" ,guile-2.0)
240 ("libmicrohttpd" ,libmicrohttpd)
241 ("ncurses" ,ncurses)
242 ("sdl" ,sdl)
243 ("zlib" ,zlib)))
244 (home-page "https://www.nongnu.org/gzochi/")
245 (synopsis "Scalable middleware for multiplayer games")
246 (description
247 "gzochi is a framework for developing massively multiplayer online games.
248 A server container provides services to deployed games, which are written in
249 Guile Scheme, that abstract and simplify some of the most challenging and
250 error-prone aspects of online game development: Concurrency, data persistence,
251 and network communications. A very thin client library can be embedded to
252 provide connectivity for client applications written in any language.")
253 (license license:gpl3+)))
254
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
274 "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
275 compiling NML files (along with their associated language, sound and graphic
276 files) into @file{.grf} and/or @file{.nfo} files.")
277 (license license:gpl2+)))
278
279 (define-public python-sge-pygame
280 (package
281 (name "python-sge-pygame")
282 (version "1.5.1")
283 (source
284 (origin
285 (method url-fetch)
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"))
290 (sha256
291 (base32
292 "1rl3xjzh78sl0sq3xl8rl7cgp9v9v3h7s2pfwn7nj1vrmffzkcpd"))))
293 (build-system python-build-system)
294 (propagated-inputs
295 `(("python-pygame" ,python-pygame)
296 ("python-six" ,python-six)
297 ("python-uniseg" ,python-uniseg)))
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
302 general-purpose 2D game engine. It takes care of several details for you so
303 you can focus on the game itself. This makes more rapid game development
304 possible, 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
310 (define-public python-tmx
311 (package
312 (name "python-tmx")
313 (version "1.10")
314 (source
315 (origin
316 (method url-fetch)
317 (uri (string-append "mirror://savannah/python-tmx/"
318 (version-major+minor version) "/tmx-"
319 version ".tar.gz"))
320 (sha256
321 (base32
322 "073q0prg1nzlkga2b45vhscz374206qh4x68ccg00mxxwagn64z0"))))
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.
330 This is useful for map editors or generic level editors, and it's also useful
331 for using a map editor or generic level editor like Tiled to edit your game's
332 levels.")
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
346 (define-public python-xsge
347 (package
348 (name "python-xsge")
349 (version "2017.06.09")
350 (source (origin
351 (method url-fetch)
352 (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
353 version ".tar.gz"))
354 (sha256
355 (base32
356 "1vy7c2y7ihvmggs93zgfv2h3049s384wid8a5snzrrba8bhbb89p"))))
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
379 Game Engine easier. In addition to SGE's conveniences, the user has access to a
380 GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
381 support.")
382 (license license:gpl3+)))
383
384 (define-public python2-xsge
385 (package-with-python2 python-xsge))
386
387 (define-public tiled
388 (package
389 (name "tiled")
390 (version "1.1.4")
391 (source (origin
392 (method url-fetch)
393 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
394 version ".tar.gz"))
395 (file-name (string-append name "-" version ".tar.gz"))
396 (sha256
397 (base32
398 "0xb3zwcdk7khdrza6spl02g5n2xbij6nbszv8vi27vagjnmz1wxh"))))
399 (build-system gnu-build-system)
400 (inputs
401 `(("qtbase" ,qtbase)
402 ("qtsvg" ,qtsvg)
403 ("zlib" ,zlib)))
404 (native-inputs
405 `(("qttools" ,qttools)))
406 (arguments
407 '(#:phases
408 (modify-phases %standard-phases
409 (replace 'configure
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")))
416 (let ((out (assoc-ref outputs "out")))
417 (system* "qmake"
418 (string-append "PREFIX=" out))))))))
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
423 editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
424 clone.")
425
426 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
427 ;; under BSD-2.
428 (license license:gpl2+)))
429
430 (define-public sfml
431 (package
432 (name "sfml")
433 (version "2.3.2")
434 (source (origin
435 (method url-fetch)
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"))
442 (sha256
443 (base32
444 "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
445 (build-system cmake-build-system)
446 (arguments
447 '(#:configure-flags
448 (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE")
449 #:tests? #f)) ; no tests
450 (inputs
451 `(("mesa" ,mesa)
452 ("glew" ,glew)
453 ("flac" ,flac)
454 ("libvorbis" ,libvorbis)
455 ("libx11" ,libx11)
456 ("xcb-util-image" ,xcb-util-image)
457 ("libxrandr" ,libxrandr)
458 ("eudev" ,eudev)
459 ("freetype" ,freetype)
460 ("libjpeg" ,libjpeg)
461 ("libsndfile" ,libsndfile)
462 ("openal" ,openal)))
463 (home-page "https://www.sfml-dev.org")
464 (synopsis "Simple and Fast Multimedia Library")
465 (description
466 "SFML provides a simple interface to the various computer components,
467 to ease the development of games and multimedia applications. It is composed
468 of five modules: system, window, graphics, audio and network.")
469 (license license:zlib)))
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.
503 Originally created for use in video game prototypes, it can generate random
504 sounds from presets such as \"explosion\" or \"powerup\".")
505 (home-page "http://www.drpetter.se/project_sfxr.html")
506 (license license:expat)))
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
515 "https://icculus.org/physfs/downloads/physfs-"
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)))
528 (home-page "https://icculus.org/physfs")
529 (synopsis "File system abstraction library")
530 (description
531 "PhysicsFS is a library to provide abstract access to various archives.
532 It is intended for use in video games. For security, no file writing done
533 through the PhysicsFS API can leave a defined @emph{write directory}. For
534 file reading, a @emph{search path} with archives and directories is defined,
535 and it becomes a single, transparent hierarchical file system. So archive
536 files can be accessed in the same way as you access files directly on a disk,
537 and it makes it easy to ship a new archive that will override a previous
538 archive on a per-file basis.")
539 (license license:zlib)))
540
541 (define-public love
542 (package
543 (name "love")
544 (version "0.10.2")
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
551 "11x346pw0gqad8nmkmywzx4xpcbfc3dslbrdw5x94n1i25mk0sxj"))
552 (modules '((guix build utils)))
553 (snippet
554 '(begin
555 ;; Build with luajit 2.1.0-beta3. Fixed in love 0.11.
556 ;; See <https://bitbucket.org/rude/love/issues/1277>.
557 (substitute* "src/libraries/luasocket/libluasocket/lua.h"
558 (("> 501") ">= 501"))
559 #t))))
560 (build-system gnu-build-system)
561 (native-inputs
562 `(("pkg-config" ,pkg-config)))
563 (inputs
564 `(("devil" ,devil)
565 ("freetype" ,freetype)
566 ("libmodplug" ,libmodplug)
567 ("libtheora" ,libtheora)
568 ("libvorbis" ,libvorbis)
569 ("luajit" ,luajit)
570 ("mesa" ,mesa)
571 ("mpg123" ,mpg123)
572 ("openal" ,openal)
573 ("physfs" ,physfs)
574 ("sdl2" ,sdl2)
575 ("zlib" ,zlib)))
576 (synopsis "2D game framework for Lua")
577 (description "LÖVE is a framework for making 2D games in the Lua
578 programming language.")
579 (home-page "https://love2d.org/")
580 (license license:zlib)))
581
582 (define-public allegro-4
583 (package
584 (name "allegro")
585 (version "4.4.2")
586 (source (origin
587 (method url-fetch)
588 (uri (string-append "https://github.com/liballeg/allegro5/"
589 "releases/download/" version "/allegro-"
590 version ".tar.gz"))
591 (sha256
592 (base32
593 "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v"))))
594 (build-system cmake-build-system)
595 (arguments
596 '(#:phases
597 (modify-phases %standard-phases
598 (add-after 'unpack 'patch-build-system
599 (lambda _
600 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
601 ;; via a command line option doesn't work because it is
602 ;; unconditionally clobbered in the build script.
603 (substitute* '("CMakeLists.txt")
604 (("ADDON_LINKAGE STATIC")
605 "ADDON_LINKAGE SHARED"))
606 #t)))))
607 (inputs
608 `(("glu" ,glu)
609 ("libpng" ,libpng)
610 ("libvorbis" ,libvorbis)
611 ("mesa" ,mesa)
612 ("zlib" ,zlib)))
613 (synopsis "Game programming library")
614 (description "Allegro is a library mainly aimed at video game and
615 multimedia programming. It handles common, low-level tasks such as creating
616 windows, accepting user input, loading data, drawing images, playing sounds,
617 etc.")
618 (home-page "http://liballeg.org")
619 (license license:giftware)))
620
621 (define-public allegro
622 (package
623 (name "allegro")
624 (version "5.2.2.0")
625 (source (origin
626 (method url-fetch)
627 (uri (string-append "https://github.com/liballeg/allegro5/releases"
628 "/download/" version "/allegro-"
629 (if (equal? "0" (string-take-right version 1))
630 (string-drop-right version 2)
631 version)
632 ".tar.gz"))
633 (sha256
634 (base32
635 "1z4lrrlmn471wb7vzbd9iw7g379vj0k964vy1s64hcvv5bhvk1g2"))))
636 (build-system cmake-build-system)
637 (arguments `(#:tests? #f)) ; there are no tests
638 (inputs
639 ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb
640 `(("flac" ,flac)
641 ("freetype" ,freetype)
642 ("glu" ,glu)
643 ("gtk" ,gtk+-2)
644 ("libjpeg" ,libjpeg)
645 ("libpng" ,libpng)
646 ("libtheora" ,libtheora)
647 ("libvorbis" ,libvorbis)
648 ("libxcursor" ,libxcursor)
649 ("libxinerama" ,libxinerama)
650 ("libxrandr" ,libxrandr)
651 ("mesa" ,mesa)
652 ("openal" ,openal)
653 ("physfs" ,physfs)
654 ("zlib" ,zlib)))
655 (native-inputs
656 `(("pkg-config" ,pkg-config)))
657 (synopsis "Game programming library")
658 (description "Allegro is a library mainly aimed at video game and
659 multimedia programming. It handles common, low-level tasks such as creating
660 windows, accepting user input, loading data, drawing images, playing sounds,
661 etc.")
662 (home-page "http://liballeg.org")
663 (license license:bsd-3)))
664
665 (define-public allegro-5.0
666 (package (inherit allegro)
667 (name "allegro")
668 (version "5.0.11")
669 (source (origin
670 (method url-fetch)
671 (uri (string-append "https://github.com/liballeg/allegro5/releases"
672 "/download/" version "/allegro-"
673 (if (equal? "0" (string-take-right version 1))
674 (string-drop-right version 2)
675 version)
676 ".tar.gz"))
677 (sha256
678 (base32
679 "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9"))))))
680
681 (define-public aseprite
682 (package
683 (name "aseprite")
684 (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL.
685 ;; TODO: Unbundle third party software.
686 (source (origin
687 (method url-fetch/zipbomb)
688 (uri (string-append "https://github.com/aseprite/aseprite"
689 "/releases/download/v" version
690 "/Aseprite-v" version "-Source.zip"))
691 (sha256
692 (base32
693 "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv"))))
694 (build-system cmake-build-system)
695 (arguments
696 '(#:configure-flags
697 ;; Use shared libraries instead of building bundled source.
698 (list "-DWITH_WEBP_SUPPORT=1"
699 "-DUSE_SHARED_CURL=1"
700 "-DUSE_SHARED_GIFLIB=1"
701 "-DUSE_SHARED_JPEGLIB=1"
702 "-DUSE_SHARED_ZLIB=1"
703 "-DUSE_SHARED_LIBPNG=1"
704 "-DUSE_SHARED_LIBLOADPNG=1"
705 "-DUSE_SHARED_LIBWEBP=1"
706 "-DUSE_SHARED_TINYXML=1"
707 "-DUSE_SHARED_PIXMAN=1"
708 "-DUSE_SHARED_FREETYPE=1"
709 "-DUSE_SHARED_ALLEGRO4=1"
710 "-DENABLE_UPDATER=0" ; no auto-updates
711 (string-append "-DFREETYPE_INCLUDE_DIR="
712 (assoc-ref %build-inputs "freetype")
713 "/include/freetype2"))))
714 (native-inputs
715 `(("pkg-config" ,pkg-config)))
716 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
717 ;; patched version is bundled with Aseprite, but the patches should be
718 ;; extracted and applied on top of a standalone Allegro 4 package.
719 (inputs
720 `(("allegro" ,allegro-4)
721 ("curl" ,curl)
722 ("freetype" ,freetype)
723 ("giflib" ,giflib)
724 ("libjpeg" ,libjpeg)
725 ("libpng" ,libpng)
726 ("libwebp" ,libwebp)
727 ("libx11" ,libx11)
728 ("libxext" ,libxext)
729 ("libxxf86vm" ,libxxf86vm)
730 ("pixman" ,pixman)
731 ("tinyxml" ,tinyxml)
732 ("zlib" ,zlib)))
733 (synopsis "Animated sprite editor and pixel art tool")
734 (description "Aseprite is a tool for creating 2D pixel art for video
735 games. In addition to basic pixel editing features, Aseprite can assist in
736 the creation of animations, tiled graphics, texture atlases, and more.")
737 (home-page "https://www.aseprite.org/")
738 (license license:gpl2+)))
739
740 (define-public qqwing
741 (package
742 (name "qqwing")
743 (version "1.3.4")
744 (source (origin
745 (method url-fetch)
746 (uri (string-append
747 "https://qqwing.com/"
748 name "-" version ".tar.gz"))
749 (sha256
750 (base32
751 "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp"))))
752 (build-system gnu-build-system)
753 (native-inputs
754 `(("pkg-config" ,pkg-config)))
755 (home-page "https://qqwing.com/")
756 (synopsis "Sudoku puzzle solver and generator")
757 (description
758 "QQWing is a Sudoku puzzle generator and solver.
759 It offers the following features:
760 @enumerate
761 @item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds.
762 @item Uses logic. Uses as many solve techniques as possible when solving
763 puzzles rather than guessing.
764 @item Rates puzzles. Most generators don't give an indication of the difficulty
765 of a Sudoku puzzle. QQwing does.
766 @item Can print solve instructions for any puzzle.
767 @item Customizable output style, including a CSV style that is easy to
768 import into a database.
769 @end enumerate")
770 (license license:gpl2+)))
771
772 (define-public quesoglc
773 (package
774 (name "quesoglc")
775 (version "0.7.2")
776 (source (origin
777 (method url-fetch)
778 (uri (string-append "mirror://sourceforge/" name "/" version "/"
779 name "-" version "-free.tar.bz2"))
780 (sha256
781 (base32
782 "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks"))))
783 (build-system gnu-build-system)
784 (native-inputs `(("pkg-config" ,pkg-config)))
785 (inputs `(("fontconfig" ,fontconfig)
786 ("freeglute" ,freeglut)
787 ("fribidi" ,fribidi)
788 ("glew" ,glew)))
789 (home-page "http://quesoglc.sourceforge.net")
790 (synopsis "Implementation of the OpenGL Character Renderer (GLC)")
791 (description
792 "The OpenGL Character Renderer (GLC) is a state machine that provides
793 OpenGL programs with character rendering services via an application programming
794 interface (API).")
795 (license (list license:expat license:lgpl2.1+))))
796
797 (define-public python-pygame
798 (package
799 (name "python-pygame")
800 (version "1.9.3")
801 (source (origin
802 (method url-fetch)
803 (uri (pypi-uri "pygame" version))
804 (sha256
805 (base32
806 "1hlydiyygl444bq5m5g8n3jsxsgrdyxlm42ipmfbw36wkf0j243m"))))
807 (build-system python-build-system)
808 (arguments
809 `(#:tests? #f ; Tests require pygame to be installed first.
810 #:phases
811 (modify-phases %standard-phases
812 ;; Set the paths to the dependencies manually because
813 ;; the configure script does not allow passing them as
814 ;; parameters. This also means we can skip the configure
815 ;; phase.
816 (add-before 'build 'set-library-paths
817 (lambda* (#:key inputs outputs #:allow-other-keys)
818 (let ((sdl-ref (assoc-ref inputs "sdl"))
819 (font-ref (assoc-ref inputs "sdl-ttf"))
820 (image-ref (assoc-ref inputs "sdl-image"))
821 (mixer-ref (assoc-ref inputs "sdl-mixer"))
822 (smpeg-ref (assoc-ref inputs "libsmpeg"))
823 (png-ref (assoc-ref inputs "libpng"))
824 (jpeg-ref (assoc-ref inputs "libjpeg"))
825 (freetype-ref (assoc-ref inputs "freetype"))
826 (v4l-ref (assoc-ref inputs "v4l-utils"))
827 (out-ref (assoc-ref outputs "out")))
828 (substitute* "Setup.in"
829 (("SDL = -I/usr/include/SDL")
830 (string-append "SDL = -I" sdl-ref "/include/SDL -I.")))
831 (substitute* "Setup.in"
832 (("FONT = -lSDL_ttf")
833 (string-append "FONT = -I" font-ref "/include/SDL -L"
834 font-ref "/lib -lSDL_ttf")))
835 (substitute* "Setup.in"
836 (("IMAGE = -lSDL_image")
837 (string-append "IMAGE = -I" image-ref "/include/SDL -L"
838 image-ref "/lib -lSDL_image")))
839 (substitute* "Setup.in"
840 (("MIXER = -lSDL_mixer")
841 (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
842 mixer-ref "/lib -lSDL_mixer")))
843 (substitute* "Setup.in"
844 (("SMPEG = -lsmpeg")
845 (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
846 smpeg-ref "/lib -lsmpeg")))
847 (substitute* "Setup.in"
848 (("PNG = -lpng")
849 (string-append "PNG = -I" png-ref "/include -L"
850 png-ref "/lib -lpng")))
851 (substitute* "Setup.in"
852 (("JPEG = -ljpeg")
853 (string-append "JPEG = -I" jpeg-ref "/include -L"
854 jpeg-ref "/lib -ljpeg")))
855
856 (substitute* "Setup.in"
857 (("FREETYPE = -lfreetype")
858 (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L"
859 freetype-ref "/lib -lfreetype")))
860
861 (substitute* "Setup.in"
862 (("^pypm") "#pypm"))
863 ;; Create a path to a header file provided by v4l-utils.
864 (system* "mkdir" "linux")
865 (system* "ln" "--symbolic"
866 (string-append v4l-ref "/include/libv4l1-videodev.h")
867 "linux/videodev.h")
868 (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
869 (inputs
870 `(("freetype" ,freetype)
871 ("sdl" ,sdl)
872 ("sdl-image" ,sdl-image)
873 ("sdl-mixer" ,sdl-mixer)
874 ("sdl-ttf" ,sdl-ttf)
875 ("sdl-gfx" ,sdl-gfx)
876 ("libjpeg" ,libjpeg)
877 ("libpng" ,libpng)
878 ("libX11" ,libx11)
879 ("libsmpeg" ,libsmpeg)
880 ("portmidi" ,portmidi)
881 ("v4l-utils" ,v4l-utils)))
882 (home-page "https://www.pygame.org")
883 (synopsis "SDL wrapper for Python")
884 (description "Pygame is a set of Python modules designed for writing games.
885 Pygame adds functionality on top of the excellent SDL library. This allows you
886 to create fully featured games and multimedia programs in the python language.")
887 (license (list license:bsd-2
888 ;; python numeric license as listed by Debian looks like
889 ;; an Expat-style license with a warranty disclaimer for
890 ;; the U.S. government and the University of California.
891 license:expat
892 license:lgpl2.0+
893 license:lgpl2.1+
894 license:gpl3+
895 license:psfl
896 license:public-domain
897 license:lgpl2.1+))))
898
899 (define-public python2-pygame
900 (package-with-python2 python-pygame))
901
902 (define-public grafx2
903 (package
904 (name "grafx2")
905 (version "2.4")
906 (source (origin
907 (method url-fetch)
908 ;; XXX: There is no URL that contains the version. :(
909 (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21")
910 (sha256
911 (base32
912 "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q"))))
913 (build-system gnu-build-system)
914 (arguments
915 '(#:phases
916 (modify-phases %standard-phases
917 (delete 'configure) ; no configure script
918 (add-before 'build 'change-to-src-directory
919 (lambda _
920 (chdir "src")
921 #t)))
922 #:make-flags
923 ;; SDL header files are referenced without the preceeding "SDL/".
924 (list (string-append "CFLAGS=-I"
925 (assoc-ref %build-inputs "sdl-union")
926 "/include/SDL")
927 (string-append "prefix="
928 (assoc-ref %outputs "out")))
929 #:tests? #f)) ; no check target
930 (native-inputs
931 `(("pkg-config" ,pkg-config)))
932 (inputs
933 `(("libpng" ,libpng)
934 ("lua" ,lua-5.1)
935 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf)))))
936 (synopsis "Bitmap paint program")
937 (description "GrafX2 is a bitmap paint program inspired by the Amiga
938 programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it
939 includes a very large number of tools and effects that make it particularly
940 suitable for pixel art, game graphics, and generally any detailed graphics
941 painted with a mouse.")
942 (home-page "http://pulkomandy.tk/projects/GrafX2")
943 (license license:gpl2))) ; GPLv2 only
944
945 (define-public ois
946 (package
947 (name "ois")
948 (version "1.3")
949 (source
950 (origin
951 ;; Development has moved to github and there are no recent tarball
952 ;; releases.
953 (method git-fetch)
954 (uri (git-reference
955 (url "https://github.com/wgois/OIS.git")
956 (commit "bb75ccc1aabc1c547195579963601ff6080ca2f2")))
957 (file-name (string-append name "-" version))
958 (sha256
959 (base32
960 "0w0pamjc3vj0jr718hysrw8x076fq6n9rd6wcb36sn2jd0lqvi98"))))
961 (build-system gnu-build-system)
962 (arguments
963 `(#:phases
964 (modify-phases %standard-phases
965 (add-after 'unpack 'bootstrap
966 (lambda _ (zero? (system* "sh" "bootstrap")))))))
967 (native-inputs
968 `(("autoconf" ,autoconf)
969 ("automake" ,automake)
970 ("libtool" ,libtool)
971 ("m4" ,m4)
972 ("pkg-config" ,pkg-config)))
973 (inputs
974 `(("libxaw" ,libxaw)))
975 (synopsis "Object Oriented Input System")
976 (description
977 "Cross Platform Object Oriented Input Lib System is a cross platform,
978 simple solution for using all kinds of Input Devices (Keyboards, Mice,
979 Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very
980 robust and compatible with many systems and operating systems.")
981 (home-page "https://github.com/wgois/OIS")
982 (license license:zlib)))
983
984 (define-public mygui
985 (package
986 (name "mygui")
987 (version "3.2.2")
988 (source
989 (origin
990 (method url-fetch)
991 (uri
992 (string-append "https://github.com/MyGUI/" name
993 "/archive/MyGUI" version ".tar.gz"))
994 (sha256
995 (base32
996 "13x7cydmj7gjmsg702sqjbfi53z265iv6j7binv3r6a7ibndfa0a"))))
997 (build-system cmake-build-system)
998 (arguments
999 '(#:tests? #f ; No test target
1000 #:configure-flags
1001 (list "-DMYGUI_INSTALL_DOCS=TRUE"
1002 (string-append "-DOGRE_INCLUDE_DIR="
1003 (assoc-ref %build-inputs "ogre")
1004 "/include/OGRE"))))
1005 (native-inputs
1006 `(("boost" ,boost)
1007 ("doxygen" ,doxygen)
1008 ("pkg-config" ,pkg-config)))
1009 (inputs
1010 `(("font-dejavu" ,font-dejavu)
1011 ("freetype" ,freetype)
1012 ("graphviz" ,graphviz)
1013 ("libx11" ,libx11)
1014 ("ogre" ,ogre)
1015 ("ois" ,ois)))
1016 (synopsis "Fast, flexible and simple GUI")
1017 (description
1018 "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games
1019 and 3D applications. The main goals of mygui are: speed, flexibility and ease
1020 of use.")
1021 (home-page "http://mygui.info/")
1022 (license license:expat)))
1023
1024 (define-public openmw
1025 (package
1026 (name "openmw")
1027 (version "0.43.0")
1028 (source
1029 (origin
1030 (method url-fetch)
1031 (uri
1032 (string-append "https://github.com/OpenMW/openmw/archive/"
1033 name "-" version ".tar.gz"))
1034 (sha256
1035 (base32
1036 "11phjx7b3mv4n295xgq25lkcwq0mgr35i5k05hf1h77y6n6jbw64"))))
1037 (build-system cmake-build-system)
1038 (arguments
1039 `(#:tests? #f ; No test target
1040 #:configure-flags
1041 (list "-DDESIRED_QT_VERSION=5")))
1042 (native-inputs
1043 `(("boost" ,boost)
1044 ("doxygen" ,doxygen)
1045 ("pkg-config" ,pkg-config)))
1046 (inputs
1047 `(("bullet" ,bullet)
1048 ("ffmpeg" ,ffmpeg)
1049 ("libxt" ,libxt)
1050 ("mygui" ,mygui)
1051 ("openal" ,openal)
1052 ("openscenegraph" ,openscenegraph)
1053 ("qtbase" ,qtbase)
1054 ("sdl" ,sdl2)
1055 ("unshield" ,unshield)))
1056 (synopsis "Re-implementation of the RPG Morrowind engine")
1057 (description
1058 "OpenMW is a game engine which reimplements and extends the one that runs
1059 the 2002 open-world RPG Morrowind. The engine comes with its own editor,
1060 called OpenMW-CS which allows the user to edit or create their own original
1061 games.")
1062 (home-page "https://openmw.org")
1063 (license license:gpl3)))
1064
1065 (define-public godot
1066 (package
1067 (name "godot")
1068 (version "3.0.2")
1069 (source (origin
1070 (method url-fetch)
1071 (uri
1072 (string-append "https://github.com/godotengine/godot/archive/"
1073 version "-stable.tar.gz"))
1074 (file-name (string-append name "-" version ".tar.gz"))
1075 (sha256
1076 (base32
1077 "0ldnk3j4w2kh454mzclmq8nk7zqrn758yrqq85i4kzljpkf93g0m"))
1078 (modules '((guix build utils)))
1079 (snippet
1080 '(begin
1081 ;; Drop libraries that we take from Guix. Note that some
1082 ;; of these may be modified; see "thirdparty/README.md".
1083 (with-directory-excursion "thirdparty"
1084 (for-each delete-file-recursively
1085 '("freetype"
1086 "libogg"
1087 "libpng"
1088 "libtheora"
1089 "libvorbis"
1090 "libvpx"
1091 "libwebp"
1092 "openssl"
1093 "opus"
1094 "zlib"))
1095 #t)))))
1096 (build-system scons-build-system)
1097 (arguments
1098 `(#:scons ,scons-python2
1099 #:scons-flags (list "platform=x11"
1100 ,@(if (string-prefix? "aarch64" (or (%current-target-system)
1101 (%current-system)))
1102 `("CCFLAGS=-DNO_THREADS")
1103 '())
1104 ;; Avoid using many of the bundled libs.
1105 ;; Note: These options can be found in the SConstruct file.
1106 "builtin_freetype=no"
1107 "builtin_glew=no"
1108 "builtin_libmpdec=no"
1109 "builtin_libogg=no"
1110 "builtin_libpng=no"
1111 "builtin_libtheora=no"
1112 "builtin_libvorbis=no"
1113 "builtin_libvpx=no"
1114 "builtin_libwebp=no"
1115 "builtin_openssl=no"
1116 "builtin_opus=no"
1117 "builtin_zlib=no")
1118 #:tests? #f ; There are no tests
1119 #:phases
1120 (modify-phases %standard-phases
1121 (add-after 'unpack 'scons-use-env
1122 (lambda _
1123 ;; Scons does not use the environment variables by default,
1124 ;; but this substitution makes it do so.
1125 (substitute* "SConstruct"
1126 (("env_base = Environment\\(tools=custom_tools\\)")
1127 (string-append
1128 "env_base = Environment(tools=custom_tools)\n"
1129 "env_base = Environment(ENV=os.environ)")))
1130 #t))
1131 (replace 'install
1132 (lambda* (#:key outputs #:allow-other-keys)
1133 (let* ((out (assoc-ref outputs "out"))
1134 (bin (string-append out "/bin")))
1135 (with-directory-excursion "bin"
1136 (if (file-exists? "godot.x11.tools.64")
1137 (rename-file "godot.x11.tools.64" "godot")
1138 (rename-file "godot.x11.tools.32" "godot"))
1139 (install-file "godot" bin))
1140 #t)))
1141 (add-after 'install 'install-godot-desktop
1142 (lambda* (#:key outputs #:allow-other-keys)
1143 (let* ((out (assoc-ref outputs "out"))
1144 (desktop (string-append out "/share/applications"))
1145 (icon-dir (string-append out "/share/pixmaps")))
1146 (rename-file "icon.png" "godot.png")
1147 (install-file "godot.png" icon-dir)
1148 (mkdir-p desktop)
1149 (with-output-to-file
1150 (string-append desktop "/godot.desktop")
1151 (lambda _
1152 (format #t
1153 "[Desktop Entry]~@
1154 Name=godot~@
1155 Comment=The godot game engine~@
1156 Exec=~a/bin/godot~@
1157 TryExec=~@*~a/bin/godot~@
1158 Icon=godot~@
1159 Type=Application~%"
1160 out)))
1161 #t))))))
1162 (native-inputs `(("pkg-config" ,pkg-config)))
1163 (inputs `(("alsa-lib" ,alsa-lib)
1164 ("freetype" ,freetype)
1165 ("glew" ,glew)
1166 ("glu" ,glu)
1167 ("libtheora" ,libtheora)
1168 ("libvorbis" ,libvorbis)
1169 ("libvpx" ,libvpx)
1170 ("libwebp" ,libwebp)
1171 ("libx11" ,libx11)
1172 ("libxcursor" ,libxcursor)
1173 ("libxi" ,libxi)
1174 ("libxinerama" ,libxinerama)
1175 ("libxrandr" ,libxrandr)
1176 ("mesa" ,mesa)
1177 ("openssl" ,openssl)
1178 ("opusfile" ,opusfile)
1179 ("pulseaudio" ,pulseaudio)))
1180 (home-page "https://godotengine.org/")
1181 (synopsis "Advanced 2D and 3D game engine")
1182 (description
1183 "Godot is an advanced multi-platform game engine written in C++. If
1184 features design tools such as a visual editor, can import 3D models and
1185 provide high-quality 3D rendering, it contains an animation editor, and can be
1186 scripted in a Python-like language.")
1187 (license license:expat)))
1188
1189 (define-public eureka
1190 (package
1191 (name "eureka")
1192 (version "1.21")
1193 (source (origin
1194 (method url-fetch)
1195 (uri (string-append "mirror://sourceforge/eureka-editor/Eureka/"
1196 version "/eureka-"
1197 ;; version without dots e.g 1.21 => 121
1198 (string-join (string-split version #\.) "")
1199 "-source.tar.gz"))
1200 (sha256
1201 (base32
1202 "1a7pf7xi56fcz7jc8layih5gq5m66g2ss4x5j61kzgip07j6rkir"))))
1203 (build-system gnu-build-system)
1204 (arguments
1205 '(#:tests? #f
1206 #:make-flags
1207 (let ((out (assoc-ref %outputs "out")))
1208 (list (string-append "PREFIX=" out)))
1209 #:phases
1210 (modify-phases %standard-phases
1211 (delete 'configure)
1212 (add-before 'build 'prepare-install-directories
1213 (lambda* (#:key outputs #:allow-other-keys)
1214 (let ((out (assoc-ref outputs "out")))
1215 (mkdir-p (string-append out "/bin"))
1216 (mkdir-p (string-append out "/share"))
1217
1218 (with-fluids ((%default-port-encoding #f))
1219 (substitute* "./src/main.cc"
1220 (("/usr/local") out)))
1221
1222 (substitute* "Makefile"
1223 (("-o root") ""))))))))
1224 (inputs `(("mesa" ,mesa)
1225 ("libxft" ,libxft)
1226 ("libxinerama" ,libxinerama)
1227 ("libfontconfig" ,fontconfig)
1228 ("libjpeg" ,libjpeg)
1229 ("libpng" ,libpng)
1230 ("fltk" ,fltk)
1231 ("zlib" ,zlib)))
1232 (native-inputs `(("pkg-config" ,pkg-config)
1233 ("xdg-utils" ,xdg-utils)))
1234 (synopsis "Doom map editor")
1235 (description "Eureka is a map editor for the classic DOOM games, and a few
1236 related games such as Heretic and Hexen. It comes with a 3d preview mode and
1237 a 2D editor view.")
1238 (home-page "http://eureka-editor.sourceforge.net/")
1239 (license license:gpl2+)))