Diff grpc-1.32.0 with a grpc-1.37.1-r1

/usr/portage/net-libs/grpc/grpc-1.37.1-r1.ebuild 2021-05-15 05:39:00.000000000 +0300
12 12
SRC_URI="https://github.com/${PN}/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
13 13

  
14 14
LICENSE="Apache-2.0"
15
SLOT="0"
16
KEYWORDS="~amd64 ~ppc64 ~x86"
15
# format is 0/${CORE_SOVERSION//./}.${CPP_SOVERSION//./} , check top level CMakeLists.txt
16
SLOT="0/15.137"
17
KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
17 18
IUSE="doc examples test"
18 19

  
20
# look for submodule versions in third_party dir
19 21
RDEPEND="
20
	=dev-cpp/abseil-cpp-20200225*:=
21
	dev-libs/re2:=
22
	>=dev-libs/protobuf-3.13.0:=
22
	=dev-cpp/abseil-cpp-20200923*:=[cxx17(+)]
23
	>=dev-libs/re2-0.2021.04.01:=
24
	>=dev-libs/openssl-1.1.1:0=[-bindist]
25
	>=dev-libs/protobuf-3.15.2:=
23 26
	>=net-dns/c-ares-1.15.0:=
24 27
	sys-libs/zlib:=
25
	>=dev-libs/openssl-1.1.1:0=[-bindist]
26 28
"
27 29

  
28 30
DEPEND="${RDEPEND}
......
39 41

  
40 42
S="${WORKDIR}/${PN}-${MY_PV}"
41 43

  
42
PATCHES=( "${FILESDIR}/use-pkg-config-to-find-re2.patch" )
44
soversion_check() {
45
	local core_sover cpp_sover
46
	# extract quoted number. line we check looks like this: 'set(gRPC_CPP_SOVERSION    "1.37")'
47
	core_sover="$(grep 'set(gRPC_CORE_SOVERSION ' CMakeLists.txt  | sed '/.*\"\(.*\)\".*/ s//\1/')"
48
	cpp_sover="$(grep 'set(gRPC_CPP_SOVERSION ' CMakeLists.txt  | sed '/.*\"\(.*\)\".*/ s//\1/')"
49
	# remove dots, e.g. 1.37 -> 137
50
	core_sover="${core_sover//./}"
51
	cpp_sover="${cpp_sover//./}"
52
	[[ ${core_sover} -eq $(ver_cut 2 ${SLOT}) ]] || die "fix core sublot! should be ${core_sover}"
53
	[[ ${cpp_sover} -eq $(ver_cut 3 ${SLOT}) ]] || die "fix cpp sublot! should be ${cpp_sover}"
54
}
43 55

  
44 56
src_prepare() {
45 57
	cmake_src_prepare
......
47 59
	# un-hardcode libdir
48 60
	sed -i "s@lib/pkgconfig@$(get_libdir)/pkgconfig@" CMakeLists.txt || die
49 61
	sed -i "s@/lib@/$(get_libdir)@" cmake/pkg-config-template.pc.in || die
62

  
63
	soversion_check
50 64
}
51 65

  
52 66
src_configure() {
......
62 76
		-DgRPC_SSL_PROVIDER=package
63 77
		-DgRPC_ZLIB_PROVIDER=package
64 78
		-DgRPC_BUILD_TESTS=$(usex test)
79
		-DCMAKE_CXX_STANDARD=17
65 80
		$(usex test '-DgRPC_GFLAGS_PROVIDER=package' '')
66 81
		$(usex test '-DgRPC_BENCHMARK_PROVIDER=package' '')
67 82
	)
Thank you!