diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-10 12:25:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-10 12:25:06 +0100 |
commit | e810ac4a0e6af9f763f4433863042b34609075a7 (patch) | |
tree | 6fe0b3ff24f3b875be1564e273049c1e301d205b /net-libs/grpc | |
parent | c218398bbbe70a616790cf146c28c1066b9284bf (diff) |
gentoo auto-resync : 10:07:2024 - 12:25:06
Diffstat (limited to 'net-libs/grpc')
-rw-r--r-- | net-libs/grpc/Manifest | 5 | ||||
-rw-r--r-- | net-libs/grpc/files/grpc-1.65.0-system-gtest.patch | 86 | ||||
-rw-r--r-- | net-libs/grpc/grpc-1.62.1.ebuild | 16 | ||||
-rw-r--r-- | net-libs/grpc/grpc-1.65.0.ebuild | 209 |
4 files changed, 306 insertions, 10 deletions
diff --git a/net-libs/grpc/Manifest b/net-libs/grpc/Manifest index b8e78bb80472..15d66700a1e8 100644 --- a/net-libs/grpc/Manifest +++ b/net-libs/grpc/Manifest @@ -1,15 +1,18 @@ AUX grpc-1.57.0-fix-cmake.patch 1098 BLAKE2B f288979afb891ead497a40b05357166d15bc8577da093a44b33c4d973fcef9116c2aad8a1933eb38b154e162e9bde87d536e55bfc8b9381c285ae73d1ef55c8d SHA512 a83baf405c191056a01ad4d84f1c3d51aeec3e932776ba8444f9f2f4853401751b8b1087d2675ec4f7d1155a4b6a1d05584510a8e6f3ee268eef534516ddd602 AUX grpc-1.62.1-system-gtest.patch 2608 BLAKE2B 1052d71fe8d6e7fc31f5c3dab35426129d3c1b0c5ef3ac1061dc471eab420487c6df5e862640bade4238e0f01a520a5049b5912cb8638cc650bfcfebbe1f92bb SHA512 079d8ae837654a5229ff823689cc69b67a6bc32e05e564b2a5ee19a259ca7af6806f625806c79f6afa5b30f00e4251a042372b56f00df212aa0e925389a24a44 +AUX grpc-1.65.0-system-gtest.patch 2604 BLAKE2B 5d14fc1a22c71e09a6b66fcca6401bacfc9a30717b2f5159d3b812e75979ab959a30a7747a6f6a67f2599ed0ac2824980ca26275fd57f3bd7b2a9ab34e6612ad SHA512 9686fc7de316de5582226829b8430f60323fc2dc0d94df9706c885cb43fbba8be90866e0242d1b54aeafd6770b648d4bf5c009ad52279f12f85aefd3ab9185c4 DIST grpc-1.52.1.tar.gz 8686340 BLAKE2B 0076ddd4a2840892f4ad11885e18f782b6a645337224974522c5f828d0226d6a1e19aaaf0f30ea3225d56118e0cfc251d45b8d5e6811c2d1a84e274ff037bb53 SHA512 06c69fb817af75b2610761a3a193178b749755eb7bed58875aa251def7c0c253cdaf02cf834c31c8b2cae7b01a6081e2aece4b131a162f64bd45ff0aff4d7758 DIST grpc-1.55.1.tar.gz 9272441 BLAKE2B b2788d8deeb9791f04073294caa82c10e2cfe6376d09f396b51508a52f809e7f9f48d50ad5a62b2add652633b5c2d3b1ba07857b81111fa810202106251f440d SHA512 ecfa3a5affe33f160032f2ce42a9b44344d217359f68ee99305162ccabc911f44bc22512401183de74347e86add2ce20ec89da87ba6c14ab69874eb0835145d1 DIST grpc-1.56.1.tar.gz 11750628 BLAKE2B 52ea088d3d19fa7c1d1dc44899cd67bfd0132df2fd37690d855194d3196e4c26cfdd6fe589b5e4f802cdf88e70aad6c33b3ee98c1bd1bc47356d0dee9cdc706d SHA512 2bf9619edb60a6cec4cdaa89ee3c470c52b9745ea954bfe205aef6eb29bb55949de02e8c2afc7352eacdcd33fe4000861fd16fda9e5f66c87222674b17d6322a DIST grpc-1.57.0.tar.gz 17337863 BLAKE2B 10c6fb35f606806aeb25cd55dd993d9af168eb8b1db64b4515830e2144dc44f35ce8f8329316a38d933b8032a0eff386591a0ddb87f2e405c5deaba012db2824 SHA512 b323de7c1f35b9de3fb7bf02ff4db6993abb0eee6860bbf2082818dda405fbe3a19fad91c5b48565cb65c6318de739bb91e47b5095801c078c6cbf3e8c73600c DIST grpc-1.60.0.tar.gz 17442762 BLAKE2B 35cc0ea938deb848ca91e3d5f8879b85b80f94ac09b582600f05fee1f55c162ae98f2f744480f69d78e78da0c0f2d9e198f812101daaa1f1959869f26ba7d97a SHA512 91c2406ed4198509ac0d5360b3da6898fa4f40f459eb6fff541faa44cc238eed98fd7489e7ef7a80a6f4a318bc5b9130eaa0ba1beaa358d1c074fc82825648ff DIST grpc-1.62.1.tar.gz 22384671 BLAKE2B 134e40732e784e52d518cde6e518e4c08e2f67a025754d88b92a9a314f86e53bee33ee793395b9e225c0895c6ac8b9c036892c82c19d0fddf69909a22eac4b78 SHA512 3224ad2617c18156f90c54c1ebf1f2015e405a6f12546e8709e0c905f52508c9f1a13b4d5a6cc7a35abf58b429985b5b504c9062f50c0d3d6aa163180a61047a +DIST grpc-1.65.0.tar.gz 22537894 BLAKE2B 08b53b515b6e80c19aae6b9d3af969f79cc0f25413bc60106276030cd45df677bc67a94327da1439a2c469d49ed71043cf852f38e7fa5a36c2cb875a71bd3aa5 SHA512 18fbce2f77caca6bd21374db2234411ec37d27e5b171b1008aac6810f1a98e3f51826b9dc5e8bd29a746e4f2f31b2a87d6f1bbf988e72e321ca81e7b14f1a4b5 EBUILD grpc-1.52.1.ebuild 2815 BLAKE2B ac0c2cedb3c4cc1f9a2cb6e090172ea7cac5bca2f93f178383367498b51724fc81dfe69752de1f6952c0d7ea32be25793db480efdabeea7b5ff03d1341be7b4c SHA512 f7feb1a7e0b3c4afc55e581425feb3ca584298a43a06d623067ce4d4acd815e780198025b180635851449427b88218c682323e2205aa3ce155b2769a55ad2819 EBUILD grpc-1.55.1.ebuild 2815 BLAKE2B cf51f13634413558b287a47bff342c6fe35a7071e4ee5e2282e65c90b217127066b5abe93f96d74141489988db30defa9a219b19573ede90e5ef34612120f432 SHA512 45ad6402ea36c980fd076fd7d9728d9cea32d1441a1af6a96a1ddde3971ca1e449f3861b9366045bec00524e4b1261acd6dbf1a42351ee5457da162a54eda01d EBUILD grpc-1.56.1.ebuild 2817 BLAKE2B ae411c8ea15067f2c3e8562b5f5b67580d203db2327994d9b7f34606f676308d7a13031920c2639575ad9c13c0802c0f99dbb60f1343c3f48f56c58b8864dbf8 SHA512 c0ccfd6b0af3d81d6966a45a238d02d5f733b7a51a2550dff9d98f592b93d28dc89769b13164f4ab22345bbd2cb80be9dbf429894aeea98bdcd26d4c1f728026 EBUILD grpc-1.57.0-r1.ebuild 2971 BLAKE2B 24cb8f5def17951a7fb02739c5201df84885ae8212010b6745dcb1b51939812954e20ef4b361310e1367bcf7b7d19717073f8d394144fee668deff3dd82e33c4 SHA512 fb936428bdc91a58e0722967026b782782c2b21dd62a144d6550fd2ebb6a4621802a8aefc0e32d823245e6a9301c5445e7d61db68e15b56cc51f7701b6f89ca5 EBUILD grpc-1.60.0.ebuild 2927 BLAKE2B 80ae3abc33b3d734d65e6691ac3cc21ed608fabc1fd69549819dd9e3e8333b04c7e40f41d42ae948f5732d65addf596116d56d72b8032679be95d01e8ec36400 SHA512 b32ec9075252f44fa3200bedae368d40373b64b234657cad93b03fe727a3efe05399079f93f2653ce80a597a68bed01eecfb488ed25fd062bc40e5a866cb5c52 -EBUILD grpc-1.62.1.ebuild 6461 BLAKE2B 373439f0a87eed2ec4fde054ab8c789047062410f5639fdee8e744a9b7d89a071ed0979694017e2b3971ec227ab66fd91a0d228e734f9feed708485b98d0bc80 SHA512 0e3b6ebc2956838a756a6e0be625447070141477851d1f78920cb2829183497ae1a3773f32651514246ef32ea395962ee59da2dfc6ff58739cda1aa8e314db94 +EBUILD grpc-1.62.1.ebuild 6435 BLAKE2B a88a4f4c63a00114a1376dc895f2ba92e79eb8d0d914658513db3ffdf6e1cd7a78029d95458c77b6a855f66834c5777c4398ada623d65f718722e124ab4d960d SHA512 5e90f37e970c1c3cbb2d1bea2c8df5cf0cf627b48dbbcc89781b251bb8663a62b7e1af858fb754366bc21dc65ef32b11ff203e164b975d60eaa8c8df1c131ced +EBUILD grpc-1.65.0.ebuild 6456 BLAKE2B 2e5c865c728defb427c6135bc3adbf332f23dbc5b68b4fb3179a3be04591e0b03e141719a980c6e228ebb0fd5de41239477231b68a8e838b0d874c62410448a7 SHA512 a7d289af0a457dbb9dd32228b253e0f56f36206439fb23b1452ec03f277dbbb32dc488b14b1d1d8f031f5cfc2c0676cc7cfebbfc3d429dfeb9382912b0e2ee38 MISC metadata.xml 452 BLAKE2B 03fbf9312276176e8a4b61851a2b19a2e3b9bd07e64dd0ed8962c9f5bc11182c8ab125dcb8b1fdfbc09c5a5346ec5a23de9b4eb925b423a1db93117ff973a273 SHA512 0285f13b57c1f06a3c561d04ee876d3f161c39e5115858b83858973cb1e233a60b01289fd312c0034b3ec270b6cc42b6a5a97e64f45144b63c9d45b0dee55bb1 diff --git a/net-libs/grpc/files/grpc-1.65.0-system-gtest.patch b/net-libs/grpc/files/grpc-1.65.0-system-gtest.patch new file mode 100644 index 000000000000..47be90892893 --- /dev/null +++ b/net-libs/grpc/files/grpc-1.65.0-system-gtest.patch @@ -0,0 +1,86 @@ +https://bugs.gentoo.org/927403 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7a55616fb6..ee62502267 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3442,79 +3442,6 @@ if(gRPC_INSTALL) + ) + endif() + +-if(gRPC_BUILD_TESTS) +- +-add_library(gtest +- third_party/googletest/googlemock/src/gmock-cardinalities.cc +- third_party/googletest/googlemock/src/gmock-internal-utils.cc +- third_party/googletest/googlemock/src/gmock-matchers.cc +- third_party/googletest/googlemock/src/gmock-spec-builders.cc +- third_party/googletest/googlemock/src/gmock.cc +- third_party/googletest/googletest/src/gtest-assertion-result.cc +- third_party/googletest/googletest/src/gtest-death-test.cc +- third_party/googletest/googletest/src/gtest-filepath.cc +- third_party/googletest/googletest/src/gtest-matchers.cc +- third_party/googletest/googletest/src/gtest-port.cc +- third_party/googletest/googletest/src/gtest-printers.cc +- third_party/googletest/googletest/src/gtest-test-part.cc +- third_party/googletest/googletest/src/gtest-typed-test.cc +- third_party/googletest/googletest/src/gtest.cc +-) +- +-target_compile_features(gtest PUBLIC cxx_std_14) +- +-set_target_properties(gtest PROPERTIES +- VERSION ${gRPC_CORE_VERSION} +- SOVERSION ${gRPC_CORE_SOVERSION} +-) +- +-if(WIN32 AND MSVC) +- set_target_properties(gtest PROPERTIES COMPILE_PDB_NAME "gtest" +- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" +- ) +- if(gRPC_INSTALL) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gtest.pdb +- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL +- ) +- endif() +-endif() +- +-target_include_directories(gtest +- PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> +- PRIVATE +- ${CMAKE_CURRENT_SOURCE_DIR} +- ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} +- ${_gRPC_RE2_INCLUDE_DIR} +- ${_gRPC_SSL_INCLUDE_DIR} +- ${_gRPC_UPB_GENERATED_DIR} +- ${_gRPC_UPB_GRPC_GENERATED_DIR} +- ${_gRPC_UPB_INCLUDE_DIR} +- ${_gRPC_XXHASH_INCLUDE_DIR} +- ${_gRPC_ZLIB_INCLUDE_DIR} +- third_party/googletest/googletest/include +- third_party/googletest/googletest +- third_party/googletest/googlemock/include +- third_party/googletest/googlemock +-) +-target_link_libraries(gtest +- ${_gRPC_ALLTARGETS_LIBRARIES} +- ${_gRPC_RE2_LIBRARIES} +- absl::flat_hash_set +- absl::failure_signal_handler +- absl::stacktrace +- absl::symbolize +- absl::flags +- absl::flags_parse +- absl::flags_reflection +- absl::flags_usage +- absl::strings +- absl::any +- absl::optional +- absl::variant +-) +- +- +-endif() + + add_library(upb_base_lib + third_party/upb/upb/base/status.c diff --git a/net-libs/grpc/grpc-1.62.1.ebuild b/net-libs/grpc/grpc-1.62.1.ebuild index f8449433e9f8..868f18efcae3 100644 --- a/net-libs/grpc/grpc-1.62.1.ebuild +++ b/net-libs/grpc/grpc-1.62.1.ebuild @@ -4,7 +4,7 @@ EAPI=8 CMAKE_IN_SOURCE_BUILD=1 -PYTHON_COMPAT=( python3_{10,12} ) +PYTHON_COMPAT=( python3_{10..12} ) inherit cmake flag-o-matic python-any-r1 MY_PV="${PV//_pre/-pre}" @@ -57,14 +57,12 @@ BDEPEND=" PATCHES=( "${FILESDIR}/${PN}-1.62.1-system-gtest.patch" ) python_check_deps() { - python_has_version -b "dev-python/twisted[${PYTHON_USEDEP}]" && - python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" && - python_has_version -b "dev-python/cffi[${PYTHON_USEDEP}]" && - python_has_version -b "dev-python/six[${PYTHON_USEDEP}]" -} - -pkg_setup() { - use test && python-any-r1_pkg_setup + if use test; then + python_has_version -b "dev-python/twisted[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/cffi[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/six[${PYTHON_USEDEP}]" + fi } soversion_check() { diff --git a/net-libs/grpc/grpc-1.65.0.ebuild b/net-libs/grpc/grpc-1.65.0.ebuild new file mode 100644 index 000000000000..b5a31691fd7d --- /dev/null +++ b/net-libs/grpc/grpc-1.65.0.ebuild @@ -0,0 +1,209 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CMAKE_IN_SOURCE_BUILD=1 +PYTHON_COMPAT=( python3_{10..12} ) +inherit cmake flag-o-matic python-any-r1 + +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" + +S="${WORKDIR}/${PN}-${MY_PV}" +LICENSE="Apache-2.0" +# format is 0/${CORE_SOVERSION//./}.${CPP_SOVERSION//./} , check top level CMakeLists.txt +SLOT="0/42.165" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="doc examples test systemd" +RESTRICT="!test? ( test )" + +# look for submodule versions in third_party dir +RDEPEND=" + >=dev-cpp/abseil-cpp-20240116:= + >=dev-libs/re2-0.2022.04.01:= + >=dev-libs/openssl-1.1.1:0=[-bindist(-)] + >=dev-libs/protobuf-27.0:= + dev-libs/xxhash + >=net-dns/c-ares-1.19.1:= + sys-libs/zlib:= + systemd? ( sys-apps/systemd:= ) +" +DEPEND=" + ${RDEPEND} + test? ( + dev-cpp/benchmark + dev-cpp/gflags + dev-cpp/gtest + ) +" +BDEPEND=" + ${RDEPEND} + virtual/pkgconfig + test? ( + net-misc/curl + $(python_gen_any_dep ' + dev-python/twisted[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/cffi[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + ') + ) +" + +PATCHES=( "${FILESDIR}/${PN}-1.65.0-system-gtest.patch" ) + +python_check_deps() { + if use test; then + python_has_version -b "dev-python/twisted[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/cffi[${PYTHON_USEDEP}]" && + python_has_version -b "dev-python/six[${PYTHON_USEDEP}]" + fi +} + +soversion_check() { + local core_sover cpp_sover + # extract quoted number. line we check looks like this: 'set(gRPC_CPP_SOVERSION "1.37")' + core_sover="$(grep 'set(gRPC_CORE_SOVERSION ' CMakeLists.txt | sed '/.*\"\(.*\)\".*/ s//\1/')" + cpp_sover="$(grep 'set(gRPC_CPP_SOVERSION ' CMakeLists.txt | sed '/.*\"\(.*\)\".*/ s//\1/')" + # remove dots, e.g. 1.37 -> 137 + core_sover="${core_sover//./}" + cpp_sover="${cpp_sover//./}" + [[ ${core_sover} -eq $(ver_cut 2 ${SLOT}) ]] || die "fix core sublot! should be ${core_sover}" + [[ ${cpp_sover} -eq $(ver_cut 3 ${SLOT}) ]] || die "fix cpp sublot! should be ${cpp_sover}" +} + +src_prepare() { + # These extra libs are defined as dependencies of the vendored gtest, + # which is a dependency of the unit tests, therefore they are normally + # implicitly picked up and linked to the test binaries. However removing + # the vendored gtest to use the system one also removes these dependencies, + # so we have to redeclare them as dependencies of the test binaries individually. + local extra_libs=("gtest" + "gmock" + "\${_gRPC_RE2_LIBRARIES}" + "absl::flat_hash_set" + "absl::failure_signal_handler" + "absl::stacktrace" + "absl::symbolize" + "absl::flags" + "absl::flags_parse" + "absl::flags_reflection" + "absl::flags_usage" + "absl::strings" + "absl::any" + "absl::optional" + "absl::variant") + : "$(echo "${extra_libs[@]}" | "${EPYTHON}" -c 'import sys;print("\\n\\1".join(sys.stdin.read().split()))')" + local rstring="${_}" + sed -i -E "s/( +)gtest/\1${rstring}/g" "CMakeLists.txt" || die + + # Integrate tests with ctest rather than the custom test framework. + # Formatted with dev-python/black. + "${EPYTHON}" - <<-EOF | tee -a "CMakeLists.txt" + import json, pathlib + + print("if(gRPC_BUILD_TESTS)") + print(" ENABLE_TESTING()") + for line in [ + json.dumps([t["name"], "./" + t["name"], *t["args"]]).translate( + str.maketrans(dict.fromkeys("[],", None)) + ) + for t in json.loads( + pathlib.Path("tools/run_tests/generated/tests.json").read_text() + ) + if "linux" in t["platforms"] and not t["flaky"] and not t.get("boringssl", False) + ]: + print(f" add_test({line})") + print("endif()") + EOF + + # Weird path issue. All tests except these two assume they are running from top-level src + sed -i -E "s/lslash != nullptr/false/" "test/core/http/httpcli_test_util.cc" || die + + # Called via system() by some of the C++ sources, respect EPYTHON + sed -i -E "s#for p in #for p in \"${EPYTHON}\"#" "tools/distrib/python_wrapper.sh" || die + + # Respect EPYTHON when testing, don't touch installed files otherwise + use test && python_fix_shebang --force "${S}" + + cmake_src_prepare + + # un-hardcode libdir + sed -i "s@/lib@/$(get_libdir)@" cmake/pkg-config-template.pc.in || die + + # suppress network access, package builds fine without the submodules + mkdir "${S}/third_party/opencensus-proto/src" || die + + soversion_check +} + +src_configure() { + # https://github.com/grpc/grpc/issues/29652 + filter-lto + + local mycmakeargs=( + -DgRPC_INSTALL=ON + -DgRPC_ABSL_PROVIDER=package + -DgRPC_CARES_PROVIDER=package + -DgRPC_INSTALL_CMAKEDIR="$(get_libdir)/cmake/${PN}" + -DgRPC_INSTALL_LIBDIR="$(get_libdir)" + -DgRPC_PROTOBUF_PROVIDER=package + -DgRPC_RE2_PROVIDER=package + -DgRPC_SSL_PROVIDER=package + -DgRPC_ZLIB_PROVIDER=package + -DgRPC_BUILD_TESTS=$(usex test) + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_DISABLE_FIND_PACKAGE_systemd=$(usex !systemd) + $(usex test '-DgRPC_BENCHMARK_PROVIDER=package' '') + ) + cmake_src_configure +} + +src_test() { + # This is normally done with start_port_server.py, but this forks and exits, + # while we need to capture the pid, so run it ourselves + "${EPYTHON}" "tools/run_tests/python_utils/port_server.py" \ + -p 32766 -l "${T}/port_server.log" & + local port_server_pid="${!}" + + # Reimplementation of what start_port_server.py does with curl + curl --retry 9999 --retry-all-errors --retry-max-time 120 \ + --fail --silent --output /dev/null "http://localhost:32766/get" || die + + CMAKE_SKIP_TESTS=( + no_logging_test # hangs everywhere, no output + grpc_tool_test # fails everywhere + examine_stack_test # fails on amd64 only + stack_tracer_test # fails on amd64 only + endpoint_pair_test # fails on alpha + event_poller_posix_test # fails on alpha + tcp_posix_test # fails on alpha + ) + + # BUG this should be nonfatal and we kill the server even when tests fail + cmake_src_test + + kill "${port_server_pid}" || die +} + +src_install() { + cmake_src_install + + 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 +} |