summaryrefslogtreecommitdiff
path: root/dev-libs/protobuf/protobuf-9999.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/protobuf/protobuf-9999.ebuild')
-rw-r--r--dev-libs/protobuf/protobuf-9999.ebuild33
1 files changed, 29 insertions, 4 deletions
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild
index fe2db6a46086..0e620717ec44 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-9999.ebuild
@@ -1,7 +1,7 @@
# Copyright 2008-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="7"
+EAPI=8
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
@@ -18,11 +18,11 @@ if [[ "${PV}" == "9999" ]]; then
SRC_URI=""
else
SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
fi
LICENSE="BSD"
-SLOT="0/30"
-KEYWORDS=""
+SLOT="0/31"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -35,18 +35,43 @@ RDEPEND="emacs? ( app-editors/emacs:* )
PATCHES=(
"${FILESDIR}/${PN}-3.19.0-disable_no-warning-test.patch"
"${FILESDIR}/${PN}-3.19.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.20.1-protoc_input_output_files.patch"
)
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
src_prepare() {
default
+
+ # https://github.com/protocolbuffers/protobuf/issues/7413
+ sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die
+
+ # https://github.com/protocolbuffers/protobuf/issues/8082
+ sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die
+
+ # https://github.com/protocolbuffers/protobuf/issues/8459
+ sed \
+ -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \
+ -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \
+ -i src/google/protobuf/arena_unittest.cc || die
+
+ # https://github.com/protocolbuffers/protobuf/issues/8460
+ sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die
+
+ # https://github.com/protocolbuffers/protobuf/issues/9433
+ sed -e "/^[[:space:]]*static_assert(alignof(U) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.cc || die
+
eautoreconf
}
src_configure() {
append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
+
+ if tc-ld-is-gold; then
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=24527
+ tc-ld-disable-gold
+ fi
+
multilib-minimal_src_configure
}