require gn-utils.inc inherit qemu python3native LICENSE = "Apache-2.0 & BSD-3-Clause & LGPL-2.0-only & LGPL-2.1-only" LIC_FILES_CHKSUM = "\ file://LICENSE;md5=c408a301e3407c3803499ce9290515d6 \ file://third_party/blink/renderer/core/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \ file://third_party/blink/renderer/core/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \ " CHROMIUM_VERSION = "118.0.5993.80" BRANCH = "5993" SRCREV = "3cffa575446727e2fe1f6499efa21f8e096e8ca0" PV = "${CHROMIUM_VERSION}.${BRANCH}+git" FILESEXTRAPATHS:prepend := "${THISDIR}/files/cef:" FILESEXTRAPATHS:prepend := "${THISDIR}/files/chromium:" # The [agl]-prefixed patches are the changes needed to make WAM work with # agl-compositor. The [meta-browser] patches comes from the https://github.com/OSSystems/meta-browser # project that does similar work on keeping up to the new chromium milestones # and the [MXX-Fix] patches are the fixes done by us to fix build issues for # the current chromium milestone. # For more information about the current milestones: https://chromiumdash.appspot.com/releases?platform=Linux SRC_URI = "\ https://commondatastorage.googleapis.com/chromium-browser-official/chromium-${CHROMIUM_VERSION}.tar.xz \ file://0001-agl-compositor-Add-agl_shell_wrapper-AGL-wayland-ext.patch \ file://0002-agl-Add-waylandwindow-window-tree-host-essential-par.patch \ file://0003-agl-Only-bind-to-agl_shell-if-it-s-the-browser-proce.patch \ file://0004-agl-Add-a-method-to-check-if-the-agl-window-is-confi.patch \ file://0005-agl-Start-using-agl-shell-version-4.patch \ file://0006-agl-Don-t-use-DRI-for-renesas.patch \ file://0007-meta-browser-Remove-the-GN-settings-done-for-clang-t.patch \ file://0008-meta-browser-Pass-no-static-libstdc-to-gen.py.patch \ file://0009-meta-browser-IWYU-Add-includes-for-size_t-and-int64_.patch \ file://0010-meta-browser-BUILD-do-not-specify-march-on-arm.patch \ file://0011-meta-browser-Avoid-parenthesized-initialization-of-a.patch \ file://0012-meta-browser-Fix-constexpr-variable-cannot-have-non-.patch \ file://0013-meta-browser-Add-missing-typename-s.patch \ file://0014-meta-browser-Avoid-std-ranges-find_if.patch \ file://0015-meta-browser-Avoid-capturing-structured-bindings.patch \ file://0016-meta-browser-Delete-compiler-options-not-available-i.patch \ file://0017-meta-browser-Don-t-pass-disable-auto-upgrade-debug-i.patch \ file://0018-meta-browser-Fix-undefined-symbol-PaintOpWriter-Seri.patch \ file://0019-upstream-Initialize-ServerCvc-with-designated-initia.patch \ file://0020-M118-fix-Don-t-look-for-depot_tools-in-chrommium-s-t.patch \ file://0021-M118-fix-Add-multiple-missing-includes.patch \ file://0022-M118-fix-Fix-aggregate-initialization-in-trace_log.patch \ file://0023-M118-fix-Add-missing-typename-keyword-in-multiple-st.patch \ file://0024-M118-fix-Fix-comparison-in-HostResolverCache.patch \ file://0025-M118-fix-Avoid-using-std-ranges-any_of-find_if-none_.patch \ file://0026-M118-fix-Add-deleted-constructors-operators.patch \ file://0027-M118-fix-Initialize-percentages-member-on-blink-Font.patch \ file://0028-M118-fix-Don-t-delete-ZstdSourceStream-copy-move-cto.patch \ file://0029-M118-fix-Fix-issue-with-structured-bindinds-captured.patch \ file://0030-M118-fix-Only-default-arm_use_neon-to-true-if-its-va.patch \ file://0031-M118-fix-Add-a-way-to-set-different-lib-paths-host-a.patch \ file://0032-M118-fix-zlib-Fix-arm-build.patch \ file://0033-M118-fix-Fix-skia-linker-issues-for-arm-neon.patch \ file://0034-v8-qemu-wrapper.patch \ \ git://bitbucket.org/chromiumembedded/cef.git;branch=${BRANCH};protocol=https;rev=${SRCREV};name=cef;destsuffix=chromium-${CHROMIUM_VERSION}/cef \ file://0001-Add-an-option-to-use-an-output-directory-outside-src.patch;patchdir=cef \ file://0002-Add-an-option-to-override-the-default-distrib-direct.patch;patchdir=cef \ file://0003-Add-an-option-to-use-an-alternative-base-output-dire.patch;patchdir=cef \ file://0004-Add-an-option-to-bypass-sysroot-checking-and-force.patch;patchdir=cef \ file://0005-Add-AGL-wayland-window-related-calls.patch;patchdir=cef \ file://0006-Add-a-method-to-check-if-the-agl-window-is-configure.patch;patchdir=cef \ file://0007-Add-the-SetActivateRegion-method.patch;patchdir=cef \ file://0008-Allow-passing-the-app_id-on-widget-creation.patch;patchdir=cef \ file://0009-Update-generated-api.patch;patchdir=cef \ file://0010-Make-patcher-work-outside-a-git-checkout.patch;patchdir=cef \ file://0011-Avoid-the-RuntimeError-dictionary-changed-size-durin.patch;patchdir=cef \ " SRC_URI[sha256sum] = "741c5528a151bc364999969077a13d7a283cfd0eaf34adf47de667a34e5e58ff" CHROMIUM_DIR = "${WORKDIR}/chromium-${CHROMIUM_VERSION}" CEF_DIR = "${CHROMIUM_DIR}/cef" DEPOT_TOOLS_DIR="${STAGING_DIR_NATIVE}${datadir}/depot_tools" S = "${CHROMIUM_DIR}" B = "${WORKDIR}/build" OUT_PATH = "${B}/out/Release_GN_${GN_TARGET_ARCH_NAME}" DIST_PATH = "${OUT_PATH}/dist/cef-minimal_${GN_TARGET_ARCH_NAME}" CEF_DATA_PATH = "${datadir}/cef" DEPENDS:append = " ca-certificates-native curl clang clang-native gperf-native dbus libcxx libcxx-native libpng libxslt jpeg jpeg-native compiler-rt libxkbcommon nss nss-native atk at-spi2-atk libdrm pango cairo virtual/egl qemu-native pciutils glib-2.0 pkgconfig-native pulseaudio xz-native compiler-rt compiler-rt-native expat-native" do_sync[depends] += "depot-tools-wam-native:do_populate_sysroot" do_configure[depends] += "depot-tools-wam-native:do_populate_sysroot" do_compile[depends] += "depot-tools-wam-native:do_populate_sysroot" # needs to fetch a font package do_configure[network] = "1" GN_UNBUNDLE_LIBS = " libjpeg libpng libxslt" # gn defaults from CEF wiki, except for use_sysroot GN_DEFINES = "use_sysroot=false \ symbol_level=0 \ is_cfi=false \ use_thin_lto=false \ " # Disable GTK and prevent cef from # building its gtk demos GN_DEFINES:append = " \ use_gtk=false \ cef_use_gtk=false \ " GN_DEFINES:append = " \ treat_warnings_as_errors=false \ is_component_build=false \ use_cups=false \ use_kerberos=false \ use_ozone=true \ use_xkbcommon=true \ use_wayland_gbm=true \ use_gnome_keyring=false \ enable_remoting=false \ enable_js_type_check=false \ " # ozone options GN_DEFINES:append = " \ use_ozone=true \ ozone_auto_platforms=false \ ozone_platform_headless=true \ ozone_platform_wayland=true \ ozone_platform_x11=false \ use_system_minigbm=true \ use_system_libdrm=true \ use_system_libwayland=false \ use_system_libffi=true \ " GN_DEFINES:append = " \ dcheck_always_on=false \
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

# Enable support for AR9271
SRC_URI_append = " file://ath9k_htc.cfg"

# Enable support for Bluetooth HCI USB devices
SRC_URI_append = " file://btusb.cfg"

# Enable support for Bluetooth HCI USB devices
SRC_URI_append = " file://btusb.cfg"

# Enable support for HID multitouch
SRC_URI_append = " file://hid.cfg"

# Enable support for RTLSDR
SRC_URI_append = " file://rtl_sdr.cfg"

# Set security default to SMACK
SRC_URI_append = " file://smack.cfg"
SRC_URI_append = " file://smack-default-lsm.cfg"

# returns all the elements from the src uri that are .cfg files
def find_cfgs(d):
    sources=src_patches(d, True)
    sources_list=[]
    for s in sources:
        if s.endswith('.cfg'):
            sources_list.append(s)

    return sources_list

do_configure_prepend () { 
    cp -a ${WORKDIR}/defconfig .config
    merge_config.sh -m .config ${@" ".join(find_cfgs(d))} 
}
nload a few dependencies. Check the current chromium DEPS file when # upgrading to a new milestone. vpython3 third_party/depot_tools/download_from_google_storage.py --no_resume --extract --no_auth --bucket chromium-fonts -s third_party/test_fonts/test_fonts.tar.gz.sha1 vpython3 third_party/depot_tools/download_from_google_storage.py --no_resume --extract --no_auth --bucket chromium-nodejs/16.13.0 -s third_party/node/linux/node-linux-x64.tar.gz.sha1 vpython3 tools/rust/update_rust.py cd ${S}/cef python3 tools/gclient_hook.py --base-out-path ${B} --bypass-sysroot-check } do_compile[progress] = "outof:^\[(\d+)/(\d+)\]\s+" do_compile () { if [ ! -f ${OUT_PATH}/build.ninja ]; then do_configure fi export PATH="${DEPOT_TOOLS_DIR}:$PATH" export PATH="$PATH:${S}/third_party/ninja" ninja ${PARALLEL_MAKE} -C ${OUT_PATH} libcef chrome_sandbox } do_install () { cd ${S}/cef python3 tools/make_distrib.py --output-dir ${OUT_PATH}/dist \ --dist-path-name cef-minimal \ --base-out-path ${B} \ --no-docs \ --no-symbols \ --no-archive \ --ninja-build \ --minimal \ --${GN_TARGET_ARCH_NAME}-build \ --ozone install -d ${D}${CEF_DATA_PATH} cp -R --no-dereference --preserve=mode,links -v ${DIST_PATH}/* ${D}${CEF_DATA_PATH} # TODO(rzanoni): Follow the wiki instructions to install the sandbox } # TODO: fix QA issues, libraries in the wrong location FILES:${PN} += " \ ${CEF_DATA_PATH} \ " INSANE_SKIP:${PN} += "libdir" PROVIDES:${PN} += "cef"