aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/bazel/bazel-native_0.21.0.bb1
-rw-r--r--recipes-devtools/bazel/files/0001-fix-unzip-command-not-found.patch33
2 files changed, 34 insertions, 0 deletions
diff --git a/recipes-devtools/bazel/bazel-native_0.21.0.bb b/recipes-devtools/bazel/bazel-native_0.21.0.bb
index d9ad1ea..60131ca 100644
--- a/recipes-devtools/bazel/bazel-native_0.21.0.bb
+++ b/recipes-devtools/bazel/bazel-native_0.21.0.bb
@@ -8,6 +8,7 @@ SRC_URI[sha256sum] = "6ccb831e683179e0cfb351cb11ea297b4db48f9eab987601c038aa0f83
SRC_URI = "https://github.com/bazelbuild/bazel/releases/download/${PV}/bazel-${PV}-dist.zip \
file://0001-HttpDownloader-save-download-tarball-to-distdir.patch \
file://0001-Rename-gettid-functions.patch \
+ file://0001-fix-unzip-command-not-found.patch \
"
inherit native pythonnative
diff --git a/recipes-devtools/bazel/files/0001-fix-unzip-command-not-found.patch b/recipes-devtools/bazel/files/0001-fix-unzip-command-not-found.patch
new file mode 100644
index 0000000..9fb0239
--- /dev/null
+++ b/recipes-devtools/bazel/files/0001-fix-unzip-command-not-found.patch
@@ -0,0 +1,33 @@
+From e00e75dc8bc3c1153633e1ba7cb98a0a58658e86 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Sat, 4 Apr 2020 12:48:01 +0800
+Subject: [PATCH] fix unzip: command not found
+
+If host does not provide unzip, build bazel will fail even though
+Yocto native sysroot does have unzip.
+
+The reason is var-PATH was not passed to bazel build in some cases.
+
+Upstream-Status: Inappropriate [wr-installer specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ .../devtools/build/lib/bazel/rules/BazelRuleClassProvider.java | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
+index fc4aad75..e1686732 100755
+--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
++++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
+@@ -420,7 +420,7 @@ public class BazelRuleClassProvider {
+ // from the local machine. For now, this can be overridden with --action_env=PATH=<value>, so
+ // at least there's a workaround.
+ if (os != OS.WINDOWS) {
+- return "/bin:/usr/bin";
++ return "/bin:/usr/bin:" + System.getenv("PATH");
+ }
+
+ // Attempt to compute the MSYS root (the real Windows path of "/") from `sh`.
+--
+2.17.1
+