Skip to content

Commit b251177

Browse files
committed
chromium: split -wayland out
The wayland dependency on the ozone patches holds back the x11 version. By splitting out the wayland-specific parts into its own recipe, each can target separate versions. Signed-off-by: Trevor Woerner <twoerner@gmail.com>
1 parent 393d2aa commit b251177

32 files changed

+585
-52
lines changed

recipes-browser/chromium/chromium-browser.inc

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
# Recipe files have to perform the following tasks after including this file:
2-
# 1) Add patches to SRC_URI. Version specific patches should be contained in a
3-
# "chromium-XX" subdirectory, where XX is the major version. There are also
4-
# patches that are shared amongst versions but may one day no longer be
5-
# needed. These do not belong in such a subdirectory, but still need to be
6-
# explicitely be added. Do NOT add ozone-wayland patches to SRC_URI here!
2+
# 1) Add patches to SRC_URI. Platform-specific patches should be contained in
3+
# either "chromium-x11" or "chromium-wayland". There are also patches that
4+
# are shared amongst platforms but may one day no longer be needed. These
5+
# do not belong in such a subdirectory, but still need to be explicitely be
6+
# added. Do NOT add ozone-wayland patches to SRC_URI here!
77
# 2) Add md5sum and sha256sum hashes of the tarball.
88
# 3) Add ozone-wayland patches to the OZONE_WAYLAND_EXTRA_PATCHES variable.
9-
# The rule with the chromium-XX subdirectory also applies here.
109
# 4) Set the OZONE_WAYLAND_GIT_BRANCH and OZONE_WAYLAND_GIT_SRCREV values.
1110
# 5) Optionally, set values for these variables:
1211
# * OZONE_WAYLAND_PATCH_FILE_GLOB
1312
# * OZONE_WAYLAND_GIT_DESTSUFFIX
14-
# * CHROMIUM_X11_DEPENDS
1513
# * CHROMIUM_X11_GYP_DEFINES
16-
# * CHROMIUM_WAYLAND_DEPENDS
1714
# * CHROMIUM_WAYLAND_GYP_DEFINES
1815

1916
include chromium.inc
@@ -22,13 +19,16 @@ DESCRIPTION = "Chromium browser"
2219
DEPENDS += "libgnome-keyring"
2320

2421
SRC_URI = "\
25-
http://gsdview.appspot.com/chromium-browser-official/${P}.tar.xz \
22+
http://gsdview.appspot.com/chromium-browser-official/chromium-${PV}.tar.xz \
2623
file://include.gypi \
2724
file://oe-defaults.gypi \
2825
file://google-chrome \
2926
file://google-chrome.desktop \
3027
"
3128

29+
S = "${WORKDIR}/chromium-${PV}"
30+
BPN = "chromium"
31+
3232

3333
# PACKAGECONFIG options
3434
# ^^^^^^^^^^^^^^^^^^^^^
@@ -121,9 +121,7 @@ OZONE_WAYLAND_EXTRA_PATCHES ?= ""
121121

122122
# These are present as their own variables, since they have changed between versions
123123
# a few times in the past already; making them variables makes it easier to handle that
124-
CHROMIUM_X11_DEPENDS ?= ""
125124
CHROMIUM_X11_GYP_DEFINES ?= ""
126-
CHROMIUM_WAYLAND_DEPENDS ?= ""
127125
CHROMIUM_WAYLAND_GYP_DEFINES ?= ""
128126

129127

@@ -134,12 +132,6 @@ CHROMIUM_EXTRA_ARGS ?= " \
134132
${@bb.utils.contains('PACKAGECONFIG', 'kiosk-mode', '--start-fullscreen --kiosk --no-first-run', '', d)} \
135133
"
136134

137-
SRC_URI += "\
138-
${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \
139-
${@oe.utils.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}', '', d)} \
140-
"
141-
142-
143135
# Some sanity checks.
144136
python do_check_variables() {
145137
CHROMIUM_BUILD_TYPE = d.getVar('CHROMIUM_BUILD_TYPE', True)
@@ -158,7 +150,7 @@ python do_check_variables() {
158150
if (CHROMIUM_ENABLE_WAYLAND == '1'):
159151
bb.plain("INFO: Chromium has been configured with Wayland support (ozone-wayland). Build type is \'%s\'" %CHROMIUM_BUILD_TYPE)
160152
else:
161-
bb.plain("INFO: Chromium has been configured without Wayland support. Build type is \'%s\'" %CHROMIUM_BUILD_TYPE)
153+
bb.plain("INFO: Chromium has been configured for X11. Build type is \'%s\'" %CHROMIUM_BUILD_TYPE)
162154
}
163155
addtask check_variables before do_fetch
164156

@@ -191,6 +183,7 @@ EXTRA_OEGYP = " \
191183
-Dclang=0 \
192184
-Dhost_clang=0 \
193185
-Ddisable_fatal_linker_warnings=1 \
186+
-Dv8_use_external_startup_data=0 \
194187
-Dlinux_use_bundled_gold=0 \
195188
-Dlinux_use_bundled_binutils=0 \
196189
${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-Dlinux_use_gold_flags=1', '-Dlinux_use_gold_flags=0', d)} \
@@ -203,10 +196,8 @@ EXTRA_OEGYP = " \
203196

204197
python() {
205198
if d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1':
206-
d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_WAYLAND_DEPENDS', True))
207199
d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_WAYLAND_GYP_DEFINES', True))
208200
else:
209-
d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_X11_DEPENDS', True))
210201
d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_X11_GYP_DEFINES', True))
211202
}
212203

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
include chromium-browser.inc
2+
3+
DEPENDS += "wayland libxkbcommon"
4+
5+
SRC_URI += "\
6+
file://chromium-wayland/add_missing_stat_h_include.patch \
7+
file://chromium-wayland/0003-Remove-hard-coded-values-for-CC-and-CXX.patch \
8+
file://chromium-wayland/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch \
9+
file://chromium-wayland/0005-Override-root-filesystem-access-restriction.patch \
10+
file://chromium-wayland/0006-Remove-GBM-support-from-wayland.gyp.patch \
11+
file://chromium-wayland/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch \
12+
file://chromium-wayland/0011-Replace-readdir_r-with-readdir.patch \
13+
file://chromium-wayland/remove-Werror.patch \
14+
${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \
15+
${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-wayland/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
16+
${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-wayland/0002-Disable-API-keys-info-bar.patch', '', d)} \
17+
"
18+
19+
LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d"
20+
SRC_URI[md5sum] = "0534981cc21efcd11e64b67b85854420"
21+
SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f680dbc8"
22+
23+
OZONE_WAYLAND_GIT_BRANCH = "Milestone-SouthSister"
24+
OZONE_WAYLAND_GIT_SRCREV = "c605505044af3345a276abbd7c29fd53db1dea40"
25+
26+
# Component build is unsupported in ozone-wayland for Chromium 48
27+
python() {
28+
if (d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1'):
29+
if bb.utils.contains('PACKAGECONFIG', 'component-build', True, False, d):
30+
bb.fatal("Chromium 48 Wayland version cannot be built in component-mode")
31+
}
32+
33+
CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1 use_xkbcommon=1"

0 commit comments

Comments
 (0)