The Simple DirectMedia Layer Version 2 (SDL2 for short) is a cross-platform library designed to make it easy to write multimedia software, such as games and emulators.
This package is known to build and work properly using an LFS-9.0 platform.
Download (HTTP): http://www.libsdl.org/release/SDL2-2.0.10.tar.gz
Download MD5 sum: 5a2114f2a6f348bdab5bf52b994811db
Download size: 5.3 MB
Estimated disk space required: 169 MB (with docs)
Estimated build time: 0.4 SBU (using parallelism=4; with docs)
ALSA-1.1.9, Doxygen-1.8.16 (to create documentation), ibus-1.5.20, NASM-2.14.02, PulseAudio-12.2, X Window System, DirectFB, and fcitx
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/sdl
Install SDL2 by running the following commands:
./configure --prefix=/usr && make
If you have Doxygen-1.8.16 installed and want to build the html documentation, run the following commands:
pushd docs && doxygen && popd
If you wish to build and run the package regression tests, do not delete the static libraries below until after the tests are built.
Now, as the root
user:
make install && rm -v /usr/lib/libSDL2*.a
If you built the documentation, install it as the root
user:
install -v -m755 -d /usr/share/doc/SDL2-2.0.10/html && cp -Rv docs/output/html/* /usr/share/doc/SDL2-2.0.10/html
rm -v
/usr/lib/libSDL2*.a: Normally static libraries can
be disabled with a --disable-static
option to configure, but that breaks the build in this package.
--disable-alsa-shared
: This switch
disables dynamically loading ALSA shared libraries.
--disable-sdl-dlopen
: This switch
disables using dlopen for shared object loading. Loading image
backend libraries like libpng dynamically on the fly does not work.
--disable-x11-shared
: This switch
disables dynamically loading X11 shared libraries.
As with most libraries, there is no configuration to do, save
that the library directory, i.e., /opt/lib
or /usr/local/lib
should appear in /etc/ld.so.conf
so that ldd can find the shared
libraries. After checking that this is the case, /sbin/ldconfig should be run
while logged in as root
.
Last updated on 2019-08-18 13:33:32 -0700