aboutsummaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend
blob: ea35d0203ef5fd0f4b005e6a29046894059c532b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require include/gles-control.inc
require include/multimedia-control.inc

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI = " \
    file://init \
    file://weston.service \
    file://weston-start \
"

do_install_append() {
    # Install weston-start script
    install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
    sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
    sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start

    if [ "X${USE_GLES}" = "X1" ]; then
        sed -e "s/\$OPTARGS/--idle-time=0 \$OPTARGS/" \
            -i ${D}/${systemd_system_unitdir}/weston.service
    fi

    if [ "X${USE_MULTIMEDIA}" = "X1" ]; then
        if [ "X${USE_V4L2_RENDERER}" = "X1" ]; then
            sed -e "s/\$OPTARGS/--use-v4l2 \$OPTARGS/" \
                -i ${D}/${systemd_system_unitdir}/weston.service
        fi
    fi
}