--- A/PKGBUILD 2021-08-23 02:58:14.000000000 -0500 +++ B/PKGBUILD 2021-12-17 13:38:27.669581693 -0600 @@ -1,9 +1,10 @@ # Maintainer: Maxime Gauduin # Contributor: Jameson Pugh # Contributor: J0k3r +# Contributor: HurricanePootis pkgname=lib32-sdl2 -pkgver=2.0.16 +pkgver=2.0.18 pkgrel=1 pkgdesc='A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard' arch=(x86_64) @@ -36,10 +37,14 @@ 'lib32-alsa-lib: ALSA audio driver' 'lib32-libpulse: PulseAudio audio driver' 'lib32-jack: JACK audio driver' + 'lib32-pipewire: PipeWire audio driver' ) -_tag=25f9ed87ff6947d9576fc9d79dee0784e638ac58 -source=(git+https://github.com/libsdl-org/SDL.git#tag=${_tag}) -sha512sums=(SKIP) +_tag=release-$pkgver +source=(git+https://github.com/libsdl-org/SDL.git#tag=${_tag} + sdl2-wayland1.20.patch::https://github.com/libsdl-org/SDL/pull/5092.patch) +sha512sums=('SKIP' + 'efa2d01a5861f99597eac0cff7e67efc03bd3877d8ad53d711b1ab54a59f93ef5bc6ffe776b9ac7e3103688a56f79e7d0e4155852dedd0d1982a1e334a2f8d37') + pkgver() { cd SDL @@ -52,6 +57,9 @@ sed -i 's|lib/cmake|lib32/cmake|' SDL/CMakeLists.txt # Don't try to link against ibus sed -i '/pkg_search_module.*ibus-1.0/d' SDL/CMakeLists.txt + cd "$srcdir"/SDL + pwd + patch -Np1 -i "$srcdir"/sdl2-wayland1.20.patch } build() { @@ -61,18 +69,11 @@ cmake -S SDL -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_SUFFIX=32 \ -DSDL_STATIC=OFF \ -DSDL_DLOPEN=ON \ - -DARTS=OFF \ - -DESD=OFF \ - -DNAS=OFF \ - -DALSA=ON \ - -DPULSEAUDIO_SHARED=ON \ - -DVIDEO_WAYLAND=ON \ - -DRPATH=OFF \ - -DCLOCK_GETTIME=ON \ - -DJACK_SHARED=ON + -DSDL_RPATH=OFF \ + -DCMAKE_INSTALL_LIBDIR=lib32 + make -C build } @@ -80,8 +81,6 @@ make DESTDIR="${pkgdir}" -C build install rm -rf "${pkgdir}"/usr/{bin,include,share} - sed -i "s/libSDL2\.a/libSDL2main.a/g" "$pkgdir"/usr/lib32/cmake/SDL2/SDL2Targets-noconfig.cmake - install -dm 755 "${pkgdir}"/usr/share/licenses ln -s sdl2 "${pkgdir}"/usr/share/licenses/lib32-sdl2 }