upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / lib32-sdl2 / trunk / PKGBUILD
blobfdf13fa7196c54de867484964969a46e40ef684c
1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Jameson Pugh <imntreal@gmail.com>
3 # Contributor: J0k3r <moebius282@gmail.com>
5 pkgname=lib32-sdl2
6 pkgver=2.26.5
7 pkgrel=1
8 pkgdesc='A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard'
9 arch=(x86_64)
10 url=https://www.libsdl.org
11 license=(MIT)
12 depends=(
13   lib32-glibc
14   lib32-libxext
15   lib32-libxrender
16   lib32-libx11
17   lib32-libgl
18   lib32-libxcursor
19   sdl2
21 makedepends=(
22   cmake
23   git
24   jack
25   lib32-alsa-lib
26   lib32-libpulse
27   lib32-libxinerama
28   lib32-libxkbcommon
29   lib32-libxrandr
30   lib32-libxss
31   lib32-mesa
32   lib32-pipewire
33   lib32-wayland
34   ninja
35   wayland-protocols
37 optdepends=(
38   'lib32-alsa-lib: ALSA audio driver'
39   'lib32-jack: JACK audio driver'
40   'lib32-libpulse: PulseAudio audio driver'
41   'lib32-pipewire: PipeWire audio driver'
43 _tag=ac13ca9ab691e13e8eebe9684740ddcb0d716203
44 source=(git+https://github.com/libsdl-org/SDL.git#tag=${_tag})
45 b2sums=(SKIP)
47 pkgver() {
48   cd SDL
49   git describe --tags | sed 's/^release-//'
52 build() {
53   export CC='gcc -m32'
54   export CXX='g++ -m32'
55   export CFLAGS+=" -ffat-lto-objects"
56   export PKG_CONFIG=i686-pc-linux-gnu-pkg-config
57   cmake -S SDL -B build -G Ninja \
58     -DCMAKE_INSTALL_PREFIX=/usr \
59     -DCMAKE_INSTALL_LIBDIR=lib32 \
60     -DSDL_DLOPEN=ON \
61     -DSDL_RPATH=OFF \
62     -DSDL_STATIC=OFF
63   cmake --build build
66 package() {
67   DESTDIR="${pkgdir}" cmake --install build
68   rm -rf "${pkgdir}"/usr/{bin,include,share}
69   sed -i "s/libSDL2\.a/libSDL2main.a/g" "$pkgdir"/usr/lib32/cmake/SDL2/SDL2Targets-noconfig.cmake
70   install -dm 755 "${pkgdir}"/usr/share/licenses
71   ln -s sdl2 "${pkgdir}"/usr/share/licenses/lib32-sdl2
74 # vim: ts=2 sw=2 et: