xref: /OK3568_Linux_fs/buildroot/package/sdl/sdl.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# sdl
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunSDL_VERSION = 1.2.15
8*4882a593SmuzhiyunSDL_SOURCE = SDL-$(SDL_VERSION).tar.gz
9*4882a593SmuzhiyunSDL_SITE = http://www.libsdl.org/release
10*4882a593SmuzhiyunSDL_LICENSE = LGPL-2.1+
11*4882a593SmuzhiyunSDL_LICENSE_FILES = COPYING
12*4882a593SmuzhiyunSDL_CPE_ID_VENDOR = libsdl
13*4882a593SmuzhiyunSDL_CPE_ID_PRODUCT = simple_directmedia_layer
14*4882a593SmuzhiyunSDL_INSTALL_STAGING = YES
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun# we're patching configure.in, but package cannot autoreconf with our version of
17*4882a593Smuzhiyun# autotools, so we have to do it manually instead of setting SDL_AUTORECONF = YES
18*4882a593Smuzhiyundefine SDL_RUN_AUTOGEN
19*4882a593Smuzhiyun	cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
20*4882a593Smuzhiyunendef
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunSDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN
23*4882a593SmuzhiyunHOST_SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunSDL_DEPENDENCIES += host-automake host-autoconf host-libtool
26*4882a593SmuzhiyunHOST_SDL_DEPENDENCIES += host-automake host-autoconf host-libtool
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunSDL_CONF_OPTS += --enable-video-qtopia=no
29*4882a593Smuzhiyun
30*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_SDL_FBCON),y)
31*4882a593SmuzhiyunSDL_CONF_OPTS += --enable-video-fbcon=yes
32*4882a593Smuzhiyunelse
33*4882a593SmuzhiyunSDL_CONF_OPTS += --enable-video-fbcon=no
34*4882a593Smuzhiyunendif
35*4882a593Smuzhiyun
36*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_SDL_DIRECTFB),y)
37*4882a593SmuzhiyunSDL_DEPENDENCIES += directfb
38*4882a593SmuzhiyunSDL_CONF_OPTS += --enable-video-directfb=yes
39*4882a593SmuzhiyunSDL_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config
40*4882a593Smuzhiyunelse
41*4882a593SmuzhiyunSDL_CONF_OPTS += --enable-video-directfb=no
42*4882a593Smuzhiyunendif
43*4882a593Smuzhiyun
44*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_SDL_X11),y)
45*4882a593SmuzhiyunSDL_CONF_OPTS += --enable-video-x11=yes
46*4882a593SmuzhiyunSDL_DEPENDENCIES += \
47*4882a593Smuzhiyun	xlib_libX11 xlib_libXext \
48*4882a593Smuzhiyun	$(if $(BR2_PACKAGE_XLIB_LIBXRENDER), xlib_libXrender) \
49*4882a593Smuzhiyun	$(if $(BR2_PACKAGE_XLIB_LIBXRANDR), xlib_libXrandr)
50*4882a593Smuzhiyunelse
51*4882a593SmuzhiyunSDL_CONF_OPTS += --enable-video-x11=no
52*4882a593Smuzhiyunendif
53*4882a593Smuzhiyun
54*4882a593Smuzhiyunifneq ($(BR2_USE_MMU),y)
55*4882a593SmuzhiyunSDL_CONF_OPTS += --enable-dga=no
56*4882a593Smuzhiyunendif
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun# overwrite autodection (prevents confusion with host libpth version)
59*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBPTHSEM_COMPAT),y)
60*4882a593SmuzhiyunSDL_CONF_OPTS += --enable-pth
61*4882a593SmuzhiyunSDL_CONF_ENV += ac_cv_path_PTH_CONFIG=$(STAGING_DIR)/usr/bin/pth-config
62*4882a593SmuzhiyunSDL_DEPENDENCIES += libpthsem
63*4882a593Smuzhiyunelse
64*4882a593SmuzhiyunSDL_CONF_OPTS += --disable-pth
65*4882a593Smuzhiyunendif
66*4882a593Smuzhiyun
67*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_TSLIB),y)
68*4882a593SmuzhiyunSDL_DEPENDENCIES += tslib
69*4882a593Smuzhiyunendif
70*4882a593Smuzhiyun
71*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ALSA_LIB),y)
72*4882a593SmuzhiyunSDL_DEPENDENCIES += alsa-lib
73*4882a593Smuzhiyunendif
74*4882a593Smuzhiyun
75*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_MESA3D),y)
76*4882a593SmuzhiyunSDL_DEPENDENCIES += mesa3d
77*4882a593Smuzhiyunendif
78*4882a593Smuzhiyun
79*4882a593SmuzhiyunSDL_CONF_OPTS += \
80*4882a593Smuzhiyun	--disable-rpath \
81*4882a593Smuzhiyun	--enable-pulseaudio=no \
82*4882a593Smuzhiyun	--disable-arts \
83*4882a593Smuzhiyun	--disable-esd \
84*4882a593Smuzhiyun	--disable-nasm \
85*4882a593Smuzhiyun	--disable-video-ps3
86*4882a593Smuzhiyun
87*4882a593SmuzhiyunHOST_SDL_CONF_OPTS += \
88*4882a593Smuzhiyun	--enable-pulseaudio=no \
89*4882a593Smuzhiyun	--enable-video-x11=no \
90*4882a593Smuzhiyun	--disable-arts \
91*4882a593Smuzhiyun	--disable-esd \
92*4882a593Smuzhiyun	--disable-nasm \
93*4882a593Smuzhiyun	--disable-video-ps3
94*4882a593Smuzhiyun
95*4882a593SmuzhiyunSDL_CONFIG_SCRIPTS = sdl-config
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun$(eval $(autotools-package))
98*4882a593Smuzhiyun$(eval $(host-autotools-package))
99