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