sdl.mk 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. ################################################################################
  2. #
  3. # sdl
  4. #
  5. ################################################################################
  6. SDL_VERSION = 1.2.15
  7. SDL_SOURCE = SDL-$(SDL_VERSION).tar.gz
  8. SDL_SITE = http://www.libsdl.org/release
  9. SDL_LICENSE = LGPL-2.1+
  10. SDL_LICENSE_FILES = COPYING
  11. SDL_CPE_ID_VENDOR = libsdl
  12. SDL_CPE_ID_PRODUCT = simple_directmedia_layer
  13. SDL_INSTALL_STAGING = YES
  14. # 0003-SDL_x11yuv.c-fix-possible-use-after-free.patch
  15. SDL_IGNORE_CVES += CVE-2022-34568
  16. # we're patching configure.in, but package cannot autoreconf with our version of
  17. # autotools, so we have to do it manually instead of setting SDL_AUTORECONF = YES
  18. define SDL_RUN_AUTOGEN
  19. cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
  20. endef
  21. SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN
  22. HOST_SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN
  23. SDL_DEPENDENCIES += host-automake host-autoconf host-libtool
  24. HOST_SDL_DEPENDENCIES += host-automake host-autoconf host-libtool
  25. SDL_CONF_OPTS += --enable-video-qtopia=no
  26. ifeq ($(BR2_PACKAGE_SDL_FBCON),y)
  27. SDL_CONF_OPTS += --enable-video-fbcon=yes
  28. else
  29. SDL_CONF_OPTS += --enable-video-fbcon=no
  30. endif
  31. ifeq ($(BR2_PACKAGE_SDL_DIRECTFB),y)
  32. SDL_DEPENDENCIES += directfb
  33. SDL_CONF_OPTS += --enable-video-directfb=yes
  34. SDL_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config
  35. else
  36. SDL_CONF_OPTS += --enable-video-directfb=no
  37. endif
  38. ifeq ($(BR2_PACKAGE_SDL_X11),y)
  39. SDL_CONF_OPTS += --enable-video-x11=yes
  40. SDL_DEPENDENCIES += \
  41. xlib_libX11 xlib_libXext \
  42. $(if $(BR2_PACKAGE_XLIB_LIBXRENDER), xlib_libXrender) \
  43. $(if $(BR2_PACKAGE_XLIB_LIBXRANDR), xlib_libXrandr)
  44. else
  45. SDL_CONF_OPTS += --enable-video-x11=no
  46. endif
  47. ifneq ($(BR2_USE_MMU),y)
  48. SDL_CONF_OPTS += --enable-dga=no
  49. endif
  50. # overwrite autodection (prevents confusion with host libpth version)
  51. ifeq ($(BR2_PACKAGE_LIBPTHSEM_COMPAT),y)
  52. SDL_CONF_OPTS += --enable-pth
  53. SDL_CONF_ENV += ac_cv_path_PTH_CONFIG=$(STAGING_DIR)/usr/bin/pth-config
  54. SDL_DEPENDENCIES += libpthsem
  55. else
  56. SDL_CONF_OPTS += --disable-pth
  57. endif
  58. ifeq ($(BR2_PACKAGE_TSLIB),y)
  59. SDL_DEPENDENCIES += tslib
  60. endif
  61. ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
  62. SDL_DEPENDENCIES += alsa-lib
  63. endif
  64. ifeq ($(BR2_PACKAGE_MESA3D),y)
  65. SDL_DEPENDENCIES += mesa3d
  66. endif
  67. SDL_CONF_OPTS += \
  68. --disable-rpath \
  69. --enable-pulseaudio=no \
  70. --disable-arts \
  71. --disable-esd \
  72. --disable-nasm \
  73. --disable-video-ps3
  74. HOST_SDL_CONF_OPTS += \
  75. --enable-pulseaudio=no \
  76. --enable-video-x11=no \
  77. --disable-arts \
  78. --disable-esd \
  79. --disable-nasm \
  80. --disable-video-ps3
  81. SDL_CONFIG_SCRIPTS = sdl-config
  82. $(eval $(autotools-package))
  83. $(eval $(host-autotools-package))