summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2019-12-08 22:18:43 -0800
committerZac Medico <zmedico@gentoo.org>2019-12-08 22:22:43 -0800
commit26ab4a8446bd487994d3a3938951f8fb4836e3f6 (patch)
tree59b8bbedc394bd42ebd4d26927f9ee43870e7c36
parentdev-util/bazel: Add gRPC patch for glibc 2.30 (diff)
downloadgentoo-26ab4a8446bd487994d3a3938951f8fb4836e3f6.tar.gz
gentoo-26ab4a8446bd487994d3a3938951f8fb4836e3f6.tar.bz2
gentoo-26ab4a8446bd487994d3a3938951f8fb4836e3f6.zip
dev-util/bazel: Relocate patch from FILESDIR to SRC_URI
Package-Manager: Portage-2.3.81, Repoman-2.3.20 Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--dev-util/bazel/Manifest1
-rw-r--r--dev-util/bazel/bazel-1.2.0-r1.ebuild11
-rw-r--r--dev-util/bazel/files/1.2.0-grpc-gettid.patch78
3 files changed, 7 insertions, 83 deletions
diff --git a/dev-util/bazel/Manifest b/dev-util/bazel/Manifest
index b1c88dcc6af7..0692ee693d38 100644
--- a/dev-util/bazel/Manifest
+++ b/dev-util/bazel/Manifest
@@ -4,3 +4,4 @@ DIST bazel-0.27.2-dist.zip 247948037 BLAKE2B ee3dafbb104f434080ad803cb40585e36a8
DIST bazel-0.29.1-dist.zip 265744999 BLAKE2B 8495ab96947b02ec827cc2b5f542454e0d631eb077514c740d8be813495644f0be1020e706e2dbd321fa6f39af3060c4a7b2e68499201eaffc197704c1ecf760 SHA512 4da49e3f1ba681003afc2536d55954ed5a2c29de4a68e5a07f2627f3573d97bd6e244bc8a4f43c8951ecddd221041d87270ca9b7dd59ab16676306c9716f003d
DIST bazel-1.0.1-dist.zip 267211562 BLAKE2B ade5fcc2a799df4da24ce23a3f2f23d3f38aeec832ef2504a1a8ca7f23acafe3d5b5d94302f101ddadb366d7144624559c96c1c343fa465a976ca2c9b258c083 SHA512 94d81697d2f181659c2d386de23dae2655c4131633f8ce6d10c60373222756e8c0330ed3fe5ed20f81a8648bcb3acfc8b4762e96eb7950b58a4a5c94c715159f
DIST bazel-1.2.0-dist.zip 267514282 BLAKE2B 1c4f9dcf2c18e6880d701dab3de2e880e55278216ba051f9ad753b9f8c539e5734346bcb20c706307b677f97736587ee11e3c3accabe4c82ac1a82a0cdafcd36 SHA512 eaa3e27d0ddd6102fea4fcdf5f4379355954ba25cd2f4b3530071d077411f8a501041d8fda9ac90325244296f31072faaebd91cf6338893752b25212822a6be9
+DIST bazel-1.2.0-rename-gettid-functions.patch 3303 BLAKE2B 75aaed0b8e5fe33910d1b428ad421bbf37cafdc38dc46cbe9d9fe516e957f1dc3a30333c40a6ec3e61580ca908189a8821937ddd28aa9cf119ae237d63c576fb SHA512 0d4dc5c5931ff3a16bb9ac228ec560fc0115444a3d3787f12866e11e8b3833ee8a26cc65c97aa9898c1f7a6c380820d62544d2ed7bed0d6f21aa4293e244eb04
diff --git a/dev-util/bazel/bazel-1.2.0-r1.ebuild b/dev-util/bazel/bazel-1.2.0-r1.ebuild
index 5dce7b320590..d9875eb6ce03 100644
--- a/dev-util/bazel/bazel-1.2.0-r1.ebuild
+++ b/dev-util/bazel/bazel-1.2.0-r1.ebuild
@@ -8,7 +8,9 @@ inherit bash-completion-r1 java-pkg-2 multiprocessing
DESCRIPTION="Fast and correct automated build system"
HOMEPAGE="https://bazel.build/"
-SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip"
+GLIBC_GETTID_PATCH="${P}-rename-gettid-functions.patch"
+SRC_URI="https://github.com/bazelbuild/bazel/releases/download/${PV}/${P}-dist.zip
+ https://raw.githubusercontent.com/clearlinux-pkgs/bazel/adefd9046582cb52f39579033132e6265ef6ddb0/rename-gettid-functions.patch -> ${GLIBC_GETTID_PATCH}"
LICENSE="Apache-2.0"
SLOT="0"
@@ -24,10 +26,6 @@ DEPEND="${RDEPEND}
S="${WORKDIR}"
-PATCHES=(
- "${FILESDIR}/${PV}-grpc-gettid.patch"
-)
-
bazel-get-flags() {
local i fs=()
for i in ${CFLAGS}; do
@@ -55,6 +53,9 @@ pkg_setup() {
src_unpack() {
# Only unpack the main distfile
unpack ${P}-dist.zip
+ pushd third_party/grpc/src >/dev/null || die
+ eapply "${DISTDIR}/${GLIBC_GETTID_PATCH}"
+ popd >/dev/null || die
}
src_prepare() {
diff --git a/dev-util/bazel/files/1.2.0-grpc-gettid.patch b/dev-util/bazel/files/1.2.0-grpc-gettid.patch
deleted file mode 100644
index c4de48068f11..000000000000
--- a/dev-util/bazel/files/1.2.0-grpc-gettid.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From https://github.com/grpc/grpc/commit/57586a1ca7f17b1916aed3dea4ff8de872dbf853
-From: Benjamin Peterson <benjamin@dropbox.com>
-Date: Fri, 3 May 2019 08:11:00 -0700
-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.
----
- src/core/lib/gpr/log_linux.cc | 6 ++----
- src/core/lib/gpr/log_posix.cc | 4 ++--
- src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++--
- 3 files changed, 6 insertions(+), 8 deletions(-)
-
-diff --git a/third_party/grpc/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc
-index 81026e5689b..8b597b4cf2f 100644
---- a/third_party/grpc/src/core/lib/gpr/log_linux.cc
-+++ b/third_party/grpc/src/core/lib/gpr/log_linux.cc
-@@ -40,7 +40,7 @@
- #include <time.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, ...) {
-@@ -70,7 +70,7 @@ void gpr_default_log(gpr_log_func_args* args) {
- gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
- struct tm tm;
- static __thread long tid = 0;
-- if (tid == 0) tid = gettid();
-+ if (tid == 0) tid = sys_gettid();
-
- timer = static_cast<time_t>(now.tv_sec);
- final_slash = strrchr(args->file, '/');
-diff --git a/third_party/grpc/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc
-index b6edc14ab6b..2f7c6ce3760 100644
---- a/third_party/grpc/src/core/lib/gpr/log_posix.cc
-+++ b/third_party/grpc/src/core/lib/gpr/log_posix.cc
-@@ -31,7 +31,7 @@
- #include <string.h>
- #include <time.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, ...) {
-@@ -86,7 +86,7 @@ void gpr_default_log(gpr_log_func_args* args) {
- char* prefix;
- gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %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, "%-70s %s\n", prefix, args->message);
- gpr_free(prefix);
-diff --git a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc
-index c2d80c08ddb..4a83cb6c215 100644
---- a/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
-+++ b/third_party/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
-@@ -1077,7 +1077,7 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
- }
-
- #ifndef NDEBUG
--static long gettid(void) { return syscall(__NR_gettid); }
-+static long sys_gettid(void) { return syscall(__NR_gettid); }
- #endif
-
- /* pollset->mu lock must be held by the caller before calling this.
-@@ -1097,7 +1097,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
- #define WORKER_PTR (&worker)
- #endif
- #ifndef NDEBUG
-- WORKER_PTR->originator = gettid();
-+ WORKER_PTR->originator = sys_gettid();
- #endif
- if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
- gpr_log(GPR_INFO,