1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 David Thompson <dthompson2@worcester.edu>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages sdl)
20 #:use-module (gnu packages)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module ((gnu packages fontutils) #:prefix font:)
26 #:use-module (gnu packages libjpeg)
27 #:use-module (gnu packages libpng)
28 #:use-module (gnu packages libtiff)
29 #:use-module (gnu packages linux)
30 #:use-module (gnu packages mp3)
31 #:use-module (gnu packages pkg-config)
32 #:use-module (gnu packages pulseaudio)
33 #:use-module (gnu packages gl)
34 #:use-module (gnu packages xiph)
35 #:use-module (gnu packages xorg)
52 (string-append "http://libsdl.org/release/SDL-"
56 "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn"))))
57 (build-system gnu-build-system)
59 '(;; Explicitly link against Xext because SDL tries to dlopen it and
60 ;; doesn't go very far otherwise (see
61 ;; <https://lists.gnu.org/archive/html/guix-devel/2013-11/msg00088.html>
63 #:configure-flags '("LDFLAGS=-lXext")
65 #:tests? #f)) ; no check target
67 ;; SDL headers include X11 headers.
68 `(("libx11" ,libx11)))
69 (native-inputs `(("pkg-config" ,pkg-config)))
70 (inputs `(("libxrandr" ,libxrandr)
72 ("alsa-lib" ,alsa-lib)
73 ("pulseaudio" ,pulseaudio)))
74 (synopsis "Cross platform game development library")
75 (description "Simple DirectMedia Layer is a cross-platform development
76 library designed to provide low level access to audio, keyboard, mouse,
77 joystick, and graphics hardware.")
78 (home-page "http://libsdl.org/")
82 (package (inherit sdl)
88 (string-append "http://libsdl.org/release/SDL2-"
92 "0y3in99brki7vc2mb4c0w39v70mf4h341mblhh8nmq4h7lawhskg"))))
101 (uri (string-append "mirror://sourceforge/mikmod/libmikmod/"
102 version "/libmikmod-" version ".tar.gz"))
105 "0dr4kgvhq9wf2riibh178c2al996spwwak6zffpv5n5bqmw29w3r"))))
106 (build-system gnu-build-system)
107 (inputs `(("alsa-lib" ,alsa-lib)
109 (synopsis "Library for module sound formats.")
111 "MikMod is able to play a wide range of module formats, as well as
112 digital sound files. It can take advantage of particular features of your
113 system, such as sound redirection over the network.")
115 (home-page "http://mikmod.sourceforge.net/")))
124 (string-append "http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-"
128 "064islldm4r42lgj9fr4kbk66r7jmmakk9745hhyb1kmw71kib9h"))))
129 (build-system gnu-build-system)
130 (propagated-inputs `(("sdl" ,sdl)))
131 (synopsis "SDL graphics primitives library")
132 (description "SDL_gfx provides graphics drawing primitives, rotozoom and
133 other supporting functions for SDL.")
134 (home-page "http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx")
144 (string-append "http://www.libsdl.org/projects/SDL_image/release/SDL_image-"
148 "16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b"))))
149 (build-system gnu-build-system)
150 (native-inputs `(("pkg-config" ,pkg-config)))
153 ;; libjpeg, libpng, and libtiff are propagated inputs because the
154 ;; SDL_image headers include the headers of these libraries. SDL is a
155 ;; propagated input because the pkg-config file refers to SDL's pkg-config
157 (propagated-inputs `(("sdl" ,sdl)
160 ("libtiff" ,libtiff)))
161 (synopsis "SDL image loading library")
162 (description "SDL_image is an image file loading library for SDL that
163 supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF,
164 WEBP, XCF, XPM, and XV.")
165 (home-page "www.libsdl.org/projects/SDL_image/")
175 (string-append "http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-"
179 "0alrhqgm40p4c92s26mimg9cm1y7rzr6m0p49687jxd9g6130i0n"))))
180 (build-system gnu-build-system)
182 ;; use libmad instead of smpeg
183 (arguments `(#:tests? #f
184 #:configure-flags '("--enable-music-mp3-mad-gpl")))
185 (inputs `(("libvorbis" ,libvorbis)
188 ("libmikmod" ,libmikmod)))
189 ;; FIXME: Add libfluidsynth
190 (propagated-inputs `(("sdl" ,sdl)))
191 (synopsis "SDL multi-channel audio mixer library")
192 (description "SDL_mixer is a multi-channel audio mixer library for SDL.
193 It supports any number of simultaneously playing channels of 16 bit stereo
194 audio, plus a single channel of music. Supported format include FLAC, MOD,
195 MIDI, Ogg Vorbis, and MP3.")
196 (home-page "www.libsdl.org/projects/SDL_mixer/")
206 (string-append "http://www.libsdl.org/projects/SDL_net/release/SDL_net-"
210 "1d5c9xqlf4s1c01gzv6cxmg0r621pq9kfgxcg3197xw4p25pljjz"))))
211 (build-system gnu-build-system)
212 (propagated-inputs `(("sdl" ,sdl)))
213 (inputs `(("pkg-config" ,pkg-config)))
214 (synopsis "SDL networking library")
215 (description "SDL_net is a small, cross-platform networking library for
217 (home-page "www.libsdl.org/projects/SDL_net/")
227 (string-append "http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-"
231 "1dydxd4f5kb1288i5n5568kdk2q7f8mqjr7i7sd33nplxjaxhk3j"))))
232 (build-system gnu-build-system)
233 (propagated-inputs `(("sdl" ,sdl)))
234 (inputs `(("freetype" ,font:freetype)
236 ("pkg-config" ,pkg-config)))
237 (synopsis "SDL TrueType font library")
238 (description "SDL_ttf is a TrueType font rendering library for SDL.")
239 (home-page "www.libsdl.org/projects/SDL_ttf/")