Set CHROMIUM_ENABLE_WAYLAND flag in chromium-wayland recipe
PATCH 1/3 Set CHROMIUM_ENABLE_WAYLAND flag in chromium-wayland recipe
It makes no sense to trigger a build of chromium-wayland and not enable CHROMIUM_ENABLE_WAYLAND, so we are doing it directly in the recipe now.
We are allowed to remove some conditionals, now we know the value of the flag beforehand.
--- recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb +5 -6
@@ -1,3 +1,5 @@ +CHROMIUM_ENABLE_WAYLAND = "1" + include chromium-browser.inc DEPENDS += "wayland libxkbcommon"
@@ -21,15 +23,12 @@ SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f6 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)}" +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 (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") + 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"
Signature · 1 line
2.1.4
PATCH 2/3 Disable CHROMIUM_ENABLE_WAYLAND in the x11 recipe
Running the chromium_*.bb recipe with CHROMIUM_ENABLE_WAYLAND on was crashing because it missed some steps that are performed in the chromium-wayland recipe. We remove one possible failure point.
--- recipes-browser/chromium/chromium_52.0.2743.76.bb | 2 ++ 1 file changed, 2 insertions(+)
recipes-browser/chromium/chromium_52.0.2743.76.bb +2 -0
@@ -1,3 +1,5 @@ +CHROMIUM_ENABLE_WAYLAND = "0" + include chromium-browser.inc DEPENDS += "xextproto gtk+ libxi libxss"
Signature · 1 line
2.1.4
PATCH 3/3 Remove conditional detection of CHROMIUM_ENABLE_WAYLAND
In reply to Jacobo Aragunde PérezIt can be a source of problems, because you must have chosen the correct recipe to build the wayland or x11 version of chromium.
--- recipes-browser/chromium/chromium-browser.inc | 6 ------ 1 file changed, 6 deletions(-)
recipes-browser/chromium/chromium-browser.inc +0 -6
@@ -102,12 +102,6 @@ PACKAGECONFIG[kiosk-mode] = "" PACKAGECONFIG[proprietary-codecs] = "" -# Conditionally add ozone-wayland and its patches to the Chromium sources -# You can override this by setting CHROMIUM_ENABLE_WAYLAND=1 or CHROMIUM_ENABLE_WAYLAND=0 in local.conf -CHROMIUM_ENABLE_WAYLAND ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '0', \ - bb.utils.contains('DISTRO_FEATURES', 'wayland', '1', \ - '0', d),d)}" - # ozone-wayland will be cloned into a directory with this name OZONE_WAYLAND_GIT_DESTSUFFIX ?= "ozone-wayland-git" # Use glob to filter out the patches that shall be applied against ozone-wayland.
Signature · 1 line
2.1.4
Quoted 30 lines · Jacobo Aragunde Pérez
It makes no sense to trigger a build of chromium-wayland and not enable
CHROMIUM_ENABLE_WAYLAND, so we are doing it directly in the recipe now.We are allowed to remove some conditionals, now we know the value of the flag beforehand.
Signed-off-by Jacobo Aragunde Pérez <[email protected]>--- recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb +3
-1@@ -1,3 +1,5 @@ +CHROMIUM_ENABLE_WAYLAND = "1" + include chromium-browser.inc DEPENDS += "wayland libxkbcommon"@@ -21,15 +23,12 @@ SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f6 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)}" +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
recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f6 · line 33
Quoted 10 lines
recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb +2
-5python() { - 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") + if bb.utils.contains('PACKAGECONFIG', 'component-build', True, False, d): + bb.fatal("Chromium 48 Wayland version cannot be built in component-mode") }
you still need to skip parsing this recipe if user has not enabled wayland
Quoted 2 lines
recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb +0
-0CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1 use_xkbcommon=1"
Quoted 32 lines · Khem Raj
Quoted 29 lines · Jacobo Aragunde Pérez
It makes no sense to trigger a build of chromium-wayland and not enable
CHROMIUM_ENABLE_WAYLAND, so we are doing it directly in the recipe now.We are allowed to remove some conditionals, now we know the value of the flag beforehand.
Signed-off-by Jacobo Aragunde Pérez <[email protected]>--- recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb +3
-1@@ -1,3 +1,5 @@ +CHROMIUM_ENABLE_WAYLAND = "1" + include chromium-browser.inc DEPENDS += "wayland libxkbcommon"@@ -21,15 +23,12 @@ SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f6 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)}" +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"
Quoted 15 lines
recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f6 · line 33
Quoted 11 lines
recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb +2
-5# 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") + if bb.utils.contains('PACKAGECONFIG', 'component-build', True, False, d): + bb.fatal("Chromium 48 Wayland version cannot be built in component-mode") }you still need to skip parsing this recipe if user has not enabled wayland
Will do, thanks for the tip.
Quoted 4 lines
recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f6 · line 34
Quoted 3 lines
recipes-browser/chromium/chromium-wayland_48.0.2548.0.bb +0
-0CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1 use_xkbcommon=1"
Best,
Signature · 2 lines
Jacobo Aragunde Software Engineer at Igalia