opt/libsdl2/Pkgfile

35 lines
1.1 KiB
Plaintext
Raw Normal View History

# Description: SDL version 2, Simple DirectMedia Layer
# URL: https://www.libsdl.org
# Maintainer: Juergen Daubert, jue at crux dot nu
2023-10-02 13:43:28 +02:00
# Depends on: mesa
2023-09-03 10:54:41 +02:00
# Optional: alsa-lib ibus jack pipewire pulseaudio wayland-protocols
2013-08-19 19:20:28 +02:00
name=libsdl2
2024-04-02 11:29:44 +02:00
version=2.30.2
2022-01-11 14:43:52 +01:00
release=1
source=(https://www.libsdl.org/release/SDL2-$version.tar.gz)
2013-08-19 19:20:28 +02:00
build() {
2021-12-12 08:51:59 +01:00
prt-get isinst alsa-lib && PKGMK_SDL2+=' -D SDL_ALSA_SHARED=ON'
prt-get isinst ibus && PKGMK_SDL2+=' -D SDL_USE_IME=ON'
2021-12-12 08:51:59 +01:00
prt-get isinst jack && PKGMK_SDL2+=' -D SDL_JACK_SHARED=ON'
prt-get isinst pipewire && PKGMK_SDL2+=' -D SDL_PIPEWIRE_SHARED=ON'
prt-get isinst pulseaudio && PKGMK_SDL2+=' -D SDL_PULSEAUDIO_SHARED=ON'
prt-get isinst wayland-protocols && PKGMK_SDL2+=' -D SDL_WAYLAND_SHARED=ON'
[[ -z $CCACHE_PREFIX ]] || unset CCACHE_PREFIX
2022-11-02 15:19:07 +01:00
cmake -S SDL2-$version -B build -G Ninja $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" \
2021-12-12 08:51:59 +01:00
-D SDL_CLOCK_GETTIME=ON \
2022-11-02 15:19:07 +01:00
-D SDL_RPATH=OFF
cmake --build build -j ${JOBS:-1}
DESTDIR=$PKG cmake --install build
2022-08-22 10:46:45 +02:00
rm -r $PKG/usr/share/licenses
2013-08-19 19:20:28 +02:00
}