diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2019-08-16 19:15:26 -0700 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2019-08-16 19:59:49 -0700 |
commit | bf6b4895ed89ae2061d7f42487b269d25bbb956b (patch) | |
tree | 6246761067ba92016c3ed19e99d72b5a553a9867 /net-libs/grpc | |
parent | dev-libs/protobuf: arm64 stable (bug #692302) (diff) | |
download | gentoo-bf6b4895ed89ae2061d7f42487b269d25bbb956b.tar.gz gentoo-bf6b4895ed89ae2061d7f42487b269d25bbb956b.tar.bz2 gentoo-bf6b4895ed89ae2061d7f42487b269d25bbb956b.zip |
net-libs/grpc: bump to 1.23.0
Bug: https://bugs.gentoo.org/692012
Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'net-libs/grpc')
-rw-r--r-- | net-libs/grpc/Manifest | 1 | ||||
-rw-r--r-- | net-libs/grpc/files/grpc-1.22.1-glibc-2.30-compat.patch | 78 | ||||
-rw-r--r-- | net-libs/grpc/grpc-1.23.0.ebuild | 113 |
3 files changed, 192 insertions, 0 deletions
diff --git a/net-libs/grpc/Manifest b/net-libs/grpc/Manifest index f80ec4ac5af2..e210b147a9e4 100644 --- a/net-libs/grpc/Manifest +++ b/net-libs/grpc/Manifest @@ -5,3 +5,4 @@ DIST grpc-1.19.0.tar.gz 14793251 BLAKE2B b3a3db91f6c54126a51e27bd474d05bc672c5f7 DIST grpc-1.20.1.tar.gz 14930355 BLAKE2B 5b1bf2250d2b052498cfad9fc96134fd9b0065c98d73957427347aff4fe170f9a3d323c9f8797311c570a25bd9ff79f80da610e32b638c6409d2cd5dfbeb4eef SHA512 e0dd0318d2b4ec07e0eafffa218938d91b1440c5053a557460ea7fceaab3d76f0cccc1d595abe7de9fa79f068b71cfbc5a28a3b688bc9c1e2737086928149583 DIST grpc-1.21.1.tar.gz 15043553 BLAKE2B bed23af6606a69eb02a033d5dd6d92e3e080cc68ddae3c700872b8036cab594fd79c2396eb4ac84df2c5ea9eaf5ec0401d820667a7de0e9e2b376c0df4d4e9c5 SHA512 b9ea81a97416d9c1ef4d49e5f222f309b00d383f643f3bf342b6ad97f88e08e212e19db75e4a74fc5c23799dbe76dd0a9d6d4c9310e8cb1e007622a78d7a7114 DIST grpc-1.22.0.tar.gz 15082718 BLAKE2B 679be0488fc02441d5ba555c9150532e6ceb00bbaee9fe8b22881bef8ab713f45f96283f123576738285cfe8d358eb458cac9252bac7766cfd8ee5ac6e97fda9 SHA512 e8181f01bc44dc7e7a9e8c74c0a9c3f25960bb9c88c239e7c75764105ca24ac173bab663130fb6349c7fa43cd57f35dd7927a369482b1e6a73224cb2174bd336 +DIST grpc-1.23.0.tar.gz 15212436 BLAKE2B 119a62e6573a1c7785934f7752d9bf2fc0f503a268e439ce143d6730994e3fc154ffd558a2fb3776a77f5f36798baac334f50d1c612ae5564c3c2f110df8b42c SHA512 4770651bd73b71735152155327c44d59125442b405157ffea8fb80b6f16406dd388474394e44ef620e2a777018121988a3a7a552a42141650d7cac263ab499a0 diff --git a/net-libs/grpc/files/grpc-1.22.1-glibc-2.30-compat.patch b/net-libs/grpc/files/grpc-1.22.1-glibc-2.30-compat.patch new file mode 100644 index 000000000000..90bd9115893f --- /dev/null +++ b/net-libs/grpc/files/grpc-1.22.1-glibc-2.30-compat.patch @@ -0,0 +1,78 @@ +From d1d017390b799c59d6fdf7b8afa6136d218bdd61 Mon Sep 17 00:00:00 2001 +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 | 4 ++-- + src/core/lib/gpr/log_posix.cc | 4 ++-- + src/core/lib/iomgr/ev_epollex_linux.cc | 4 ++-- + 3 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc +index 561276f0c20..8b597b4cf2f 100644 +--- a/src/core/lib/gpr/log_linux.cc ++++ b/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/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc +index b6edc14ab6b..2f7c6ce3760 100644 +--- a/src/core/lib/gpr/log_posix.cc ++++ b/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/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc +index 08116b3ab53..76f59844312 100644 +--- a/src/core/lib/iomgr/ev_epollex_linux.cc ++++ b/src/core/lib/iomgr/ev_epollex_linux.cc +@@ -1102,7 +1102,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. +@@ -1122,7 +1122,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, diff --git a/net-libs/grpc/grpc-1.23.0.ebuild b/net-libs/grpc/grpc-1.23.0.ebuild new file mode 100644 index 000000000000..74504ed85626 --- /dev/null +++ b/net-libs/grpc/grpc-1.23.0.ebuild @@ -0,0 +1,113 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic toolchain-funcs + +MY_PV="${PV//_pre/-pre}" + +DESCRIPTION="Modern open source high performance RPC framework" +HOMEPAGE="https://www.grpc.io" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples doc perftools systemtap static-libs" + +DEPEND=" + >=dev-libs/openssl-1.0.2:0=[-bindist] + >=dev-libs/protobuf-3.7.0:= + >=net-dns/c-ares-1.15.0:= + sys-libs/zlib:= + perftools? ( dev-util/google-perftools:= ) + systemtap? ( dev-util/systemtap ) +" + +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +# requires network +RESTRICT="test" + +PATCHES=( + "${FILESDIR}/grpc-1.21.0-fix-host-ar-handling.patch" + "${FILESDIR}/grpc-1.3.0-Don-t-run-ldconfig.patch" + "${FILESDIR}/grpc-1.11.0-pkgconfig-libdir.patch" + "${FILESDIR}/grpc-1.22.0-cxx_arg_list_too_long_forloop.patch" # https://github.com/grpc/grpc/issues/14844 + "${FILESDIR}/grpc-1.22.1-glibc-2.30-compat.patch" # https://github.com/grpc/grpc/pull/18950 +) + +S="${WORKDIR}/${PN}-${MY_PV}" + +src_prepare() { + rm -r third_party/cares || die + sed -i 's:-Werror::g' Makefile || die + sed -i 's@$(prefix)/lib@$(prefix)/$(INSTALL_LIBDIR)@g' Makefile || die "fix libdir" + + default +} + +src_compile() { + tc-export CC CXX PKG_CONFIG + + local myemakeargs=( + V=1 + prefix=/usr + INSTALL_LIBDIR="$(get_libdir)" + AR="$(tc-getAR)" + AROPTS="rcs" + CFLAGS="${CFLAGS}" + CXXFLAGS="${CXXFLAGS}" + LD="${CC}" + LDXX="${CXX}" + STRIP=/bin/true + HOST_AR="$(tc-getBUILD_AR)" + HOST_CC="$(tc-getBUILD_CC)" + HOST_CXX="$(tc-getBUILD_CXX)" + HOST_LD="$(tc-getBUILD_CC)" + HOST_LDXX="$(tc-getBUILD_CXX)" + HAS_SYSTEM_PERFTOOLS="$(usex perftools true false)" + HAS_SYSTEMTAP="$(usex systemtap true false)" + ) + + emake "${myemakeargs[@]}" +} + +src_install() { + local myemakeargs=( + V=1 + prefix="${ED}"/usr + INSTALL_LIBDIR="$(get_libdir)" + STRIP=/bin/true + ) + + emake "${myemakeargs[@]}" install + + use static-libs || find "${ED}" -name '*.a' -delete + + if use examples; then + find examples -name '.gitignore' -delete || die + dodoc -r examples + docompress -x /usr/share/doc/${PF}/examples + fi + + if use doc; then + find doc -name '.gitignore' -delete || die + local DOCS=( AUTHORS CONCEPTS.md README.md TROUBLESHOOTING.md doc/. ) + fi + + einstalldocs +} + +pkg_postinst() { + local v + for v in ${REPLACING_VERSIONS}; do + if ver_test "${v}" -lt 1.16.0; then + ewarn "python bindings and tools moved to separate independent packages" + ewarn "check dev-python/grpcio and dev-python/grpcio-tools" + fi + done + +} |