From b5b4d7f9ad1b49944c210d337383133c63d6de1d Mon Sep 17 00:00:00 2001 From: Damian Wrobel Date: Fri, 19 Mar 2021 10:41:52 +0000 Subject: [PATCH] wpewebkit: Fixes for cross-compilation - extend native bbclass, - fix dependencies for target (avoid using -native counterparts), - do not pull-in qt unless 'qtwpe' config is enabled, - synchronize RRECOMMENDS to PACKAGECONFIG selection. Signed-off-by: Damian Wrobel --- recipes-browser/wpewebkit/wpewebkit.inc | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/recipes-browser/wpewebkit/wpewebkit.inc b/recipes-browser/wpewebkit/wpewebkit.inc index 6864be9e..74099bc9 100644 --- a/recipes-browser/wpewebkit/wpewebkit.inc +++ b/recipes-browser/wpewebkit/wpewebkit.inc @@ -7,13 +7,14 @@ LICENSE = "BSD & LGPLv2+" LIC_FILES_CHKSUM = "file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 " DEPENDS = " \ - bison-native gperf-native harfbuzz-native libxml2-native ccache-native ninja-native ruby-native cairo \ - fontconfig freetype glib-2.0 gnutls harfbuzz icu jpeg pcre sqlite3 zlib libpng \ + bison-native glib-2.0-native gperf-native ruby-native harfbuzz libxml2 cairo \ + fontconfig freetype gnutls icu jpeg pcre sqlite3 zlib libpng \ libsoup-2.4 libwebp libxml2 libxslt virtual/egl virtual/libgles2 libepoxy libgcrypt \ " -inherit cmake pkgconfig perlnative python3native -inherit ${@'cmake_qt5' if 'qt5-layer' in d.getVar('BBFILE_COLLECTIONS').split() else ''} +inherit cmake pkgconfig perlnative python3native ${@bb.utils.contains('PACKAGECONFIG','qtwpe','cmake_qt5','',d)} + +BBCLASSEXTEND = "native" CCACHE_DISABLE[unexport] = "1" @@ -23,8 +24,8 @@ PACKAGECONFIG ??= "fetchapi indexeddb mediasource video webaudio webcrypto woff2 # WPE features PACKAGECONFIG[accessibility] = "-DENABLE_ACCESSIBILITY=ON,-DENABLE_ACCESSIBILITY=OFF,atk at-spi2-atk" -PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,bubblewrap xdg-dbus-proxy bubblewrap-native xdg-dbus-proxy-native libseccomp" -PACKAGECONFIG[developer-mode] = "-DDEVELOPER_MODE=ON,-DDEVELOPER_MODE=OFF,wayland-native wayland-protocols wpebackend-fdo" +PACKAGECONFIG[bubblewrap] = "-DENABLE_BUBBLEWRAP_SANDBOX=ON,-DENABLE_BUBBLEWRAP_SANDBOX=OFF,bubblewrap xdg-dbus-proxy xdg-dbus-proxy libseccomp" +PACKAGECONFIG[developer-mode] = "-DDEVELOPER_MODE=ON,-DDEVELOPER_MODE=OFF,wayland wayland-protocols wpebackend-fdo" PACKAGECONFIG[deviceorientation] = "-DENABLE_DEVICE_ORIENTATION=ON,-DENABLE_DEVICE_ORIENTATION=OFF," PACKAGECONFIG[encryptedmedia] = "-DENABLE_ENCRYPTED_MEDIA=ON,-DENABLE_ENCRYPTED_MEDIA=OFF,libgcrypt" PACKAGECONFIG[fetchapi] = "-DENABLE_FETCH_API=ON,-DENABLE_FETCH_API=OFF," @@ -44,7 +45,7 @@ PACKAGECONFIG[woff2] = "-DUSE_WOFF2=ON,-DUSE_WOFF2=OFF,woff2" PACKAGECONFIG[2dcanvas] = "-DENABLE_ACCELERATED_2D_CANVAS=ON,-DENABLE_ACCELERATED_2D_CANVAS=OFF," PACKAGECONFIG[remote-inspector] = "-DENABLE_REMOTE_INSPECTOR=ON,-DENABLE_REMOTE_INSPECTOR=OFF," PACKAGECONFIG[webrtc] = "-DENABLE_WEB_RTC=ON,-DENABLE_WEB_RTC=OFF,libvpx libevent libopus" -PACKAGECONFIG[qtwpe] = "-DENABLE_WPE_QT_API=ON,-DENABLE_WPE_QT_API=OFF,qtbase-native qtbase qtdeclarative qtquickcontrols2 libepoxy wpebackend-fdo" +PACKAGECONFIG[qtwpe] = "-DENABLE_WPE_QT_API=ON,-DENABLE_WPE_QT_API=OFF,qtbase qtdeclarative qtquickcontrols2 libepoxy wpebackend-fdo" PACKAGECONFIG[openjpeg] = "-DUSE_OPENJPEG=ON,-DUSE_OPENJPEG=OFF,openjpeg" PACKAGECONFIG[unified-builds] = "-DENABLE_UNIFIED_BUILDS=ON,-DENABLE_UNIFIED_BUILDS=OFF," PACKAGECONFIG[systemd] = "-DUSE_SYSTEMD=ON,-DUSE_SYSTEMD=OFF," @@ -70,7 +71,9 @@ LDFLAGS_append_riscv64 = " -pthread" FULL_OPTIMIZATION_remove = "-g" LEAD_SONAME = "libWPEWebKit.so" -PACKAGES =+ "${PN}-web-inspector-plugin ${PN}-qtwpe-qml-plugin" +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'remote-inspector', '${PN}-web-inspector-plugin' , '', d)}" +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'qtwpe', '${PN}-qtwpe-qml-plugin' , '', d)}" + FILES_${PN} += "${libdir}/wpe-webkit*/injected-bundle/libWPEInjectedBundle.so" FILES_${PN}-web-inspector-plugin += "${libdir}/libWPEWebInspectorResources.so ${libdir}/wpe-webkit-*/libWPEWebInspectorResources.so" INSANE_SKIP_${PN}-web-inspector-plugin = "dev-so" @@ -113,7 +116,7 @@ RRECOMMENDS_${PN} += " \ ca-certificates \ shared-mime-info \ ttf-bitstream-vera \ - ${PN}-web-inspector-plugin \ - ${PN}-qtwpe-qml-plugin \ + ${@bb.utils.contains('PACKAGECONFIG', 'remote-inspector', '${PN}-web-inspector-plugin' , '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'qtwpe', '${PN}-qtwpe-qml-plugin' , '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'video', 'gstreamer1.0-plugins-base-meta gstreamer1.0-plugins-good-meta gstreamer1.0-plugins-bad-meta', '', d)} \ "