package/libsemanage: add host-audit as a dependency of the host variant
[buildroot-gz.git] / package / cairo / cairo.mk
blobb79899565b78555be813c4259a1dd07a20a66144
1 ################################################################################
3 # cairo
5 ################################################################################
7 CAIRO_VERSION = 1.14.6
8 CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.xz
9 CAIRO_LICENSE = LGPLv2.1+
10 CAIRO_LICENSE_FILES = COPYING
11 CAIRO_SITE = http://cairographics.org/releases
12 CAIRO_INSTALL_STAGING = YES
13 CAIRO_AUTORECONF = YES
15 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
16 CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1"
17 endif
19 # cairo can use C++11 atomics when available, so we need to link with
20 # libatomic for the architectures who need libatomic.
21 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
22 CAIRO_CONF_ENV += LIBS="-latomic"
23 endif
25 CAIRO_CONF_OPTS = \
26 --enable-trace=no \
27 --enable-interpreter=no
29 CAIRO_DEPENDENCIES = host-pkgconf fontconfig pixman
31 # Just the bare minimum to make other host-* packages happy
32 HOST_CAIRO_CONF_OPTS = \
33 --enable-trace=no \
34 --enable-interpreter=no \
35 --disable-directfb \
36 --enable-ft \
37 --disable-gobject \
38 --disable-glesv2 \
39 --disable-vg \
40 --disable-xlib \
41 --disable-xcb \
42 --without-x \
43 --disable-xlib-xrender \
44 --disable-ps \
45 --disable-pdf \
46 --enable-png \
47 --disable-script \
48 --disable-svg \
49 --disable-tee \
50 --disable-xml
51 HOST_CAIRO_DEPENDENCIES = \
52 host-freetype \
53 host-fontconfig \
54 host-libpng \
55 host-pixman \
56 host-pkgconf
58 # DirectFB svg support rely on Cairo and Cairo DirectFB support depends on
59 # DirectFB. Break circular dependency by disabling DirectFB support in Cairo
60 # (which is experimental)
61 ifeq ($(BR2_PACKAGE_DIRECTFB)x$(BR2_PACKAGE_DIRECTFB_SVG),yx)
62 CAIRO_CONF_OPTS += --enable-directfb
63 CAIRO_DEPENDENCIES += directfb
64 else
65 CAIRO_CONF_OPTS += --disable-directfb
66 endif
68 ifeq ($(BR2_PACKAGE_FREETYPE),y)
69 CAIRO_CONF_OPTS += --enable-ft
70 CAIRO_DEPENDENCIES += freetype
71 else
72 CAIRO_CONF_OPTS += --disable-ft
73 endif
75 ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
76 CAIRO_CONF_OPTS += --enable-gobject
77 CAIRO_DEPENDENCIES += libglib2
78 else
79 CAIRO_CONF_OPTS += --disable-gobject
80 endif
82 # Can use GL or GLESv2 but not both
83 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
84 CAIRO_CONF_OPTS += --enable-gl --disable-glesv2
85 CAIRO_DEPENDENCIES += libgl
86 else
87 ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
88 CAIRO_CONF_OPTS += --disable-gl --enable-glesv2
89 CAIRO_DEPENDENCIES += libgles
90 else
91 CAIRO_CONF_OPTS += --disable-gl --disable-glesv2
92 endif
93 endif
95 ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
96 CAIRO_CONF_OPTS += --enable-vg
97 CAIRO_DEPENDENCIES += libopenvg
98 else
99 CAIRO_CONF_OPTS += --disable-vg
100 endif
102 ifeq ($(BR2_PACKAGE_LZO),y)
103 CAIRO_DEPENDENCIES += lzo
104 endif
106 ifeq ($(BR2_PACKAGE_XORG7),y)
107 CAIRO_CONF_OPTS += --enable-xlib --enable-xcb --with-x
108 CAIRO_DEPENDENCIES += xlib_libX11 xlib_libXext
109 else
110 CAIRO_CONF_OPTS += --disable-xlib --disable-xcb --without-x
111 endif
113 ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
114 CAIRO_CONF_OPTS += --enable-xlib-xrender
115 CAIRO_DEPENDENCIES += xlib_libXrender
116 else
117 CAIRO_CONF_OPTS += --disable-xlib-xrender
118 endif
120 ifeq ($(BR2_PACKAGE_CAIRO_PS),y)
121 CAIRO_CONF_OPTS += --enable-ps
122 CAIRO_DEPENDENCIES += zlib
123 else
124 CAIRO_CONF_OPTS += --disable-ps
125 endif
127 ifeq ($(BR2_PACKAGE_CAIRO_PDF),y)
128 CAIRO_CONF_OPTS += --enable-pdf
129 CAIRO_DEPENDENCIES += zlib
130 else
131 CAIRO_CONF_OPTS += --disable-pdf
132 endif
134 ifeq ($(BR2_PACKAGE_CAIRO_PNG),y)
135 CAIRO_CONF_OPTS += --enable-png
136 CAIRO_DEPENDENCIES += libpng
137 else
138 CAIRO_CONF_OPTS += --disable-png
139 endif
141 ifeq ($(BR2_PACKAGE_CAIRO_SCRIPT),y)
142 CAIRO_CONF_OPTS += --enable-script
143 else
144 CAIRO_CONF_OPTS += --disable-script
145 endif
147 ifeq ($(BR2_PACKAGE_CAIRO_SVG),y)
148 CAIRO_CONF_OPTS += --enable-svg
149 else
150 CAIRO_CONF_OPTS += --disable-svg
151 endif
153 ifeq ($(BR2_PACKAGE_CAIRO_TEE),y)
154 CAIRO_CONF_OPTS += --enable-tee
155 else
156 CAIRO_CONF_OPTS += --disable-tee
157 endif
159 ifeq ($(BR2_PACKAGE_CAIRO_XML),y)
160 CAIRO_CONF_OPTS += --enable-xml
161 else
162 CAIRO_CONF_OPTS += --disable-xml
163 endif
165 $(eval $(autotools-package))
166 $(eval $(host-autotools-package))