SDK: add native+target packages to build chromium 53/11253/2
authorStephane Desneux <stephane.desneux@iot.bzh>
Thu, 12 Oct 2017 12:58:03 +0000 (14:58 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Thu, 12 Oct 2017 20:53:26 +0000 (20:53 +0000)
This adds the following recipes/adjustements:
* recipes-devtools/gn (copied from https://github.com/Igalia/meta-browser, branch ozone/wayland/20170928, rev a01cf92)
* recipes-devtools/ninja
* recipes-extended/gperf

Bug-AGL: SPEC-942

Change-Id: Ibc34a055ead85aeea24c66665655c9070b47d032
Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
recipes-devtools/gn/gn-20170928.r499098.git8eb8619a/0001-Add-missing-deps.patch [new file with mode: 0644]
recipes-devtools/gn/gn.inc [new file with mode: 0644]
recipes-devtools/gn/gn_20170928.r499098.git8eb8619a.bb [new file with mode: 0644]
recipes-devtools/ninja/ninja_%.bbappend [new file with mode: 0644]
recipes-extended/gperf/gperf_%.bbappend [new file with mode: 0644]
recipes-platform/images/agl-demo-platform-crosssdk.bb

diff --git a/recipes-devtools/gn/gn-20170928.r499098.git8eb8619a/0001-Add-missing-deps.patch b/recipes-devtools/gn/gn-20170928.r499098.git8eb8619a/0001-Add-missing-deps.patch
new file mode 100644 (file)
index 0000000..575b0dd
--- /dev/null
@@ -0,0 +1,40 @@
+From 366c27b283c6d94f9cdc4657c3443c3ef0627aad Mon Sep 17 00:00:00 2001
+From: Maksim Sisov <msisov@igalia.com>
+Date: Fri, 29 Sep 2017 00:19:09 +0300
+Subject: [PATCH] Add missing deps
+
+---
+ tools/gn/bootstrap/bootstrap.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
+index 004d81cef5a2..0300b761c090 100755
+--- a/tools/gn/bootstrap/bootstrap.py
++++ b/tools/gn/bootstrap/bootstrap.py
+@@ -456,6 +456,7 @@ def write_gn_ninja(path, root_gen_dir, options):
+       'base/message_loop/message_pump.cc',
+       'base/message_loop/message_pump_default.cc',
+       'base/metrics/bucket_ranges.cc',
++      'base/metrics/field_trial_params.cc',
+       'base/metrics/field_trial.cc',
+       'base/metrics/field_trial_param_associator.cc',
+       'base/metrics/histogram.cc',
+@@ -508,6 +509,7 @@ def write_gn_ninja(path, root_gen_dir, options):
+       'base/task_scheduler/scheduler_single_thread_task_runner_manager.cc',
+       'base/task_scheduler/scheduler_worker.cc',
+       'base/task_scheduler/scheduler_worker_pool_impl.cc',
++      'base/task_scheduler/scheduler_worker_pool.cc',
+       'base/task_scheduler/scheduler_worker_pool_params.cc',
+       'base/task_scheduler/scheduler_worker_stack.cc',
+       'base/task_scheduler/scoped_set_task_priority_for_current_thread.cc',
+@@ -522,6 +524,7 @@ def write_gn_ninja(path, root_gen_dir, options):
+       'base/third_party/dmg_fp/g_fmt.cc',
+       'base/third_party/icu/icu_utf.cc',
+       'base/third_party/nspr/prtime.cc',
++      'base/threading/scoped_blocking_call.cc',
+       'base/threading/post_task_and_reply_impl.cc',
+       'base/threading/sequence_local_storage_map.cc',
+       'base/threading/sequenced_task_runner_handle.cc',
+-- 
+2.11.0
+
diff --git a/recipes-devtools/gn/gn.inc b/recipes-devtools/gn/gn.inc
new file mode 100644 (file)
index 0000000..2728bc1
--- /dev/null
@@ -0,0 +1,21 @@
+SUMMARY = "Meta-build system from Google"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d"
+
+DEPENDS = "python-native ninja-native"
+
+SRC_URI = "http://gsdview.appspot.com/chromium-browser-official/chromium-${PV}.tar.xz"
+
+S ?= "${WORKDIR}/chromium-${PV}"
+
+do_compile () {
+  cd ${S}/tools/gn
+  ./bootstrap/bootstrap.py -s
+}
+
+do_install () {
+  install -d ${D}${bindir}
+  install -m 0755 out/Release/gn ${D}${bindir}/gn
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-devtools/gn/gn_20170928.r499098.git8eb8619a.bb b/recipes-devtools/gn/gn_20170928.r499098.git8eb8619a.bb
new file mode 100644 (file)
index 0000000..a6955fd
--- /dev/null
@@ -0,0 +1,9 @@
+require gn.inc
+
+S = "${WORKDIR}/src"
+
+SRC_URI = "https://tmp.igalia.com/chromium-tarballs/chromium-wayland-8eb8619a.tar.xz"
+SRC_URI += "file://0001-Add-missing-deps.patch"
+
+SRC_URI[md5sum] = "2a83227fcdb52b162014384e6550e8cb"
+SRC_URI[sha256sum] = "1f394b48dc5f3815d051f7af724873ff0785086578aadc0d8d4395e10217be27"
diff --git a/recipes-devtools/ninja/ninja_%.bbappend b/recipes-devtools/ninja/ninja_%.bbappend
new file mode 100644 (file)
index 0000000..efc347a
--- /dev/null
@@ -0,0 +1,2 @@
+BBCLASSEXTEND += "nativesdk"
+
diff --git a/recipes-extended/gperf/gperf_%.bbappend b/recipes-extended/gperf/gperf_%.bbappend
new file mode 100644 (file)
index 0000000..2a59083
--- /dev/null
@@ -0,0 +1 @@
+BBCLASSEXTEND += "nativesdk"
index 71ba5ba..6df9521 100644 (file)
@@ -17,3 +17,30 @@ inherit populate_sdk populate_sdk_qt5
 # Both exec "createrepo" on the same directory, and so one of them
 # can failed (randomly).
 addtask do_populate_sdk after do_rootfs
+
+# native tools to support Chromium build inside SDK (SPEC-942)
+TOOLCHAIN_HOST_TASK += " \
+    nativesdk-gn \
+    nativesdk-ninja \
+    nativesdk-gperf \
+    nativesdk-zlib \
+    nativesdk-xz \
+    nativesdk-nspr-dev \
+    nativesdk-nss-dev \
+    "
+
+# required dependencies for Chromium build inside SDK (SPEC-942)
+TOOLCHAIN_TARGET_TASK += " \
+    pciutils-dev \
+    pulseaudio-dev \
+    cairo-dev \
+    nss-dev \
+    cups-dev \
+    gconf-dev \
+    libexif-dev \
+    pango-dev \
+    libdrm-dev  \
+    libssp-dev \
+    ffmpeg-dev \
+    "
+