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.bb43
-rw-r--r--recipes-devtools/bazel/bazel-native_6.0.0.bb56
-rw-r--r--recipes-devtools/bazel/files/0001-HttpDownloader-save-download-tarball-to-distdir.patch82
-rw-r--r--recipes-devtools/bazel/files/0001-Rename-gettid-functions.patch65
-rw-r--r--recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch39
-rw-r--r--recipes-devtools/bazel/files/0001-cutsomize-native-toolchains-for-Yocto.patch35
-rw-r--r--recipes-devtools/bazel/files/0001-fix-compile-failure-on-gcc-13.patch71
-rw-r--r--recipes-devtools/bazel/files/0001-fix-unzip-command-not-found.patch20
-rw-r--r--recipes-devtools/bazel/files/0001-python3.patch47
-rw-r--r--recipes-devtools/openjdk/openjdk-11-native_11.0.15.bb32
-rw-r--r--recipes-devtools/openjdk/openjdk-8-native_212b04.bb32
-rw-r--r--recipes-devtools/python/python-google-auth.inc21
-rw-r--r--recipes-devtools/python/python3-astunparse_1.6.3.bb12
-rw-r--r--recipes-devtools/python/python3-gast_0.4.0.bb12
-rw-r--r--recipes-devtools/python/python3-google-auth-oauthlib_0.4.5.bb20
-rw-r--r--recipes-devtools/python/python3-google-auth_2.0.0.bb2
-rw-r--r--recipes-devtools/python/python3-google-pasta_0.2.0.bb12
-rw-r--r--recipes-devtools/python/python3-mldtypes_0.2.0.bb28
-rw-r--r--recipes-devtools/python/python3-opt-einsum/0001-Use-ConfigParser-instead-of-SafeConfigParser.patch36
-rw-r--r--recipes-devtools/python/python3-opt-einsum_3.3.0.bb19
20 files changed, 426 insertions, 258 deletions
diff --git a/recipes-devtools/bazel/bazel-native_0.21.0.bb b/recipes-devtools/bazel/bazel-native_0.21.0.bb
deleted file mode 100644
index f1baa33..0000000
--- a/recipes-devtools/bazel/bazel-native_0.21.0.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-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 \
- file://0001-HttpDownloader-save-download-tarball-to-distdir.patch \
- file://0001-Rename-gettid-functions.patch \
- file://0001-fix-unzip-command-not-found.patch \
- file://0001-python3.patch \
-"
-
-inherit native python3native
-
-INHIBIT_SYSROOT_STRIP = "1"
-
-CCACHE_DISABLE = "1"
-
-DEPENDS = "coreutils-native \
- zip-native \
- openjdk-8-native \
- "
-
-S="${WORKDIR}"
-
-TS_DL_DIR ??= "${DL_DIR}"
-do_compile () {
- export JAVA_HOME="${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native"
- TMPDIR="${TOPDIR}/bazel" \
- VERBOSE=yes \
- EXTRA_BAZEL_ARGS="--distdir=${TS_DL_DIR} --python_path=python3" \
- ./compile.sh
-}
-
-do_install () {
- install -d ${D}${bindir}
- install -m 0755 ${S}/output/bazel ${D}${bindir}
-}
-
-# Explicitly disable uninative
-UNINATIVE_LOADER = ""
diff --git a/recipes-devtools/bazel/bazel-native_6.0.0.bb b/recipes-devtools/bazel/bazel-native_6.0.0.bb
new file mode 100644
index 0000000..c930054
--- /dev/null
+++ b/recipes-devtools/bazel/bazel-native_6.0.0.bb
@@ -0,0 +1,56 @@
+DESCRIPTION = "Bazel build and test tool"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI[md5sum] = "f79f57d82795b591e95f9f7fa0f9a8da"
+SRC_URI[sha256sum] = "7bc0c5145c19a56d82a08fce6908c5e1a0e75e4fbfb3b6f12b4deae7f4b38cbc"
+
+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-fix-unzip-command-not-found.patch \
+ file://0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch \
+ file://0001-cutsomize-native-toolchains-for-Yocto.patch \
+ file://0001-fix-compile-failure-on-gcc-13.patch \
+"
+
+inherit python3native
+
+INHIBIT_SYSROOT_STRIP = "1"
+
+CCACHE_DISABLE = "1"
+
+DEPENDS = "coreutils-native \
+ zip-native \
+ openjdk-11-native \
+ "
+
+S="${WORKDIR}"
+
+inherit bazel-base
+
+EXTRA_BAZEL_ARGS = " \
+ --host_javabase=@local_jdk//:jdk \
+ --python_path=python3 \
+ --distdir=${TS_DL_DIR} \
+ ${@oe.utils.conditional("BAZEL_JOBS", "", "", "--jobs=${BAZEL_JOBS}", d )} \
+ ${@oe.utils.conditional("BAZEL_JOBS", "", "", "--local_cpu_resources=${BAZEL_JOBS}", d )} \
+ ${@oe.utils.conditional("BAZEL_MEM", "", "", "--local_ram_resources=${BAZEL_MEM}", d )} \
+"
+
+do_compile[network] = "1"
+do_compile () {
+ TMPDIR="${TMPDIR}/bazel" \
+ VERBOSE=yes \
+ EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS}" \
+ ./compile.sh
+}
+
+do_install () {
+ install -d ${D}${bindir}
+ install -m 0755 ${S}/output/bazel ${D}${bindir}
+}
+
+# Explicitly disable uninative
+UNINATIVE_LOADER = ""
+
+inherit native
diff --git a/recipes-devtools/bazel/files/0001-HttpDownloader-save-download-tarball-to-distdir.patch b/recipes-devtools/bazel/files/0001-HttpDownloader-save-download-tarball-to-distdir.patch
index 605756a..86aba40 100644
--- a/recipes-devtools/bazel/files/0001-HttpDownloader-save-download-tarball-to-distdir.patch
+++ b/recipes-devtools/bazel/files/0001-HttpDownloader-save-download-tarball-to-distdir.patch
@@ -1,71 +1,31 @@
-From e31a37bc9cb53de5085e885b190652f994209cf6 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Tue, 23 Apr 2019 05:21:40 -0400
+From 28acb4a213938bcb7e55ef3859699091c1f434c0 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@eng.windriver.com>
+Date: Thu, 1 Dec 2022 19:32:33 +0800
Subject: [PATCH] HttpDownloader: save download tarball to distdir
It is helpful for collecting tarball url which supports offline build.
Upstream-Status: Inappropriate [oe specific]
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Signed-off-by: Hongxu Jia <hongxu.jia@eng.windriver.com>
---
- .../repository/downloader/HttpDownloader.java | 50 ++++++++++++++--------
- 1 file changed, 32 insertions(+), 18 deletions(-)
+ .../bazel/repository/downloader/DownloadManager.java | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
-diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java
-index 18d10d2..cf71ac4 100755
---- a/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java
-+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/HttpDownloader.java
-@@ -204,26 +204,29 @@ public class HttpDownloader {
- eventHandler.handle(Event.warn("distdir " + dir + " is not a directory"));
+diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java
+index bf65090..ee30dde 100755
+--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java
++++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/downloader/DownloadManager.java
+@@ -213,6 +213,7 @@ public class DownloadManager {
} else {
- boolean match = false;
-- Path candidate = dir.getRelative(destination.getBaseName());
-- try {
-- match = RepositoryCache.getChecksum(KeyType.SHA256, candidate).equals(sha256);
-- } catch (IOException e) {
-- // Not finding anything in a distdir is a normal case, so handle it absolutely
-- // quietly. In fact, it is not uncommon to specify a whole list of dist dirs,
-- // with the asumption that only one will contain an entry.
-- }
-- if (match) {
-- if (isCachingByProvidedSha256) {
-- try {
-- repositoryCache.put(sha256, candidate, KeyType.SHA256);
-- } catch (IOException e) {
-- eventHandler.handle(
-- Event.warn("Failed to copy " + candidate + " to repository cache: " + e));
-+ String[] basenames = {destination.getBaseName(), destination.getBaseName()+"_"+sha256};
-+ for (String basename: basenames) {
-+ Path candidate = dir.getRelative(basename);
-+ try {
-+ match = RepositoryCache.getChecksum(KeyType.SHA256, candidate).equals(sha256);
-+ } catch (IOException e) {
-+ // Not finding anything in a distdir is a normal case, so handle it absolutely
-+ // quietly. In fact, it is not uncommon to specify a whole list of dist dirs,
-+ // with the asumption that only one will contain an entry.
-+ }
-+ if (match) {
-+ if (isCachingByProvidedSha256) {
-+ try {
-+ repositoryCache.put(sha256, candidate, KeyType.SHA256);
-+ } catch (IOException e) {
-+ eventHandler.handle(
-+ Event.warn("Failed to copy " + candidate + " to repository cache: " + e));
-+ }
- }
-+ FileSystemUtils.createDirectoryAndParents(destination.getParentDirectory());
-+ FileSystemUtils.copyFile(candidate, destination);
-+ return destination;
- }
-- FileSystemUtils.createDirectoryAndParents(destination.getParentDirectory());
-- FileSystemUtils.copyFile(candidate, destination);
-- return destination;
- }
- }
- }
-@@ -264,6 +267,17 @@ public class HttpDownloader {
- eventHandler.handle(Event.info("SHA256 (" + urls.get(0) + ") = " + newSha256));
+ for (String name : candidateFileNames) {
+ boolean match = false;
++ name += "_"+cacheKey;
+ Path candidate = dir.getRelative(name);
+ try {
+ eventHandler.post(
+@@ -280,6 +281,17 @@ public class DownloadManager {
+ repositoryCache.put(destination, KeyType.SHA256, canonicalId);
}
+ for (Path dir : distdir) {
@@ -73,7 +33,7 @@ index 18d10d2..cf71ac4 100755
+ FileSystemUtils.createDirectoryAndParents(dir);
+
+ if (dir.isDirectory()) {
-+ Path dl_mirror = dir.getRelative(destination.getBaseName()+"_"+sha256);
++ Path dl_mirror = dir.getRelative(destination.getBaseName()+"_"+checksum.get().toString());
+ if (!dl_mirror.exists())
+ FileSystemUtils.copyFile(destination, dl_mirror);
+ }
@@ -83,5 +43,5 @@ index 18d10d2..cf71ac4 100755
}
--
-2.8.1
+2.27.0
diff --git a/recipes-devtools/bazel/files/0001-Rename-gettid-functions.patch b/recipes-devtools/bazel/files/0001-Rename-gettid-functions.patch
deleted file mode 100644
index ca37531..0000000
--- a/recipes-devtools/bazel/files/0001-Rename-gettid-functions.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From a0b885aeb95a7ae9e93aea303a1edde74f71edac Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Fri, 3 Apr 2020 10:25:49 +0800
-Subject: [PATCH] Rename gettid() functions.
-
-glibc 2.30 will declare its own gettid; see
-https://sourceware.org/git/?p=glibc.git;a=commit;h=1d0fc213824eaa2a8f8c4385daaa698ee8fb7c92.
-Rename the grpc versions to avoid naming conflicts.
-
-Signed-off-by: Benjamin Peterson <benjamin@dropbox.com>
-Upstream-Status: Backport [https://github.com/grpc/grpc/commit/57586a1ca7f17b1916aed3dea4ff8de872dbf853]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- third_party/grpc/src/core/support/log_linux.c | 4 ++--
- third_party/grpc/src/core/support/log_posix.c | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/third_party/grpc/src/core/support/log_linux.c b/third_party/grpc/src/core/support/log_linux.c
-index 93a0c1b..367c921 100755
---- a/third_party/grpc/src/core/support/log_linux.c
-+++ b/third_party/grpc/src/core/support/log_linux.c
-@@ -54,7 +54,7 @@
- #include <sys/syscall.h>
- #include <unistd.h>
-
--static long gettid(void) { return syscall(__NR_gettid); }
-+static long sys_gettid(void) { return syscall(__NR_gettid); }
-
- void gpr_log(const char *file, int line, gpr_log_severity severity,
- const char *format, ...) {
-@@ -95,7 +95,7 @@ void gpr_default_log(gpr_log_func_args *args) {
-
- gpr_asprintf(&prefix, "%s%s.%09d %7tu %s:%d]",
- gpr_log_severity_string(args->severity), time_buffer,
-- (int)(now.tv_nsec), gettid(), display_file, args->line);
-+ (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
-
- fprintf(stderr, "%-60s %s\n", prefix, args->message);
- gpr_free(prefix);
-diff --git a/third_party/grpc/src/core/support/log_posix.c b/third_party/grpc/src/core/support/log_posix.c
-index 3ff171f..f0420a7 100755
---- a/third_party/grpc/src/core/support/log_posix.c
-+++ b/third_party/grpc/src/core/support/log_posix.c
-@@ -45,7 +45,7 @@
- #include <time.h>
- #include <pthread.h>
-
--static intptr_t gettid(void) { return (intptr_t)pthread_self(); }
-+static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
-
- void gpr_log(const char *file, int line, gpr_log_severity severity,
- const char *format, ...) {
-@@ -95,7 +95,7 @@ void gpr_default_log(gpr_log_func_args *args) {
-
- fprintf(stderr, "%s%s.%09d %7tu %s:%d] %s\n",
- gpr_log_severity_string(args->severity), time_buffer,
-- (int)(now.tv_nsec), gettid(), display_file, args->line,
-+ (int)(now.tv_nsec), sys_gettid(), display_file, args->line,
- args->message);
- }
-
---
-2.17.1
-
diff --git a/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch b/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
new file mode 100644
index 0000000..7d73eb7
--- /dev/null
+++ b/recipes-devtools/bazel/files/0001-add-Yocto-native-sysroot-dir-to-the-default-Bazel-to.patch
@@ -0,0 +1,39 @@
+From 34c4dc1a10140addf75d3503d4b9f427303fe212 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 14 Dec 2020 16:45:31 +0800
+Subject: [PATCH] add Yocto native sysroot dir to the default Bazel toolchain
+
+While using the default Bazel C++ toolchain to build Yocto native tools
+(bazel build --host_crosstool_top=@bazel_tools//tools/cpp:toolchain),
+it failed `bazel references a path outside of the execution root',
+
+Add Yocto native sysroot dir (YOCTO_NATIVE_SYSROOT) to
+builtin_include_directories could fix the issue
+
+If not set YOCTO_NATIVE_SYSROOT, use NOT_SET_YOCTO_NATIVE_SYSROOT
+to replace as a warning
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tools/cpp/unix_cc_configure.bzl | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
+index d48485b..0d297bf 100755
+--- a/tools/cpp/unix_cc_configure.bzl
++++ b/tools/cpp/unix_cc_configure.bzl
+@@ -443,6 +443,9 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools):
+ paths["@bazel_tools//tools/cpp:generate_system_module_map.sh"],
+ ))
+
++ # Customize for Yocto
++ builtin_include_directories.append(get_env_var(repository_ctx,"YOCTO_NATIVE_SYSROOT", "NOT_SET_YOCTO_NATIVE_SYSROOT"))
++
+ write_builtin_include_directory_paths(repository_ctx, cc, builtin_include_directories)
+ repository_ctx.template(
+ "BUILD",
+--
+2.18.2
+
diff --git a/recipes-devtools/bazel/files/0001-cutsomize-native-toolchains-for-Yocto.patch b/recipes-devtools/bazel/files/0001-cutsomize-native-toolchains-for-Yocto.patch
new file mode 100644
index 0000000..5758b5e
--- /dev/null
+++ b/recipes-devtools/bazel/files/0001-cutsomize-native-toolchains-for-Yocto.patch
@@ -0,0 +1,35 @@
+From 81c9eae49a10fa8d5ede088e90632db0103e2168 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 19 May 2022 01:11:05 -0700
+Subject: [PATCH] cutsomize native toolchains for Yocto
+
+Yocto use environment HOSTTOOLS_DIR to provide native toolchains,
+explicitly set it rather than detect
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tools/cpp/unix_cc_configure.bzl | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tools/cpp/unix_cc_configure.bzl b/tools/cpp/unix_cc_configure.bzl
+index 1b6aeb2..4a36685 100755
+--- a/tools/cpp/unix_cc_configure.bzl
++++ b/tools/cpp/unix_cc_configure.bzl
+@@ -373,6 +373,12 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools):
+ if darwin:
+ overriden_tools["gcc"] = "cc_wrapper.sh"
+ overriden_tools["ar"] = "/usr/bin/libtool"
++
++ hosttools_dir = get_env_var(repository_ctx,"HOSTTOOLS_DIR", False)
++ if hosttools_dir:
++ for k in ["ar", "ld", "cpp", "gcc", "nm", "objcopy", "objdump", "strip"]:
++ overriden_tools[k] = "%s/%s" % (hosttools_dir, k)
++
+ auto_configure_warning_maybe(repository_ctx, "CC used: " + str(cc))
+ tool_paths = _get_tool_paths(repository_ctx, overriden_tools)
+ cc_toolchain_identifier = escape_string(get_env_var(
+--
+2.36.0
+
diff --git a/recipes-devtools/bazel/files/0001-fix-compile-failure-on-gcc-13.patch b/recipes-devtools/bazel/files/0001-fix-compile-failure-on-gcc-13.patch
new file mode 100644
index 0000000..2fce1dc
--- /dev/null
+++ b/recipes-devtools/bazel/files/0001-fix-compile-failure-on-gcc-13.patch
@@ -0,0 +1,71 @@
+From 02fcd86787da1ebb2afad1909cb70839cdac24dc Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 13 Sep 2023 10:56:02 +0800
+Subject: [PATCH] fix compile failure on gcc 13
+
+external/com_google_absl/absl/strings/internal/str_format/extension.h:34:33: error: found ':' in nested-name-specifier, expected '::'
+ 34 | enum class FormatConversionChar : uint8_t;
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ distdir_deps.bzl | 4 +++
+ .../0001-fix-compile-failure-on-gcc-13.patch | 30 +++++++++++++++++++
+ 2 files changed, 34 insertions(+)
+ create mode 100644 third_party/com_google_absl/0001-fix-compile-failure-on-gcc-13.patch
+
+diff --git a/distdir_deps.bzl b/distdir_deps.bzl
+index 2ca988e..c460025 100755
+--- a/distdir_deps.bzl
++++ b/distdir_deps.bzl
+@@ -163,6 +163,10 @@ DIST_DEPS = {
+ },
+ "com_google_absl": {
+ "archive": "20211102.0.tar.gz",
++ "patch_args": ["-p1"],
++ "patches": [
++ "//third_party:com_google_absl/0001-fix-compile-failure-on-gcc-13.patch",
++ ],
+ "sha256": "dcf71b9cba8dc0ca9940c4b316a0c796be8fab42b070bb6b7cab62b48f0e66c4",
+ "urls": [
+ "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz",
+diff --git a/third_party/com_google_absl/0001-fix-compile-failure-on-gcc-13.patch b/third_party/com_google_absl/0001-fix-compile-failure-on-gcc-13.patch
+new file mode 100644
+index 0000000..257e887
+--- /dev/null
++++ b/third_party/com_google_absl/0001-fix-compile-failure-on-gcc-13.patch
+@@ -0,0 +1,30 @@
++From 4cb33b2e98fd0b2f201e765a5a0d9c1d4277041e Mon Sep 17 00:00:00 2001
++From: Hongxu Jia <hongxu.jia@windriver.com>
++Date: Wed, 13 Sep 2023 11:17:34 +0800
++Subject: [PATCH] fix compile failure on gcc 13
++
++external/com_google_absl/absl/strings/internal/str_format/extension.h:34:33: error: found ':' in nested-name-specifier, expected '::'
++ 34 | enum class FormatConversionChar : uint8_t;
++
++Upstream-Status: Pending
++
++Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
++---
++ absl/strings/internal/str_format/extension.h | 1 +
++ 1 file changed, 1 insertion(+)
++
++diff --git a/absl/strings/internal/str_format/extension.h b/absl/strings/internal/str_format/extension.h
++index 55cbb56..67d4cc8 100644
++--- a/absl/strings/internal/str_format/extension.h
+++++ b/absl/strings/internal/str_format/extension.h
++@@ -21,6 +21,7 @@
++ #include <cstddef>
++ #include <cstring>
++ #include <ostream>
+++#include <cstdint>
++
++ #include "absl/base/config.h"
++ #include "absl/base/port.h"
++--
++2.17.1
++
+--
+2.27.0
+
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
index 9fc7f03..eccc34a 100644
--- a/recipes-devtools/bazel/files/0001-fix-unzip-command-not-found.patch
+++ b/recipes-devtools/bazel/files/0001-fix-unzip-command-not-found.patch
@@ -1,6 +1,6 @@
-From e00e75dc8bc3c1153633e1ba7cb98a0a58658e86 Mon Sep 17 00:00:00 2001
+From 23e2aff67a03127572641c7286e306c2a20990e2 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Sat, 4 Apr 2020 12:48:01 +0800
+Date: Tue, 8 Dec 2020 11:05:13 +0800
Subject: [PATCH] fix unzip: command not found
If host does not provide unzip, build bazel will fail even though
@@ -18,18 +18,18 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
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
+index 16252df..e7cd609 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";
+@@ -469,7 +469,7 @@ public class BazelRuleClassProvider {
+ // Note that --action_env does not propagate to the host config, so it is not a viable
+ // workaround when a genrule is itself built in the host config (e.g. nested genrules). See
+ // #8536.
+- return "/bin:/usr/bin:/usr/local/bin";
+ return System.getenv("PATH");
}
- // Attempt to compute the MSYS root (the real Windows path of "/") from `sh`.
+ String newPath = "";
--
-2.17.1
+2.18.2
diff --git a/recipes-devtools/bazel/files/0001-python3.patch b/recipes-devtools/bazel/files/0001-python3.patch
deleted file mode 100644
index 50eaaf4..0000000
--- a/recipes-devtools/bazel/files/0001-python3.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From f3dcad42a53e78efdb87adbc98121dc66b53ec5f Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Sun, 5 Apr 2020 23:40:31 +0800
-Subject: [PATCH] set python3 interpreter
-
-Since many distrobution choose python3, and drop python2,
-If host does not provides `python', python rules failed
-...
-/usr/bin/env: 'python': No such file or directory
-...
-
-set python3 interpreter to shebang
-
-Upstream-Status: Inappropriate [wr-installer specific]
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- .../build/lib/bazel/rules/python/BazelPythonSemantics.java | 2 +-
- .../build/lib/bazel/rules/python/python_stub_template.txt | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
-index 0ff5d15..997cfc9 100755
---- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
-+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java
-@@ -185,7 +185,7 @@ public class BazelPythonSemantics implements PythonSemantics {
- .addOutput(executable)
- .setShellCommand(
- shExecutable,
-- "echo '#!/usr/bin/env python' | cat - "
-+ "echo '#!/usr/bin/env python3' | cat - "
- + zipFile.getExecPathString()
- + " > "
- + executable.getExecPathString())
-diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
-index 129ce90..959e3a5 100755
---- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
-+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
- import os
- import re
---
-2.17.1
-
diff --git a/recipes-devtools/openjdk/openjdk-11-native_11.0.15.bb b/recipes-devtools/openjdk/openjdk-11-native_11.0.15.bb
new file mode 100644
index 0000000..e982af6
--- /dev/null
+++ b/recipes-devtools/openjdk/openjdk-11-native_11.0.15.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "Java runtime based upon the OpenJDK Project, the community \
+builds using source code from OpenJDK project"
+LICENSE = "GPL-2.0-with-classpath-exception"
+LIC_FILES_CHKSUM = "file://legal/java.base/LICENSE;md5=3e0b59f8fac05c3c03d4a26bbda13f8f"
+
+SRC_URI[md5sum] = "7a1d931c0454981d85ed0d2949a91b7f"
+SRC_URI[sha256sum] = "78e4e52c31600a99bb8050e94017123e447c6683d0f9d7a6c5b0d49c0da6f29a"
+SRC_URI = " \
+ https://github.com/ojdkbuild/contrib_jdk11u-ci/releases/download/jdk-11.0.15%2B10/jdk-11.0.15-ojdkbuild-linux-x64.zip \
+"
+
+S = "${WORKDIR}/jdk-11.0.15-ojdkbuild-linux-x64"
+
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install () {
+ install -d ${D}${libdir}/jvm/openjdk-11-native
+ cp -rf ${S}/* ${D}${libdir}/jvm/openjdk-11-native
+}
+
+inherit native
+INHIBIT_SYSROOT_STRIP = "1"
+
+python __anonymous() {
+ if d.getVar("BUILD_ARCH") != "x86_64":
+ msg = "\nThe pre-build openjdk-11-native does not support %s host," % d.getVar("BUILD_ARCH")
+ msg += "\nplease use the one in meta-java to replace,"
+ msg += "\nadd meta-java to BBLAYERS in conf/bblayers.conf"
+ raise bb.parse.SkipPackage(msg)
+}
diff --git a/recipes-devtools/openjdk/openjdk-8-native_212b04.bb b/recipes-devtools/openjdk/openjdk-8-native_212b04.bb
deleted file mode 100644
index 788612a..0000000
--- a/recipes-devtools/openjdk/openjdk-8-native_212b04.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-DESCRIPTION = "Java runtime based upon the OpenJDK Project, the community \
-builds using source code from OpenJDK project"
-LICENSE = "GPL-2.0-with-classpath-exception"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=3e0b59f8fac05c3c03d4a26bbda13f8f"
-
-SRC_URI[md5sum] = "8082ad8dafec378f2a4b24cbfdb4a9a4"
-SRC_URI[sha256sum] = "ef6a3050a1c3477a6e13c24d10ab36decad548649a260559d466467401db15de"
-SRC_URI = " \
- https://github.com/ojdkbuild/contrib_jdk8u-ci/releases/download/jdk8u212-b04/jdk-8u212-ojdkbuild-linux-x64.zip \
-"
-
-S = "${WORKDIR}/jdk-8u212-ojdkbuild-linux-x64"
-
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install () {
- install -d ${D}${libdir}/jvm/openjdk-8-native
- cp -rf ${S}/* ${D}${libdir}/jvm/openjdk-8-native
-}
-
-inherit native
-INHIBIT_SYSROOT_STRIP = "1"
-
-python __anonymous() {
- if d.getVar("BUILD_ARCH") != "x86_64":
- msg = "\nThe pre-build openjdk-8-native does not support %s host," % d.getVar("BUILD_ARCH")
- msg += "\nplease use the one in meta-java to replace,"
- msg += "\nadd meta-java to BBLAYERS in conf/bblayers.conf"
- raise bb.parse.SkipPackage(msg)
-}
diff --git a/recipes-devtools/python/python-google-auth.inc b/recipes-devtools/python/python-google-auth.inc
new file mode 100644
index 0000000..91dbb21
--- /dev/null
+++ b/recipes-devtools/python/python-google-auth.inc
@@ -0,0 +1,21 @@
+SUMMARY = "Google Authentication Library"
+HOMEPAGE = "https://github.com/googleapis/google-auth-library-python"
+DESCRIPTION = "This library simplifies using Google’s various \
+server-to-server authentication mechanisms to access Google APIs."
+SECTION = "devel/python"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit pypi
+
+SRC_URI[md5sum] = "2d7fb4328377b94603823e3f029a3e1d"
+SRC_URI[sha256sum] = "9e00c76e1bc7b1a7fe80472f1347f3802e4caa1fa53ba1f11b7af3772b484a82"
+
+RDEPENDS:${PN} += " \
+ python3-cachetools \
+ python3-rsa \
+ python3-pyasn1-modules \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-devtools/python/python3-astunparse_1.6.3.bb b/recipes-devtools/python/python3-astunparse_1.6.3.bb
new file mode 100644
index 0000000..0cb5c5e
--- /dev/null
+++ b/recipes-devtools/python/python3-astunparse_1.6.3.bb
@@ -0,0 +1,12 @@
+SUMMARY = "An AST unparser for Python"
+HOMEPAGE = "https://github.com/simonpercivall/astunparse"
+SECTION = "devel/python"
+LICENSE = "PSF-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7a7c771110c28a37480b73d07ad6d2a1"
+
+SRC_URI[md5sum] = "2cea4d8e49beba7684bac890e73d6a40"
+SRC_URI[sha256sum] = "5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-devtools/python/python3-gast_0.4.0.bb b/recipes-devtools/python/python3-gast_0.4.0.bb
new file mode 100644
index 0000000..29a6c54
--- /dev/null
+++ b/recipes-devtools/python/python3-gast_0.4.0.bb
@@ -0,0 +1,12 @@
+SUMMARY = "A generic AST to represent Python3's Abstract Syntax Tree(AST)."
+HOMEPAGE = "https://github.com/serge-sans-paille/gast"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a3ad9b6802e713fc5e307e1230f1ea90"
+
+SRC_URI[md5sum] = "d1f258eb70bb916f8fe5535351d5ff05"
+SRC_URI[sha256sum] = "40feb7b8b8434785585ab224d1568b857edb18297e5a3047f1ba012bc83b42c1"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-devtools/python/python3-google-auth-oauthlib_0.4.5.bb b/recipes-devtools/python/python3-google-auth-oauthlib_0.4.5.bb
new file mode 100644
index 0000000..ecc2867
--- /dev/null
+++ b/recipes-devtools/python/python3-google-auth-oauthlib_0.4.5.bb
@@ -0,0 +1,20 @@
+SUMMARY = "The oauthlib integration for Google Auth"
+HOMEPAGE = "https://github.com/googleapis/google-auth-library-python-oauthlib"
+DESCRIPTION = "This library provides oauthlib integration with google-auth."
+SECTION = "devel/python"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+inherit pypi
+
+SRC_URI[md5sum] = "0ef7695adb47224714926a7e8331e61d"
+SRC_URI[sha256sum] = "4ab58e6c3dc6ccf112f921fcced40e5426fba266768986ea502228488276eaba"
+
+BBCLASSEXTEND = "native"
+
+RDEPENDS:${PN} += " \
+ python3-requests-oauthlib \
+ python3-oauthlib \
+"
+inherit setuptools3
diff --git a/recipes-devtools/python/python3-google-auth_2.0.0.bb b/recipes-devtools/python/python3-google-auth_2.0.0.bb
new file mode 100644
index 0000000..0d86a65
--- /dev/null
+++ b/recipes-devtools/python/python3-google-auth_2.0.0.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-google-auth.inc
diff --git a/recipes-devtools/python/python3-google-pasta_0.2.0.bb b/recipes-devtools/python/python3-google-pasta_0.2.0.bb
new file mode 100644
index 0000000..50a363c
--- /dev/null
+++ b/recipes-devtools/python/python3-google-pasta_0.2.0.bb
@@ -0,0 +1,12 @@
+SUMMARY = "The AST-based Python refactoring library"
+HOMEPAGE = "https://github.com/google/pasta"
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://PKG-INFO;md5=a10102394a800f3fa4a3df0934d57bb1"
+
+SRC_URI[md5sum] = "7c218a4a0d84303b9319352040fbfce6"
+SRC_URI[sha256sum] = "c9f2c8dfc8f96d0d5808299920721be30c9eec37f2389f28904f454565c8a16e"
+
+inherit pypi setuptools3
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-devtools/python/python3-mldtypes_0.2.0.bb b/recipes-devtools/python/python3-mldtypes_0.2.0.bb
new file mode 100644
index 0000000..a369b25
--- /dev/null
+++ b/recipes-devtools/python/python3-mldtypes_0.2.0.bb
@@ -0,0 +1,28 @@
+SUMMARY = "The ml_dtypes is a stand-alone implementation of several NumPy dtype extensions used in machine learning libraries"
+HOMEPAGE = "https://github.com/jax-ml/ml_dtypes"
+SECTION = "devel/python"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI[md5sum] = "ed4f6491b168ff2050c4ad373e9d76df"
+SRC_URI[sha256sum] = "6488eb642acaaf08d8020f6de0a38acee7ac324c1e6e92ee0c0fea42422cb797"
+
+inherit pypi setuptools3
+
+SRCNAME ?= "ml_dtypes"
+PYPI_SRC_URI = "https://files.pythonhosted.org/packages/fa/47/09ca9556bf99cfe7ddf129a3423642bd482a27a717bf115090493fa42429/${SRCNAME}-${PV}.tar.gz"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+DEPENDS = " \
+ python3-pybind11-native \
+ python3-numpy-native \
+"
+
+RDEPENDS:${PN} = " \
+ python3-pybind11 \
+ python3-numpy \
+"
+
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-devtools/python/python3-opt-einsum/0001-Use-ConfigParser-instead-of-SafeConfigParser.patch b/recipes-devtools/python/python3-opt-einsum/0001-Use-ConfigParser-instead-of-SafeConfigParser.patch
new file mode 100644
index 0000000..93e3bd8
--- /dev/null
+++ b/recipes-devtools/python/python3-opt-einsum/0001-Use-ConfigParser-instead-of-SafeConfigParser.patch
@@ -0,0 +1,36 @@
+From 0beacf96923bbb2dd1939a9c59398a38ce7a11b1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 17 Nov 2022 17:04:54 -0800
+Subject: [PATCH] Use ConfigParser instead of SafeConfigParser
+
+The SafeConfigParser class will be renamed to ConfigParser in Python
+3.12 [1]. This alias will be removed in future versions.So we can use
+ConfigParser directly instead.
+
+[1] https://github.com/python/cpython/issues/89336
+
+Upstream-Status: Submitted [https://github.com/dgasmith/opt_einsum/pull/208]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ versioneer.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/versioneer.py b/versioneer.py
+index d3db643..6d732af 100644
+--- a/versioneer.py
++++ b/versioneer.py
+@@ -339,9 +339,9 @@ def get_config_from_root(root):
+ # configparser.NoOptionError (if it lacks "VCS="). See the docstring at
+ # the top of versioneer.py for instructions on writing your setup.cfg .
+ setup_cfg = os.path.join(root, "setup.cfg")
+- parser = configparser.SafeConfigParser()
++ parser = configparser.ConfigParser()
+ with open(setup_cfg, "r") as f:
+- parser.readfp(f)
++ parser.read_file(f)
+ VCS = parser.get("versioneer", "VCS") # mandatory
+
+ def get(parser, name):
+--
+2.37.1
+
diff --git a/recipes-devtools/python/python3-opt-einsum_3.3.0.bb b/recipes-devtools/python/python3-opt-einsum_3.3.0.bb
new file mode 100644
index 0000000..ce9d220
--- /dev/null
+++ b/recipes-devtools/python/python3-opt-einsum_3.3.0.bb
@@ -0,0 +1,19 @@
+SUMMARY = "A tensor contraction order optimizer"
+HOMEPAGE = "https://github.com/dgasmith/opt_einsum"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5ab423c88cf3e69553decf93419f53ac"
+
+SRC_URI[md5sum] = "acf0a3997aab84b4e9a854296cc34971"
+SRC_URI[sha256sum] = "59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549"
+
+inherit pypi setuptools3
+
+SRCNAME = "opt_einsum"
+PYPI_SRC_URI = "https://files.pythonhosted.org/packages/source/o/${PYPI_PACKAGE}/${SRCNAME}-${PV}.tar.gz"
+SRC_URI += " \
+ file://0001-Use-ConfigParser-instead-of-SafeConfigParser.patch \
+"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+BBCLASSEXTEND = "native"