diff options
author | Miezhiko <Miezhiko@gmail.com> | 2021-11-09 12:48:38 +0400 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2021-11-09 13:51:46 +0200 |
commit | a1e09cacb352f70f424255cb46fd502018274ccf (patch) | |
tree | 44cfd53c7f32a8f698e37f4583a6b8bb3efe19e5 /dev-libs/protobuf | |
parent | app-emulation/lxd: add fix for >btrfs-progs-5.14 safety check (diff) | |
download | gentoo-a1e09cacb352f70f424255cb46fd502018274ccf.tar.gz gentoo-a1e09cacb352f70f424255cb46fd502018274ccf.tar.bz2 gentoo-a1e09cacb352f70f424255cb46fd502018274ccf.zip |
dev-libs/protobuf: add new version 3.19.1
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Contributed-by: Miezhiko <Miezhiko@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/22865
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-libs/protobuf')
-rw-r--r-- | dev-libs/protobuf/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/protobuf/protobuf-3.19.1.ebuild | 137 |
2 files changed, 138 insertions, 0 deletions
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest index 87ea4747892e..e4219af26c33 100644 --- a/dev-libs/protobuf/Manifest +++ b/dev-libs/protobuf/Manifest @@ -4,3 +4,4 @@ DIST protobuf-3.17.0.tar.gz 5185780 BLAKE2B a168619df72cdf097c7ddfd50aca96a2101b DIST protobuf-3.17.1.tar.gz 5192666 BLAKE2B 7f912db7e0835aaa42628fcf564a5666e2cbfa021bb35638a5eec53c3c457f1e747225dea54f732b7239a1520febca9bc20c824b1938f100796caa3ac2133bc1 SHA512 5a18aa3c1dab040dc6d22310a8503241081106acf7ca89079d7b416533d7c2cdd47719dc9023e6bc26969f0f1c796550260a04034a403c69752f6a3a7a651bb8 DIST protobuf-3.17.2.tar.gz 5192779 BLAKE2B 97f9561848e70b8d26ebcc7fc4fa8da51c4b8267efbe1d2d386c2785308e7ba7edc05f1b3863c274dc8838866d58b58509606d72c51a22b956d1d528584c4c95 SHA512 b3e7ad50ed772668df70a3a20ad1af13a5e82f23b109e4fecd34e6a74947bed300963c9f084907fbfafe28fc18365cde7df1975e2ff9538d2f5a3d2b458bca98 DIST protobuf-3.17.3.tar.gz 5235236 BLAKE2B 2495e678c8f9436d4e5a30ccee8b6226125d418ac7ecf7df20b078a1a16c221cbccab7d846dcd56a90220c106617fa75c410a21b62612fedec378cd7e8571350 SHA512 b4030b4474cc5fb5a62501200725dd488e6e66e3ced4ed12ab4ee029fcfed305e92ec966adafbdd343afffd186908163849422b95eaa500e7e741ac325d01d12 +DIST protobuf-3.19.1.tar.gz 5291573 BLAKE2B a34f1a7cf99ecb6cb8a26bc858de6273bfd26aa9be1e89e48c16cb5df0f1e9576479344c8250017238dbac0d0c4ac33001125b5fc622cb64ed6b91023198b03a SHA512 f1271f5159a7be363a5f60ce4921dfea68a8468d66808330bacaeaa1cb7f652d045ab080b5d82816a6fd4e6d7d7fe79aaa6c8d66d81692721d36ce3bbf619f31 diff --git a/dev-libs/protobuf/protobuf-3.19.1.ebuild b/dev-libs/protobuf/protobuf-3.19.1.ebuild new file mode 100644 index 000000000000..40c652ccb9b2 --- /dev/null +++ b/dev-libs/protobuf/protobuf-3.19.1.ebuild @@ -0,0 +1,137 @@ +# Copyright 2008-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf" + EGIT_SUBMODULES=() +else + SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data" +HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf" + +LICENSE="BSD" +SLOT="0/30" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="emacs examples static-libs test zlib" +RESTRICT="!test? ( test )" + +BDEPEND="emacs? ( app-editors/emacs:* )" +DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" +RDEPEND="emacs? ( app-editors/emacs:* ) + zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )" + +PATCHES=( + "${FILESDIR}/${PN}-3.17.0-disable_no-warning-test.patch" + "${FILESDIR}/${PN}-3.17.0-system_libraries.patch" + "${FILESDIR}/${PN}-3.16.0-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 + + 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 +} + +multilib_src_configure() { + local options=( + $(use_enable static-libs static) + $(use_with zlib) + ) + + if tc-is-cross-compiler; then + # Build system uses protoc when building, so protoc copy runnable on host is needed. + mkdir -p "${WORKDIR}/build" || die + pushd "${WORKDIR}/build" > /dev/null || die + ECONF_SOURCE="${S}" econf_build "${options[@]}" + options+=(--with-protoc="$(pwd)/src/protoc") + popd > /dev/null || die + fi + + ECONF_SOURCE="${S}" econf "${options[@]}" +} + +src_compile() { + multilib-minimal_src_compile + + if use emacs; then + elisp-compile editors/protobuf-mode.el + fi +} + +multilib_src_compile() { + if tc-is-cross-compiler; then + emake -C "${WORKDIR}/build/src" protoc + fi + + default +} + +multilib_src_test() { + emake check +} + +multilib_src_install_all() { + find "${ED}" -name "*.la" -delete || die + + 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 +} |