+
+(define-public physfs
+ (package
+ (name "physfs")
+ (version "2.0.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://icculus.org/physfs/downloads/physfs-"
+ version ".tar.bz2"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0sbbyqzqhyf0g68fcvvv20n3928j0x6ik1njmhn1yigvq2bj11na"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:tests? #f)) ; no check target
+ (inputs
+ `(("zlib" ,zlib)))
+ (native-inputs
+ `(("doxygen" ,doxygen)))
+ (home-page "https://icculus.org/physfs")
+ (synopsis "File system abstraction library")
+ (description
+ "PhysicsFS is a library to provide abstract access to various archives.
+It is intended for use in video games. For security, no file writing done
+through the PhysicsFS API can leave a defined @emph{write directory}. For
+file reading, a @emph{search path} with archives and directories is defined,
+and it becomes a single, transparent hierarchical file system. So archive
+files can be accessed in the same way as you access files directly on a disk,
+and it makes it easy to ship a new archive that will override a previous
+archive on a per-file basis.")
+ (license license:zlib)))
+
+(define-public love
+ (package
+ (name "love")
+ (version "0.10.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://bitbucket.org/rude/love/downloads/"
+ "love-" version "-linux-src.tar.gz"))
+ (sha256
+ (base32
+ "11x346pw0gqad8nmkmywzx4xpcbfc3dslbrdw5x94n1i25mk0sxj"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("devil" ,devil)
+ ("freetype" ,freetype)
+ ("libmodplug" ,libmodplug)
+ ("libtheora" ,libtheora)
+ ("libvorbis" ,libvorbis)
+ ("luajit" ,luajit)
+ ("mesa" ,mesa)
+ ("mpg123" ,mpg123)
+ ("openal" ,openal)
+ ("physfs" ,physfs)
+ ("sdl2" ,sdl2)
+ ("zlib" ,zlib)))
+ (synopsis "2D game framework for Lua")
+ (description "LÖVE is a framework for making 2D games in the Lua
+programming language.")
+ (home-page "https://love2d.org/")
+ (license license:zlib)))
+
+(define-public allegro-4
+ (package
+ (name "allegro")
+ (version "4.4.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/liballeg/allegro5/"
+ "releases/download/" version "/allegro-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-build-system
+ (lambda _
+ ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE
+ ;; via a command line option doesn't work because it is
+ ;; unconditionally clobbered in the build script.
+ (substitute* '("CMakeLists.txt")
+ (("ADDON_LINKAGE STATIC")
+ "ADDON_LINKAGE SHARED"))
+ #t)))))
+ (inputs
+ `(("glu" ,glu)
+ ("libpng" ,libpng)
+ ("libvorbis" ,libvorbis)
+ ("mesa" ,mesa)
+ ("zlib" ,zlib)))
+ (synopsis "Game programming library")
+ (description "Allegro is a library mainly aimed at video game and
+multimedia programming. It handles common, low-level tasks such as creating
+windows, accepting user input, loading data, drawing images, playing sounds,
+etc.")
+ (home-page "http://liballeg.org")
+ (license license:giftware)))
+
+(define-public allegro
+ (package
+ (name "allegro")
+ (version "5.2.2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/liballeg/allegro5/releases"
+ "/download/" version "/allegro-"
+ (if (equal? "0" (string-take-right version 1))
+ (string-drop-right version 2)
+ version)
+ ".tar.gz"))
+ (sha256
+ (base32
+ "1z4lrrlmn471wb7vzbd9iw7g379vj0k964vy1s64hcvv5bhvk1g2"))))
+ (build-system cmake-build-system)
+ (arguments `(#:tests? #f)) ; there are no tests
+ (inputs
+ ;; FIXME: Add the following optional inputs: xinput2, opensl, dumb
+ `(("flac" ,flac)
+ ("freetype" ,freetype)
+ ("glu" ,glu)
+ ("gtk" ,gtk+-2)
+ ("libjpeg" ,libjpeg)
+ ("libpng" ,libpng)
+ ("libtheora" ,libtheora)
+ ("libvorbis" ,libvorbis)
+ ("libxcursor" ,libxcursor)
+ ("libxinerama" ,libxinerama)
+ ("libxrandr" ,libxrandr)
+ ("mesa" ,mesa)
+ ("openal" ,openal)
+ ("physfs" ,physfs)
+ ("zlib" ,zlib)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (synopsis "Game programming library")
+ (description "Allegro is a library mainly aimed at video game and
+multimedia programming. It handles common, low-level tasks such as creating
+windows, accepting user input, loading data, drawing images, playing sounds,
+etc.")
+ (home-page "http://liballeg.org")
+ (license license:bsd-3)))
+
+(define-public allegro-5.0
+ (package (inherit allegro)
+ (name "allegro")
+ (version "5.0.11")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/liballeg/allegro5/releases"
+ "/download/" version "/allegro-"
+ (if (equal? "0" (string-take-right version 1))
+ (string-drop-right version 2)
+ version)
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9"))))))
+
+(define-public aseprite
+ (package
+ (name "aseprite")
+ (version "1.1.7") ; After 1.1.7 the source is no longer distributed under the GPL.
+ ;; TODO: Unbundle third party software.
+ (source (origin
+ (method url-fetch/zipbomb)
+ (uri (string-append "https://github.com/aseprite/aseprite"
+ "/releases/download/v" version
+ "/Aseprite-v" version "-Source.zip"))
+ (sha256
+ (base32
+ "1plss4i1lfxcznv9p0pip1bkhj7ipw7jlhsh5avd6dzw079l4nvv"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:configure-flags
+ ;; Use shared libraries instead of building bundled source.
+ (list "-DWITH_WEBP_SUPPORT=1"
+ "-DUSE_SHARED_CURL=1"
+ "-DUSE_SHARED_GIFLIB=1"
+ "-DUSE_SHARED_JPEGLIB=1"
+ "-DUSE_SHARED_ZLIB=1"
+ "-DUSE_SHARED_LIBPNG=1"
+ "-DUSE_SHARED_LIBLOADPNG=1"
+ "-DUSE_SHARED_LIBWEBP=1"
+ "-DUSE_SHARED_TINYXML=1"
+ "-DUSE_SHARED_PIXMAN=1"
+ "-DUSE_SHARED_FREETYPE=1"
+ "-DUSE_SHARED_ALLEGRO4=1"
+ "-DENABLE_UPDATER=0" ; no auto-updates
+ (string-append "-DFREETYPE_INCLUDE_DIR="
+ (assoc-ref %build-inputs "freetype")
+ "/include/freetype2"))))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ ;; TODO: Use a patched Allegro 4 that supports window resizing. This
+ ;; patched version is bundled with Aseprite, but the patches should be
+ ;; extracted and applied on top of a standalone Allegro 4 package.
+ (inputs
+ `(("allegro" ,allegro-4)
+ ("curl" ,curl)
+ ("freetype" ,freetype)
+ ("giflib" ,giflib)
+ ("libjpeg" ,libjpeg)
+ ("libpng" ,libpng)
+ ("libwebp" ,libwebp)
+ ("libx11" ,libx11)
+ ("libxext" ,libxext)
+ ("libxxf86vm" ,libxxf86vm)
+ ("pixman" ,pixman)
+ ("tinyxml" ,tinyxml)
+ ("zlib" ,zlib)))
+ (synopsis "Animated sprite editor and pixel art tool")
+ (description "Aseprite is a tool for creating 2D pixel art for video
+games. In addition to basic pixel editing features, Aseprite can assist in
+the creation of animations, tiled graphics, texture atlases, and more.")
+ (home-page "https://www.aseprite.org/")
+ (license license:gpl2+)))
+
+(define-public qqwing
+ (package
+ (name "qqwing")
+ (version "1.3.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://qqwing.com/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0bw0papyqjg22z6irf36gs54y8236wa37b6gyn2h1spy65n76lqp"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "https://qqwing.com/")
+ (synopsis "Sudoku puzzle solver and generator")
+ (description
+ "QQWing is a Sudoku puzzle generator and solver.
+It offers the following features:
+@enumerate
+@item Can solve 1000 puzzles in 1 second and generate 1000 puzzles in 25 seconds.
+@item Uses logic. Uses as many solve techniques as possible when solving
+ puzzles rather than guessing.
+@item Rates puzzles. Most generators don't give an indication of the difficulty
+ of a Sudoku puzzle. QQwing does.
+@item Can print solve instructions for any puzzle.
+@item Customizable output style, including a CSV style that is easy to
+ import into a database.
+@end enumerate")
+ (license license:gpl2+)))
+
+(define-public quesoglc
+ (package
+ (name "quesoglc")
+ (version "0.7.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/" name "/" version "/"
+ name "-" version "-free.tar.bz2"))
+ (sha256
+ (base32
+ "08ddhywdy2qg17m592ng3yr0p1ih96irg8wg729g75hsxxq9ipks"))))
+ (build-system gnu-build-system)
+ (native-inputs `(("pkg-config" ,pkg-config)))
+ (inputs `(("fontconfig" ,fontconfig)
+ ("freeglute" ,freeglut)
+ ("fribidi" ,fribidi)
+ ("glew" ,glew)))
+ (home-page "http://quesoglc.sourceforge.net")
+ (synopsis "Implementation of the OpenGL Character Renderer (GLC)")
+ (description
+ "The OpenGL Character Renderer (GLC) is a state machine that provides
+OpenGL programs with character rendering services via an application programming
+interface (API).")
+ (license (list license:expat license:lgpl2.1+))))
+
+(define-public python-pygame
+ (package
+ (name "python-pygame")
+ (version "1.9.3")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pygame" version))
+ (sha256
+ (base32
+ "1hlydiyygl444bq5m5g8n3jsxsgrdyxlm42ipmfbw36wkf0j243m"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; Tests require pygame to be installed first.
+ #:phases
+ (modify-phases %standard-phases
+ ;; Set the paths to the dependencies manually because
+ ;; the configure script does not allow passing them as
+ ;; parameters. This also means we can skip the configure
+ ;; phase.
+ (add-before 'build 'set-library-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((sdl-ref (assoc-ref inputs "sdl"))
+ (font-ref (assoc-ref inputs "sdl-ttf"))
+ (image-ref (assoc-ref inputs "sdl-image"))
+ (mixer-ref (assoc-ref inputs "sdl-mixer"))
+ (smpeg-ref (assoc-ref inputs "libsmpeg"))
+ (png-ref (assoc-ref inputs "libpng"))
+ (jpeg-ref (assoc-ref inputs "libjpeg"))
+ (freetype-ref (assoc-ref inputs "freetype"))
+ (v4l-ref (assoc-ref inputs "v4l-utils"))
+ (out-ref (assoc-ref outputs "out")))
+ (substitute* "Setup.in"
+ (("SDL = -I/usr/include/SDL")
+ (string-append "SDL = -I" sdl-ref "/include/SDL -I.")))
+ (substitute* "Setup.in"
+ (("FONT = -lSDL_ttf")
+ (string-append "FONT = -I" font-ref "/include/SDL -L"
+ font-ref "/lib -lSDL_ttf")))
+ (substitute* "Setup.in"
+ (("IMAGE = -lSDL_image")
+ (string-append "IMAGE = -I" image-ref "/include/SDL -L"
+ image-ref "/lib -lSDL_image")))
+ (substitute* "Setup.in"
+ (("MIXER = -lSDL_mixer")
+ (string-append "MIXER = -I" mixer-ref "/include/SDL -L"
+ mixer-ref "/lib -lSDL_mixer")))
+ (substitute* "Setup.in"
+ (("SMPEG = -lsmpeg")
+ (string-append "SMPEG = -I" smpeg-ref "/include/smpeg -L"
+ smpeg-ref "/lib -lsmpeg")))
+ (substitute* "Setup.in"
+ (("PNG = -lpng")
+ (string-append "PNG = -I" png-ref "/include -L"
+ png-ref "/lib -lpng")))
+ (substitute* "Setup.in"
+ (("JPEG = -ljpeg")
+ (string-append "JPEG = -I" jpeg-ref "/include -L"
+ jpeg-ref "/lib -ljpeg")))
+
+ (substitute* "Setup.in"
+ (("FREETYPE = -lfreetype")
+ (string-append "FREETYPE = -I" freetype-ref "/include/freetype2 -L"
+ freetype-ref "/lib -lfreetype")))
+
+ (substitute* "Setup.in"
+ (("^pypm") "#pypm"))
+ ;; Create a path to a header file provided by v4l-utils.
+ (system* "mkdir" "linux")
+ (system* "ln" "--symbolic"
+ (string-append v4l-ref "/include/libv4l1-videodev.h")
+ "linux/videodev.h")
+ (system* "ln" "--symbolic" "Setup.in" "Setup")))))))
+ (inputs
+ `(("freetype" ,freetype)
+ ("sdl" ,sdl)
+ ("sdl-image" ,sdl-image)
+ ("sdl-mixer" ,sdl-mixer)
+ ("sdl-ttf" ,sdl-ttf)
+ ("sdl-gfx" ,sdl-gfx)
+ ("libjpeg" ,libjpeg)
+ ("libpng" ,libpng)
+ ("libX11" ,libx11)
+ ("libsmpeg" ,libsmpeg)
+ ("portmidi" ,portmidi)
+ ("v4l-utils" ,v4l-utils)))
+ (home-page "https://www.pygame.org")
+ (synopsis "SDL wrapper for Python")
+ (description "Pygame is a set of Python modules designed for writing games.
+Pygame adds functionality on top of the excellent SDL library. This allows you
+to create fully featured games and multimedia programs in the python language.")
+ (license (list license:bsd-2
+ ;; python numeric license as listed by Debian looks like
+ ;; an Expat-style license with a warranty disclaimer for
+ ;; the U.S. government and the University of California.
+ license:expat
+ license:lgpl2.0+
+ license:lgpl2.1+
+ license:gpl3+
+ license:psfl
+ license:public-domain
+ license:lgpl2.1+))))
+
+(define-public python2-pygame
+ (package-with-python2 python-pygame))
+
+(define-public grafx2
+ (package
+ (name "grafx2")
+ (version "2.4")
+ (source (origin
+ (method url-fetch)
+ ;; XXX: There is no URL that contains the version. :(
+ (uri "http://pulkomandy.tk/projects/GrafX2/downloads/21")
+ (sha256
+ (base32
+ "0svsy6rqmdj11b400c242i2ixihyz0hds0dgicqz6g6dcgmcl62q"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; no configure script
+ (add-before 'build 'change-to-src-directory
+ (lambda _
+ (chdir "src")
+ #t)))
+ #:make-flags
+ ;; SDL header files are referenced without the preceeding "SDL/".
+ (list (string-append "CFLAGS=-I"
+ (assoc-ref %build-inputs "sdl-union")
+ "/include/SDL")
+ (string-append "prefix="
+ (assoc-ref %outputs "out")))
+ #:tests? #f)) ; no check target
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("libpng" ,libpng)
+ ("lua" ,lua-5.1)
+ ("sdl-union" ,(sdl-union (list sdl sdl-image sdl-ttf)))))
+ (synopsis "Bitmap paint program")
+ (description "GrafX2 is a bitmap paint program inspired by the Amiga
+programs Deluxe Paint and Brilliance. Specializing in 256-color drawing, it
+includes a very large number of tools and effects that make it particularly
+suitable for pixel art, game graphics, and generally any detailed graphics
+painted with a mouse.")
+ (home-page "http://pulkomandy.tk/projects/GrafX2")
+ (license license:gpl2))) ; GPLv2 only