source: multimedia/libdriv/sdl2.xml@ 2eeb8695

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 2eeb8695 was 2eeb8695, checked in by Pierre Labastie <pieere@…>, 4 years ago

Format multimedia chapter

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22821 af4574ff-66df-0310-9fd7-8a98e5e911e0

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