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