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