source: multimedia/libdriv/sdl2.xml@ 1ef28cd2

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 1ef28cd2 was ba3d767, checked in by Douglas R. Reno <renodr@…>, 13 months ago

Update to SDL2-2.28.0

  • Property mode set to 100644
File size: 8.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY sdl2-download-http "https://www.libsdl.org/release/SDL2-&sdl2-version;.tar.gz">
8 <!ENTITY sdl2-download-ftp " ">
9 <!ENTITY sdl2-md5sum "f7e53a08a706999ceb033bb911fe3c6e">
10 <!ENTITY sdl2-size "7.7 MB">
11 <!ENTITY sdl2-buildsize "240 MB (with docs)">
12 <!ENTITY sdl2-time "0.6 SBU (using parallelism=4; with docs)">
13]>
14
15<sect1 id="sdl2" xreflabel="SDL2-&sdl2-version;">
16 <?dbhtml filename="sdl2.html"?>
17
18
19 <title>SDL2-&sdl2-version;</title>
20
21 <indexterm zone="sdl2">
22 <primary sortas="a-SDL2">SDL2</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to SDL2</title>
27
28 <para>
29 The Simple DirectMedia Layer Version 2 (<application>SDL2</application>
30 for short) is a cross-platform library designed to make it easy to write
31 multimedia software, such as games and emulators.
32 </para>
33
34 &lfs113_checked;
35
36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
39 <para>
40 Download (HTTP): <ulink url="&sdl2-download-http;"/>
41 </para>
42 </listitem>
43 <listitem>
44 <para>
45 Download (FTP): <ulink url="&sdl2-download-ftp;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download MD5 sum: &sdl2-md5sum;
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download size: &sdl2-size;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Estimated disk space required: &sdl2-buildsize;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated build time: &sdl2-time;
66 </para>
67 </listitem>
68 </itemizedlist>
69
70<!--
71 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
72 <itemizedlist spacing="compact">
73 <listitem>
74 <para>
75 Required patch (for i686 systems):
76 <ulink url="&patch-root;/SDL2-&sdl2-version;-opengl_include_fix-1.patch"/>
77 </para>
78 </listitem>
79 </itemizedlist>
80-->
81 <bridgehead renderas="sect3">SDL2 Dependencies</bridgehead>
82
83 <bridgehead renderas="sect4">Recommended</bridgehead>
84 <para role="recommended">
85 <xref linkend="libxkbcommon"/>,
86 <xref linkend="wayland-protocols"/>, and
87 <xref linkend="xorg7-lib"/> (if those are not present, the corresponding modules are not built)
88 </para>
89
90 <bridgehead renderas="sect4">Optional</bridgehead>
91 <para role="optional">
92 <xref linkend="alsa"/>,
93 <xref linkend="doxygen"/> (to create documentation),
94 <xref linkend="ibus"/>,
95 <xref linkend="libsamplerate"/>,
96 <xref linkend="nasm"/>,
97 <xref linkend="pipewire"/>,
98 <xref linkend="pulseaudio"/>,
99 <xref linkend="x-window-system"/>,
100 <ulink url="https://pkgs.fedoraproject.org/repo/pkgs/directfb/">DirectFB</ulink>,
101 <ulink url="https://fcitx-im.org/">fcitx</ulink>,
102 <ulink url="https://jackaudio.org/">jack</ulink>, and
103 <ulink url="https://sndio.org/">sndio</ulink>
104 </para>
105
106 <para condition="html" role="usernotes">User Notes:
107 <ulink url="&blfs-wiki;/sdl"/></para>
108
109 </sect2>
110
111 <sect2 role="installation">
112 <title>Installation of SDL2</title>
113
114<!--
115 <para>
116 First, fix an overly restrictive build option:
117 </para>
118
119<screen><userinput remap="pre">sed -i "s/-Werror=declaration-after-statement//" configure</userinput></screen>
120-->
121
122 <para>
123 Install <application>SDL2</application> by running the
124 following commands:
125 </para>
126
127<screen><userinput>./configure --prefix=/usr &amp;&amp;
128make</userinput></screen>
129
130 <para>
131 If you have <xref linkend="doxygen"/> installed and want to build the
132 html documentation, run the following commands:
133 </para>
134
135<screen remap="doc"><userinput>pushd docs &amp;&amp;
136 doxygen &amp;&amp;
137popd</userinput></screen>
138
139 <note>
140 <para>
141 If you wish to build and run the package regression
142 tests, do not delete the static libraries below until after
143 the tests are built.
144 </para>
145 </note>
146
147 <para>
148 Now, as the <systemitem class="username">root</systemitem> user:
149 </para>
150
151<screen role="root"><userinput>make install &amp;&amp;
152rm -v /usr/lib/libSDL2*.a</userinput></screen>
153
154 <para>
155 If you built the documentation, install it as the <systemitem
156 class="username">root</systemitem> user:
157 </para>
158
159<screen role="root"
160 remap="doc"><userinput>install -v -m755 -d /usr/share/doc/SDL2-&sdl2-version;/html &amp;&amp;
161cp -Rv docs/output/html/* /usr/share/doc/SDL2-&sdl2-version;/html</userinput></screen>
162
163 </sect2>
164
165 <sect2 role="testing">
166 <title>Testing SDL2</title>
167
168 <para>
169 If you wish to, test the installation of <application>SDL2</application>
170 using the included test programs. None of the resulting binaries need
171 to be installed. Issue the following commands to build the test
172 programs:
173 </para>
174
175<screen><userinput>cd test &amp;&amp;
176./configure &amp;&amp;
177make</userinput></screen>
178
179 <para>
180 Each of the test programs (they are listed in the
181 <filename>README</filename> file in this directory) will need to be run
182 individually. Many of them will need to be manually killed. Additionally,
183 speakers need to be on with the volume at a suitable level.
184 </para>
185
186 </sect2>
187
188 <sect2 role="commands">
189 <title>Command Explanations</title>
190
191 <para>
192 <command>rm -v /usr/lib/libSDL2*.a</command>: Normally
193 static libraries can be disabled with a <option>--disable-static</option>
194 option to configure, but that breaks the build in this package.
195 </para>
196
197 <para>
198 <option>--disable-alsa-shared</option>: This switch disables
199 dynamically loading ALSA shared libraries.
200 </para>
201
202 <para>
203 <option>--disable-sdl-dlopen</option>: This switch disables using
204 dlopen for shared object loading. Loading image backend libraries like
205 libpng dynamically on the fly does not work.
206 </para>
207
208 <para>
209 <option>--disable-x11-shared</option>: This switch disables
210 dynamically loading X11 shared libraries.
211 </para>
212
213 </sect2>
214
215 <sect2 role="configuration">
216 <title>Configuring SDL2</title>
217
218 <sect3>
219 <title>Configuration Information</title>
220
221 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
222 href="../../xincludes/lib-config.xml"/>
223
224 </sect3>
225
226 </sect2>
227
228 <sect2 role="content">
229 <title>Contents</title>
230
231 <segmentedlist>
232 <segtitle>Installed Program</segtitle>
233 <segtitle>Installed Libraries</segtitle>
234 <segtitle>Installed Directories</segtitle>
235
236 <seglistitem>
237 <seg>sdl2-config</seg>
238 <seg>libSDL2.so</seg>
239 <seg>/usr/include/SDL2,
240 /usr/lib/cmake/SDL2, and
241 /usr/share/doc/SDL-&sdl2-version;</seg>
242 </seglistitem>
243 </segmentedlist>
244
245 <variablelist>
246 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
247 <?dbfo list-presentation="list"?>
248 <?dbhtml list-presentation="table"?>
249
250 <varlistentry id="sdl2-config">
251 <term><command>sdl2-config</command></term>
252 <listitem>
253 <para>
254 determines the compile and linker flags that should be used to
255 compile and link programs that use
256 <filename class="libraryfile">libSDL2</filename>
257 </para>
258 <indexterm zone="sdl2 sdl2-config">
259 <primary sortas="b-sdl2-config">sdl2-config</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="libsdl2">
265 <term><filename class="libraryfile">libSDL2.so</filename></term>
266 <listitem>
267 <para>
268 contains functions that provide low level access to audio,
269 keyboard, mouse, joystick, 3D hardware via OpenGL, and
270 2D frame buffer across multiple platforms
271 </para>
272 <indexterm zone="sdl2 libsdl2">
273 <primary sortas="c-libsdl2">libSDL2.so</primary>
274 </indexterm>
275 </listitem>
276 </varlistentry>
277
278 </variablelist>
279
280 </sect2>
281
282</sect1>
Note: See TracBrowser for help on using the repository browser.