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: Tue, 15 Sep 2020 18:34:18
Message-Id: 1600194817.6952b6621a3e2091f0cfc9dcfd483121b9c3d354.floppym@gentoo
1 commit: 6952b6621a3e2091f0cfc9dcfd483121b9c3d354
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Mon Sep 14 01:00:00 2020 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 15 18:33:37 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6952b662
7
8 dev-libs/protobuf: Version bump (3.12.4).
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.12.4.ebuild | 128 +++++++++++++++++++++++++++++++
15 2 files changed, 129 insertions(+)
16
17 diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
18 index 4667b310046..16296678879 100644
19 --- a/dev-libs/protobuf/Manifest
20 +++ b/dev-libs/protobuf/Manifest
21 @@ -1,3 +1,4 @@
22 DIST protobuf-3.10.1.tar.gz 4905995 BLAKE2B 1dde3b6260918da8430c2ce69210462f339c492b2a4e53d5d9c1bea3747aead905370507fc4bd703560f6885c0f3f8393a998b875c19744ad94827109ecbb49f SHA512 aba0c4034c0d3b1759904adb6270eee94dd5dc568f433b219e3f1f70c0033993cdfa3bf476ad3f5767c7629edb9fd029c686405abf93731dde808286b336330d
23 DIST protobuf-3.11.4.tar.gz 5140799 BLAKE2B 97b450c0623593efe6a42b66582ff183344b8831689e6a5b4d36096dbd57c33da9569bbf26578536aaf73ecd866ac0588b6cb7d55a6a9b9a6e840d4c57099001 SHA512 777bbb0e9e2375eaebe6b8c87abd660bac70ee469c9ad00dd25917b82d7fb5bbe33cf87f0d69c90e19d55c07a7285ec20974ba4768623ce9ccfadf147fd5e261
24 DIST protobuf-3.12.2.tar.gz 5309688 BLAKE2B 6f04ab75a165d8135b4c1de210f8698f56f309f73d664192209de10580e0ef850bf56f6f394b860f21912e341141f7bbb1f63198eaee55fd7ad74d86b00c3b1f SHA512 84a349a1dcb5bce6a6a892cf11264390b557ed1e7b05883b71fa9cfb7460d9f73119da1f2861066869e33c752246ea438d5ce2c2b3ff7a4b07696d9450b7916b
25 +DIST protobuf-3.12.4.tar.gz 5310348 BLAKE2B 2630941672963165467221843c10079a0ed966f2fdfcbc970b0b41e1ed3c7f78734496c1fbd3ec509c68999a14f637fff267b309cf82a8acf2bb5a948484f79b SHA512 c5d24502b9a6be0a606a19213186fe462e0de6830547003636f0897781f36d0bd7e4e7d9689d96390a0399ce04b6438cda3a0fe6f97f0feb700a110e90beef0c
26
27 diff --git a/dev-libs/protobuf/protobuf-3.12.4.ebuild b/dev-libs/protobuf/protobuf-3.12.4.ebuild
28 new file mode 100644
29 index 00000000000..857a68bcdef
30 --- /dev/null
31 +++ b/dev-libs/protobuf/protobuf-3.12.4.ebuild
32 @@ -0,0 +1,128 @@
33 +# Copyright 2008-2020 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/23"
57 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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.12.0-disable_no-warning-test.patch"
69 + "${FILESDIR}/${PN}-3.12.0-system_libraries.patch"
70 + "${FILESDIR}/${PN}-3.12.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 + eautoreconf
82 +}
83 +
84 +src_configure() {
85 + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
86 +
87 + if tc-ld-is-gold; then
88 + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527
89 + tc-ld-disable-gold
90 + fi
91 +
92 + multilib-minimal_src_configure
93 +}
94 +
95 +multilib_src_configure() {
96 + local options=(
97 + $(use_enable static-libs static)
98 + $(use_with zlib)
99 + )
100 +
101 + if tc-is-cross-compiler; then
102 + # Build system uses protoc when building, so protoc copy runnable on host is needed.
103 + mkdir -p "${WORKDIR}/build" || die
104 + pushd "${WORKDIR}/build" > /dev/null || die
105 + ECONF_SOURCE="${S}" econf_build "${options[@]}"
106 + options+=(--with-protoc="$(pwd)/src/protoc")
107 + popd > /dev/null || die
108 + fi
109 +
110 + ECONF_SOURCE="${S}" econf "${options[@]}"
111 +}
112 +
113 +src_compile() {
114 + multilib-minimal_src_compile
115 +
116 + if use emacs; then
117 + elisp-compile editors/protobuf-mode.el
118 + fi
119 +}
120 +
121 +multilib_src_compile() {
122 + if tc-is-cross-compiler; then
123 + emake -C "${WORKDIR}/build/src" protoc
124 + fi
125 +
126 + default
127 +}
128 +
129 +multilib_src_test() {
130 + emake check
131 +}
132 +
133 +multilib_src_install_all() {
134 + find "${ED}" -name "*.la" -delete || die
135 +
136 + insinto /usr/share/vim/vimfiles/syntax
137 + doins editors/proto.vim
138 + insinto /usr/share/vim/vimfiles/ftdetect
139 + doins "${FILESDIR}/proto.vim"
140 +
141 + if use emacs; then
142 + elisp-install ${PN} editors/protobuf-mode.el*
143 + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
144 + fi
145 +
146 + if use examples; then
147 + DOCS+=(examples)
148 + docompress -x /usr/share/doc/${PF}/examples
149 + fi
150 +
151 + einstalldocs
152 +}
153 +
154 +pkg_postinst() {
155 + use emacs && elisp-site-regen
156 +}
157 +
158 +pkg_postrm() {
159 + use emacs && elisp-site-regen
160 +}