2021-10-18 14:13:14 +02:00
|
|
|
# Description: SDL version 2, Simple DirectMedia Layer
|
|
|
|
# URL: https://www.libsdl.org
|
|
|
|
# Maintainer: Juergen Daubert, jue at crux dot nu
|
|
|
|
# Depends on: mesa cmake
|
|
|
|
# Optional: alsa-lib jack ninja pipewire pulseaudio wayland-protocols
|
2013-08-19 19:20:28 +02:00
|
|
|
|
|
|
|
name=libsdl2
|
2021-12-02 12:21:39 +01:00
|
|
|
version=2.0.18
|
|
|
|
release=1
|
2021-10-18 14:13:14 +02:00
|
|
|
source=(https://www.libsdl.org/release/SDL2-$version.tar.gz)
|
2013-08-19 19:20:28 +02:00
|
|
|
|
2021-10-18 14:13:14 +02:00
|
|
|
build() {
|
|
|
|
prt-get isinst alsa-lib && PKGMK_SDL2+=' -D ALSA=ON'
|
|
|
|
prt-get isinst ninja && PKGMK_SDL2+=' -G Ninja'
|
|
|
|
prt-get isinst ibus && PKGMK_SDL2+=' -D SDL_USE_IME=ON'
|
|
|
|
prt-get isinst jack && PKGMK_SDL2+=' -D JACK_SHARED=ON'
|
|
|
|
prt-get isinst pipewire && PKGMK_SDL2+=' -D PIPEWIRE=ON -D PIPEWIRE_SHARED=ON'
|
|
|
|
prt-get isinst pulseaudio && PKGMK_SDL2+=' -D PULSEAUDIO_SHARED=ON'
|
|
|
|
prt-get isinst wayland-protocols && PKGMK_SDL2+=' -D VIDEO_WAYLAND=ON'
|
|
|
|
|
|
|
|
cmake -S SDL2-$version -B build $PKGMK_SDL2 \
|
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-D CMAKE_INSTALL_LIBDIR=lib \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
|
|
-D CLOCK_GETTIME=ON \
|
|
|
|
-D RPATH=OFF \
|
|
|
|
-D SDL_DLOPEN=ON
|
|
|
|
cmake --build build -j ${JOBS:-1}
|
|
|
|
DESTDIR=$PKG cmake --install build
|
2013-08-19 19:20:28 +02:00
|
|
|
}
|