xref: /OK3568_Linux_fs/buildroot/package/efl/efl.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# efl
4#
5################################################################################
6
7EFL_VERSION = 1.26.1
8EFL_SOURCE = efl-$(EFL_VERSION).tar.xz
9EFL_SITE = https://download.enlightenment.org/rel/libs/efl
10EFL_LICENSE = BSD-2-Clause, LGPL-2.1+, GPL-2.0+, FTL, MIT
11EFL_LICENSE_FILES = \
12	COMPLIANCE \
13	COPYING \
14	COPYING.images \
15	licenses/COPYING.ASL \
16	licenses/COPYING.BSD \
17	licenses/COPYING.FTL \
18	licenses/COPYING.GPL \
19	licenses/COPYING.LGPL \
20	licenses/COPYING.NGINX-MIT \
21	licenses/COPYING.SMALL
22
23EFL_INSTALL_STAGING = YES
24
25EFL_DEPENDENCIES = host-pkgconf host-efl host-luajit dbus freetype \
26	giflib jpeg libpng luajit lz4 zlib $(TARGET_NLS_DEPENDENCIES)
27
28# Configure options:
29# elua=true: build elua for the target.
30# sdl=false: disable sdl2 support.
31# embedded-lz4=false: use liblz4 from lz4 package.
32# native-arch-optimization=false: avoid optimization flags added by meson.
33# network-backend=none: disable connman networkmanager.
34EFL_CONF_OPTS = \
35	-Davahi=false \
36	-Dbuild-examples=false \
37	-Dbuild-tests=false \
38	-Ddotnet=false \
39	-Decore-imf-loaders-disabler=ibus,scim,xim \
40	-Delua=true \
41	-Dembedded-lz4=false \
42	-Dlua-interpreter=luajit \
43	-Dnative-arch-optimization=false \
44	-Dnetwork-backend=none \
45	-Dpixman=false \
46	-Dsdl=false \
47	-Dvnc-server=false
48
49ifeq ($(BR2_SYSTEM_ENABLE_NLS),y)
50EFL_CONF_OPTS += -Dnls=true
51else
52EFL_CONF_OPTS += -Dnls=false
53endif
54
55EFL_BINDINGS = lua
56
57ifeq ($(BR2_PACKAGE_EFL_EOLIAN_CPP),y)
58EFL_BINDINGS += cxx
59endif
60
61EFL_CONF_OPTS += -Dbindings=$(subst $(space),$(comma),$(EFL_BINDINGS))
62
63ifeq ($(BR2_PACKAGE_EFL_EEZE),y)
64EFL_DEPENDENCIES += udev
65EFL_CONF_OPTS += -Deeze=true
66else
67EFL_CONF_OPTS += -Deeze=false
68endif
69
70ifeq ($(BR2_PACKAGE_EFL_ELPUT),y)
71EFL_DEPENDENCIES += libinput libxkbcommon
72EFL_CONF_OPTS += -Dinput=true
73else
74EFL_CONF_OPTS += -Dinput=false
75endif
76
77ifeq ($(BR2_PACKAGE_EFL_UTIL_LINUX_LIBMOUNT),y)
78EFL_DEPENDENCIES += util-linux
79EFL_CONF_OPTS += -Dlibmount=true
80else
81EFL_CONF_OPTS += -Dlibmount=false
82endif
83
84ifeq ($(BR2_PACKAGE_SYSTEMD),y)
85EFL_CONF_OPTS += -Dsystemd=true
86EFL_DEPENDENCIES += systemd
87else
88EFL_CONF_OPTS += -Dsystemd=false
89endif
90
91ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
92EFL_CONF_OPTS += -Dfontconfig=true
93EFL_DEPENDENCIES += fontconfig
94else
95EFL_CONF_OPTS += -Dfontconfig=false
96endif
97
98ifeq ($(BR2_PACKAGE_LIBFRIBIDI),y)
99EFL_CONF_OPTS += -Dfribidi=true
100EFL_DEPENDENCIES += libfribidi
101else
102EFL_CONF_OPTS += -Dfribidi=false
103endif
104
105ifeq ($(BR2_PACKAGE_GSTREAMER1)$(BR2_PACKAGE_GST1_PLUGINS_BASE),yy)
106EFL_CONF_OPTS += -Dgstreamer=true
107EFL_DEPENDENCIES += gstreamer1 gst1-plugins-base
108else
109EFL_CONF_OPTS += -Dgstreamer=false
110endif
111
112ifeq ($(BR2_PACKAGE_BULLET),y)
113EFL_CONF_OPTS += -Dphysics=true
114EFL_DEPENDENCIES += bullet
115else
116EFL_CONF_OPTS += -Dphysics=false
117endif
118
119ifeq ($(BR2_PACKAGE_LIBSNDFILE),y)
120EFL_CONF_OPTS += -Daudio=true
121EFL_DEPENDENCIES += libsndfile
122else
123EFL_CONF_OPTS += -Daudio=false
124endif
125
126ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
127EFL_CONF_OPTS += -Dpulseaudio=true
128EFL_DEPENDENCIES += pulseaudio
129else
130EFL_CONF_OPTS += -Dpulseaudio=false
131endif
132
133ifeq ($(BR2_PACKAGE_HARFBUZZ),y)
134EFL_DEPENDENCIES += harfbuzz
135EFL_CONF_OPTS += -Dharfbuzz=true
136else
137EFL_CONF_OPTS += -Dharfbuzz=false
138endif
139
140ifeq ($(BR2_PACKAGE_TSLIB),y)
141EFL_DEPENDENCIES += tslib
142EFL_CONF_OPTS += -Dtslib=true
143else
144EFL_CONF_OPTS += -Dtslib=false
145endif
146
147ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
148EFL_DEPENDENCIES += libglib2
149EFL_CONF_OPTS += -Dglib=true
150else
151EFL_CONF_OPTS += -Dglib=false
152endif
153
154# Prefer openssl (the default) over gnutls.
155ifeq ($(BR2_PACKAGE_OPENSSL),y)
156EFL_DEPENDENCIES += openssl
157EFL_CONF_OPTS += -Dcrypto=openssl
158else
159EFL_DEPENDENCIES += gnutls libgcrypt
160EFL_CONF_OPTS += -Dcrypto=gnutls
161endif
162
163ifeq ($(BR2_PACKAGE_EFL_FB),y)
164EFL_CONF_OPTS += -Dfb=true
165else
166EFL_CONF_OPTS += -Dfb=false
167endif
168
169ifeq ($(BR2_PACKAGE_EFL_X_XLIB),y)
170EFL_CONF_OPTS += -Dx11=true \
171	-Dxinput2=true \
172	-Dxinput22=true
173
174EFL_DEPENDENCIES += \
175	xlib_libX11 \
176	xlib_libXcomposite \
177	xlib_libXcursor \
178	xlib_libXdamage \
179	xlib_libXext \
180	xlib_libXinerama \
181	xlib_libXrandr \
182	xlib_libXrender \
183	xlib_libXScrnSaver \
184	xlib_libXtst
185else
186EFL_CONF_OPTS += -Dx11=false
187endif
188
189ifeq ($(BR2_PACKAGE_EFL_OPENGL),y)
190EFL_CONF_OPTS += -Dopengl=full
191EFL_DEPENDENCIES += libgl
192# OpenGL ES requires EGL
193else ifeq ($(BR2_PACKAGE_EFL_OPENGLES),y)
194EFL_CONF_OPTS += -Dopengl=es-egl
195EFL_DEPENDENCIES += libegl libgles
196else ifeq ($(BR2_PACKAGE_EFL_OPENGL_NONE),y)
197EFL_CONF_OPTS += -Dopengl=none
198endif
199
200ifeq ($(BR2_PACKAGE_EFL_DRM),y)
201EFL_CONF_OPTS += -Ddrm=true
202EFL_DEPENDENCIES += libdrm libegl libgbm
203else
204EFL_CONF_OPTS += -Ddrm=false
205endif
206
207ifeq ($(BR2_PACKAGE_EFL_WAYLAND),y)
208EFL_DEPENDENCIES += wayland wayland-protocols
209EFL_CONF_OPTS += -Dwl=true
210else
211EFL_CONF_OPTS += -Dwl=false
212endif
213
214# json evas loader is disabled by default by upstream.
215# Disable libspectre (ps).
216# Keep all other evas loader enabled or handled below.
217EFL_EVAS_LOADERS_DISABLER = avif gst heif json ps
218
219# efl already depends on jpeg.
220ifeq ($(BR2_PACKAGE_EFL_JPEG),y)
221EFL_DEPENDENCIES += openjpeg
222else
223EFL_EVAS_LOADERS_DISABLER += jp2k
224endif
225
226ifeq ($(BR2_PACKAGE_EFL_TIFF),y)
227EFL_DEPENDENCIES += tiff
228else
229EFL_EVAS_LOADERS_DISABLER += tiff
230endif
231
232ifeq ($(BR2_PACKAGE_EFL_WEBP),y)
233EFL_DEPENDENCIES += webp
234else
235EFL_EVAS_LOADERS_DISABLER += webp
236endif
237
238ifeq ($(BR2_PACKAGE_POPPLER),y)
239# poppler needs c++11
240EFL_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11"
241EFL_DEPENDENCIES += poppler
242else
243EFL_EVAS_LOADERS_DISABLER += pdf
244endif
245
246ifeq ($(BR2_PACKAGE_EFL_LIBRAW),y)
247EFL_DEPENDENCIES += libraw
248else
249EFL_EVAS_LOADERS_DISABLER += raw
250endif
251
252ifeq ($(BR2_PACKAGE_EFL_SVG),y)
253EFL_DEPENDENCIES += librsvg cairo
254else
255EFL_EVAS_LOADERS_DISABLER += rsvg
256endif
257
258EFL_CONF_OPTS += -Devas-loaders-disabler=$(subst $(space),$(comma),$(EFL_EVAS_LOADERS_DISABLER))
259
260ifeq ($(BR2_PACKAGE_UPOWER),)
261# upower ecore system module is only useful if upower
262# dbus service is available.
263# It's not essential, only used to notify applications
264# of power state, such as low battery or AC power, so
265# they can adapt their power consumption.
266define EFL_HOOK_REMOVE_UPOWER
267	rm -fr $(TARGET_DIR)/usr/lib/ecore/system/upower
268endef
269EFL_POST_INSTALL_TARGET_HOOKS = EFL_HOOK_REMOVE_UPOWER
270endif
271
272ifeq ($(BR2_PACKAGE_LIBUNWIND),y)
273EFL_DEPENDENCIES += libunwind
274endif
275
276$(eval $(meson-package))
277
278################################################################################
279#
280# host-efl
281#
282################################################################################
283
284# We want to build only some host tools used later in the build.
285# Actually we want: edje_cc, eet and embryo_cc. eolian_cxx is built only
286# if selected for the target.
287
288# Host dependencies:
289# * host-dbus: for Eldbus
290# * host-freetype: for libevas
291# * host-libglib2: for libecore
292# * host-giflib, host-libjpeg, host-libpng: for libevas image loader
293# * host-luajit for Elua tool for the host
294# * host-openssl: cryptography backends.
295HOST_EFL_DEPENDENCIES = \
296	host-pkgconf \
297	host-dbus \
298	host-freetype \
299	host-giflib \
300	host-libglib2 \
301	host-libjpeg \
302	host-libpng \
303	host-luajit \
304	host-openssl \
305	host-zlib
306
307# Configure options:
308# audio=false: remove libsndfile dependency.
309# eeze=false: remove libudev dependency.
310# input=false: remove libinput dependency.
311# libmount=false: remove dependency on host-util-linux libmount.
312# elua=true: build elua for the host.
313# physics=false: remove Bullet dependency.
314# network-backend=none: remove network-backend (connman).
315# embedded-lz4=true: use lz4 bundled in efl.
316HOST_EFL_CONF_OPTS += \
317	-Daudio=false \
318	-Davahi=false \
319	-Dbuild-examples=false \
320	-Dbuild-tests=false \
321	-Dcrypto=openssl \
322	-Ddotnet=false \
323	-Decore-imf-loaders-disabler=ibus,scim,xim \
324	-Dedje-sound-and-video=false \
325	-Deeze=false \
326	-Delua=true \
327	-Dembedded-lz4=true \
328	-Dfontconfig=false \
329	-Dfribidi=false \
330	-Dglib=true \
331	-Dgstreamer=false \
332	-Dharfbuzz=false \
333	-Dinput=false \
334	-Dlibmount=false \
335	-Dlua-interpreter=luajit \
336	-Dnetwork-backend=none \
337	-Dnls=false \
338	-Dopengl=none \
339	-Dphysics=false \
340	-Dpixman=false \
341	-Dpulseaudio=false \
342	-Dsdl=false \
343	-Dsystemd=false \
344	-Dv4l2=false \
345	-Dvnc-server=false \
346	-Dx11=false \
347	-Dxinput22=false
348
349# List of modular image/vector loaders to disable in efl
350HOST_EFL_EVAS_LOADERS_DISABLER = avif bmp dds eet generic gst heif ico json \
351	jp2k pdf pmaps ps psd raw rsvg tga tgv tiff wbmp webp xcf xpm
352
353HOST_EFL_CONF_OPTS += -Devas-loaders-disabler=$(subst $(space),$(comma),$(HOST_EFL_EVAS_LOADERS_DISABLER))
354
355HOST_EFL_BINDINGS = lua
356
357# Enable Eolian language bindings to provide eolian_cxx tool for the
358# host which is required to build Eolian language bindings for the
359# target.
360ifeq ($(BR2_PACKAGE_EFL_EOLIAN_CPP),y)
361HOST_EFL_BINDINGS += cxx
362endif
363HOST_EFL_CONF_OPTS += -Dbindings=$(subst $(space),$(comma),$(HOST_EFL_BINDINGS))
364
365# Always disable upower system module from host as it's
366# not useful and would try to use the output/host/var
367# system bus which is non-existent and does not contain
368# any upower service in it.
369define HOST_EFL_HOOK_REMOVE_UPOWER
370	rm -fr $(HOST_DIR)/lib/ecore/system/upower
371endef
372HOST_EFL_POST_INSTALL_HOOKS = HOST_EFL_HOOK_REMOVE_UPOWER
373
374$(eval $(host-meson-package))
375