Skip to contentSkip to conversation

cef3: Add recipe for Chromium Embedded Framework

PATCH New Khem Raj 2 participants 5 messages Apr 28, 2015 – May 12, 2015

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v8 1/3 cef3: Add recipe for Chromium Embedded Framework

CEF is a framework to embed chromium based browsers into other applications

Change-Id Ieabae43042101331f67cf6e673391f6fe320561f
---
 .../cef3/01_get_svn_version_from_LASTCHANGE.patch  |  32 +++
 recipes-browser/chromium/cef3_280796.bb            |  50 ++++
 recipes-browser/chromium/chromium.inc              | 253 +++++++--------------
 recipes-browser/chromium/chromium_40.0.2214.91.bb  | 163 +++++++++++++
 4 files changed, 327 insertions(+), 171 deletions(-)
 create mode 100644 recipes-browser/chromium/cef3/01_get_svn_version_from_LASTCHANGE.patch
 create mode 100644 recipes-browser/chromium/cef3_280796.bb
recipes-browser/chromium/cef3/01_get_svn_version_from_LASTCHANGE.patch new file +32 -0
new file mode 100644
index 0000000..9b14429
@@ -0,0 +1,32 @@
+Fetch the revision from LASTCHANGE file programmatically
+
+Upstream-Status: Pending
+
+Signed-off-by: Zoltan Kuscsik <[email protected]>
+Signed-off-by: Khem Raj <[email protected]>
+
+diff --git a/cef/tools/make_version_header.py b/cef/tools/make_version_header.py
+index 84d49f5..395c2cf 100644
+--- a/cef/tools/make_version_header.py
++++ b/cef/tools/make_version_header.py
+@@ -64,6 +64,8 @@ def write_svn_header(header, chrome_version, cef_version, cpp_header_dir):
+       revision = svn.get_revision()
+     elif git.is_checkout('.'):
+       revision = git.get_svn_revision()
++    elif os.path.isfile("../build/util/LASTCHANGE"):
++      revision = open("../build/util/LASTCHANGE").read().split("=")[1].strip()
+     else:
+       raise Exception('Not a valid checkout')
+
+diff --git a/cef/tools/revision.py b/cef/tools/revision.py
+index 1d94602..eb89e3b 100644
+--- a/cef/tools/revision.py
++++ b/cef/tools/revision.py
+@@ -16,6 +16,8 @@ if os.path.exists(os.path.join('.', '.svn')):
+   sys.stdout.write(svn.get_revision())
+ elif os.path.exists(os.path.join('.', '.git')):
+   sys.stdout.write(git.get_svn_revision())
++elif os.path.isfile("../build/util/LASTCHANGE"):
++  revision = open("../build/util/LASTCHANGE").read().split("=")[1].strip()
+ else:
+   raise Exception('Not a valid checkout')
recipes-browser/chromium/cef3_280796.bb new file +50 -0

50 lines not on this page · raw message

recipes-browser/chromium/chromium.inc +82 -171

293 lines not on this page · raw message

recipes-browser/chromium/chromium_40.0.2214.91.bb +163 -0

170 lines not on this page · raw message

Signature · 1 line
2.1.4
author
#1 lore raw

PATCH v3 2/3 chromium: Remove use of deprecated udev logging API

in systemd >= 218 libudev deprecated support for udev_set_log_fn see
https://github.com/systemd/systemd/commit/25e773eeb4f853804e1bf0dbd9a184f23e9b2a97

Change-Id If6e3742bd2a70685f2521f134d5965bf2d1f8f72
---
 .../chromium/chromium-40/0010-systemd-218.patch    | 39 ++++++++++++++++++++++
 recipes-browser/chromium/chromium_40.0.2214.91.bb  |  1 +
 2 files changed, 40 insertions(+)
 create mode 100644 recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch
recipes-browser/chromium/chromium/chromium-40/0010-systemd-218.patch new file +39 -0
new file mode 100644
index 0000000..3aec8d0
@@ -0,0 +1,39 @@
+Remove use of udev_set_log_priority API its gone in systemd >= 218
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+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);
+ }
+ 
recipes-browser/chromium/chromium_40.0.2214.91.bb +1 -0
index 3a5108e..53af755 100644
@@ -91,6 +91,7 @@ SRC_URI[sha256sum] = "f72fda9ff1ea256ab911610ee532eadf8303137d431f2481d01d3d60e5
 
 OZONE_WAYLAND_EXTRA_PATCHES += " \
         file://chromium-40/0005-Remove-X-libraries-from-GYP-files.patch \
+        file://chromium-40/0010-systemd-218.patch \
 "
 OZONE_WAYLAND_GIT_BRANCH = "Milestone-ThanksGiving"
 OZONE_WAYLAND_GIT_SRCREV = "5d7baa9bc3b8c88e9b7e476e3d6bc8cd44a887fe"
Signature · 1 line
2.1.4
author
#2 lore raw

PATCH 3/3 chromium, cef: Package codecs separately

In reply to Khem Raj

chromium does not use versioned shared objects so deal with it Remove the band-aid to pretend to have versioning shared objects put the ffmpeg plugins in directory of its own in /usr/lib to avoid namespace conflict with same .so coming from other codec packages

Change-Id Ia9dceaa84844086fe8918246eb864d91ab4ec6aa
---
 recipes-browser/chromium/chromium.inc | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)
recipes-browser/chromium/chromium.inc +11 -19
index 655cf65..9c34a68 100644
@@ -46,14 +46,17 @@ do_install() {
 		install -m 0644 ${B}/out/${CHROMIUM_BUILD_TYPE}/icudtl.dat ${D}${bindir}
 	fi
 	install -d ${D}${libdir}
-        if [ -f "${B}/out/${CHROMIUM_BUILD_TYPE}/libcef.so" ]; then
+        if [ -f "${B}/out/${CHROMIUM_BUILD_TYPE}/lib/libcef.so" ]; then
 		install -m 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/lib/libcef.so ${D}${libdir}
         fi
+	if [ -f "${B}/out/${CHROMIUM_BUILD_TYPE}/libpdf.so" ]; then
+		install -Dm 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/libpdf.so ${D}${libdir}/chrome/libpdf.so
+	fi
 	if [ -f "${B}/out/${CHROMIUM_BUILD_TYPE}/libosmesa.so" ]; then
-		install -m 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/libosmesa.so ${D}${libdir}
+		install -Dm 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/libosmesa.so ${D}${libdir}/chrome/libosmesa.so
 	fi
 	if [ -f "${B}/out/${CHROMIUM_BUILD_TYPE}/libffmpegsumo.so" ]; then
-		install -m 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/libffmpegsumo.so ${D}${libdir}
+		install -Dm 0755 ${B}/out/${CHROMIUM_BUILD_TYPE}/libffmpegsumo.so ${D}${libdir}/chrome/libffmpegsumo.so
 	fi
 	install -d ${D}${bindir}/chrome
 	if [ -f "${B}/out/${CHROMIUM_BUILD_TYPE}/chrome" ]; then
@@ -95,22 +98,12 @@ do_install() {
 	if [ -f "${B}/out/${CHROMIUM_BUILD_TYPE}/chrome_sandbox" ]; then
 		install -m 4755 ${B}/out/${CHROMIUM_BUILD_TYPE}/chrome_sandbox ${D}${sbindir}/chrome-devel-sandbox
 	fi
-
-	# take care of yocto-way libraries naming (versions)
-	cd ${D}${libdir}
-	for library in $(find -type f -name '*.so'); do
-		startDir="$(pwd)"
-		cd "$(dirname "$library")"
-		rm -f "$library.0.0.1"
-		mv "$library" "$library.0.0.1"
-		ln -sf "$library.0.0.1" "$library.0.0"
-		ln -sf "$library.0.0" "$library.0"
-		ln -sf "$library.0" "$library"
-		cd "$startDir"
-	done
-
 }
 
+PACKAGES =+ "${PN}-codecs-ffmpeg ${PN}-plugin-pdf"
+
+FILES_${PN}-codecs-ffmpeg = "${libdir}/chrome/libffmpegsumo.so"
+FILES_${PN}-plugin-pdf = "${libdir}/chrome/libpdf.so"
 
 FILES_${PN} = "${bindir}/chrome/ ${bindir}/google-chrome ${datadir}/applications ${sbindir}/ ${libdir}/chrome/"
 FILES_${PN}-dbg += "${bindir}/chrome/.debug/ ${libdir}/chrome/.debug/"
@@ -118,11 +111,10 @@ FILES_${PN}-dbg += "${bindir}/chrome/.debug/ ${libdir}/chrome/.debug/"
 PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
 
 INSANE_SKIP_${PN} = "ldflags"
+SOLIBS = ".so"
 FILES_SOLIBSDEV = ""
 FILES_${PN} += "${bindir} ${bindir}/chrome/ ${libdir}"
 FILES_${PN} += "${bindir}/chrome/*.pak"
 FILES_${PN} += "${bindir}/chrome/locales/*.pak"
 FILES_${PN}-dbg += "${bindir}/chrome/.debug/ ${libdir}/.debug/"
 
-
-
Signature · 1 line
2.1.4
#3 lore raw

Re: [meta-browser][PATCH 3/3] chromium, cef: Package codecs separately

Quoted 4 lines · Khem Raj

chromium does not use versioned shared objects so deal with it Remove the band-aid to pretend to have versioning shared objects put the ffmpeg plugins in directory of its own in /usr/lib to avoid namespace conflict with same .so coming from other codec packages

There is still some overlap between chromium and cef recipes:

ERROR: The recipe cef3 is trying to install files into a shared area
when those files already exist. Those files and their manifest location
are:
/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86/usr/lib/chrome/libpdf.so
Matched in manifest-qemux86-chromium.populate_sysroot /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86/usr/lib/chrome/libffmpegsumo.so Matched in manifest-qemux86-chromium.populate_sysroot
Please verify which recipe should provide the above files.

Can we please disable staging these 2 libraries in one of them?

Regards,

author
#4 lore raw

Re: [meta-browser][PATCH 3/3] chromium, cef: Package codecs separately

Quoted 11 lines · Martin Jansa

There is still some overlap between chromium and cef recipes:

ERROR: The recipe cef3 is trying to install files into a shared area
when those files already exist. Those files and their manifest location
are:
/home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86/usr/lib/chrome/libpdf.so
Matched in manifest-qemux86-chromium.populate_sysroot /home/jenkins/oe/world/shr-core/tmp-glibc/sysroots/qemux86/usr/lib/chrome/libffmpegsumo.so Matched in manifest-qemux86-chromium.populate_sysroot
Please verify which recipe should provide the above files.

Quoted 1 line

Can we please disable staging these 2 libraries in one of them?

actually cef should put it under /usr/lib/cef/ then they can live happily