openocd: avoid documentation rebuild to fix build issues
[buildroot-gz.git] / package / sdl2 / sdl2.mk
blob2ec12e639e301fc880b92955ed59446bcf14bd0d
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-opengl \
22 --disable-video-opengles \
23 --disable-video-wayland
25 # We must enable static build to get compilation successful.
26 SDL2_CONF_OPTS += --enable-static
28 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
29 SDL2_DEPENDENCIES += udev
30 SDL2_CONF_OPTS += --enable-libudev
31 else
32 SDL2_CONF_OPTS += --disable-libudev
33 endif
35 ifeq ($(BR2_PACKAGE_SDL2_DIRECTFB),y)
36 SDL2_DEPENDENCIES += directfb
37 SDL2_CONF_OPTS += --enable-video-directfb
38 SDL2_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config
39 else
40 SDL2_CONF_OPTS += --disable-video-directfb
41 endif
43 # x-includes and x-libraries must be set for cross-compiling
44 # By default x_includes and x_libraries contains unsafe paths.
45 # (/usr/X11R6/include and /usr/X11R6/lib)
46 ifeq ($(BR2_PACKAGE_SDL2_X11),y)
47 SDL2_DEPENDENCIES += xlib_libX11 xlib_libXext
49 # X11/extensions/shape.h is provided by libXext.
50 SDL2_CONF_OPTS += --enable-video-x11 \
51 --with-x=$(STAGING_DIR) \
52 --x-includes=$(STAGING_DIR)/usr/include \
53 --x-libraries=$(STAGING_DIR)/usr/lib \
54 --enable-video-x11-xshape
56 ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
57 SDL2_DEPENDENCIES += xlib_libXcursor
58 SDL2_CONF_OPTS += --enable-video-x11-xcursor
59 else
60 SDL2_CONF_OPTS += --disable-video-x11-xcursor
61 endif
63 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
64 SDL2_DEPENDENCIES += xlib_libXinerama
65 SDL2_CONF_OPTS += --enable-video-x11-xinerama
66 else
67 SDL2_CONF_OPTS += --disable-video-x11-xinerama
68 endif
70 ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
71 SDL2_DEPENDENCIES += xlib_libXi
72 SDL2_CONF_OPTS += --enable-video-x11-xinput
73 else
74 SDL2_CONF_OPTS += --disable-video-x11-xinput
75 endif
77 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
78 SDL2_DEPENDENCIES += xlib_libXrandr
79 SDL2_CONF_OPTS += --enable-video-x11-xrandr
80 else
81 SDL2_CONF_OPTS += --disable-video-x11-xrandr
82 endif
84 ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),y)
85 SDL2_DEPENDENCIES += xlib_libXScrnSaver
86 SDL2_CONF_OPTS += --enable-video-x11-scrnsaver
87 else
88 SDL2_CONF_OPTS += --disable-video-x11-scrnsaver
89 endif
91 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y)
92 SDL2_DEPENDENCIES += xlib_libXxf86vm
93 SDL2_CONF_OPTS += --enable-video-x11-vm
94 else
95 SDL2_CONF_OPTS += --disable-video-x11-vm
96 endif
98 else
99 SDL2_CONF_OPTS += --disable-video-x11 --without-x
100 endif
102 ifeq ($(BR2_PACKAGE_TSLIB),y)
103 SDL2_DEPENDENCIES += tslib
104 SDL2_CONF_OPTS += --enable-input-tslib
105 else
106 SDL2_CONF_OPTS += --disable-input-tslib
107 endif
109 ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
110 SDL2_DEPENDENCIES += alsa-lib
111 SDL2_CONF_OPTS += --enable-alsa
112 else
113 SDL2_CONF_OPTS += --disable-alsa
114 endif
116 $(eval $(autotools-package))