1 SUMMARY = "Configuration file for the Weston and AGL Wayland compositors"
3 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
8 file://hdmi-a-1-90.cfg \
9 file://hdmi-a-1-180.cfg \
10 file://hdmi-a-1-270.cfg \
11 file://remote-output.cfg \
12 file://virtual-270.cfg \
13 file://virtual-0.cfg \
18 inherit update-alternatives
20 # Default primary display/orientation fragment
21 WESTON_DISPLAYS ?= "hdmi-a-1-270"
23 # Configuration fragments to use in weston.ini.*
24 # Note that some may be replaced/removed when building the landscape
26 WESTON_FRAGMENTS = "core shell ${WESTON_DISPLAYS}"
28 # On-target weston.ini directory
29 weston_ini_dir = "${sysconfdir}/xdg/weston"
32 # Put all of our cfg files together for a default portrait
33 # orientation configuration
34 rm -f ${WORKDIR}/weston.ini.default
35 for F in ${WESTON_FRAGMENTS}; do
36 cat ${WORKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.default
37 echo >> ${WORKDIR}/weston.ini.default
39 sed -i -e '$ d' ${WORKDIR}/weston.ini.default
41 # Do it again, but filter fragments to configure for landscape
42 rm -f ${WORKDIR}/weston.ini.landscape
43 for F in ${WESTON_FRAGMENTS}; do
44 if echo $F | grep '^hdmi-a-1-\(90\|270\)$'; then
46 elif echo $F | grep '^virtual-270$'; then
49 cat ${WORKDIR}/${F}.cfg >> ${WORKDIR}/weston.ini.landscape
50 echo >> ${WORKDIR}/weston.ini.landscape
52 sed -i -e '$ d' ${WORKDIR}/weston.ini.landscape
56 install -d ${D}${weston_ini_dir}
57 install -m 0644 ${WORKDIR}/weston.ini.default ${D}${weston_ini_dir}/
58 install -m 0644 ${WORKDIR}/weston.ini.landscape ${D}${weston_ini_dir}/
61 PACKAGE_ARCH = "${MACHINE_ARCH}"
63 # Use the alternative mechanism to handle multiple packages providing
64 # weston.ini. This seems simpler than other possible approaches.
65 # Note that for now the generated packages are being marked as
66 # incompatible with each other for simplicity, that can be changed if
67 # a usecase where switching between alternatives at runtime is desirable
70 ALTERNATIVE_LINK_NAME[weston.ini] = "${weston_ini_dir}/weston.ini"
72 RDEPENDS_${PN} = "weston-init"
73 RPROVIDES_${PN} = "weston-ini"
74 RCONFLICTS_${PN} = "${PN}-landscape"
75 ALTERNATIVE_${PN} = "weston.ini"
76 ALTERNATIVE_TARGET_${PN} = "${weston_ini_dir}/weston.ini.default"
78 PACKAGE_BEFORE_PN += "${PN}-landscape"
80 FILES_${PN}-landscape = "${weston_ini_dir}/weston.ini.landscape"
82 RDEPENDS_${PN}-landscape = "weston-init"
83 RPROVIDES_${PN}-landscape = "weston-ini"
84 RCONFLICTS_${PN}-landscape = "${PN}"
85 ALTERNATIVE_${PN}-landscape = "weston.ini"
86 ALTERNATIVE_TARGET_${PN}-landscape = "${weston_ini_dir}/weston.ini.landscape"