[meta-tensorflow,02/13] bazel-native: add version 0.21.0

Submitted by Hongxu Jia on Feb. 21, 2019, 11:37 a.m. | Patch ID: 158954

Details

Message ID 1550749039-67320-3-git-send-email-hongxu.jia@windriver.com
State New
Headers show

Commit Message

Hongxu Jia Feb. 21, 2019, 11:37 a.m.
It is the build system of tensorflow.

The build steps refers:
https://docs.bazel.build/versions/master/install-compile-source.html

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 recipes-devtools/bazel/bazel-native_0.21.0.bb | 33 +++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 recipes-devtools/bazel/bazel-native_0.21.0.bb

Patch hide | download patch | download mbox

diff --git a/recipes-devtools/bazel/bazel-native_0.21.0.bb b/recipes-devtools/bazel/bazel-native_0.21.0.bb
new file mode 100644
index 0000000..122e507
--- /dev/null
+++ b/recipes-devtools/bazel/bazel-native_0.21.0.bb
@@ -0,0 +1,33 @@ 
+DESCRIPTION = "Bazel build and test tool"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI[md5sum] = "8c8240b178a35c0f3c1bc03017550270"
+SRC_URI[sha256sum] = "6ccb831e683179e0cfb351cb11ea297b4db48f9eab987601c038aa0f83037db4"
+
+SRC_URI = "https://github.com/bazelbuild/bazel/releases/download/${PV}/bazel-${PV}-dist.zip"
+
+inherit native
+
+INHIBIT_SYSROOT_STRIP = "1"
+
+DEPENDS = "coreutils-native \
+           zip-native \
+           openjdk-8-native \
+          "
+
+S="${WORKDIR}"
+
+do_compile () {
+    export JAVA_HOME="${RECIPE_SYSROOT_NATIVE}/usr/lib/jvm/openjdk-8-native"
+    TMPDIR="${TOPDIR}/bazel" \
+    VERBOSE=yes \
+    EXTRA_BAZEL_ARGS="--distdir=${DL_DIR}" \
+    ./compile.sh
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -m 0755 ${S}/output/bazel ${D}${bindir}
+    create_cmdline_wrapper ${D}/${bindir}/bazel \$BAZEL_ARGS
+}