qtwayland-config: Add qtwayland-config recipe 19/25119/2
authorMarius Vlad <marius.vlad@collabora.com>
Thu, 13 Aug 2020 14:14:07 +0000 (17:14 +0300)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 25 Aug 2020 11:53:40 +0000 (11:53 +0000)
Migrate from qtwayland bb append recipe to using a config one.

Bug-AGL: SPEC-3522

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I24179505f10e02cd09542d2caf28104dc89257c8
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/25119
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config/qtwayland [new file with mode: 0644]
meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config_1.0.0.bb [new file with mode: 0644]
meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland_%.bbappend

diff --git a/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config/qtwayland b/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config/qtwayland
new file mode 100644 (file)
index 0000000..504af42
--- /dev/null
@@ -0,0 +1,2 @@
+QT_WAYLAND_SHELL_INTEGRATION=@QT_WAYLAND_DEFAULT_SHELL@
+QT_WAYLAND_RESIZE_AFTER_SWAP=1
diff --git a/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config_1.0.0.bb b/meta-agl-profile-graphical-qt5/recipes-qt/qt5/qtwayland-config_1.0.0.bb
new file mode 100644 (file)
index 0000000..ae7c956
--- /dev/null
@@ -0,0 +1,21 @@
+SUMMARY     = "QtWayland config file."
+DESCRIPTION = "Config file for qtwayland."
+SECTION     = "apps"
+LICENSE     = "MIT"
+
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+SRC_URI = "file://qtwayland"
+
+inherit allarch
+
+QTWAYLAND_DEFAULT_SHELL ?= "xdg-shell"
+
+do_compile[noexec] = "1"
+
+do_install () {
+    install -D -m 644 ${WORKDIR}/qtwayland ${D}${sysconfdir}/afm/unit.env.d/qtwayland
+    sed -i -e 's/@QT_WAYLAND_DEFAULT_SHELL@/${QTWAYLAND_DEFAULT_SHELL}/' ${D}${sysconfdir}/afm/unit.env.d/qtwayland
+}
+
+RPROVIDES_${PN} += "virtual/qtwayland-config"
index 85ebc29..2f6072a 100644 (file)
@@ -24,12 +24,3 @@ SRC_URI_append = "\
     file://0010-Added-manifest-file-according-to-smack-3-domain-mode.patch \
     "
 
-AGL_DEFAULT_WM_SHELL ?= "xdg-shell"
-AFM_CONF_DIR = "${D}${sysconfdir}/afm/unit.env.d"
-QT_SHELL_FILE = "${AFM_CONF_DIR}/qt-shell"
-
-do_install_append_class-target() {
-       mkdir -p ${AFM_CONF_DIR}
-       echo "QT_WAYLAND_SHELL_INTEGRATION=${AGL_DEFAULT_WM_SHELL}" > ${QT_SHELL_FILE}
-       echo "QT_WAYLAND_RESIZE_AFTER_SWAP=1" >> ${QT_SHELL_FILE}
-}