[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[36aeaf9a] | 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 " ">
|
---|
[e0f9f5ee] | 9 | <!ENTITY sdl2-md5sum "95d5e64024bc3579771cd841e30d832e">
|
---|
[e74d48f] | 10 | <!ENTITY sdl2-size "7.2 MB">
|
---|
| 11 | <!ENTITY sdl2-buildsize "186 MB (with docs)">
|
---|
[e0f9f5ee] | 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 |
|
---|
[3c9b5e9] | 34 | &lfs122_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">
|
---|
[0c848d7] | 92 | <xref linkend="alsa-lib"/>,
|
---|
[36aeaf9a] | 93 | <xref linkend="doxygen"/> (to create documentation),
|
---|
[7b1bc743] | 94 | <xref linkend="ibus"/>,
|
---|
[ba3d767] | 95 | <xref linkend="libsamplerate"/>,
|
---|
[cfd98d7] | 96 | <xref linkend="libunwind"/>,
|
---|
[36aeaf9a] | 97 | <xref linkend="nasm"/>,
|
---|
[ba3d767] | 98 | <xref linkend="pipewire"/>,
|
---|
[36aeaf9a] | 99 | <xref linkend="pulseaudio"/>,
|
---|
[bb9afa84] | 100 | <xref linkend="x-window-system"/>,
|
---|
[75b1a338] | 101 | <ulink url="https://pkgs.fedoraproject.org/repo/pkgs/directfb/">DirectFB</ulink>,
|
---|
[ba3d767] | 102 | <ulink url="https://fcitx-im.org/">fcitx</ulink>,
|
---|
| 103 | <ulink url="https://jackaudio.org/">jack</ulink>, and
|
---|
| 104 | <ulink url="https://sndio.org/">sndio</ulink>
|
---|
[36aeaf9a] | 105 | </para>
|
---|
| 106 |
|
---|
| 107 | </sect2>
|
---|
| 108 |
|
---|
| 109 | <sect2 role="installation">
|
---|
| 110 | <title>Installation of SDL2</title>
|
---|
[3f33827] | 111 |
|
---|
[2eeb8695] | 112 | <para>
|
---|
| 113 | Install <application>SDL2</application> by running the
|
---|
| 114 | following commands:
|
---|
| 115 | </para>
|
---|
[36aeaf9a] | 116 |
|
---|
| 117 | <screen><userinput>./configure --prefix=/usr &&
|
---|
| 118 | make</userinput></screen>
|
---|
| 119 |
|
---|
| 120 | <para>
|
---|
| 121 | If you have <xref linkend="doxygen"/> installed and want to build the
|
---|
| 122 | html documentation, run the following commands:
|
---|
| 123 | </para>
|
---|
| 124 |
|
---|
[2f3e3de9] | 125 | <screen remap="doc"><userinput>pushd docs &&
|
---|
[36aeaf9a] | 126 | doxygen &&
|
---|
| 127 | popd</userinput></screen>
|
---|
| 128 |
|
---|
| 129 | <note>
|
---|
[2eeb8695] | 130 | <para>
|
---|
| 131 | If you wish to build and run the package regression
|
---|
| 132 | tests, do not delete the static libraries below until after
|
---|
| 133 | the tests are built.
|
---|
| 134 | </para>
|
---|
[36aeaf9a] | 135 | </note>
|
---|
| 136 |
|
---|
[2eeb8695] | 137 | <para>
|
---|
| 138 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 139 | </para>
|
---|
[36aeaf9a] | 140 |
|
---|
| 141 | <screen role="root"><userinput>make install &&
|
---|
| 142 | rm -v /usr/lib/libSDL2*.a</userinput></screen>
|
---|
| 143 |
|
---|
[2eeb8695] | 144 | <para>
|
---|
| 145 | If you built the documentation, install it as the <systemitem
|
---|
| 146 | class="username">root</systemitem> user:
|
---|
| 147 | </para>
|
---|
[36aeaf9a] | 148 |
|
---|
[2f3e3de9] | 149 | <screen role="root"
|
---|
| 150 | remap="doc"><userinput>install -v -m755 -d /usr/share/doc/SDL2-&sdl2-version;/html &&
|
---|
[36aeaf9a] | 151 | cp -Rv docs/output/html/* /usr/share/doc/SDL2-&sdl2-version;/html</userinput></screen>
|
---|
| 152 |
|
---|
| 153 | </sect2>
|
---|
| 154 |
|
---|
| 155 | <sect2 role="testing">
|
---|
| 156 | <title>Testing SDL2</title>
|
---|
| 157 |
|
---|
[2eeb8695] | 158 | <para>
|
---|
| 159 | If you wish to, test the installation of <application>SDL2</application>
|
---|
| 160 | using the included test programs. None of the resulting binaries need
|
---|
| 161 | to be installed. Issue the following commands to build the test
|
---|
| 162 | programs:
|
---|
| 163 | </para>
|
---|
[36aeaf9a] | 164 |
|
---|
| 165 | <screen><userinput>cd test &&
|
---|
| 166 | ./configure &&
|
---|
| 167 | make</userinput></screen>
|
---|
| 168 |
|
---|
[2eeb8695] | 169 | <para>
|
---|
| 170 | Each of the test programs (they are listed in the
|
---|
| 171 | <filename>README</filename> file in this directory) will need to be run
|
---|
| 172 | individually. Many of them will need to be manually killed. Additionally,
|
---|
| 173 | speakers need to be on with the volume at a suitable level.
|
---|
| 174 | </para>
|
---|
[36aeaf9a] | 175 |
|
---|
| 176 | </sect2>
|
---|
[94c2369] | 177 |
|
---|
[36aeaf9a] | 178 | <sect2 role="commands">
|
---|
| 179 | <title>Command Explanations</title>
|
---|
| 180 |
|
---|
[2eeb8695] | 181 | <para>
|
---|
[8558044] | 182 | <command>rm -v /usr/lib/libSDL2*.a</command>: Normally
|
---|
[2eeb8695] | 183 | static libraries can be disabled with a <option>--disable-static</option>
|
---|
| 184 | option to configure, but that breaks the build in this package.
|
---|
| 185 | </para>
|
---|
[36aeaf9a] | 186 |
|
---|
[cfd98d7] | 187 | <!--
|
---|
[2eeb8695] | 188 | <para>
|
---|
[cfd98d7] | 189 | <option>- -disable-alsa-shared</option>: This switch disables
|
---|
[2eeb8695] | 190 | dynamically loading ALSA shared libraries.
|
---|
| 191 | </para>
|
---|
[cfd98d7] | 192 | -->
|
---|
[36aeaf9a] | 193 |
|
---|
[cfd98d7] | 194 | <!--
|
---|
[2eeb8695] | 195 | <para>
|
---|
[cfd98d7] | 196 | <option>- -disable-x11-shared</option>: This switch disables
|
---|
[2eeb8695] | 197 | dynamically loading X11 shared libraries.
|
---|
| 198 | </para>
|
---|
[cfd98d7] | 199 | -->
|
---|
[36aeaf9a] | 200 |
|
---|
| 201 | </sect2>
|
---|
| 202 |
|
---|
[cfd98d7] | 203 | <!--
|
---|
[36aeaf9a] | 204 | <sect2 role="configuration">
|
---|
[16dfae9] | 205 | <title>Configuring SDL2</title>
|
---|
[36aeaf9a] | 206 |
|
---|
| 207 | <sect3>
|
---|
| 208 | <title>Configuration Information</title>
|
---|
| 209 |
|
---|
| 210 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 211 | href="../../xincludes/lib-config.xml"/>
|
---|
| 212 |
|
---|
| 213 | </sect3>
|
---|
| 214 |
|
---|
| 215 | </sect2>
|
---|
[cfd98d7] | 216 | -->
|
---|
[36aeaf9a] | 217 |
|
---|
| 218 | <sect2 role="content">
|
---|
| 219 | <title>Contents</title>
|
---|
| 220 |
|
---|
| 221 | <segmentedlist>
|
---|
| 222 | <segtitle>Installed Program</segtitle>
|
---|
| 223 | <segtitle>Installed Libraries</segtitle>
|
---|
| 224 | <segtitle>Installed Directories</segtitle>
|
---|
| 225 |
|
---|
| 226 | <seglistitem>
|
---|
| 227 | <seg>sdl2-config</seg>
|
---|
| 228 | <seg>libSDL2.so</seg>
|
---|
[2cc15a2b] | 229 | <seg>/usr/include/SDL2,
|
---|
| 230 | /usr/lib/cmake/SDL2, and
|
---|
[36aeaf9a] | 231 | /usr/share/doc/SDL-&sdl2-version;</seg>
|
---|
| 232 | </seglistitem>
|
---|
| 233 | </segmentedlist>
|
---|
| 234 |
|
---|
| 235 | <variablelist>
|
---|
| 236 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 237 | <?dbfo list-presentation="list"?>
|
---|
| 238 | <?dbhtml list-presentation="table"?>
|
---|
| 239 |
|
---|
| 240 | <varlistentry id="sdl2-config">
|
---|
| 241 | <term><command>sdl2-config</command></term>
|
---|
| 242 | <listitem>
|
---|
[2eeb8695] | 243 | <para>
|
---|
| 244 | determines the compile and linker flags that should be used to
|
---|
| 245 | compile and link programs that use
|
---|
[4c24eb0a] | 246 | <filename class="libraryfile">libSDL2</filename>
|
---|
[2eeb8695] | 247 | </para>
|
---|
[36aeaf9a] | 248 | <indexterm zone="sdl2 sdl2-config">
|
---|
| 249 | <primary sortas="b-sdl2-config">sdl2-config</primary>
|
---|
| 250 | </indexterm>
|
---|
| 251 | </listitem>
|
---|
| 252 | </varlistentry>
|
---|
| 253 |
|
---|
| 254 | <varlistentry id="libsdl2">
|
---|
[4c24eb0a] | 255 | <term><filename class="libraryfile">libSDL2.so</filename></term>
|
---|
[36aeaf9a] | 256 | <listitem>
|
---|
[2eeb8695] | 257 | <para>
|
---|
| 258 | contains functions that provide low level access to audio,
|
---|
| 259 | keyboard, mouse, joystick, 3D hardware via OpenGL, and
|
---|
[cfd98d7] | 260 | the 2D frame buffer across multiple platforms
|
---|
[2eeb8695] | 261 | </para>
|
---|
[36aeaf9a] | 262 | <indexterm zone="sdl2 libsdl2">
|
---|
| 263 | <primary sortas="c-libsdl2">libSDL2.so</primary>
|
---|
| 264 | </indexterm>
|
---|
| 265 | </listitem>
|
---|
| 266 | </varlistentry>
|
---|
| 267 |
|
---|
| 268 | </variablelist>
|
---|
| 269 |
|
---|
| 270 | </sect2>
|
---|
| 271 |
|
---|
| 272 | </sect1>
|
---|