xref: /OK3568_Linux_fs/yocto/meta-rockchip/dynamic-layers/recipes-browser/chromium/chromium-%.bbappend (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# Copyright (C) 2019, Fuzhou Rockchip Electronics Co., Ltd
2*4882a593Smuzhiyun# Released under the MIT license (see COPYING.MIT for the terms)
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunMAJ_VER = "${@oe.utils.trim_version("${PV}", 3)}"
5*4882a593SmuzhiyunPATCHPATH = "${CURDIR}/chromium_${MAJ_VER}"
6*4882a593Smuzhiyuninherit auto-patch
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunPACKAGECONFIG ??= "use-egl use-linux-v4l2 proprietary-codecs"
9*4882a593SmuzhiyunPACKAGECONFIG[use-linux-v4l2] = "use_v4l2_codec=true use_v4lplugin=true use_linux_v4l2_only=true"
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunGN_ARGS:append = " is_debug=false is_official_build=false fatal_linker_warnings=false"
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunCHROMIUM_EXTRA_ARGS:append = " --no-sandbox --gpu-sandbox-start-early --ignore-gpu-blacklist --ignore-gpu-blocklist --enable-accelerated-video-decode"
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun# TODO: Revisit once VDA and VEA are not dependent on Vaapi on linux
16*4882a593SmuzhiyunCHROMIUM_EXTRA_ARGS:append = " --enable-features=VaapiVideoDecoder,VaapiVideoEncoder"
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunFILESEXTRAPATHS:prepend := "${THISDIR}/files:"
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun# Fixup v8_qemu_wrapper library search path for component build
21*4882a593Smuzhiyun# see https://github.com/OSSystems/meta-browser/issues/314
22*4882a593Smuzhiyundo_configure:append() {
23*4882a593Smuzhiyun	WRAPPER=${B}/v8-qemu-wrapper.sh
24*4882a593Smuzhiyun	[ -e ${WRAPPER} ] &&
25*4882a593Smuzhiyun		sed -i "s#\(LD_LIBRARY_PATH=\)#\1${B}:#" ${WRAPPER}
26*4882a593Smuzhiyun}
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunINSANE_SKIP:${PN} = "already-stripped"
29*4882a593Smuzhiyun
30*4882a593SmuzhiyunSRC_URI:append = " file://chromium-init.sh"
31*4882a593Smuzhiyun
32*4882a593Smuzhiyundo_install:append () {
33*4882a593Smuzhiyun	install -d ${D}${sysconfdir}/init.d/
34*4882a593Smuzhiyun	install -m 0755 ${WORKDIR}/chromium-init.sh ${D}${sysconfdir}/init.d/
35*4882a593Smuzhiyun}
36*4882a593Smuzhiyun
37*4882a593Smuzhiyuninherit update-rc.d
38*4882a593Smuzhiyun
39*4882a593SmuzhiyunINITSCRIPT_NAME = "chromium-init.sh"
40*4882a593SmuzhiyunINITSCRIPT_PARAMS = "start 99 S ."
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunFILES:${PN}:append = " ${sysconfdir}/init.d"
43