Skip to contentSkip to conversation

weston: Split out machine specific configuration

PATCH Superseded Mark Hatle 2 participants 2 messages Oct 24, 2018

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

PATCH v2 1/1 weston: Split out machine specific configuration

Weston needs to be configured to load the fbdev driver when run on a QEMU system. Other MACHINEs may want to also provider their own configuration as well..

Adding a new RRECOMMEND configuration package will allow this, but avoid installing empty packages/files in the majority case where it is not needed.

Add maintainer entry as well.

---
 meta/conf/distro/include/maintainers.inc      |  1 +
 meta/recipes-graphics/wayland/weston-cfg.bb   | 34 +++++++++++++++++++++++++++
 meta/recipes-graphics/wayland/weston_5.0.0.bb |  8 +------
 3 files changed, 36 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-graphics/wayland/weston-cfg.bb
meta/conf/distro/include/maintainers.inc +1 -0
index d32e07d899..5b68336184 100644
@@ -678,6 +678,7 @@ RECIPE_MAINTAINER_pn-wayland = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER_pn-wayland-protocols = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER_pn-webkitgtk = "Alexander Kanavin <[email protected]>"
 RECIPE_MAINTAINER_pn-weston = "Denys Dmytriyenko <[email protected]>"
+RECIPE_MAINTAINER_pn-weston-cfg = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER_pn-weston-init = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER_pn-wget = "Yi Zhao <[email protected]>"
 RECIPE_MAINTAINER_pn-which = "Ross Burton <[email protected]>"
meta/recipes-graphics/wayland/weston-cfg.bb new file +34 -0
new file mode 100644
index 0000000000..6a5cdbf915
@@ -0,0 +1,34 @@
+SUMMARY = "Weston, a Wayland compositor, configuration files"
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+CONFFILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini"
+
+FILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini"
+
+PACKAGES = "${PN}"
+
+do_compile[noexec] = '1'
+
+do_install() {
+	:
+}
+
+do_install_qemux86() {
+	mkdir -p ${D}/${sysconfdir}/xdg/weston
+	cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini
+[core]
+backend=fbdev-backend.so
+EOF
+}
+
+do_install_qemux86-64() {
+	mkdir -p ${D}/${sysconfdir}/xdg/weston
+	cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini
+[core]
+backend=fbdev-backend.so
+EOF
+}
meta/recipes-graphics/wayland/weston_5.0.0.bb +1 -7
index 299408b201..b87524ece5 100644
@@ -29,12 +29,6 @@ WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
 EXTRA_OECONF = "--enable-setuid-install \
                 --disable-rdp-compositor \
                 "
-EXTRA_OECONF_append_qemux86 = "\
-		WESTON_NATIVE_BACKEND=fbdev-backend.so \
-		"
-EXTRA_OECONF_append_qemux86-64 = "\
-		WESTON_NATIVE_BACKEND=fbdev-backend.so \
-		"
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
                    ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
@@ -107,7 +101,7 @@ FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
 RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
 
 RDEPENDS_${PN} += "xkeyboard-config"
-RRECOMMENDS_${PN} = "liberation-fonts"
+RRECOMMENDS_${PN} = "weston-cfg liberation-fonts"
 RRECOMMENDS_${PN}-dev += "wayland-protocols"
 
 USERADD_PACKAGES = "${PN}"
Signature · 1 line
2.16.0.rc2
#1 lore raw

You need to add weston-cfg to SIGGEN_EXCLUDERECIPES_ABISAFE otherwise weston will still be effectively MACHINE_ARCH because of the do_package signature depending on weston-cfg signature.

Quoted 118 lines · Mark Hatle

Weston needs to be configured to load the fbdev driver when run on a QEMU system.
Other MACHINEs may want to also provider their own configuration as well..

Adding a new RRECOMMEND configuration package will allow this, but avoid installing empty packages/files in the majority case where it is not needed.

Add maintainer entry as well.

---
 meta/conf/distro/include/maintainers.inc      |  1 +
 meta/recipes-graphics/wayland/weston-cfg.bb   | 34
+++++++++++++++++++++++++++
 meta/recipes-graphics/wayland/weston_5.0.0.bb |  8 +------
 3 files changed, 36 insertions(+), 7 deletions(-)
 create mode 100644 meta/recipes-graphics/wayland/weston-cfg.bb
meta/conf/distro/include/maintainers.inc +0 -0
index d32e07d899..5b68336184 100644
@@ -678,6 +678,7 @@ RECIPE_MAINTAINER_pn-wayland = "Denys Dmytriyenko <

[email protected]>"
RECIPE_MAINTAINER_pn-wayland-protocols = "Denys Dmytriyenko <[email protected]

Quoted 1 line

"

RECIPE_MAINTAINER_pn-webkitgtk = "Alexander Kanavin <
[email protected]>"
RECIPE_MAINTAINER_pn-weston = "Denys Dmytriyenko <[email protected]>"

meta/conf/distro/include/maintainers.inc +1 -0
+RECIPE_MAINTAINER_pn-weston-cfg = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER_pn-weston-init = "Denys Dmytriyenko <[email protected]>"
 RECIPE_MAINTAINER_pn-wget = "Yi Zhao <[email protected]>"
 RECIPE_MAINTAINER_pn-which = "Ross Burton <[email protected]>"
meta/recipes-graphics/wayland/weston-cfg.bb new file +4 -0
new file mode 100644
index 0000000000..6a5cdbf915
@@ -0,0 +1,34 @@
+SUMMARY = "Weston, a Wayland compositor, configuration files"
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM =

"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

meta/recipes-graphics/wayland/weston-cfg.bb new file +30 -0
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+CONFFILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini"
+
+FILES_${PN} = "${sysconfdir}/xdg/weston/weston.ini"
+
+PACKAGES = "${PN}"
+
+do_compile[noexec] = '1'
+
+do_install() {
+       :
+}
+
+do_install_qemux86() {
+       mkdir -p ${D}/${sysconfdir}/xdg/weston
+       cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini
+[core]
+backend=fbdev-backend.so
+EOF
+}
+
+do_install_qemux86-64() {
+       mkdir -p ${D}/${sysconfdir}/xdg/weston
+       cat << EOF > ${D}/${sysconfdir}/xdg/weston/weston.ini
+[core]
+backend=fbdev-backend.so
+EOF
+}
meta/recipes-graphics/wayland/weston_5.0.0.bb +0 -0
index 299408b201..b87524ece5 100644
@@ -29,12 +29,6 @@ WESTON_MAJOR_VERSION =

"${@'.'.join(d.getVar('PV').split('.')[0:1])}"

 EXTRA_OECONF = "--enable-setuid-install \
                 --disable-rdp-compositor \
                 "
meta/recipes-graphics/wayland/weston_5.0.0.bb +0 -6
-EXTRA_OECONF_append_qemux86 = "\
-               WESTON_NATIVE_BACKEND=fbdev-backend.so \
-               "
-EXTRA_OECONF_append_qemux86-64 = "\
-               WESTON_NATIVE_BACKEND=fbdev-backend.so \
-               "
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland',
'kms fbdev wayland egl', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland',
'xwayland', '', d)} \
                    ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd

x11', d)} \

meta/recipes-graphics/wayland/weston_5.0.0.bb +0 -0
@@ -107,7 +101,7 @@ FILES_${PN}-xwayland =

"${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so"
RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"

RDEPENDS_${PN} += "xkeyboard-config"

meta/recipes-graphics/wayland/weston_5.0.0.bb +1 -2
-RRECOMMENDS_${PN} = "liberation-fonts"
+RRECOMMENDS_${PN} = "weston-cfg liberation-fonts"
 RRECOMMENDS_${PN}-dev += "wayland-protocols"
 
 USERADD_PACKAGES = "${PN}"
--

2.16.0.rc2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core