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