sdl2-compat-2.32.60

Introduction to sdl2-compat

The sdl2-compat package provides a compatibility layer for packages that require SDL2, utilizing SDL3 as the backend.

This package is known to build and work properly using an LFS 12.4 platform.

Package Information

  • Download (HTTP): https://www.libsdl.org/release/sdl2-compat-2.32.60.tar.gz

  • Download SHA256 Sum: 5ef7b1ddd315d5c57f0cece9cf97e1ce044581b1b692044440e61463c25aece8

  • Download MD5 sum: 87a86bb196197eaa701bd60c06c2de72

  • Download size: 56,542.7 KB

  • Estimated disk space required: 59,178.6 KB

  • Estimated build time: less than 0.5 SBU

sdl2-compat Dependencies

Required

CMake-4.1.3 and SDL3-3.3.4

Installation of sdl2-compat

Prepare sdl2-compat by running the following commands:

cmake -B build -D CMAKE_INSTALL_PREFIX=/usr   \
      -D CMAKE_BUILD_TYPE=Release    \
      -D CMAKE_SKIP_INSTALL_RPATH=ON \
      -D SDL2COMPAT_STATIC=OFF       \
      -D SDL2COMPAT_TESTS=OFF        \
      -W no-dev -G Ninja
ninja -C build

Now Install the package, as the root user:

ninja -C build install
rm -vf /usr/lib/libSDL2_test.a

Testing sdl2-compat

If you want to build the tests, issue the following commands:

cmake -B build-tests -D CMAKE_INSTALL_PREFIX=/usr   \
      -D CMAKE_BUILD_TYPE=Release    \
      -D CMAKE_SKIP_INSTALL_RPATH=ON \
      -D SDL2COMPAT_INSTALL_TESTS=ON \
      -D SDL2COMPAT_STATIC=OFF       \
      -D SDL2COMPAT_TESTS=ON         \
      -W no-dev -G Ninja

ninja -C build-tests
DESTDIR=$PWD/TESTS ninja -C build-tests install

Now you will be able to run the tests in TESTS/usr/libexec/installed-tests/SDL2_compat. You will have to run the tests individually. Some of them may need to be manually killed and audio will need to be working so that you can hear from the default audio output.

Command Explanations

-D SDL2COMPAT_STATIC=OFF: This parameter disables building the static libraries.

-D SDL2COMPAT_TESTS=OFF: This parameter disables building the tests.

rm -vf /usr/lib/libSDL2_test.a: This command removes a useless static library.

Contents

Installed Program: sdl2-config
Installed Libraries: libSDL2.so
Installed Directories: /usr/include/SDL2 and /usr/lib/cmake/SDL2

Short Descriptions

sdl2-config

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

libSDL2.so

provides compatibility functions for SDL2 applications using SDL3