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: Fri, 16 Aug 2019 17:03:11
Message-Id: 1565974947.0e4998444d5eef619ebe1098ff65fbe51cfefe06.floppym@gentoo
1 commit: 0e4998444d5eef619ebe1098ff65fbe51cfefe06
2 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
3 AuthorDate: Thu Aug 15 18:43:21 2019 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 16 17:02:27 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e499844
7
8 dev-libs/protobuf: Version bump (3.9.1).
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.9.1.ebuild | 124 ++++++++++++++++++++++++++++++++
15 2 files changed, 125 insertions(+)
16
17 diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
18 index 58f115f98dd..c6707e70889 100644
19 --- a/dev-libs/protobuf/Manifest
20 +++ b/dev-libs/protobuf/Manifest
21 @@ -1,3 +1,4 @@
22 DIST protobuf-3.6.1.3.tar.gz 4490599 BLAKE2B 5a058f937330bd562e364a8d86e0b1376fdac9fded0fd23d6914cb59c5c15e8bfc1e203ea36b5a4eece8919708c1a9a6616b0ec2028d6ec339704da53ed81963 SHA512 9eadb46c7daa19e612516958169bc90943b38b429a4b2cf2171b66b57f50a2f8a9b66cbf58bdd44517af414b78e0f3ab2e1361891dc60ecd098185da2638d37e
23 DIST protobuf-3.7.1.tar.gz 4795774 BLAKE2B a91155169623ee24ba49e397b151829321c01ff06bb27541e6c02701c37ac96ea9606961291ef0d4616dd6dba045bf7e893ec6288f5809d30cc026b60ae76590 SHA512 7d4cfabd4bd55926336a3baafa0bc1f1f15380b1b2af945f70a2bb3ba24c6ac6567f49c492326d6d1c43a488166bff178f9266377758a05d8541d8b242f4f80f
24 DIST protobuf-3.8.0.tar.gz 4934577 BLAKE2B 4b86ab216e8a8b2c99c3620da9417c0562498e9d4dbf4957db186f51c62b0ed73b1322635a076b2d4054e015bdf6c8c50cc7fd0cb78d24a93b29d2a5b48f66fe SHA512 ba27c64e5193cd4a144bf0c9dc0d195fbbe6e580aaca01960362f0f185074588ca40046d3bcea76e1deae7508b722f6c5be484ea957122ae8e98229c7c3a4ad2
25 +DIST protobuf-3.9.1.tar.gz 4947402 BLAKE2B c1e366438ca619044d84d7a75453c35b48d5f64867b7aaec78c04966d4e62223a8909a28be850156ce3d47f0e7f42e80a231ec5d814d2820e1edfa963d89e177 SHA512 9accb56c1aadef83bf27280e15a99809a3561cbd4b39d6605dec730cc112bf4fd2e9f1ac39127b32a1b87253e712be4b4f12afe4061a8f7be76266b3f4bca314
26
27 diff --git a/dev-libs/protobuf/protobuf-3.9.1.ebuild b/dev-libs/protobuf/protobuf-3.9.1.ebuild
28 new file mode 100644
29 index 00000000000..39e484b64e6
30 --- /dev/null
31 +++ b/dev-libs/protobuf/protobuf-3.9.1.ebuild
32 @@ -0,0 +1,124 @@
33 +# Copyright 2008-2019 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/20"
57 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~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? ( virtual/emacs )"
62 +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
63 + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
64 +RDEPEND="emacs? ( virtual/emacs )
65 + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
66 +
67 +PATCHES=(
68 + "${FILESDIR}/${PN}-3.8.0-disable_no-warning-test.patch"
69 + "${FILESDIR}/${PN}-3.8.0-system_libraries.patch"
70 + "${FILESDIR}/${PN}-3.8.0-protoc_input_output_files.patch"
71 +)
72 +
73 +DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
74 +
75 +src_prepare() {
76 + default
77 + eautoreconf
78 +}
79 +
80 +src_configure() {
81 + append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
82 +
83 + if tc-ld-is-gold; then
84 + # https://sourceware.org/bugzilla/show_bug.cgi?id=24527
85 + tc-ld-disable-gold
86 + fi
87 +
88 + multilib-minimal_src_configure
89 +}
90 +
91 +multilib_src_configure() {
92 + local options=(
93 + $(use_enable static-libs static)
94 + $(use_with zlib)
95 + )
96 +
97 + if tc-is-cross-compiler; then
98 + # Build system uses protoc when building, so protoc copy runnable on host is needed.
99 + mkdir -p "${WORKDIR}/build" || die
100 + pushd "${WORKDIR}/build" > /dev/null || die
101 + ECONF_SOURCE="${S}" econf_build "${options[@]}"
102 + options+=(--with-protoc="$(pwd)/src/protoc")
103 + popd > /dev/null || die
104 + fi
105 +
106 + ECONF_SOURCE="${S}" econf "${options[@]}"
107 +}
108 +
109 +src_compile() {
110 + multilib-minimal_src_compile
111 +
112 + if use emacs; then
113 + elisp-compile editors/protobuf-mode.el
114 + fi
115 +}
116 +
117 +multilib_src_compile() {
118 + if tc-is-cross-compiler; then
119 + emake -C "${WORKDIR}/build/src" protoc
120 + fi
121 +
122 + default
123 +}
124 +
125 +multilib_src_test() {
126 + emake check
127 +}
128 +
129 +multilib_src_install_all() {
130 + find "${D}" -name "*.la" -type f -delete || die
131 +
132 + insinto /usr/share/vim/vimfiles/syntax
133 + doins editors/proto.vim
134 + insinto /usr/share/vim/vimfiles/ftdetect
135 + doins "${FILESDIR}/proto.vim"
136 +
137 + if use emacs; then
138 + elisp-install ${PN} editors/protobuf-mode.el*
139 + elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
140 + fi
141 +
142 + if use examples; then
143 + DOCS+=(examples)
144 + docompress -x /usr/share/doc/${PF}/examples
145 + fi
146 +
147 + einstalldocs
148 +}
149 +
150 +pkg_postinst() {
151 + use emacs && elisp-site-regen
152 +}
153 +
154 +pkg_postrm() {
155 + use emacs && elisp-site-regen
156 +}