mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-15 00:06:58 +03:00
The protobuf packages use a shared distfile. However, some packages use github's release artifacts, e.g., https://github.com/protocolbuffers/protobuf/releases/download/v30.2/protobuf-30.2.tar.gz while protobuf-java used github's archive artifacts, e.g., https://github.com/protocolbuffers/protobuf/archive/v${MY_PV}.tar.gz This can cause a distfile mismatch. If the user has protobuf-30.2.tar.gz from releases in its DISTDIR and then tries to emerge protobuf-java. Fix this by switching protobuf-java's SRC_URI to the release artifacts. Furthermore, fix src_test. The JAVA_TEST_RUN_ONLY array would contain fully qualified Java class names prefixed by two dots. For example '..com.example.FooTest' instead of 'com.example.FooTest'. This is caused by invoking 'find' with ./* instead of *, and the JAVA_TEST_RUN_ONLY="${JAVA_TEST_RUN_ONLY//\//.}" substitution. Fix this by adjusting the 'find' invocation. Furthermore, move a 'rm' from src_test to src_prepare, where it belongs. Having 'rm' in src_test makes it harder to re-execute subsequent ebuild phases using the 'ebuild' command, e.g., "ebuild protobuf-java-4.30.2.ebuild test", as the 'rm' would fail because the file no longer exists. Also zap CodedInputStreamTest as it requires the TestParameterInjector library, which is currently not available in ::gentoo. It seems like the ebuild's src_test could never have succeeded so far. Finally, drop unused protobuf_ABSL_PROVIDER=package cmake argument and fix this QA warning. This option is replaced with upstream's protobuf_LOCAL_DEPENDENCIES_ONLY=ON to prevent automatic dep fetching. Signed-off-by: Florian Schmaus <flow@gentoo.org>