summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2018-09-12 11:38:44 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2018-09-12 11:56:51 -0700
commit7c3ea02725492bbb3d7ce9bdea1d4b44305c69d8 (patch)
tree7e37f0c55eec90ea7b01ad8e47c09f98aff15e80 /net-libs/grpc
parentnet-libs/grpc: version bump to 1.14.2 (diff)
downloadgentoo-7c3ea02725492bbb3d7ce9bdea1d4b44305c69d8.tar.gz
gentoo-7c3ea02725492bbb3d7ce9bdea1d4b44305c69d8.tar.bz2
gentoo-7c3ea02725492bbb3d7ce9bdea1d4b44305c69d8.zip
net-libs/grpc: version bump to 1.15.0
Package-Manager: Portage-2.3.49, Repoman-2.3.10
Diffstat (limited to 'net-libs/grpc')
-rw-r--r--net-libs/grpc/Manifest2
-rw-r--r--net-libs/grpc/files/grpc-1.15.0-fix-cpp-so-version.patch70
-rw-r--r--net-libs/grpc/grpc-1.15.0.ebuild173
3 files changed, 245 insertions, 0 deletions
diff --git a/net-libs/grpc/Manifest b/net-libs/grpc/Manifest
index 2f11312e5db9..565aa5cecfb1 100644
--- a/net-libs/grpc/Manifest
+++ b/net-libs/grpc/Manifest
@@ -3,4 +3,6 @@ DIST grpc-1.12.1.tar.gz 13692045 BLAKE2B d35706b553917d0f27e4474509f361ec7962b73
DIST grpc-1.13.0.tar.gz 13755973 BLAKE2B 533f0a7d4eb606b8a55f12aade503285dbff2cfa29ff2af71d407e3df25f3ec4b7572335c455d5dd0069eb343f18f8641a4f9326065cc118922942f77d2d2403 SHA512 25a489cd67d12219696c397afa75282eb702bd0af418381990b2eeb4b56483a46276d05314710582dd17be04c80aaf9bb16e01e2c1729d9a59d84ff273baa254
DIST grpc-1.13.1.tar.gz 13757818 BLAKE2B 9387efb980a0cff20c36d7653f24fb7982809428f7f35af0819786753d6cf380a581af81bde72f3682fcdfb3f41c71d628e5ef3b6b83663c8d3d182b4fdb6272 SHA512 f44028299d47865814ada2b8b93dc98dc51c8729bedc9c30dd79c04f6ecc3789ff06bbe7555e5d3512d9aec027751761ae10a80a09a94cf85bbd3260d651b356
DIST grpc-1.14.2.tar.gz 13891112 BLAKE2B 2d8baa2d248fb9e319ac6f1a9cb1eb0c4f7ce20cfaa51254cb6d43db8d101fd4df03779b24e52a2cd00d7e14a415d928d51039c31cdde2c3272feee664861ea1 SHA512 1fca05a01fcae3bcaa8aeb57fb8e4a69d92d4d4d42e0612e9a7b3652a3f4e1b006a7559aea95cadae614479f4ac6ed14876b81fca0365967d246a5b7888a8385
+DIST grpc-1.15.0.tar.gz 14084394 BLAKE2B 133460868f347eb4bba6e761c2ad7d826017de4b3c52aafe1850a8a8811afb0a6ff3c084b5ff645556d0f14c7c60db89a9cb5dddfc9827b2ca2b32af09ecf43f SHA512 2a958d93bf737e074216b121bc8e65c9c5151e6f8cfd5a3e9f826413d2734fdcdbd5659482c8d0b2a5e9a4ae537f5c1dfb58ee8ecf844ec95fe46659fb937e06
DIST protobuf-3.5.2.tar.gz 4584659 BLAKE2B f582212169d802a5844574eb900c9f8cbb343b7e73f2074e5ff0bfc544ebd13f4bc2b78271fb70f4465d78fdc39972ed68339f453c0d3ffe98d8564fbf520544 SHA512 09d10cf0c07a0ba249428bbf20f5dbed840965fa06b3c09682f286a4dee9d84bb96f3b5b50e993d48ef1f20440531255ce7d0e60a648bf3fe536a5f2b0b74181
+DIST protobuf-3.6.1.tar.gz 4485582 BLAKE2B 546c49759df784018459809b9db692c5c94aef5d717183af5cd9edd96b4c658e759f23950cdcd5dddceaaad06ea1de2a2357b9fa8c496ed5d538fc5920174da0 SHA512 1bc175d24b49de1b1e41eaf39598194e583afffb924c86c8d2e569d935af21874be76b2cbd4d9655a1d38bac3d4cd811de88bc2c72d81bad79115e69e5b0d839
diff --git a/net-libs/grpc/files/grpc-1.15.0-fix-cpp-so-version.patch b/net-libs/grpc/files/grpc-1.15.0-fix-cpp-so-version.patch
new file mode 100644
index 000000000000..ba2ca651f0c3
--- /dev/null
+++ b/net-libs/grpc/files/grpc-1.15.0-fix-cpp-so-version.patch
@@ -0,0 +1,70 @@
+From a443abbdbbd402951138bb8fcb2a4f159b920fcd Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Wed, 12 Sep 2018 11:22:48 -0700
+Subject: [PATCH] Fix cpp soname symlinks
+
+---
+ Makefile | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4e993782ee..09bd52e8ad 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3050,7 +3050,7 @@ install-shared_cxx: shared_cxx strip-shared_cxx install-shared_c install-pkg-con
+ ifeq ($(SYSTEM),MINGW32)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP)-dll.a $(prefix)/$(INSTALL_LIBDIR)/libgrpc++.a
+ else ifneq ($(SYSTEM),Darwin)
+- $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++.so.6
++ $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++.so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++.so
+ endif
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+@@ -3059,7 +3059,7 @@ endif
+ ifeq ($(SYSTEM),MINGW32)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_cronet$(SHARED_VERSION_CPP)-dll.a $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_cronet.a
+ else ifneq ($(SYSTEM),Darwin)
+- $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_cronet.so.6
++ $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_cronet.so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_cronet$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_cronet.so
+ endif
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+@@ -3068,7 +3068,7 @@ endif
+ ifeq ($(SYSTEM),MINGW32)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP)-dll.a $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_error_details.a
+ else ifneq ($(SYSTEM),Darwin)
+- $(Q) ln -sf $(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_error_details.so.6
++ $(Q) ln -sf $(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_error_details.so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_error_details.so
+ endif
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+@@ -3077,7 +3077,7 @@ endif
+ ifeq ($(SYSTEM),MINGW32)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP)-dll.a $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_reflection.a
+ else ifneq ($(SYSTEM),Darwin)
+- $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_reflection.so.6
++ $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_reflection.so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_reflection.so
+ endif
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+@@ -3086,7 +3086,7 @@ endif
+ ifeq ($(SYSTEM),MINGW32)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP)-dll.a $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_unsecure.a
+ else ifneq ($(SYSTEM),Darwin)
+- $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_unsecure.so.6
++ $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_unsecure.so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpc++_unsecure.so
+ endif
+ $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP)"
+@@ -3095,7 +3095,7 @@ endif
+ ifeq ($(SYSTEM),MINGW32)
+ $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP)-dll.a $(prefix)/$(INSTALL_LIBDIR)/libgrpcpp_channelz.a
+ else ifneq ($(SYSTEM),Darwin)
+- $(Q) ln -sf $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpcpp_channelz.so.6
++ $(Q) ln -sf $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpcpp_channelz.so.1
+ $(Q) ln -sf $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(prefix)/$(INSTALL_LIBDIR)/libgrpcpp_channelz.so
+ endif
+ ifneq ($(SYSTEM),MINGW32)
+--
+2.18.0
+
diff --git a/net-libs/grpc/grpc-1.15.0.ebuild b/net-libs/grpc/grpc-1.15.0.ebuild
new file mode 100644
index 000000000000..7c59fdc30768
--- /dev/null
+++ b/net-libs/grpc/grpc-1.15.0.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+DISTUTILS_OPTIONAL=1
+
+inherit distutils-r1 flag-o-matic toolchain-funcs
+
+# should match pinned git submodule version of third_party/protobuf
+# look it up here https://github.com/grpc/grpc/tree/v"${PV}"/third_party
+# also should >=depend on same version of dev-libs/protobuf below
+PROTOBUF_VERSION="3.6.1"
+
+DESCRIPTION="Modern open source high performance RPC framework"
+HOMEPAGE="http://www.grpc.io"
+SRC_URI="
+ https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ tools? ( https://github.com/google/protobuf/archive/v${PROTOBUF_VERSION}.tar.gz -> protobuf-${PROTOBUF_VERSION}.tar.gz )
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples doc python systemtap static-libs tools"
+
+REQUIRED_USE="
+ python? ( ${PYTHON_REQUIRED_USE} )
+ tools? ( python )
+"
+
+RDEPEND="
+ >=dev-libs/openssl-1.0.2:0=[-bindist]
+ >=dev-libs/protobuf-${PROTOBUF_VERSION}:=
+ dev-util/google-perftools
+ net-dns/c-ares:=
+ sys-libs/zlib:=
+ python? ( ${PYTHON_DEPS}
+ dev-python/cython[${PYTHON_USEDEP}]
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ virtual/python-enum34[${PYTHON_USEDEP}]
+ virtual/python-futures[${PYTHON_USEDEP}]
+ tools? ( >=dev-python/protobuf-python-${PROTOBUF_VERSION}:=[${PYTHON_USEDEP}] )
+ )
+ systemtap? ( dev-util/systemtap )
+"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ python? (
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+ )
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/0001-grpc-1.13.0-fix-host-ar-handling.patch"
+ "${FILESDIR}/0002-grpc-1.3.0-Fix-unsecure-.pc-files.patch"
+ "${FILESDIR}/0003-grpc-1.3.0-Don-t-run-ldconfig.patch"
+ "${FILESDIR}/0005-grpc-1.11.0-pkgconfig-libdir.patch"
+ "${FILESDIR}/grpc-1.14.2-gcc8-fixes.patch"
+ "${FILESDIR}/grpc-1.15.0-fix-cpp-so-version.patch"
+)
+
+src_prepare() {
+ sed -i 's@$(prefix)/lib@$(prefix)/$(INSTALL_LIBDIR)@g' Makefile || die "fix libdir"
+ default
+ use python && distutils-r1_src_prepare
+}
+
+python_prepare() {
+ if use tools; then
+ rm -r third_party/protobuf || die "removing empty protobuf dir failed"
+ ln -s "${S}"/../protobuf-"${PROTOBUF_VERSION}" third_party/protobuf || die
+ pushd tools/distrib/python/grpcio_tools >/dev/null || die
+ # absolute symlinks will fail
+ # ./src -> ${S}/src
+ ln -s ../../../../src ./ || die
+ # ./third_party -> ${S}/third_party
+ ln -s ../../../../third_party ./ || die
+ # ./grpc_root -> ${S}
+ ln -s ../../../../ ./grpc_root || die
+ # prevent above symlinks creating huge SOURCES.TXT files, bug #661244
+ echo "prune grpc_root/tools/distrib/python/grpcio_tools" >> MANIFEST.in
+ popd >/dev/null || die
+ fi
+}
+
+src_compile() {
+ tc-export CC CXX PKG_CONFIG
+
+ emake \
+ 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_CC="$(tc-getBUILD_CC)" \
+ HOST_CXX="$(tc-getBUILD_CXX)" \
+ HOST_LD="$(tc-getBUILD_CC)" \
+ HOST_LDXX="$(tc-getBUILD_CXX)" \
+ HOST_AR="$(tc-getBUILD_AR)" \
+ HAS_SYSTEMTAP="$(usex systemtap true false)"
+
+ use python && distutils-r1_src_compile
+}
+
+python_compile() {
+ export GRPC_PYTHON_BUILD_SYSTEM_CARES=1
+ export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
+ export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
+ export GRPC_PYTHON_BUILD_WITH_CYTHON=1
+ distutils-r1_python_compile
+
+ if use tools; then
+ pushd tools/distrib/python/grpcio_tools >/dev/null || die
+ distutils-r1_python_compile
+ popd >/dev/null || die
+ fi
+}
+
+python_compile_all() {
+ if use doc; then
+ esetup.py doc
+ mv doc/build doc/html || die
+ fi
+}
+
+src_install() {
+ emake \
+ prefix="${D}"/usr \
+ INSTALL_LIBDIR="$(get_libdir)" \
+ STRIP=/bin/true \
+ 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
+
+ # only define DOCS array if requested, otherwise portage default is fine
+ if use doc; then
+ find doc -name '.gitignore' -delete || die
+ local DOCS=( AUTHORS README.md TROUBLESHOOTING.md doc/. )
+ fi
+
+ einstalldocs
+
+ use python && distutils-r1_src_install
+
+}
+
+python_install() {
+ distutils-r1_python_install
+
+ if use tools; then
+ pushd tools/distrib/python/grpcio_tools >/dev/null || die
+ distutils-r1_python_install
+ popd >/dev/null || die
+ fi
+}