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