[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 " ">
|
---|
[83f8954] | 9 | <!ENTITY sdl2-md5sum "783b6f2df8ff02b19bb5ce492b99c8ff">
|
---|
| 10 | <!ENTITY sdl2-size "5.5 MB">
|
---|
| 11 | <!ENTITY sdl2-buildsize "173 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 |
|
---|
[11193870] | 38 | &lfs91_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 |
|
---|
| 86 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 87 | <para role="optional">
|
---|
| 88 | <xref linkend="alsa"/>,
|
---|
| 89 | <xref linkend="doxygen"/> (to create documentation),
|
---|
[7b1bc743] | 90 | <xref linkend="ibus"/>,
|
---|
[36aeaf9a] | 91 | <xref linkend="nasm"/>,
|
---|
| 92 | <xref linkend="pulseaudio"/>,
|
---|
[6ef16d1] | 93 | <xref linkend="libsamplerate"/>,
|
---|
[bb9afa84] | 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>
|
---|
[36aeaf9a] | 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 |
|
---|
[2eeb8695] | 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>
|
---|
[33e63255] | 111 |
|
---|
| 112 | <screen><userinput remap="pre">case $(uname -m) in
|
---|
| 113 | i?86) patch -Np1 -i ../SDL2-&sdl2-version;-opengl_include_fix-1.patch ;;
|
---|
| 114 | esac</userinput></screen>
|
---|
| 115 |
|
---|
[2eeb8695] | 116 | <para>
|
---|
| 117 | Install <application>SDL2</application> by running the
|
---|
| 118 | following commands:
|
---|
| 119 | </para>
|
---|
[36aeaf9a] | 120 |
|
---|
| 121 | <screen><userinput>./configure --prefix=/usr &&
|
---|
| 122 | make</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 |
|
---|
[2f3e3de9] | 129 | <screen remap="doc"><userinput>pushd docs &&
|
---|
[36aeaf9a] | 130 | doxygen &&
|
---|
| 131 | popd</userinput></screen>
|
---|
| 132 |
|
---|
| 133 | <note>
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 139 | </note>
|
---|
| 140 |
|
---|
[2eeb8695] | 141 | <para>
|
---|
| 142 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 143 | </para>
|
---|
[36aeaf9a] | 144 |
|
---|
| 145 | <screen role="root"><userinput>make install &&
|
---|
| 146 | rm -v /usr/lib/libSDL2*.a</userinput></screen>
|
---|
| 147 |
|
---|
[2eeb8695] | 148 | <para>
|
---|
| 149 | If you built the documentation, install it as the <systemitem
|
---|
| 150 | class="username">root</systemitem> user:
|
---|
| 151 | </para>
|
---|
[36aeaf9a] | 152 |
|
---|
[2f3e3de9] | 153 | <screen role="root"
|
---|
| 154 | remap="doc"><userinput>install -v -m755 -d /usr/share/doc/SDL2-&sdl2-version;/html &&
|
---|
[36aeaf9a] | 155 | cp -Rv docs/output/html/* /usr/share/doc/SDL2-&sdl2-version;/html</userinput></screen>
|
---|
| 156 |
|
---|
| 157 | </sect2>
|
---|
[166d300] | 158 | <!--
|
---|
| 159 | The tests are broken for version 2.0.10. It cannot find libSDL2_test*.
|
---|
[36aeaf9a] | 160 |
|
---|
| 161 | <sect2 role="testing">
|
---|
| 162 | <title>Testing SDL2</title>
|
---|
| 163 |
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 170 |
|
---|
| 171 | <screen><userinput>cd test &&
|
---|
| 172 | ./configure &&
|
---|
| 173 | make</userinput></screen>
|
---|
| 174 |
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 181 |
|
---|
| 182 | </sect2>
|
---|
[166d300] | 183 | -->
|
---|
[36aeaf9a] | 184 | <sect2 role="commands">
|
---|
| 185 | <title>Command Explanations</title>
|
---|
| 186 |
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 192 |
|
---|
[2eeb8695] | 193 | <para>
|
---|
| 194 | <option>--disable-alsa-shared</option>: This switch disables
|
---|
| 195 | dynamically loading ALSA shared libraries.
|
---|
| 196 | </para>
|
---|
[36aeaf9a] | 197 |
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 203 |
|
---|
[2eeb8695] | 204 | <para>
|
---|
| 205 | <option>--disable-x11-shared</option>: This switch disables
|
---|
| 206 | dynamically loading X11 shared libraries.
|
---|
| 207 | </para>
|
---|
[36aeaf9a] | 208 |
|
---|
| 209 | </sect2>
|
---|
| 210 |
|
---|
| 211 | <sect2 role="configuration">
|
---|
[16dfae9] | 212 | <title>Configuring SDL2</title>
|
---|
[36aeaf9a] | 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>
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 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>
|
---|
[2eeb8695] | 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>
|
---|
[36aeaf9a] | 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>
|
---|