summaryrefslogtreecommitdiffstats
path: root/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb
diff options
context:
space:
mode:
authorRonan Le Martret <ronan.lemartret@iot.bzh>2017-03-24 11:16:21 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-03-30 07:36:39 +0000
commit7d1d7457ff2b71abe95525b26148d5a3e7a42790 (patch)
treec7b9796ea099f94da5b879276235fea6077d6bf4 /meta-agl/recipes-graphics/wayland/weston-ini-conf.bb
parent64d59ff0e0e835a53445b07257d3896fb48abfb5 (diff)
Generate weston.ini dynamically
* remove weston-intel.ini * add new package weston-ini-conf * the list of the sections of weston.ini is described in variable flags WESTONSECTION * each section is described in variable flags WESTONSECTION * each output screen is described in agl_screen variable Bug-AGL: SPEC-477 Change-Id: I3d25ab49018e3842c916993ba8b9bcc2428d5170 Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'meta-agl/recipes-graphics/wayland/weston-ini-conf.bb')
-rw-r--r--meta-agl/recipes-graphics/wayland/weston-ini-conf.bb57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb b/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb
new file mode 100644
index 000000000..01f2c6534
--- /dev/null
+++ b/meta-agl/recipes-graphics/wayland/weston-ini-conf.bb
@@ -0,0 +1,57 @@
+SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+
+S = "${WORKDIR}"
+
+require weston-ini-conf/screen.inc
+
+DEFAULT_SCREEN[transform]?="90"
+DEFAULT_SCREEN[name]?="HDMI-A-1"
+
+WESTONCORE[shell]??="desktop-shell.so"
+WESTONCORE[backend]??="drm-backend.so"
+
+WESTONSHELL[locking]="true"
+# Uncomment below to hide panel
+#WESTONSHELL[panel-location]="none"
+
+WESTONOUTPUT1[agl_screen]??="DEFAULT_SCREEN"
+
+WESTONSECTION[WESTONCORE]?="core"
+WESTONSECTION[WESTONSHELL]?="shell"
+WESTONSECTION[WESTONOUTPUT1]?="output"
+
+python do_generate_weston_init() {
+ with open(d.getVar('WORKDIR', True)+"/weston.ini" ,'w') as weston_ini:
+ dicoSection=d.getVarFlags('WESTONSECTION')
+ keysSection=list(dicoSection.keys())
+ keysSection.sort()
+ for section in keysSection:
+ weston_ini.writelines( "["+dicoSection[section]+"]\n")
+ dicoSectionValues=d.getVarFlags(section)
+ keysSectionValues=list(dicoSectionValues.keys())
+ keysSectionValues.sort()
+ for sectionValue in keysSectionValues:
+ if (dicoSection[section] == "output" and sectionValue == "agl_screen"):
+ screen=dicoSectionValues[sectionValue]
+ dicoScreenConfig=d.getVarFlags(screen)
+ keysScreenConfig=list(dicoScreenConfig.keys())
+ keysScreenConfig.sort()
+ for screenConfig in keysScreenConfig:
+ weston_ini.writelines( screenConfig+"="+dicoScreenConfig[screenConfig]+"\n")
+ else:
+ weston_ini.writelines( str(sectionValue)+"="+str(dicoSectionValues[sectionValue])+"\n")
+
+ weston_ini.writelines( "\n")
+}
+
+#ar_src = d.getVarFlag('ARCHIVER_MODE', 'src', True)
+
+addtask do_generate_weston_init after do_compile before do_install
+
+do_install_append() {
+ WESTON_INI_CONFIG=${sysconfdir}/xdg/weston
+ install -d ${D}${WESTON_INI_CONFIG}
+ install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini
+}