[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 " ">
|
---|
[94c2369] | 9 | <!ENTITY sdl2-md5sum "a53acc02e1cca98c4123229069b67c9e">
|
---|
| 10 | <!ENTITY sdl2-size "6.9 MB">
|
---|
| 11 | <!ENTITY sdl2-buildsize "173 MB (with docs)">
|
---|
| 12 | <!ENTITY sdl2-time "0.5 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 |
|
---|
[7b2fed0f] | 37 | &lfs110a_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 |
|
---|
[33e63255] | 73 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 74 | <itemizedlist spacing="compact">
|
---|
| 75 | <listitem>
|
---|
| 76 | <para>
|
---|
| 77 | Required patch (for i686 systems):
|
---|
| 78 | <ulink url="&patch-root;/SDL2-&sdl2-version;-opengl_include_fix-1.patch"/>
|
---|
| 79 | </para>
|
---|
| 80 | </listitem>
|
---|
| 81 | </itemizedlist>
|
---|
| 82 |
|
---|
[36aeaf9a] | 83 | <bridgehead renderas="sect3">SDL2 Dependencies</bridgehead>
|
---|
| 84 |
|
---|
[f7a7e27] | 85 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 86 | <para role="recommended">
|
---|
| 87 | <xref linkend="libxkbcommon"/>,
|
---|
| 88 | <xref linkend="wayland-protocols"/>, and
|
---|
| 89 | <xref linkend="xorg7-lib"/> (if those are not present, the corresponding modules are not built)
|
---|
| 90 | </para>
|
---|
| 91 |
|
---|
[36aeaf9a] | 92 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 93 | <para role="optional">
|
---|
| 94 | <xref linkend="alsa"/>,
|
---|
| 95 | <xref linkend="doxygen"/> (to create documentation),
|
---|
[7b1bc743] | 96 | <xref linkend="ibus"/>,
|
---|
[36aeaf9a] | 97 | <xref linkend="nasm"/>,
|
---|
| 98 | <xref linkend="pulseaudio"/>,
|
---|
[6ef16d1] | 99 | <xref linkend="libsamplerate"/>,
|
---|
[bb9afa84] | 100 | <xref linkend="x-window-system"/>,
|
---|
| 101 | <ulink url="http://pkgs.fedoraproject.org/repo/pkgs/directfb/">DirectFB</ulink>, and
|
---|
| 102 | <ulink url="https://fcitx-im.org/">fcitx</ulink>
|
---|
[36aeaf9a] | 103 | </para>
|
---|
| 104 |
|
---|
| 105 | <para condition="html" role="usernotes">User Notes:
|
---|
| 106 | <ulink url="&blfs-wiki;/sdl"/></para>
|
---|
| 107 |
|
---|
| 108 | </sect2>
|
---|
| 109 |
|
---|
| 110 | <sect2 role="installation">
|
---|
| 111 | <title>Installation of SDL2</title>
|
---|
| 112 |
|
---|
[2eeb8695] | 113 | <para>
|
---|
| 114 | First, if you are building on a 32-bit i686 system, apply a patch
|
---|
| 115 | containing a fix for the OpenGL headers and their data types:
|
---|
| 116 | </para>
|
---|
[33e63255] | 117 |
|
---|
| 118 | <screen><userinput remap="pre">case $(uname -m) in
|
---|
| 119 | i?86) patch -Np1 -i ../SDL2-&sdl2-version;-opengl_include_fix-1.patch ;;
|
---|
| 120 | esac</userinput></screen>
|
---|
| 121 |
|
---|
[2eeb8695] | 122 | <para>
|
---|
| 123 | Install <application>SDL2</application> by running the
|
---|
| 124 | following commands:
|
---|
| 125 | </para>
|
---|
[36aeaf9a] | 126 |
|
---|
| 127 | <screen><userinput>./configure --prefix=/usr &&
|
---|
| 128 | make</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 |
|
---|
[2f3e3de9] | 135 | <screen remap="doc"><userinput>pushd docs &&
|
---|
[36aeaf9a] | 136 | doxygen &&
|
---|
| 137 | popd</userinput></screen>
|
---|
| 138 |
|
---|
| 139 | <note>
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 145 | </note>
|
---|
| 146 |
|
---|
[2eeb8695] | 147 | <para>
|
---|
| 148 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 149 | </para>
|
---|
[36aeaf9a] | 150 |
|
---|
| 151 | <screen role="root"><userinput>make install &&
|
---|
| 152 | rm -v /usr/lib/libSDL2*.a</userinput></screen>
|
---|
| 153 |
|
---|
[2eeb8695] | 154 | <para>
|
---|
| 155 | If you built the documentation, install it as the <systemitem
|
---|
| 156 | class="username">root</systemitem> user:
|
---|
| 157 | </para>
|
---|
[36aeaf9a] | 158 |
|
---|
[2f3e3de9] | 159 | <screen role="root"
|
---|
| 160 | remap="doc"><userinput>install -v -m755 -d /usr/share/doc/SDL2-&sdl2-version;/html &&
|
---|
[36aeaf9a] | 161 | cp -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 |
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 174 |
|
---|
| 175 | <screen><userinput>cd test &&
|
---|
| 176 | ./configure &&
|
---|
| 177 | make</userinput></screen>
|
---|
| 178 |
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 185 |
|
---|
| 186 | </sect2>
|
---|
[94c2369] | 187 |
|
---|
[36aeaf9a] | 188 | <sect2 role="commands">
|
---|
| 189 | <title>Command Explanations</title>
|
---|
| 190 |
|
---|
[2eeb8695] | 191 | <para>
|
---|
[8558044] | 192 | <command>rm -v /usr/lib/libSDL2*.a</command>: Normally
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 196 |
|
---|
[2eeb8695] | 197 | <para>
|
---|
| 198 | <option>--disable-alsa-shared</option>: This switch disables
|
---|
| 199 | dynamically loading ALSA shared libraries.
|
---|
| 200 | </para>
|
---|
[36aeaf9a] | 201 |
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 207 |
|
---|
[2eeb8695] | 208 | <para>
|
---|
| 209 | <option>--disable-x11-shared</option>: This switch disables
|
---|
| 210 | dynamically loading X11 shared libraries.
|
---|
| 211 | </para>
|
---|
[36aeaf9a] | 212 |
|
---|
| 213 | </sect2>
|
---|
| 214 |
|
---|
| 215 | <sect2 role="configuration">
|
---|
[16dfae9] | 216 | <title>Configuring SDL2</title>
|
---|
[36aeaf9a] | 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>
|
---|
[8558044] | 239 | <seg>/usr/include/SDL2 and
|
---|
[36aeaf9a] | 240 | /usr/share/doc/SDL-&sdl2-version;</seg>
|
---|
| 241 | </seglistitem>
|
---|
| 242 | </segmentedlist>
|
---|
| 243 |
|
---|
| 244 | <variablelist>
|
---|
| 245 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 246 | <?dbfo list-presentation="list"?>
|
---|
| 247 | <?dbhtml list-presentation="table"?>
|
---|
| 248 |
|
---|
| 249 | <varlistentry id="sdl2-config">
|
---|
| 250 | <term><command>sdl2-config</command></term>
|
---|
| 251 | <listitem>
|
---|
[2eeb8695] | 252 | <para>
|
---|
| 253 | determines the compile and linker flags that should be used to
|
---|
| 254 | compile and link programs that use
|
---|
[4c24eb0a] | 255 | <filename class="libraryfile">libSDL2</filename>
|
---|
[2eeb8695] | 256 | </para>
|
---|
[36aeaf9a] | 257 | <indexterm zone="sdl2 sdl2-config">
|
---|
| 258 | <primary sortas="b-sdl2-config">sdl2-config</primary>
|
---|
| 259 | </indexterm>
|
---|
| 260 | </listitem>
|
---|
| 261 | </varlistentry>
|
---|
| 262 |
|
---|
| 263 | <varlistentry id="libsdl2">
|
---|
[4c24eb0a] | 264 | <term><filename class="libraryfile">libSDL2.so</filename></term>
|
---|
[36aeaf9a] | 265 | <listitem>
|
---|
[2eeb8695] | 266 | <para>
|
---|
| 267 | contains functions that provide low level access to audio,
|
---|
| 268 | keyboard, mouse, joystick, 3D hardware via OpenGL, and
|
---|
[4c24eb0a] | 269 | 2D frame buffer across multiple platforms
|
---|
[2eeb8695] | 270 | </para>
|
---|
[36aeaf9a] | 271 | <indexterm zone="sdl2 libsdl2">
|
---|
| 272 | <primary sortas="c-libsdl2">libSDL2.so</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
| 277 | </variablelist>
|
---|
| 278 |
|
---|
| 279 | </sect2>
|
---|
| 280 |
|
---|
| 281 | </sect1>
|
---|