SDL2-2.0.8

Introduction to SDL2

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.

本パッケージは LFS-8.3 において正しくビルドでき動作することが確認されています。

Package Information

  • Download (HTTP): http://www.libsdl.org/release/SDL2-2.0.8.tar.gz

  • Download MD5 sum: 3800d705cef742c6a634f202c37f263f

  • Download size: 4.7 MB

  • Estimated disk space required: 135 MB (with docs)

  • Estimated build time: 0.3 SBU (using parallelism=4)

SDL2 Dependencies

Optional

ALSA-1.1.6, Doxygen-1.8.14 (to create documentation), ibus-1.5.19, NASM-2.13.03, PulseAudio-12.2, X ウィンドウシステム, DirectFB, and fcitx

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/sdl

Installation of SDL2

Install SDL2 by running the following commands:

./configure --prefix=/usr &&
make

If you have Doxygen-1.8.14 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.8/html &&
cp -Rv  docs/output/html/* /usr/share/doc/SDL2-2.0.8/html

Testing SDL2

If you wish to, test the installation of SDL2 using the included test programs. None of the resulting binaries need to be installed. Issue the following commands to build the test programs:

cd test &&
./configure &&
make

Each of the test programs (they are listed in the README 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.

Command Explanations

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.

Configuring SDL

Configuration Information

ライブラリのほとんどは、どこにインストールされているかを定める方法がないものです。 したがってインストールされるディレクトリがどこかを捉えておく必要があります。 つまり /etc/ld.so.conf ファイル内に /opt/lib とか /usr/local/lib といったディレクトリを記述する必要が出てきます。 これを行っておかないと ldd は共有ライブラリを見つけ出すことができません。 上の設定が必要であったなら、それを実施した上で root ユーザーでログインし /sbin/ldconfig を実行してください。

Contents

Installed Program: sdl2-config
Installed Libraries: libSDL2.so
Installed Directories: /usr/include/SDL2 and /usr/share/doc/SDL-2.0.8

Short Descriptions

sdl2-config

determines the compile and linker flags that should be used to compile and link programs that use libSDL2.

libSDL2.so

library provides low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D frame buffer across multiple platforms.

最終更新日: 2018-08-20 12:08:15 +0900