37 lines
1.3 KiB
Plaintext
37 lines
1.3 KiB
Plaintext
# Description: SDL version 2, Simple DirectMedia Layer
|
|
# URL: https://www.libsdl.org/
|
|
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
|
|
# Depends on: libsdl2 mesa-32
|
|
# Optional: alsa-lib-32 ibus-32 jack libxkbcommon-32 ninja pipewire pulseaudio wayland-protocols
|
|
|
|
name=libsdl2-32
|
|
version=2.30.11
|
|
release=1
|
|
source=(https://www.libsdl.org/release/SDL2-$version.tar.gz)
|
|
|
|
build() {
|
|
prt-get isinst alsa-lib-32 && PKGMK_SDL2+=' -D SDL_ALSA_SHARED=ON'
|
|
prt-get isinst ibus-32 && PKGMK_SDL2+=' -D SDL_USE_IME=ON'
|
|
prt-get isinst jack-32 && PKGMK_SDL2+=' -D SDL_JACK_SHARED=ON'
|
|
prt-get isinst pipewire-32 && PKGMK_SDL2+=' -D SDL_PIPEWIRE_SHARED=ON'
|
|
prt-get isinst pulseaudio-32 && PKGMK_SDL2+=' -D SDL_PULSEAUDIO_SHARED=ON'
|
|
prt-get isinst libxkbcommon-32 wayland-protocols && PKGMK_SDL2+=' -D SDL_WAYLAND_SHARED=ON'
|
|
|
|
[[ -z $CCACHE_PREFIX ]] || unset CCACHE_PREFIX
|
|
|
|
cmake -S SDL2-$version -B build -G Ninja $PKGMK_SDL2 \
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
-D CMAKE_INSTALL_LIBDIR=lib32 \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
-D SDL_CLOCK_GETTIME=ON \
|
|
-D SDL_RPATH=OFF \
|
|
-D SDL_DLOPEN=ON \
|
|
-Wno-dev
|
|
cmake --build build
|
|
DESTDIR=$PKG cmake --install build
|
|
|
|
rm -r $PKG/usr/{bin,include,share}
|
|
}
|