-
Notifications
You must be signed in to change notification settings - Fork 0
/
SDL2
70 lines (58 loc) · 1.17 KB
/
SDL2
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
# Depends:
# pkg-config
# Optional depends:
# jack, pulseaudio, libsamplerate, libudev, pthreads, alsa, esd, fusionsound, rpi directfb, libdrm, libusb, IBUS, FCITX
depends=(pkg-config)
if ${os_win}; then
depends+=(winpthreads)
fi
ver="2.0.10"
dname="${name}-${ver}"
fname="${dname}.tar.gz"
src="https://libsdl.org/release/${fname}"
#cmd_config=(cmake)
use_cmake=false
if test "${cmd_config[0]}" == "cmake"; then
use_cmake=true
fi
# TODO: disable everything not used by MyABCs
# FIXME: can't disable video, joystick, haptic, sensor, power, nor threads
gnu_opts=(
--disable-atomic
--disable-events
--disable-file
--disable-filesystem
--disable-timers
)
cmake_opts=(
-DSDL_ATOMIC=OFF
-DSDL_EVENTS=OFF
-DSDL_FILE=OFF
-DSDL_FILESYSTEM=OFF
-DSDL_TIMERS=OFF
)
if ! ${use_cmake}; then
# using GNU autotools
config_opts=(${gnu_opts[@]})
if ${os_win}; then
libtype_opts=(
--disable-static
--enable-shared
)
fi
else
# using CMake
config_opts=(${cmake_opts[@]})
if ${os_win} || ! ${static}; then
libtype_opts=(
-DSDL_STATIC=OFF
-DSDL_SHARED=ON
)
else
libtype_opts=(
-DSDL_STATIC=ON
-DSDL_SHARED=OFF
)
fi
fi
unset use_cmake gnu_opts cmake_opts