python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / cairo / cairo.mk
blobac91a56ff9a90e52b74dea30f475d626a50a3e60
1 ################################################################################
3 # cairo
5 ################################################################################
7 CAIRO_VERSION = 1.14.8
8 CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.xz
9 CAIRO_LICENSE = LGPLv2.1 or MPLv1.1 (library)
10 CAIRO_LICENSE_FILES = COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
11 CAIRO_SITE = http://cairographics.org/releases
12 CAIRO_INSTALL_STAGING = YES
13 CAIRO_AUTORECONF = YES
15 # relocation truncated to fit: R_68K_GOT16O
16 ifeq ($(BR2_m68k_cf),y)
17 CAIRO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mxgot"
18 endif
20 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
21 CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1"
22 endif
24 # cairo can use C++11 atomics when available, so we need to link with
25 # libatomic for the architectures who need libatomic.
26 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
27 CAIRO_CONF_ENV += LIBS="-latomic"
28 endif
30 CAIRO_CONF_OPTS = \
31 --enable-trace=no \
32 --enable-interpreter=no
34 CAIRO_DEPENDENCIES = host-pkgconf fontconfig pixman
36 # Just the bare minimum to make other host-* packages happy
37 HOST_CAIRO_CONF_OPTS = \
38 --enable-trace=no \
39 --enable-interpreter=no \
40 --disable-directfb \
41 --enable-ft \
42 --disable-gobject \
43 --disable-glesv2 \
44 --disable-vg \
45 --disable-xlib \
46 --disable-xcb \
47 --without-x \
48 --disable-xlib-xrender \
49 --disable-ps \
50 --disable-pdf \
51 --enable-png \
52 --disable-script \
53 --disable-svg \
54 --disable-tee \
55 --disable-xml
56 HOST_CAIRO_DEPENDENCIES = \
57 host-freetype \
58 host-fontconfig \
59 host-libpng \
60 host-pixman \
61 host-pkgconf
63 # DirectFB svg support rely on Cairo and Cairo DirectFB support depends on
64 # DirectFB. Break circular dependency by disabling DirectFB support in Cairo
65 # (which is experimental)
66 ifeq ($(BR2_PACKAGE_DIRECTFB)x$(BR2_PACKAGE_DIRECTFB_SVG),yx)
67 CAIRO_CONF_OPTS += --enable-directfb
68 CAIRO_DEPENDENCIES += directfb
69 else
70 CAIRO_CONF_OPTS += --disable-directfb
71 endif
73 ifeq ($(BR2_PACKAGE_FREETYPE),y)
74 CAIRO_CONF_OPTS += --enable-ft
75 CAIRO_DEPENDENCIES += freetype
76 else
77 CAIRO_CONF_OPTS += --disable-ft
78 endif
80 ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
81 CAIRO_CONF_OPTS += --enable-gobject
82 CAIRO_DEPENDENCIES += libglib2
83 else
84 CAIRO_CONF_OPTS += --disable-gobject
85 endif
87 # Can use GL or GLESv2 but not both
88 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
89 CAIRO_CONF_OPTS += --enable-gl --disable-glesv2
90 CAIRO_DEPENDENCIES += libgl
91 else
92 ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
93 CAIRO_CONF_OPTS += --disable-gl --enable-glesv2
94 CAIRO_DEPENDENCIES += libgles
95 else
96 CAIRO_CONF_OPTS += --disable-gl --disable-glesv2
97 endif
98 endif
100 ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y)
101 CAIRO_CONF_OPTS += --enable-vg
102 CAIRO_DEPENDENCIES += libopenvg
103 else
104 CAIRO_CONF_OPTS += --disable-vg
105 endif
107 ifeq ($(BR2_PACKAGE_LZO),y)
108 CAIRO_DEPENDENCIES += lzo
109 endif
111 ifeq ($(BR2_PACKAGE_XORG7),y)
112 CAIRO_CONF_OPTS += --enable-xlib --enable-xcb --with-x
113 CAIRO_DEPENDENCIES += xlib_libX11 xlib_libXext
114 else
115 CAIRO_CONF_OPTS += --disable-xlib --disable-xcb --without-x
116 endif
118 ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
119 CAIRO_CONF_OPTS += --enable-xlib-xrender
120 CAIRO_DEPENDENCIES += xlib_libXrender
121 else
122 CAIRO_CONF_OPTS += --disable-xlib-xrender
123 endif
125 ifeq ($(BR2_PACKAGE_CAIRO_PS),y)
126 CAIRO_CONF_OPTS += --enable-ps
127 CAIRO_DEPENDENCIES += zlib
128 else
129 CAIRO_CONF_OPTS += --disable-ps
130 endif
132 ifeq ($(BR2_PACKAGE_CAIRO_PDF),y)
133 CAIRO_CONF_OPTS += --enable-pdf
134 CAIRO_DEPENDENCIES += zlib
135 else
136 CAIRO_CONF_OPTS += --disable-pdf
137 endif
139 ifeq ($(BR2_PACKAGE_CAIRO_PNG),y)
140 CAIRO_CONF_OPTS += --enable-png
141 CAIRO_DEPENDENCIES += libpng
142 else
143 CAIRO_CONF_OPTS += --disable-png
144 endif
146 ifeq ($(BR2_PACKAGE_CAIRO_SCRIPT),y)
147 CAIRO_CONF_OPTS += --enable-script
148 else
149 CAIRO_CONF_OPTS += --disable-script
150 endif
152 ifeq ($(BR2_PACKAGE_CAIRO_SVG),y)
153 CAIRO_CONF_OPTS += --enable-svg
154 else
155 CAIRO_CONF_OPTS += --disable-svg
156 endif
158 ifeq ($(BR2_PACKAGE_CAIRO_TEE),y)
159 CAIRO_CONF_OPTS += --enable-tee
160 else
161 CAIRO_CONF_OPTS += --disable-tee
162 endif
164 ifeq ($(BR2_PACKAGE_CAIRO_XML),y)
165 CAIRO_CONF_OPTS += --enable-xml
166 else
167 CAIRO_CONF_OPTS += --disable-xml
168 endif
170 $(eval $(autotools-package))
171 $(eval $(host-autotools-package))