Moving add_chromium_imx_patches() is pointless I think. The patch effectively makes chromium-imx.inc unusable with any future chromium-imx patches.

Just leaving the CHROMIUM_IMX_COMMON_PATCHES , CHROMIUM_IMX_VPU_PATCHES , CHROMIUM_IMX_WAYLAND_PATCHES variables unset or set to "" is enough, since add_chromium_imx_patches() is then effectively a no-op, so chromium-imx.inc does not have to be modified at all.


On 2016-09-16 17:03, Lauren Post wrote:
New chromium version works only on X11 and VPU patches do not apply on new 
version
For Wayland use olderchromium version renamed to chromium-wayland and add VPU 
patches

Signed-off-by: Lauren Post <lauren.p...@nxp.com>
---
  .../recipes-browser/chromium/chromium-imx.inc      |  8 ----
  .../chromium/chromium-wayland_48.0.2548.0.bbappend | 36 +++++++++++++++
  .../chromium/chromium/chromium.patch               | 51 ++++++++++++++++++++++
  .../chromium/chromium_48.0.2548.0.bbappend         |  9 ----
  .../chromium/chromium_52.0.2743.76.bbappend        | 15 +++++++
  5 files changed, 102 insertions(+), 17 deletions(-)
  create mode 100644 
browser-layer/recipes-browser/chromium/chromium-wayland_48.0.2548.0.bbappend
  create mode 100644 
browser-layer/recipes-browser/chromium/chromium/chromium.patch
  delete mode 100644 
browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend
  create mode 100644 
browser-layer/recipes-browser/chromium/chromium_52.0.2743.76.bbappend

diff --git a/browser-layer/recipes-browser/chromium/chromium-imx.inc 
b/browser-layer/recipes-browser/chromium/chromium-imx.inc
index f8ba268..f755d96 100644
--- a/browser-layer/recipes-browser/chromium/chromium-imx.inc
+++ b/browser-layer/recipes-browser/chromium/chromium-imx.inc
@@ -1,5 +1,3 @@
-DEPENDS_append_imxvpu = " imx-vpuwrap"
-
  # Additional imx code and patches are included in the chromium-imx git 
repository.
  # The code below fetches this repository, copies the extra source over to the 
main
  # chromium source directory, and applies the patches.
@@ -36,10 +34,4 @@ copy_chromium_imx_files() {
        cp -r ${WORKDIR}/chromium-imx-git/src/* ${S}/
  }
-python add_chromium_imx_patches() {
-    d.appendVar('SRC_URI', ' ' + d.getVar('CHROMIUM_IMX_COMMON_PATCHES', 1))
-    d.appendVar('SRC_URI', ' ' + d.getVar('CHROMIUM_IMX_VPU_PATCHES', 1))
-    d.appendVar('OZONE_WAYLAND_EXTRA_PATCHES', ' ' + 
d.getVar('CHROMIUM_IMX_WAYLAND_PATCHES', 1))
-}
-
  COMPATIBLE_MACHINE = "(mx6)"
diff --git 
a/browser-layer/recipes-browser/chromium/chromium-wayland_48.0.2548.0.bbappend 
b/browser-layer/recipes-browser/chromium/chromium-wayland_48.0.2548.0.bbappend
new file mode 100644
index 0000000..ccfcd93
--- /dev/null
+++ 
b/browser-layer/recipes-browser/chromium/chromium-wayland_48.0.2548.0.bbappend
@@ -0,0 +1,36 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/chromium:"
+
+include chromium-imx.inc
+
+CHROMIUM_IMX_BRANCH = "master"
+CHROMIUM_IMX_SRCREV = "4a2d15ab899b9944bb3adb2ddd250530da5b2e1a"
+CHROMIUM_IMX_COMMON_PATCHES += 
"file://${PATCH_BASE_DIR}/common/0001-Enable-share-group-workaround-for-Vivante-GPUs.patch"
+CHROMIUM_ENABLE_WAYLAND = "0"
+
+DEPENDS_append_imxvpu = " imx-vpuwrap"
+
+VPU_PATCHES = 
"file://${PATCH_BASE_DIR}/common/0002-Add-VPU-video-decode-accelerator-to-Chromium-GPU-.patch"
+
+CHROMIUM_IMX_VPU_PATCHES_imxvpu += "${VPU_PATCHES}"
+
+CHROMIUM_IMX_WAYLAND_PATCHES += 
"file://${PATCH_BASE_DIR}/wayland/0001-Modify-eglwayland-versions-for-Vivante-GPUs.patch"
+
+# Don't use X if it's running through Wayland
+CHROMIUM_ENABLE_WAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 
'1', \
+                      bb.utils.contains('DISTRO_FEATURES', 'x11', '0', \
+                      '0', d),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)} \
+        ${@oe.utils.conditional('CHROMIUM_ENABLE_WAYLAND', '1', ' 
file://chromium.patch', '', d)} \
+"
+
+# Remove packages as Chromium is changed to statically link against ffmpeg.
+PACKAGES_remove = "${PN}-codecs-ffmpeg ${PN}-plugin-pdf"
+
+python add_chromium_imx_patches() {
+    d.appendVar('SRC_URI', ' ' + d.getVar('CHROMIUM_IMX_COMMON_PATCHES', 1))
+    d.appendVar('SRC_URI', ' ' + d.getVar('CHROMIUM_IMX_VPU_PATCHES', 1))
+    d.appendVar('OZONE_WAYLAND_EXTRA_PATCHES', ' ' + 
d.getVar('CHROMIUM_IMX_WAYLAND_PATCHES', 1))
+}
+
diff --git a/browser-layer/recipes-browser/chromium/chromium/chromium.patch 
b/browser-layer/recipes-browser/chromium/chromium/chromium.patch
new file mode 100644
index 0000000..0329d42
--- /dev/null
+++ b/browser-layer/recipes-browser/chromium/chromium/chromium.patch
@@ -0,0 +1,51 @@
+diff -Naur chromium-48.0.2548.0_org/third_party/libva/va/va_dec_jpeg.h 
chromium-48.0.2548.0/third_party/libva/va/va_dec_jpeg.h
+--- chromium-48.0.2548.0_org/third_party/libva/va/va_dec_jpeg.h        
2016-05-27 11:45:31.248306710 -0500
++++ chromium-48.0.2548.0/third_party/libva/va/va_dec_jpeg.h    2016-05-27 
11:49:53.000000000 -0500
+@@ -36,7 +36,7 @@
+ extern "C" {
+ #endif
+
+-#include <va/va.h>
++#include <libva/va/va.h>
+
+ /**
+  * \defgroup api_dec_jpeg JPEG decoding API
+diff -Naur chromium-48.0.2548.0_org/third_party/libva/va/va.h 
chromium-48.0.2548.0/third_party/libva/va/va.h
+--- chromium-48.0.2548.0_org/third_party/libva/va/va.h 2016-05-27 
11:45:31.248306710 -0500
++++ chromium-48.0.2548.0/third_party/libva/va/va.h     2016-05-27 
11:49:16.000000000 -0500
+@@ -80,7 +80,7 @@
+
+ #include <stddef.h>
+ #include <stdint.h>
+-#include <va/va_version.h>
++#include <libva/va/va_version.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -2836,16 +2836,16 @@
+  */
+ #define VA_PICTURE_HEVC_RPS_LT_CURR             0x00000040
+
+-#include <va/va_dec_hevc.h>
+-#include <va/va_dec_jpeg.h>
+-#include <va/va_dec_vp8.h>
+-#include <va/va_dec_vp9.h>
+-#include <va/va_enc_hevc.h>
+-#include <va/va_enc_h264.h>
+-#include <va/va_enc_jpeg.h>
+-#include <va/va_enc_mpeg2.h>
+-#include <va/va_enc_vp8.h>
+-#include <va/va_vpp.h>
++#include <libva/va/va_dec_hevc.h>
++#include <libva/va/va_dec_jpeg.h>
++#include <libva/va/va_dec_vp8.h>
++#include <libva/va/va_dec_vp9.h>
++#include <libva/va/va_enc_hevc.h>
++#include <libva/va/va_enc_h264.h>
++#include <libva/va/va_enc_jpeg.h>
++#include <libva/va/va_enc_mpeg2.h>
++#include <libva/va/va_enc_vp8.h>
++#include <libva/va/va_vpp.h>
+
+ /**@}*/
+
diff --git 
a/browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend 
b/browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend
deleted file mode 100644
index 54a0a99..0000000
--- a/browser-layer/recipes-browser/chromium/chromium_48.0.2548.0.bbappend
+++ /dev/null
@@ -1,9 +0,0 @@
-include chromium-imx.inc
-
-CHROMIUM_IMX_BRANCH = "master"
-CHROMIUM_IMX_SRCREV = "4a2d15ab899b9944bb3adb2ddd250530da5b2e1a"
-CHROMIUM_IMX_COMMON_PATCHES += 
"file://${PATCH_BASE_DIR}/common/0001-Enable-share-group-workaround-for-Vivante-GPUs.patch"
-
-CHROMIUM_IMX_VPU_PATCHES_imxvpu += 
"file://${PATCH_BASE_DIR}/common/0002-Add-VPU-video-decode-accelerator-to-Chromium-GPU-.patch"
-
-CHROMIUM_IMX_WAYLAND_PATCHES += 
"file://${PATCH_BASE_DIR}/wayland/0001-Modify-eglwayland-versions-for-Vivante-GPUs.patch"
diff --git 
a/browser-layer/recipes-browser/chromium/chromium_52.0.2743.76.bbappend 
b/browser-layer/recipes-browser/chromium/chromium_52.0.2743.76.bbappend
new file mode 100644
index 0000000..4ed046d
--- /dev/null
+++ b/browser-layer/recipes-browser/chromium/chromium_52.0.2743.76.bbappend
@@ -0,0 +1,15 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+include chromium-imx.inc
+
+CHROMIUM_IMX_BRANCH = "master"
+CHROMIUM_IMX_SRCREV = "4a2d15ab899b9944bb3adb2ddd250530da5b2e1a"
+CHROMIUM_IMX_COMMON_PATCHES += 
"file://${PATCH_BASE_DIR}/common/0001-Enable-share-group-workaround-for-Vivante-GPUs.patch"
+
+# Remove packages as Chromium is changed to statically link against ffmpeg.
+PACKAGES_remove = "${PN}-codecs-ffmpeg ${PN}-plugin-pdf"
+
+python add_chromium_imx_patches() {
+    d.appendVar('SRC_URI', ' ' + d.getVar('CHROMIUM_IMX_COMMON_PATCHES', 1))
+}
+

--
_______________________________________________
meta-freescale mailing list
meta-freescale@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to