summaryrefslogtreecommitdiff
path: root/libsdl2-32/Pkgfile
blob: 5e877d6f59670143ee8b50732dca50186cf2943b (plain)
    1 # Description: SDL version 2, Simple DirectMedia Layer
    2 # URL: https://www.libsdl.org/
    3 # Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
    4 # Depends on: alsa-lib-32 libsdl2 mesa-32
    5 # Optional: alsa-lib ibus-32 jack ninja pipewire pulseaudio wayland-protocols
    6 
    7 name=libsdl2-32
    8 version=2.26.1
    9 release=1
   10 source=(https://www.libsdl.org/release/SDL2-$version.tar.gz)
   11 
   12 build() {
   13 	prt-get isinst ninja && PKGMK_SDL2+=' -G Ninja'
   14 	prt-get isinst alsa-lib-32 && PKGMK_SDL2+=' -D SDL_ALSA_SHARED=ON'
   15 	prt-get isinst ibus-32 && PKGMK_SDL2+=' -D SDL_USE_IME=ON'
   16 	prt-get isinst jack-32 && PKGMK_SDL2+=' -D SDL_JACK_SHARED=ON'
   17 	prt-get isinst pipewire-32 && PKGMK_SDL2+=' -D SDL_PIPEWIRE_SHARED=ON'
   18 	prt-get isinst pulseaudio-32 && PKGMK_SDL2+=' -D SDL_PULSEAUDIO_SHARED=ON'
   19 	prt-get isinst wayland-protocols-32 && PKGMK_SDL2+=' -D SDL_WAYLAND_SHARED=ON'
   20 
   21 	[ -e '/usr/bin/ccache' ] && PATH="$(echo ${PATH} | awk -v RS=: -v ORS=: '/ccache/ {next} {print}' | sed 's/:*$//')"
   22 
   23 	cmake -S SDL2-$version -B build $PKGMK_SDL2 \
   24 		-D CMAKE_INSTALL_PREFIX=/usr \
   25 		-D CMAKE_INSTALL_LIBDIR=lib32 \
   26 		-D CMAKE_BUILD_TYPE=Release \
   27 		-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
   28 		-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
   29 		-D SDL_CLOCK_GETTIME=ON \
   30 		-D SDL_RPATH=OFF \
   31 		-D SDL_DLOPEN=ON \
   32 		-Wno-dev
   33 	cmake --build build
   34 	DESTDIR=$PKG cmake --install build
   35 
   36 	rm -r $PKG/usr/{bin,include,share}
   37 }

Generated by cgit