All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-browser][PATCH 1/2] chromium: Reorganize into .inc and .bb to allow for cleaner upgrades
@ 2015-01-26 23:19 Carlos Rafael Giani
  2015-01-26 23:19 ` [meta-browser][PATCH 2/2] chromium: chromium: Upgrade to version 40.0.2214.91 Carlos Rafael Giani
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos Rafael Giani @ 2015-01-26 23:19 UTC (permalink / raw)
  To: openembedded-devel

Since version 37, the structure of the recipe remained more or less the
same, especially because starting with this version, the ozone-wayland
integration is working properly. Therefore, put the common code into an
.inc file to emphasize the version specific bits and make it easier to
modify the recipe for newer versions.

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 recipes-browser/chromium/chromium.inc              | 217 +++++++++++++++++++++
 ...terization-whitelist-unlocking-impl-side-.patch |   0
 .../0001-Remove-X-libraries-from-GYP-files.patch   |   0
 ...accelerated-Canvas-support-from-blacklist.patch |   0
 ...1-Remove-hard-coded-values-for-CC-and-CXX.patch |   0
 ...ration-conditionally-compile-routines-for.patch |   0
 .../0002-Disable-API-keys-info-bar.patch           |   0
 recipes-browser/chromium/chromium_38.0.2125.101.bb | 215 ++------------------
 8 files changed, 235 insertions(+), 197 deletions(-)
 create mode 100644 recipes-browser/chromium/chromium.inc
 rename recipes-browser/chromium/chromium/{ => chromium-38}/0001-Disable-rasterization-whitelist-unlocking-impl-side-.patch (100%)
 rename recipes-browser/chromium/chromium/{ => chromium-38}/0001-Remove-X-libraries-from-GYP-files.patch (100%)
 rename recipes-browser/chromium/chromium/{ => chromium-38}/0001-Remove-accelerated-Canvas-support-from-blacklist.patch (100%)
 rename recipes-browser/chromium/chromium/{ => chromium-38}/0001-Remove-hard-coded-values-for-CC-and-CXX.patch (100%)
 rename recipes-browser/chromium/chromium/{ => chromium-38}/0001-shell-integration-conditionally-compile-routines-for.patch (100%)
 rename recipes-browser/chromium/chromium/{ => chromium-38}/0002-Disable-API-keys-info-bar.patch (100%)

diff --git a/recipes-browser/chromium/chromium.inc b/recipes-browser/chromium/chromium.inc
new file mode 100644
index 0000000..ad976f9
--- /dev/null
+++ b/recipes-browser/chromium/chromium.inc
@@ -0,0 +1,217 @@
+# 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
+
+DESCRIPTION = "Chromium browser"
+LICENSE = "BSD"
+DEPENDS = "xz-native pciutils pulseaudio cairo nss zlib-native libav libgnome-keyring cups ninja-native gconf libexif pango libdrm"
+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 \
+"
+
+# PACKAGECONFIG explanations:
+#
+# * use-egl : 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. On by default.
+#
+# * disable-api-keys-info-bar : 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.
+#                               Off by default.
+#
+# * component-build : 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. Off by default.
+#
+# * ignore-lost-context : 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). Off by default.
+#
+# * impl-side-painting : 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.
+#                        Off by default.
+
+# conditionally add ozone-wayland and its patches to the Chromium sources
+
+ENABLE_X11 = "${@base_contains('DISTRO_FEATURES', 'x11', '1', '0', d)}"
+# only enable Wayland if X11 isn't already enabled
+ENABLE_WAYLAND = "${@base_contains('DISTRO_FEATURES', 'x11', '0', \
+                     base_contains('DISTRO_FEATURES', 'wayland', '1', \
+                     '0', d),d)}"
+
+# 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 = " "
+
+OZONE_WAYLAND_GIT_DESTSUFFIX = "ozone-wayland-git"
+OZONE_WAYLAND_GIT_BRANCH = ""
+OZONE_WAYLAND_GIT_SRCREV = ""
+SRC_URI += "${@base_conditional('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('ENABLE_WAYLAND', '1', 'copy_ozone_wayland_files', '', d)}"
+do_patch[prefuncs] += "${@base_conditional('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'))
+}
+
+
+# include.gypi exists only for armv6 and armv7a and there isn't something like COMPATIBLE_ARCH afaik
+COMPATIBLE_MACHINE = "(-)"
+COMPATIBLE_MACHINE_i586 = "(.*)"
+COMPATIBLE_MACHINE_x86-64 = "(.*)"
+COMPATIBLE_MACHINE_armv6 = "(.*)"
+COMPATIBLE_MACHINE_armv7a = "(.*)"
+
+inherit gettext
+
+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"
+
+EXTRA_OEGYP =	" \
+	-Dangle_use_commit_id=0 \
+	-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)} \
+	-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)}"
+
+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)} \
+"
+
+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('ENABLE_X11', True) == '1':
+        d.appendVar('DEPENDS', ' %s ' % d.getVar('CHROMIUM_X11_DEPENDS', True))
+        d.appendVar('GYP_DEFINES', ' %s ' % d.getVar('CHROMIUM_X11_GYP_DEFINES', True))
+    if d.getVar('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))
+}
+
+do_configure() {
+	cd ${S}
+	GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
+	# replace LD with CXX, to workaround a possible gyp issue?
+	LD="${CXX}" export LD
+	CC="${CC}" export CC
+	CXX="${CXX}" export CXX
+	CC_host="${BUILD_CC}" export CC_host
+	CXX_host="${BUILD_CXX}" export CXX_host
+	build/gyp_chromium --depth=. ${EXTRA_OEGYP}
+}
+
+do_compile() {
+	# build with ninja
+	ninja -C ${S}/out/Release chrome chrome_sandbox
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 ${WORKDIR}/google-chrome ${D}${bindir}/
+
+	# 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
+
+	install -d ${D}${datadir}/applications
+	install -m 0644 ${WORKDIR}/google-chrome.desktop ${D}${datadir}/applications/
+
+	install -d ${D}${bindir}/chrome/
+	install -m 0755 ${S}/out/Release/chrome ${D}${bindir}/chrome/chrome
+	install -m 0644 ${S}/out/Release/resources.pak ${D}${bindir}/chrome/
+	install -m 0644 ${S}/out/Release/icudtl.dat ${D}${bindir}/chrome/
+	install -m 0644 ${S}/out/Release/content_resources.pak ${D}${bindir}/chrome/
+	install -m 0644 ${S}/out/Release/keyboard_resources.pak ${D}${bindir}/chrome/
+	install -m 0644 ${S}/out/Release/chrome_100_percent.pak ${D}${bindir}/chrome/
+	install -m 0644 ${S}/out/Release/product_logo_48.png ${D}${bindir}/chrome/
+	install -m 0755 ${S}/out/Release/libffmpegsumo.so ${D}${bindir}/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}/chrome/
+	if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'component-build', '', d)}" ]; then
+		install -m 0755 ${S}/out/Release/lib/*.so ${D}${libdir}/chrome/
+	fi
+
+	install -d ${D}${sbindir}
+	install -m 4755 ${S}/out/Release/chrome_sandbox ${D}${sbindir}/chrome-devel-sandbox
+
+	install -d ${D}${bindir}/chrome/locales/
+	install -m 0644 ${S}/out/Release/locales/en-US.pak ${D}${bindir}/chrome/locales
+}
+
+FILES_${PN} = "${bindir}/chrome/ ${bindir}/google-chrome ${datadir}/applications ${sbindir}/ ${libdir}/chrome/"
+FILES_${PN}-dbg += "${bindir}/chrome/.debug/ ${libdir}/chrome/.debug/"
+
+PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
+
+
+
+
diff --git a/recipes-browser/chromium/chromium/0001-Disable-rasterization-whitelist-unlocking-impl-side-.patch b/recipes-browser/chromium/chromium/chromium-38/0001-Disable-rasterization-whitelist-unlocking-impl-side-.patch
similarity index 100%
rename from recipes-browser/chromium/chromium/0001-Disable-rasterization-whitelist-unlocking-impl-side-.patch
rename to recipes-browser/chromium/chromium/chromium-38/0001-Disable-rasterization-whitelist-unlocking-impl-side-.patch
diff --git a/recipes-browser/chromium/chromium/0001-Remove-X-libraries-from-GYP-files.patch b/recipes-browser/chromium/chromium/chromium-38/0001-Remove-X-libraries-from-GYP-files.patch
similarity index 100%
rename from recipes-browser/chromium/chromium/0001-Remove-X-libraries-from-GYP-files.patch
rename to recipes-browser/chromium/chromium/chromium-38/0001-Remove-X-libraries-from-GYP-files.patch
diff --git a/recipes-browser/chromium/chromium/0001-Remove-accelerated-Canvas-support-from-blacklist.patch b/recipes-browser/chromium/chromium/chromium-38/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
similarity index 100%
rename from recipes-browser/chromium/chromium/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
rename to recipes-browser/chromium/chromium/chromium-38/0001-Remove-accelerated-Canvas-support-from-blacklist.patch
diff --git a/recipes-browser/chromium/chromium/0001-Remove-hard-coded-values-for-CC-and-CXX.patch b/recipes-browser/chromium/chromium/chromium-38/0001-Remove-hard-coded-values-for-CC-and-CXX.patch
similarity index 100%
rename from recipes-browser/chromium/chromium/0001-Remove-hard-coded-values-for-CC-and-CXX.patch
rename to recipes-browser/chromium/chromium/chromium-38/0001-Remove-hard-coded-values-for-CC-and-CXX.patch
diff --git a/recipes-browser/chromium/chromium/0001-shell-integration-conditionally-compile-routines-for.patch b/recipes-browser/chromium/chromium/chromium-38/0001-shell-integration-conditionally-compile-routines-for.patch
similarity index 100%
rename from recipes-browser/chromium/chromium/0001-shell-integration-conditionally-compile-routines-for.patch
rename to recipes-browser/chromium/chromium/chromium-38/0001-shell-integration-conditionally-compile-routines-for.patch
diff --git a/recipes-browser/chromium/chromium/0002-Disable-API-keys-info-bar.patch b/recipes-browser/chromium/chromium/chromium-38/0002-Disable-API-keys-info-bar.patch
similarity index 100%
rename from recipes-browser/chromium/chromium/0002-Disable-API-keys-info-bar.patch
rename to recipes-browser/chromium/chromium/chromium-38/0002-Disable-API-keys-info-bar.patch
diff --git a/recipes-browser/chromium/chromium_38.0.2125.101.bb b/recipes-browser/chromium/chromium_38.0.2125.101.bb
index 8e347a9..55d2cca 100644
--- a/recipes-browser/chromium/chromium_38.0.2125.101.bb
+++ b/recipes-browser/chromium/chromium_38.0.2125.101.bb
@@ -1,206 +1,27 @@
-DESCRIPTION = "Chromium browser"
-LICENSE = "BSD"
+include chromium.inc
+
 LIC_FILES_CHKSUM = "file://LICENSE;md5=537e0b52077bf0a616d0a0c8a79bc9d5"
-DEPENDS = "xz-native pciutils pulseaudio cairo nss zlib-native libav libgnome-keyring cups ninja-native gconf libexif pango libdrm"
-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)} \
-        ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
-        ${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', 'file://0001-Disable-rasterization-whitelist-unlocking-impl-side-.patch', '', d)} \
-        ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://0002-Disable-API-keys-info-bar.patch', '', d)} \
-        file://0001-Remove-hard-coded-values-for-CC-and-CXX.patch \
+SRC_URI += "\
+        ${@bb.utils.contains('PACKAGECONFIG', 'ignore-lost-context', 'file://chromium-38/0001-Remove-accelerated-Canvas-support-from-blacklist.patch', '', d)} \
+        ${@bb.utils.contains('PACKAGECONFIG', 'impl-side-painting', 'file://chromium-38/0001-Disable-rasterization-whitelist-unlocking-impl-side-.patch', '', d)} \
+        ${@bb.utils.contains('PACKAGECONFIG', 'disable-api-keys-info-bar', 'file://chromium-38/0002-Disable-API-keys-info-bar.patch', '', d)} \
+        file://chromium-38/0001-Remove-hard-coded-values-for-CC-and-CXX.patch \
         file://unistd-2.patch \
-        file://google-chrome \
-        file://google-chrome.desktop \
 "
-SRC_URI[md5sum] = "be4d3ad6944e43132e4fbde5a23d1ab8"
-SRC_URI[sha256sum] = "d3303519ab471a3bc831e9b366e64dc2fe651894e52ae5d1e74de60ee2a1198a"
-
-# PACKAGECONFIG explanations:
-#
-# * use-egl : 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. On by default.
-#
-# * disable-api-keys-info-bar : 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.
-#                               Off by default.
-#
-# * component-build : 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. Off by default.
-#
-# * ignore-lost-context : 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). Off by default.
-#
-# * impl-side-painting : 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.
-#                        Off by default.
-
 # conditionally add shell integration patch (ozone-wayland contains a patch that makes
 # this one redundant, therefore use this patch only for X11 builds)
-SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'file://0001-shell-integration-conditionally-compile-routines-for.patch', '', d)}"
-
-# conditionally add ozone-wayland and its patches to the Chromium sources
-
-ENABLE_X11 = "${@base_contains('DISTRO_FEATURES', 'x11', '1', '0', d)}"
-# only enable Wayland if X11 isn't already enabled
-ENABLE_WAYLAND = "${@base_contains('DISTRO_FEATURES', 'x11', '0', \
-                     base_contains('DISTRO_FEATURES', 'wayland', '1', \
-                     '0', d),d)}"
-
-# 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)
+SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'file://chromium-38/0001-shell-integration-conditionally-compile-routines-for.patch', '', d)}"
+SRC_URI[md5sum] = "be4d3ad6944e43132e4fbde5a23d1ab8"
+SRC_URI[sha256sum] = "d3303519ab471a3bc831e9b366e64dc2fe651894e52ae5d1e74de60ee2a1198a"
 
-OZONE_WAYLAND_EXTRA_PATCHES = " \
-        file://0001-Remove-X-libraries-from-GYP-files.patch \
+OZONE_WAYLAND_EXTRA_PATCHES += " \
+        file://chromium-38/0001-Remove-X-libraries-from-GYP-files.patch \
 "
-
-OZONE_WAYLAND_GIT_DESTSUFFIX = "ozone-wayland-git"
 OZONE_WAYLAND_GIT_BRANCH = "Milestone-Harvest"
 OZONE_WAYLAND_GIT_SRCREV = "0f8b830730d9b696a667c331c50ac6333bb85c13"
-SRC_URI += "${@base_conditional('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)}"
-
-do_unpack[postfuncs] += "${@base_conditional('ENABLE_WAYLAND', '1', 'copy_ozone_wayland_files', '', d)}"
-do_patch[prefuncs] += "${@base_conditional('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"
-    # using 00*.patch to skip WebRTC patches
-    # 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.
-    upstream_patches = glob.glob(upstream_patches_dir + "/00*.patch")
-    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'))
-}
-
-
-# include.gypi exists only for armv6 and armv7a and there isn't something like COMPATIBLE_ARCH afaik
-COMPATIBLE_MACHINE = "(-)"
-COMPATIBLE_MACHINE_i586 = "(.*)"
-COMPATIBLE_MACHINE_x86-64 = "(.*)"
-COMPATIBLE_MACHINE_armv6 = "(.*)"
-COMPATIBLE_MACHINE_armv7a = "(.*)"
-
-inherit gettext
-
-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"
-
-EXTRA_OEGYP =	" \
-	-Dangle_use_commit_id=0 \
-	-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)} \
-	-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)}"
-
-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)} \
-"
-
-GYP_DEFINES = "${ARMFPABI} release_extra_cflags='-Wno-error=unused-local-typedefs' sysroot=''"
-
-python() {
-    if d.getVar('ENABLE_X11', True) == '1':
-        d.appendVar('DEPENDS', ' xextproto gtk+ libxi libxss ')
-    if d.getVar('ENABLE_WAYLAND', True) == '1':
-        d.appendVar('DEPENDS', ' wayland libxkbcommon ')
-        d.appendVar('GYP_DEFINES', ' use_ash=1 use_aura=1 chromeos=0 use_ozone=1 ')
-}
-
-do_configure() {
-	cd ${S}
-	GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
-	# replace LD with CXX, to workaround a possible gyp issue?
-	LD="${CXX}" export LD
-	CC="${CC}" export CC
-	CXX="${CXX}" export CXX
-	CC_host="${BUILD_CC}" export CC_host
-	CXX_host="${BUILD_CXX}" export CXX_host
-	build/gyp_chromium --depth=. ${EXTRA_OEGYP}
-}
-
-do_compile() {
-	# build with ninja
-	ninja -C ${S}/out/Release chrome chrome_sandbox
-}
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 ${WORKDIR}/google-chrome ${D}${bindir}/
-
-	# 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
-
-	install -d ${D}${datadir}/applications
-	install -m 0644 ${WORKDIR}/google-chrome.desktop ${D}${datadir}/applications/
-
-	install -d ${D}${bindir}/chrome/
-	install -m 0755 ${S}/out/Release/chrome ${D}${bindir}/chrome/chrome
-	install -m 0644 ${S}/out/Release/resources.pak ${D}${bindir}/chrome/
-	install -m 0644 ${S}/out/Release/icudtl.dat ${D}${bindir}/chrome/
-	install -m 0644 ${S}/out/Release/content_resources.pak ${D}${bindir}/chrome/
-	install -m 0644 ${S}/out/Release/keyboard_resources.pak ${D}${bindir}/chrome/
-	install -m 0644 ${S}/out/Release/chrome_100_percent.pak ${D}${bindir}/chrome/
-	install -m 0644 ${S}/out/Release/product_logo_48.png ${D}${bindir}/chrome/
-	install -m 0755 ${S}/out/Release/libffmpegsumo.so ${D}${bindir}/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}/chrome/
-	if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'component-build', 'component-build', '', d)}" ]; then
-		install -m 0755 ${S}/out/Release/lib/*.so ${D}${libdir}/chrome/
-	fi
-
-	install -d ${D}${sbindir}
-	install -m 4755 ${S}/out/Release/chrome_sandbox ${D}${sbindir}/chrome-devel-sandbox
-
-	install -d ${D}${bindir}/chrome/locales/
-	install -m 0644 ${S}/out/Release/locales/en-US.pak ${D}${bindir}/chrome/locales
-}
-
-FILES_${PN} = "${bindir}/chrome/ ${bindir}/google-chrome ${datadir}/applications ${sbindir}/ ${libdir}/chrome/"
-FILES_${PN}-dbg += "${bindir}/chrome/.debug/ ${libdir}/chrome/.debug/"
-
-PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
-
+# using 00*.patch to skip the WebRTC patches in ozone-wayland
+# 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"
-- 
1.9.1



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

end of thread, other threads:[~2015-01-26 23:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 23:19 [meta-browser][PATCH 1/2] chromium: Reorganize into .inc and .bb to allow for cleaner upgrades Carlos Rafael Giani
2015-01-26 23:19 ` [meta-browser][PATCH 2/2] chromium: chromium: Upgrade to version 40.0.2214.91 Carlos Rafael Giani

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.