efl.mk 8.8 KB

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