diff --git a/devel/bazel/Makefile b/devel/bazel/Makefile --- a/devel/bazel/Makefile +++ b/devel/bazel/Makefile @@ -1,5 +1,5 @@ PORTNAME= bazel -DISTVERSION= 6.2.0 +DISTVERSION= 6.5.0 CATEGORIES= devel java MASTER_SITES= https://github.com/bazelbuild/${PORTNAME}/releases/download/${DISTVERSION}/ DISTNAME= bazel-${DISTVERSION}-dist @@ -42,12 +42,13 @@ .endif pre-patch: - @${CP} ${FILESDIR}/extra-patch-abseil-cpp_absl_base_internal_unscaledcycleclock.cc \ - ${FILESDIR}/extra-patch-abseil-cpp-cfe27e79cfcbefb2b4479e04f80cbb299bc46965 \ + @${CP} ${FILESDIR}/extra-patch-abseil-cpp-1981cf8c0206657a16f73f48d43a313c65485d5e \ + ${FILESDIR}/extra-patch-abseil-cpp-absl_time_internal_cctz_src_time_zone_format.cc \ ${WRKSRC}/third_party/py/abseil/ @${CP} ${FILESDIR}/extra-patch-grpc_bazel_grpc__deps.bzl \ - ${FILESDIR}/extra-patch-upb_bazel_build__defs.bzl \ ${WRKSRC}/third_party/grpc/ + @${CP} ${FILESDIR}/extra-patch-upb_bazel_build__defs.bzl \ + ${WRKSRC}/third_party/upb/ # Have the location of the system-wide rc file reside ${ETCDIR}. # Also adapt the sample file to disable persistent java workers as they diff --git a/devel/bazel/distinfo b/devel/bazel/distinfo --- a/devel/bazel/distinfo +++ b/devel/bazel/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1684957266 -SHA256 (bazel-6.2.0-dist.zip) = f1e8f788637ac574d471d619d2096baaca04a19b57a034399e079633db441945 -SIZE (bazel-6.2.0-dist.zip) = 196992916 +TIMESTAMP = 1717432235 +SHA256 (bazel-6.5.0-dist.zip) = fc89da919415289f29e4ff18a5e01270ece9a6fe83cb60967218bac4a3bb3ed2 +SIZE (bazel-6.5.0-dist.zip) = 206369129 diff --git a/devel/bazel/files/extra-patch-abseil-cpp-1981cf8c0206657a16f73f48d43a313c65485d5e b/devel/bazel/files/extra-patch-abseil-cpp-1981cf8c0206657a16f73f48d43a313c65485d5e new file mode 100644 --- /dev/null +++ b/devel/bazel/files/extra-patch-abseil-cpp-1981cf8c0206657a16f73f48d43a313c65485d5e @@ -0,0 +1,38 @@ +diff --git absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc +index 8bcc4faf..79eaba3e 100644 +--- absl/base/internal/sysinfo.cc ++++ absl/base/internal/sysinfo.cc +@@ -34,6 +34,14 @@ + #include + #endif + ++#ifdef __FreeBSD__ ++#include ++#endif ++ ++#ifdef __NetBSD__ ++#include ++#endif ++ + #if defined(__myriad2__) + #include + #endif +@@ -432,6 +440,18 @@ pid_t GetTID() { + return static_cast(tid); + } + ++#elif defined(__FreeBSD__) ++ ++pid_t GetTID() { return static_cast(pthread_getthreadid_np()); } ++ ++#elif defined(__OpenBSD__) ++ ++pid_t GetTID() { return getthrid(); } ++ ++#elif defined(__NetBSD__) ++ ++pid_t GetTID() { return static_cast(_lwp_self()); } ++ + #elif defined(__native_client__) + + pid_t GetTID() { diff --git a/devel/bazel/files/extra-patch-abseil-cpp-absl_time_internal_cctz_src_time_zone_format.cc b/devel/bazel/files/extra-patch-abseil-cpp-absl_time_internal_cctz_src_time_zone_format.cc new file mode 100644 --- /dev/null +++ b/devel/bazel/files/extra-patch-abseil-cpp-absl_time_internal_cctz_src_time_zone_format.cc @@ -0,0 +1,13 @@ +diff --git absl/time/internal/cctz/src/time_zone_format.cc b/absl/time/internal/cctz/src/time_zone_format.cc +index 9b91f61c..35d44ffe 100644 +--- absl/time/internal/cctz/src/time_zone_format.cc ++++ absl/time/internal/cctz/src/time_zone_format.cc +@@ -19,7 +19,7 @@ + #endif + + #if defined(HAS_STRPTIME) && HAS_STRPTIME +-#if !defined(_XOPEN_SOURCE) && !defined(__OpenBSD__) ++#if !defined(_XOPEN_SOURCE) && !defined(__OpenBSD__) && !defined(__FreeBSD__) + #define _XOPEN_SOURCE 500 // Exposes definitions for SUSv2 (UNIX 98). + #endif + #endif diff --git a/devel/bazel/files/extra-patch-abseil-cpp-cfe27e79cfcbefb2b4479e04f80cbb299bc46965 b/devel/bazel/files/extra-patch-abseil-cpp-cfe27e79cfcbefb2b4479e04f80cbb299bc46965 deleted file mode 100644 --- a/devel/bazel/files/extra-patch-abseil-cpp-cfe27e79cfcbefb2b4479e04f80cbb299bc46965 +++ /dev/null @@ -1,140 +0,0 @@ -From 1a6044c0ec33ea394c1258ae4e934f1fef3a710f Mon Sep 17 00:00:00 2001 -From: Abseil Team -Date: Fri, 5 Aug 2022 06:56:05 -0700 -Subject: [PATCH] Map the absl::is_trivially_* functions to their std impl - -There's no point redefining these functions if they are supported by the compiler and the version of libstdc++. Also, some of the builtins used by the absl implementation of these functions (e.g. __has_trivial_destructor) have been deprecated in Clang 15. - -PiperOrigin-RevId: 465554125 -Change-Id: I8674c3a5270ce3c654cdf58ae7dbd9d2bda8faa5 ---- - absl/base/config.h | 18 ++++++++---------- - absl/meta/type_traits.h | 22 ++++++++++++++++++++++ - absl/meta/type_traits_test.cc | 1 + - 3 files changed, 31 insertions(+), 10 deletions(-) - -diff --git absl/base/config.h absl/base/config.h -index 585485c3..ab5791a5 100644 ---- absl/base/config.h -+++ absl/base/config.h -@@ -259,17 +259,15 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || - #define ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE 1 - #endif - --// ABSL_HAVE_SOURCE_LOCATION_CURRENT -+// ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE - // --// Indicates whether `absl::SourceLocation::current()` will return useful --// information in some contexts. --#ifndef ABSL_HAVE_SOURCE_LOCATION_CURRENT --#if ABSL_INTERNAL_HAS_KEYWORD(__builtin_LINE) && \ -- ABSL_INTERNAL_HAS_KEYWORD(__builtin_FILE) --#define ABSL_HAVE_SOURCE_LOCATION_CURRENT 1 --#elif ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(5, 0) --#define ABSL_HAVE_SOURCE_LOCATION_CURRENT 1 --#endif -+// Checks whether `std::is_trivially_copyable` is supported. -+// -+// Notes: Clang 15+ with libc++ supports these features, GCC hasn't been tested. -+#if defined(ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE) -+#error ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE cannot be directly set -+#elif defined(__clang__) && (__clang_major__ >= 15) -+#define ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE 1 - #endif - - // ABSL_HAVE_THREAD_LOCAL -diff --git absl/meta/type_traits.h absl/meta/type_traits.h -index d886cb30..46b76906 100644 ---- absl/meta/type_traits.h -+++ absl/meta/type_traits.h -@@ -298,8 +298,12 @@ struct is_function - // https://gcc.gnu.org/onlinedocs/gcc/Type-Traits.html#Type-Traits. - template - struct is_trivially_destructible -+#ifdef ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE -+ : std::is_trivially_destructible { -+#else - : std::integral_constant::value> { -+#endif - #ifdef ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE - private: - static constexpr bool compliant = std::is_trivially_destructible::value == -@@ -347,9 +351,13 @@ struct is_trivially_destructible - // Nontrivially destructible types will cause the expression to be nontrivial. - template - struct is_trivially_default_constructible -+#if defined(ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE) -+ : std::is_trivially_default_constructible { -+#else - : std::integral_constant::value && - is_trivially_destructible::value> { -+#endif - #if defined(ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE) && \ - !defined( \ - ABSL_META_INTERNAL_STD_CONSTRUCTION_TRAITS_DONT_CHECK_DESTRUCTION) -@@ -381,10 +389,14 @@ struct is_trivially_default_constructible - // expression to be nontrivial. - template - struct is_trivially_move_constructible -+#if defined(ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE) -+ : std::is_trivially_move_constructible { -+#else - : std::conditional< - std::is_object::value && !std::is_array::value, - type_traits_internal::IsTriviallyMoveConstructibleObject, - std::is_reference>::type::type { -+#endif - #if defined(ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE) && \ - !defined( \ - ABSL_META_INTERNAL_STD_CONSTRUCTION_TRAITS_DONT_CHECK_DESTRUCTION) -@@ -490,9 +502,13 @@ struct is_trivially_move_assignable - // `is_trivially_assignable`. - template - struct is_trivially_copy_assignable -+#ifdef ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE -+ : std::is_trivially_copy_assignable { -+#else - : std::integral_constant< - bool, __has_trivial_assign(typename std::remove_reference::type) && - absl::is_copy_assignable::value> { -+#endif - #ifdef ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE - private: - static constexpr bool compliant = -@@ -544,6 +560,11 @@ namespace type_traits_internal { - // destructible. Arrays of trivially copyable types are trivially copyable. - // - // We expose this metafunction only for internal use within absl. -+ -+#if defined(ABSL_HAVE_STD_IS_TRIVIALLY_COPYABLE) -+template -+struct is_trivially_copyable : std::is_trivially_copyable {}; -+#else - template - class is_trivially_copyable_impl { - using ExtentsRemoved = typename std::remove_all_extents::type; -@@ -569,6 +590,7 @@ template - struct is_trivially_copyable - : std::integral_constant< - bool, type_traits_internal::is_trivially_copyable_impl::kValue> {}; -+#endif - } // namespace type_traits_internal - - // ----------------------------------------------------------------------------- -diff --git absl/meta/type_traits_test.cc absl/meta/type_traits_test.cc -index 0ef5b665..fe96554d 100644 ---- absl/meta/type_traits_test.cc -+++ absl/meta/type_traits_test.cc -@@ -336,6 +336,7 @@ struct MovableNonCopyable { - - struct NonCopyableOrMovable { - NonCopyableOrMovable() = default; -+ virtual ~NonCopyableOrMovable() = default; - NonCopyableOrMovable(const NonCopyableOrMovable&) = delete; - NonCopyableOrMovable(NonCopyableOrMovable&&) = delete; - NonCopyableOrMovable& operator=(const NonCopyableOrMovable&) = delete; --- -2.40.1 - diff --git a/devel/bazel/files/extra-patch-abseil-cpp_absl_base_internal_unscaledcycleclock.cc b/devel/bazel/files/extra-patch-abseil-cpp_absl_base_internal_unscaledcycleclock.cc deleted file mode 100644 --- a/devel/bazel/files/extra-patch-abseil-cpp_absl_base_internal_unscaledcycleclock.cc +++ /dev/null @@ -1,14 +0,0 @@ ---- absl/base/internal/unscaledcycleclock.cc.orig 2021-11-03 15:26:14 UTC -+++ absl/base/internal/unscaledcycleclock.cc -@@ -24,8 +24,10 @@ - #ifdef __GLIBC__ - #include - #elif defined(__FreeBSD__) --#include -+#include "absl/base/call_once.h" - #include -+#include -+#include - #endif - #endif - diff --git a/devel/bazel/files/extra-patch-upb_bazel_build__defs.bzl b/devel/bazel/files/extra-patch-upb_bazel_build__defs.bzl --- a/devel/bazel/files/extra-patch-upb_bazel_build__defs.bzl +++ b/devel/bazel/files/extra-patch-upb_bazel_build__defs.bzl @@ -1,10 +1,10 @@ ---- bazel/build_defs.bzl.orig 2022-06-21 20:39:47 UTC -+++ bazel/build_defs.bzl -@@ -36,6 +36,7 @@ _DEFAULT_CPPOPTS.extend([ - # "-Wshorten-64-to-32", # not in GCC (and my Kokoro images doesn't have Clang) - "-Werror", - "-Wno-long-long", -+ "-Wno-deprecated-copy", - ]) - _DEFAULT_COPTS.extend([ - "-std=c99", +--- bazel/build_defs.bzl.orig 2023-08-27 12:41:41.968319000 +0100 ++++ bazel/build_defs.bzl 2023-08-27 12:40:59.707318000 +0100 +@@ -43,6 +43,7 @@ + "-Werror=pedantic", + "-Wall", + "-Wstrict-prototypes", ++ "-Wno-gnu-offsetof-extensions", + # GCC (at least) emits spurious warnings for this that cannot be fixed + # without introducing redundant initialization (with runtime cost): + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 diff --git a/devel/bazel/files/patch-distdir_deps.bzl b/devel/bazel/files/patch-distdir_deps.bzl --- a/devel/bazel/files/patch-distdir_deps.bzl +++ b/devel/bazel/files/patch-distdir_deps.bzl @@ -1,4 +1,4 @@ ---- distdir_deps.bzl.orig 1980-01-01 05:00:00 UTC +--- distdir_deps.bzl.orig 1980-01-01 00:00:00 UTC +++ distdir_deps.bzl @@ -122,6 +122,7 @@ DIST_DEPS = { "patch_args": ["-p1"], @@ -8,14 +8,24 @@ "//third_party/grpc:grpc_1.47.0.win_arm64.patch", ], "used_in": [ -@@ -234,6 +235,10 @@ DIST_DEPS = { +@@ -196,6 +197,9 @@ DIST_DEPS = { + "https://mirror.bazel.build/github.com/protocolbuffers/upb/archive/a5477045acaa34586420942098f5fecd3570f577.tar.gz", + "https://github.com/protocolbuffers/upb/archive/a5477045acaa34586420942098f5fecd3570f577.tar.gz", + ], ++ "patches": [ ++ "//third_party/upb:extra-patch-upb_bazel_build__defs.bzl", ++ ], + "used_in": [ + "additional_distfiles", + "test_WORKSPACE_files", +@@ -233,6 +237,10 @@ DIST_DEPS = { + "sha256": "59d2976af9d6ecf001a81a35749a6e551a335b949d34918cfade07737b9d93c5", "urls": [ - "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", - "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz", + "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.0.tar.gz", + ], + "patches": [ -+ "//third_party/py/abseil:extra-patch-abseil-cpp_absl_base_internal_unscaledcycleclock.cc", -+ "//third_party/py/abseil:extra-patch-abseil-cpp-cfe27e79cfcbefb2b4479e04f80cbb299bc46965", ++ "//third_party/py/abseil:extra-patch-abseil-cpp-absl_time_internal_cctz_src_time_zone_format.cc", ++ "//third_party/py/abseil:extra-patch-abseil-cpp-1981cf8c0206657a16f73f48d43a313c65485d5e", ], "used_in": [ "additional_distfiles",