All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-browser][PATCH v2 1/3] chromium: Replace deprecated base_* wrapper calls
@ 2016-05-08 12:20 Carlos Rafael Giani
  2016-05-08 12:20 ` [meta-browser][PATCH v2 2/3] chromium: Create chromium-browser.inc to simplify upgrades Carlos Rafael Giani
  2016-05-08 12:20 ` [meta-browser][PATCH v2 3/3] chromium: Upgrade to version 48.0.2548.0 Carlos Rafael Giani
  0 siblings, 2 replies; 7+ messages in thread
From: Carlos Rafael Giani @ 2016-05-08 12:20 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 recipes-browser/chromium/cef3_280796.bb           |  2 +-
 recipes-browser/chromium/chromium_40.0.2214.91.bb | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/recipes-browser/chromium/cef3_280796.bb b/recipes-browser/chromium/cef3_280796.bb
index dab721e..4bfa783 100644
--- a/recipes-browser/chromium/cef3_280796.bb
+++ b/recipes-browser/chromium/cef3_280796.bb
@@ -36,7 +36,7 @@ export BUILD_TARGET_ARCH="${TARGET_ARCH}"
 export GYP_DEFINES="${GYP_ARCH_DEFINES} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"
 
 EXTRA_OEGYP =	" \
-    ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '-Ddisable_fatal_linker_warnings=1', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-Ddisable_fatal_linker_warnings=1', '', d)} \
 "
 
 do_configure_prepend() {
diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb
index 25489c1..48a5a9e 100644
--- a/recipes-browser/chromium/chromium_40.0.2214.91.bb
+++ b/recipes-browser/chromium/chromium_40.0.2214.91.bb
@@ -97,8 +97,8 @@ CHROMIUM_EXTRA_ARGS ?= " \
 
 # 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 ??= "${@base_contains('DISTRO_FEATURES', 'x11', '0', \
-                     base_contains('DISTRO_FEATURES', 'wayland', '1', \
+CHROMIUM_ENABLE_WAYLAND ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '0', \
+                     bb.utils.contains('DISTRO_FEATURES', 'wayland', '1', \
                      '0', d),d)}"
 # Some sanity checks.
 python do_check_variables() {
@@ -125,11 +125,11 @@ addtask check_variables before do_fetch
 OZONE_WAYLAND_GIT_DESTSUFFIX = "ozone-wayland-git"
 OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
 OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
-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}', '', d)}"
+SRC_URI += "${@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)}"
 OZONE_WAYLAND_PATCH_FILE_GLOB = "*.patch"
 
-do_unpack[postfuncs] += "${@base_conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'copy_ozone_wayland_files', '', d)}"
-do_patch[prefuncs] += "${@base_conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'add_ozone_wayland_patches', '', d)}"
+do_unpack[postfuncs] += "${@oe.utils.conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'copy_ozone_wayland_files', '', d)}"
+do_patch[prefuncs] += "${@oe.utils.conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'add_ozone_wayland_patches', '', d)}"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=537e0b52077bf0a616d0a0c8a79bc9d5"
 SRC_URI[md5sum] = "1f5093bd7e435fdebad070e74bfb3438"
@@ -183,8 +183,8 @@ EXTRA_OEGYP =	" \
 	-Dclang=0 \
 	-Dhost_clang=0 \
 	-Ddisable_fatal_linker_warnings=1 \
-	${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_binary=0', d)} \
-	${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_flags=0', d)} \
+	${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_binary=0', d)} \
+	${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_flags=0', d)} \
 	-I ${WORKDIR}/oe-defaults.gypi \
 	-I ${WORKDIR}/include.gypi \
 	${@bb.utils.contains('PACKAGECONFIG', 'component-build', '-I ${WORKDIR}/component-build.gypi', '', d)} \
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-browser][PATCH v2 2/3] chromium: Create chromium-browser.inc to simplify upgrades
  2016-05-08 12:20 [meta-browser][PATCH v2 1/3] chromium: Replace deprecated base_* wrapper calls Carlos Rafael Giani
@ 2016-05-08 12:20 ` Carlos Rafael Giani
  2016-05-08 12:20 ` [meta-browser][PATCH v2 3/3] chromium: Upgrade to version 48.0.2548.0 Carlos Rafael Giani
  1 sibling, 0 replies; 7+ messages in thread
From: Carlos Rafael Giani @ 2016-05-08 12:20 UTC (permalink / raw)
  To: openembedded-devel

This eases the chromium browser upgrade process while ensuring that the
chromium embedded framework is still supported. With this new structure,
chromium.inc contains common code for cef3 and the browser, while
chromium-browser.inc contains common code for browser releases (and itself
includes chromium.inc). The actual .bb files then mainly set several
values (and may contain release specific functions).

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 recipes-browser/chromium/chromium-browser.inc     | 241 ++++++++++++++++++++++
 recipes-browser/chromium/chromium.inc             |  15 +-
 recipes-browser/chromium/chromium_40.0.2214.91.bb | 209 +------------------
 3 files changed, 249 insertions(+), 216 deletions(-)
 create mode 100644 recipes-browser/chromium/chromium-browser.inc

diff --git a/recipes-browser/chromium/chromium-browser.inc b/recipes-browser/chromium/chromium-browser.inc
new file mode 100644
index 0000000..c6de2ec
--- /dev/null
+++ b/recipes-browser/chromium/chromium-browser.inc
@@ -0,0 +1,241 @@
+# Recipe files have to perform the following tasks after including this file:
+# 1) Add patches to SRC_URI. Version specific patches should be contained in a
+#    "chromium-XX" subdirectory, where XX is the major version. There are also
+#    patches that are shared amongst versions but may one day no longer be
+#    needed (like unistd2.patch). These do not belong in such a subdirectory,
+#    but still need to be explicitely be added. Do NOT add ozone-wayland patches
+#    to SRC_URI here!
+# 2) Add md5sum and sha256sum hashes of the tarball.
+# 3) Add ozone-wayland patches to the OZONE_WAYLAND_EXTRA_PATCHES variable.
+#    The rule with the chromium-XX subdirectory also applies here.
+# 4) Set the OZONE_WAYLAND_GIT_BRANCH and OZONE_WAYLAND_GIT_SRCREV values.
+# 5) Optionally, set values for these variables:
+#    * OZONE_WAYLAND_PATCH_FILE_GLOB
+#    * OZONE_WAYLAND_GIT_DESTSUFFIX
+#    * CHROMIUM_X11_DEPENDS
+#    * CHROMIUM_X11_GYP_DEFINES
+#    * CHROMIUM_WAYLAND_DEPENDS
+#    * CHROMIUM_WAYLAND_GYP_DEFINES
+
+include chromium.inc
+
+DESCRIPTION = "Chromium browser"
+DEPENDS += "libgnome-keyring"
+
+SRC_URI = "\
+        http://gsdview.appspot.com/chromium-browser-official/${P}.tar.xz \
+        file://include.gypi \
+        file://oe-defaults.gypi \
+        file://google-chrome \
+        file://google-chrome.desktop \
+"
+
+
+# PACKAGECONFIG options
+# ^^^^^^^^^^^^^^^^^^^^^
+# * use-egl: (on by default)
+#       Without this packageconfig, the Chromium build will use GLX for
+#       creating an OpenGL context in X11, and regular OpenGL for painting
+#       operations. Neither are desirable on embedded platforms. With this
+#       packageconfig, EGL and OpenGL ES 2.x are used instead.
+#
+# * disable-api-keys-info-bar: (off by default)
+#       This disables the info bar that warns: "Google API keys are missing".
+#       With some builds, missing API keys are considered OK, so the bar needs
+#       to go. Conversely, if Chromium is compiled with this option off and
+#       the user wishes to disable the warning, the following lines can be
+#       added to the "google-chrome" script (see patchset) before the
+#       chromium binary is called:
+#           export GOOGLE_API_KEY="no"
+#           export GOOGLE_DEFAULT_CLIENT_ID="no"
+#           export GOOGLE_DEFAULT_CLIENT_SECRET="no"
+#
+# * component-build: (off by default)
+#       Enables component build mode. By default, all of Chromium (with the
+#       exception of FFmpeg) is linked into one big binary. The linker step
+#       requires at least 8 GB RAM. Component mode was created to facilitate
+#       development and testing, since with it, there is not one big binary;
+#       instead, each component is linked to a separate shared object. Use
+#       component mode for development, testing, and in case the build machine
+#       is not a 64-bit one, or has less than 8 GB RAM.
+#
+# * ignore-lost-context: (off by default)
+#       There is a flaw in the HTML Canvas specification. When the canvas'
+#       backing store is some kind of hardware resource like an OpenGL
+#       texture, this resource might get lost. In case of OpenGL textures,
+#       this happens when the OpenGL context gets lost. The canvas should then
+#       be repainted, but nothing in the Canvas standard reflects that. This
+#       packageconfig is to be used if the underlying OpenGL (ES) drivers do
+#       not lose the context, or if losing the context is considered okay
+#       (note that canvas contents can vanish then).
+#
+# * impl-side-painting: (off by default)
+#       This is a new painting mechanism. Still in
+#       development stages, it can improve performance See
+#       http://www.chromium.org/developers/design-documents/impl-side-painting
+#       for more.
+#
+# * kiosk-mode: (off by default)
+#       Enable this option if you want your browser to start up full-screen,
+#       without any menu bars, without any clutter, and without any initial
+#       start-up indicators.
+#
+# * proprietary-codecs: (off by default)
+#       Enable this option if you want to add support for additional proprietary
+#       codecs, most notably MPEG standards (h.264, h.265, MP4, MP3, AAC, MPEG-2 ..)
+
+PACKAGECONFIG ??= "use-egl"
+
+# this makes sure the dependencies for the EGL mode are present; otherwise, the configure scripts
+# automatically and silently fall back to GLX
+PACKAGECONFIG[use-egl] = ",,virtual/egl virtual/libgles2"
+
+# Empty PACKAGECONFIG options listed here to avoid warnings.
+# The .bb file should use these to conditionally add patches
+# and command-line switches (extra dependencies should not
+# be necessary but are OK to add).
+PACKAGECONFIG[disable-api-keys-info-bar] = ""
+PACKAGECONFIG[component-build] = ""
+PACKAGECONFIG[ignore-lost-context] = ""
+PACKAGECONFIG[impl-side-painting] = ""
+PACKAGECONFIG[use-egl] = ""
+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.
+# Useful if some of the patches would break the build.
+OZONE_WAYLAND_PATCH_FILE_GLOB ?= "*.patch"
+
+# Variable for extra ozone-wayland patches, typically extended by BSP layer .bbappends
+# IMPORTANT: do not simply add extra ozone-wayland patches to the SRC_URI in a
+# .bbappend, since the base ozone-wayland patches need to be applied first (see below)
+OZONE_WAYLAND_EXTRA_PATCHES ?= ""
+
+
+# These are present as their own variables, since they have changed between versions
+# a few times in the past already; making them variables makes it easier to handle that
+CHROMIUM_X11_DEPENDS ?= ""
+CHROMIUM_X11_GYP_DEFINES ?= ""
+CHROMIUM_WAYLAND_DEPENDS ?= ""
+CHROMIUM_WAYLAND_GYP_DEFINES ?= ""
+
+
+CHROMIUM_EXTRA_ARGS ?= " \
+        ${@bb.utils.contains('PACKAGECONFIG', 'use-egl', '--use-gl=egl', '', d)} \
+        ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', '--gpu-no-context-lost', '', d)} \
+        ${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', '--enable-gpu-rasterization --enable-impl-side-painting', '', d)} \
+        ${@bb.utils.contains('PACKAGECONFIG', 'kiosk-mode', '--start-fullscreen --kiosk --no-first-run', '', d)} \
+"
+
+SRC_URI += "\
+        ${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \
+        ${@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)} \
+"
+
+
+# Some sanity checks.
+python do_check_variables() {
+    CHROMIUM_BUILD_TYPE = d.getVar('CHROMIUM_BUILD_TYPE', True)
+    CHROMIUM_ENABLE_WAYLAND = d.getVar('CHROMIUM_ENABLE_WAYLAND', True)
+    DISTRO_FEATURES = d.getVar("DISTRO_FEATURES", True).split()
+    if CHROMIUM_BUILD_TYPE not in ['Release', 'Debug']:
+        bb.fatal("Wrong value for CHROMIUM_BUILD_TYPE. Please set it either to \'Release\' or to \'Debug\'")
+    if CHROMIUM_ENABLE_WAYLAND not in ['0', '1']:
+        bb.fatal("Wrong value for CHROMIUM_ENABLE_WAYLAND. Please set it to \'1\' to enable the feature or to \'0\' to disable it")
+    if ( (CHROMIUM_ENABLE_WAYLAND == '1') and ('wayland' not in DISTRO_FEATURES) ):
+        bb.warn("You have selected to build Chromium with Wayland support, but you have not enabled wayland in DISTRO_FEATURES")
+    if ( (CHROMIUM_ENABLE_WAYLAND != '1') and ('x11' not in DISTRO_FEATURES) ):
+        bb.warn("You have selected to build Chromium without Wayland support, but you have not enabled x11 in DISTRO_FEATURES")
+    # Print both on log.do_checkvariables and on the console the configuration that is selected.
+    # This useful both for throubleshooting and for checking how the build is finally configured.
+    if (CHROMIUM_ENABLE_WAYLAND == '1'):
+        bb.plain("INFO: Chromium has been configured with Wayland support (ozone-wayland). Build type is \'%s\'" %CHROMIUM_BUILD_TYPE)
+    else:
+        bb.plain("INFO: Chromium has been configured without Wayland support. Build type is \'%s\'" %CHROMIUM_BUILD_TYPE)
+}
+addtask check_variables before do_fetch
+
+do_unpack[postfuncs] += "${@oe.utils.conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'copy_ozone_wayland_files', '', d)}"
+do_patch[prefuncs] += "${@oe.utils.conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'add_ozone_wayland_patches', '', d)}"
+
+copy_ozone_wayland_files() {
+	# ozone-wayland sources must be placed in an "ozone"
+	# subdirectory in ${S} in order for the .gyp build
+	# scripts to work
+	cp -r ${WORKDIR}/ozone-wayland-git ${S}/ozone
+}
+
+python add_ozone_wayland_patches() {
+    import glob
+    srcdir = d.getVar('S', True)
+    # find all ozone-wayland patches and add them to SRC_URI
+    upstream_patches_dir = srcdir + "/ozone/patches"
+    upstream_patches = glob.glob(upstream_patches_dir + "/" + d.getVar('OZONE_WAYLAND_PATCH_FILE_GLOB', True))
+    upstream_patches.sort()
+    for upstream_patch in upstream_patches:
+        d.appendVar('SRC_URI', ' file://' + upstream_patch)
+    # then, add the extra patches to SRC_URI order matters;
+    # extra patches may depend on the base ozone-wayland ones
+    d.appendVar('SRC_URI', ' ' + d.getVar('OZONE_WAYLAND_EXTRA_PATCHES', False))
+}
+
+EXTRA_OEGYP = " \
+	-Dangle_use_commit_id=0 \
+	-Dclang=0 \
+	-Dhost_clang=0 \
+	-Ddisable_fatal_linker_warnings=1 \
+	-Dlinux_use_bundled_gold=0 \
+	-Dlinux_use_bundled_binutils=0 \
+	${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-Dlinux_use_gold_flags=1', '-Dlinux_use_gold_flags=0', d)} \
+	-I ${WORKDIR}/oe-defaults.gypi \
+	-I ${WORKDIR}/include.gypi \
+	${@bb.utils.contains('PACKAGECONFIG', 'component-build', '-I ${WORKDIR}/component-build.gypi', '', d)} \
+	${@bb.utils.contains('PACKAGECONFIG', 'proprietary-codecs', '-Dproprietary_codecs=1 -Dffmpeg_branding=Chrome', '', d)} \
+	-f ninja \
+"
+
+python() {
+    if d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1':
+        d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_WAYLAND_DEPENDS', True))
+        d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_WAYLAND_GYP_DEFINES', True))
+    else:
+        d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_X11_DEPENDS', True))
+        d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_X11_GYP_DEFINES', True))
+}
+
+do_configure_append() {
+
+	build/gyp_chromium --depth=. ${EXTRA_OEGYP}
+
+}
+
+do_compile() {
+        # build with ninja
+        ninja -C ${S}/out/${CHROMIUM_BUILD_TYPE} ${PARALLEL_MAKE} chrome chrome_sandbox
+}
+
+do_install_append() {
+
+	# Add extra command line arguments to google-chrome script by modifying
+        # the dummy "CHROME_EXTRA_ARGS" line
+        sed -i "s/^CHROME_EXTRA_ARGS=\"\"/CHROME_EXTRA_ARGS=\"${CHROMIUM_EXTRA_ARGS}\"/" ${D}${bindir}/google-chrome
+
+        # update ROOT_HOME with the root user's $HOME
+        sed -i "s#ROOT_HOME#${ROOT_HOME}#" ${D}${bindir}/google-chrome
+
+	# Always adding this libdir (not just with component builds), because the
+        # LD_LIBRARY_PATH line in the google-chromium script refers to it
+        install -d ${D}${libdir}/${BPN}/
+        if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'component-build', '', d)}" ]; then
+                install -m 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/lib/*.so ${D}${libdir}/${BPN}/
+        fi
+}
diff --git a/recipes-browser/chromium/chromium.inc b/recipes-browser/chromium/chromium.inc
index 5e8aba6..e5deac1 100644
--- a/recipes-browser/chromium/chromium.inc
+++ b/recipes-browser/chromium/chromium.inc
@@ -13,20 +13,7 @@ CHROMIUM_BUILD_TYPE ??= "Release"
 
 inherit gettext pythonnative
 
-PACKAGECONFIG ??= "use-egl"
-
-# this makes sure the dependencies for the EGL mode are present; otherwise, the configure scripts
-# automatically and silently fall back to GLX
-PACKAGECONFIG[use-egl] = ",,virtual/egl virtual/libgles2"
-
-# Additional PACKAGECONFIG options - listed here to avoid warnings
-PACKAGECONFIG[component-build] = ""
-PACKAGECONFIG[disable-api-keys-info-bar] = ""
-PACKAGECONFIG[ignore-lost-context] = ""
-PACKAGECONFIG[impl-side-painting] = ""
-PACKAGECONFIG[use-egl] = ""
-PACKAGECONFIG[kiosk-mode] = ""
-
+ARMFPABI_armv7a = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'arm_float_abi=hard', 'arm_float_abi=softfp', d)}"
 GYP_DEFINES += "${ARMFPABI} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"
 
 do_configure() {
diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb
index 48a5a9e..3966548 100644
--- a/recipes-browser/chromium/chromium_40.0.2214.91.bb
+++ b/recipes-browser/chromium/chromium_40.0.2214.91.bb
@@ -1,31 +1,6 @@
-# Recipe files have to perform the following tasks after including this file:
-# 1) Add patches to SRC_URI. Version specific patches should be contained in a
-#    "chromium-XX" subdirectory, where XX is the major version. There are also
-#    patches that are shared amongst versions but may one day no longer be
-#    needed (like unistd2.patch). These do not belong in such a subdirectory,
-#    but still need to be explicitely be added. Do NOT add ozone-wayland patches
-#    to SRC_URI here!
-# 2) Add md5sum and sha256sum hashes of the tarball.
-# 3) Add ozone-wayland patches to the OZONE_WAYLAND_EXTRA_PATCHES variable.
-#    The rule with the chromium-XX subdirectory also applies here.
-# 4) Set the OZONE_WAYLAND_GIT_BRANCH and OZONE_WAYLAND_GIT_SRCREV values.
-# 5) Optionally, set values for these variables:
-#    * OZONE_WAYLAND_PATCH_FILE_GLOB
-#    * CHROMIUM_X11_DEPENDS
-#    * CHROMIUM_X11_GYP_DEFINES
-#    * CHROMIUM_WAYLAND_DEPENDS
-#    * CHROMIUM_WAYLAND_GYP_DEFINES
+include chromium-browser.inc
 
-include chromium.inc
-DESCRIPTION = "Chromium browser"
-DEPENDS += "libgnome-keyring"
-SRC_URI = "\
-        http://gsdview.appspot.com/chromium-browser-official/${P}.tar.xz \
-        file://include.gypi \
-        file://oe-defaults.gypi \
-        ${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'file://component-build.gypi', '', d)} \
-        file://google-chrome \
-        file://google-chrome.desktop \
+SRC_URI += "\
         file://unistd-2.patch \
         file://chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch \
         file://chromium-40/add_missing_stat_h_include.patch \
@@ -33,117 +8,24 @@ SRC_URI = "\
         file://chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch \
         file://chromium-40/0003-disable-uninitialized-warning.patch \
         file://chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch \
-"
-
-# PACKAGECONFIG options
-# ^^^^^^^^^^^^^^^^^^^^^
-# * use-egl: (on by default)
-#       Without this packageconfig, the Chromium build will use GLX for
-#       creating an OpenGL context in X11, and regular OpenGL for painting
-#       operations. Neither are desirable on embedded platforms. With this
-#       packageconfig, EGL and OpenGL ES 2.x are used instead.
-#
-# * disable-api-keys-info-bar: (off by default)
-#       This disables the info bar that warns: "Google API keys are missing".
-#       With some builds, missing API keys are considered OK, so the bar needs
-#       to go. Conversely, if Chromium is compiled with this option off and
-#       the user wishes to disable the warning, the following lines can be
-#       added to the "google-chrome" script (see patchset) before the
-#       chromium binary is called:
-#           export GOOGLE_API_KEY="no"
-#           export GOOGLE_DEFAULT_CLIENT_ID="no"
-#           export GOOGLE_DEFAULT_CLIENT_SECRET="no"
-#
-# * component-build: (off by default)
-#       Enables component build mode. By default, all of Chromium (with the
-#       exception of FFmpeg) is linked into one big binary. The linker step
-#       requires at least 8 GB RAM. Component mode was created to facilitate
-#       development and testing, since with it, there is not one big binary;
-#       instead, each component is linked to a separate shared object. Use
-#       component mode for development, testing, and in case the build machine
-#       is not a 64-bit one, or has less than 8 GB RAM.
-#
-# * ignore-lost-context: (off by default)
-#       There is a flaw in the HTML Canvas specification. When the canvas'
-#       backing store is some kind of hardware resource like an OpenGL
-#       texture, this resource might get lost. In case of OpenGL textures,
-#       this happens when the OpenGL context gets lost. The canvas should then
-#       be repainted, but nothing in the Canvas standard reflects that. This
-#       packageconfig is to be used if the underlying OpenGL (ES) drivers do
-#       not lose the context, or if losing the context is considered okay
-#       (note that canvas contents can vanish then).
-#
-# * impl-side-painting: (off by default)
-#       This is a new painting mechanism. Still in
-#       development stages, it can improve performance See
-#       http://www.chromium.org/developers/design-documents/impl-side-painting
-#       for more.
-#
-# * kiosk-mode: (off by default)
-#       Enable this option if you want your browser to start up full-screen,
-#       without any menu bars, without any clutter, and without any initial
-#       start-up indicators.
-SRC_URI += "\
         ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
         ${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', 'file://chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch', '', d)} \
         ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-40/0003-Disable-API-keys-info-bar.patch', '', d)} \
 "
-CHROMIUM_EXTRA_ARGS ?= " \
-	${@bb.utils.contains('PACKAGECONFIG', 'use-egl', '--use-gl=egl', '', d)} \
-	${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', '--gpu-no-context-lost', '', d)} \
-	${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', '--enable-gpu-rasterization --enable-impl-side-painting', '', d)} \
-	${@bb.utils.contains('PACKAGECONFIG', 'kiosk-mode', '--start-fullscreen --kiosk --no-first-run', '', d)} \
-"
-
-# 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)}"
-# Some sanity checks.
-python do_check_variables() {
-    CHROMIUM_BUILD_TYPE = d.getVar('CHROMIUM_BUILD_TYPE', True)
-    CHROMIUM_ENABLE_WAYLAND = d.getVar('CHROMIUM_ENABLE_WAYLAND', True)
-    DISTRO_FEATURES = d.getVar("DISTRO_FEATURES", True).split()
-    if CHROMIUM_BUILD_TYPE not in ['Release', 'Debug']:
-        bb.fatal("Wrong value for CHROMIUM_BUILD_TYPE. Please set it either to \'Release\' or to \'Debug\'")
-    if CHROMIUM_ENABLE_WAYLAND not in ['0', '1']:
-        bb.fatal("Wrong value for CHROMIUM_ENABLE_WAYLAND. Please set it to \'1\' to enable the feature or to \'0\' to disable it")
-    if ( (CHROMIUM_ENABLE_WAYLAND == '1') and ('wayland' not in DISTRO_FEATURES) ):
-        bb.warn("You have selected to build Chromium with Wayland support, but you have not enabled wayland in DISTRO_FEATURES")
-    if ( (CHROMIUM_ENABLE_WAYLAND != '1') and ('x11' not in DISTRO_FEATURES) ):
-        bb.warn("You have selected to build Chromium without Wayland support, but you have not enabled x11 in DISTRO_FEATURES")
-    # Print both on log.do_checkvariables and on the console the configuration that is selected.
-    # This useful both for throubleshooting and for checking how the build is finally configured.
-    if (CHROMIUM_ENABLE_WAYLAND == '1'):
-        bb.plain("INFO: Chromium has been configured with Wayland support (ozone-wayland). Build type is \'%s\'" %CHROMIUM_BUILD_TYPE)
-    else:
-        bb.plain("INFO: Chromium has been configured without Wayland support. Build type is \'%s\'" %CHROMIUM_BUILD_TYPE)
-}
-addtask check_variables before do_fetch
-
-OZONE_WAYLAND_GIT_DESTSUFFIX = "ozone-wayland-git"
-OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
-OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
-SRC_URI += "${@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)}"
-OZONE_WAYLAND_PATCH_FILE_GLOB = "*.patch"
-
-do_unpack[postfuncs] += "${@oe.utils.conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'copy_ozone_wayland_files', '', d)}"
-do_patch[prefuncs] += "${@oe.utils.conditional('CHROMIUM_ENABLE_WAYLAND', '1', 'add_ozone_wayland_patches', '', d)}"
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=537e0b52077bf0a616d0a0c8a79bc9d5"
 SRC_URI[md5sum] = "1f5093bd7e435fdebad070e74bfb3438"
 SRC_URI[sha256sum] = "f72fda9ff1ea256ab911610ee532eadf8303137d431f2481d01d3d60e5e64149"
 
-# Variable for extra ozone-wayland patches, typically extended by BSP layer .bbappends
-# IMPORTANT: do not simply add extra ozone-wayland patches to the SRC_URI in a
-# .bbappend, since the base ozone-wayland patches need to be applied first (see below)
+OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
+OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
+
 OZONE_WAYLAND_EXTRA_PATCHES = " \
         file://chromium-40/0005-Remove-X-libraries-from-GYP-files.patch \
         file://chromium-40/0010-systemd-218.patch \
 "
-# using 00*.patch to skip the WebRTC patches in ozone-wayland
-# the WebRTC patches remove X11 libraries from the linker flags, which is
+# using 00*.patch to skip the WebRTC patches in ozone-wayland ThanksGiving milestone.
+# The WebRTC patches remove X11 libraries from the linker flags, which is
 # already done by another patch (see above). Furthermore, to be able to use
 # these patches, it is necessary to update the git repository in third_party/webrtc,
 # which would further complicate this recipe.
@@ -157,84 +39,7 @@ python() {
             bb.fatal("Chromium 40 Wayland version cannot be built in component-mode")
 }
 
-copy_ozone_wayland_files() {
-	# ozone-wayland sources must be placed in an "ozone"
-	# subdirectory in ${S} in order for the .gyp build
-	# scripts to work
-	cp -r ${WORKDIR}/ozone-wayland-git ${S}/ozone
-}
-
-python add_ozone_wayland_patches() {
-    import glob
-    srcdir = d.getVar('S', True)
-    # find all ozone-wayland patches and add them to SRC_URI
-    upstream_patches_dir = srcdir + "/ozone/patches"
-    upstream_patches = glob.glob(upstream_patches_dir + "/" + d.getVar('OZONE_WAYLAND_PATCH_FILE_GLOB', True))
-    upstream_patches.sort()
-    for upstream_patch in upstream_patches:
-        d.appendVar('SRC_URI', ' file://' + upstream_patch)
-    # then, add the extra patches to SRC_URI order matters;
-    # extra patches may depend on the base ozone-wayland ones
-    d.appendVar('SRC_URI', ' ' + d.getVar('OZONE_WAYLAND_EXTRA_PATCHES', False))
-}
-
-EXTRA_OEGYP =	" \
-	-Dangle_use_commit_id=0 \
-	-Dclang=0 \
-	-Dhost_clang=0 \
-	-Ddisable_fatal_linker_warnings=1 \
-	${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_binary=0', d)} \
-	${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '', '-Dlinux_use_gold_flags=0', d)} \
-	-I ${WORKDIR}/oe-defaults.gypi \
-	-I ${WORKDIR}/include.gypi \
-	${@bb.utils.contains('PACKAGECONFIG', 'component-build', '-I ${WORKDIR}/component-build.gypi', '', d)} \
-	-f ninja \
-"
-ARMFPABI_armv7a = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'arm_float_abi=hard', 'arm_float_abi=softfp', d)}"
-
-GYP_DEFINES += "${ARMFPABI} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"
-
-# These are present as their own variables, since they have changed between versions
-# a few times in the past already; making them variables makes it easier to handle that
 CHROMIUM_X11_DEPENDS = "xextproto gtk+ libxi libxss"
 CHROMIUM_X11_GYP_DEFINES = ""
 CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
 CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1"
-
-python() {
-    if d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1':
-        d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_WAYLAND_DEPENDS', True))
-        d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_WAYLAND_GYP_DEFINES', True))
-    else:
-        d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_X11_DEPENDS', True))
-        d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_X11_GYP_DEFINES', True))
-}
-
-do_configure_append() {
-
-	build/gyp_chromium --depth=. ${EXTRA_OEGYP}
-
-}
-
-do_compile() {
-        # build with ninja
-        ninja -C ${S}/out/${CHROMIUM_BUILD_TYPE} ${PARALLEL_MAKE} chrome chrome_sandbox
-}
-
-
-do_install_append() {
-
-	# Add extra command line arguments to google-chrome script by modifying
-        # the dummy "CHROME_EXTRA_ARGS" line
-        sed -i "s/^CHROME_EXTRA_ARGS=\"\"/CHROME_EXTRA_ARGS=\"${CHROMIUM_EXTRA_ARGS}\"/" ${D}${bindir}/google-chrome
-
-        # update ROOT_HOME with the root user's $HOME
-        sed -i "s#ROOT_HOME#${ROOT_HOME}#" ${D}${bindir}/google-chrome
-
-	# Always adding this libdir (not just with component builds), because the
-        # LD_LIBRARY_PATH line in the google-chromium script refers to it
-        install -d ${D}${libdir}/${BPN}/
-        if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'component-build', '', d)}" ]; then
-                install -m 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/lib/*.so ${D}${libdir}/${BPN}/
-        fi
-}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-browser][PATCH v2 3/3] chromium: Upgrade to version 48.0.2548.0
  2016-05-08 12:20 [meta-browser][PATCH v2 1/3] chromium: Replace deprecated base_* wrapper calls Carlos Rafael Giani
  2016-05-08 12:20 ` [meta-browser][PATCH v2 2/3] chromium: Create chromium-browser.inc to simplify upgrades Carlos Rafael Giani
@ 2016-05-08 12:20 ` Carlos Rafael Giani
  2016-05-18 15:04   ` Martin Jansa
  1 sibling, 1 reply; 7+ messages in thread
From: Carlos Rafael Giani @ 2016-05-08 12:20 UTC (permalink / raw)
  To: openembedded-devel

Not upgrading to M49 or M50 in this commit since this is currently the
latest version that is supported by ozone-wayland

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 ...Add-Linux-to-impl-side-painting-whitelist.patch | 39 -----------
 .../0003-disable-uninitialized-warning.patch       | 19 ------
 .../0005-Remove-X-libraries-from-GYP-files.patch   | 77 ----------------------
 .../chromium/chromium-40/0010-systemd-218.patch    | 39 -----------
 .../fix-build-error-with-GCC-in-Debug-mode.patch   | 32 ---------
 ...accelerated-Canvas-support-from-blacklist.patch | 20 ++++--
 ...0001-bignum.cc-disable-warning-from-gcc-5.patch |  4 +-
 .../0002-Disable-API-keys-info-bar.patch}          |  2 +-
 ...-image_util.cc-disable-warning-from-gcc-5.patch |  0
 ...-Remove-hard-coded-values-for-CC-and-CXX.patch} |  8 +--
 ...y-i18n_process_css_test.html-file-to-avoi.patch | 26 ++++++++
 ...erride-root-filesystem-access-restriction.patch | 30 +++++++++
 .../0006-Remove-GBM-support-from-wayland.gyp.patch | 66 +++++++++++++++++++
 ...for-glib-related-build-error-with-ozone-w.patch | 31 +++++++++
 .../0008-Fix-GCC-uninitialized-warning.patch       | 26 ++++++++
 ...9-Fix-build-errors-with-GCC-in-Debug-mode.patch | 46 +++++++++++++
 ...be-used-uninitialized-in-this-function-wa.patch | 25 +++++++
 .../add_missing_stat_h_include.patch               |  4 +-
 recipes-browser/chromium/chromium_40.0.2214.91.bb  | 45 -------------
 recipes-browser/chromium/chromium_48.0.2548.0.bb   | 43 ++++++++++++
 20 files changed, 315 insertions(+), 267 deletions(-)
 delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch
 delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch
 delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch
 delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
 delete mode 100644 recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
 rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/0001-Remove-accelerated-Canvas-support-from-blacklist.patch (71%)
 rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/0001-bignum.cc-disable-warning-from-gcc-5.patch (98%)
 rename recipes-browser/chromium/chromium/{chromium-40/0003-Disable-API-keys-info-bar.patch => chromium-48/0002-Disable-API-keys-info-bar.patch} (95%)
 rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/0002-image_util.cc-disable-warning-from-gcc-5.patch (100%)
 rename recipes-browser/chromium/chromium/{chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch => chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch} (86%)
 create mode 100644 recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch
 rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/add_missing_stat_h_include.patch (90%)
 delete mode 100644 recipes-browser/chromium/chromium_40.0.2214.91.bb
 create mode 100644 recipes-browser/chromium/chromium_48.0.2548.0.bb

diff --git a/recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch b/recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch
deleted file mode 100644
index b5916ca..0000000
--- a/recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 61cbd67e88f5e99185d7df1a05f842c58e691495 Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Sun, 21 Dec 2014 01:01:04 +0100
-Subject: [PATCH] Add Linux to impl side painting whitelist
-
-Upstream-Status: Inappropriate [enable feature]
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- gpu/config/software_rendering_list_json.cc | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc
-index ccf1460..8630d75 100644
---- a/gpu/config/software_rendering_list_json.cc
-+++ b/gpu/config/software_rendering_list_json.cc
-@@ -1088,13 +1088,18 @@ LONG_STRING_CONST(
-     },
-     {
-       "id": 99,
--      "description": "GPU rasterization is blacklisted on non-Android",
-+      "description": "GPU rasterization is blacklisted on non-Android and non-Linux (Yocto patch)",
-       "cr_bugs": [362779],
-       "exceptions": [
-         {
-           "os": {
-             "type": "android"
-           }
-+        },
-+        {
-+          "os": {
-+            "type": "linux"
-+          }
-         }
-       ],
-       "features": [
--- 
-1.9.1
-
diff --git a/recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch b/recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch
deleted file mode 100644
index 232dbf4..0000000
--- a/recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-../../third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp: In static member function 'static void WTF::HashTableBucketInitializer<false>::initialize(Value&) [with Traits = WTF::HashMapValueTraits<WTF::HashTraits<int>, WTF::HashTraits<blink::TimelineThreadState> >; Value = WTF::KeyValuePair<int, blink::TimelineThreadState>]':
-../../third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp:234:8: error: '<anonymous>.blink::TimelineThreadState::inKnownLayerTask' is used uninitialized in this function [-Werror=uninitialized]
- struct TimelineThreadState {
-        ^
-
---- a/third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp	2016-03-10 08:14:18.771413000 -1000
-+++ b/third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp	2016-03-10 08:15:58.179413000 -1000
-@@ -231,7 +231,11 @@
-     Vector<Entry> m_stack;
- };
- 
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic warning "-Wuninitialized"
- struct TimelineThreadState {
-+#pragma GCC diagnostic pop
-+
-     ALLOW_ONLY_INLINE_ALLOCATION();
- public:
-     TimelineThreadState() { }
diff --git a/recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch b/recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch
deleted file mode 100644
index 632590a..0000000
--- a/recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 23e33854a1c5cddc56acd9abdbda14757b809c7d Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Sun, 12 Oct 2014 18:08:37 +0200
-Subject: [PATCH] Remove X libraries from GYP files
-
-Some X libraries are linked even when ozone-wayland is used, causing
-linker errors if no X libraries are around
-
-Upstream-Status: Pending
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- third_party/libjingle/source/talk/libjingle.gyp                 | 2 --
- third_party/libjingle/source/talk/libjingle_examples.gyp        | 4 ----
- third_party/webrtc/base/base.gyp                                | 4 ----
- third_party/webrtc/modules/desktop_capture/desktop_capture.gypi | 2 +-
- 4 files changed, 1 insertion(+), 11 deletions(-)
-
-diff --git a/third_party/libjingle/source/talk/libjingle.gyp b/third_party/libjingle/source/talk/libjingle.gyp
-index 90d1f41..22655dc 100755
---- a/third_party/libjingle/source/talk/libjingle.gyp
-+++ b/third_party/libjingle/source/talk/libjingle.gyp
-@@ -455,8 +455,6 @@
-           ],
-           'libraries': [
-             '-lrt',
--            '-lXext',
--            '-lX11',
-           ],
-         }],
-         ['OS=="win"', {
-diff --git a/third_party/libjingle/source/talk/libjingle_examples.gyp b/third_party/libjingle/source/talk/libjingle_examples.gyp
-index f7ce53b..204bc1e 100755
---- a/third_party/libjingle/source/talk/libjingle_examples.gyp
-+++ b/third_party/libjingle/source/talk/libjingle_examples.gyp
-@@ -207,10 +207,6 @@
-                 'libraries': [
-                   '<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0'
-                       ' gthread-2.0 gtk+-2.0)',
--                  '-lX11',
--                  '-lXcomposite',
--                  '-lXext',
--                  '-lXrender',
-                 ],
-               },
-             }],  # OS=="linux"
-diff --git a/third_party/webrtc/base/base.gyp b/third_party/webrtc/base/base.gyp
-index 2fd64ba..ccab4e9 100644
---- a/third_party/webrtc/base/base.gyp
-+++ b/third_party/webrtc/base/base.gyp
-@@ -593,10 +593,6 @@
-             'libraries': [
-               '-ldl',
-               '-lrt',
--              '-lXext',
--              '-lX11',
--              '-lXcomposite',
--              '-lXrender',
-             ],
-           },
-         }, {
-diff --git a/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi b/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
-index 1b702f2..93ede57 100644
---- a/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
-+++ b/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
-@@ -97,7 +97,7 @@
-             'desktop_capture_differ_sse2',
-           ],
-         }],
--        ['use_x11 == 1', {
-+        ['use_x11 == 1 and <(ozone_platform_wayland) != 1', {
-           'link_settings': {
-             'libraries': [
-               '-lX11',
--- 
-1.9.1
-
diff --git a/recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch b/recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
deleted file mode 100644
index 3aec8d0..0000000
--- a/recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Remove use of udev_set_log_priority API its gone in systemd >= 218
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: chromium-40.0.2214.91/ui/events/ozone/device/udev/device_manager_udev.cc
-===================================================================
---- chromium-40.0.2214.91.orig/ui/events/ozone/device/udev/device_manager_udev.cc
-+++ chromium-40.0.2214.91/ui/events/ozone/device/udev/device_manager_udev.cc
-@@ -33,29 +33,9 @@ enum {
-   SYS_LOG_DEBUG = 7,
- };
- 
--// Log handler for messages generated from libudev.
--void UdevLog(struct udev* udev,
--             int priority,
--             const char* file,
--             int line,
--             const char* fn,
--             const char* format,
--             va_list args) {
--  if (priority <= SYS_LOG_ERR)
--    LOG(ERROR) << "libudev: " << fn << ": " << base::StringPrintV(format, args);
--  else if (priority <= SYS_LOG_INFO)
--    VLOG(1) << "libudev: " << fn << ": " << base::StringPrintV(format, args);
--  else  // SYS_LOG_DEBUG
--    VLOG(2) << "libudev: " << fn << ": " << base::StringPrintV(format, args);
--}
--
- // Create libudev context.
- device::ScopedUdevPtr UdevCreate() {
-   struct udev* udev = udev_new();
--  if (udev) {
--    udev_set_log_fn(udev, UdevLog);
--    udev_set_log_priority(udev, SYS_LOG_DEBUG);
--  }
-   return device::ScopedUdevPtr(udev);
- }
- 
diff --git a/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch b/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
deleted file mode 100644
index c05598a..0000000
--- a/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From bfe80ed5227fccf8ab13df714702fc77e5e3d657 Mon Sep 17 00:00:00 2001
-From: Carlos Alberto Lopez Perez <clopez@igalia.com>
-Date: Thu, 27 Aug 2015 09:54:06 +0200
-Subject: [PATCH] Fix build error with GCC in Debug mode:
-
-  http://code.google.com/p/chromium/issues/detail?id=525428
----
- components/invalidation/invalidator_storage.cc | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/components/invalidation/invalidator_storage.cc b/components/invalidation/invalidator_storage.cc
-index 13ba4b1..3d567c1 100644
---- a/components/invalidation/invalidator_storage.cc
-+++ b/components/invalidation/invalidator_storage.cc
-@@ -2,7 +2,14 @@
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- 
-+#if !defined(NDEBUG)
-+#pragma GCC diagnostic push
-+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
-+#endif // !defined(NDEBUG)
- #include "components/invalidation/invalidator_storage.h"
-+#if !defined(NDEBUG)
-+#pragma GCC diagnostic pop
-+#endif // !defined(NDEBUG)
- 
- #include <string>
- #include <utility>
--- 
-2.1.4
-
diff --git a/recipes-browser/chromium/chromium/chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch b/recipes-browser/chromium/chromium/chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
similarity index 71%
rename from recipes-browser/chromium/chromium/chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
rename to recipes-browser/chromium/chromium/chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
index e2c1a5c..2d7bf84 100644
--- a/recipes-browser/chromium/chromium/chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
+++ b/recipes-browser/chromium/chromium/chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
@@ -1,6 +1,6 @@
-From 821d9fde2302f68f7cb7f0b211f4f78220c97180 Mon Sep 17 00:00:00 2001
+From be6f1d02f3f784594642929dff289dae33014d56 Mon Sep 17 00:00:00 2001
 From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Sun, 12 Oct 2014 17:54:18 +0200
+Date: Sun, 3 Apr 2016 17:46:59 +0200
 Subject: [PATCH] Remove accelerated Canvas support from blacklist
 
 Together with the --gpu-no-context-lost command line switch, this patch is
@@ -14,14 +14,14 @@ http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-September/206450.html
 
 Upstream-Status: Inappropiate [see link above]
 ---
- gpu/config/software_rendering_list_json.cc | 10 ----------
- 1 file changed, 10 deletions(-)
+ gpu/config/software_rendering_list_json.cc | 16 ----------------
+ 1 file changed, 16 deletions(-)
 
 diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc
-index b9f5e3a..ccf1460 100644
+index 484467d..c3b5855 100644
 --- a/gpu/config/software_rendering_list_json.cc
 +++ b/gpu/config/software_rendering_list_json.cc
-@@ -240,16 +240,6 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
+@@ -240,22 +240,6 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
        ]
      },
      {
@@ -30,6 +30,12 @@ index b9f5e3a..ccf1460 100644
 -      "os": {
 -        "type": "linux"
 -      },
+-      "exceptions": [
+-        {
+-          "gl_vendor": "Vivante Corporation", 
+-          "gl_renderer": "Vivante GC1000"
+-        }
+-      ],
 -      "features": [
 -        "accelerated_2d_canvas"
 -      ]
@@ -39,5 +45,5 @@ index b9f5e3a..ccf1460 100644
        "description": "ATI/AMD cards with older drivers in Linux are crash-prone",
        "cr_bugs": [95934, 94973, 136240, 357314],
 -- 
-1.9.1
+2.5.0
 
diff --git a/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch
similarity index 98%
rename from recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
rename to recipes-browser/chromium/chromium/chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch
index 86691a5..67f9800 100644
--- a/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
+++ b/recipes-browser/chromium/chromium/chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch
@@ -34,7 +34,7 @@ index a000b46..6c6d336 100644
          // 2^64 = 18446744073709551616 > 10^19
          const int kMaxUint64DecimalDigits = 19;
          Zero();
-@@ -699,7 +699,10 @@
+@@ -696,7 +696,10 @@
      }
 
 
@@ -45,7 +45,7 @@ index a000b46..6c6d336 100644
          if (exponent_ > other.exponent_) {
              // If "X" represents a "hidden" digit (by the exponent) then we are in the
              // following case (a == this, b == other):
-@@ -715,7 +715,10 @@
+@@ -709,7 +709,10 @@
              for (int i = used_digits_ - 1; i >= 0; --i) {
                  bigits_[i + zero_digits] = bigits_[i];
              }
diff --git a/recipes-browser/chromium/chromium/chromium-40/0003-Disable-API-keys-info-bar.patch b/recipes-browser/chromium/chromium/chromium-48/0002-Disable-API-keys-info-bar.patch
similarity index 95%
rename from recipes-browser/chromium/chromium/chromium-40/0003-Disable-API-keys-info-bar.patch
rename to recipes-browser/chromium/chromium/chromium-48/0002-Disable-API-keys-info-bar.patch
index f36fc24..56a5b28 100644
--- a/recipes-browser/chromium/chromium/chromium-40/0003-Disable-API-keys-info-bar.patch
+++ b/recipes-browser/chromium/chromium/chromium-48/0002-Disable-API-keys-info-bar.patch
@@ -22,7 +22,7 @@ index edea11a..4aef68f 100644
      return;
  
 +#if 0
-   infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
+   infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
        scoped_ptr<ConfirmInfoBarDelegate>(new GoogleApiKeysInfoBarDelegate())));
 +#endif
  }
diff --git a/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-48/0002-image_util.cc-disable-warning-from-gcc-5.patch
similarity index 100%
rename from recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch
rename to recipes-browser/chromium/chromium/chromium-48/0002-image_util.cc-disable-warning-from-gcc-5.patch
diff --git a/recipes-browser/chromium/chromium/chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch b/recipes-browser/chromium/chromium/chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch
similarity index 86%
rename from recipes-browser/chromium/chromium/chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch
rename to recipes-browser/chromium/chromium/chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch
index 402a674..7bc8d14 100644
--- a/recipes-browser/chromium/chromium/chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch
+++ b/recipes-browser/chromium/chromium/chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch
@@ -21,13 +21,13 @@ diff --git a/build/common.gypi b/build/common.gypi
 index 7ec5ae2..11e8d1d 100644
 --- a/build/common.gypi
 +++ b/build/common.gypi
-@@ -5808,16 +5808,6 @@
+@@ -6047,16 +6047,6 @@
          ['CXX.host', '<(host_cxx)'],
        ],
      }],
 -    ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 and clang==0', {
--      # Set default ARM cross compiling on linux.  These can be overridden
--      # using CC/CXX/etc environment variables.
+-      # Set default ARM cross tools on linux.  These can be overridden
+-      # using CC,CXX,CC.host and CXX.host environment variables.
 -      'make_global_settings': [
 -        ['CC', '<!(which arm-linux-gnueabihf-gcc)'],
 -        ['CXX', '<!(which arm-linux-gnueabihf-g++)'],
@@ -35,9 +35,9 @@ index 7ec5ae2..11e8d1d 100644
 -        ['CXX.host', '<(host_cxx)'],
 -      ],
 -    }],
- 
      # TODO(yyanagisawa): supports GENERATOR==make
      #  make generator doesn't support CC_wrapper without CC
+     #  in make_global_settings yet.
 -- 
 1.9.1
 
diff --git a/recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch b/recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch
new file mode 100644
index 0000000..24bec71
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch
@@ -0,0 +1,26 @@
+From 5158da97132db1a43c95f4c0ad65b4ac2629c4da Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Sat, 23 Apr 2016 14:05:04 +0200
+Subject: [PATCH] Create empty i18n_process_css_test.html file to avoid build
+ failure
+
+According to https://groups.google.com/a/chromium.org/forum/#!topic/chromium-packagers/9JX1N2nf4PU
+creating an empty i18n_process_css_test.html is a valid workaround for the
+following build error:
+
+"Exception: Failed to open test/data/webui/i18n_process_css_test.html while trying to flatten test/data/webui/i18n_process_css_test.html. (No such file or directory)"
+
+Upstream-Status: Pending
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ chrome/test/data/webui/i18n_process_css_test.html | 0
+ 1 file changed, 0 insertions(+), 0 deletions(-)
+ create mode 100644 chrome/test/data/webui/i18n_process_css_test.html
+
+diff --git a/chrome/test/data/webui/i18n_process_css_test.html b/chrome/test/data/webui/i18n_process_css_test.html
+new file mode 100644
+index 0000000..e69de29
+-- 
+2.5.0
+
diff --git a/recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch b/recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch
new file mode 100644
index 0000000..ceb6c6c
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch
@@ -0,0 +1,30 @@
+From ef3aaa58be440c1845e60432a498501088da07fe Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Thu, 28 Apr 2016 09:29:59 +0200
+Subject: [PATCH] Override root filesystem access restriction
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ sandbox/linux/suid/client/setuid_sandbox_client.cc | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.cc b/sandbox/linux/suid/client/setuid_sandbox_client.cc
+index 12ef7f9..b59908a 100644
+--- a/sandbox/linux/suid/client/setuid_sandbox_client.cc
++++ b/sandbox/linux/suid/client/setuid_sandbox_client.cc
+@@ -21,8 +21,12 @@
+ namespace {
+ 
+ bool IsFileSystemAccessDenied() {
++#if 0
+   base::ScopedFD root_dir(HANDLE_EINTR(open("/", O_RDONLY)));
+   return !root_dir.is_valid();
++#else
++  return true;
++#endif
+ }
+ 
+ int GetHelperApi(base::Environment* env) {
+-- 
+2.5.0
+
diff --git a/recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch b/recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch
new file mode 100644
index 0000000..63cc1ee
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch
@@ -0,0 +1,66 @@
+From 77384aa0d93ed6d5f91ada40971f6825e1b9dd69 Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Thu, 28 Apr 2016 22:02:39 +0200
+Subject: [PATCH] Remove GBM support from wayland.gyp
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ ozone/wayland/wayland.gyp | 20 --------------------
+ 1 file changed, 20 deletions(-)
+
+diff --git a/wayland/wayland.gyp b/wayland/wayland.gyp
+index ff2e210..32f13bc 100644
+--- a/ozone/wayland/wayland.gyp
++++ b/ozone/wayland/wayland.gyp
+@@ -5,10 +5,6 @@
+ 
+ {
+   'variables': {
+-    'variables': {
+-      'enable_drm_support%': 0,
+-    },
+-    'enable_drm_support%': '<(enable_drm_support)',
+     'conditions': [
+       ['sysroot!=""', {
+         'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
+@@ -42,17 +38,14 @@
+       'direct_dependent_settings': {
+         'cflags': [
+           '<!@(<(pkg-config) --cflags <(wayland_packages))',
+-          '<!@(<(pkg-config) --cflags gbm)',
+         ],
+       },
+       'link_settings': {
+         'ldflags': [
+           '<!@(<(pkg-config) --libs-only-L --libs-only-other <(wayland_packages))',
+-          '<!@(<(pkg-config) --libs-only-L --libs-only-other gbm)',
+         ],
+         'libraries': [
+           '<!@(<(pkg-config) --libs-only-l <(wayland_packages))',
+-          '<!@(<(pkg-config) --libs-only-l gbm)',
+         ],
+       },
+       'dependencies': [
+@@ -65,19 +58,6 @@
+         '../..',
+         '<(DEPTH)/third_party/khronos',
+       ],
+-      'conditions': [
+-        ['<(enable_drm_support)==1', {
+-          'defines': [
+-          'ENABLE_DRM_SUPPORT',
+-          ],
+-          'sources': [
+-            'egl/wayland_pixmap.cc',
+-            'egl/wayland_pixmap.h',
+-            'protocol/wayland-drm-protocol.cc',
+-            'protocol/wayland-drm-protocol.h',
+-          ],
+-        }],
+-      ],
+       'sources': [
+         'data_device.cc',
+         'data_device.h',
+-- 
+2.5.0
+
diff --git a/recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch b/recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch
new file mode 100644
index 0000000..baa8dd2
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch
@@ -0,0 +1,31 @@
+From 36a6b35b5eb2874a85b5bc1caf111213c0bee04b Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Fri, 29 Apr 2016 08:52:12 +0200
+Subject: [PATCH] Workaround for glib-related build error with ozone-wayland
+
+This fixes the following compilation error:
+
+../../third_party/libsecret/secret.h:18:18: fatal error: glib.h: No such file or directory
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ chrome/chrome_browser.gypi | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
+index d964fec..daccacb 100644
+--- a/chrome/chrome_browser.gypi
++++ b/chrome/chrome_browser.gypi
+@@ -3543,6 +3543,9 @@
+           ],
+         }],
+         ['OS=="linux" and chromeos!=1', {
++          'dependencies': [
++            '../build/linux/system.gyp:glib',
++          ],
+           'sources': [ '<@(chrome_browser_libsecret_sources)' ],
+           'defines': [
+             'USE_LIBSECRET',
+-- 
+2.5.0
+
diff --git a/recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch b/recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch
new file mode 100644
index 0000000..3bf6d96
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch
@@ -0,0 +1,26 @@
+From 12d7fb643188ea5033aaf70ffe64b4c58eefc5eb Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Fri, 29 Apr 2016 14:02:44 +0200
+Subject: [PATCH] Fix GCC uninitialized warning
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ third_party/ots/src/name.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/third_party/ots/src/name.cc b/third_party/ots/src/name.cc
+index a0dd1ea..070ddae 100644
+--- a/third_party/ots/src/name.cc
++++ b/third_party/ots/src/name.cc
+@@ -79,7 +79,7 @@ bool ots_name_parse(Font *font, const uint8_t* data, size_t length) {
+   const char* string_base = reinterpret_cast<const char*>(data) +
+       string_offset;
+ 
+-  NameRecord prev_record;
++  NameRecord prev_record(0, 0, 0, 0);
+   bool sort_required = false;
+ 
+   // Read all the names, discarding any with invalid IDs,
+-- 
+2.5.0
+
diff --git a/recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch b/recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch
new file mode 100644
index 0000000..f5f7889
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch
@@ -0,0 +1,46 @@
+From 2d7143090fdfd82950be352078daa5019279d81f Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Fri, 29 Apr 2016 17:14:15 +0200
+Subject: [PATCH] Fix build errors with GCC in Debug mode
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ third_party/WebKit/Source/wtf/dtoa/utils.h                         | 7 +++++++
+ .../cacheinvalidation/src/google/cacheinvalidation/include/types.h | 2 +-
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/third_party/WebKit/Source/wtf/dtoa/utils.h b/third_party/WebKit/Source/wtf/dtoa/utils.h
+index 0a61c01..7738e9a 100644
+--- a/third_party/WebKit/Source/wtf/dtoa/utils.h
++++ b/third_party/WebKit/Source/wtf/dtoa/utils.h
+@@ -165,7 +165,14 @@ namespace double_conversion {
+ 
+         // Access individual vector elements - checks bounds in debug mode.
+         T& operator[](int index) const {
++#if !defined(NDEBUG)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wstrict-overflow"
++#endif // !defined(NDEBUG)
+             ASSERT(0 <= index && index < length_);
++#if !defined(NDEBUG)
++#pragma GCC diagnostic pop
++#endif // !defined(NDEBUG)
+             return start_[index];
+         }
+ 
+diff --git a/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h b/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
+index 4e3be27..835e956 100644
+--- a/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
++++ b/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
+@@ -172,7 +172,7 @@ class ErrorInfo {
+  */
+ class ObjectId {
+  public:
+-  ObjectId() : is_initialized_(false) {}
++  ObjectId() : is_initialized_(false), source_(0) {}
+ 
+   /* Creates an object id for the given source and name (the name is copied). */
+   ObjectId(int source, const string& name)
+-- 
+2.5.0
+
diff --git a/recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch b/recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch
new file mode 100644
index 0000000..30cd511
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch
@@ -0,0 +1,25 @@
+From 135debdc4613d5d323d1659166466f74f2e75284 Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Fri, 6 May 2016 12:44:36 +0200
+Subject: [PATCH] Fix "'rv' may be used uninitialized in this function" warning
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ third_party/mojo/src/mojo/edk/system/unique_identifier.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/third_party/mojo/src/mojo/edk/system/unique_identifier.cc b/third_party/mojo/src/mojo/edk/system/unique_identifier.cc
+index 22abf22..6f9a761 100644
+--- a/third_party/mojo/src/mojo/edk/system/unique_identifier.cc
++++ b/third_party/mojo/src/mojo/edk/system/unique_identifier.cc
+@@ -31,6 +31,7 @@ UniqueIdentifier UniqueIdentifier::FromString(const std::string& s,
+     memcpy(rv.data_, &bytes[0], sizeof(rv.data_));
+     *success = true;
+   } else {
++    memset(rv.data_, 0, sizeof(rv.data_));
+     *success = false;
+   }
+   return rv;
+-- 
+2.7.4
+
diff --git a/recipes-browser/chromium/chromium/chromium-40/add_missing_stat_h_include.patch b/recipes-browser/chromium/chromium/chromium-48/add_missing_stat_h_include.patch
similarity index 90%
rename from recipes-browser/chromium/chromium/chromium-40/add_missing_stat_h_include.patch
rename to recipes-browser/chromium/chromium/chromium-48/add_missing_stat_h_include.patch
index 90e7827..4620db2 100644
--- a/recipes-browser/chromium/chromium/chromium-40/add_missing_stat_h_include.patch
+++ b/recipes-browser/chromium/chromium/chromium-48/add_missing_stat_h_include.patch
@@ -27,8 +27,8 @@ Tested with ARCH armv7.
 Signed-off-by: Max Krummenacher <max.oss.09 at gmail.com>
 Upstream-Status: Pending
 
---- chromium-40.0.2214.91/components/storage_monitor/storage_monitor_linux.cc~	2015-01-21 21:28:16.000000000 +0100
-+++ chromium-40.0.2214.91/components/storage_monitor/storage_monitor_linux.cc	2015-10-27 13:21:08.405655894 +0100
+--- a/components/storage_monitor/storage_monitor_linux.cc~	2015-01-21 21:28:16.000000000 +0100
++++ b/components/storage_monitor/storage_monitor_linux.cc	2015-10-27 13:21:08.405655894 +0100
 @@ -8,6 +8,7 @@
  
  #include <mntent.h>
diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb
deleted file mode 100644
index 3966548..0000000
--- a/recipes-browser/chromium/chromium_40.0.2214.91.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-include chromium-browser.inc
-
-SRC_URI += "\
-        file://unistd-2.patch \
-        file://chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch \
-        file://chromium-40/add_missing_stat_h_include.patch \
-        file://chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch \
-        file://chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch \
-        file://chromium-40/0003-disable-uninitialized-warning.patch \
-        file://chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch \
-        ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
-        ${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', 'file://chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch', '', d)} \
-        ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-40/0003-Disable-API-keys-info-bar.patch', '', d)} \
-"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=537e0b52077bf0a616d0a0c8a79bc9d5"
-SRC_URI[md5sum] = "1f5093bd7e435fdebad070e74bfb3438"
-SRC_URI[sha256sum] = "f72fda9ff1ea256ab911610ee532eadf8303137d431f2481d01d3d60e5e64149"
-
-OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
-OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
-
-OZONE_WAYLAND_EXTRA_PATCHES = " \
-        file://chromium-40/0005-Remove-X-libraries-from-GYP-files.patch \
-        file://chromium-40/0010-systemd-218.patch \
-"
-# using 00*.patch to skip the WebRTC patches in ozone-wayland ThanksGiving milestone.
-# The WebRTC patches remove X11 libraries from the linker flags, which is
-# already done by another patch (see above). Furthermore, to be able to use
-# these patches, it is necessary to update the git repository in third_party/webrtc,
-# which would further complicate this recipe.
-OZONE_WAYLAND_PATCH_FILE_GLOB = "00*.patch"
-
-# Component build is broken in ozone-wayland for Chromium 40,
-# and is not planned to work again before version 41
-python() {
-    if (d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1'):
-        if bb.utils.contains('PACKAGECONFIG', 'component-build', True, False, d):
-            bb.fatal("Chromium 40 Wayland version cannot be built in component-mode")
-}
-
-CHROMIUM_X11_DEPENDS = "xextproto gtk+ libxi libxss"
-CHROMIUM_X11_GYP_DEFINES = ""
-CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
-CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1"
diff --git a/recipes-browser/chromium/chromium_48.0.2548.0.bb b/recipes-browser/chromium/chromium_48.0.2548.0.bb
new file mode 100644
index 0000000..369d6fa
--- /dev/null
+++ b/recipes-browser/chromium/chromium_48.0.2548.0.bb
@@ -0,0 +1,43 @@
+include chromium-browser.inc
+
+SRC_URI += "\
+        file://chromium-48/add_missing_stat_h_include.patch \
+        file://chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch \
+        file://chromium-48/0002-image_util.cc-disable-warning-from-gcc-5.patch \
+        file://chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch \
+        file://chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch \
+        file://chromium-48/0005-Override-root-filesystem-access-restriction.patch \
+        file://chromium-48/0008-Fix-GCC-uninitialized-warning.patch \
+        file://chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch \
+        file://chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch \
+        ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
+        ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-48/0002-Disable-API-keys-info-bar.patch', '', d)} \
+"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d"
+SRC_URI[md5sum] = "0534981cc21efcd11e64b67b85854420"
+SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f680dbc8"
+
+EXTRA_OEGYP += " \
+	-Dv8_use_external_startup_data=0 \
+"
+
+OZONE_WAYLAND_GIT_BRANCH = "Milestone-SouthSister"
+OZONE_WAYLAND_GIT_SRCREV = "c605505044af3345a276abbd7c29fd53db1dea40"
+
+OZONE_WAYLAND_EXTRA_PATCHES = " \
+	file://chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch \
+	file://chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.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")
+}
+
+CHROMIUM_X11_DEPENDS = "xextproto gtk+ libxi libxss"
+CHROMIUM_X11_GYP_DEFINES = ""
+CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
+CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1 use_xkbcommon=1"
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [meta-browser][PATCH v2 3/3] chromium: Upgrade to version 48.0.2548.0
  2016-05-08 12:20 ` [meta-browser][PATCH v2 3/3] chromium: Upgrade to version 48.0.2548.0 Carlos Rafael Giani
@ 2016-05-18 15:04   ` Martin Jansa
  2016-05-19  5:58     ` Carlos Rafael Giani
  2016-05-20 11:41     ` [meta-browser][PATCH] chromium: Add workarounds for compiler errors Carlos Rafael Giani
  0 siblings, 2 replies; 7+ messages in thread
From: Martin Jansa @ 2016-05-18 15:04 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 41491 bytes --]

On Sun, May 08, 2016 at 02:20:38PM +0200, Carlos Rafael Giani wrote:
> Not upgrading to M49 or M50 in this commit since this is currently the
> latest version that is supported by ozone-wayland

Thanks for fixing that issue with gold, now there is new issue since
glibc was upgraded in oe-core to 2.24 which deprecated readdir_r

http://errors.yoctoproject.org/Errors/Details/64087/

Anyone willing to patch it to use readdir?

Thanks

> Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> ---
>  ...Add-Linux-to-impl-side-painting-whitelist.patch | 39 -----------
>  .../0003-disable-uninitialized-warning.patch       | 19 ------
>  .../0005-Remove-X-libraries-from-GYP-files.patch   | 77 ----------------------
>  .../chromium/chromium-40/0010-systemd-218.patch    | 39 -----------
>  .../fix-build-error-with-GCC-in-Debug-mode.patch   | 32 ---------
>  ...accelerated-Canvas-support-from-blacklist.patch | 20 ++++--
>  ...0001-bignum.cc-disable-warning-from-gcc-5.patch |  4 +-
>  .../0002-Disable-API-keys-info-bar.patch}          |  2 +-
>  ...-image_util.cc-disable-warning-from-gcc-5.patch |  0
>  ...-Remove-hard-coded-values-for-CC-and-CXX.patch} |  8 +--
>  ...y-i18n_process_css_test.html-file-to-avoi.patch | 26 ++++++++
>  ...erride-root-filesystem-access-restriction.patch | 30 +++++++++
>  .../0006-Remove-GBM-support-from-wayland.gyp.patch | 66 +++++++++++++++++++
>  ...for-glib-related-build-error-with-ozone-w.patch | 31 +++++++++
>  .../0008-Fix-GCC-uninitialized-warning.patch       | 26 ++++++++
>  ...9-Fix-build-errors-with-GCC-in-Debug-mode.patch | 46 +++++++++++++
>  ...be-used-uninitialized-in-this-function-wa.patch | 25 +++++++
>  .../add_missing_stat_h_include.patch               |  4 +-
>  recipes-browser/chromium/chromium_40.0.2214.91.bb  | 45 -------------
>  recipes-browser/chromium/chromium_48.0.2548.0.bb   | 43 ++++++++++++
>  20 files changed, 315 insertions(+), 267 deletions(-)
>  delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch
>  delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch
>  delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch
>  delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
>  delete mode 100644 recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
>  rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/0001-Remove-accelerated-Canvas-support-from-blacklist.patch (71%)
>  rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/0001-bignum.cc-disable-warning-from-gcc-5.patch (98%)
>  rename recipes-browser/chromium/chromium/{chromium-40/0003-Disable-API-keys-info-bar.patch => chromium-48/0002-Disable-API-keys-info-bar.patch} (95%)
>  rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/0002-image_util.cc-disable-warning-from-gcc-5.patch (100%)
>  rename recipes-browser/chromium/chromium/{chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch => chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch} (86%)
>  create mode 100644 recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch
>  create mode 100644 recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch
>  create mode 100644 recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch
>  create mode 100644 recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch
>  create mode 100644 recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch
>  create mode 100644 recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch
>  create mode 100644 recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch
>  rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/add_missing_stat_h_include.patch (90%)
>  delete mode 100644 recipes-browser/chromium/chromium_40.0.2214.91.bb
>  create mode 100644 recipes-browser/chromium/chromium_48.0.2548.0.bb
> 
> diff --git a/recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch b/recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch
> deleted file mode 100644
> index b5916ca..0000000
> --- a/recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch
> +++ /dev/null
> @@ -1,39 +0,0 @@
> -From 61cbd67e88f5e99185d7df1a05f842c58e691495 Mon Sep 17 00:00:00 2001
> -From: Carlos Rafael Giani <dv@pseudoterminal.org>
> -Date: Sun, 21 Dec 2014 01:01:04 +0100
> -Subject: [PATCH] Add Linux to impl side painting whitelist
> -
> -Upstream-Status: Inappropriate [enable feature]
> -
> -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> ----
> - gpu/config/software_rendering_list_json.cc | 7 ++++++-
> - 1 file changed, 6 insertions(+), 1 deletion(-)
> -
> -diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc
> -index ccf1460..8630d75 100644
> ---- a/gpu/config/software_rendering_list_json.cc
> -+++ b/gpu/config/software_rendering_list_json.cc
> -@@ -1088,13 +1088,18 @@ LONG_STRING_CONST(
> -     },
> -     {
> -       "id": 99,
> --      "description": "GPU rasterization is blacklisted on non-Android",
> -+      "description": "GPU rasterization is blacklisted on non-Android and non-Linux (Yocto patch)",
> -       "cr_bugs": [362779],
> -       "exceptions": [
> -         {
> -           "os": {
> -             "type": "android"
> -           }
> -+        },
> -+        {
> -+          "os": {
> -+            "type": "linux"
> -+          }
> -         }
> -       ],
> -       "features": [
> --- 
> -1.9.1
> -
> diff --git a/recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch b/recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch
> deleted file mode 100644
> index 232dbf4..0000000
> --- a/recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -../../third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp: In static member function 'static void WTF::HashTableBucketInitializer<false>::initialize(Value&) [with Traits = WTF::HashMapValueTraits<WTF::HashTraits<int>, WTF::HashTraits<blink::TimelineThreadState> >; Value = WTF::KeyValuePair<int, blink::TimelineThreadState>]':
> -../../third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp:234:8: error: '<anonymous>.blink::TimelineThreadState::inKnownLayerTask' is used uninitialized in this function [-Werror=uninitialized]
> - struct TimelineThreadState {
> -        ^
> -
> ---- a/third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp	2016-03-10 08:14:18.771413000 -1000
> -+++ b/third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp	2016-03-10 08:15:58.179413000 -1000
> -@@ -231,7 +231,11 @@
> -     Vector<Entry> m_stack;
> - };
> - 
> -+#pragma GCC diagnostic push
> -+#pragma GCC diagnostic warning "-Wuninitialized"
> - struct TimelineThreadState {
> -+#pragma GCC diagnostic pop
> -+
> -     ALLOW_ONLY_INLINE_ALLOCATION();
> - public:
> -     TimelineThreadState() { }
> diff --git a/recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch b/recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch
> deleted file mode 100644
> index 632590a..0000000
> --- a/recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch
> +++ /dev/null
> @@ -1,77 +0,0 @@
> -From 23e33854a1c5cddc56acd9abdbda14757b809c7d Mon Sep 17 00:00:00 2001
> -From: Carlos Rafael Giani <dv@pseudoterminal.org>
> -Date: Sun, 12 Oct 2014 18:08:37 +0200
> -Subject: [PATCH] Remove X libraries from GYP files
> -
> -Some X libraries are linked even when ozone-wayland is used, causing
> -linker errors if no X libraries are around
> -
> -Upstream-Status: Pending
> -
> -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> ----
> - third_party/libjingle/source/talk/libjingle.gyp                 | 2 --
> - third_party/libjingle/source/talk/libjingle_examples.gyp        | 4 ----
> - third_party/webrtc/base/base.gyp                                | 4 ----
> - third_party/webrtc/modules/desktop_capture/desktop_capture.gypi | 2 +-
> - 4 files changed, 1 insertion(+), 11 deletions(-)
> -
> -diff --git a/third_party/libjingle/source/talk/libjingle.gyp b/third_party/libjingle/source/talk/libjingle.gyp
> -index 90d1f41..22655dc 100755
> ---- a/third_party/libjingle/source/talk/libjingle.gyp
> -+++ b/third_party/libjingle/source/talk/libjingle.gyp
> -@@ -455,8 +455,6 @@
> -           ],
> -           'libraries': [
> -             '-lrt',
> --            '-lXext',
> --            '-lX11',
> -           ],
> -         }],
> -         ['OS=="win"', {
> -diff --git a/third_party/libjingle/source/talk/libjingle_examples.gyp b/third_party/libjingle/source/talk/libjingle_examples.gyp
> -index f7ce53b..204bc1e 100755
> ---- a/third_party/libjingle/source/talk/libjingle_examples.gyp
> -+++ b/third_party/libjingle/source/talk/libjingle_examples.gyp
> -@@ -207,10 +207,6 @@
> -                 'libraries': [
> -                   '<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0'
> -                       ' gthread-2.0 gtk+-2.0)',
> --                  '-lX11',
> --                  '-lXcomposite',
> --                  '-lXext',
> --                  '-lXrender',
> -                 ],
> -               },
> -             }],  # OS=="linux"
> -diff --git a/third_party/webrtc/base/base.gyp b/third_party/webrtc/base/base.gyp
> -index 2fd64ba..ccab4e9 100644
> ---- a/third_party/webrtc/base/base.gyp
> -+++ b/third_party/webrtc/base/base.gyp
> -@@ -593,10 +593,6 @@
> -             'libraries': [
> -               '-ldl',
> -               '-lrt',
> --              '-lXext',
> --              '-lX11',
> --              '-lXcomposite',
> --              '-lXrender',
> -             ],
> -           },
> -         }, {
> -diff --git a/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi b/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
> -index 1b702f2..93ede57 100644
> ---- a/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
> -+++ b/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
> -@@ -97,7 +97,7 @@
> -             'desktop_capture_differ_sse2',
> -           ],
> -         }],
> --        ['use_x11 == 1', {
> -+        ['use_x11 == 1 and <(ozone_platform_wayland) != 1', {
> -           'link_settings': {
> -             'libraries': [
> -               '-lX11',
> --- 
> -1.9.1
> -
> diff --git a/recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch b/recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
> deleted file mode 100644
> index 3aec8d0..0000000
> --- a/recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
> +++ /dev/null
> @@ -1,39 +0,0 @@
> -Remove use of udev_set_log_priority API its gone in systemd >= 218
> -
> -Upstream-Status: Pending
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> -
> -Index: chromium-40.0.2214.91/ui/events/ozone/device/udev/device_manager_udev.cc
> -===================================================================
> ---- chromium-40.0.2214.91.orig/ui/events/ozone/device/udev/device_manager_udev.cc
> -+++ chromium-40.0.2214.91/ui/events/ozone/device/udev/device_manager_udev.cc
> -@@ -33,29 +33,9 @@ enum {
> -   SYS_LOG_DEBUG = 7,
> - };
> - 
> --// Log handler for messages generated from libudev.
> --void UdevLog(struct udev* udev,
> --             int priority,
> --             const char* file,
> --             int line,
> --             const char* fn,
> --             const char* format,
> --             va_list args) {
> --  if (priority <= SYS_LOG_ERR)
> --    LOG(ERROR) << "libudev: " << fn << ": " << base::StringPrintV(format, args);
> --  else if (priority <= SYS_LOG_INFO)
> --    VLOG(1) << "libudev: " << fn << ": " << base::StringPrintV(format, args);
> --  else  // SYS_LOG_DEBUG
> --    VLOG(2) << "libudev: " << fn << ": " << base::StringPrintV(format, args);
> --}
> --
> - // Create libudev context.
> - device::ScopedUdevPtr UdevCreate() {
> -   struct udev* udev = udev_new();
> --  if (udev) {
> --    udev_set_log_fn(udev, UdevLog);
> --    udev_set_log_priority(udev, SYS_LOG_DEBUG);
> --  }
> -   return device::ScopedUdevPtr(udev);
> - }
> - 
> diff --git a/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch b/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
> deleted file mode 100644
> index c05598a..0000000
> --- a/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -From bfe80ed5227fccf8ab13df714702fc77e5e3d657 Mon Sep 17 00:00:00 2001
> -From: Carlos Alberto Lopez Perez <clopez@igalia.com>
> -Date: Thu, 27 Aug 2015 09:54:06 +0200
> -Subject: [PATCH] Fix build error with GCC in Debug mode:
> -
> -  http://code.google.com/p/chromium/issues/detail?id=525428
> ----
> - components/invalidation/invalidator_storage.cc | 7 +++++++
> - 1 file changed, 7 insertions(+)
> -
> -diff --git a/components/invalidation/invalidator_storage.cc b/components/invalidation/invalidator_storage.cc
> -index 13ba4b1..3d567c1 100644
> ---- a/components/invalidation/invalidator_storage.cc
> -+++ b/components/invalidation/invalidator_storage.cc
> -@@ -2,7 +2,14 @@
> - // Use of this source code is governed by a BSD-style license that can be
> - // found in the LICENSE file.
> - 
> -+#if !defined(NDEBUG)
> -+#pragma GCC diagnostic push
> -+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
> -+#endif // !defined(NDEBUG)
> - #include "components/invalidation/invalidator_storage.h"
> -+#if !defined(NDEBUG)
> -+#pragma GCC diagnostic pop
> -+#endif // !defined(NDEBUG)
> - 
> - #include <string>
> - #include <utility>
> --- 
> -2.1.4
> -
> diff --git a/recipes-browser/chromium/chromium/chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch b/recipes-browser/chromium/chromium/chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
> similarity index 71%
> rename from recipes-browser/chromium/chromium/chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
> rename to recipes-browser/chromium/chromium/chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
> index e2c1a5c..2d7bf84 100644
> --- a/recipes-browser/chromium/chromium/chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
> +++ b/recipes-browser/chromium/chromium/chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
> @@ -1,6 +1,6 @@
> -From 821d9fde2302f68f7cb7f0b211f4f78220c97180 Mon Sep 17 00:00:00 2001
> +From be6f1d02f3f784594642929dff289dae33014d56 Mon Sep 17 00:00:00 2001
>  From: Carlos Rafael Giani <dv@pseudoterminal.org>
> -Date: Sun, 12 Oct 2014 17:54:18 +0200
> +Date: Sun, 3 Apr 2016 17:46:59 +0200
>  Subject: [PATCH] Remove accelerated Canvas support from blacklist
>  
>  Together with the --gpu-no-context-lost command line switch, this patch is
> @@ -14,14 +14,14 @@ http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-September/206450.html
>  
>  Upstream-Status: Inappropiate [see link above]
>  ---
> - gpu/config/software_rendering_list_json.cc | 10 ----------
> - 1 file changed, 10 deletions(-)
> + gpu/config/software_rendering_list_json.cc | 16 ----------------
> + 1 file changed, 16 deletions(-)
>  
>  diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc
> -index b9f5e3a..ccf1460 100644
> +index 484467d..c3b5855 100644
>  --- a/gpu/config/software_rendering_list_json.cc
>  +++ b/gpu/config/software_rendering_list_json.cc
> -@@ -240,16 +240,6 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
> +@@ -240,22 +240,6 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
>         ]
>       },
>       {
> @@ -30,6 +30,12 @@ index b9f5e3a..ccf1460 100644
>  -      "os": {
>  -        "type": "linux"
>  -      },
> +-      "exceptions": [
> +-        {
> +-          "gl_vendor": "Vivante Corporation", 
> +-          "gl_renderer": "Vivante GC1000"
> +-        }
> +-      ],
>  -      "features": [
>  -        "accelerated_2d_canvas"
>  -      ]
> @@ -39,5 +45,5 @@ index b9f5e3a..ccf1460 100644
>         "description": "ATI/AMD cards with older drivers in Linux are crash-prone",
>         "cr_bugs": [95934, 94973, 136240, 357314],
>  -- 
> -1.9.1
> +2.5.0
>  
> diff --git a/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch
> similarity index 98%
> rename from recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
> rename to recipes-browser/chromium/chromium/chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch
> index 86691a5..67f9800 100644
> --- a/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
> +++ b/recipes-browser/chromium/chromium/chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch
> @@ -34,7 +34,7 @@ index a000b46..6c6d336 100644
>           // 2^64 = 18446744073709551616 > 10^19
>           const int kMaxUint64DecimalDigits = 19;
>           Zero();
> -@@ -699,7 +699,10 @@
> +@@ -696,7 +696,10 @@
>       }
>  
>  
> @@ -45,7 +45,7 @@ index a000b46..6c6d336 100644
>           if (exponent_ > other.exponent_) {
>               // If "X" represents a "hidden" digit (by the exponent) then we are in the
>               // following case (a == this, b == other):
> -@@ -715,7 +715,10 @@
> +@@ -709,7 +709,10 @@
>               for (int i = used_digits_ - 1; i >= 0; --i) {
>                   bigits_[i + zero_digits] = bigits_[i];
>               }
> diff --git a/recipes-browser/chromium/chromium/chromium-40/0003-Disable-API-keys-info-bar.patch b/recipes-browser/chromium/chromium/chromium-48/0002-Disable-API-keys-info-bar.patch
> similarity index 95%
> rename from recipes-browser/chromium/chromium/chromium-40/0003-Disable-API-keys-info-bar.patch
> rename to recipes-browser/chromium/chromium/chromium-48/0002-Disable-API-keys-info-bar.patch
> index f36fc24..56a5b28 100644
> --- a/recipes-browser/chromium/chromium/chromium-40/0003-Disable-API-keys-info-bar.patch
> +++ b/recipes-browser/chromium/chromium/chromium-48/0002-Disable-API-keys-info-bar.patch
> @@ -22,7 +22,7 @@ index edea11a..4aef68f 100644
>       return;
>   
>  +#if 0
> -   infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
> +   infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
>         scoped_ptr<ConfirmInfoBarDelegate>(new GoogleApiKeysInfoBarDelegate())));
>  +#endif
>   }
> diff --git a/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-48/0002-image_util.cc-disable-warning-from-gcc-5.patch
> similarity index 100%
> rename from recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch
> rename to recipes-browser/chromium/chromium/chromium-48/0002-image_util.cc-disable-warning-from-gcc-5.patch
> diff --git a/recipes-browser/chromium/chromium/chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch b/recipes-browser/chromium/chromium/chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch
> similarity index 86%
> rename from recipes-browser/chromium/chromium/chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch
> rename to recipes-browser/chromium/chromium/chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch
> index 402a674..7bc8d14 100644
> --- a/recipes-browser/chromium/chromium/chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch
> +++ b/recipes-browser/chromium/chromium/chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch
> @@ -21,13 +21,13 @@ diff --git a/build/common.gypi b/build/common.gypi
>  index 7ec5ae2..11e8d1d 100644
>  --- a/build/common.gypi
>  +++ b/build/common.gypi
> -@@ -5808,16 +5808,6 @@
> +@@ -6047,16 +6047,6 @@
>           ['CXX.host', '<(host_cxx)'],
>         ],
>       }],
>  -    ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 and clang==0', {
> --      # Set default ARM cross compiling on linux.  These can be overridden
> --      # using CC/CXX/etc environment variables.
> +-      # Set default ARM cross tools on linux.  These can be overridden
> +-      # using CC,CXX,CC.host and CXX.host environment variables.
>  -      'make_global_settings': [
>  -        ['CC', '<!(which arm-linux-gnueabihf-gcc)'],
>  -        ['CXX', '<!(which arm-linux-gnueabihf-g++)'],
> @@ -35,9 +35,9 @@ index 7ec5ae2..11e8d1d 100644
>  -        ['CXX.host', '<(host_cxx)'],
>  -      ],
>  -    }],
> - 
>       # TODO(yyanagisawa): supports GENERATOR==make
>       #  make generator doesn't support CC_wrapper without CC
> +     #  in make_global_settings yet.
>  -- 
>  1.9.1
>  
> diff --git a/recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch b/recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch
> new file mode 100644
> index 0000000..24bec71
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch
> @@ -0,0 +1,26 @@
> +From 5158da97132db1a43c95f4c0ad65b4ac2629c4da Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Sat, 23 Apr 2016 14:05:04 +0200
> +Subject: [PATCH] Create empty i18n_process_css_test.html file to avoid build
> + failure
> +
> +According to https://groups.google.com/a/chromium.org/forum/#!topic/chromium-packagers/9JX1N2nf4PU
> +creating an empty i18n_process_css_test.html is a valid workaround for the
> +following build error:
> +
> +"Exception: Failed to open test/data/webui/i18n_process_css_test.html while trying to flatten test/data/webui/i18n_process_css_test.html. (No such file or directory)"
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> +---
> + chrome/test/data/webui/i18n_process_css_test.html | 0
> + 1 file changed, 0 insertions(+), 0 deletions(-)
> + create mode 100644 chrome/test/data/webui/i18n_process_css_test.html
> +
> +diff --git a/chrome/test/data/webui/i18n_process_css_test.html b/chrome/test/data/webui/i18n_process_css_test.html
> +new file mode 100644
> +index 0000000..e69de29
> +-- 
> +2.5.0
> +
> diff --git a/recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch b/recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch
> new file mode 100644
> index 0000000..ceb6c6c
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch
> @@ -0,0 +1,30 @@
> +From ef3aaa58be440c1845e60432a498501088da07fe Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Thu, 28 Apr 2016 09:29:59 +0200
> +Subject: [PATCH] Override root filesystem access restriction
> +
> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> +---
> + sandbox/linux/suid/client/setuid_sandbox_client.cc | 4 ++++
> + 1 file changed, 4 insertions(+)
> +
> +diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.cc b/sandbox/linux/suid/client/setuid_sandbox_client.cc
> +index 12ef7f9..b59908a 100644
> +--- a/sandbox/linux/suid/client/setuid_sandbox_client.cc
> ++++ b/sandbox/linux/suid/client/setuid_sandbox_client.cc
> +@@ -21,8 +21,12 @@
> + namespace {
> + 
> + bool IsFileSystemAccessDenied() {
> ++#if 0
> +   base::ScopedFD root_dir(HANDLE_EINTR(open("/", O_RDONLY)));
> +   return !root_dir.is_valid();
> ++#else
> ++  return true;
> ++#endif
> + }
> + 
> + int GetHelperApi(base::Environment* env) {
> +-- 
> +2.5.0
> +
> diff --git a/recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch b/recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch
> new file mode 100644
> index 0000000..63cc1ee
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch
> @@ -0,0 +1,66 @@
> +From 77384aa0d93ed6d5f91ada40971f6825e1b9dd69 Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Thu, 28 Apr 2016 22:02:39 +0200
> +Subject: [PATCH] Remove GBM support from wayland.gyp
> +
> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> +---
> + ozone/wayland/wayland.gyp | 20 --------------------
> + 1 file changed, 20 deletions(-)
> +
> +diff --git a/wayland/wayland.gyp b/wayland/wayland.gyp
> +index ff2e210..32f13bc 100644
> +--- a/ozone/wayland/wayland.gyp
> ++++ b/ozone/wayland/wayland.gyp
> +@@ -5,10 +5,6 @@
> + 
> + {
> +   'variables': {
> +-    'variables': {
> +-      'enable_drm_support%': 0,
> +-    },
> +-    'enable_drm_support%': '<(enable_drm_support)',
> +     'conditions': [
> +       ['sysroot!=""', {
> +         'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
> +@@ -42,17 +38,14 @@
> +       'direct_dependent_settings': {
> +         'cflags': [
> +           '<!@(<(pkg-config) --cflags <(wayland_packages))',
> +-          '<!@(<(pkg-config) --cflags gbm)',
> +         ],
> +       },
> +       'link_settings': {
> +         'ldflags': [
> +           '<!@(<(pkg-config) --libs-only-L --libs-only-other <(wayland_packages))',
> +-          '<!@(<(pkg-config) --libs-only-L --libs-only-other gbm)',
> +         ],
> +         'libraries': [
> +           '<!@(<(pkg-config) --libs-only-l <(wayland_packages))',
> +-          '<!@(<(pkg-config) --libs-only-l gbm)',
> +         ],
> +       },
> +       'dependencies': [
> +@@ -65,19 +58,6 @@
> +         '../..',
> +         '<(DEPTH)/third_party/khronos',
> +       ],
> +-      'conditions': [
> +-        ['<(enable_drm_support)==1', {
> +-          'defines': [
> +-          'ENABLE_DRM_SUPPORT',
> +-          ],
> +-          'sources': [
> +-            'egl/wayland_pixmap.cc',
> +-            'egl/wayland_pixmap.h',
> +-            'protocol/wayland-drm-protocol.cc',
> +-            'protocol/wayland-drm-protocol.h',
> +-          ],
> +-        }],
> +-      ],
> +       'sources': [
> +         'data_device.cc',
> +         'data_device.h',
> +-- 
> +2.5.0
> +
> diff --git a/recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch b/recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch
> new file mode 100644
> index 0000000..baa8dd2
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch
> @@ -0,0 +1,31 @@
> +From 36a6b35b5eb2874a85b5bc1caf111213c0bee04b Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Fri, 29 Apr 2016 08:52:12 +0200
> +Subject: [PATCH] Workaround for glib-related build error with ozone-wayland
> +
> +This fixes the following compilation error:
> +
> +../../third_party/libsecret/secret.h:18:18: fatal error: glib.h: No such file or directory
> +
> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> +---
> + chrome/chrome_browser.gypi | 3 +++
> + 1 file changed, 3 insertions(+)
> +
> +diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
> +index d964fec..daccacb 100644
> +--- a/chrome/chrome_browser.gypi
> ++++ b/chrome/chrome_browser.gypi
> +@@ -3543,6 +3543,9 @@
> +           ],
> +         }],
> +         ['OS=="linux" and chromeos!=1', {
> ++          'dependencies': [
> ++            '../build/linux/system.gyp:glib',
> ++          ],
> +           'sources': [ '<@(chrome_browser_libsecret_sources)' ],
> +           'defines': [
> +             'USE_LIBSECRET',
> +-- 
> +2.5.0
> +
> diff --git a/recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch b/recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch
> new file mode 100644
> index 0000000..3bf6d96
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch
> @@ -0,0 +1,26 @@
> +From 12d7fb643188ea5033aaf70ffe64b4c58eefc5eb Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Fri, 29 Apr 2016 14:02:44 +0200
> +Subject: [PATCH] Fix GCC uninitialized warning
> +
> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> +---
> + third_party/ots/src/name.cc | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/third_party/ots/src/name.cc b/third_party/ots/src/name.cc
> +index a0dd1ea..070ddae 100644
> +--- a/third_party/ots/src/name.cc
> ++++ b/third_party/ots/src/name.cc
> +@@ -79,7 +79,7 @@ bool ots_name_parse(Font *font, const uint8_t* data, size_t length) {
> +   const char* string_base = reinterpret_cast<const char*>(data) +
> +       string_offset;
> + 
> +-  NameRecord prev_record;
> ++  NameRecord prev_record(0, 0, 0, 0);
> +   bool sort_required = false;
> + 
> +   // Read all the names, discarding any with invalid IDs,
> +-- 
> +2.5.0
> +
> diff --git a/recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch b/recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch
> new file mode 100644
> index 0000000..f5f7889
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch
> @@ -0,0 +1,46 @@
> +From 2d7143090fdfd82950be352078daa5019279d81f Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Fri, 29 Apr 2016 17:14:15 +0200
> +Subject: [PATCH] Fix build errors with GCC in Debug mode
> +
> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> +---
> + third_party/WebKit/Source/wtf/dtoa/utils.h                         | 7 +++++++
> + .../cacheinvalidation/src/google/cacheinvalidation/include/types.h | 2 +-
> + 2 files changed, 8 insertions(+), 1 deletion(-)
> +
> +diff --git a/third_party/WebKit/Source/wtf/dtoa/utils.h b/third_party/WebKit/Source/wtf/dtoa/utils.h
> +index 0a61c01..7738e9a 100644
> +--- a/third_party/WebKit/Source/wtf/dtoa/utils.h
> ++++ b/third_party/WebKit/Source/wtf/dtoa/utils.h
> +@@ -165,7 +165,14 @@ namespace double_conversion {
> + 
> +         // Access individual vector elements - checks bounds in debug mode.
> +         T& operator[](int index) const {
> ++#if !defined(NDEBUG)
> ++#pragma GCC diagnostic push
> ++#pragma GCC diagnostic ignored "-Wstrict-overflow"
> ++#endif // !defined(NDEBUG)
> +             ASSERT(0 <= index && index < length_);
> ++#if !defined(NDEBUG)
> ++#pragma GCC diagnostic pop
> ++#endif // !defined(NDEBUG)
> +             return start_[index];
> +         }
> + 
> +diff --git a/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h b/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
> +index 4e3be27..835e956 100644
> +--- a/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
> ++++ b/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
> +@@ -172,7 +172,7 @@ class ErrorInfo {
> +  */
> + class ObjectId {
> +  public:
> +-  ObjectId() : is_initialized_(false) {}
> ++  ObjectId() : is_initialized_(false), source_(0) {}
> + 
> +   /* Creates an object id for the given source and name (the name is copied). */
> +   ObjectId(int source, const string& name)
> +-- 
> +2.5.0
> +
> diff --git a/recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch b/recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch
> new file mode 100644
> index 0000000..30cd511
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch
> @@ -0,0 +1,25 @@
> +From 135debdc4613d5d323d1659166466f74f2e75284 Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Fri, 6 May 2016 12:44:36 +0200
> +Subject: [PATCH] Fix "'rv' may be used uninitialized in this function" warning
> +
> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> +---
> + third_party/mojo/src/mojo/edk/system/unique_identifier.cc | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/third_party/mojo/src/mojo/edk/system/unique_identifier.cc b/third_party/mojo/src/mojo/edk/system/unique_identifier.cc
> +index 22abf22..6f9a761 100644
> +--- a/third_party/mojo/src/mojo/edk/system/unique_identifier.cc
> ++++ b/third_party/mojo/src/mojo/edk/system/unique_identifier.cc
> +@@ -31,6 +31,7 @@ UniqueIdentifier UniqueIdentifier::FromString(const std::string& s,
> +     memcpy(rv.data_, &bytes[0], sizeof(rv.data_));
> +     *success = true;
> +   } else {
> ++    memset(rv.data_, 0, sizeof(rv.data_));
> +     *success = false;
> +   }
> +   return rv;
> +-- 
> +2.7.4
> +
> diff --git a/recipes-browser/chromium/chromium/chromium-40/add_missing_stat_h_include.patch b/recipes-browser/chromium/chromium/chromium-48/add_missing_stat_h_include.patch
> similarity index 90%
> rename from recipes-browser/chromium/chromium/chromium-40/add_missing_stat_h_include.patch
> rename to recipes-browser/chromium/chromium/chromium-48/add_missing_stat_h_include.patch
> index 90e7827..4620db2 100644
> --- a/recipes-browser/chromium/chromium/chromium-40/add_missing_stat_h_include.patch
> +++ b/recipes-browser/chromium/chromium/chromium-48/add_missing_stat_h_include.patch
> @@ -27,8 +27,8 @@ Tested with ARCH armv7.
>  Signed-off-by: Max Krummenacher <max.oss.09 at gmail.com>
>  Upstream-Status: Pending
>  
> ---- chromium-40.0.2214.91/components/storage_monitor/storage_monitor_linux.cc~	2015-01-21 21:28:16.000000000 +0100
> -+++ chromium-40.0.2214.91/components/storage_monitor/storage_monitor_linux.cc	2015-10-27 13:21:08.405655894 +0100
> +--- a/components/storage_monitor/storage_monitor_linux.cc~	2015-01-21 21:28:16.000000000 +0100
> ++++ b/components/storage_monitor/storage_monitor_linux.cc	2015-10-27 13:21:08.405655894 +0100
>  @@ -8,6 +8,7 @@
>   
>   #include <mntent.h>
> diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb
> deleted file mode 100644
> index 3966548..0000000
> --- a/recipes-browser/chromium/chromium_40.0.2214.91.bb
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -include chromium-browser.inc
> -
> -SRC_URI += "\
> -        file://unistd-2.patch \
> -        file://chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch \
> -        file://chromium-40/add_missing_stat_h_include.patch \
> -        file://chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch \
> -        file://chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch \
> -        file://chromium-40/0003-disable-uninitialized-warning.patch \
> -        file://chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch \
> -        ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
> -        ${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', 'file://chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch', '', d)} \
> -        ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-40/0003-Disable-API-keys-info-bar.patch', '', d)} \
> -"
> -
> -LIC_FILES_CHKSUM = "file://LICENSE;md5=537e0b52077bf0a616d0a0c8a79bc9d5"
> -SRC_URI[md5sum] = "1f5093bd7e435fdebad070e74bfb3438"
> -SRC_URI[sha256sum] = "f72fda9ff1ea256ab911610ee532eadf8303137d431f2481d01d3d60e5e64149"
> -
> -OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
> -OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
> -
> -OZONE_WAYLAND_EXTRA_PATCHES = " \
> -        file://chromium-40/0005-Remove-X-libraries-from-GYP-files.patch \
> -        file://chromium-40/0010-systemd-218.patch \
> -"
> -# using 00*.patch to skip the WebRTC patches in ozone-wayland ThanksGiving milestone.
> -# The WebRTC patches remove X11 libraries from the linker flags, which is
> -# already done by another patch (see above). Furthermore, to be able to use
> -# these patches, it is necessary to update the git repository in third_party/webrtc,
> -# which would further complicate this recipe.
> -OZONE_WAYLAND_PATCH_FILE_GLOB = "00*.patch"
> -
> -# Component build is broken in ozone-wayland for Chromium 40,
> -# and is not planned to work again before version 41
> -python() {
> -    if (d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1'):
> -        if bb.utils.contains('PACKAGECONFIG', 'component-build', True, False, d):
> -            bb.fatal("Chromium 40 Wayland version cannot be built in component-mode")
> -}
> -
> -CHROMIUM_X11_DEPENDS = "xextproto gtk+ libxi libxss"
> -CHROMIUM_X11_GYP_DEFINES = ""
> -CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
> -CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1"
> diff --git a/recipes-browser/chromium/chromium_48.0.2548.0.bb b/recipes-browser/chromium/chromium_48.0.2548.0.bb
> new file mode 100644
> index 0000000..369d6fa
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium_48.0.2548.0.bb
> @@ -0,0 +1,43 @@
> +include chromium-browser.inc
> +
> +SRC_URI += "\
> +        file://chromium-48/add_missing_stat_h_include.patch \
> +        file://chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch \
> +        file://chromium-48/0002-image_util.cc-disable-warning-from-gcc-5.patch \
> +        file://chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch \
> +        file://chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch \
> +        file://chromium-48/0005-Override-root-filesystem-access-restriction.patch \
> +        file://chromium-48/0008-Fix-GCC-uninitialized-warning.patch \
> +        file://chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch \
> +        file://chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch \
> +        ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
> +        ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-48/0002-Disable-API-keys-info-bar.patch', '', d)} \
> +"
> +
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d"
> +SRC_URI[md5sum] = "0534981cc21efcd11e64b67b85854420"
> +SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f680dbc8"
> +
> +EXTRA_OEGYP += " \
> +	-Dv8_use_external_startup_data=0 \
> +"
> +
> +OZONE_WAYLAND_GIT_BRANCH = "Milestone-SouthSister"
> +OZONE_WAYLAND_GIT_SRCREV = "c605505044af3345a276abbd7c29fd53db1dea40"
> +
> +OZONE_WAYLAND_EXTRA_PATCHES = " \
> +	file://chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch \
> +	file://chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.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")
> +}
> +
> +CHROMIUM_X11_DEPENDS = "xextproto gtk+ libxi libxss"
> +CHROMIUM_X11_GYP_DEFINES = ""
> +CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
> +CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1 use_xkbcommon=1"
> -- 
> 2.7.4
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [meta-browser][PATCH v2 3/3] chromium: Upgrade to version 48.0.2548.0
  2016-05-18 15:04   ` Martin Jansa
@ 2016-05-19  5:58     ` Carlos Rafael Giani
  2016-05-20 11:41     ` [meta-browser][PATCH] chromium: Add workarounds for compiler errors Carlos Rafael Giani
  1 sibling, 0 replies; 7+ messages in thread
From: Carlos Rafael Giani @ 2016-05-19  5:58 UTC (permalink / raw)
  To: openembedded-devel

I'm running a test against this. Will have updates in ~1 day.

On 2016-05-18 17:04, Martin Jansa wrote:
> On Sun, May 08, 2016 at 02:20:38PM +0200, Carlos Rafael Giani wrote:
>> Not upgrading to M49 or M50 in this commit since this is currently the
>> latest version that is supported by ozone-wayland
> Thanks for fixing that issue with gold, now there is new issue since
> glibc was upgraded in oe-core to 2.24 which deprecated readdir_r
>
> http://errors.yoctoproject.org/Errors/Details/64087/
>
> Anyone willing to patch it to use readdir?
>
> Thanks
>
>> Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> ---
>>   ...Add-Linux-to-impl-side-painting-whitelist.patch | 39 -----------
>>   .../0003-disable-uninitialized-warning.patch       | 19 ------
>>   .../0005-Remove-X-libraries-from-GYP-files.patch   | 77 ----------------------
>>   .../chromium/chromium-40/0010-systemd-218.patch    | 39 -----------
>>   .../fix-build-error-with-GCC-in-Debug-mode.patch   | 32 ---------
>>   ...accelerated-Canvas-support-from-blacklist.patch | 20 ++++--
>>   ...0001-bignum.cc-disable-warning-from-gcc-5.patch |  4 +-
>>   .../0002-Disable-API-keys-info-bar.patch}          |  2 +-
>>   ...-image_util.cc-disable-warning-from-gcc-5.patch |  0
>>   ...-Remove-hard-coded-values-for-CC-and-CXX.patch} |  8 +--
>>   ...y-i18n_process_css_test.html-file-to-avoi.patch | 26 ++++++++
>>   ...erride-root-filesystem-access-restriction.patch | 30 +++++++++
>>   .../0006-Remove-GBM-support-from-wayland.gyp.patch | 66 +++++++++++++++++++
>>   ...for-glib-related-build-error-with-ozone-w.patch | 31 +++++++++
>>   .../0008-Fix-GCC-uninitialized-warning.patch       | 26 ++++++++
>>   ...9-Fix-build-errors-with-GCC-in-Debug-mode.patch | 46 +++++++++++++
>>   ...be-used-uninitialized-in-this-function-wa.patch | 25 +++++++
>>   .../add_missing_stat_h_include.patch               |  4 +-
>>   recipes-browser/chromium/chromium_40.0.2214.91.bb  | 45 -------------
>>   recipes-browser/chromium/chromium_48.0.2548.0.bb   | 43 ++++++++++++
>>   20 files changed, 315 insertions(+), 267 deletions(-)
>>   delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch
>>   delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch
>>   delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch
>>   delete mode 100644 recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
>>   delete mode 100644 recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
>>   rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/0001-Remove-accelerated-Canvas-support-from-blacklist.patch (71%)
>>   rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/0001-bignum.cc-disable-warning-from-gcc-5.patch (98%)
>>   rename recipes-browser/chromium/chromium/{chromium-40/0003-Disable-API-keys-info-bar.patch => chromium-48/0002-Disable-API-keys-info-bar.patch} (95%)
>>   rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/0002-image_util.cc-disable-warning-from-gcc-5.patch (100%)
>>   rename recipes-browser/chromium/chromium/{chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch => chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch} (86%)
>>   create mode 100644 recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch
>>   create mode 100644 recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch
>>   create mode 100644 recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch
>>   create mode 100644 recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch
>>   create mode 100644 recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch
>>   create mode 100644 recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch
>>   create mode 100644 recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch
>>   rename recipes-browser/chromium/chromium/{chromium-40 => chromium-48}/add_missing_stat_h_include.patch (90%)
>>   delete mode 100644 recipes-browser/chromium/chromium_40.0.2214.91.bb
>>   create mode 100644 recipes-browser/chromium/chromium_48.0.2548.0.bb
>>
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch b/recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch
>> deleted file mode 100644
>> index b5916ca..0000000
>> --- a/recipes-browser/chromium/chromium/chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch
>> +++ /dev/null
>> @@ -1,39 +0,0 @@
>> -From 61cbd67e88f5e99185d7df1a05f842c58e691495 Mon Sep 17 00:00:00 2001
>> -From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> -Date: Sun, 21 Dec 2014 01:01:04 +0100
>> -Subject: [PATCH] Add Linux to impl side painting whitelist
>> -
>> -Upstream-Status: Inappropriate [enable feature]
>> -
>> -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> ----
>> - gpu/config/software_rendering_list_json.cc | 7 ++++++-
>> - 1 file changed, 6 insertions(+), 1 deletion(-)
>> -
>> -diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc
>> -index ccf1460..8630d75 100644
>> ---- a/gpu/config/software_rendering_list_json.cc
>> -+++ b/gpu/config/software_rendering_list_json.cc
>> -@@ -1088,13 +1088,18 @@ LONG_STRING_CONST(
>> -     },
>> -     {
>> -       "id": 99,
>> --      "description": "GPU rasterization is blacklisted on non-Android",
>> -+      "description": "GPU rasterization is blacklisted on non-Android and non-Linux (Yocto patch)",
>> -       "cr_bugs": [362779],
>> -       "exceptions": [
>> -         {
>> -           "os": {
>> -             "type": "android"
>> -           }
>> -+        },
>> -+        {
>> -+          "os": {
>> -+            "type": "linux"
>> -+          }
>> -         }
>> -       ],
>> -       "features": [
>> ---
>> -1.9.1
>> -
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch b/recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch
>> deleted file mode 100644
>> index 232dbf4..0000000
>> --- a/recipes-browser/chromium/chromium/chromium-40/0003-disable-uninitialized-warning.patch
>> +++ /dev/null
>> @@ -1,19 +0,0 @@
>> -../../third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp: In static member function 'static void WTF::HashTableBucketInitializer<false>::initialize(Value&) [with Traits = WTF::HashMapValueTraits<WTF::HashTraits<int>, WTF::HashTraits<blink::TimelineThreadState> >; Value = WTF::KeyValuePair<int, blink::TimelineThreadState>]':
>> -../../third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp:234:8: error: '<anonymous>.blink::TimelineThreadState::inKnownLayerTask' is used uninitialized in this function [-Werror=uninitialized]
>> - struct TimelineThreadState {
>> -        ^
>> -
>> ---- a/third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp	2016-03-10 08:14:18.771413000 -1000
>> -+++ b/third_party/WebKit/Source/core/inspector/InspectorTimelineAgent.cpp	2016-03-10 08:15:58.179413000 -1000
>> -@@ -231,7 +231,11 @@
>> -     Vector<Entry> m_stack;
>> - };
>> -
>> -+#pragma GCC diagnostic push
>> -+#pragma GCC diagnostic warning "-Wuninitialized"
>> - struct TimelineThreadState {
>> -+#pragma GCC diagnostic pop
>> -+
>> -     ALLOW_ONLY_INLINE_ALLOCATION();
>> - public:
>> -     TimelineThreadState() { }
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch b/recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch
>> deleted file mode 100644
>> index 632590a..0000000
>> --- a/recipes-browser/chromium/chromium/chromium-40/0005-Remove-X-libraries-from-GYP-files.patch
>> +++ /dev/null
>> @@ -1,77 +0,0 @@
>> -From 23e33854a1c5cddc56acd9abdbda14757b809c7d Mon Sep 17 00:00:00 2001
>> -From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> -Date: Sun, 12 Oct 2014 18:08:37 +0200
>> -Subject: [PATCH] Remove X libraries from GYP files
>> -
>> -Some X libraries are linked even when ozone-wayland is used, causing
>> -linker errors if no X libraries are around
>> -
>> -Upstream-Status: Pending
>> -
>> -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> ----
>> - third_party/libjingle/source/talk/libjingle.gyp                 | 2 --
>> - third_party/libjingle/source/talk/libjingle_examples.gyp        | 4 ----
>> - third_party/webrtc/base/base.gyp                                | 4 ----
>> - third_party/webrtc/modules/desktop_capture/desktop_capture.gypi | 2 +-
>> - 4 files changed, 1 insertion(+), 11 deletions(-)
>> -
>> -diff --git a/third_party/libjingle/source/talk/libjingle.gyp b/third_party/libjingle/source/talk/libjingle.gyp
>> -index 90d1f41..22655dc 100755
>> ---- a/third_party/libjingle/source/talk/libjingle.gyp
>> -+++ b/third_party/libjingle/source/talk/libjingle.gyp
>> -@@ -455,8 +455,6 @@
>> -           ],
>> -           'libraries': [
>> -             '-lrt',
>> --            '-lXext',
>> --            '-lX11',
>> -           ],
>> -         }],
>> -         ['OS=="win"', {
>> -diff --git a/third_party/libjingle/source/talk/libjingle_examples.gyp b/third_party/libjingle/source/talk/libjingle_examples.gyp
>> -index f7ce53b..204bc1e 100755
>> ---- a/third_party/libjingle/source/talk/libjingle_examples.gyp
>> -+++ b/third_party/libjingle/source/talk/libjingle_examples.gyp
>> -@@ -207,10 +207,6 @@
>> -                 'libraries': [
>> -                   '<!@(pkg-config --libs-only-l glib-2.0 gobject-2.0'
>> -                       ' gthread-2.0 gtk+-2.0)',
>> --                  '-lX11',
>> --                  '-lXcomposite',
>> --                  '-lXext',
>> --                  '-lXrender',
>> -                 ],
>> -               },
>> -             }],  # OS=="linux"
>> -diff --git a/third_party/webrtc/base/base.gyp b/third_party/webrtc/base/base.gyp
>> -index 2fd64ba..ccab4e9 100644
>> ---- a/third_party/webrtc/base/base.gyp
>> -+++ b/third_party/webrtc/base/base.gyp
>> -@@ -593,10 +593,6 @@
>> -             'libraries': [
>> -               '-ldl',
>> -               '-lrt',
>> --              '-lXext',
>> --              '-lX11',
>> --              '-lXcomposite',
>> --              '-lXrender',
>> -             ],
>> -           },
>> -         }, {
>> -diff --git a/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi b/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
>> -index 1b702f2..93ede57 100644
>> ---- a/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
>> -+++ b/third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
>> -@@ -97,7 +97,7 @@
>> -             'desktop_capture_differ_sse2',
>> -           ],
>> -         }],
>> --        ['use_x11 == 1', {
>> -+        ['use_x11 == 1 and <(ozone_platform_wayland) != 1', {
>> -           'link_settings': {
>> -             'libraries': [
>> -               '-lX11',
>> ---
>> -1.9.1
>> -
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch b/recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
>> deleted file mode 100644
>> index 3aec8d0..0000000
>> --- a/recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
>> +++ /dev/null
>> @@ -1,39 +0,0 @@
>> -Remove use of udev_set_log_priority API its gone in systemd >= 218
>> -
>> -Upstream-Status: Pending
>> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> -
>> -Index: chromium-40.0.2214.91/ui/events/ozone/device/udev/device_manager_udev.cc
>> -===================================================================
>> ---- chromium-40.0.2214.91.orig/ui/events/ozone/device/udev/device_manager_udev.cc
>> -+++ chromium-40.0.2214.91/ui/events/ozone/device/udev/device_manager_udev.cc
>> -@@ -33,29 +33,9 @@ enum {
>> -   SYS_LOG_DEBUG = 7,
>> - };
>> -
>> --// Log handler for messages generated from libudev.
>> --void UdevLog(struct udev* udev,
>> --             int priority,
>> --             const char* file,
>> --             int line,
>> --             const char* fn,
>> --             const char* format,
>> --             va_list args) {
>> --  if (priority <= SYS_LOG_ERR)
>> --    LOG(ERROR) << "libudev: " << fn << ": " << base::StringPrintV(format, args);
>> --  else if (priority <= SYS_LOG_INFO)
>> --    VLOG(1) << "libudev: " << fn << ": " << base::StringPrintV(format, args);
>> --  else  // SYS_LOG_DEBUG
>> --    VLOG(2) << "libudev: " << fn << ": " << base::StringPrintV(format, args);
>> --}
>> --
>> - // Create libudev context.
>> - device::ScopedUdevPtr UdevCreate() {
>> -   struct udev* udev = udev_new();
>> --  if (udev) {
>> --    udev_set_log_fn(udev, UdevLog);
>> --    udev_set_log_priority(udev, SYS_LOG_DEBUG);
>> --  }
>> -   return device::ScopedUdevPtr(udev);
>> - }
>> -
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch b/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
>> deleted file mode 100644
>> index c05598a..0000000
>> --- a/recipes-browser/chromium/chromium/chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch
>> +++ /dev/null
>> @@ -1,32 +0,0 @@
>> -From bfe80ed5227fccf8ab13df714702fc77e5e3d657 Mon Sep 17 00:00:00 2001
>> -From: Carlos Alberto Lopez Perez <clopez@igalia.com>
>> -Date: Thu, 27 Aug 2015 09:54:06 +0200
>> -Subject: [PATCH] Fix build error with GCC in Debug mode:
>> -
>> -  http://code.google.com/p/chromium/issues/detail?id=525428
>> ----
>> - components/invalidation/invalidator_storage.cc | 7 +++++++
>> - 1 file changed, 7 insertions(+)
>> -
>> -diff --git a/components/invalidation/invalidator_storage.cc b/components/invalidation/invalidator_storage.cc
>> -index 13ba4b1..3d567c1 100644
>> ---- a/components/invalidation/invalidator_storage.cc
>> -+++ b/components/invalidation/invalidator_storage.cc
>> -@@ -2,7 +2,14 @@
>> - // Use of this source code is governed by a BSD-style license that can be
>> - // found in the LICENSE file.
>> -
>> -+#if !defined(NDEBUG)
>> -+#pragma GCC diagnostic push
>> -+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
>> -+#endif // !defined(NDEBUG)
>> - #include "components/invalidation/invalidator_storage.h"
>> -+#if !defined(NDEBUG)
>> -+#pragma GCC diagnostic pop
>> -+#endif // !defined(NDEBUG)
>> -
>> - #include <string>
>> - #include <utility>
>> ---
>> -2.1.4
>> -
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch b/recipes-browser/chromium/chromium/chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
>> similarity index 71%
>> rename from recipes-browser/chromium/chromium/chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
>> rename to recipes-browser/chromium/chromium/chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
>> index e2c1a5c..2d7bf84 100644
>> --- a/recipes-browser/chromium/chromium/chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
>> @@ -1,6 +1,6 @@
>> -From 821d9fde2302f68f7cb7f0b211f4f78220c97180 Mon Sep 17 00:00:00 2001
>> +From be6f1d02f3f784594642929dff289dae33014d56 Mon Sep 17 00:00:00 2001
>>   From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> -Date: Sun, 12 Oct 2014 17:54:18 +0200
>> +Date: Sun, 3 Apr 2016 17:46:59 +0200
>>   Subject: [PATCH] Remove accelerated Canvas support from blacklist
>>   
>>   Together with the --gpu-no-context-lost command line switch, this patch is
>> @@ -14,14 +14,14 @@ http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-September/206450.html
>>   
>>   Upstream-Status: Inappropiate [see link above]
>>   ---
>> - gpu/config/software_rendering_list_json.cc | 10 ----------
>> - 1 file changed, 10 deletions(-)
>> + gpu/config/software_rendering_list_json.cc | 16 ----------------
>> + 1 file changed, 16 deletions(-)
>>   
>>   diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc
>> -index b9f5e3a..ccf1460 100644
>> +index 484467d..c3b5855 100644
>>   --- a/gpu/config/software_rendering_list_json.cc
>>   +++ b/gpu/config/software_rendering_list_json.cc
>> -@@ -240,16 +240,6 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
>> +@@ -240,22 +240,6 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
>>          ]
>>        },
>>        {
>> @@ -30,6 +30,12 @@ index b9f5e3a..ccf1460 100644
>>   -      "os": {
>>   -        "type": "linux"
>>   -      },
>> +-      "exceptions": [
>> +-        {
>> +-          "gl_vendor": "Vivante Corporation",
>> +-          "gl_renderer": "Vivante GC1000"
>> +-        }
>> +-      ],
>>   -      "features": [
>>   -        "accelerated_2d_canvas"
>>   -      ]
>> @@ -39,5 +45,5 @@ index b9f5e3a..ccf1460 100644
>>          "description": "ATI/AMD cards with older drivers in Linux are crash-prone",
>>          "cr_bugs": [95934, 94973, 136240, 357314],
>>   --
>> -1.9.1
>> +2.5.0
>>   
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch
>> similarity index 98%
>> rename from recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
>> rename to recipes-browser/chromium/chromium/chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch
>> index 86691a5..67f9800 100644
>> --- a/recipes-browser/chromium/chromium/chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch
>> @@ -34,7 +34,7 @@ index a000b46..6c6d336 100644
>>            // 2^64 = 18446744073709551616 > 10^19
>>            const int kMaxUint64DecimalDigits = 19;
>>            Zero();
>> -@@ -699,7 +699,10 @@
>> +@@ -696,7 +696,10 @@
>>        }
>>   
>>   
>> @@ -45,7 +45,7 @@ index a000b46..6c6d336 100644
>>            if (exponent_ > other.exponent_) {
>>                // If "X" represents a "hidden" digit (by the exponent) then we are in the
>>                // following case (a == this, b == other):
>> -@@ -715,7 +715,10 @@
>> +@@ -709,7 +709,10 @@
>>                for (int i = used_digits_ - 1; i >= 0; --i) {
>>                    bigits_[i + zero_digits] = bigits_[i];
>>                }
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/0003-Disable-API-keys-info-bar.patch b/recipes-browser/chromium/chromium/chromium-48/0002-Disable-API-keys-info-bar.patch
>> similarity index 95%
>> rename from recipes-browser/chromium/chromium/chromium-40/0003-Disable-API-keys-info-bar.patch
>> rename to recipes-browser/chromium/chromium/chromium-48/0002-Disable-API-keys-info-bar.patch
>> index f36fc24..56a5b28 100644
>> --- a/recipes-browser/chromium/chromium/chromium-40/0003-Disable-API-keys-info-bar.patch
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0002-Disable-API-keys-info-bar.patch
>> @@ -22,7 +22,7 @@ index edea11a..4aef68f 100644
>>        return;
>>    
>>   +#if 0
>> -   infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
>> +   infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar(
>>          scoped_ptr<ConfirmInfoBarDelegate>(new GoogleApiKeysInfoBarDelegate())));
>>   +#endif
>>    }
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch b/recipes-browser/chromium/chromium/chromium-48/0002-image_util.cc-disable-warning-from-gcc-5.patch
>> similarity index 100%
>> rename from recipes-browser/chromium/chromium/chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch
>> rename to recipes-browser/chromium/chromium/chromium-48/0002-image_util.cc-disable-warning-from-gcc-5.patch
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch b/recipes-browser/chromium/chromium/chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch
>> similarity index 86%
>> rename from recipes-browser/chromium/chromium/chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch
>> rename to recipes-browser/chromium/chromium/chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch
>> index 402a674..7bc8d14 100644
>> --- a/recipes-browser/chromium/chromium/chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch
>> @@ -21,13 +21,13 @@ diff --git a/build/common.gypi b/build/common.gypi
>>   index 7ec5ae2..11e8d1d 100644
>>   --- a/build/common.gypi
>>   +++ b/build/common.gypi
>> -@@ -5808,16 +5808,6 @@
>> +@@ -6047,16 +6047,6 @@
>>            ['CXX.host', '<(host_cxx)'],
>>          ],
>>        }],
>>   -    ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 and clang==0', {
>> --      # Set default ARM cross compiling on linux.  These can be overridden
>> --      # using CC/CXX/etc environment variables.
>> +-      # Set default ARM cross tools on linux.  These can be overridden
>> +-      # using CC,CXX,CC.host and CXX.host environment variables.
>>   -      'make_global_settings': [
>>   -        ['CC', '<!(which arm-linux-gnueabihf-gcc)'],
>>   -        ['CXX', '<!(which arm-linux-gnueabihf-g++)'],
>> @@ -35,9 +35,9 @@ index 7ec5ae2..11e8d1d 100644
>>   -        ['CXX.host', '<(host_cxx)'],
>>   -      ],
>>   -    }],
>> -
>>        # TODO(yyanagisawa): supports GENERATOR==make
>>        #  make generator doesn't support CC_wrapper without CC
>> +     #  in make_global_settings yet.
>>   --
>>   1.9.1
>>   
>> diff --git a/recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch b/recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch
>> new file mode 100644
>> index 0000000..24bec71
>> --- /dev/null
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch
>> @@ -0,0 +1,26 @@
>> +From 5158da97132db1a43c95f4c0ad65b4ac2629c4da Mon Sep 17 00:00:00 2001
>> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +Date: Sat, 23 Apr 2016 14:05:04 +0200
>> +Subject: [PATCH] Create empty i18n_process_css_test.html file to avoid build
>> + failure
>> +
>> +According to https://groups.google.com/a/chromium.org/forum/#!topic/chromium-packagers/9JX1N2nf4PU
>> +creating an empty i18n_process_css_test.html is a valid workaround for the
>> +following build error:
>> +
>> +"Exception: Failed to open test/data/webui/i18n_process_css_test.html while trying to flatten test/data/webui/i18n_process_css_test.html. (No such file or directory)"
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +---
>> + chrome/test/data/webui/i18n_process_css_test.html | 0
>> + 1 file changed, 0 insertions(+), 0 deletions(-)
>> + create mode 100644 chrome/test/data/webui/i18n_process_css_test.html
>> +
>> +diff --git a/chrome/test/data/webui/i18n_process_css_test.html b/chrome/test/data/webui/i18n_process_css_test.html
>> +new file mode 100644
>> +index 0000000..e69de29
>> +--
>> +2.5.0
>> +
>> diff --git a/recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch b/recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch
>> new file mode 100644
>> index 0000000..ceb6c6c
>> --- /dev/null
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0005-Override-root-filesystem-access-restriction.patch
>> @@ -0,0 +1,30 @@
>> +From ef3aaa58be440c1845e60432a498501088da07fe Mon Sep 17 00:00:00 2001
>> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +Date: Thu, 28 Apr 2016 09:29:59 +0200
>> +Subject: [PATCH] Override root filesystem access restriction
>> +
>> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +---
>> + sandbox/linux/suid/client/setuid_sandbox_client.cc | 4 ++++
>> + 1 file changed, 4 insertions(+)
>> +
>> +diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.cc b/sandbox/linux/suid/client/setuid_sandbox_client.cc
>> +index 12ef7f9..b59908a 100644
>> +--- a/sandbox/linux/suid/client/setuid_sandbox_client.cc
>> ++++ b/sandbox/linux/suid/client/setuid_sandbox_client.cc
>> +@@ -21,8 +21,12 @@
>> + namespace {
>> +
>> + bool IsFileSystemAccessDenied() {
>> ++#if 0
>> +   base::ScopedFD root_dir(HANDLE_EINTR(open("/", O_RDONLY)));
>> +   return !root_dir.is_valid();
>> ++#else
>> ++  return true;
>> ++#endif
>> + }
>> +
>> + int GetHelperApi(base::Environment* env) {
>> +--
>> +2.5.0
>> +
>> diff --git a/recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch b/recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch
>> new file mode 100644
>> index 0000000..63cc1ee
>> --- /dev/null
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch
>> @@ -0,0 +1,66 @@
>> +From 77384aa0d93ed6d5f91ada40971f6825e1b9dd69 Mon Sep 17 00:00:00 2001
>> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +Date: Thu, 28 Apr 2016 22:02:39 +0200
>> +Subject: [PATCH] Remove GBM support from wayland.gyp
>> +
>> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +---
>> + ozone/wayland/wayland.gyp | 20 --------------------
>> + 1 file changed, 20 deletions(-)
>> +
>> +diff --git a/wayland/wayland.gyp b/wayland/wayland.gyp
>> +index ff2e210..32f13bc 100644
>> +--- a/ozone/wayland/wayland.gyp
>> ++++ b/ozone/wayland/wayland.gyp
>> +@@ -5,10 +5,6 @@
>> +
>> + {
>> +   'variables': {
>> +-    'variables': {
>> +-      'enable_drm_support%': 0,
>> +-    },
>> +-    'enable_drm_support%': '<(enable_drm_support)',
>> +     'conditions': [
>> +       ['sysroot!=""', {
>> +         'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
>> +@@ -42,17 +38,14 @@
>> +       'direct_dependent_settings': {
>> +         'cflags': [
>> +           '<!@(<(pkg-config) --cflags <(wayland_packages))',
>> +-          '<!@(<(pkg-config) --cflags gbm)',
>> +         ],
>> +       },
>> +       'link_settings': {
>> +         'ldflags': [
>> +           '<!@(<(pkg-config) --libs-only-L --libs-only-other <(wayland_packages))',
>> +-          '<!@(<(pkg-config) --libs-only-L --libs-only-other gbm)',
>> +         ],
>> +         'libraries': [
>> +           '<!@(<(pkg-config) --libs-only-l <(wayland_packages))',
>> +-          '<!@(<(pkg-config) --libs-only-l gbm)',
>> +         ],
>> +       },
>> +       'dependencies': [
>> +@@ -65,19 +58,6 @@
>> +         '../..',
>> +         '<(DEPTH)/third_party/khronos',
>> +       ],
>> +-      'conditions': [
>> +-        ['<(enable_drm_support)==1', {
>> +-          'defines': [
>> +-          'ENABLE_DRM_SUPPORT',
>> +-          ],
>> +-          'sources': [
>> +-            'egl/wayland_pixmap.cc',
>> +-            'egl/wayland_pixmap.h',
>> +-            'protocol/wayland-drm-protocol.cc',
>> +-            'protocol/wayland-drm-protocol.h',
>> +-          ],
>> +-        }],
>> +-      ],
>> +       'sources': [
>> +         'data_device.cc',
>> +         'data_device.h',
>> +--
>> +2.5.0
>> +
>> diff --git a/recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch b/recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch
>> new file mode 100644
>> index 0000000..baa8dd2
>> --- /dev/null
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.patch
>> @@ -0,0 +1,31 @@
>> +From 36a6b35b5eb2874a85b5bc1caf111213c0bee04b Mon Sep 17 00:00:00 2001
>> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +Date: Fri, 29 Apr 2016 08:52:12 +0200
>> +Subject: [PATCH] Workaround for glib-related build error with ozone-wayland
>> +
>> +This fixes the following compilation error:
>> +
>> +../../third_party/libsecret/secret.h:18:18: fatal error: glib.h: No such file or directory
>> +
>> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +---
>> + chrome/chrome_browser.gypi | 3 +++
>> + 1 file changed, 3 insertions(+)
>> +
>> +diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
>> +index d964fec..daccacb 100644
>> +--- a/chrome/chrome_browser.gypi
>> ++++ b/chrome/chrome_browser.gypi
>> +@@ -3543,6 +3543,9 @@
>> +           ],
>> +         }],
>> +         ['OS=="linux" and chromeos!=1', {
>> ++          'dependencies': [
>> ++            '../build/linux/system.gyp:glib',
>> ++          ],
>> +           'sources': [ '<@(chrome_browser_libsecret_sources)' ],
>> +           'defines': [
>> +             'USE_LIBSECRET',
>> +--
>> +2.5.0
>> +
>> diff --git a/recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch b/recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch
>> new file mode 100644
>> index 0000000..3bf6d96
>> --- /dev/null
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0008-Fix-GCC-uninitialized-warning.patch
>> @@ -0,0 +1,26 @@
>> +From 12d7fb643188ea5033aaf70ffe64b4c58eefc5eb Mon Sep 17 00:00:00 2001
>> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +Date: Fri, 29 Apr 2016 14:02:44 +0200
>> +Subject: [PATCH] Fix GCC uninitialized warning
>> +
>> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +---
>> + third_party/ots/src/name.cc | 2 +-
>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> +
>> +diff --git a/third_party/ots/src/name.cc b/third_party/ots/src/name.cc
>> +index a0dd1ea..070ddae 100644
>> +--- a/third_party/ots/src/name.cc
>> ++++ b/third_party/ots/src/name.cc
>> +@@ -79,7 +79,7 @@ bool ots_name_parse(Font *font, const uint8_t* data, size_t length) {
>> +   const char* string_base = reinterpret_cast<const char*>(data) +
>> +       string_offset;
>> +
>> +-  NameRecord prev_record;
>> ++  NameRecord prev_record(0, 0, 0, 0);
>> +   bool sort_required = false;
>> +
>> +   // Read all the names, discarding any with invalid IDs,
>> +--
>> +2.5.0
>> +
>> diff --git a/recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch b/recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch
>> new file mode 100644
>> index 0000000..f5f7889
>> --- /dev/null
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch
>> @@ -0,0 +1,46 @@
>> +From 2d7143090fdfd82950be352078daa5019279d81f Mon Sep 17 00:00:00 2001
>> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +Date: Fri, 29 Apr 2016 17:14:15 +0200
>> +Subject: [PATCH] Fix build errors with GCC in Debug mode
>> +
>> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +---
>> + third_party/WebKit/Source/wtf/dtoa/utils.h                         | 7 +++++++
>> + .../cacheinvalidation/src/google/cacheinvalidation/include/types.h | 2 +-
>> + 2 files changed, 8 insertions(+), 1 deletion(-)
>> +
>> +diff --git a/third_party/WebKit/Source/wtf/dtoa/utils.h b/third_party/WebKit/Source/wtf/dtoa/utils.h
>> +index 0a61c01..7738e9a 100644
>> +--- a/third_party/WebKit/Source/wtf/dtoa/utils.h
>> ++++ b/third_party/WebKit/Source/wtf/dtoa/utils.h
>> +@@ -165,7 +165,14 @@ namespace double_conversion {
>> +
>> +         // Access individual vector elements - checks bounds in debug mode.
>> +         T& operator[](int index) const {
>> ++#if !defined(NDEBUG)
>> ++#pragma GCC diagnostic push
>> ++#pragma GCC diagnostic ignored "-Wstrict-overflow"
>> ++#endif // !defined(NDEBUG)
>> +             ASSERT(0 <= index && index < length_);
>> ++#if !defined(NDEBUG)
>> ++#pragma GCC diagnostic pop
>> ++#endif // !defined(NDEBUG)
>> +             return start_[index];
>> +         }
>> +
>> +diff --git a/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h b/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
>> +index 4e3be27..835e956 100644
>> +--- a/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
>> ++++ b/third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
>> +@@ -172,7 +172,7 @@ class ErrorInfo {
>> +  */
>> + class ObjectId {
>> +  public:
>> +-  ObjectId() : is_initialized_(false) {}
>> ++  ObjectId() : is_initialized_(false), source_(0) {}
>> +
>> +   /* Creates an object id for the given source and name (the name is copied). */
>> +   ObjectId(int source, const string& name)
>> +--
>> +2.5.0
>> +
>> diff --git a/recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch b/recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch
>> new file mode 100644
>> index 0000000..30cd511
>> --- /dev/null
>> +++ b/recipes-browser/chromium/chromium/chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch
>> @@ -0,0 +1,25 @@
>> +From 135debdc4613d5d323d1659166466f74f2e75284 Mon Sep 17 00:00:00 2001
>> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +Date: Fri, 6 May 2016 12:44:36 +0200
>> +Subject: [PATCH] Fix "'rv' may be used uninitialized in this function" warning
>> +
>> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
>> +---
>> + third_party/mojo/src/mojo/edk/system/unique_identifier.cc | 1 +
>> + 1 file changed, 1 insertion(+)
>> +
>> +diff --git a/third_party/mojo/src/mojo/edk/system/unique_identifier.cc b/third_party/mojo/src/mojo/edk/system/unique_identifier.cc
>> +index 22abf22..6f9a761 100644
>> +--- a/third_party/mojo/src/mojo/edk/system/unique_identifier.cc
>> ++++ b/third_party/mojo/src/mojo/edk/system/unique_identifier.cc
>> +@@ -31,6 +31,7 @@ UniqueIdentifier UniqueIdentifier::FromString(const std::string& s,
>> +     memcpy(rv.data_, &bytes[0], sizeof(rv.data_));
>> +     *success = true;
>> +   } else {
>> ++    memset(rv.data_, 0, sizeof(rv.data_));
>> +     *success = false;
>> +   }
>> +   return rv;
>> +--
>> +2.7.4
>> +
>> diff --git a/recipes-browser/chromium/chromium/chromium-40/add_missing_stat_h_include.patch b/recipes-browser/chromium/chromium/chromium-48/add_missing_stat_h_include.patch
>> similarity index 90%
>> rename from recipes-browser/chromium/chromium/chromium-40/add_missing_stat_h_include.patch
>> rename to recipes-browser/chromium/chromium/chromium-48/add_missing_stat_h_include.patch
>> index 90e7827..4620db2 100644
>> --- a/recipes-browser/chromium/chromium/chromium-40/add_missing_stat_h_include.patch
>> +++ b/recipes-browser/chromium/chromium/chromium-48/add_missing_stat_h_include.patch
>> @@ -27,8 +27,8 @@ Tested with ARCH armv7.
>>   Signed-off-by: Max Krummenacher <max.oss.09 at gmail.com>
>>   Upstream-Status: Pending
>>   
>> ---- chromium-40.0.2214.91/components/storage_monitor/storage_monitor_linux.cc~	2015-01-21 21:28:16.000000000 +0100
>> -+++ chromium-40.0.2214.91/components/storage_monitor/storage_monitor_linux.cc	2015-10-27 13:21:08.405655894 +0100
>> +--- a/components/storage_monitor/storage_monitor_linux.cc~	2015-01-21 21:28:16.000000000 +0100
>> ++++ b/components/storage_monitor/storage_monitor_linux.cc	2015-10-27 13:21:08.405655894 +0100
>>   @@ -8,6 +8,7 @@
>>    
>>    #include <mntent.h>
>> diff --git a/recipes-browser/chromium/chromium_40.0.2214.91.bb b/recipes-browser/chromium/chromium_40.0.2214.91.bb
>> deleted file mode 100644
>> index 3966548..0000000
>> --- a/recipes-browser/chromium/chromium_40.0.2214.91.bb
>> +++ /dev/null
>> @@ -1,45 +0,0 @@
>> -include chromium-browser.inc
>> -
>> -SRC_URI += "\
>> -        file://unistd-2.patch \
>> -        file://chromium-40/fix-build-error-with-GCC-in-Debug-mode.patch \
>> -        file://chromium-40/add_missing_stat_h_include.patch \
>> -        file://chromium-40/0001-bignum.cc-disable-warning-from-gcc-5.patch \
>> -        file://chromium-40/0002-image_util.cc-disable-warning-from-gcc-5.patch \
>> -        file://chromium-40/0003-disable-uninitialized-warning.patch \
>> -        file://chromium-40/0004-Remove-hard-coded-values-for-CC-and-CXX.patch \
>> -        ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-40/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
>> -        ${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', 'file://chromium-40/0002-Add-Linux-to-impl-side-painting-whitelist.patch', '', d)} \
>> -        ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-40/0003-Disable-API-keys-info-bar.patch', '', d)} \
>> -"
>> -
>> -LIC_FILES_CHKSUM = "file://LICENSE;md5=537e0b52077bf0a616d0a0c8a79bc9d5"
>> -SRC_URI[md5sum] = "1f5093bd7e435fdebad070e74bfb3438"
>> -SRC_URI[sha256sum] = "f72fda9ff1ea256ab911610ee532eadf8303137d431f2481d01d3d60e5e64149"
>> -
>> -OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
>> -OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
>> -
>> -OZONE_WAYLAND_EXTRA_PATCHES = " \
>> -        file://chromium-40/0005-Remove-X-libraries-from-GYP-files.patch \
>> -        file://chromium-40/0010-systemd-218.patch \
>> -"
>> -# using 00*.patch to skip the WebRTC patches in ozone-wayland ThanksGiving milestone.
>> -# The WebRTC patches remove X11 libraries from the linker flags, which is
>> -# already done by another patch (see above). Furthermore, to be able to use
>> -# these patches, it is necessary to update the git repository in third_party/webrtc,
>> -# which would further complicate this recipe.
>> -OZONE_WAYLAND_PATCH_FILE_GLOB = "00*.patch"
>> -
>> -# Component build is broken in ozone-wayland for Chromium 40,
>> -# and is not planned to work again before version 41
>> -python() {
>> -    if (d.getVar('CHROMIUM_ENABLE_WAYLAND', True) == '1'):
>> -        if bb.utils.contains('PACKAGECONFIG', 'component-build', True, False, d):
>> -            bb.fatal("Chromium 40 Wayland version cannot be built in component-mode")
>> -}
>> -
>> -CHROMIUM_X11_DEPENDS = "xextproto gtk+ libxi libxss"
>> -CHROMIUM_X11_GYP_DEFINES = ""
>> -CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
>> -CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1"
>> diff --git a/recipes-browser/chromium/chromium_48.0.2548.0.bb b/recipes-browser/chromium/chromium_48.0.2548.0.bb
>> new file mode 100644
>> index 0000000..369d6fa
>> --- /dev/null
>> +++ b/recipes-browser/chromium/chromium_48.0.2548.0.bb
>> @@ -0,0 +1,43 @@
>> +include chromium-browser.inc
>> +
>> +SRC_URI += "\
>> +        file://chromium-48/add_missing_stat_h_include.patch \
>> +        file://chromium-48/0001-bignum.cc-disable-warning-from-gcc-5.patch \
>> +        file://chromium-48/0002-image_util.cc-disable-warning-from-gcc-5.patch \
>> +        file://chromium-48/0003-Remove-hard-coded-values-for-CC-and-CXX.patch \
>> +        file://chromium-48/0004-Create-empty-i18n_process_css_test.html-file-to-avoi.patch \
>> +        file://chromium-48/0005-Override-root-filesystem-access-restriction.patch \
>> +        file://chromium-48/0008-Fix-GCC-uninitialized-warning.patch \
>> +        file://chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch \
>> +        file://chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch \
>> +        ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
>> +        ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-48/0002-Disable-API-keys-info-bar.patch', '', d)} \
>> +"
>> +
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d"
>> +SRC_URI[md5sum] = "0534981cc21efcd11e64b67b85854420"
>> +SRC_URI[sha256sum] = "4ca4e2adb340b3fb4d502266ad7d6bda45fa3519906dbf63cce11a63f680dbc8"
>> +
>> +EXTRA_OEGYP += " \
>> +	-Dv8_use_external_startup_data=0 \
>> +"
>> +
>> +OZONE_WAYLAND_GIT_BRANCH = "Milestone-SouthSister"
>> +OZONE_WAYLAND_GIT_SRCREV = "c605505044af3345a276abbd7c29fd53db1dea40"
>> +
>> +OZONE_WAYLAND_EXTRA_PATCHES = " \
>> +	file://chromium-48/0006-Remove-GBM-support-from-wayland.gyp.patch \
>> +	file://chromium-48/0007-Workaround-for-glib-related-build-error-with-ozone-w.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")
>> +}
>> +
>> +CHROMIUM_X11_DEPENDS = "xextproto gtk+ libxi libxss"
>> +CHROMIUM_X11_GYP_DEFINES = ""
>> +CHROMIUM_WAYLAND_DEPENDS = "wayland libxkbcommon"
>> +CHROMIUM_WAYLAND_GYP_DEFINES = "use_ash=1 use_aura=1 chromeos=0 use_ozone=1 use_xkbcommon=1"
>> -- 
>> 2.7.4
>>
>> -- 
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [meta-browser][PATCH] chromium: Add workarounds for compiler errors
  2016-05-18 15:04   ` Martin Jansa
  2016-05-19  5:58     ` Carlos Rafael Giani
@ 2016-05-20 11:41     ` Carlos Rafael Giani
  2016-05-20 14:40       ` Khem Raj
  1 sibling, 1 reply; 7+ messages in thread
From: Carlos Rafael Giani @ 2016-05-20 11:41 UTC (permalink / raw)
  To: openembedded-devel

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 .../0011-Replace-readdir_r-with-readdir.patch      | 237 +++++++++++++++++++++
 ...for-unused-variable-error-in-ui-gfx-color.patch |  86 ++++++++
 recipes-browser/chromium/chromium_48.0.2548.0.bb   |   2 +
 3 files changed, 325 insertions(+)
 create mode 100644 recipes-browser/chromium/chromium/chromium-48/0011-Replace-readdir_r-with-readdir.patch
 create mode 100644 recipes-browser/chromium/chromium/chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch

diff --git a/recipes-browser/chromium/chromium/chromium-48/0011-Replace-readdir_r-with-readdir.patch b/recipes-browser/chromium/chromium/chromium-48/0011-Replace-readdir_r-with-readdir.patch
new file mode 100644
index 0000000..36c7ec2
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-48/0011-Replace-readdir_r-with-readdir.patch
@@ -0,0 +1,237 @@
+From feb645ae0259582e2075691047e27b5e064ec160 Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Thu, 19 May 2016 21:12:05 +0200
+Subject: [PATCH] Replace readdir_r with readdir
+
+readdir_r is deprecated in newer glibc version. Documented at:
+https://sourceware.org/bugzilla/show_bug.cgi?id=19056
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ base/files/file_enumerator_posix.cc                | 15 ++++++++++---
+ net/disk_cache/simple/simple_index_file_posix.cc   | 10 ++++++---
+ sandbox/linux/services/proc_util.cc                | 24 +++++++++++++--------
+ third_party/boringssl/src/crypto/directory_posix.c | 25 +++-------------------
+ .../crashpad/crashpad/util/posix/close_multiple.cc |  8 +++++--
+ third_party/leveldatabase/env_chromium.cc          | 13 ++++++++---
+ 6 files changed, 53 insertions(+), 42 deletions(-)
+
+diff --git a/base/files/file_enumerator_posix.cc b/base/files/file_enumerator_posix.cc
+index 7533a24..637b8cd 100644
+--- a/base/files/file_enumerator_posix.cc
++++ b/base/files/file_enumerator_posix.cc
+@@ -7,6 +7,7 @@
+ #include <dirent.h>
+ #include <errno.h>
+ #include <fnmatch.h>
++#include <string.h>
+ 
+ #include "base/logging.h"
+ #include "base/threading/thread_restrictions.h"
+@@ -129,9 +130,17 @@ bool FileEnumerator::ReadDirectory(std::vector<FileInfo>* entries,
+          additional space for pathname may be needed
+ #endif
+ 
+-  struct dirent dent_buf;
+-  struct dirent* dent;
+-  while (readdir_r(dir, &dent_buf, &dent) == 0 && dent) {
++  while (true) {
++    struct dirent* dent;
++    errno = 0;
++    dent = readdir(dir);
++    if (errno != 0) {
++      DPLOG(ERROR) << "Couldn't read directory entry: " << strerror(errno);
++      break;
++    }
++    if (dent == NULL)
++      break;
++
+     FileInfo info;
+     info.filename_ = FilePath(dent->d_name);
+ 
+diff --git a/net/disk_cache/simple/simple_index_file_posix.cc b/net/disk_cache/simple/simple_index_file_posix.cc
+index 586699d..bbe81fc 100644
+--- a/net/disk_cache/simple/simple_index_file_posix.cc
++++ b/net/disk_cache/simple/simple_index_file_posix.cc
+@@ -34,8 +34,12 @@ bool SimpleIndexFile::TraverseCacheDirectory(
+     PLOG(ERROR) << "opendir " << cache_path.value();
+     return false;
+   }
+-  dirent entry, *result;
+-  while (readdir_r(dir.get(), &entry, &result) == 0) {
++  dirent *result;
++  while (true) {
++    errno = 0;
++    result = readdir(dir.get());
++    if (errno != 0)
++      break;
+     if (!result)
+       return true;  // The traversal completed successfully.
+     const std::string file_name(result->d_name);
+@@ -45,7 +49,7 @@ bool SimpleIndexFile::TraverseCacheDirectory(
+         base::FilePath(file_name));
+     entry_file_callback.Run(file_path);
+   }
+-  PLOG(ERROR) << "readdir_r " << cache_path.value();
++  PLOG(ERROR) << "readdir " << cache_path.value();
+   return false;
+ }
+ 
+diff --git a/sandbox/linux/services/proc_util.cc b/sandbox/linux/services/proc_util.cc
+index 8341b4a..1603415 100644
+--- a/sandbox/linux/services/proc_util.cc
++++ b/sandbox/linux/services/proc_util.cc
+@@ -50,15 +50,18 @@ int ProcUtil::CountOpenFds(int proc_fd) {
+   CHECK(dir);
+ 
+   int count = 0;
+-  struct dirent e;
+   struct dirent* de;
+-  while (!readdir_r(dir.get(), &e, &de) && de) {
+-    if (strcmp(e.d_name, ".") == 0 || strcmp(e.d_name, "..") == 0) {
++  while (true) {
++    errno = 0;
++    de = readdir(dir.get());
++    if (de == NULL || errno != 0)
++      break;
++    if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) {
+       continue;
+     }
+ 
+     int fd_num;
+-    CHECK(base::StringToInt(e.d_name, &fd_num));
++    CHECK(base::StringToInt(de->d_name, &fd_num));
+     if (fd_num == proc_fd || fd_num == proc_self_fd) {
+       continue;
+     }
+@@ -80,22 +83,25 @@ bool ProcUtil::HasOpenDirectory(int proc_fd) {
+   ScopedDIR dir(fdopendir(proc_self_fd));
+   CHECK(dir);
+ 
+-  struct dirent e;
+   struct dirent* de;
+-  while (!readdir_r(dir.get(), &e, &de) && de) {
+-    if (strcmp(e.d_name, ".") == 0 || strcmp(e.d_name, "..") == 0) {
++  while (true) {
++    errno = 0;
++    de = readdir(dir.get());
++    if (de == NULL || errno != 0)
++      break;
++    if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) {
+       continue;
+     }
+ 
+     int fd_num;
+-    CHECK(base::StringToInt(e.d_name, &fd_num));
++    CHECK(base::StringToInt(de->d_name, &fd_num));
+     if (fd_num == proc_fd || fd_num == proc_self_fd) {
+       continue;
+     }
+ 
+     struct stat s;
+     // It's OK to use proc_self_fd here, fstatat won't modify it.
+-    CHECK(fstatat(proc_self_fd, e.d_name, &s, 0) == 0);
++    CHECK(fstatat(proc_self_fd, de->d_name, &s, 0) == 0);
+     if (S_ISDIR(s.st_mode)) {
+       return true;
+     }
+diff --git a/third_party/boringssl/src/crypto/directory_posix.c b/third_party/boringssl/src/crypto/directory_posix.c
+index b944b69..17143a7 100644
+--- a/third_party/boringssl/src/crypto/directory_posix.c
++++ b/third_party/boringssl/src/crypto/directory_posix.c
+@@ -24,10 +24,6 @@
+  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+ 
+-#if !defined(_POSIX_C_SOURCE)
+-#define _POSIX_C_SOURCE 201409  /* for readdir_r */
+-#endif
+-
+ #include "directory.h"
+ 
+ 
+@@ -38,21 +34,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ 
+-#if defined(OPENSSL_PNACL)
+-/* pnacl doesn't include readdir_r! So we do the best we can. */
+-int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) {
+-  errno = 0;
+-  *result = readdir(dirp);
+-  if (*result != NULL) {
+-    return 0;
+-  }
+-  if (errno) {
+-    return 1;
+-  }
+-  return 0;
+-}
+-#endif
+-
+ struct OPENSSL_dir_context_st {
+   DIR *dir;
+   struct dirent dirent;
+@@ -85,10 +66,10 @@ const char *OPENSSL_DIR_read(OPENSSL_DIR_CTX **ctx, const char *directory) {
+     }
+   }
+ 
+-  if (readdir_r((*ctx)->dir, &(*ctx)->dirent, &dirent) != 0 ||
+-      dirent == NULL) {
++  errno = 0;
++  dirent = readdir((*ctx)->dir);
++  if (dirent == NULL || errno != 0)
+     return 0;
+-  }
+ 
+   return (*ctx)->dirent.d_name;
+ }
+diff --git a/third_party/crashpad/crashpad/util/posix/close_multiple.cc b/third_party/crashpad/crashpad/util/posix/close_multiple.cc
+index d94d575..4c1287a 100644
+--- a/third_party/crashpad/crashpad/util/posix/close_multiple.cc
++++ b/third_party/crashpad/crashpad/util/posix/close_multiple.cc
+@@ -100,10 +100,14 @@ bool CloseMultipleNowOrOnExecUsingFDDir(int fd, int preserve_fd) {
+     return false;
+   }
+ 
+-  dirent entry;
+   dirent* result;
+   int rv;
+-  while ((rv = readdir_r(dir, &entry, &result)) == 0 && result != nullptr) {
++  while (true) {
++    errno = 0;
++    result = readdir(dir);
++    if (errno != 0 || result == nullptr)
++      break;
++
+     const char* entry_name = &(*result->d_name);
+     if (strcmp(entry_name, ".") == 0 || strcmp(entry_name, "..") == 0) {
+       continue;
+diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
+index 939534c..f23142e 100644
+--- a/third_party/leveldatabase/env_chromium.cc
++++ b/third_party/leveldatabase/env_chromium.cc
+@@ -79,10 +79,17 @@ static base::File::Error GetDirectoryEntries(const FilePath& dir_param,
+   DIR* dir = opendir(dir_string.c_str());
+   if (!dir)
+     return base::File::OSErrorToFileError(errno);
+-  struct dirent dent_buf;
+   struct dirent* dent;
+-  int readdir_result;
+-  while ((readdir_result = readdir_r(dir, &dent_buf, &dent)) == 0 && dent) {
++  int readdir_result = 0;
++  while (true) {
++    errno = 0;
++    dent = readdir(dir);
++    if (errno != 0) {
++      readdir_result = 1;
++      break;
++    }
++    if (dent == NULL)
++      break;
+     if (strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0)
+       continue;
+     result->push_back(FilePath::FromUTF8Unsafe(dent->d_name));
+-- 
+2.7.4
+
diff --git a/recipes-browser/chromium/chromium/chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch b/recipes-browser/chromium/chromium/chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch
new file mode 100644
index 0000000..e3f20ef
--- /dev/null
+++ b/recipes-browser/chromium/chromium/chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch
@@ -0,0 +1,86 @@
+From 41cb20a99eb12443f649051a608c7dfe28661d85 Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Thu, 19 May 2016 22:38:32 +0200
+Subject: [PATCH] Workaround for unused-variable error in
+ ui/gfx/color_palette.h
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ ui/gfx/BUILD.gn         |  1 +
+ ui/gfx/color_palette.cc | 12 ++++++++++++
+ ui/gfx/color_palette.h  | 12 ++++++------
+ ui/gfx/gfx.gyp          |  1 +
+ 4 files changed, 20 insertions(+), 6 deletions(-)
+ create mode 100644 ui/gfx/color_palette.cc
+
+diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
+index dcd15b0..bf1455c 100644
+--- a/ui/gfx/BUILD.gn
++++ b/ui/gfx/BUILD.gn
+@@ -61,6 +61,7 @@ component("gfx") {
+     "codec/png_codec.h",
+     "color_analysis.cc",
+     "color_analysis.h",
++    "color_palette.cc",
+     "color_palette.h",
+     "color_profile.cc",
+     "color_profile.h",
+diff --git a/ui/gfx/color_palette.cc b/ui/gfx/color_palette.cc
+new file mode 100644
+index 0000000..a8e6280
+--- /dev/null
++++ b/ui/gfx/color_palette.cc
+@@ -0,0 +1,12 @@
++#include "color_palette.h"
++
++namespace gfx {
++
++const SkColor kChromeIconGrey = SkColorSetRGB(0x5A, 0x5A, 0x5A);
++const SkColor kGoogleBlue300 = SkColorSetRGB(0x7B, 0xAA, 0xF7);
++const SkColor kGoogleBlue500 = SkColorSetRGB(0x42, 0x85, 0xF4);
++const SkColor kGoogleRed700 = SkColorSetRGB(0xC5, 0x39, 0x29);
++const SkColor kGoogleGreen700 = SkColorSetRGB(0x0B, 0x80, 0x43);
++const SkColor kGoogleYellow700 = SkColorSetRGB(0xF0, 0x93, 0x00);
++
++}  // namespace gfx
+diff --git a/ui/gfx/color_palette.h b/ui/gfx/color_palette.h
+index 372f52c..63fa8af 100644
+--- a/ui/gfx/color_palette.h
++++ b/ui/gfx/color_palette.h
+@@ -9,15 +9,15 @@
+ 
+ namespace gfx {
+ 
+-const SkColor kChromeIconGrey = SkColorSetRGB(0x5A, 0x5A, 0x5A);
++extern const SkColor kChromeIconGrey;
+ 
+ // The number refers to the shade of darkness. Each color in the MD
+ // palette ranges from 100-900.
+-const SkColor kGoogleBlue300 = SkColorSetRGB(0x7B, 0xAA, 0xF7);
+-const SkColor kGoogleBlue500 = SkColorSetRGB(0x42, 0x85, 0xF4);
+-const SkColor kGoogleRed700 = SkColorSetRGB(0xC5, 0x39, 0x29);
+-const SkColor kGoogleGreen700 = SkColorSetRGB(0x0B, 0x80, 0x43);
+-const SkColor kGoogleYellow700 = SkColorSetRGB(0xF0, 0x93, 0x00);
++extern const SkColor kGoogleBlue300;
++extern const SkColor kGoogleBlue500;
++extern const SkColor kGoogleRed700;
++extern const SkColor kGoogleGreen700;
++extern const SkColor kGoogleYellow700;
+ 
+ }  // namespace gfx
+ 
+diff --git a/ui/gfx/gfx.gyp b/ui/gfx/gfx.gyp
+index 8067bee..98b6312 100644
+--- a/ui/gfx/gfx.gyp
++++ b/ui/gfx/gfx.gyp
+@@ -142,6 +142,7 @@
+         'codec/png_codec.h',
+         'color_analysis.cc',
+         'color_analysis.h',
++        'color_palette.cc',
+         'color_palette.h',
+         'color_profile.cc',
+         'color_profile.h',
+-- 
+2.7.4
+
diff --git a/recipes-browser/chromium/chromium_48.0.2548.0.bb b/recipes-browser/chromium/chromium_48.0.2548.0.bb
index 369d6fa..976ec51 100644
--- a/recipes-browser/chromium/chromium_48.0.2548.0.bb
+++ b/recipes-browser/chromium/chromium_48.0.2548.0.bb
@@ -10,6 +10,8 @@ SRC_URI += "\
         file://chromium-48/0008-Fix-GCC-uninitialized-warning.patch \
         file://chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch \
         file://chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch \
+        file://chromium-48/0011-Replace-readdir_r-with-readdir.patch \
+        file://chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch \
         ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
         ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-48/0002-Disable-API-keys-info-bar.patch', '', d)} \
 "
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [meta-browser][PATCH] chromium: Add workarounds for compiler errors
  2016-05-20 11:41     ` [meta-browser][PATCH] chromium: Add workarounds for compiler errors Carlos Rafael Giani
@ 2016-05-20 14:40       ` Khem Raj
  0 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2016-05-20 14:40 UTC (permalink / raw)
  To: openembeded-devel

On Fri, May 20, 2016 at 4:41 AM, Carlos Rafael Giani
<dv@pseudoterminal.org> wrote:
> Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> ---
>  .../0011-Replace-readdir_r-with-readdir.patch      | 237 +++++++++++++++++++++
>  ...for-unused-variable-error-in-ui-gfx-color.patch |  86 ++++++++
>  recipes-browser/chromium/chromium_48.0.2548.0.bb   |   2 +
>  3 files changed, 325 insertions(+)
>  create mode 100644 recipes-browser/chromium/chromium/chromium-48/0011-Replace-readdir_r-with-readdir.patch
>  create mode 100644 recipes-browser/chromium/chromium/chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch
>
> diff --git a/recipes-browser/chromium/chromium/chromium-48/0011-Replace-readdir_r-with-readdir.patch b/recipes-browser/chromium/chromium/chromium-48/0011-Replace-readdir_r-with-readdir.patch
> new file mode 100644
> index 0000000..36c7ec2
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium/chromium-48/0011-Replace-readdir_r-with-readdir.patch
> @@ -0,0 +1,237 @@
> +From feb645ae0259582e2075691047e27b5e064ec160 Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Thu, 19 May 2016 21:12:05 +0200
> +Subject: [PATCH] Replace readdir_r with readdir
> +
> +readdir_r is deprecated in newer glibc version. Documented at:
> +https://sourceware.org/bugzilla/show_bug.cgi?id=19056
> +
> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> +---
> + base/files/file_enumerator_posix.cc                | 15 ++++++++++---
> + net/disk_cache/simple/simple_index_file_posix.cc   | 10 ++++++---
> + sandbox/linux/services/proc_util.cc                | 24 +++++++++++++--------
> + third_party/boringssl/src/crypto/directory_posix.c | 25 +++-------------------
> + .../crashpad/crashpad/util/posix/close_multiple.cc |  8 +++++--
> + third_party/leveldatabase/env_chromium.cc          | 13 ++++++++---
> + 6 files changed, 53 insertions(+), 42 deletions(-)
> +
> +diff --git a/base/files/file_enumerator_posix.cc b/base/files/file_enumerator_posix.cc
> +index 7533a24..637b8cd 100644
> +--- a/base/files/file_enumerator_posix.cc
> ++++ b/base/files/file_enumerator_posix.cc
> +@@ -7,6 +7,7 @@
> + #include <dirent.h>
> + #include <errno.h>
> + #include <fnmatch.h>
> ++#include <string.h>
> +
> + #include "base/logging.h"
> + #include "base/threading/thread_restrictions.h"
> +@@ -129,9 +130,17 @@ bool FileEnumerator::ReadDirectory(std::vector<FileInfo>* entries,
> +          additional space for pathname may be needed
> + #endif
> +
> +-  struct dirent dent_buf;
> +-  struct dirent* dent;
> +-  while (readdir_r(dir, &dent_buf, &dent) == 0 && dent) {
> ++  while (true) {
> ++    struct dirent* dent;
> ++    errno = 0;
> ++    dent = readdir(dir);
> ++    if (errno != 0) {
> ++      DPLOG(ERROR) << "Couldn't read directory entry: " << strerror(errno);
> ++      break;
> ++    }
> ++    if (dent == NULL)
> ++      break;
> ++


Please send these patches to chromium as well. They look fine otherwise.

> +     FileInfo info;
> +     info.filename_ = FilePath(dent->d_name);
> +
> +diff --git a/net/disk_cache/simple/simple_index_file_posix.cc b/net/disk_cache/simple/simple_index_file_posix.cc
> +index 586699d..bbe81fc 100644
> +--- a/net/disk_cache/simple/simple_index_file_posix.cc
> ++++ b/net/disk_cache/simple/simple_index_file_posix.cc
> +@@ -34,8 +34,12 @@ bool SimpleIndexFile::TraverseCacheDirectory(
> +     PLOG(ERROR) << "opendir " << cache_path.value();
> +     return false;
> +   }
> +-  dirent entry, *result;
> +-  while (readdir_r(dir.get(), &entry, &result) == 0) {
> ++  dirent *result;
> ++  while (true) {
> ++    errno = 0;
> ++    result = readdir(dir.get());
> ++    if (errno != 0)
> ++      break;
> +     if (!result)
> +       return true;  // The traversal completed successfully.
> +     const std::string file_name(result->d_name);
> +@@ -45,7 +49,7 @@ bool SimpleIndexFile::TraverseCacheDirectory(
> +         base::FilePath(file_name));
> +     entry_file_callback.Run(file_path);
> +   }
> +-  PLOG(ERROR) << "readdir_r " << cache_path.value();
> ++  PLOG(ERROR) << "readdir " << cache_path.value();
> +   return false;
> + }
> +
> +diff --git a/sandbox/linux/services/proc_util.cc b/sandbox/linux/services/proc_util.cc
> +index 8341b4a..1603415 100644
> +--- a/sandbox/linux/services/proc_util.cc
> ++++ b/sandbox/linux/services/proc_util.cc
> +@@ -50,15 +50,18 @@ int ProcUtil::CountOpenFds(int proc_fd) {
> +   CHECK(dir);
> +
> +   int count = 0;
> +-  struct dirent e;
> +   struct dirent* de;
> +-  while (!readdir_r(dir.get(), &e, &de) && de) {
> +-    if (strcmp(e.d_name, ".") == 0 || strcmp(e.d_name, "..") == 0) {
> ++  while (true) {
> ++    errno = 0;
> ++    de = readdir(dir.get());
> ++    if (de == NULL || errno != 0)
> ++      break;
> ++    if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) {
> +       continue;
> +     }
> +
> +     int fd_num;
> +-    CHECK(base::StringToInt(e.d_name, &fd_num));
> ++    CHECK(base::StringToInt(de->d_name, &fd_num));
> +     if (fd_num == proc_fd || fd_num == proc_self_fd) {
> +       continue;
> +     }
> +@@ -80,22 +83,25 @@ bool ProcUtil::HasOpenDirectory(int proc_fd) {
> +   ScopedDIR dir(fdopendir(proc_self_fd));
> +   CHECK(dir);
> +
> +-  struct dirent e;
> +   struct dirent* de;
> +-  while (!readdir_r(dir.get(), &e, &de) && de) {
> +-    if (strcmp(e.d_name, ".") == 0 || strcmp(e.d_name, "..") == 0) {
> ++  while (true) {
> ++    errno = 0;
> ++    de = readdir(dir.get());
> ++    if (de == NULL || errno != 0)
> ++      break;
> ++    if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) {
> +       continue;
> +     }
> +
> +     int fd_num;
> +-    CHECK(base::StringToInt(e.d_name, &fd_num));
> ++    CHECK(base::StringToInt(de->d_name, &fd_num));
> +     if (fd_num == proc_fd || fd_num == proc_self_fd) {
> +       continue;
> +     }
> +
> +     struct stat s;
> +     // It's OK to use proc_self_fd here, fstatat won't modify it.
> +-    CHECK(fstatat(proc_self_fd, e.d_name, &s, 0) == 0);
> ++    CHECK(fstatat(proc_self_fd, de->d_name, &s, 0) == 0);
> +     if (S_ISDIR(s.st_mode)) {
> +       return true;
> +     }
> +diff --git a/third_party/boringssl/src/crypto/directory_posix.c b/third_party/boringssl/src/crypto/directory_posix.c
> +index b944b69..17143a7 100644
> +--- a/third_party/boringssl/src/crypto/directory_posix.c
> ++++ b/third_party/boringssl/src/crypto/directory_posix.c
> +@@ -24,10 +24,6 @@
> +  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> +  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
> +
> +-#if !defined(_POSIX_C_SOURCE)
> +-#define _POSIX_C_SOURCE 201409  /* for readdir_r */
> +-#endif
> +-
> + #include "directory.h"
> +
> +
> +@@ -38,21 +34,6 @@
> + #include <stdlib.h>
> + #include <string.h>
> +
> +-#if defined(OPENSSL_PNACL)
> +-/* pnacl doesn't include readdir_r! So we do the best we can. */
> +-int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) {
> +-  errno = 0;
> +-  *result = readdir(dirp);
> +-  if (*result != NULL) {
> +-    return 0;
> +-  }
> +-  if (errno) {
> +-    return 1;
> +-  }
> +-  return 0;
> +-}
> +-#endif
> +-
> + struct OPENSSL_dir_context_st {
> +   DIR *dir;
> +   struct dirent dirent;
> +@@ -85,10 +66,10 @@ const char *OPENSSL_DIR_read(OPENSSL_DIR_CTX **ctx, const char *directory) {
> +     }
> +   }
> +
> +-  if (readdir_r((*ctx)->dir, &(*ctx)->dirent, &dirent) != 0 ||
> +-      dirent == NULL) {
> ++  errno = 0;
> ++  dirent = readdir((*ctx)->dir);
> ++  if (dirent == NULL || errno != 0)
> +     return 0;
> +-  }
> +
> +   return (*ctx)->dirent.d_name;
> + }
> +diff --git a/third_party/crashpad/crashpad/util/posix/close_multiple.cc b/third_party/crashpad/crashpad/util/posix/close_multiple.cc
> +index d94d575..4c1287a 100644
> +--- a/third_party/crashpad/crashpad/util/posix/close_multiple.cc
> ++++ b/third_party/crashpad/crashpad/util/posix/close_multiple.cc
> +@@ -100,10 +100,14 @@ bool CloseMultipleNowOrOnExecUsingFDDir(int fd, int preserve_fd) {
> +     return false;
> +   }
> +
> +-  dirent entry;
> +   dirent* result;
> +   int rv;
> +-  while ((rv = readdir_r(dir, &entry, &result)) == 0 && result != nullptr) {
> ++  while (true) {
> ++    errno = 0;
> ++    result = readdir(dir);
> ++    if (errno != 0 || result == nullptr)
> ++      break;
> ++
> +     const char* entry_name = &(*result->d_name);
> +     if (strcmp(entry_name, ".") == 0 || strcmp(entry_name, "..") == 0) {
> +       continue;
> +diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
> +index 939534c..f23142e 100644
> +--- a/third_party/leveldatabase/env_chromium.cc
> ++++ b/third_party/leveldatabase/env_chromium.cc
> +@@ -79,10 +79,17 @@ static base::File::Error GetDirectoryEntries(const FilePath& dir_param,
> +   DIR* dir = opendir(dir_string.c_str());
> +   if (!dir)
> +     return base::File::OSErrorToFileError(errno);
> +-  struct dirent dent_buf;
> +   struct dirent* dent;
> +-  int readdir_result;
> +-  while ((readdir_result = readdir_r(dir, &dent_buf, &dent)) == 0 && dent) {
> ++  int readdir_result = 0;
> ++  while (true) {
> ++    errno = 0;
> ++    dent = readdir(dir);
> ++    if (errno != 0) {
> ++      readdir_result = 1;
> ++      break;
> ++    }
> ++    if (dent == NULL)
> ++      break;
> +     if (strcmp(dent->d_name, ".") == 0 || strcmp(dent->d_name, "..") == 0)
> +       continue;
> +     result->push_back(FilePath::FromUTF8Unsafe(dent->d_name));
> +--
> +2.7.4
> +
> diff --git a/recipes-browser/chromium/chromium/chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch b/recipes-browser/chromium/chromium/chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch
> new file mode 100644
> index 0000000..e3f20ef
> --- /dev/null
> +++ b/recipes-browser/chromium/chromium/chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch
> @@ -0,0 +1,86 @@
> +From 41cb20a99eb12443f649051a608c7dfe28661d85 Mon Sep 17 00:00:00 2001
> +From: Carlos Rafael Giani <dv@pseudoterminal.org>
> +Date: Thu, 19 May 2016 22:38:32 +0200
> +Subject: [PATCH] Workaround for unused-variable error in
> + ui/gfx/color_palette.h
> +
> +Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
> +---
> + ui/gfx/BUILD.gn         |  1 +
> + ui/gfx/color_palette.cc | 12 ++++++++++++
> + ui/gfx/color_palette.h  | 12 ++++++------
> + ui/gfx/gfx.gyp          |  1 +
> + 4 files changed, 20 insertions(+), 6 deletions(-)
> + create mode 100644 ui/gfx/color_palette.cc
> +
> +diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
> +index dcd15b0..bf1455c 100644
> +--- a/ui/gfx/BUILD.gn
> ++++ b/ui/gfx/BUILD.gn
> +@@ -61,6 +61,7 @@ component("gfx") {
> +     "codec/png_codec.h",
> +     "color_analysis.cc",
> +     "color_analysis.h",
> ++    "color_palette.cc",
> +     "color_palette.h",
> +     "color_profile.cc",
> +     "color_profile.h",
> +diff --git a/ui/gfx/color_palette.cc b/ui/gfx/color_palette.cc
> +new file mode 100644
> +index 0000000..a8e6280
> +--- /dev/null
> ++++ b/ui/gfx/color_palette.cc
> +@@ -0,0 +1,12 @@
> ++#include "color_palette.h"
> ++
> ++namespace gfx {
> ++
> ++const SkColor kChromeIconGrey = SkColorSetRGB(0x5A, 0x5A, 0x5A);
> ++const SkColor kGoogleBlue300 = SkColorSetRGB(0x7B, 0xAA, 0xF7);
> ++const SkColor kGoogleBlue500 = SkColorSetRGB(0x42, 0x85, 0xF4);
> ++const SkColor kGoogleRed700 = SkColorSetRGB(0xC5, 0x39, 0x29);
> ++const SkColor kGoogleGreen700 = SkColorSetRGB(0x0B, 0x80, 0x43);
> ++const SkColor kGoogleYellow700 = SkColorSetRGB(0xF0, 0x93, 0x00);
> ++
> ++}  // namespace gfx
> +diff --git a/ui/gfx/color_palette.h b/ui/gfx/color_palette.h
> +index 372f52c..63fa8af 100644
> +--- a/ui/gfx/color_palette.h
> ++++ b/ui/gfx/color_palette.h
> +@@ -9,15 +9,15 @@
> +
> + namespace gfx {
> +
> +-const SkColor kChromeIconGrey = SkColorSetRGB(0x5A, 0x5A, 0x5A);
> ++extern const SkColor kChromeIconGrey;
> +
> + // The number refers to the shade of darkness. Each color in the MD
> + // palette ranges from 100-900.
> +-const SkColor kGoogleBlue300 = SkColorSetRGB(0x7B, 0xAA, 0xF7);
> +-const SkColor kGoogleBlue500 = SkColorSetRGB(0x42, 0x85, 0xF4);
> +-const SkColor kGoogleRed700 = SkColorSetRGB(0xC5, 0x39, 0x29);
> +-const SkColor kGoogleGreen700 = SkColorSetRGB(0x0B, 0x80, 0x43);
> +-const SkColor kGoogleYellow700 = SkColorSetRGB(0xF0, 0x93, 0x00);
> ++extern const SkColor kGoogleBlue300;
> ++extern const SkColor kGoogleBlue500;
> ++extern const SkColor kGoogleRed700;
> ++extern const SkColor kGoogleGreen700;
> ++extern const SkColor kGoogleYellow700;
> +
> + }  // namespace gfx
> +
> +diff --git a/ui/gfx/gfx.gyp b/ui/gfx/gfx.gyp
> +index 8067bee..98b6312 100644
> +--- a/ui/gfx/gfx.gyp
> ++++ b/ui/gfx/gfx.gyp
> +@@ -142,6 +142,7 @@
> +         'codec/png_codec.h',
> +         'color_analysis.cc',
> +         'color_analysis.h',
> ++        'color_palette.cc',
> +         'color_palette.h',
> +         'color_profile.cc',
> +         'color_profile.h',
> +--
> +2.7.4
> +
> diff --git a/recipes-browser/chromium/chromium_48.0.2548.0.bb b/recipes-browser/chromium/chromium_48.0.2548.0.bb
> index 369d6fa..976ec51 100644
> --- a/recipes-browser/chromium/chromium_48.0.2548.0.bb
> +++ b/recipes-browser/chromium/chromium_48.0.2548.0.bb
> @@ -10,6 +10,8 @@ SRC_URI += "\
>          file://chromium-48/0008-Fix-GCC-uninitialized-warning.patch \
>          file://chromium-48/0009-Fix-build-errors-with-GCC-in-Debug-mode.patch \
>          file://chromium-48/0010-Fix-rv-may-be-used-uninitialized-in-this-function-wa.patch \
> +        file://chromium-48/0011-Replace-readdir_r-with-readdir.patch \
> +        file://chromium-48/0012-Workaround-for-unused-variable-error-in-ui-gfx-color.patch \
>          ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-48/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
>          ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-48/0002-Disable-API-keys-info-bar.patch', '', d)} \
>  "
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-20 14:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-08 12:20 [meta-browser][PATCH v2 1/3] chromium: Replace deprecated base_* wrapper calls Carlos Rafael Giani
2016-05-08 12:20 ` [meta-browser][PATCH v2 2/3] chromium: Create chromium-browser.inc to simplify upgrades Carlos Rafael Giani
2016-05-08 12:20 ` [meta-browser][PATCH v2 3/3] chromium: Upgrade to version 48.0.2548.0 Carlos Rafael Giani
2016-05-18 15:04   ` Martin Jansa
2016-05-19  5:58     ` Carlos Rafael Giani
2016-05-20 11:41     ` [meta-browser][PATCH] chromium: Add workarounds for compiler errors Carlos Rafael Giani
2016-05-20 14:40       ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.