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