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 Efraim Flashner <efraim@flashner.co.il>
8 ;;; Copyright © 2016, 2017 Kei Kebreau <kei@openmailbox.org>
9 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
10 ;;; Copyright © 2016, 2017 Julian Graham <joolean@gmail.com>
11 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
14 ;;; This file is part of GNU Guix.
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29 (define-module (gnu packages game-development)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix utils)
35 #:use-module (guix build-system cmake)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system python)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages autotools)
40 #:use-module (gnu packages boost)
41 #:use-module (gnu packages curl)
42 #:use-module (gnu packages databases)
43 #:use-module (gnu packages documentation)
44 #:use-module (gnu packages fonts)
45 #:use-module (gnu packages fontutils)
46 #:use-module (gnu packages freedesktop)
47 #:use-module (gnu packages fribidi)
48 #:use-module (gnu packages glib)
49 #:use-module (gnu packages gnunet)
50 #:use-module (gnu packages graphics)
51 #:use-module (gnu packages graphviz)
52 #:use-module (gnu packages guile)
53 #:use-module (gnu packages m4)
54 #:use-module (gnu packages multiprecision)
55 #:use-module (gnu packages music)
56 #:use-module (gnu packages ncurses)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages qt)
59 #:use-module (gnu packages video)
60 #:use-module (gnu packages compression)
61 #:use-module (gnu packages gl)
62 #:use-module (gnu packages linux)
63 #:use-module (gnu packages xorg)
64 #:use-module (gnu packages xdisorg)
65 #:use-module (gnu packages fontutils)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages audio)
68 #:use-module (gnu packages pulseaudio)
69 #:use-module (gnu packages gnome)
70 #:use-module (gnu packages gtk)
71 #:use-module (gnu packages sdl)
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages xiph)
74 #:use-module (gnu packages lua)
75 #:use-module (gnu packages mp3)
76 #:use-module (gnu packages xml))
84 (uri (string-append "https://github.com/bulletphysics/bullet3/"
85 "archive/" version ".tar.gz"))
86 (file-name (string-append name "-" version ".tar.gz"))
89 "0nghzcl84p8di215p7xj0gy1hyy072hw2xk9cnmav9hv6bjb4n60"))))
90 (build-system cmake-build-system)
92 '(#:configure-flags (list (string-append
93 "-DBUILD_SHARED_LIBS=ON "
94 "-DCMAKE_CXX_FLAGS=-fPIC "
95 (or (getenv "CXXFLAGS") "")))))
100 (home-page "http://bulletphysics.org/")
101 (synopsis "3D physics engine library")
103 "Bullet is a physics engine library usable for collision detection. It
104 is used in some video games and movies.")
105 (license license:zlib)))
107 (define-public deutex
113 (uri (string-append "https://github.com/Doom-Utils/" name
114 "/releases/download/v" version "/"
115 name "-" version ".tar.xz"))
118 "1jvffcpq64hk3jysz4q6zi9hqkksy151ci9553h8q7wrrkbw0i9z"))))
119 (build-system gnu-build-system)
120 (native-inputs `(("asciidoc" ,asciidoc)))
121 (home-page "https://github.com/Doom-Utils/deutex")
122 (synopsis "WAD file composer for Doom and related games")
124 "DeuTex is a wad composer for Doom, Heretic, Hexen and Strife. It can be
125 used to extract the lumps of a wad and save them as individual files.
126 Conversely, it can also build a wad from separate files. When extracting a
127 lump to a file, it does not just copy the raw data, it converts it to an
128 appropriate format (such as PPM for graphics, Sun audio for samples, etc.).
129 Conversely, when it reads files for inclusion in pwads, it does the necessary
130 conversions (for example, from PPM to Doom picture format). In addition,
131 DeuTex has functions such as merging wads, etc.")
132 (license license:gpl2+)))
134 (define-public grfcodec
140 (uri (string-append "http://binaries.openttd.org/extra/"
141 name "/" version "/" name "-" version
145 "08admgnpqcsifpicbm56apgv360fxapqpbbsp10qyk8i22w1ivsk"))))
146 (build-system gnu-build-system)
148 '(#:tests? #f ; no check target
150 (modify-phases %standard-phases
151 (delete 'configure) ; no configure script
152 (replace 'install ; no install target
153 (lambda* (#:key outputs #:allow-other-keys)
154 (let* ((out (assoc-ref outputs "out"))
155 (bin (string-append out "/bin"))
156 (doc (string-append out "/share/doc"))
157 (man (string-append out "/share/man/man1")))
158 (for-each (lambda (file)
159 (install-file file bin))
160 '("grfcodec" "grfid" "grfstrip" "nforenum"))
161 (install-file "COPYING" doc)
162 (with-directory-excursion "docs"
163 (for-each (lambda (file)
164 (install-file (string-append file ".txt") doc))
165 '("auto_correct" "commands" "grf" "grfcodec" "grftut"
166 "readme" "readme.rpn"))
167 (for-each (lambda (file)
168 (install-file file man))
169 (find-files "." "\\.1"))))
175 (synopsis "GRF development tools")
177 "The @dfn{Graphics Resource File} (GRF) development tools are a set of
178 tools for developing (New)GRFs. It includes a number of smaller programs, each
179 with a specific task:
181 @item @code{grfcodec} decodes and encodes GRF files for OpenTTD.
182 @item @code{grfid} extracts the so-called \"GRF ID\" from a GRF.
183 @item @code{grfstrip} strips all sprites from a GRF.
184 @item @code{nforenum} checks NFO code for errors, making corrections when
187 (home-page "http://dev.openttdcoop.org/projects/grfcodec")
188 ;; GRFCodec, GRFID, and GRFStrip are exclusively under the GPL2.
189 ;; NFORenum is under the GPL2+.
190 ;; The MD5 implementation contained in GRFID is under the zlib license.
191 (license (list license:gpl2 license:gpl2+ license:zlib))))
193 (define-public gzochi
199 (uri (string-append "mirror://savannah/gzochi/gzochi-"
203 "13j1m92zhxwkaaja3lg5x0h0b28mrrawdzk9d3hd19031akfxwb3"))))
204 (build-system gnu-build-system)
205 (native-inputs `(("pkgconfig" ,pkg-config)))
206 (inputs `(("bdb" ,bdb)
209 ("libmicrohttpd" ,libmicrohttpd)
213 (home-page "http://www.nongnu.org/gzochi/")
214 (synopsis "Scalable middleware for multiplayer games")
216 "gzochi is a framework for developing massively multiplayer online games.
217 A server container provides services to deployed games, which are written in
218 Guile Scheme, that abstract and simplify some of the most challenging and
219 error-prone aspects of online game development: Concurrency, data persistence,
220 and network communications. A very thin client library can be embedded to
221 provide connectivity for client applications written in any language.")
222 (license license:gpl3+)))
231 (uri (string-append "http://bundles.openttdcoop.org/nml/releases/"
232 version "/nml-" version ".tar.gz"))
235 "0wk9ls5qyjwkra54rkj1gg94xbwzi7b84a5fh1ma1q7pbimi8rmg"))))
236 (build-system python-build-system)
238 `(("python-pillow" ,python-pillow)
239 ("python-ply" ,python-ply)))
240 (home-page "http://dev.openttdcoop.org/projects/nml")
241 (synopsis "NML compiler")
243 "@dfn{NewGRF Meta Language} (NML) is a python-based compiler, capable of
244 compiling NML files (along with their associated language, sound and graphic
245 files) into @file{.grf} and/or @file{.nfo} files.")
246 (license license:gpl2+)))
248 (define-public python-sge-pygame
250 (name "python-sge-pygame")
255 (uri (pypi-uri "sge-pygame" version))
258 "0g0n722md6nfayiqzadwf0dh821hzqv0alp4by0vjfwr1xzv49mc"))))
259 (build-system python-build-system)
261 `(("python-pygame" ,python-pygame)
262 ("python-six" ,python-six)
263 ("python-uniseg" ,python-uniseg)))
264 (home-page "http://stellarengine.nongnu.org")
265 (synopsis "2D game engine for Python")
267 "The SGE Game Engine (\"SGE\", pronounced like \"Sage\") is a
268 general-purpose 2D game engine. It takes care of several details fro you so
269 you can focus on the game itself. This makes more rapid game development
270 possible, and it also makes the SGE easy to learn.")
271 (license license:lgpl3+)))
273 (define-public python2-sge-pygame
274 (package-with-python2 python-sge-pygame))
276 (define-public python-tmx
283 (uri (string-append "mirror://savannah/python-tmx/"
284 (version-major+minor version) "/tmx-"
288 "1is107sx3lr09dqjiyn10xqhyv5x54c2ryhys9mb9j3mxjbm227l"))))
289 (build-system python-build-system)
291 `(("python-six" ,python-six)))
292 (home-page "http://python-tmx.nongnu.org")
293 (synopsis "Python library for the @code{Tiled} TMX format")
295 "Python TMX reads and writes the @code{Tiled} TMX format in a simple way.
296 This is useful for map editors or generic level editors, and it's also useful
297 for using a map editor or generic level editor like Tiled to edit your game's
299 (license (list license:asl2.0
300 ;; Documentation (only available in the source tarball) is
301 ;; under the CC0 license.
304 (define-public python2-tmx
305 (let ((python2-tmx (package-with-python2 python-tmx)))
307 (inherit python2-tmx)
309 `(("python2-pathlib" ,python2-pathlib)
310 ,@(package-propagated-inputs python2-tmx))))))
312 (define-public python-xsge
315 (version "2017.06.09")
318 (uri (string-append "mirror://savannah/xsge/xsge/xsge-"
322 "1vy7c2y7ihvmggs93zgfv2h3049s384wid8a5snzrrba8bhbb89p"))))
323 (build-system python-build-system)
326 (modify-phases %standard-phases
327 ;; xSGE's setup.py script does not support one of the Python build
328 ;; system's default flags, "--single-version-externally-managed".
330 (lambda* (#:key outputs #:allow-other-keys)
332 (system* "python" "setup.py" "install"
333 (string-append "--prefix=" (assoc-ref outputs "out"))
335 #:tests? #f)) ; no check target
337 `(("python-sge-pygame" ,python-sge-pygame)
338 ("python-pygame" ,python-pygame)
339 ("python-six" ,python-six)
340 ("python-tmx" ,python-tmx)))
341 (home-page "http://xsge.nongnu.org")
342 (synopsis "Extensions for the SGE Game Engine")
344 "xSGE is a collection of modules that make doing certain tasks with the SGE
345 Game Engine easier. In addition to SGE's conveniences, the user has access to a
346 GUI toolkit, lighting and physics frameworks and @code{Tiled} TMX format
348 (license license:gpl3+)))
350 (define-public python2-xsge
351 (package-with-python2 python-xsge))
359 (uri (string-append "https://github.com/bjorn/tiled/archive/v"
361 (file-name (string-append name "-" version ".tar.gz"))
364 "134xi74xajh38rj1qhmc4x1zmncfdmqb01axnkxh6zs3qz0rxp93"))))
365 (build-system gnu-build-system)
371 `(("qttools" ,qttools)))
374 (modify-phases %standard-phases
376 (lambda* (#:key inputs outputs #:allow-other-keys)
377 (substitute* "translations/translations.pro"
379 (string-append "LRELEASE = "
380 (assoc-ref inputs "qttools")
382 (let ((out (assoc-ref outputs "out")))
384 (string-append "PREFIX=" out))))))))
385 (home-page "http://www.mapeditor.org/")
386 (synopsis "Tile map editor")
388 "Tiled is a general purpose tile map editor. It is meant to be used for
389 editing maps of any tile-based game, be it an RPG, a platformer or a Breakout
392 ;; As noted in 'COPYING', part of it is under GPLv2+, while the rest is
394 (license license:gpl2+)))
402 ;; Do not fetch the archives from
403 ;; http://mirror0.sfml-dev.org/files/ because files there seem
404 ;; to be changed in place.
405 (uri (string-append "https://github.com/SFML/SFML/archive/"
407 (file-name (string-append name "-" version ".tar.gz"))
410 "0k2fl5xk3ni2q8bsxl0551inx26ww3w6cp6hssvww0wfjdjcirsm"))))
411 (build-system cmake-build-system)
414 (list "-DSFML_INSTALL_PKGCONFIG_FILES=TRUE")
415 #:tests? #f)) ; no tests
420 ("libvorbis" ,libvorbis)
422 ("xcb-util-image" ,xcb-util-image)
423 ("libxrandr" ,libxrandr)
425 ("freetype" ,freetype)
427 ("libsndfile" ,libsndfile)
429 (home-page "https://www.sfml-dev.org")
430 (synopsis "Simple and Fast Multimedia Library")
432 "SFML provides a simple interface to the various computer components,
433 to ease the development of games and multimedia applications. It is composed
434 of five modules: system, window, graphics, audio and network.")
435 (license license:zlib)))
443 (uri (string-append "http://www.drpetter.se/files/sfxr-sdl-1.2.1.tar.gz"))
446 "0dfqgid6wzzyyhc0ha94prxax59wx79hqr25r6if6by9cj4vx4ya"))))
447 (build-system gnu-build-system)
449 `(#:phases (modify-phases %standard-phases
450 (delete 'configure) ; no configure script
451 (add-before 'build 'patch-makefile
452 (lambda* (#:key outputs #:allow-other-keys)
453 (let ((out (assoc-ref outputs "out")))
454 (substitute* "Makefile"
455 (("\\$\\(DESTDIR\\)/usr") out))
456 (substitute* "main.cpp"
458 (string-append out "/share")))
460 #:tests? #f)) ; no tests
462 `(("pkg-config" ,pkg-config)
463 ("desktop-file-utils" ,desktop-file-utils)))
467 (synopsis "Simple sound effect generator")
468 (description "Sfxr is a tool for quickly generating simple sound effects.
469 Originally created for use in video game prototypes, it can generate random
470 sounds from presets such as \"explosion\" or \"powerup\".")
471 (home-page "http://www.drpetter.se/project_sfxr.html")
472 (license license:expat)))
474 (define-public physfs
481 "https://icculus.org/physfs/downloads/physfs-"
483 (file-name (string-append name "-" version ".tar.gz"))
486 "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na"))))
487 (build-system cmake-build-system)
489 '(#:tests? #f)) ; no check target
493 `(("doxygen" ,doxygen)))
494 (home-page "https://icculus.org/physfs")
495 (synopsis "File system abstraction library")
497 "PhysicsFS is a library to provide abstract access to various archives.
498 It is intended for use in video games. For security, no file writing done
499 through the PhysicsFS API can leave a defined @emph{write directory}. For
500 file reading, a @emph{search path} with archives and directories is defined,
501 and it becomes a single, transparent hierarchical file system. So archive
502 files can be accessed in the same way as you access files directly on a disk,
503 and it makes it easy to ship a new archive that will override a previous
504 archive on a per-file basis.")
505 (license license:zlib)))
513 (uri (string-append "https://bitbucket.org/rude/love/downloads/"
514 "love-" version "-linux-src.tar.gz"))
517 "11x346pw0gqad8nmkmywzx4xpcbfc3dslbrdw5x94n1i25mk0sxj"))))
518 (build-system gnu-build-system)
520 `(("pkg-config" ,pkg-config)))
523 ("freetype" ,freetype)
524 ("libmodplug" ,libmodplug)
525 ("libtheora" ,libtheora)
526 ("libvorbis" ,libvorbis)
534 (synopsis "2D game framework for Lua")
535 (description "LÖVE is a framework for making 2D games in the Lua
536 programming language.")
537 (home-page "https://love2d.org/")
538 (license license:zlib)))
540 (define-public allegro-4
546 (uri (string-append "https://github.com/liballeg/allegro5/"
547 "releases/download/" version "/allegro-"
551 "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v"))))
552 (build-system cmake-build-system)
555 (modify-phases %standard-phases
556 (add-after 'unpack 'patch-build-system
558 ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
559 ;; via a command line option doesn't work because it is
560 ;; unconditionally clobbered in the build script.
561 (substitute* '("CMakeLists.txt")
562 (("ADDON_LINKAGE STATIC")
563 "ADDON_LINKAGE SHARED"))
568 ("libvorbis" ,libvorbis)
571 (synopsis "Game programming library")
572 (description "Allegro is a library mainly aimed at video game and
573 multimedia programming. It handles common, low-level tasks such as creating
574 windows, accepting user input, loading data, drawing images, playing sounds,
576 (home-page "http://liballeg.org")
577 (license license:giftware)))
579 (define-public allegro
585 (uri (string-append "https://github.com/liballeg/allegro5/releases"
586 "/download/" version "/allegro-"
587 (if (equal? "0" (string-take-right version 1))
588 (string-drop-right version 2)
593 "1z4lrrlmn471wb7vzbd9iw7g379vj0k964vy1s64hcvv5bhvk1g2"))))
594 (build-system cmake-build-system)
595 (arguments `(#:tests? #f)) ; there are no tests
597 ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb
599 ("freetype" ,freetype)
604 ("libtheora" ,libtheora)
605 ("libvorbis" ,libvorbis)
606 ("libxcursor" ,libxcursor)
607 ("libxinerama" ,libxinerama)
608 ("libxrandr" ,libxrandr)
614 `(("pkg-config" ,pkg-config)))
615 (synopsis "Game programming library")
616 (description "Allegro is a library mainly aimed at video game and
617 multimedia programming. It handles common, low-level tasks such as creating
618 windows, accepting user input, loading data, drawing images, playing sounds,
620 (home-page "http://liballeg.org")
621 (license license:bsd-3)))
623 (define-public allegro-5.0
624 (package (inherit allegro)
629 (uri (string-append "https://github.com/liballeg/allegro5/releases"
630 "/download/" version "/allegro-"
631 (if (equal? "0" (string-take-right version 1))
632 (string-drop-right version 2)
637 "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9"))))))
639 (define-public aseprite
642 (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL.
643 ;; TODO: Unbundle third party software.
645 (method url-fetch/zipbomb)
646 (uri (string-append "https://github.com/aseprite/aseprite"
647 "/releases/download/v" version
648 "/Aseprite-v" version "-Source.zip"))
651 "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv"))))
652 (build-system cmake-build-system)
655 ;; Use shared libraries instead of building bundled source.
656 (list "-DWITH_WEBP_SUPPORT=1"
657 "-DUSE_SHARED_CURL=1"
658 "-DUSE_SHARED_GIFLIB=1"
659 "-DUSE_SHARED_JPEGLIB=1"
660 "-DUSE_SHARED_ZLIB=1"
661 "-DUSE_SHARED_LIBPNG=1"
662 "-DUSE_SHARED_LIBLOADPNG=1"
663 "-DUSE_SHARED_LIBWEBP=1"
664 "-DUSE_SHARED_TINYXML=1"
665 "-DUSE_SHARED_PIXMAN=1"
666 "-DUSE_SHARED_FREETYPE=1"
667 "-DUSE_SHARED_ALLEGRO4=1"
668 "-DENABLE_UPDATER=0" ; no auto-updates
669 (string-append "-DFREETYPE_INCLUDE_DIR="
670 (assoc-ref %build-inputs "freetype")
671 "/include/freetype2"))))
673 `(("pkg-config" ,pkg-config)))
674 ;; TODO: Use a patched Allegro 4 that supports window resizing. This
675 ;; patched version is bundled with Aseprite, but the patches should be
676 ;; extracted and applied on top of a standalone Allegro 4 package.
678 `(("allegro" ,allegro-4)
680 ("freetype" ,freetype)
687 ("libxxf86vm" ,libxxf86vm)
691 (synopsis "Animated sprite editor and pixel art tool")
692 (description "Aseprite is a tool for creating 2D pixel art for video
693 games. In addition to basic pixel editing features, Aseprite can assist in
694 the creation of animations, tiled graphics, texture atlases, and more.")
695 (home-page "https://www.aseprite.org/")
696 (license license:gpl2+)))
698 (define-public qqwing
705 "https://qqwing.com/"
706 name "-" version ".tar.gz"))
709 "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp"))))
710 (build-system gnu-build-system)
712 `(("pkg-config" ,pkg-config)))
713 (home-page "https://qqwing.com/")
714 (synopsis "Sudoku puzzle solver and generator")
716 "QQWing is a Sudoku puzzle generator and solver.
717 It offers the following features:
719 @item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds.
720 @item Uses logic. Uses as many solve techniques as possible when solving
721 puzzles rather than guessing.
722 @item Rates puzzles. Most generators don't give an indication of the difficulty
723 of a Sudoku puzzle. QQwing does.
724 @item Can print solve instructions for any puzzle.
725 @item Customizable output style, including a CSV style that is easy to
726 import into a database.
728 (license license:gpl2+)))
730 (define-public quesoglc
736 (uri (string-append "mirror://sourceforge/" name "/" version "/"
737 name "-" version "-free.tar.bz2"))
740 "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks"))))
741 (build-system gnu-build-system)
742 (native-inputs `(("pkg-config" ,pkg-config)))
743 (inputs `(("fontconfig" ,fontconfig)
744 ("freeglute" ,freeglut)
747 (home-page "http://quesoglc.sourceforge.net")
748 (synopsis "Implementation of the OpenGL Character Renderer (GLC)")
750 "The OpenGL Character Renderer (GLC) is a state machine that provides
751 OpenGL programs with character rendering services via an application programming
753 (license (list license:expat license:lgpl2.1+))))
755 (define-public python-pygame
757 (name "python-pygame")
761 (uri (pypi-uri "pygame" version))
764 "1hlydiyygl444bq5m5g8n3jsxsgrdyxlm42ipmfbw36wkf0j243m"))))
765 (build-system python-build-system)
767 `(#:tests? #f ; Tests require pygame to be installed first.
769 (modify-phases %standard-phases
770 ;; Set the paths to the dependencies manually because
771 ;; the configure script does not allow passing them as
772 ;; parameters. This also means we can skip the configure
774 (add-before 'build 'set-library-paths
775 (lambda* (#:key inputs outputs #:allow-other-keys)
776 (let ((sdl-ref (assoc-ref inputs "sdl"))
777 (font-ref (assoc-ref inputs "sdl-ttf"))
778 (image-ref (assoc-ref inputs "sdl-image"))
779 (mixer-ref (assoc-ref inputs "sdl-mixer"))
780 (smpeg-ref (assoc-ref inputs "libsmpeg"))
781 (png-ref (assoc-ref inputs "libpng"))
782 (jpeg-ref (assoc-ref inputs "libjpeg"))
783 (freetype-ref (assoc-ref inputs "freetype"))
784 (v4l-ref (assoc-ref inputs "v4l-utils"))
785 (out-ref (assoc-ref outputs "out")))
786 (substitute* "Setup.in"
787 (("SDL = -I/usr/include/SDL")
788 (string-append "SDL = -I" sdl-ref "/include/SDL -I.")))
789 (substitute* "Setup.in"
790 (("FONT = -lSDL_ttf")
791 (string-append "FONT = -I" font-ref "/include/SDL -L"
792 font-ref "/lib -lSDL_ttf")))
793 (substitute* "Setup.in"
794 (("IMAGE = -lSDL_image")
795 (string-append "IMAGE = -I" image-ref "/include/SDL -L"
796 image-ref "/lib -lSDL_image")))
797 (substitute* "Setup.in"
798 (("MIXER = -lSDL_mixer")
799 (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
800 mixer-ref "/lib -lSDL_mixer")))
801 (substitute* "Setup.in"
803 (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
804 smpeg-ref "/lib -lsmpeg")))
805 (substitute* "Setup.in"
807 (string-append "PNG = -I" png-ref "/include -L"
808 png-ref "/lib -lpng")))
809 (substitute* "Setup.in"
811 (string-append "JPEG = -I" jpeg-ref "/include -L"
812 jpeg-ref "/lib -ljpeg")))
814 (substitute* "Setup.in"
815 (("FREETYPE = -lfreetype")
816 (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L"
817 freetype-ref "/lib -lfreetype")))
819 (substitute* "Setup.in"
821 ;; Create a path to a header file provided by v4l-utils.
822 (system* "mkdir" "linux")
823 (system* "ln" "--symbolic"
824 (string-append v4l-ref "/include/libv4l1-videodev.h")
826 (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
828 `(("freetype" ,freetype)
830 ("sdl-image" ,sdl-image)
831 ("sdl-mixer" ,sdl-mixer)
837 ("libsmpeg" ,libsmpeg)
838 ("portmidi" ,portmidi)
839 ("v4l-utils" ,v4l-utils)))
840 (home-page "https://www.pygame.org")
841 (synopsis "SDL wrapper for Python")
842 (description "Pygame is a set of Python modules designed for writing games.
843 Pygame adds functionality on top of the excellent SDL library. This allows you
844 to create fully featured games and multimedia programs in the python language.")
845 (license (list license:bsd-2
846 ;; python numeric license as listed by Debian looks like
847 ;; an Expat-style license with a warranty disclaimer for
848 ;; the U.S. government and the University of California.
854 license:public-domain
857 (define-public python2-pygame
858 (package-with-python2 python-pygame))
860 (define-public grafx2
866 ;; XXX: There is no URL that contains the version. :(
867 (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21")
870 "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q"))))
871 (build-system gnu-build-system)
874 (modify-phases %standard-phases
875 (delete 'configure) ; no configure script
876 (add-before 'build 'change-to-src-directory
881 ;; SDL header files are referenced without the preceeding "SDL/".
882 (list (string-append "CFLAGS=-I"
883 (assoc-ref %build-inputs "sdl-union")
885 (string-append "prefix="
886 (assoc-ref %outputs "out")))
887 #:tests? #f)) ; no check target
889 `(("pkg-config" ,pkg-config)))
893 ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf)))))
894 (synopsis "Bitmap paint program")
895 (description "GrafX2 is a bitmap paint program inspired by the Amiga
896 programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it
897 includes a very large number of tools and effects that make it particularly
898 suitable for pixel art, game graphics, and generally any detailed graphics
899 painted with a mouse.")
900 (home-page "http://pulkomandy.tk/projects/GrafX2")
901 (license license:gpl2))) ; GPLv2 only
909 ;; Development has moved to github and there are no recent tarball
913 (url "https://github.com/wgois/OIS.git")
914 (commit "bb75ccc1aabc1c547195579963601ff6080ca2f2")))
915 (file-name (string-append name "-" version))
918 "0w0pamjc3vj0jr718hysrw8x076fq6n9rd6wcb36sn2jd0lqvi98"))))
919 (build-system gnu-build-system)
922 (modify-phases %standard-phases
923 (add-after 'unpack 'bootstrap
924 (lambda _ (zero? (system* "sh" "bootstrap")))))))
926 `(("autoconf" ,autoconf)
927 ("automake" ,automake)
930 ("pkg-config" ,pkg-config)))
932 `(("libxaw" ,libxaw)))
933 (synopsis "Object Oriented Input System")
935 "Cross Platform Object Oriented Input Lib System is a cross platform,
936 simple solution for using all kinds of Input Devices (Keyboards, Mice,
937 Joysticks, etc) and feedback devices (e.g. force feedback). Meant to be very
938 robust and compatible with many systems and operating systems.")
939 (home-page "https://github.com/wgois/OIS")
940 (license license:zlib)))
950 (string-append "https://github.com/MyGUI/" name
951 "/archive/MyGUI" version ".tar.gz"))
954 "13x7cydmj7gjmsg702sqjbfi53z265iv6j7binv3r6a7ibndfa0a"))))
955 (build-system cmake-build-system)
957 '(#:tests? #f ; No test target
959 (list "-DMYGUI_INSTALL_DOCS=TRUE"
960 (string-append "-DOGRE_INCLUDE_DIR="
961 (assoc-ref %build-inputs "ogre")
966 ("pkg-config" ,pkg-config)))
968 `(("font-dejavu" ,font-dejavu)
969 ("freetype" ,freetype)
970 ("graphviz" ,graphviz)
974 (synopsis "Fast, flexible and simple GUI")
976 "MyGUI is a library for creating Graphical User Interfaces (GUIs) for games
977 and 3D applications. The main goals of mygui are: speed, flexibility and ease
979 (home-page "http://mygui.info/")
980 (license license:expat)))