Installation of SDL2
First, if you are building on a 32-bit i686 system, apply a patch
containing a fix for the OpenGL headers and their data types:
case $(uname -m) in
i?86) patch -Np1 -i ../SDL2-2.0.12-opengl_include_fix-1.patch ;;
esac
Install SDL2 by running the
following commands:
./configure --prefix=/usr &&
make
If you have Doxygen-1.8.19 installed and want to build the
html documentation, run the following commands:
pushd docs &&
doxygen &&
popd
Note
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.12/html &&
cp -Rv docs/output/html/* /usr/share/doc/SDL2-2.0.12/html
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.