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