Commit | Line | Data |
---|---|---|
c3c516ea DT |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2013 David Thompson <dthompson2@worcester.edu> | |
3 | ;;; | |
4 | ;;; This file is part of GNU Guix. | |
5 | ;;; | |
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. | |
10 | ;;; | |
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. | |
15 | ;;; | |
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/>. | |
18 | ||
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) | |
5cf3bcd4 | 25 | #:use-module ((gnu packages fontutils) #:prefix font:) |
e55354b8 | 26 | #:use-module (gnu packages image) |
c3c516ea | 27 | #:use-module (gnu packages linux) |
5cf3bcd4 | 28 | #:use-module (gnu packages mp3) |
8bf8d7c7 DT |
29 | #:use-module (gnu packages pkg-config) |
30 | #:use-module (gnu packages pulseaudio) | |
200726ed | 31 | #:use-module (gnu packages gl) |
54ff0b7d | 32 | #:use-module (gnu packages xiph) |
c3c516ea | 33 | #:use-module (gnu packages xorg) |
8bf8d7c7 DT |
34 | #:export (sdl |
35 | sdl2 | |
5cf3bcd4 DT |
36 | libmikmod |
37 | sdl-gfx | |
38 | sdl-image | |
39 | sdl-mixer | |
40 | sdl-net | |
41 | sdl-ttf)) | |
8bf8d7c7 DT |
42 | |
43 | (define sdl | |
44 | (package | |
45 | (name "sdl") | |
46 | (version "1.2.15") | |
47 | (source (origin | |
48 | (method url-fetch) | |
49 | (uri | |
50 | (string-append "http://libsdl.org/release/SDL-" | |
51 | version ".tar.gz")) | |
52 | (sha256 | |
53 | (base32 | |
54 | "005d993xcac8236fpvd1iawkz4wqjybkpn8dbwaliqz5jfkidlyn")))) | |
55 | (build-system gnu-build-system) | |
22f33e61 LC |
56 | (arguments |
57 | '(;; Explicitly link against Xext because SDL tries to dlopen it and | |
58 | ;; doesn't go very far otherwise (see | |
59 | ;; <https://lists.gnu.org/archive/html/guix-devel/2013-11/msg00088.html> | |
60 | ;; for details.) | |
61 | #:configure-flags '("LDFLAGS=-lXext") | |
62 | ||
63 | #:tests? #f)) ; no check target | |
558a5122 LC |
64 | (propagated-inputs |
65 | ;; SDL headers include X11 headers. | |
66 | `(("libx11" ,libx11))) | |
22f33e61 | 67 | (native-inputs `(("pkg-config" ,pkg-config))) |
558a5122 | 68 | (inputs `(("libxrandr" ,libxrandr) |
8bf8d7c7 DT |
69 | ("mesa" ,mesa) |
70 | ("alsa-lib" ,alsa-lib) | |
8bf8d7c7 DT |
71 | ("pulseaudio" ,pulseaudio))) |
72 | (synopsis "Cross platform game development library") | |
73 | (description "Simple DirectMedia Layer is a cross-platform development | |
74 | library designed to provide low level access to audio, keyboard, mouse, | |
75 | joystick, and graphics hardware.") | |
76 | (home-page "http://libsdl.org/") | |
77 | (license lgpl2.1))) | |
78 | ||
79 | (define sdl2 | |
80 | (package (inherit sdl) | |
81 | (name "sdl2") | |
82 | (version "2.0.0") | |
83 | (source (origin | |
84 | (method url-fetch) | |
85 | (uri | |
86 | (string-append "http://libsdl.org/release/SDL2-" | |
87 | version ".tar.gz")) | |
88 | (sha256 | |
89 | (base32 | |
90 | "0y3in99brki7vc2mb4c0w39v70mf4h341mblhh8nmq4h7lawhskg")))) | |
91 | (license bsd-3))) | |
c3c516ea DT |
92 | |
93 | (define libmikmod | |
94 | (package | |
95 | (name "libmikmod") | |
96 | (version "3.3.3") | |
97 | (source (origin | |
98 | (method url-fetch) | |
99 | (uri (string-append "mirror://sourceforge/mikmod/libmikmod/" | |
100 | version "/libmikmod-" version ".tar.gz")) | |
101 | (sha256 | |
102 | (base32 | |
103 | "0dr4kgvhq9wf2riibh178c2al996spwwak6zffpv5n5bqmw29w3r")))) | |
104 | (build-system gnu-build-system) | |
105 | (inputs `(("alsa-lib" ,alsa-lib) | |
106 | ("libx11" ,libx11))) | |
9e771e3b | 107 | (synopsis "Library for module sound formats") |
c3c516ea DT |
108 | (description |
109 | "MikMod is able to play a wide range of module formats, as well as | |
35b9e423 | 110 | digital sound files. It can take advantage of particular features of your |
c3c516ea DT |
111 | system, such as sound redirection over the network.") |
112 | (license lgpl2.1) | |
113 | (home-page "http://mikmod.sourceforge.net/"))) | |
5cf3bcd4 DT |
114 | |
115 | (define sdl-gfx | |
116 | (package | |
117 | (name "sdl-gfx") | |
118 | (version "2.0.24") | |
119 | (source (origin | |
120 | (method url-fetch) | |
121 | (uri | |
122 | (string-append "http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-" | |
123 | version ".tar.gz")) | |
124 | (sha256 | |
125 | (base32 | |
126 | "064islldm4r42lgj9fr4kbk66r7jmmakk9745hhyb1kmw71kib9h")))) | |
127 | (build-system gnu-build-system) | |
128 | (propagated-inputs `(("sdl" ,sdl))) | |
5cf3bcd4 DT |
129 | (synopsis "SDL graphics primitives library") |
130 | (description "SDL_gfx provides graphics drawing primitives, rotozoom and | |
131 | other supporting functions for SDL.") | |
132 | (home-page "http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx") | |
1d830bc0 LC |
133 | (license zlib) |
134 | ||
135 | ;; The code apparently includes Intel assembly, which fails to build on | |
136 | ;; MIPS, at least. | |
137 | (supported-systems '("i686-linux" "x86_64-linux")))) | |
5cf3bcd4 DT |
138 | |
139 | (define sdl-image | |
140 | (package | |
141 | (name "sdl-image") | |
142 | (version "1.2.12") | |
143 | (source (origin | |
144 | (method url-fetch) | |
145 | (uri | |
146 | (string-append "http://www.libsdl.org/projects/SDL_image/release/SDL_image-" | |
147 | version ".tar.gz")) | |
148 | (sha256 | |
149 | (base32 | |
150 | "16an9slbb8ci7d89wakkmyfvp7c0cval8xw4hkg0842nhhlp540b")))) | |
151 | (build-system gnu-build-system) | |
586b6d4d | 152 | (native-inputs `(("pkg-config" ,pkg-config))) |
5cf3bcd4 | 153 | ;; FIXME: Add webp |
586b6d4d DT |
154 | ;; |
155 | ;; libjpeg, libpng, and libtiff are propagated inputs because the | |
156 | ;; SDL_image headers include the headers of these libraries. SDL is a | |
157 | ;; propagated input because the pkg-config file refers to SDL's pkg-config | |
158 | ;; file. | |
159 | (propagated-inputs `(("sdl" ,sdl) | |
160 | ("libjpeg" ,libjpeg) | |
161 | ("libpng" ,libpng) | |
162 | ("libtiff" ,libtiff))) | |
5cf3bcd4 DT |
163 | (synopsis "SDL image loading library") |
164 | (description "SDL_image is an image file loading library for SDL that | |
165 | supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, | |
166 | WEBP, XCF, XPM, and XV.") | |
6b464e6e | 167 | (home-page "http://www.libsdl.org/projects/SDL_image/") |
5cf3bcd4 DT |
168 | (license zlib))) |
169 | ||
170 | (define sdl-mixer | |
171 | (package | |
172 | (name "sdl-mixer") | |
173 | (version "1.2.12") | |
174 | (source (origin | |
175 | (method url-fetch) | |
176 | (uri | |
177 | (string-append "http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-" | |
178 | version ".tar.gz")) | |
179 | (sha256 | |
180 | (base32 | |
181 | "0alrhqgm40p4c92s26mimg9cm1y7rzr6m0p49687jxd9g6130i0n")))) | |
182 | (build-system gnu-build-system) | |
183 | ;; no check target | |
184 | ;; use libmad instead of smpeg | |
185 | (arguments `(#:tests? #f | |
186 | #:configure-flags '("--enable-music-mp3-mad-gpl"))) | |
187 | (inputs `(("libvorbis" ,libvorbis) | |
188 | ("libflac" ,flac) | |
189 | ("libmad" ,libmad) | |
190 | ("libmikmod" ,libmikmod))) | |
191 | ;; FIXME: Add libfluidsynth | |
192 | (propagated-inputs `(("sdl" ,sdl))) | |
193 | (synopsis "SDL multi-channel audio mixer library") | |
194 | (description "SDL_mixer is a multi-channel audio mixer library for SDL. | |
195 | It supports any number of simultaneously playing channels of 16 bit stereo | |
196 | audio, plus a single channel of music. Supported format include FLAC, MOD, | |
197 | MIDI, Ogg Vorbis, and MP3.") | |
6b464e6e | 198 | (home-page "http://www.libsdl.org/projects/SDL_mixer/") |
5cf3bcd4 DT |
199 | (license zlib))) |
200 | ||
201 | (define sdl-net | |
202 | (package | |
203 | (name "sdl-net") | |
204 | (version "1.2.8") | |
205 | (source (origin | |
206 | (method url-fetch) | |
207 | (uri | |
208 | (string-append "http://www.libsdl.org/projects/SDL_net/release/SDL_net-" | |
209 | version ".tar.gz")) | |
210 | (sha256 | |
211 | (base32 | |
212 | "1d5c9xqlf4s1c01gzv6cxmg0r621pq9kfgxcg3197xw4p25pljjz")))) | |
213 | (build-system gnu-build-system) | |
214 | (propagated-inputs `(("sdl" ,sdl))) | |
41eb1198 | 215 | (native-inputs `(("pkg-config" ,pkg-config))) |
5cf3bcd4 DT |
216 | (synopsis "SDL networking library") |
217 | (description "SDL_net is a small, cross-platform networking library for | |
218 | SDL.") | |
6b464e6e | 219 | (home-page "http://www.libsdl.org/projects/SDL_net/") |
5cf3bcd4 DT |
220 | (license zlib))) |
221 | ||
222 | (define sdl-ttf | |
223 | (package | |
224 | (name "sdl-ttf") | |
225 | (version "2.0.11") | |
226 | (source (origin | |
227 | (method url-fetch) | |
228 | (uri | |
229 | (string-append "http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-" | |
230 | version ".tar.gz")) | |
231 | (sha256 | |
232 | (base32 | |
233 | "1dydxd4f5kb1288i5n5568kdk2q7f8mqjr7i7sd33nplxjaxhk3j")))) | |
234 | (build-system gnu-build-system) | |
235 | (propagated-inputs `(("sdl" ,sdl))) | |
236 | (inputs `(("freetype" ,font:freetype) | |
41eb1198 LC |
237 | ("mesa" ,mesa))) |
238 | (native-inputs `(("pkg-config" ,pkg-config))) | |
5cf3bcd4 DT |
239 | (synopsis "SDL TrueType font library") |
240 | (description "SDL_ttf is a TrueType font rendering library for SDL.") | |
6b464e6e | 241 | (home-page "http://www.libsdl.org/projects/SDL_ttf/") |
5cf3bcd4 | 242 | (license zlib))) |