[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 " ">
|
---|
[ff7c4c3e] | 9 | <!ENTITY sdl2-md5sum "f2ecfba915c54f7200f504d8b48a5dfe">
|
---|
| 10 | <!ENTITY sdl2-size "5.0 MB">
|
---|
| 11 | <!ENTITY sdl2-buildsize "164 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 | <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 |
|
---|
[59417918] | 37 | &lfs84_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 |
|
---|
| 61 | <bridgehead renderas="sect3">SDL2 Dependencies</bridgehead>
|
---|
| 62 |
|
---|
| 63 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 64 | <para role="optional">
|
---|
| 65 | <xref linkend="alsa"/>,
|
---|
| 66 | <xref linkend="doxygen"/> (to create documentation),
|
---|
[7b1bc743] | 67 | <xref linkend="ibus"/>,
|
---|
[36aeaf9a] | 68 | <xref linkend="nasm"/>,
|
---|
| 69 | <xref linkend="pulseaudio"/>,
|
---|
[bb9afa84] | 70 | <xref linkend="x-window-system"/>,
|
---|
| 71 | <ulink url="http://pkgs.fedoraproject.org/repo/pkgs/directfb/">DirectFB</ulink>, and
|
---|
| 72 | <ulink url="https://fcitx-im.org/">fcitx</ulink>
|
---|
[36aeaf9a] | 73 | </para>
|
---|
| 74 |
|
---|
| 75 | <para condition="html" role="usernotes">User Notes:
|
---|
| 76 | <ulink url="&blfs-wiki;/sdl"/></para>
|
---|
| 77 |
|
---|
| 78 | </sect2>
|
---|
| 79 |
|
---|
| 80 | <sect2 role="installation">
|
---|
| 81 | <title>Installation of SDL2</title>
|
---|
| 82 |
|
---|
| 83 | <para>Install <application>SDL2</application> by running the
|
---|
| 84 | following commands:</para>
|
---|
| 85 |
|
---|
| 86 | <screen><userinput>./configure --prefix=/usr &&
|
---|
| 87 | make</userinput></screen>
|
---|
| 88 |
|
---|
| 89 | <para>
|
---|
| 90 | If you have <xref linkend="doxygen"/> installed and want to build the
|
---|
| 91 | html documentation, run the following commands:
|
---|
| 92 | </para>
|
---|
| 93 |
|
---|
| 94 | <screen><userinput>pushd docs &&
|
---|
| 95 | doxygen &&
|
---|
| 96 | popd</userinput></screen>
|
---|
| 97 |
|
---|
| 98 | <note>
|
---|
| 99 | <para>If you wish to build and run the package regression
|
---|
| 100 | tests, do not delete the static libraries below until after
|
---|
| 101 | the tests are built.</para>
|
---|
| 102 | </note>
|
---|
| 103 |
|
---|
| 104 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 105 |
|
---|
| 106 | <screen role="root"><userinput>make install &&
|
---|
| 107 | rm -v /usr/lib/libSDL2*.a</userinput></screen>
|
---|
| 108 |
|
---|
| 109 | <para>If you built the documentation, install it as the <systemitem
|
---|
| 110 | class="username">root</systemitem> user:</para>
|
---|
| 111 |
|
---|
| 112 | <screen role="root"><userinput>install -v -m755 -d /usr/share/doc/SDL2-&sdl2-version;/html &&
|
---|
| 113 | cp -Rv docs/output/html/* /usr/share/doc/SDL2-&sdl2-version;/html</userinput></screen>
|
---|
| 114 |
|
---|
| 115 | </sect2>
|
---|
| 116 |
|
---|
| 117 | <sect2 role="testing">
|
---|
| 118 | <title>Testing SDL2</title>
|
---|
| 119 |
|
---|
| 120 | <para>If you wish to, test the installation of
|
---|
| 121 | <application>SDL2</application> using the included
|
---|
| 122 | test programs.
|
---|
| 123 | None of the resulting binaries need to be installed.
|
---|
| 124 | Issue the following commands to build the
|
---|
| 125 | test programs:</para>
|
---|
| 126 |
|
---|
| 127 | <screen><userinput>cd test &&
|
---|
| 128 | ./configure &&
|
---|
| 129 | make</userinput></screen>
|
---|
| 130 |
|
---|
| 131 | <para>Each of the test programs (they are listed in the
|
---|
[98d1db55] | 132 | <filename>README</filename> file in this directory) will need to be run
|
---|
[36aeaf9a] | 133 | individually. Many of them will need to be manually killed. Additionally,
|
---|
| 134 | speakers need to be on with the volume at a suitable level.</para>
|
---|
| 135 |
|
---|
| 136 | </sect2>
|
---|
| 137 |
|
---|
| 138 | <sect2 role="commands">
|
---|
| 139 | <title>Command Explanations</title>
|
---|
| 140 |
|
---|
| 141 | <para><command>rm -v /usr/lib/libSDL2*.a</command>: Normally
|
---|
[6f72a4a] | 142 | static libraries can be disabled with a <option>--disable-static</option>
|
---|
[36aeaf9a] | 143 | option to configure, but that breaks the build in this package.</para>
|
---|
| 144 |
|
---|
| 145 | <para><option>--disable-alsa-shared</option>: This switch disables
|
---|
| 146 | dynamically loading ALSA shared libraries.</para>
|
---|
| 147 |
|
---|
| 148 | <para><option>--disable-sdl-dlopen</option>: This switch disables using
|
---|
| 149 | dlopen for shared object loading. Loading image backend libraries like
|
---|
| 150 | libpng dynamically on the fly does not work.</para>
|
---|
| 151 |
|
---|
| 152 | <para><option>--disable-x11-shared</option>: This switch disables
|
---|
| 153 | dynamically loading X11 shared libraries.</para>
|
---|
| 154 |
|
---|
| 155 | </sect2>
|
---|
| 156 |
|
---|
| 157 | <sect2 role="configuration">
|
---|
| 158 | <title>Configuring SDL</title>
|
---|
| 159 |
|
---|
| 160 | <sect3>
|
---|
| 161 | <title>Configuration Information</title>
|
---|
| 162 |
|
---|
| 163 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 164 | href="../../xincludes/lib-config.xml"/>
|
---|
| 165 |
|
---|
| 166 | </sect3>
|
---|
| 167 |
|
---|
| 168 | </sect2>
|
---|
| 169 |
|
---|
| 170 | <sect2 role="content">
|
---|
| 171 | <title>Contents</title>
|
---|
| 172 |
|
---|
| 173 | <segmentedlist>
|
---|
| 174 | <segtitle>Installed Program</segtitle>
|
---|
| 175 | <segtitle>Installed Libraries</segtitle>
|
---|
| 176 | <segtitle>Installed Directories</segtitle>
|
---|
| 177 |
|
---|
| 178 | <seglistitem>
|
---|
| 179 | <seg>sdl2-config</seg>
|
---|
| 180 | <seg>libSDL2.so</seg>
|
---|
| 181 | <seg>/usr/include/SDL2 and
|
---|
| 182 | /usr/share/doc/SDL-&sdl2-version;</seg>
|
---|
| 183 | </seglistitem>
|
---|
| 184 | </segmentedlist>
|
---|
| 185 |
|
---|
| 186 | <variablelist>
|
---|
| 187 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 188 | <?dbfo list-presentation="list"?>
|
---|
| 189 | <?dbhtml list-presentation="table"?>
|
---|
| 190 |
|
---|
| 191 | <varlistentry id="sdl2-config">
|
---|
| 192 | <term><command>sdl2-config</command></term>
|
---|
| 193 | <listitem>
|
---|
| 194 | <para>determines the compile and linker flags that should be used to
|
---|
| 195 | compile and link programs that use
|
---|
| 196 | <filename class='libraryfile'>libSDL2</filename>.</para>
|
---|
| 197 | <indexterm zone="sdl2 sdl2-config">
|
---|
| 198 | <primary sortas="b-sdl2-config">sdl2-config</primary>
|
---|
| 199 | </indexterm>
|
---|
| 200 | </listitem>
|
---|
| 201 | </varlistentry>
|
---|
| 202 |
|
---|
| 203 | <varlistentry id="libsdl2">
|
---|
| 204 | <term><filename class='libraryfile'>libSDL2.so</filename></term>
|
---|
| 205 | <listitem>
|
---|
| 206 | <para> library provides low level access to audio, keyboard, mouse,
|
---|
| 207 | joystick, 3D hardware via OpenGL, and
|
---|
| 208 | 2D frame buffer across multiple platforms.</para>
|
---|
| 209 | <indexterm zone="sdl2 libsdl2">
|
---|
| 210 | <primary sortas="c-libsdl2">libSDL2.so</primary>
|
---|
| 211 | </indexterm>
|
---|
| 212 | </listitem>
|
---|
| 213 | </varlistentry>
|
---|
| 214 |
|
---|
| 215 | </variablelist>
|
---|
| 216 |
|
---|
| 217 | </sect2>
|
---|
| 218 |
|
---|
| 219 | </sect1>
|
---|