spice.mk 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ################################################################################
  2. #
  3. # spice
  4. #
  5. ################################################################################
  6. SPICE_VERSION = 0.12.4
  7. SPICE_SOURCE = spice-$(SPICE_VERSION).tar.bz2
  8. SPICE_SITE = http://www.spice-space.org/download/releases
  9. SPICE_LICENSE = LGPLv2.1+
  10. SPICE_LICENSE_FILES = COPYING
  11. SPICE_INSTALL_STAGING = YES
  12. SPICE_DEPENDENCIES = \
  13. alsa-lib \
  14. celt051 \
  15. jpeg \
  16. libglib2 \
  17. openssl \
  18. pixman \
  19. python-pyparsing \
  20. spice-protocol \
  21. # We disable everything for now, because the dependency tree can become
  22. # quite deep if we try to enable some features, and I have not tested that.
  23. SPICE_CONF_OPTS = \
  24. --disable-opengl \
  25. --disable-smartcard \
  26. --disable-automated-tests \
  27. --without-sasl \
  28. SPICE_DEPENDENCIES += host-pkgconf
  29. ifeq ($(BR2_PACKAGE_SPICE_CLIENT),y)
  30. SPICE_CONF_OPTS += --enable-client
  31. SPICE_DEPENDENCIES += xlib_libXfixes xlib_libXrandr
  32. else
  33. SPICE_CONF_OPTS += --disable-client
  34. endif
  35. ifeq ($(BR2_PACKAGE_SPICE_GUI),y)
  36. SPICE_CONF_OPTS += --enable-gui
  37. SPICE_DEPENDENCIES += cegui06
  38. else
  39. SPICE_CONF_OPTS += --disable-gui
  40. endif
  41. ifeq ($(BR2_PACKAGE_SPICE_TUNNEL),y)
  42. SPICE_CONF_OPTS += --enable-tunnel
  43. SPICE_DEPENDENCIES += slirp
  44. else
  45. SPICE_CONF_OPTS += --disable-tunnel
  46. endif
  47. SPICE_CONF_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
  48. SPICE_MAKE_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
  49. # We need to tweak spice.pc because it /forgets/ (for static linking) that
  50. # it should link against libz and libjpeg. libz is pkg-config-aware, while
  51. # libjpeg isn't, hence the two-line tweak
  52. define SPICE_POST_INSTALL_STAGING_FIX_PC
  53. $(SED) 's/^\(Requires.private:.*\)$$/\1 zlib/; s/^\(Libs.private:.*\)$$/\1 -ljpeg/;' \
  54. "$(STAGING_DIR)/usr/lib/pkgconfig/spice-server.pc"
  55. endef
  56. SPICE_POST_INSTALL_STAGING_HOOKS += SPICE_POST_INSTALL_STAGING_FIX_PC
  57. # It is currently not possible to detect if stack-protection is available
  58. # or not, because it requires support from both the compiler *and* the
  59. # C library, but the C library (eg. uClibc) can be compiled without that
  60. # support, even if gcc accepts the -fstack-protector-all option.
  61. # spice's ./configure only checks for gcc's -fstack-protector-all option,
  62. # so it misses the case where the C library doe not provide the requires
  63. # support.
  64. # A correct fix would be to fix spice's ./configure to also check the C
  65. # library, but it might be much more involved.
  66. # So, we simply disable it for now. After all, as uClibc's help puts it:
  67. # Note that NOEXECSTACK on a kernel with address space randomization
  68. # is generally sufficient to prevent most buffer overflow exploits
  69. # without increasing code size.
  70. SPICE_CONF_OPTS += gl_cv_warn__fstack_protector_all=no
  71. $(eval $(autotools-package))