1*4882a593Smuzhiyun################################################################################ 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# spice 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun################################################################################ 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunSPICE_VERSION = 0.15.0 8*4882a593SmuzhiyunSPICE_SOURCE = spice-$(SPICE_VERSION).tar.bz2 9*4882a593SmuzhiyunSPICE_SITE = http://www.spice-space.org/download/releases/spice-server 10*4882a593SmuzhiyunSPICE_LICENSE = LGPL-2.1+ 11*4882a593SmuzhiyunSPICE_LICENSE_FILES = COPYING 12*4882a593SmuzhiyunSPICE_CPE_ID_VENDOR = spice_project 13*4882a593SmuzhiyunSPICE_INSTALL_STAGING = YES 14*4882a593SmuzhiyunSPICE_DEPENDENCIES = \ 15*4882a593Smuzhiyun host-pkgconf \ 16*4882a593Smuzhiyun jpeg \ 17*4882a593Smuzhiyun libglib2 \ 18*4882a593Smuzhiyun openssl \ 19*4882a593Smuzhiyun pixman \ 20*4882a593Smuzhiyun spice-protocol 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun# We disable everything for now, because the dependency tree can become 23*4882a593Smuzhiyun# quite deep if we try to enable some features, and I have not tested that. 24*4882a593SmuzhiyunSPICE_CONF_OPTS = \ 25*4882a593Smuzhiyun --disable-gstreamer \ 26*4882a593Smuzhiyun --disable-opengl \ 27*4882a593Smuzhiyun --disable-smartcard \ 28*4882a593Smuzhiyun --without-sasl \ 29*4882a593Smuzhiyun --disable-manual \ 30*4882a593Smuzhiyun --disable-tests 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunSPICE_DEPENDENCIES += host-pkgconf 33*4882a593Smuzhiyun 34*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LZ4),y) 35*4882a593SmuzhiyunSPICE_CONF_OPTS += --enable-lz4 36*4882a593SmuzhiyunSPICE_DEPENDENCIES += lz4 37*4882a593Smuzhiyunelse 38*4882a593SmuzhiyunSPICE_CONF_OPTS += --disable-lz4 39*4882a593Smuzhiyunendif 40*4882a593Smuzhiyun 41*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_OPUS),y) 42*4882a593SmuzhiyunSPICE_CONF_OPTS += --enable-opus 43*4882a593SmuzhiyunSPICE_DEPENDENCIES += opus 44*4882a593Smuzhiyunelse 45*4882a593SmuzhiyunSPICE_CONF_OPTS += --disable-opus 46*4882a593Smuzhiyunendif 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun# We need to tweak spice.pc because it /forgets/ (for static linking) that 49*4882a593Smuzhiyun# it should link against libz and libjpeg. libz is pkg-config-aware, while 50*4882a593Smuzhiyun# libjpeg isn't, hence the two-line tweak 51*4882a593Smuzhiyundefine SPICE_POST_INSTALL_STAGING_FIX_PC 52*4882a593Smuzhiyun $(SED) 's/^\(Requires.private:.*\)$$/\1 zlib/; s/^\(Libs.private:.*\)$$/\1 -ljpeg/;' \ 53*4882a593Smuzhiyun "$(STAGING_DIR)/usr/lib/pkgconfig/spice-server.pc" 54*4882a593Smuzhiyunendef 55*4882a593SmuzhiyunSPICE_POST_INSTALL_STAGING_HOOKS += SPICE_POST_INSTALL_STAGING_FIX_PC 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun# It is currently not possible to detect if stack-protection is available 58*4882a593Smuzhiyun# or not, because it requires support from both the compiler *and* the 59*4882a593Smuzhiyun# C library, but the C library (eg. uClibc) can be compiled without that 60*4882a593Smuzhiyun# support, even if gcc accepts the -fstack-protector-all option. 61*4882a593Smuzhiyun# spice's ./configure only checks for gcc's -fstack-protector-all option, 62*4882a593Smuzhiyun# so it misses the case where the C library doe not provide the requires 63*4882a593Smuzhiyun# support. 64*4882a593Smuzhiyun# A correct fix would be to fix spice's ./configure to also check the C 65*4882a593Smuzhiyun# library, but it might be much more involved. 66*4882a593Smuzhiyun# So, we simply disable it for now. After all, as uClibc's help puts it: 67*4882a593Smuzhiyun# Note that NOEXECSTACK on a kernel with address space randomization 68*4882a593Smuzhiyun# is generally sufficient to prevent most buffer overflow exploits 69*4882a593Smuzhiyun# without increasing code size. 70*4882a593SmuzhiyunSPICE_CONF_OPTS += gl_cv_warn__fstack_protector_all=no 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun$(eval $(autotools-package)) 73