Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/
Date: Wed, 09 Jun 2021 20:10:59
Message-Id: 1623269403.9ad0fbb3dc44c73e14f5f812d0b2e80cc83bc7f9.floppym@gentoo
1 commit: 9ad0fbb3dc44c73e14f5f812d0b2e80cc83bc7f9
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Wed Jun 9 00:00:00 2021 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 9 20:10:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ad0fbb3
7
8 dev-libs/protobuf: Version bump (3.17.3).
9
10 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
11 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
12
13 dev-libs/protobuf/Manifest | 1 +
14 dev-libs/protobuf/protobuf-3.17.3.ebuild | 140 +++++++++++++++++++++++++++++++
15 2 files changed, 141 insertions(+)
16
17 diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
18 index e170628b338..87ea4747892 100644
19 --- a/dev-libs/protobuf/Manifest
20 +++ b/dev-libs/protobuf/Manifest
21 @@ -3,3 +3,4 @@ DIST protobuf-3.16.0.tar.gz 5299781 BLAKE2B 9ace02a6038c31b7393671fb2ccd6a4866a3
22 DIST protobuf-3.17.0.tar.gz 5185780 BLAKE2B a168619df72cdf097c7ddfd50aca96a2101bf73e7c1c842c020e6ee08a853db8674a86ca999b7706da3dd21d4d3d2159241c93232efc693701962f3a54a382e9 SHA512 36ed2de641849ce01531ff1207f62a0748f811519c40622a119a17a1e709864382de81481fb58f374a025948971c48416e7e6de9c00512a78633c7a8a3aa3a36
23 DIST protobuf-3.17.1.tar.gz 5192666 BLAKE2B 7f912db7e0835aaa42628fcf564a5666e2cbfa021bb35638a5eec53c3c457f1e747225dea54f732b7239a1520febca9bc20c824b1938f100796caa3ac2133bc1 SHA512 5a18aa3c1dab040dc6d22310a8503241081106acf7ca89079d7b416533d7c2cdd47719dc9023e6bc26969f0f1c796550260a04034a403c69752f6a3a7a651bb8
24 DIST protobuf-3.17.2.tar.gz 5192779 BLAKE2B 97f9561848e70b8d26ebcc7fc4fa8da51c4b8267efbe1d2d386c2785308e7ba7edc05f1b3863c274dc8838866d58b58509606d72c51a22b956d1d528584c4c95 SHA512 b3e7ad50ed772668df70a3a20ad1af13a5e82f23b109e4fecd34e6a74947bed300963c9f084907fbfafe28fc18365cde7df1975e2ff9538d2f5a3d2b458bca98
25 +DIST protobuf-3.17.3.tar.gz 5235236 BLAKE2B 2495e678c8f9436d4e5a30ccee8b6226125d418ac7ecf7df20b078a1a16c221cbccab7d846dcd56a90220c106617fa75c410a21b62612fedec378cd7e8571350 SHA512 b4030b4474cc5fb5a62501200725dd488e6e66e3ced4ed12ab4ee029fcfed305e92ec966adafbdd343afffd186908163849422b95eaa500e7e741ac325d01d12
26
27 diff --git a/dev-libs/protobuf/protobuf-3.17.3.ebuild b/dev-libs/protobuf/protobuf-3.17.3.ebuild
28 new file mode 100644
29 index 00000000000..6391fd499f3
30 --- /dev/null
31 +++ b/dev-libs/protobuf/protobuf-3.17.3.ebuild
32 @@ -0,0 +1,140 @@
33 +# Copyright 2008-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="7"
37 +
38 +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
39 +
40 +if [[ "${PV}" == "9999" ]]; then
41 + inherit git-r3
42 +
43 + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
44 + EGIT_SUBMODULES=()
45 +fi
46 +
47 +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
48 +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
49 +if [[ "${PV}" == "9999" ]]; then
50 + SRC_URI=""
51 +else
52 + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
53 +fi
54 +
55 +LICENSE="BSD"
56 +SLOT="0/28"
57 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
58 +IUSE="emacs examples static-libs test zlib"
59 +RESTRICT="!test? ( test )"
60 +
61 +BDEPEND="emacs? ( app-editors/emacs:* )"
62 +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
63 + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
64 +RDEPEND="emacs? ( app-editors/emacs:* )
65 + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
66 +
67 +PATCHES=(
68 + "${FILESDIR}/${PN}-3.17.0-disable_no-warning-test.patch"
69 + "${FILESDIR}/${PN}-3.17.0-system_libraries.patch"
70 + "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch"
71 +)
72 +
73 +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
74 +
75 +src_prepare() {
76 + default
77 +
78 + # https://github.com/protocolbuffers/protobuf/issues/7413
79 + sed -e "/^AC_PROG_CXX_FOR_BUILD$/d" -i configure.ac || die
80 +
81 + # https://github.com/protocolbuffers/protobuf/issues/8082
82 + sed -e "/^TEST_F(IoTest, LargeOutput) {$/,/^}$/d" -i src/google/protobuf/io/zero_copy_stream_unittest.cc || die
83 +
84 + # https://github.com/protocolbuffers/protobuf/issues/8459
85 + sed \
86 + -e "/^TEST(ArenaTest, BlockSizeSmallerThanAllocation) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \
87 + -e "/^TEST(ArenaTest, SpaceAllocated_and_Used) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" \
88 + -i src/google/protobuf/arena_unittest.cc || die
89 +
90 + # https://github.com/protocolbuffers/protobuf/issues/8460
91 + sed -e "/^TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {$/a\\ if (sizeof(void*) == 4) {\n GTEST_SKIP();\n }" -i src/google/protobuf/any_test.cc || die
92 +
93 + eautoreconf
94 +}
95 +
96 +src_configure() {
97 + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
98 +
99 + if tc-ld-is-gold; then
100 + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527
101 + tc-ld-disable-gold
102 + fi
103 +
104 + multilib-minimal_src_configure
105 +}
106 +
107 +multilib_src_configure() {
108 + local options=(
109 + $(use_enable static-libs static)
110 + $(use_with zlib)
111 + )
112 +
113 + if tc-is-cross-compiler; then
114 + # Build system uses protoc when building, so protoc copy runnable on host is needed.
115 + mkdir -p "${WORKDIR}/build" || die
116 + pushd "${WORKDIR}/build" > /dev/null || die
117 + ECONF_SOURCE="${S}" econf_build "${options[@]}"
118 + options+=(--with-protoc="$(pwd)/src/protoc")
119 + popd > /dev/null || die
120 + fi
121 +
122 + ECONF_SOURCE="${S}" econf "${options[@]}"
123 +}
124 +
125 +src_compile() {
126 + multilib-minimal_src_compile
127 +
128 + if use emacs; then
129 + elisp-compile editors/protobuf-mode.el
130 + fi
131 +}
132 +
133 +multilib_src_compile() {
134 + if tc-is-cross-compiler; then
135 + emake -C "${WORKDIR}/build/src" protoc
136 + fi
137 +
138 + default
139 +}
140 +
141 +multilib_src_test() {
142 + emake check
143 +}
144 +
145 +multilib_src_install_all() {
146 + find "${ED}" -name "*.la" -delete || die
147 +
148 + insinto /usr/share/vim/vimfiles/syntax
149 + doins editors/proto.vim
150 + insinto /usr/share/vim/vimfiles/ftdetect
151 + doins "${FILESDIR}/proto.vim"
152 +
153 + if use emacs; then
154 + elisp-install ${PN} editors/protobuf-mode.el*
155 + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
156 + fi
157 +
158 + if use examples; then
159 + DOCS+=(examples)
160 + docompress -x /usr/share/doc/${PF}/examples
161 + fi
162 +
163 + einstalldocs
164 +}
165 +
166 +pkg_postinst() {
167 + use emacs && elisp-site-regen
168 +}
169 +
170 +pkg_postrm() {
171 + use emacs && elisp-site-regen
172 +}