From cebbf8734ec78874471b45893eba424068f1c6df Mon Sep 17 00:00:00 2001 From: Robert Drab <robert.drab@huawei.com> Date: Tue, 8 Jun 2021 12:19:42 +0200 Subject: [PATCH] gn-native: introduce recipe Add host variant of the Google's GN meta-build system tool. Similarly to cmake, GN generates Ninja files for the final compilation. Closes: https://git.ostc-eu.org/OSTC/OHOS/meta-ohos/-/issues/63 Signed-off-by: Robert Drab <robert.drab@huawei.com> --- .../recipes-devtools/gn/gn-native_git.bb | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 meta-ohos-staging/recipes-devtools/gn/gn-native_git.bb diff --git a/meta-ohos-staging/recipes-devtools/gn/gn-native_git.bb b/meta-ohos-staging/recipes-devtools/gn/gn-native_git.bb new file mode 100644 index 00000000..b15ce97b --- /dev/null +++ b/meta-ohos-staging/recipes-devtools/gn/gn-native_git.bb @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +SUMMARY = "Meta-build system that generates build files for Ninja" +LICENSE = "BSD-3-Clause & Unicode" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0fca02217a5d49a14dfe2d11837bb34d \ + file://src/base/third_party/icu/LICENSE;md5=97cdee8fe9e91b393a616bc13c8081db" + +SRC_URI = "git://gn.googlesource.com/gn.git;protocol=https" + +DEPENDS = "ninja-native" + +PV = "0.0+git${SRCPV}" +SRCREV = "39a87c0b36310bdf06b692c098f199a0d97fc810" + +S = "${WORKDIR}/git" + +inherit native + +do_configure () { + python3 build/gen.py --no-strip --out-path ${B} +} + +do_compile () { + ninja -C ${B} +} + +do_install () { + install -D ${B}/gn ${D}${bindir}/gn +} -- GitLab