003d411cec3d3828f5c7be55f478b8a6f348c595
[AGL/meta-agl-demo.git] / recipes-graphics / wayland / weston-ini-conf_agldemo.inc
1 FILESEXTRAPATHS:prepend := "${THISDIR}/weston-ini-conf:"
2
3 SRC_URI += "file://weston.ini.kvm.in"
4
5 GUEST_VM1_IMAGE ?= "agl-ivi-demo-platform-flutter"
6 GUEST_VM2_IMAGE ?= "agl-cluster-demo-platform-flutter"
7
8 do_compile:append() {
9     # Put all of our cfg files together for a default portrait
10     # orientation configuration
11     rm -f ${WORKDIR}/weston.ini.flutter
12     for F in ${WESTON_FRAGMENTS}; do
13         cat ${WORKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.flutter
14         if grep -q '\[output\]' ${WORKDIR}/${F}.cfg; then
15             echo "activation-area=1080x1600+0,160" >> ${WORKDIR}/weston.ini.flutter
16         fi
17         echo >> ${WORKDIR}/weston.ini.flutter
18     done
19     sed -i -e '$ d' ${WORKDIR}/weston.ini.flutter
20
21     # Start with a canned configuration for a KVM host, filling in
22     # the guest VM application ids to pin them to specific outputs.
23     rm -f ${WORKDIR}/weston.ini.kvm
24     sed -e "s/@GUEST_VM1_IMAGE@/${GUEST_VM1_IMAGE}/g" \
25         -e "s/@GUEST_VM2_IMAGE@/${GUEST_VM2_IMAGE}/g" \
26         ${WORKDIR}/weston.ini.kvm.in > ${WORKDIR}/weston.ini.kvm
27 }
28
29 do_install:append() {
30     install -m 0644 ${WORKDIR}/weston.ini.flutter ${D}${weston_ini_dir}/
31     install -m 0644 ${WORKDIR}/weston.ini.kvm ${D}${weston_ini_dir}/
32 }
33
34 PACKAGE_BEFORE_PN += "${PN}-flutter ${PN}-kvm"
35
36 FILES:${PN}-flutter = "${weston_ini_dir}/weston.ini.flutter"
37
38 RPROVIDES:${PN}-flutter = "weston-ini"
39 RCONFLICTS:${PN}-flutter = "${PN}"
40 ALTERNATIVE:${PN}-flutter = "weston.ini"
41 ALTERNATIVE_TARGET_${PN}-flutter = "${weston_ini_dir}/weston.ini.flutter"
42
43 FILES:${PN}-kvm = "${weston_ini_dir}/weston.ini.kvm"
44
45 RPROVIDES:${PN}-kvm = "weston-ini"
46 RCONFLICTS:${PN}-kvm = "${PN}"
47 ALTERNATIVE:${PN}-kvm = "weston.ini"
48 ALTERNATIVE_TARGET_${PN}-kvm = "${weston_ini_dir}/weston.ini.kvm"