<commit_before>include chromium-browser.inc

DEPENDS += "wayland libxkbcommon"

SRC_URI += "\
        file://chromium-wayland/add_missing_stat_h_include.patch \
        file://0003-Remove-hard-coded-values-for-CC-and-CXX.patch \
        file://0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch \
        file://0005-Override-root-filesystem-access-restriction.patch \
	file://chromium-wayland/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch \
        file://chromium-wayland/0011-Replace-readdir_r-with-readdir.patch \
        file://chromium-wayland/remove-Werror.patch \
        ${<EMAIL>('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \
        ${<EMAIL>('PACKAGECONFIG', 'ignore-lost-context', 'file://0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
"

LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d"
SRC_URI[md5sum] = "0534981cc21efcd11e64b67b85854420"
SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f680dbc8"

OZONE_WAYLAND_GIT_BRANCH = "Milestone-SouthSister"
OZONE_WAYLAND_GIT_SRCREV = "c605505044af3345a276abbd7c29fd53db1dea40"

SRC_URI += "${@base_conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'git://github.com/01org/ozone-wayland.git;destsuffix=${OZONE_WAYLAND_GIT_DESTSUFFIX};branch=${OZONE_WAYLAND_GIT_BRANCH};rev=${OZONE_WAYLAND_GIT_SRCREV} file://chromium-wayland/0006-Remove-GBM-support-from-wayland.gyp.patch', '', d)}"

# Component build is unsupported in ozone-wayland for Chromium 48
python() {
    if (d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1'):
        if bb.utils.contains('PACKAGECONFIG', 'component-build', True, False, d):
            bb.fatal("Chromium 48 Wayland version cannot be built in component-mode")
    else:
        raise bb.parse.SkipPackage("CHROMIUM_ENABLE_WAYLAND isn't enabled")
}

CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1 use_xkbcommon=1"<commit_msg>chromium-wayland: always enable CHROMIUM_ENABLE_WAYLAND flag<commit_after>CHROMIUM_ENABLE_WAYLAND = "1"

include chromium-browser.inc

DEPENDS += "wayland libxkbcommon"

SRC_URI += "\
        file://chromium-wayland/add_missing_stat_h_include.patch \
        file://0003-Remove-hard-coded-values-for-CC-and-CXX.patch \
        file://0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch \
        file://0005-Override-root-filesystem-access-restriction.patch \
	file://chromium-wayland/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch \
        file://chromium-wayland/0011-Replace-readdir_r-with-readdir.patch \
        file://chromium-wayland/remove-Werror.patch \
        <EMAIL>.contains('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \
        ${<EMAIL>('PACKAGECONFIG', 'ignore-lost-context', 'file://0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
"

LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d"
SRC_URI[md5sum] = "0534981cc21efcd11e64b67b85854420"
SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f680dbc8"

OZONE_WAYLAND_GIT_BRANCH = "Milestone-SouthSister"
OZONE_WAYLAND_GIT_SRCREV = "c605505044af3345a276abbd7c29fd53db1dea40"

SRC_URI += "git://github.com/01org/ozone-wayland.git;destsuffix=${OZONE_WAYLAND_GIT_DESTSUFFIX};branch=${OZONE_WAYLAND_GIT_BRANCH};rev=${OZONE_WAYLAND_GIT_SRCREV} file://chromium-wayland/0006-Remove-GBM-support-from-wayland.gyp.patch"

# Component build is unsupported in ozone-wayland for Chromium 48
python() {
    if not bb.utils.contains('DISTRO_FEATURES', 'wayland', True, False, d):
        raise bb.parse.SkipPackage("Wayland is not available")
    if bb.utils.contains('PACKAGECONFIG', 'component-build', True, False, d):
        bb.fatal("Chromium 48 Wayland version cannot be built in component-mode")
}

CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1 use_xkbcommon=1"
{'fraction_non_alphanumeric': 0.14068825910931174, 'fraction_numerical': 0.07515182186234817, 'mean_word_length': 4.971299093655589, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1689627', 'n_tokens_mistral': 1743, 'n_tokens_neox': 1551, 'n_words': 161}