glfs/multimedia/libdriv/sdl2.xml
Tim Tassonis 5a6685e1f6 Update to SDL2-2.0.8. Fixes #10459
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19922 af4574ff-66df-0310-9fd7-8a98e5e911e0
2018-03-06 23:10:08 +00:00

220 lines
6.9 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY sdl2-download-http "http://www.libsdl.org/release/SDL2-&sdl2-version;.tar.gz">
<!ENTITY sdl2-download-ftp " ">
<!ENTITY sdl2-md5sum "3800d705cef742c6a634f202c37f263f">
<!ENTITY sdl2-size "4.7 MB">
<!ENTITY sdl2-buildsize "135 MB (with docs)">
<!ENTITY sdl2-time "0.3 SBU (using parallelism=4)">
]>
<sect1 id="sdl2" xreflabel="SDL2-&sdl2-version;">
<?dbhtml filename="sdl2.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>SDL2-&sdl2-version;</title>
<indexterm zone="sdl2">
<primary sortas="a-SDL2">SDL2</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to SDL2</title>
<para>The Simple DirectMedia Layer Version 2
(<application>SDL2</application> for short) is a cross-platform library
designed to make it easy to write multimedia software, such as games and
emulators.</para>
&lfs82_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&sdl2-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&sdl2-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &sdl2-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &sdl2-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &sdl2-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &sdl2-time;</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">SDL2 Dependencies</bridgehead>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="alsa"/>,
<xref linkend="doxygen"/> (to create documentation),
<xref linkend="ibus"/>,
<xref linkend="nasm"/>,
<xref linkend="pulseaudio"/>,
<xref linkend="x-window-system"/>,
<ulink url="http://pkgs.fedoraproject.org/repo/pkgs/directfb/">DirectFB</ulink>, and
<ulink url="https://fcitx-im.org/">fcitx</ulink>
</para>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/sdl"/></para>
</sect2>
<sect2 role="installation">
<title>Installation of SDL2</title>
<para>Install <application>SDL2</application> by running the
following commands:</para>
<screen><userinput>./configure --prefix=/usr &amp;&amp;
make</userinput></screen>
<para>
If you have <xref linkend="doxygen"/> installed and want to build the
html documentation, run the following commands:
</para>
<screen><userinput>pushd docs &amp;&amp;
doxygen &amp;&amp;
popd</userinput></screen>
<note>
<para>If you wish to build and run the package regression
tests, do not delete the static libraries below until after
the tests are built.</para>
</note>
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install &amp;&amp;
rm -v /usr/lib/libSDL2*.a</userinput></screen>
<para>If you built the documentation, install it as the <systemitem
class="username">root</systemitem> user:</para>
<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/SDL2-&sdl2-version;/html &amp;&amp;
cp -Rv docs/output/html/* /usr/share/doc/SDL2-&sdl2-version;/html</userinput></screen>
</sect2>
<sect2 role="testing">
<title>Testing SDL2</title>
<para>If you wish to, test the installation of
<application>SDL2</application> using the included
test programs.
None of the resulting binaries need to be installed.
Issue the following commands to build the
test programs:</para>
<screen><userinput>cd test &amp;&amp;
./configure &amp;&amp;
make</userinput></screen>
<para>Each of the test programs (they are listed in the
<filename>README</filename> file in this directory) will need to be run
individually. Many of them will need to be manually killed. Additionally,
speakers need to be on with the volume at a suitable level.</para>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><command>rm -v /usr/lib/libSDL2*.a</command>: Normally
static libraries can be disabled with a <option>--disable-static</option>
option to configure, but that breaks the build in this package.</para>
<para><option>--disable-alsa-shared</option>: This switch disables
dynamically loading ALSA shared libraries.</para>
<para><option>--disable-sdl-dlopen</option>: This switch disables using
dlopen for shared object loading. Loading image backend libraries like
libpng dynamically on the fly does not work.</para>
<para><option>--disable-x11-shared</option>: This switch disables
dynamically loading X11 shared libraries.</para>
</sect2>
<sect2 role="configuration">
<title>Configuring SDL</title>
<sect3>
<title>Configuration Information</title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/lib-config.xml"/>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Program</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>sdl2-config</seg>
<seg>libSDL2.so</seg>
<seg>/usr/include/SDL2 and
/usr/share/doc/SDL-&sdl2-version;</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="sdl2-config">
<term><command>sdl2-config</command></term>
<listitem>
<para>determines the compile and linker flags that should be used to
compile and link programs that use
<filename class='libraryfile'>libSDL2</filename>.</para>
<indexterm zone="sdl2 sdl2-config">
<primary sortas="b-sdl2-config">sdl2-config</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libsdl2">
<term><filename class='libraryfile'>libSDL2.so</filename></term>
<listitem>
<para> library provides low level access to audio, keyboard, mouse,
joystick, 3D hardware via OpenGL, and
2D frame buffer across multiple platforms.</para>
<indexterm zone="sdl2 libsdl2">
<primary sortas="c-libsdl2">libSDL2.so</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>