[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 |
|
---|
| 7 | <!ENTITY sdl2-download-http "http://www.libsdl.org/release/SDL2-&sdl2-version;.tar.gz">
|
---|
| 8 | <!ENTITY sdl2-download-ftp " ">
|
---|
[542a113] | 9 | <!ENTITY sdl2-md5sum "76ed4e6da9c07bd168b2acd9bfefab1b">
|
---|
| 10 | <!ENTITY sdl2-size "5.8 MB">
|
---|
| 11 | <!ENTITY sdl2-buildsize "178 MB (with docs)">
|
---|
[ff7c4c3e] | 12 | <!ENTITY sdl2-time "0.4 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 | <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 |
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 37 |
|
---|
[d437f756] | 38 | &lfs101_checked;
|
---|
[36aeaf9a] | 39 |
|
---|
| 40 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 41 | <itemizedlist spacing="compact">
|
---|
| 42 | <listitem>
|
---|
[2eeb8695] | 43 | <para>
|
---|
| 44 | Download (HTTP): <ulink url="&sdl2-download-http;"/>
|
---|
| 45 | </para>
|
---|
[36aeaf9a] | 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
[2eeb8695] | 48 | <para>
|
---|
| 49 | Download (FTP): <ulink url="&sdl2-download-ftp;"/>
|
---|
| 50 | </para>
|
---|
[36aeaf9a] | 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
[2eeb8695] | 53 | <para>
|
---|
| 54 | Download MD5 sum: &sdl2-md5sum;
|
---|
| 55 | </para>
|
---|
[36aeaf9a] | 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
[2eeb8695] | 58 | <para>
|
---|
| 59 | Download size: &sdl2-size;
|
---|
| 60 | </para>
|
---|
[36aeaf9a] | 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
[2eeb8695] | 63 | <para>
|
---|
| 64 | Estimated disk space required: &sdl2-buildsize;
|
---|
| 65 | </para>
|
---|
[36aeaf9a] | 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
[2eeb8695] | 68 | <para>
|
---|
| 69 | Estimated build time: &sdl2-time;
|
---|
| 70 | </para>
|
---|
[36aeaf9a] | 71 | </listitem>
|
---|
| 72 | </itemizedlist>
|
---|
| 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>
|
---|
| 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"/>,
|
---|
| 102 | <ulink url="http://pkgs.fedoraproject.org/repo/pkgs/directfb/">DirectFB</ulink>, and
|
---|
| 103 | <ulink url="https://fcitx-im.org/">fcitx</ulink>
|
---|
[36aeaf9a] | 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 |
|
---|
[2eeb8695] | 114 | <para>
|
---|
| 115 | First, if you are building on a 32-bit i686 system, apply a patch
|
---|
| 116 | containing a fix for the OpenGL headers and their data types:
|
---|
| 117 | </para>
|
---|
[33e63255] | 118 |
|
---|
| 119 | <screen><userinput remap="pre">case $(uname -m) in
|
---|
| 120 | i?86) patch -Np1 -i ../SDL2-&sdl2-version;-opengl_include_fix-1.patch ;;
|
---|
| 121 | esac</userinput></screen>
|
---|
| 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>
|
---|
[166d300] | 165 | <!--
|
---|
| 166 | The tests are broken for version 2.0.10. It cannot find libSDL2_test*.
|
---|
[36aeaf9a] | 167 |
|
---|
| 168 | <sect2 role="testing">
|
---|
| 169 | <title>Testing SDL2</title>
|
---|
| 170 |
|
---|
[2eeb8695] | 171 | <para>
|
---|
| 172 | If you wish to, test the installation of <application>SDL2</application>
|
---|
| 173 | using the included test programs. None of the resulting binaries need
|
---|
| 174 | to be installed. Issue the following commands to build the test
|
---|
| 175 | programs:
|
---|
| 176 | </para>
|
---|
[36aeaf9a] | 177 |
|
---|
| 178 | <screen><userinput>cd test &&
|
---|
| 179 | ./configure &&
|
---|
| 180 | make</userinput></screen>
|
---|
| 181 |
|
---|
[2eeb8695] | 182 | <para>
|
---|
| 183 | Each of the test programs (they are listed in the
|
---|
| 184 | <filename>README</filename> file in this directory) will need to be run
|
---|
| 185 | individually. Many of them will need to be manually killed. Additionally,
|
---|
| 186 | speakers need to be on with the volume at a suitable level.
|
---|
| 187 | </para>
|
---|
[36aeaf9a] | 188 |
|
---|
| 189 | </sect2>
|
---|
[166d300] | 190 | -->
|
---|
[36aeaf9a] | 191 | <sect2 role="commands">
|
---|
| 192 | <title>Command Explanations</title>
|
---|
| 193 |
|
---|
[2eeb8695] | 194 | <para>
|
---|
| 195 | <command>rm -v /usr/lib/libSDL2*.a</command>: Normally
|
---|
| 196 | static libraries can be disabled with a <option>--disable-static</option>
|
---|
| 197 | option to configure, but that breaks the build in this package.
|
---|
| 198 | </para>
|
---|
[36aeaf9a] | 199 |
|
---|
[2eeb8695] | 200 | <para>
|
---|
| 201 | <option>--disable-alsa-shared</option>: This switch disables
|
---|
| 202 | dynamically loading ALSA shared libraries.
|
---|
| 203 | </para>
|
---|
[36aeaf9a] | 204 |
|
---|
[2eeb8695] | 205 | <para>
|
---|
| 206 | <option>--disable-sdl-dlopen</option>: This switch disables using
|
---|
| 207 | dlopen for shared object loading. Loading image backend libraries like
|
---|
| 208 | libpng dynamically on the fly does not work.
|
---|
| 209 | </para>
|
---|
[36aeaf9a] | 210 |
|
---|
[2eeb8695] | 211 | <para>
|
---|
| 212 | <option>--disable-x11-shared</option>: This switch disables
|
---|
| 213 | dynamically loading X11 shared libraries.
|
---|
| 214 | </para>
|
---|
[36aeaf9a] | 215 |
|
---|
| 216 | </sect2>
|
---|
| 217 |
|
---|
| 218 | <sect2 role="configuration">
|
---|
[16dfae9] | 219 | <title>Configuring SDL2</title>
|
---|
[36aeaf9a] | 220 |
|
---|
| 221 | <sect3>
|
---|
| 222 | <title>Configuration Information</title>
|
---|
| 223 |
|
---|
| 224 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 225 | href="../../xincludes/lib-config.xml"/>
|
---|
| 226 |
|
---|
| 227 | </sect3>
|
---|
| 228 |
|
---|
| 229 | </sect2>
|
---|
| 230 |
|
---|
| 231 | <sect2 role="content">
|
---|
| 232 | <title>Contents</title>
|
---|
| 233 |
|
---|
| 234 | <segmentedlist>
|
---|
| 235 | <segtitle>Installed Program</segtitle>
|
---|
| 236 | <segtitle>Installed Libraries</segtitle>
|
---|
| 237 | <segtitle>Installed Directories</segtitle>
|
---|
| 238 |
|
---|
| 239 | <seglistitem>
|
---|
| 240 | <seg>sdl2-config</seg>
|
---|
| 241 | <seg>libSDL2.so</seg>
|
---|
| 242 | <seg>/usr/include/SDL2 and
|
---|
| 243 | /usr/share/doc/SDL-&sdl2-version;</seg>
|
---|
| 244 | </seglistitem>
|
---|
| 245 | </segmentedlist>
|
---|
| 246 |
|
---|
| 247 | <variablelist>
|
---|
| 248 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 249 | <?dbfo list-presentation="list"?>
|
---|
| 250 | <?dbhtml list-presentation="table"?>
|
---|
| 251 |
|
---|
| 252 | <varlistentry id="sdl2-config">
|
---|
| 253 | <term><command>sdl2-config</command></term>
|
---|
| 254 | <listitem>
|
---|
[2eeb8695] | 255 | <para>
|
---|
| 256 | determines the compile and linker flags that should be used to
|
---|
| 257 | compile and link programs that use
|
---|
[4c24eb0a] | 258 | <filename class="libraryfile">libSDL2</filename>
|
---|
[2eeb8695] | 259 | </para>
|
---|
[36aeaf9a] | 260 | <indexterm zone="sdl2 sdl2-config">
|
---|
| 261 | <primary sortas="b-sdl2-config">sdl2-config</primary>
|
---|
| 262 | </indexterm>
|
---|
| 263 | </listitem>
|
---|
| 264 | </varlistentry>
|
---|
| 265 |
|
---|
| 266 | <varlistentry id="libsdl2">
|
---|
[4c24eb0a] | 267 | <term><filename class="libraryfile">libSDL2.so</filename></term>
|
---|
[36aeaf9a] | 268 | <listitem>
|
---|
[2eeb8695] | 269 | <para>
|
---|
| 270 | contains functions that provide low level access to audio,
|
---|
| 271 | keyboard, mouse, joystick, 3D hardware via OpenGL, and
|
---|
[4c24eb0a] | 272 | 2D frame buffer across multiple platforms
|
---|
[2eeb8695] | 273 | </para>
|
---|
[36aeaf9a] | 274 | <indexterm zone="sdl2 libsdl2">
|
---|
| 275 | <primary sortas="c-libsdl2">libSDL2.so</primary>
|
---|
| 276 | </indexterm>
|
---|
| 277 | </listitem>
|
---|
| 278 | </varlistentry>
|
---|
| 279 |
|
---|
| 280 | </variablelist>
|
---|
| 281 |
|
---|
| 282 | </sect2>
|
---|
| 283 |
|
---|
| 284 | </sect1>
|
---|