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