xref: /OK3568_Linux_fs/buildroot/package/spice/spice.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# spice
4#
5################################################################################
6
7SPICE_VERSION = 0.15.0
8SPICE_SOURCE = spice-$(SPICE_VERSION).tar.bz2
9SPICE_SITE = http://www.spice-space.org/download/releases/spice-server
10SPICE_LICENSE = LGPL-2.1+
11SPICE_LICENSE_FILES = COPYING
12SPICE_CPE_ID_VENDOR = spice_project
13SPICE_INSTALL_STAGING = YES
14SPICE_DEPENDENCIES = \
15	host-pkgconf \
16	jpeg \
17	libglib2 \
18	openssl \
19	pixman \
20	spice-protocol
21
22# We disable everything for now, because the dependency tree can become
23# quite deep if we try to enable some features, and I have not tested that.
24SPICE_CONF_OPTS = \
25	--disable-gstreamer \
26	--disable-opengl \
27	--disable-smartcard \
28	--without-sasl \
29	--disable-manual \
30	--disable-tests
31
32SPICE_DEPENDENCIES += host-pkgconf
33
34ifeq ($(BR2_PACKAGE_LZ4),y)
35SPICE_CONF_OPTS += --enable-lz4
36SPICE_DEPENDENCIES += lz4
37else
38SPICE_CONF_OPTS += --disable-lz4
39endif
40
41ifeq ($(BR2_PACKAGE_OPUS),y)
42SPICE_CONF_OPTS += --enable-opus
43SPICE_DEPENDENCIES += opus
44else
45SPICE_CONF_OPTS += --disable-opus
46endif
47
48# We need to tweak spice.pc because it /forgets/ (for static linking) that
49# it should link against libz and libjpeg. libz is pkg-config-aware, while
50# libjpeg isn't, hence the two-line tweak
51define SPICE_POST_INSTALL_STAGING_FIX_PC
52	$(SED) 's/^\(Requires.private:.*\)$$/\1 zlib/; s/^\(Libs.private:.*\)$$/\1 -ljpeg/;' \
53		"$(STAGING_DIR)/usr/lib/pkgconfig/spice-server.pc"
54endef
55SPICE_POST_INSTALL_STAGING_HOOKS += SPICE_POST_INSTALL_STAGING_FIX_PC
56
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.
70SPICE_CONF_OPTS += gl_cv_warn__fstack_protector_all=no
71
72$(eval $(autotools-package))
73