8113162c4e9286908ec3f8a6ef1d495d72df29d8
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / efl / libevas / libevas.mk
1 ################################################################################
2 #
3 # libevas
4 #
5 ################################################################################
6
7 LIBEVAS_VERSION = $(EFL_VERSION)
8 LIBEVAS_SOURCE = evas-$(LIBEVAS_VERSION).tar.bz2
9 LIBEVAS_SITE = http://download.enlightenment.org/releases
10 LIBEVAS_LICENSE = BSD-2c
11 LIBEVAS_LICENSE_FILES = COPYING
12
13 LIBEVAS_INSTALL_STAGING = YES
14
15 LIBEVAS_DEPENDENCIES = host-pkgconf zlib libeina freetype
16
17 HOST_LIBEVAS_DEPENDENCIES = \
18         host-pkgconf host-zlib host-libeina \
19         host-freetype host-libpng host-libjpeg
20 HOST_LIBEVAS_CONF_OPTS += \
21         --enable-image-loader-png \
22         --enable-image-loader-jpeg \
23         --disable-image-loader-gif \
24         --disable-image-loader-tiff \
25         --disable-image-loader-eet \
26         --disable-font-loader-eet \
27         --disable-cpu-sse3 \
28         --disable-software-sdl \
29         --disable-gl-sdl \
30         --disable-software-xlib \
31         --disable-gl-xlib \
32         --enable-software-xcb \
33         --disable-gl-xcb
34
35 # rendering options
36 ifeq ($(BR2_PACKAGE_LIBEVAS_SCALE_SAMPLE),y)
37 LIBEVAS_CONF_OPTS += --enable-scale-sample
38 else
39 LIBEVAS_CONF_OPTS += --disable-scale-sample
40 endif
41
42 ifeq ($(BR2_PACKAGE_LIBEVAS_SCALE_SMOOTH),y)
43 LIBEVAS_CONF_OPTS += --enable-scale-smooth
44 else
45 LIBEVAS_CONF_OPTS += --disable-scale-smooth
46 endif
47
48 ifeq ($(BR2_PACKAGE_LIBEVAS_SMALL_DITHERING),y)
49 LIBEVAS_CONF_OPTS += --enable-small-dither-mask
50 endif
51
52 ifeq ($(BR2_PACKAGE_LIBEVAS_LINE_DITHERING),y)
53 LIBEVAS_CONF_OPTS += --enable-line-dither-mask
54 endif
55
56 ifeq ($(BR2_PACKAGE_LIBEVAS_NO_DITHERING),y)
57 LIBEVAS_CONF_OPTS += --enable-no-dither-mask
58 endif
59
60 # backends
61 ifeq ($(BR2_PACKAGE_LIBEVAS_BUFFER),y)
62 LIBEVAS_CONF_OPTS += --enable-buffer
63 endif
64
65 ifeq ($(BR2_PACKAGE_LIBEVAS_X11),y)
66 LIBEVAS_CONF_OPTS += --enable-software-xlib \
67         --with-x=$(STAGING_DIR) \
68         --x-includes=$(STAGING_DIR)/usr/include \
69         --x-libraries=$(STAGING_DIR)/usr/lib
70 LIBEVAS_DEPENDENCIES += xlib_libX11 xlib_libXext
71 else
72 LIBEVAS_CONF_OPTS += --disable-software-xlib
73 endif
74
75 ifeq ($(BR2_PACKAGE_LIBEVAS_X11_GLX),y)
76 LIBEVAS_CONF_OPTS += --enable-gl-xlib
77 LIBEVAS_DEPENDENCIES += \
78         xproto_glproto xlib_libX11 xlib_libXrender \
79         xlib_libXext libeet
80 else
81 LIBEVAS_CONF_OPTS += --disable-gl-xlib
82 endif
83
84 ifeq ($(BR2_PACKAGE_LIBEVAS_XCB),y)
85 LIBEVAS_CONF_OPTS += --enable-software-xcb
86 LIBEVAS_DEPENDENCIES += libxcb xcb-proto xcb-util pixman
87 endif
88
89 ifeq ($(BR2_PACKAGE_LIBEVAS_XCB_GLX),y)
90 LIBEVAS_CONF_OPTS += --enable-gl-xcb
91 LIBEVAS_DEPENDENCIES += libxcb xcb-proto xcb-util xproto_glproto
92 endif
93
94 ifeq ($(BR2_PACKAGE_LIBEVAS_FB),y)
95 LIBEVAS_CONF_OPTS += --enable-fb
96 endif
97
98 ifeq ($(BR2_PACKAGE_LIBEVAS_DIRECTFB),y)
99 LIBEVAS_CONF_OPTS += --enable-directfb
100 LIBEVAS_DEPENDENCIES += directfb
101 endif
102
103 ifeq ($(BR2_PACKAGE_LIBEVAS_SDL),y)
104 LIBEVAS_CONF_OPTS += --enable-software-sdl
105 LIBEVAS_DEPENDENCIES += sdl
106 endif
107
108 ifeq ($(BR2_PACKAGE_LIBEVAS_SDL_GL),y)
109 LIBEVAS_CONF_OPTS += --enable-gl-sdl
110 LIBEVAS_DEPENDENCIES += sdl
111 # configure script forgets to check for eet / fill this out
112 LIBEVAS_CONF_ENV += \
113         GL_EET_CFLAGS='-I$(STAGING_DIR)/usr/include/eet-1' \
114         GL_EET_LIBS='-leet'
115 endif
116
117 # libevas OpenGL flavor
118 ifeq ($(BR2_PACKAGE_LIBEVAS_GL),y)
119 LIBEVAS_DEPENDENCIES += mesa3d libeet
120 endif
121
122 ifeq ($(BR2_PACKAGE_LIBEVAS_GLES_SGX),y)
123 LIBEVAS_CONF_OPTS += --enable-gl-flavor-gles --enable-gles-variety-sgx
124 else
125 LIBEVAS_CONF_OPTS += --disable-gles-variety-sgx
126 endif
127
128 ifeq ($(BR2_PACKAGE_LIBEVAS_GLES_S3C6410),y)
129 LIBEVAS_CONF_OPTS += --enable-gl-flavor-gles --enable-gles-variety-s3c6410
130 else
131 LIBEVAS_CONF_OPTS += --disable-gles-variety-s3c6410
132 endif
133
134 ifeq ($(BR2_PACKAGE_LIBEVAS_GLES_SGX)$(BR2_PACKAGE_LIBEVAS_GLES_S3C6410),)
135 LIBEVAS_CONF_OPTS += --disable-gl-flavor-gles
136 endif
137
138 # code options
139 ifeq ($(BR2_X86_CPU_HAS_MMX),y)
140 LIBEVAS_CONF_OPTS += --enable-cpu-mmx
141 else
142 LIBEVAS_CONF_OPTS += --disable-cpu-mmx
143 endif
144
145 ifeq ($(BR2_X86_CPU_HAS_SSE),y)
146 LIBEVAS_CONF_OPTS += --enable-cpu-sse
147 else
148 LIBEVAS_CONF_OPTS += --disable-cpu-sse
149 endif
150
151 ifeq ($(BR2_X86_CPU_HAS_SSE3),y)
152 LIBEVAS_CONF_OPTS += --enable-cpu-sse3
153 else
154 LIBEVAS_CONF_OPTS += --disable-cpu-sse3
155 endif
156
157 ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
158 LIBEVAS_CONF_OPTS += --enable-cpu-altivec
159 else
160 LIBEVAS_CONF_OPTS += --disable-cpu-altivec
161 endif
162
163 ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
164 LIBEVAS_CONF_OPTS += --enable-cpu-neon
165 else
166 LIBEVAS_CONF_OPTS += --disable-cpu-neon
167 endif
168
169 # loaders
170 ifeq ($(BR2_PACKAGE_LIBEVAS_PNG),y)
171 LIBEVAS_CONF_OPTS += --enable-image-loader-png
172 LIBEVAS_DEPENDENCIES += libpng
173 else
174 LIBEVAS_CONF_OPTS += --disable-image-loader-png
175 endif
176
177 ifeq ($(BR2_PACKAGE_LIBEVAS_JPEG),y)
178 LIBEVAS_CONF_OPTS += --enable-image-loader-jpeg
179 LIBEVAS_DEPENDENCIES += jpeg
180 else
181 LIBEVAS_CONF_OPTS += --disable-image-loader-jpeg
182 endif
183
184 ifeq ($(BR2_PACKAGE_LIBEVAS_GIF),y)
185 LIBEVAS_CONF_OPTS += --enable-image-loader-gif
186 LIBEVAS_DEPENDENCIES += giflib
187 else
188 LIBEVAS_CONF_OPTS += --disable-image-loader-gif
189 endif
190
191 ifeq ($(BR2_PACKAGE_LIBEVAS_PMAPS),y)
192 LIBEVAS_CONF_OPTS += --enable-image-loader-pmaps
193 else
194 LIBEVAS_CONF_OPTS += --disable-image-loader-pmaps
195 endif
196
197 ifeq ($(BR2_PACKAGE_LIBEVAS_TIFF),y)
198 LIBEVAS_CONF_OPTS += --enable-image-loader-tiff
199 LIBEVAS_DEPENDENCIES += tiff
200 else
201 LIBEVAS_CONF_OPTS += --disable-image-loader-tiff
202 endif
203
204 ifeq ($(BR2_PACKAGE_LIBEVAS_XPM),y)
205 LIBEVAS_CONF_OPTS += --enable-image-loader-xpm
206 else
207 LIBEVAS_CONF_OPTS += --disable-image-loader-xpm
208 endif
209
210 ifeq ($(BR2_PACKAGE_LIBEVAS_EET),y)
211 LIBEVAS_CONF_OPTS += --enable-image-loader-eet
212 LIBEVAS_DEPENDENCIES += libeet
213 else
214 LIBEVAS_CONF_OPTS += --disable-image-loader-eet
215 endif
216
217 ifeq ($(BR2_PACKAGE_LIBEVAS_EET_FONT),y)
218 LIBEVAS_CONF_OPTS += --enable-font-loader-eet
219 LIBEVAS_DEPENDENCIES += libeet
220 else
221 LIBEVAS_CONF_OPTS += --disable-font-loader-eet
222 endif
223
224 ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
225 LIBEVAS_CONF_OPTS += --enable-fontconfig
226 LIBEVAS_DEPENDENCIES += fontconfig
227 else
228 LIBEVAS_CONF_OPTS += --disable-fontconfig
229 endif
230
231 ifeq ($(BR2_PACKAGE_LIBFRIBIDI),y)
232 LIBEVAS_CONF_OPTS += --enable-fribidi
233 LIBEVAS_DEPENDENCIES += libfribidi
234 else
235 LIBEVAS_CONF_OPTS += --disable-fribidi
236 endif
237
238 # libevas installs the source code of examples on the target, which
239 # are generally not useful.
240 define LIBEVAS_REMOVE_EXAMPLES
241         rm -rf $(TARGET_DIR)/usr/share/evas/examples/
242 endef
243
244 LIBEVAS_POST_INSTALL_TARGET_HOOKS += LIBEVAS_REMOVE_EXAMPLES
245
246 $(eval $(autotools-package))
247 $(eval $(host-autotools-package))