systemd: bump version to 233
[buildroot-gz.git] / package / sdl2 / sdl2.mk
blob628d9060b4bce601e1439882598c409b5638f3a6
1 ################################################################################
3 # sdl2
5 ################################################################################
7 SDL2_VERSION = 2.0.5
8 SDL2_SOURCE = SDL2-$(SDL2_VERSION).tar.gz
9 SDL2_SITE = http://www.libsdl.org/release
10 SDL2_LICENSE = zlib
11 SDL2_LICENSE_FILES = COPYING.txt
12 SDL2_INSTALL_STAGING = YES
13 SDL2_CONFIG_SCRIPTS = sdl2-config
15 SDL2_CONF_OPTS += \
16 --disable-rpath \
17 --disable-arts \
18 --disable-esd \
19 --disable-dbus \
20 --disable-pulseaudio \
21 --disable-video-wayland
23 # We must enable static build to get compilation successful.
24 SDL2_CONF_OPTS += --enable-static
26 # From https://bugs.debian.org/cgi-bin/bugreport.cgi/?bug=770670
27 # "The problem lies within SDL_cpuinfo.h. It includes altivec.h, which by
28 # definition provides an unconditional vector, pixel and bool define in
29 # standard-c++ mode. In GNU-c++ mode this names are only defined
30 # context-sensitive by cpp. SDL_cpuinfo.h is included by SDL.h.
31 # Including altivec.h makes arbitrary code break."
32 ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
33 SDL2_CONF_OPTS += --disable-altivec
34 endif
36 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
37 SDL2_DEPENDENCIES += udev
38 SDL2_CONF_OPTS += --enable-libudev
39 else
40 SDL2_CONF_OPTS += --disable-libudev
41 endif
43 ifeq ($(BR2_PACKAGE_SDL2_DIRECTFB),y)
44 SDL2_DEPENDENCIES += directfb
45 SDL2_CONF_OPTS += --enable-video-directfb
46 SDL2_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config
47 else
48 SDL2_CONF_OPTS += --disable-video-directfb
49 endif
51 # x-includes and x-libraries must be set for cross-compiling
52 # By default x_includes and x_libraries contains unsafe paths.
53 # (/usr/X11R6/include and /usr/X11R6/lib)
54 ifeq ($(BR2_PACKAGE_SDL2_X11),y)
55 SDL2_DEPENDENCIES += xlib_libX11 xlib_libXext
57 # X11/extensions/shape.h is provided by libXext.
58 SDL2_CONF_OPTS += --enable-video-x11 \
59 --with-x=$(STAGING_DIR) \
60 --x-includes=$(STAGING_DIR)/usr/include \
61 --x-libraries=$(STAGING_DIR)/usr/lib \
62 --enable-video-x11-xshape
64 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
65 SDL2_DEPENDENCIES += xlib_libXcursor
66 SDL2_CONF_OPTS += --enable-video-x11-xcursor
67 else
68 SDL2_CONF_OPTS += --disable-video-x11-xcursor
69 endif
71 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
72 SDL2_DEPENDENCIES += xlib_libXinerama
73 SDL2_CONF_OPTS += --enable-video-x11-xinerama
74 else
75 SDL2_CONF_OPTS += --disable-video-x11-xinerama
76 endif
78 ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
79 SDL2_DEPENDENCIES += xlib_libXi
80 SDL2_CONF_OPTS += --enable-video-x11-xinput
81 else
82 SDL2_CONF_OPTS += --disable-video-x11-xinput
83 endif
85 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
86 SDL2_DEPENDENCIES += xlib_libXrandr
87 SDL2_CONF_OPTS += --enable-video-x11-xrandr
88 else
89 SDL2_CONF_OPTS += --disable-video-x11-xrandr
90 endif
92 ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),y)
93 SDL2_DEPENDENCIES += xlib_libXScrnSaver
94 SDL2_CONF_OPTS += --enable-video-x11-scrnsaver
95 else
96 SDL2_CONF_OPTS += --disable-video-x11-scrnsaver
97 endif
99 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
100 SDL2_DEPENDENCIES += xlib_libXxf86vm
101 SDL2_CONF_OPTS += --enable-video-x11-vm
102 else
103 SDL2_CONF_OPTS += --disable-video-x11-vm
104 endif
106 else
107 SDL2_CONF_OPTS += --disable-video-x11 --without-x
108 endif
110 ifeq ($(BR2_PACKAGE_SDL2_OPENGL),y)
111 SDL2_CONF_OPTS += --enable-video-opengl
112 SDL2_DEPENDENCIES += libgl
113 else
114 SDL2_CONF_OPTS += --disable-video-opengl
115 endif
117 ifeq ($(BR2_PACKAGE_SDL2_OPENGLES),y)
118 SDL2_CONF_OPTS += --enable-video-opengles
119 SDL2_DEPENDENCIES += libgles
120 else
121 SDL2_CONF_OPTS += --disable-video-opengles
122 endif
124 ifeq ($(BR2_PACKAGE_TSLIB),y)
125 SDL2_DEPENDENCIES += tslib
126 SDL2_CONF_OPTS += --enable-input-tslib
127 else
128 SDL2_CONF_OPTS += --disable-input-tslib
129 endif
131 ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
132 SDL2_DEPENDENCIES += alsa-lib
133 SDL2_CONF_OPTS += --enable-alsa
134 else
135 SDL2_CONF_OPTS += --disable-alsa
136 endif
138 $(eval $(autotools-package))