blob: 9c2ea94d92c9c539be333c80e6bb15b9720009b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
# Maintainer: Vincent Grande <shoober420@gmail.com>
# Contributor: Christer Solskogen <christer.solskogen@gmail.com>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Jameson Pugh <imntreal@gmail.com>
# Contributor: J0k3r <moebius282@gmail.com>
pkgname=lib32-sdl2-minimal-x11-git
pkgver=2.0.9.r13.45038f8422c9+
pkgrel=1
pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2. 32 -bit)"
arch=('x86_64')
url="https://www.libsdl.org"
license=('MIT')
depends=('lib32-glibc' 'lib32-libxext' 'lib32-libxrender' 'lib32-libx11' 'lib32-libgl'
'lib32-libxcursor' 'sdl2' 'lib32-libxxf86vm')
makedepends=('lib32-alsa-lib' 'lib32-libxrandr'
'lib32-libxinerama' 'lib32-libxkbcommon' 'lib32-libxxf86vm'
'cmake' 'git')
optdepends=('lib32-alsa-lib: ALSA audio driver'
'lib32-libpulse: PulseAudio audio driver'
'lib32-jack: JACK audio driver'
'jack: JACK audio support'
'lib32-tslib: Touchscreen support'
'lib32-wayland: wayland support'
'wayland-protocols: wayland support'
'lib32-mesa: open source graphics support'
'lib32-libxss: screensaver support')
provides=(lib32-sdl2)
conflicts=(lib32-sdl2 lib32-sdl2-hg)
source=("git+https://github.com/libsdl-org/SDL")
sha512sums=('SKIP')
pkgver() {
cd SDL
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
#fix libdir
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
rm -rf build
mkdir build
}
build() {
export CC='gcc -m32'
export CXX='g++ -m32'
export PKG_CONFIG_PATH=/usr/lib32/pkgconfig
cmake -S SDL -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX=32 \
-DSDL_STATIC=OFF \
-DSDL_DLOPEN=ON \
-DARTS=OFF \
-DARTS_SHARED=OFF \
-DESD=OFF \
-DESD_SHARED=OFF \
-DNAS=OFF \
-DNAS_SHARED=OFF \
-DALSA=ON \
-DOSS=OFF \
-DHIDAPI=OFF \
-DHIDAPI_LIBUSB=OFF \
-DJOYSTICK=OFF \
-DJOYSTICK_VIRTUAL=OFF \
-DJOYSTICK_MFI=OFF \
-DHAPTIC=OFF \
-DSENSOR=OFF \
-DSNDIO=OFF \
-DSNDIO_SHARED=OFF \
-DPULSEAUDIO=OFF \
-DPULSEAUDIO_SHARED=OFF \
-DVIDEO_WAYLAND=OFF \
-DVIDEO_WAYLAND_QT_TOUCH=OFF \
-DVIDEO_X11_XSCRNSAVER=OFF \
-DRPATH=OFF \
-DCLOCK_GETTIME=ON \
-DVIDEO_RPI=OFF \
-DIBUS=OFF \
-DFCITX=OFF \
-DSSE=ON \
-DSSE2=ON \
-DSSE3=ON \
-DSSEMATH=ON \
-DVIDEO_X11_XSHAPE=OFF \
-DJACK=OFF \
-DJACK_SHARED=OFF \
-DFUSIONSOUND=OFF \
-DFUSIONSOUND_SHARED=OFF \
-DVIDEO_COCOA=OFF \
-DDIRECTX=OFF \
-DXINPUT=OFF \
-DRENDER_D3D=OFF \
-DRENDER_METAL=OFF \
-DVIDEO_VIVANTE=OFF \
-DVIDEO_KMSDRM=OFF \
-DKMSDRM_SHARED=OFF \
-DVIDEO_OFFSCREEN=OFF \
-DVIDEO_METAL=OFF \
-DWAYLAND_SHARED=OFF \
-DVIDEO_X11_XVM=OFF
make -C build
}
package() {
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
ln -s /usr/lib32/libSDL2-2.0.so ${pkgdir}/usr/lib32/libSDL2-2.0.so.0
}
# vim: ts=2 sw=2 et:
|