mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 12:16:41 +02:00
dev-libs/protobuf: Sync with Gentoo
It's from Gentoo commit 7607deb671dad94c3f7a8af3bb47fcea43eefa22.
This commit is contained in:
parent
5dd0edeb27
commit
502d9f3c10
@ -2,3 +2,4 @@ DIST protobuf-21.12.tar.gz 5141166 BLAKE2B 33500612d103afb817062486a741e8e5503f8
|
||||
DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1
|
||||
DIST protobuf-22.5.tar.gz 4924661 BLAKE2B d69c73f4ebfddf45fd94b4f5f898faf00256fe674f2cbc0443c60a88d7a0f47fb96f2f6262879927c6da88095b4ea3ee7fd4c471c100bf42a2bae9edf48c07f1 SHA512 058ab2fec5b11007972e6043071056d1944c3b6fe1d31246cddba8eb57686e3b5280f6ad3d58e78940ca63005e74a8de3c72237f9f7c5066548c5a2513ddc584
|
||||
DIST protobuf-23.3.tar.gz 5043803 BLAKE2B ee2edee230969555c9ef95069c7b1d6c23c3d1f8ea1b2249fb3e9f6fcf63312c6e10e9da65b80629fb08d5fb08d05a19bb9c752c25b892c1e3fd6f18b9279eb3 SHA512 646af367dbc61b42e322cf0b335f360e428b272e2b1f5361b2f17c18d3dc9dddd615e1279436028b1a42275a0beadda37c2c934fc27d6c892131cc8d526d8b3b
|
||||
DIST protobuf-26.1.tar.gz 5957903 BLAKE2B 1a7faab2f56aa0995801a80f73a812c7fc38a00af0bf25bdd5eecf7aec27a86a575ea2fb8484787d19c9ac6e46007c9864e79464f529c446f31af732981feed1 SHA512 0363ac09f92d8e040491425d444c8dca0b9b430e02d2dff6e2b28a0c2b2bea0d33a47f50bc9e2e2d4e8e22b65a02009a20c0066fb89c75df93a7b703dda42ed4
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
https://bugs.gentoo.org/917046
|
||||
https://github.com/protocolbuffers/protobuf/commit/e6f8b9d1026996f6463d4f014d7760256b757227
|
||||
|
||||
From e6f8b9d1026996f6463d4f014d7760256b757227 Mon Sep 17 00:00:00 2001
|
||||
From: Protobuf Team Bot <protobuf-github-bot@google.com>
|
||||
Date: Wed, 8 Nov 2023 09:20:10 -0800
|
||||
Subject: [PATCH] message_lite.h: Use PROTOBUF_EXPORT_TEMPLATE_DECLARE with
|
||||
extern template
|
||||
|
||||
Export extern templates in message_lite.h to avoid missing symbols when
|
||||
linking protobuf-lite.so.
|
||||
|
||||
PiperOrigin-RevId: 580556084
|
||||
--- a/src/google/protobuf/message_lite.h
|
||||
+++ b/src/google/protobuf/message_lite.h
|
||||
@@ -616,22 +616,22 @@ namespace internal {
|
||||
template <bool alias>
|
||||
bool MergeFromImpl(absl::string_view input, MessageLite* msg,
|
||||
MessageLite::ParseFlags parse_flags);
|
||||
-extern template bool MergeFromImpl<false>(absl::string_view input,
|
||||
- MessageLite* msg,
|
||||
- MessageLite::ParseFlags parse_flags);
|
||||
-extern template bool MergeFromImpl<true>(absl::string_view input,
|
||||
- MessageLite* msg,
|
||||
- MessageLite::ParseFlags parse_flags);
|
||||
+extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<false>(
|
||||
+ absl::string_view input, MessageLite* msg,
|
||||
+ MessageLite::ParseFlags parse_flags);
|
||||
+extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<true>(
|
||||
+ absl::string_view input, MessageLite* msg,
|
||||
+ MessageLite::ParseFlags parse_flags);
|
||||
|
||||
template <bool alias>
|
||||
bool MergeFromImpl(io::ZeroCopyInputStream* input, MessageLite* msg,
|
||||
MessageLite::ParseFlags parse_flags);
|
||||
-extern template bool MergeFromImpl<false>(io::ZeroCopyInputStream* input,
|
||||
- MessageLite* msg,
|
||||
- MessageLite::ParseFlags parse_flags);
|
||||
-extern template bool MergeFromImpl<true>(io::ZeroCopyInputStream* input,
|
||||
- MessageLite* msg,
|
||||
- MessageLite::ParseFlags parse_flags);
|
||||
+extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<false>(
|
||||
+ io::ZeroCopyInputStream* input, MessageLite* msg,
|
||||
+ MessageLite::ParseFlags parse_flags);
|
||||
+extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<true>(
|
||||
+ io::ZeroCopyInputStream* input, MessageLite* msg,
|
||||
+ MessageLite::ParseFlags parse_flags);
|
||||
|
||||
struct BoundedZCIS {
|
||||
io::ZeroCopyInputStream* zcis;
|
||||
@@ -641,10 +641,10 @@ struct BoundedZCIS {
|
||||
template <bool alias>
|
||||
bool MergeFromImpl(BoundedZCIS input, MessageLite* msg,
|
||||
MessageLite::ParseFlags parse_flags);
|
||||
-extern template bool MergeFromImpl<false>(BoundedZCIS input, MessageLite* msg,
|
||||
- MessageLite::ParseFlags parse_flags);
|
||||
-extern template bool MergeFromImpl<true>(BoundedZCIS input, MessageLite* msg,
|
||||
- MessageLite::ParseFlags parse_flags);
|
||||
+extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<false>(
|
||||
+ BoundedZCIS input, MessageLite* msg, MessageLite::ParseFlags parse_flags);
|
||||
+extern template PROTOBUF_EXPORT_TEMPLATE_DECLARE bool MergeFromImpl<true>(
|
||||
+ BoundedZCIS input, MessageLite* msg, MessageLite::ParseFlags parse_flags);
|
||||
|
||||
template <typename T>
|
||||
struct SourceWrapper;
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
https://github.com/protocolbuffers/protobuf/issues/8460
|
||||
--- a/src/google/protobuf/any_test.cc
|
||||
+++ b/src/google/protobuf/any_test.cc
|
||||
@@ -40,9 +40,8 @@ TEST(AnyTest, TestPackAndUnpack) {
|
||||
}
|
||||
|
||||
TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {
|
||||
-#if defined(_MSC_VER) && defined(_M_IX86)
|
||||
- GTEST_SKIP() << "This toolchain can't allocate that much memory.";
|
||||
-#endif
|
||||
+ // Filter out this test on 32-bit architectures.
|
||||
+ if(sizeof(void*) < 8) return;
|
||||
protobuf_unittest::TestAny submessage;
|
||||
submessage.mutable_text()->resize(INT_MAX, 'a');
|
||||
protobuf_unittest::TestAny message;
|
||||
|
||||
https://github.com/protocolbuffers/protobuf/issues/8459
|
||||
--- a/src/google/protobuf/arena_unittest.cc
|
||||
+++ b/src/google/protobuf/arena_unittest.cc
|
||||
@@ -1373,6 +1373,8 @@ TEST(ArenaTest, MessageLiteOnArena) {
|
||||
uint64_t Align8(uint64_t n) { return (n + 7) & -8; }
|
||||
|
||||
TEST(ArenaTest, SpaceAllocated_and_Used) {
|
||||
+ // Filter out this test on 32-bit architectures.
|
||||
+ if(sizeof(void*) < 8) return;
|
||||
Arena arena_1;
|
||||
EXPECT_EQ(0, arena_1.SpaceAllocated());
|
||||
EXPECT_EQ(0, arena_1.SpaceUsed());
|
||||
@@ -1453,6 +1455,8 @@ TEST(ArenaTest, Alignment) {
|
||||
}
|
||||
|
||||
TEST(ArenaTest, BlockSizeSmallerThanAllocation) {
|
||||
+ // Filter out this test on 32-bit architectures.
|
||||
+ if(sizeof(void*) < 8) return;
|
||||
for (size_t i = 0; i <= 8; ++i) {
|
||||
ArenaOptions opt;
|
||||
opt.start_block_size = opt.max_block_size = i;
|
||||
@ -1,14 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person" proxied="yes">
|
||||
<email>arfrever.fta@gmail.com</email>
|
||||
<name>Arfrever Frehtes Taifersar Arahesis</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>cjk@gentoo.org</email>
|
||||
<name>Cjk</name>
|
||||
</maintainer>
|
||||
<!-- maintainer-needed -->
|
||||
<slots>
|
||||
<subslots>Soname version number</subslots>
|
||||
</slots>
|
||||
|
||||
@ -12,7 +12,7 @@ if [[ "${PV}" == *9999 ]]; then
|
||||
EGIT_SUBMODULES=()
|
||||
else
|
||||
SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~mips ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
|
||||
@ -25,11 +25,13 @@ RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="emacs? ( app-editors/emacs:* )"
|
||||
DEPEND="
|
||||
<dev-cpp/abseil-cpp-20240116.2:=[${MULTILIB_USEDEP}]
|
||||
>=dev-cpp/abseil-cpp-20230125:=[${MULTILIB_USEDEP}]
|
||||
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
|
||||
test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
RDEPEND="
|
||||
<dev-cpp/abseil-cpp-20240116.2:=[${MULTILIB_USEDEP}]
|
||||
>=dev-cpp/abseil-cpp-20230125:=[${MULTILIB_USEDEP}]
|
||||
emacs? ( app-editors/emacs:* )
|
||||
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
|
||||
@ -81,6 +83,11 @@ src_compile() {
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x srcdir="${S}"/src
|
||||
cmake-multilib_src_test
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
find "${ED}" -name "*.la" -delete || die
|
||||
|
||||
116
sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-23.3-r4.ebuild
vendored
Normal file
116
sdk_container/src/third_party/portage-stable/dev-libs/protobuf/protobuf-23.3-r4.ebuild
vendored
Normal file
@ -0,0 +1,116 @@
|
||||
# Copyright 2008-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake-multilib elisp-common toolchain-funcs
|
||||
|
||||
if [[ "${PV}" == *9999 ]]; then
|
||||
inherit git-r3
|
||||
|
||||
EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
|
||||
EGIT_SUBMODULES=()
|
||||
else
|
||||
SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
|
||||
HOMEPAGE="https://protobuf.dev/"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/$(ver_cut 1-2).0"
|
||||
IUSE="emacs examples test zlib"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
BDEPEND="emacs? ( app-editors/emacs:* )"
|
||||
DEPEND="
|
||||
<dev-cpp/abseil-cpp-20240116.2:=[${MULTILIB_USEDEP}]
|
||||
>=dev-cpp/abseil-cpp-20230125.3:=[${MULTILIB_USEDEP}]
|
||||
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
|
||||
test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
RDEPEND="
|
||||
<dev-cpp/abseil-cpp-20240116.2:=[${MULTILIB_USEDEP}]
|
||||
>=dev-cpp/abseil-cpp-20230125.3:=[${MULTILIB_USEDEP}]
|
||||
emacs? ( app-editors/emacs:* )
|
||||
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-23.3-disable-32-bit-tests.patch"
|
||||
"${FILESDIR}/${PN}-23.3-static_assert-failure.patch"
|
||||
"${FILESDIR}/${PN}-23.3-messages_lite-template-instances.patch"
|
||||
)
|
||||
|
||||
DOCS=( CONTRIBUTORS.txt README.md )
|
||||
|
||||
src_configure() {
|
||||
if tc-ld-is-gold; then
|
||||
# https://sourceware.org/bugzilla/show_bug.cgi?id=24527
|
||||
tc-ld-disable-gold
|
||||
fi
|
||||
|
||||
cmake-multilib_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local mycmakeargs=(
|
||||
-Dprotobuf_DISABLE_RTTI=ON
|
||||
-Dprotobuf_BUILD_EXAMPLES=$(usex examples)
|
||||
-Dprotobuf_WITH_ZLIB=$(usex zlib)
|
||||
-Dprotobuf_BUILD_TESTS=$(usex test)
|
||||
-Dprotobuf_ABSL_PROVIDER=package
|
||||
)
|
||||
use test && mycmakeargs+=(-Dprotobuf_USE_EXTERNAL_GTEST=ON)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cmake-multilib_src_compile
|
||||
|
||||
if use emacs; then
|
||||
elisp-compile editors/protobuf-mode.el
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x srcdir="${S}"/src
|
||||
cmake-multilib_src_test
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
find "${ED}" -name "*.la" -delete || die
|
||||
|
||||
if [[ ! -f "${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}" ]]; then
|
||||
eerror "No matching library found with SLOT variable, currently set: ${SLOT}\n" \
|
||||
"Expected value: ${ED}/usr/$(get_libdir)/libprotobuf.so.${SLOT#*/}"
|
||||
die "Please update SLOT variable"
|
||||
fi
|
||||
|
||||
insinto /usr/share/vim/vimfiles/syntax
|
||||
doins editors/proto.vim
|
||||
insinto /usr/share/vim/vimfiles/ftdetect
|
||||
doins "${FILESDIR}/proto.vim"
|
||||
|
||||
if use emacs; then
|
||||
elisp-install ${PN} editors/protobuf-mode.el*
|
||||
elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
|
||||
fi
|
||||
|
||||
if use examples; then
|
||||
DOCS+=(examples)
|
||||
docompress -x /usr/share/doc/${PF}/examples
|
||||
fi
|
||||
|
||||
einstalldocs
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
use emacs && elisp-site-regen
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
# Copyright 2008-2023 Gentoo Authors
|
||||
# Copyright 2008-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
@ -36,7 +36,7 @@ RDEPEND="
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-23.3-disable-32-bit-tests.patch"
|
||||
"${FILESDIR}/${P}-disable-32-bit-tests.patch"
|
||||
"${FILESDIR}/${PN}-23.3-static_assert-failure.patch"
|
||||
)
|
||||
|
||||
@ -72,6 +72,11 @@ src_compile() {
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local -x srcdir="${S}"/src
|
||||
cmake-multilib_src_test
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
find "${ED}" -name "*.la" -delete || die
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user