1 ################################################################################
5 ################################################################################
8 SDL2_SOURCE
= SDL2-
$(SDL2_VERSION
).
tar.gz
9 SDL2_SITE
= http
://www.libsdl.org
/release
11 SDL2_LICENSE_FILES
= COPYING.txt
12 SDL2_INSTALL_STAGING
= YES
13 SDL2_CONFIG_SCRIPTS
= sdl2-config
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
36 ifeq ($(BR2_PACKAGE_HAS_UDEV
),y
)
37 SDL2_DEPENDENCIES
+= udev
38 SDL2_CONF_OPTS
+= --enable-libudev
40 SDL2_CONF_OPTS
+= --disable-libudev
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
48 SDL2_CONF_OPTS
+= --disable-video-directfb
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
68 SDL2_CONF_OPTS
+= --disable-video-x11-xcursor
71 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA
),y
)
72 SDL2_DEPENDENCIES
+= xlib_libXinerama
73 SDL2_CONF_OPTS
+= --enable-video-x11-xinerama
75 SDL2_CONF_OPTS
+= --disable-video-x11-xinerama
78 ifeq ($(BR2_PACKAGE_XLIB_LIBXI
),y
)
79 SDL2_DEPENDENCIES
+= xlib_libXi
80 SDL2_CONF_OPTS
+= --enable-video-x11-xinput
82 SDL2_CONF_OPTS
+= --disable-video-x11-xinput
85 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR
),y
)
86 SDL2_DEPENDENCIES
+= xlib_libXrandr
87 SDL2_CONF_OPTS
+= --enable-video-x11-xrandr
89 SDL2_CONF_OPTS
+= --disable-video-x11-xrandr
92 ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER
),y
)
93 SDL2_DEPENDENCIES
+= xlib_libXScrnSaver
94 SDL2_CONF_OPTS
+= --enable-video-x11-scrnsaver
96 SDL2_CONF_OPTS
+= --disable-video-x11-scrnsaver
99 ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM
),y
)
100 SDL2_DEPENDENCIES
+= xlib_libXxf86vm
101 SDL2_CONF_OPTS
+= --enable-video-x11-vm
103 SDL2_CONF_OPTS
+= --disable-video-x11-vm
107 SDL2_CONF_OPTS
+= --disable-video-x11
--without-x
110 ifeq ($(BR2_PACKAGE_SDL2_OPENGL
),y
)
111 SDL2_CONF_OPTS
+= --enable-video-opengl
112 SDL2_DEPENDENCIES
+= libgl
114 SDL2_CONF_OPTS
+= --disable-video-opengl
117 ifeq ($(BR2_PACKAGE_SDL2_OPENGLES
),y
)
118 SDL2_CONF_OPTS
+= --enable-video-opengles
119 SDL2_DEPENDENCIES
+= libgles
121 SDL2_CONF_OPTS
+= --disable-video-opengles
124 ifeq ($(BR2_PACKAGE_TSLIB
),y
)
125 SDL2_DEPENDENCIES
+= tslib
126 SDL2_CONF_OPTS
+= --enable-input-tslib
128 SDL2_CONF_OPTS
+= --disable-input-tslib
131 ifeq ($(BR2_PACKAGE_ALSA_LIB
),y
)
132 SDL2_DEPENDENCIES
+= alsa-lib
133 SDL2_CONF_OPTS
+= --enable-alsa
135 SDL2_CONF_OPTS
+= --disable-alsa
138 $(eval
$(autotools-package
))