* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2016-04-21 9:52 Ian Delaney
0 siblings, 0 replies; 22+ messages in thread
From: Ian Delaney @ 2016-04-21 9:52 UTC (permalink / raw
To: gentoo-commits
commit: 88c7324a377aa965facacc0b8a2704d59bf76cf4
Author: Marshall Brewer (Gentoo Key) <tomboy64 <AT> sina <DOT> cn>
AuthorDate: Wed Apr 13 18:21:39 2016 +0000
Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 09:51:59 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88c7324a
dev-libs/protobuf: version bump, 3.0.0_beta2
- bump to EAPI6
- outsourced official implementations in java and python
Package-Manager: portage-2.2.28
RepoMan-Options: --ignore-arches
Closes: https://github.com/gentoo/gentoo/pull/1295
Signed-off-by: Ian Delaney <idella4 <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 +
.../protobuf-3.0.0_beta2-disable-local-gmock.patch | 89 ++++++++++++++++++
dev-libs/protobuf/metadata.xml | 10 +++
dev-libs/protobuf/protobuf-3.0.0_beta2.ebuild | 100 +++++++++++++++++++++
4 files changed, 200 insertions(+)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 5cda08f..058a0c2 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,3 +1,4 @@
DIST protobuf-2.4.1.tar.bz2 1440188 SHA256 cf8452347330834bbf9c65c2e68b5562ba10c95fa40d4f7ec0d2cb332674b0bf SHA512 52b0208c685e44126cb3915a74bde692ef91430f0407144b6c30b72a9f143b1ee4f1eea47a550184c689a1758b92582e7f26f0683c2d387205b957a69830f2f3 WHIRLPOOL e5462ff35f63413aff58640c24b9b561ac55749c489803ae009de21bf5d954a77516714361353ef02cfeb3c2d762620c89dc08a5fdee571e3a33b6f5c20edf6e
DIST protobuf-2.5.0.tar.bz2 1866763 SHA256 13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 SHA512 5994b3669808b82fef5c860ecad36358c0767f84acac877e7bfcf722e59d972835a955714149bdd4158fbd1328a51d01397a563991d26475351ee72be48142ee WHIRLPOOL 7e6786e1f20bf253d0e386a95c2bbfe1b443f484d492f97552cadcea62c24461436aa88130e3ff20b4dc9f352c101458cb8c03686f1cc4e6e2133b6e78f5b70d
DIST protobuf-2.6.1.tar.bz2 2021416 SHA256 ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910 SHA512 8b092b87fcd79223db199cd3d330f3d43689b47f345aa4e34028dcf1680d609a5d5a89ab08588e817b566d3b265834c38f1db580bc1c144b512ce74d35f2a174 WHIRLPOOL b8d7f5e6b85670520435fd1107eb67035c822c2dad9689dadc29754de3bf8076ac256cf3fe3e719e99c0ccb03ed78edecb91afbe96b611073b60ae3fb3f29b1a
+DIST protobuf-3.0.0_beta2.tar.gz 3333054 SHA256 be224d07ce87f12e362cff3df02851107bf92a4e4604349b1d7a4b1f0c3bfd86 SHA512 3a9329603226dabeaae7c28eb7463fb4403383e7774d53742e9e38a0426f5ef370803c68e4d4bc0d37585618fb340befe4f812731db0984b12032c3d931cdca7 WHIRLPOOL 0e77105c24d71c0269f4375ebfaef38175d762e1a90cdd81f594c13bbece9f390ada9291f722e8e0227952a1f5cd94976037f069b86703c7a3a37a9277cb66f8
diff --git a/dev-libs/protobuf/files/protobuf-3.0.0_beta2-disable-local-gmock.patch b/dev-libs/protobuf/files/protobuf-3.0.0_beta2-disable-local-gmock.patch
new file mode 100644
index 0000000..341d112
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.0.0_beta2-disable-local-gmock.patch
@@ -0,0 +1,89 @@
+diff -Naur a/configure.ac b/configure.ac
+--- a/configure.ac 2015-12-30 22:21:46.000000000 +0100
++++ b/configure.ac 2016-04-16 17:46:54.858904639 +0200
+@@ -176,9 +176,9 @@
+ # HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
+ # since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
+ # too.
+-export CFLAGS
+-export CXXFLAGS
+-AC_CONFIG_SUBDIRS([gmock])
++#export CFLAGS
++#export CXXFLAGS
++#AC_CONFIG_SUBDIRS([gmock])
+
+ AC_CONFIG_FILES([Makefile src/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+diff -Naur a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2015-12-30 22:21:46.000000000 +0100
++++ b/Makefile.am 2016-04-16 17:46:25.355751203 +0200
+@@ -17,9 +17,10 @@
+ # want "make install" to recurse into gmock since we don't want to overwrite
+ # the installed version of gmock if there is one.
+ check-local:
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
+- @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+- @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
++ @echo "Making of gmock disabled"
++# @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
++# @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
++# @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+
+ # We would like to clean gmock when "make clean" is invoked. But we have to
+ # be careful because clean-local is also invoked during "make distclean", but
+diff -Naur a/src/Makefile.am b/src/Makefile.am
+--- a/src/Makefile.am 2015-12-30 22:21:46.000000000 +0100
++++ b/src/Makefile.am 2016-04-16 17:47:07.026967535 +0200
+@@ -669,11 +669,8 @@
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include \
+- -I$(srcdir)/../gmock/include
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_test_CPPFLAGS = -I/usr/include
+ # Disable optimization for tests unless the user explicitly asked for it,
+ # since test_util.cc takes forever to compile with optimization (with GCC).
+ # See configure.ac for more info.
+@@ -753,11 +750,8 @@
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+ libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include \
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_lazy_descriptor_test_CPPFLAGS = -I/usr/include \
+ -DPROTOBUF_TEST_NO_DESCRIPTORS
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lazy_descriptor_test_SOURCES = \
+@@ -788,11 +782,8 @@
+ # gtest when building the test internally our memory sanitizer doesn't detect
+ # memory leaks (don't know why).
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lite_arena_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_lite_arena_test_CPPFLAGS = -I/usr/include
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_arena_test_SOURCES = \
+ google/protobuf/lite_arena_unittest.cc \
+@@ -801,8 +792,8 @@
+
+ # Test plugin binary.
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgtest
++test_plugin_CPPFLAGS = -I/usr/include
+ test_plugin_SOURCES = \
+ google/protobuf/compiler/mock_code_generator.cc \
+ google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/metadata.xml b/dev-libs/protobuf/metadata.xml
index 5f0a96f..ca1ce7e 100644
--- a/dev-libs/protobuf/metadata.xml
+++ b/dev-libs/protobuf/metadata.xml
@@ -4,6 +4,16 @@
<maintainer type='person'>
<email>vapier@gentoo.org</email>
</maintainer>
+<maintainer type='person'>
+ <email>tomboy64@sina.cn</email>
+</maintainer>
+<slots>
+ <subslots>soname major version number</subslots>
+</slots>
+<use>
+ <flag name="java">Builds the Java implementation. This is not needed for Java support in protoc.</flag>
+ <flag name="python">Builds the Python implementation. This is not needed for Python support in protoc.</flag>
+</use>
<upstream>
<remote-id type='github'>google/protobuf</remote-id>
</upstream>
diff --git a/dev-libs/protobuf/protobuf-3.0.0_beta2.ebuild b/dev-libs/protobuf/protobuf-3.0.0_beta2.ebuild
new file mode 100644
index 0000000..17a7d53
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-3.0.0_beta2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_3 python3_4 python3_5 )
+inherit python-r1 autotools flag-o-matic toolchain-funcs elisp-common multilib-minimal
+
+# If you bump this package, also consider bumping the official language bindings!
+# At the current time these are java and python.
+MY_PV=${PV/_beta2/-beta-2}
+
+DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding structured data"
+HOMEPAGE="https://github.com/google/protobuf/ https://developers.google.com/protocol-buffers/"
+SRC_URI="https://github.com/google/protobuf/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/10"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="emacs examples java python static-libs test vim-syntax zlib"
+
+DEPEND="emacs? ( virtual/emacs )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ test? ( dev-cpp/gmock[${MULTILIB_USEDEP}] )"
+# This is provided for backwards compatibility due to (likely incorrect) use in consumers.
+PDEPEND="java? ( dev-java/protobuf-java )
+ python? ( dev-python/protobuf-python[${PYTHON_USEDEP}] )"
+S="${WORKDIR}/${PN}-${MY_PV}"
+PATCHES=( "${FILESDIR}/${PN}-2.5.0-emacs-24.4.patch"
+ "${FILESDIR}/${PN}-2.6.1-protoc-cmdline.patch"
+ "${FILESDIR}/${P}-disable-local-gmock.patch" )
+
+src_prepare() {
+ append-cxxflags -DGOOGLE_PROTOBUF_NO_RTTI
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_with zlib)
+ )
+ if tc-is-cross-compiler; then
+ # The build system wants `protoc` when building, so we need a copy that
+ # runs on the host. This is more hermetic than relying on the version
+ # installed in the host being the exact same version.
+ mkdir -p "${WORKDIR}"/build || die
+ pushd "${WORKDIR}"/build >/dev/null || die
+ ECONF_SOURCE=${S} econf_build "${myeconfargs[@]}"
+ myeconfargs+=( --with-protoc="${PWD}"/src/protoc )
+ popd >/dev/null || die
+ fi
+ ECONF_SOURCE=${S} econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if tc-is-cross-compiler; then
+ emake -C "${WORKDIR}"/build/src protoc
+ fi
+
+ default
+
+ if use emacs; then
+ elisp-compile "${S}"/editors/protobuf-mode.el
+ fi
+}
+
+multilib_src_test() {
+ emake check
+}
+
+src_install() {
+ multilib-minimal_src_install
+
+ if use vim-syntax; then
+ insinto /usr/share/vim/vimfiles/syntax
+ doins editors/proto.vim
+ insinto /usr/share/vim/vimfiles/ftdetect/
+ doins "${FILESDIR}/proto.vim"
+ fi
+
+ 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 )
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2017-05-09 17:18 Michał Górny
0 siblings, 0 replies; 22+ messages in thread
From: Michał Górny @ 2017-05-09 17:18 UTC (permalink / raw
To: gentoo-commits
commit: f5988bfcb1ebdf0bbf6eb598f834aa1758ee981d
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Dec 14 22:48:23 2016 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 9 17:18:33 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5988bfc
dev-libs/protobuf: version bump to 3.3.0
- Fix test phase in protobuf-3.x
- Fix test in protobuf-2.6.1-protoc-cmdline.patch
- Add compatibility patch for musl libc and FreeBSD
- Change license from Apache-2.0 to BSD
- Remove vim-syntax USE flag
Bug: https://bugs.gentoo.org/544420
Bug: https://bugs.gentoo.org/602182
Bug: https://bugs.gentoo.org/611180
dev-libs/protobuf/Manifest | 1 +
.../files/protobuf-2.6.1-protoc-cmdline.patch | 4 +-
.../files/protobuf-3.0.2-disable-local-gmock.patch | 101 ++++++++++++++++++
.../files/protobuf-3.3.0-disable-local-gmock.patch | 115 +++++++++++++++++++++
dev-libs/protobuf/protobuf-2.5.0-r2.ebuild | 2 +-
dev-libs/protobuf/protobuf-2.6.1-r3.ebuild | 2 +-
dev-libs/protobuf/protobuf-3.0.0_beta3_p1.ebuild | 2 +-
dev-libs/protobuf/protobuf-3.0.2.ebuild | 4 +-
dev-libs/protobuf/protobuf-3.1.0.ebuild | 4 +-
...protobuf-3.1.0.ebuild => protobuf-3.3.0.ebuild} | 28 +++--
10 files changed, 239 insertions(+), 24 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 8baf7ec6c51..32cafc294f0 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -3,3 +3,4 @@ DIST protobuf-2.6.1.tar.bz2 2021416 SHA256 ee445612d544d885ae240ffbcbf9267faa9f5
DIST protobuf-3.0.0_beta3_p1.tar.gz 3673779 SHA256 494726c9a6a45a20cd085795a26e4f05627e9b3b1fa5ab21a8b0edc5db8173dc SHA512 bebe655ffa6f8dd9bfbf4d2fcce160de6d45f50fd802b8907833cde3f232b7b44186d06fe9cc01ed5dc7b4a040fd3069e2ec7d2704da596e8d3af80f8dba7e8b WHIRLPOOL d35dca8e402741e4d30c9c787f5927c7fe7f22619ddb3ca20d302c27fbeb929cecd55cc7e6785b28acb76c89893d2baf7fce3f685a3f186006e1e30a2901ae1b
DIST protobuf-3.0.2.tar.gz 3917853 SHA256 b700647e11556b643ccddffd1f41d8cb7704ed02090af54cc517d44d912d11c1 SHA512 28eb8814555b0fe2cd57da6caf46802697a9612fccb3bba3ae7a379352437f81a18c1f6ab7242a22abea59c1ff9b06dcb6e2b52a97aa1a15cea6485ffc3c10c2 WHIRLPOOL 5c70def13be5e61d9405a24fdfc1efe9caee0b63c87f74e12f3d121801ecdc410e142eab80d8d4b49ebfe0c4f3cd13b2d77a17ec303978fec317265991a1f5a8
DIST protobuf-3.1.0.tar.gz 4051503 SHA256 0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7 SHA512 8d3289a16944c255bd1cceab696e515e52467f2bfe1cc10f6b32fabdf082d5acdc248ec9cadc572223a24d04d431f75921076153109cea2f90ee533f502ab47a WHIRLPOOL b8a0bee9ff549c8da45c2b56b12aafbed5807959cdb11b3888a0f30fd0d6df83a72f3c6ef9e266522754b8901792f65235a6e81a8b0f74cee15d59ecbe6dee68
+DIST protobuf-3.3.0.tar.gz 4336596 SHA256 94c414775f275d876e5e0e4a276527d155ab2d0da45eed6b7734301c330be36e SHA512 0734a55ae92f0539dfb507e174539d290fd8e93633c1edd8810e0d51c37e67254337b75fc5ba9450316f6416e1f8f8cfb59415864657b55f2a1696fbcdfe7636 WHIRLPOOL 4c18120ad784234ebb5308c0f3a2f3814d77f2fc906407f48285f3ba8f84af8e15defa4e7edf2d2e77cf22316df338b3f5bc0c6ca11c7a4fb951105c3aa7d7d4
diff --git a/dev-libs/protobuf/files/protobuf-2.6.1-protoc-cmdline.patch b/dev-libs/protobuf/files/protobuf-2.6.1-protoc-cmdline.patch
index 60151e8f6b2..894f2ffd095 100644
--- a/dev-libs/protobuf/files/protobuf-2.6.1-protoc-cmdline.patch
+++ b/dev-libs/protobuf/files/protobuf-2.6.1-protoc-cmdline.patch
@@ -242,10 +242,10 @@ index 2b26f3b..78ff2cf 100644
+ cmd += "google/protobuf/unittest.proto ";
+ cmd += "--encode=protobuf_unittest.TestAllTypes ";
+ cmd += "--protobuf_in=" + TestSourceDir() +
-+ "/google/protobuf/testdata/text_format_unittest_data.txt ";
++ "/google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt ";
+ cmd += "--protobuf_out=" + out_file;
+ EXPECT_TRUE(Run(cmd));
-+ ExpectBinaryFilesMatch(out_file, "google/protobuf/testdata/golden_message");
++ ExpectBinaryFilesMatch(out_file, TestSourceDir() + "/google/protobuf/testdata/golden_message_oneof_implemented");
+}
+
} // anonymous namespace
diff --git a/dev-libs/protobuf/files/protobuf-3.0.2-disable-local-gmock.patch b/dev-libs/protobuf/files/protobuf-3.0.2-disable-local-gmock.patch
new file mode 100644
index 00000000000..a2dda8aafac
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.0.2-disable-local-gmock.patch
@@ -0,0 +1,101 @@
+diff -Naur protobuf-3.0.2.orig/Makefile.am protobuf-3.0.2/Makefile.am
+--- protobuf-3.0.2.orig/Makefile.am 2016-09-06 15:40:51.000000000 -0700
++++ protobuf-3.0.2/Makefile.am 2016-12-14 14:44:50.516520874 -0800
+@@ -17,9 +17,10 @@
+ # want "make install" to recurse into gmock since we don't want to overwrite
+ # the installed version of gmock if there is one.
+ check-local:
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
+- @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+- @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
++ @echo "Making of gmock disabled"
++# @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
++# @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
++# @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+
+ # We would like to clean gmock when "make clean" is invoked. But we have to
+ # be careful because clean-local is also invoked during "make distclean", but
+diff -Naur protobuf-3.0.2.orig/configure.ac protobuf-3.0.2/configure.ac
+--- protobuf-3.0.2.orig/configure.ac 2016-09-06 15:40:51.000000000 -0700
++++ protobuf-3.0.2/configure.ac 2016-12-14 14:44:50.516520874 -0800
+@@ -181,9 +181,9 @@
+ # HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
+ # since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
+ # too.
+-export CFLAGS
+-export CXXFLAGS
+-AC_CONFIG_SUBDIRS([gmock])
++#export CFLAGS
++#export CXXFLAGS
++#AC_CONFIG_SUBDIRS([gmock])
+
+ AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+diff -Naur protobuf-3.0.2.orig/src/Makefile.am protobuf-3.0.2/src/Makefile.am
+--- protobuf-3.0.2.orig/src/Makefile.am 2016-09-06 15:40:51.000000000 -0700
++++ protobuf-3.0.2/src/Makefile.am 2016-12-14 14:44:50.517520885 -0800
+@@ -688,11 +688,8 @@
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+ no-warning-test $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include \
+- -I$(srcdir)/../gmock/include
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_test_CPPFLAGS = -I/usr/include
+ # Disable optimization for tests unless the user explicitly asked for it,
+ # since test_util.cc takes forever to compile with optimization (with GCC).
+ # See configure.ac for more info.
+@@ -775,11 +772,8 @@
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+ libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include \
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_lazy_descriptor_test_CPPFLAGS = -I/usr/include \
+ -DPROTOBUF_TEST_NO_DESCRIPTORS
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lazy_descriptor_test_SOURCES = \
+@@ -810,11 +804,8 @@
+ # gtest when building the test internally our memory sanitizer doesn't detect
+ # memory leaks (don't know why).
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lite_arena_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_lite_arena_test_CPPFLAGS = -I/usr/include
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_arena_test_SOURCES = \
+ google/protobuf/lite_arena_unittest.cc \
+@@ -823,8 +814,8 @@
+
+ # Test plugin binary.
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgtest
++test_plugin_CPPFLAGS = -I/usr/include
+ test_plugin_SOURCES = \
+ google/protobuf/compiler/mock_code_generator.cc \
+ google/protobuf/testing/file.cc \
+@@ -853,9 +844,8 @@
+ echo "TEST(NoWarningTest, Empty) {}" >> no_warning_test.cc
+
+ no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/gtest/lib/libgtest_main.la
+-no_warning_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgtest -lgtest_main
++no_warning_test_CPPFLAGS = -I/usr/include
+ no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \
+ -Wall -Werror
+ nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs)
diff --git a/dev-libs/protobuf/files/protobuf-3.3.0-disable-local-gmock.patch b/dev-libs/protobuf/files/protobuf-3.3.0-disable-local-gmock.patch
new file mode 100644
index 00000000000..25dc7bd074b
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.3.0-disable-local-gmock.patch
@@ -0,0 +1,115 @@
+diff -Naur protobuf-3.3.0.orig/Makefile.am protobuf-3.3.0/Makefile.am
+--- protobuf-3.3.0.orig/Makefile.am 2017-05-01 20:04:35.448840428 -0700
++++ protobuf-3.3.0/Makefile.am 2017-05-01 20:04:48.855978898 -0700
+@@ -17,9 +17,10 @@
+ # want "make install" to recurse into gmock since we don't want to overwrite
+ # the installed version of gmock if there is one.
+ check-local:
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
+- @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+- @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
++ @echo "Making of gmock disabled"
++# @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
++# @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
++# @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+
+ # We would like to clean gmock when "make clean" is invoked. But we have to
+ # be careful because clean-local is also invoked during "make distclean", but
+diff -Naur protobuf-3.3.0.orig/configure.ac protobuf-3.3.0/configure.ac
+--- protobuf-3.3.0.orig/configure.ac 2017-05-01 20:04:35.497840933 -0700
++++ protobuf-3.3.0/configure.ac 2017-05-01 20:04:48.856978908 -0700
+@@ -203,9 +203,9 @@
+ # HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
+ # since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
+ # too.
+-export CFLAGS
+-export CXXFLAGS
+-AC_CONFIG_SUBDIRS([gmock])
++#export CFLAGS
++#export CXXFLAGS
++#AC_CONFIG_SUBDIRS([gmock])
+
+ AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+diff -Naur protobuf-3.3.0.orig/src/Makefile.am protobuf-3.3.0/src/Makefile.am
+--- protobuf-3.3.0.orig/src/Makefile.am 2017-05-01 20:04:35.549841471 -0700
++++ protobuf-3.3.0/src/Makefile.am 2017-05-01 20:06:46.307191948 -0700
+@@ -748,11 +748,8 @@
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+ no-warning-test $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include \
+- -I$(srcdir)/../gmock/include
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_test_CPPFLAGS = -I/usr/include
+ # Disable optimization for tests unless the user explicitly asked for it,
+ # since test_util.cc takes forever to compile with optimization (with GCC).
+ # See configure.ac for more info.
+@@ -837,11 +834,8 @@
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+ libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include \
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_lazy_descriptor_test_CPPFLAGS = -I/usr/include \
+ -DPROTOBUF_TEST_NO_DESCRIPTORS
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lazy_descriptor_test_SOURCES = \
+@@ -862,11 +856,8 @@
+ # full runtime and we want to make sure this test builds without full
+ # runtime.
+ protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lite_test_CPPFLAGS= -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_lite_test_CPPFLAGS = -I/usr/include
+ protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_test_SOURCES = \
+ google/protobuf/lite_unittest.cc \
+@@ -877,11 +868,8 @@
+ # gtest when building the test internally our memory sanitizer doesn't detect
+ # memory leaks (don't know why).
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lite_arena_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgmock -lgmock_main -lgtest
++protobuf_lite_arena_test_CPPFLAGS = -I/usr/include
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_arena_test_SOURCES = \
+ google/protobuf/lite_arena_unittest.cc \
+@@ -890,8 +878,8 @@
+
+ # Test plugin binary.
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgtest
++test_plugin_CPPFLAGS = -I/usr/include
+ test_plugin_SOURCES = \
+ google/protobuf/compiler/mock_code_generator.cc \
+ google/protobuf/testing/file.cc \
+@@ -920,9 +908,8 @@
+ echo "TEST(NoWarningTest, Empty) {}" >> no_warning_test.cc
+
+ no_warning_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/gtest/lib/libgtest_main.la
+-no_warning_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
++ -L/usr/lib -lgtest -lgtest_main
++no_warning_test_CPPFLAGS = -I/usr/include
+ no_warning_test_CXXFLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_DEF) $(ZLIB_DEF) \
+ -Wall -Werror
+ nodist_no_warning_test_SOURCES = no_warning_test.cc $(protoc_outputs)
diff --git a/dev-libs/protobuf/protobuf-2.5.0-r2.ebuild b/dev-libs/protobuf/protobuf-2.5.0-r2.ebuild
index f13799b4c14..5c13a2976ed 100644
--- a/dev-libs/protobuf/protobuf-2.5.0-r2.ebuild
+++ b/dev-libs/protobuf/protobuf-2.5.0-r2.ebuild
@@ -14,7 +14,7 @@ DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding struct
HOMEPAGE="https://code.google.com/p/protobuf/"
SRC_URI="https://protobuf.googlecode.com/files/${P}.tar.bz2"
-LICENSE="Apache-2.0"
+LICENSE="BSD"
SLOT="0/8" # subslot = soname major version
KEYWORDS="amd64 arm -hppa ~ia64 ~mips ppc ~ppc64 x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="emacs examples java python static-libs vim-syntax"
diff --git a/dev-libs/protobuf/protobuf-2.6.1-r3.ebuild b/dev-libs/protobuf/protobuf-2.6.1-r3.ebuild
index 600cb16edb5..8d93c1be7e4 100644
--- a/dev-libs/protobuf/protobuf-2.6.1-r3.ebuild
+++ b/dev-libs/protobuf/protobuf-2.6.1-r3.ebuild
@@ -14,7 +14,7 @@ DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding struct
HOMEPAGE="https://code.google.com/p/protobuf/ https://github.com/google/protobuf/"
SRC_URI="https://github.com/google/${PN}/releases/download/v${PV}/${P}.tar.bz2"
-LICENSE="Apache-2.0"
+LICENSE="BSD"
SLOT="0/9" # subslot = soname major version
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="emacs examples java python static-libs vim-syntax zlib"
diff --git a/dev-libs/protobuf/protobuf-3.0.0_beta3_p1.ebuild b/dev-libs/protobuf/protobuf-3.0.0_beta3_p1.ebuild
index e7de4715d51..c61f89d74ab 100644
--- a/dev-libs/protobuf/protobuf-3.0.0_beta3_p1.ebuild
+++ b/dev-libs/protobuf/protobuf-3.0.0_beta3_p1.ebuild
@@ -15,7 +15,7 @@ DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding struct
HOMEPAGE="https://github.com/google/protobuf/ https://developers.google.com/protocol-buffers/"
SRC_URI="https://github.com/google/protobuf/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="Apache-2.0"
+LICENSE="BSD"
SLOT="0/10b3"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="emacs examples java python static-libs test vim-syntax zlib"
diff --git a/dev-libs/protobuf/protobuf-3.0.2.ebuild b/dev-libs/protobuf/protobuf-3.0.2.ebuild
index 686c45c6427..e24d24c5801 100644
--- a/dev-libs/protobuf/protobuf-3.0.2.ebuild
+++ b/dev-libs/protobuf/protobuf-3.0.2.ebuild
@@ -15,7 +15,7 @@ DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding struct
HOMEPAGE="https://github.com/google/protobuf/ https://developers.google.com/protocol-buffers/"
SRC_URI="https://github.com/google/protobuf/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="Apache-2.0"
+LICENSE="BSD"
SLOT="0/10"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="emacs examples java python static-libs test vim-syntax zlib"
@@ -37,7 +37,7 @@ DOCS=( CHANGES.txt CONTRIBUTORS.txt README.md )
PATCHES=(
"${FILESDIR}/${PN}-2.5.0-emacs-24.4.patch"
"${FILESDIR}/${PN}-2.6.1-protoc-cmdline.patch"
- "${FILESDIR}/${PN}-3.0.0_beta2-disable-local-gmock.patch"
+ "${FILESDIR}/${PN}-3.0.2-disable-local-gmock.patch"
)
S="${WORKDIR}/${PN}-${MY_PV}"
diff --git a/dev-libs/protobuf/protobuf-3.1.0.ebuild b/dev-libs/protobuf/protobuf-3.1.0.ebuild
index fafdd32458f..8523f110e2f 100644
--- a/dev-libs/protobuf/protobuf-3.1.0.ebuild
+++ b/dev-libs/protobuf/protobuf-3.1.0.ebuild
@@ -15,7 +15,7 @@ DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding struct
HOMEPAGE="https://github.com/google/protobuf/ https://developers.google.com/protocol-buffers/"
SRC_URI="https://github.com/google/protobuf/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="Apache-2.0"
+LICENSE="BSD"
SLOT="0/11"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="emacs examples java python static-libs test vim-syntax zlib"
@@ -36,7 +36,7 @@ DOCS=( CHANGES.txt CONTRIBUTORS.txt README.md )
PATCHES=(
"${FILESDIR}/${PN}-2.6.1-protoc-cmdline.patch"
- "${FILESDIR}/${PN}-3.0.0_beta2-disable-local-gmock.patch"
+ "${FILESDIR}/${PN}-3.0.2-disable-local-gmock.patch"
)
S="${WORKDIR}/${PN}-${MY_PV}"
diff --git a/dev-libs/protobuf/protobuf-3.1.0.ebuild b/dev-libs/protobuf/protobuf-3.3.0.ebuild
similarity index 83%
copy from dev-libs/protobuf/protobuf-3.1.0.ebuild
copy to dev-libs/protobuf/protobuf-3.3.0.ebuild
index fafdd32458f..1d10857bd15 100644
--- a/dev-libs/protobuf/protobuf-3.1.0.ebuild
+++ b/dev-libs/protobuf/protobuf-3.3.0.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
inherit autotools elisp-common flag-o-matic python-r1 toolchain-funcs multilib-minimal
# If you bump this package, also consider bumping the official language bindings!
@@ -15,18 +15,18 @@ DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding struct
HOMEPAGE="https://github.com/google/protobuf/ https://developers.google.com/protocol-buffers/"
SRC_URI="https://github.com/google/protobuf/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
-LICENSE="Apache-2.0"
-SLOT="0/11"
+LICENSE="BSD"
+SLOT="0/13"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="emacs examples java python static-libs test vim-syntax zlib"
+IUSE="emacs examples java python static-libs test zlib"
+
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RDEPEND="
+DEPEND="
emacs? ( virtual/emacs )
- python? ( ${PYTHON_DEPS} )
- zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
test? ( dev-cpp/gmock[${MULTILIB_USEDEP}] )"
+
# This is provided for backwards compatibility due to (likely incorrect) use in consumers.
PDEPEND="
java? ( dev-java/protobuf-java )
@@ -36,7 +36,7 @@ DOCS=( CHANGES.txt CONTRIBUTORS.txt README.md )
PATCHES=(
"${FILESDIR}/${PN}-2.6.1-protoc-cmdline.patch"
- "${FILESDIR}/${PN}-3.0.0_beta2-disable-local-gmock.patch"
+ "${FILESDIR}/${PN}-3.3.0-disable-local-gmock.patch"
)
S="${WORKDIR}/${PN}-${MY_PV}"
@@ -81,12 +81,10 @@ multilib_src_test() {
}
multilib_src_install_all() {
- if use vim-syntax; then
- insinto /usr/share/vim/vimfiles/syntax
- doins editors/proto.vim
- insinto /usr/share/vim/vimfiles/ftdetect/
- doins "${FILESDIR}/proto.vim"
- 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*
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2017-09-21 21:06 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2017-09-21 21:06 UTC (permalink / raw
To: gentoo-commits
commit: dd8afe0da7b8f9ab41cd4709b32c5deea4c6d8d6
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Sep 21 18:40:06 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Sep 21 21:03:56 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd8afe0d
dev-libs/protobuf: Version bump (3.4.1) (bug #619828).
dev-libs/protobuf/Manifest | 1 +
.../protobuf-3.4.0-disable_no-warning-test.patch | 19 ++
.../protobuf-3.4.0-protoc_input_output_files.patch | 233 +++++++++++++++++++++
.../files/protobuf-3.4.0-system_libraries.patch | 117 +++++++++++
dev-libs/protobuf/protobuf-3.4.1.ebuild | 97 +++++++++
5 files changed, 467 insertions(+)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 32cafc294f0..cb806863cdf 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -4,3 +4,4 @@ DIST protobuf-3.0.0_beta3_p1.tar.gz 3673779 SHA256 494726c9a6a45a20cd085795a26e4
DIST protobuf-3.0.2.tar.gz 3917853 SHA256 b700647e11556b643ccddffd1f41d8cb7704ed02090af54cc517d44d912d11c1 SHA512 28eb8814555b0fe2cd57da6caf46802697a9612fccb3bba3ae7a379352437f81a18c1f6ab7242a22abea59c1ff9b06dcb6e2b52a97aa1a15cea6485ffc3c10c2 WHIRLPOOL 5c70def13be5e61d9405a24fdfc1efe9caee0b63c87f74e12f3d121801ecdc410e142eab80d8d4b49ebfe0c4f3cd13b2d77a17ec303978fec317265991a1f5a8
DIST protobuf-3.1.0.tar.gz 4051503 SHA256 0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7 SHA512 8d3289a16944c255bd1cceab696e515e52467f2bfe1cc10f6b32fabdf082d5acdc248ec9cadc572223a24d04d431f75921076153109cea2f90ee533f502ab47a WHIRLPOOL b8a0bee9ff549c8da45c2b56b12aafbed5807959cdb11b3888a0f30fd0d6df83a72f3c6ef9e266522754b8901792f65235a6e81a8b0f74cee15d59ecbe6dee68
DIST protobuf-3.3.0.tar.gz 4336596 SHA256 94c414775f275d876e5e0e4a276527d155ab2d0da45eed6b7734301c330be36e SHA512 0734a55ae92f0539dfb507e174539d290fd8e93633c1edd8810e0d51c37e67254337b75fc5ba9450316f6416e1f8f8cfb59415864657b55f2a1696fbcdfe7636 WHIRLPOOL 4c18120ad784234ebb5308c0f3a2f3814d77f2fc906407f48285f3ba8f84af8e15defa4e7edf2d2e77cf22316df338b3f5bc0c6ca11c7a4fb951105c3aa7d7d4
+DIST protobuf-3.4.1.tar.gz 4490100 SHA256 8e0236242106e680b4f9f576cc44b8cd711e948b20a9fc07769b0a20ceab9cc4 SHA512 471e52198fa878a79183dc8fbc39d9c65239be4d9dff799e12281ee9b1af61a427584534b1baae1773bc6e4c86467f89ca2e7911a21effd86bc5f40cc7d94c34 WHIRLPOOL c53dc76155bcfeee11720b08c7d508a35274f2387d6f8a61149565bc72d5539ad598600ad692f01ac7a0ea102d66659f4d516f994c419c56c4420ce69659646b
diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.4.0-disable_no-warning-test.patch
new file mode 100644
index 00000000000..373dc7935a8
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.4.0-disable_no-warning-test.patch
@@ -0,0 +1,19 @@
+Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
+
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -750,7 +750,7 @@
+
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+- no-warning-test $(GZCHECKPROGRAMS)
++ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+ ../gmock/gtest/lib/libgtest.la \
+ ../gmock/lib/libgmock.la \
+@@ -931,4 +931,4 @@
+
+ TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
+ google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
+- protobuf-lite-arena-test no-warning-test
++ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch
new file mode 100644
index 00000000000..a7d338e9928
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch
@@ -0,0 +1,233 @@
+https://github.com/google/protobuf/pull/235
+
+--- /src/google/protobuf/compiler/command_line_interface.cc
++++ /src/google/protobuf/compiler/command_line_interface.cc
+@@ -942,6 +942,28 @@
+ }
+
+ if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
++ bool success = false;
++ int in_fd = STDIN_FILENO;
++ int out_fd = STDOUT_FILENO;
++
++ if (!protobuf_in_path_.empty()) {
++ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
++ if (in_fd == -1) {
++ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
++ return 1;
++ }
++ }
++ if (!protobuf_out_path_.empty()) {
++ out_fd = open(protobuf_out_path_.c_str(),
++ O_WRONLY | O_CREAT | O_TRUNC,
++ 0644);
++ if (out_fd == -1) {
++ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
++ close(in_fd);
++ return 1;
++ }
++ }
++
+ if (codec_type_.empty()) {
+ // HACK: Define an EmptyMessage type to use for decoding.
+ DescriptorPool pool;
+@@ -950,13 +972,20 @@
+ file.add_message_type()->set_name("EmptyMessage");
+ GOOGLE_CHECK(pool.BuildFile(file) != NULL);
+ codec_type_ = "EmptyMessage";
+- if (!EncodeOrDecode(&pool)) {
+- return 1;
+- }
++ success = EncodeOrDecode(&pool, in_fd, out_fd);
+ } else {
+- if (!EncodeOrDecode(descriptor_pool.get())) {
+- return 1;
+- }
++ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
++ }
++
++ if (in_fd != STDIN_FILENO) {
++ close(in_fd);
++ }
++ if (out_fd != STDOUT_FILENO) {
++ close(out_fd);
++ }
++
++ if (!success) {
++ return 1;
+ }
+ }
+
+@@ -994,6 +1023,11 @@
+ for (int i = 0; i < proto_path_.size(); i++) {
+ source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
+ }
++ if (mode_ == MODE_COMPILE &&
++ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
++ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
++ << "decode operations. Ignoring.";
++ }
+
+ // Map input files to virtual paths if possible.
+ if (!MakeInputsBeProtoPathRelative(source_tree)) {
+@@ -1561,6 +1595,12 @@
+
+ codec_type_ = value;
+
++ } else if (name == "--protobuf_in") {
++ protobuf_in_path_ = value;
++
++ } else if (name == "--protobuf_out") {
++ protobuf_out_path_ = value;
++
+ } else if (name == "--error_format") {
+ if (value == "gcc") {
+ error_format_ = ERROR_FORMAT_GCC;
+@@ -1684,18 +1724,29 @@
+ " --version Show version info and exit.\n"
+ " -h, --help Show this text and exit.\n"
+ " --encode=MESSAGE_TYPE Read a text-format message of the given type\n"
+-" from standard input and write it in binary\n"
+-" to standard output. The message type must\n"
+-" be defined in PROTO_FILES or their imports.\n"
+-" --decode=MESSAGE_TYPE Read a binary message of the given type from\n"
+-" standard input and write it in text format\n"
+-" to standard output. The message type must\n"
++" an write it in binary. The message type must\n"
+ " be defined in PROTO_FILES or their imports.\n"
+-" --decode_raw Read an arbitrary protocol message from\n"
+-" standard input and write the raw tag/value\n"
+-" pairs in text format to standard output. No\n"
++" The input/output protobuf files are specified\n"
++" using the --protobuf_in and --protobuf_out\n"
++" command line flags.\n"
++" --decode=MESSAGE_TYPE Read a binary message of the given type and\n"
++" write it in text format. The message type\n"
++" must be defined in PROTO_FILES or their\n"
++" imports. The input/output protobuf files are\n"
++" specified using the --protobuf_in and \n"
++" --protobuf_out command line flags.\n"
++" --decode_raw Read an arbitrary protocol message and write\n"
++" the raw tag/value pairs in text format. No\n"
+ " PROTO_FILES should be given when using this\n"
+-" flag.\n"
++" flag. The input/output protobuf files are\n"
++" specified using the --protobuf_in and \n"
++" --protobuf_out command line flags.\n"
++" --protobuf_in Absolute path to the protobuf file to read to\n"
++" encode/decode. If omitted, file will be read\n"
++" from STDIN.\n"
++" --protobuf_out Absolute path to the protobuf file to write to\n"
++" after encode/decode operation. If omitted,\n"
++" output is written to STDOUT.\n"
+ " --descriptor_set_in=FILES Specifies a delimited list of FILES\n"
+ " each containing a FileDescriptorSet (a\n"
+ " protocol buffer defined in descriptor.proto).\n"
+@@ -1957,7 +2008,9 @@
+ return true;
+ }
+
+-bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
++bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd) {
+ // Look up the type.
+ const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
+ if (type == NULL) {
+@@ -1969,15 +2022,15 @@
+ google::protobuf::scoped_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
+
+ if (mode_ == MODE_ENCODE) {
+- SetFdToTextMode(STDIN_FILENO);
+- SetFdToBinaryMode(STDOUT_FILENO);
++ SetFdToTextMode(in_fd);
++ SetFdToBinaryMode(out_fd);
+ } else {
+- SetFdToBinaryMode(STDIN_FILENO);
+- SetFdToTextMode(STDOUT_FILENO);
++ SetFdToBinaryMode(in_fd);
++ SetFdToTextMode(out_fd);
+ }
+
+- io::FileInputStream in(STDIN_FILENO);
+- io::FileOutputStream out(STDOUT_FILENO);
++ io::FileInputStream in(in_fd);
++ io::FileOutputStream out(out_fd);
+
+ if (mode_ == MODE_ENCODE) {
+ // Input is text.
+--- /src/google/protobuf/compiler/command_line_interface.h
++++ /src/google/protobuf/compiler/command_line_interface.h
+@@ -269,7 +269,9 @@
+ GeneratorContext* generator_context, string* error);
+
+ // Implements --encode and --decode.
+- bool EncodeOrDecode(const DescriptorPool* pool);
++ bool EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd);
+
+ // Implements the --descriptor_set_out option.
+ bool WriteDescriptorSet(
+@@ -402,6 +404,13 @@
+ // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
+ std::vector<string> descriptor_set_in_names_;
+
++ // When using --encode / --decode / --decode_raw absolute path to the output
++ // file. (Empty string indicates write to STDOUT).
++ string protobuf_out_path_;
++ // When using --encode / --decode / --decode_raw, absolute path to the input
++ // file. (Empty string indicates read from STDIN).
++ string protobuf_in_path_;
++
+ // If --descriptor_set_out was given, this is the filename to which the
+ // FileDescriptorSet should be written. Otherwise, empty.
+ string descriptor_set_out_name_;
+--- /src/google/protobuf/compiler/command_line_interface_unittest.cc
++++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
+@@ -95,7 +95,7 @@
+ virtual void SetUp();
+ virtual void TearDown();
+
+- // Runs the CommandLineInterface with the given command line. The
++ // Run the CommandLineInterface with the given command line. The
+ // command is automatically split on spaces, and the string "$tmpdir"
+ // is replaced with TestTempDir().
+ void Run(const string& command);
+@@ -2308,6 +2308,17 @@
+ EXPECT_EQ(StripCR(expected_text), StripCR(captured_stderr_));
+ }
+
++ void ExpectBinaryFilesMatch(const string &expected_file,
++ const string &actual_file) {
++ string expected_output, actual_output;
++ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
++ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
++
++ // Don't use EXPECT_EQ because we don't want to print raw binary data to
++ // stdout on failure.
++ EXPECT_TRUE(expected_output == actual_output);
++ }
++
+ private:
+ void WriteUnittestProtoDescriptorSet() {
+ unittest_proto_descriptor_set_filename_ =
+@@ -2398,6 +2409,18 @@
+ "google/protobuf/no_such_file.proto: No such file or directory\n");
+ }
+
++TEST_P(EncodeDecodeTest, RedirectInputOutput) {
++ string out_file = TestTempDir() + "/golden_message_out.pbf";
++ string cmd = "";
++ cmd += "google/protobuf/unittest.proto ";
++ cmd += "--encode=protobuf_unittest.TestAllTypes ";
++ cmd += "--protobuf_in=" + TestSourceDir() +
++ "/google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt ";
++ cmd += "--protobuf_out=" + out_file;
++ EXPECT_TRUE(Run(cmd));
++ ExpectBinaryFilesMatch(out_file, TestSourceDir() + "/google/protobuf/testdata/golden_message_oneof_implemented");
++}
++
+ INSTANTIATE_TEST_CASE_P(FileDescriptorSetSource,
+ EncodeDecodeTest,
+ testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.4.0-system_libraries.patch
new file mode 100644
index 00000000000..424ad5ff58c
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.4.0-system_libraries.patch
@@ -0,0 +1,117 @@
+--- /Makefile.am
++++ /Makefile.am
+@@ -8,31 +8,12 @@
+ # the right time.
+ SUBDIRS = . src
+
+-# Always include gmock in distributions.
+-DIST_SUBDIRS = $(subdirs) src conformance benchmarks
++DIST_SUBDIRS = src conformance benchmarks
+
+-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
+-# because then "make check" would also build and run all of gmock's own tests,
+-# which takes a lot of time and is generally not useful to us. Also, we don't
+-# want "make install" to recurse into gmock since we don't want to overwrite
+-# the installed version of gmock if there is one.
+ check-local:
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
+- @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+- @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+
+-# We would like to clean gmock when "make clean" is invoked. But we have to
+-# be careful because clean-local is also invoked during "make distclean", but
+-# "make distclean" already recurses into gmock because it's listed among the
+-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
+-# cd to the directory again and "make clean" it will fail. So, check that the
+-# Makefile exists before recursing.
+ clean-local:
+- @if test -e gmock/Makefile; then \
+- echo "Making clean in gmock"; \
+- cd gmock && $(MAKE) $(AM_MAKEFLAGS) clean; \
+- fi; \
+- if test -e conformance/Makefile; then \
++ @if test -e conformance/Makefile; then \
+ echo "Making clean in conformance"; \
+ cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
+ fi; \
+--- /configure.ac
++++ /configure.ac
+@@ -200,12 +200,5 @@
+
+ AX_CXX_COMPILE_STDCXX([11], [noext], [optional])
+
+-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
+-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
+-# too.
+-export CFLAGS
+-export CXXFLAGS
+-AC_CONFIG_SUBDIRS([gmock])
+-
+ AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -752,11 +752,7 @@
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+ no-warning-test $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include \
+- -I$(srcdir)/../gmock/include
++ -lgtest -lgmock -lgmock_main
+ # Disable optimization for tests unless the user explicitly asked for it,
+ # since test_util.cc takes forever to compile with optimization (with GCC).
+ # See configure.ac for more info.
+@@ -843,12 +839,8 @@
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+ libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include \
+- -DPROTOBUF_TEST_NO_DESCRIPTORS
++ -lgtest -lgmock -lgmock_main
++protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lazy_descriptor_test_SOURCES = \
+ google/protobuf/compiler/cpp/cpp_unittest.cc \
+@@ -868,11 +860,7 @@
+ # full runtime and we want to make sure this test builds without full
+ # runtime.
+ protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lite_test_CPPFLAGS= -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_test_SOURCES = \
+ google/protobuf/lite_unittest.cc \
+@@ -883,11 +871,7 @@
+ # gtest when building the test internally our memory sanitizer doesn't detect
+ # memory leaks (don't know why).
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- ../gmock/gtest/lib/libgtest.la \
+- ../gmock/lib/libgmock.la \
+- ../gmock/lib/libgmock_main.la
+-protobuf_lite_arena_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
+- -I$(srcdir)/../gmock/gtest/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_arena_test_SOURCES = \
+ google/protobuf/lite_arena_unittest.cc \
+@@ -896,8 +880,7 @@
+
+ # Test plugin binary.
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- ../gmock/gtest/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
++ -lgtest
+ test_plugin_SOURCES = \
+ google/protobuf/compiler/mock_code_generator.cc \
+ google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-3.4.1.ebuild b/dev-libs/protobuf/protobuf-3.4.1.ebuild
new file mode 100644
index 00000000000..d4a2ba85c2d
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-3.4.1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
+
+DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf"
+SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0/14"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="emacs examples static-libs test zlib"
+
+RDEPEND="emacs? ( virtual/emacs )
+ zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.4.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.4.0-protoc_input_output_files.patch"
+)
+
+DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
+
+src_prepare() {
+ append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
+ default
+ eautoreconf
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ $(use_enable static-libs static)
+ $(use_with zlib)
+ )
+
+ if tc-is-cross-compiler; then
+ # The build system wants `protoc` when building, so we need a copy that
+ # runs on the host. This is more hermetic than relying on the version
+ # installed in the host being the exact same version.
+ mkdir -p "${WORKDIR}/build" || die
+ pushd "${WORKDIR}/build" > /dev/null || die
+ ECONF_SOURCE="${S}" econf_build "${myeconfargs[@]}"
+ myeconfargs+=(--with-protoc="${PWD}"/src/protoc)
+ popd > /dev/null || die
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ if tc-is-cross-compiler; then
+ emake -C "${WORKDIR}/build/src" protoc
+ fi
+
+ default
+
+ if use emacs; then
+ elisp-compile editors/protobuf-mode.el
+ fi
+}
+
+multilib_src_test() {
+ emake check
+}
+
+multilib_src_install_all() {
+ 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
+}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2018-10-02 20:08 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2018-10-02 20:08 UTC (permalink / raw
To: gentoo-commits
commit: 50c1666b6147224df070fe0d05ef78ad17d81026
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Oct 2 19:29:17 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Oct 2 20:07:25 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50c1666b
dev-libs/protobuf: Update homepage.
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch | 2 +-
dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch | 6 +++---
.../protobuf/files/protobuf-3.6.0-protoc_input_output_files.patch | 2 +-
dev-libs/protobuf/metadata.xml | 2 +-
dev-libs/protobuf/protobuf-3.5.1.1.ebuild | 6 +++---
dev-libs/protobuf/protobuf-3.5.2.ebuild | 6 +++---
dev-libs/protobuf/protobuf-3.6.0.1.ebuild | 6 +++---
dev-libs/protobuf/protobuf-3.6.1.ebuild | 6 +++---
8 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch
index a7d338e9928..75c4dc28ee4 100644
--- a/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch
+++ b/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch
@@ -1,4 +1,4 @@
-https://github.com/google/protobuf/pull/235
+https://github.com/protocolbuffers/protobuf/pull/235
--- /src/google/protobuf/compiler/command_line_interface.cc
+++ /src/google/protobuf/compiler/command_line_interface.cc
diff --git a/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch b/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch
index 7a88e837950..9582431d41f 100644
--- a/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch
+++ b/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch
@@ -1,6 +1,6 @@
-https://github.com/google/protobuf/issues/3937
-https://github.com/google/protobuf/pull/3955
-https://github.com/google/protobuf/commit/642e1ac635f2563b4a14c255374f02645ae85dac
+https://github.com/protocolbuffers/protobuf/issues/3937
+https://github.com/protocolbuffers/protobuf/pull/3955
+https://github.com/protocolbuffers/protobuf/commit/642e1ac635f2563b4a14c255374f02645ae85dac
--- /src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
+++ /src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
diff --git a/dev-libs/protobuf/files/protobuf-3.6.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.6.0-protoc_input_output_files.patch
index f515b6cd1a4..8b583522f46 100644
--- a/dev-libs/protobuf/files/protobuf-3.6.0-protoc_input_output_files.patch
+++ b/dev-libs/protobuf/files/protobuf-3.6.0-protoc_input_output_files.patch
@@ -1,4 +1,4 @@
-https://github.com/google/protobuf/pull/235
+https://github.com/protocolbuffers/protobuf/pull/235
--- /src/google/protobuf/compiler/command_line_interface.cc
+++ /src/google/protobuf/compiler/command_line_interface.cc
diff --git a/dev-libs/protobuf/metadata.xml b/dev-libs/protobuf/metadata.xml
index 6aeca898035..f37667040e4 100644
--- a/dev-libs/protobuf/metadata.xml
+++ b/dev-libs/protobuf/metadata.xml
@@ -13,6 +13,6 @@
<subslots>Soname version number</subslots>
</slots>
<upstream>
- <remote-id type="github">google/protobuf</remote-id>
+ <remote-id type="github">protocolbuffers/protobuf</remote-id>
</upstream>
</pkgmetadata>
diff --git a/dev-libs/protobuf/protobuf-3.5.1.1.ebuild b/dev-libs/protobuf/protobuf-3.5.1.1.ebuild
index ea6e3662400..b64b56a4da1 100644
--- a/dev-libs/protobuf/protobuf-3.5.1.1.ebuild
+++ b/dev-libs/protobuf/protobuf-3.5.1.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -6,8 +6,8 @@ EAPI="6"
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf"
-SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0/15"
diff --git a/dev-libs/protobuf/protobuf-3.5.2.ebuild b/dev-libs/protobuf/protobuf-3.5.2.ebuild
index 1f060c91027..eb1466f8f44 100644
--- a/dev-libs/protobuf/protobuf-3.5.2.ebuild
+++ b/dev-libs/protobuf/protobuf-3.5.2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -6,8 +6,8 @@ EAPI="6"
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf"
-SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0/15"
diff --git a/dev-libs/protobuf/protobuf-3.6.0.1.ebuild b/dev-libs/protobuf/protobuf-3.6.0.1.ebuild
index 463b4135d83..fc490f98194 100644
--- a/dev-libs/protobuf/protobuf-3.6.0.1.ebuild
+++ b/dev-libs/protobuf/protobuf-3.6.0.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -6,8 +6,8 @@ EAPI="6"
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf"
-SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0/16"
diff --git a/dev-libs/protobuf/protobuf-3.6.1.ebuild b/dev-libs/protobuf/protobuf-3.6.1.ebuild
index 05027c009a5..3b3bdeaf351 100644
--- a/dev-libs/protobuf/protobuf-3.6.1.ebuild
+++ b/dev-libs/protobuf/protobuf-3.6.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -6,8 +6,8 @@ EAPI="6"
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/google/protobuf"
-SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0/17"
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2018-10-19 17:39 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2018-10-19 17:39 UTC (permalink / raw
To: gentoo-commits
commit: a246eb7e586b2d0102833be248aa94e557c98c2f
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Oct 19 15:37:26 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Oct 19 17:39:18 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a246eb7e
dev-libs/protobuf: Fix building on ARMv6.
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/protobuf-3.6.1-libatomic_linking.patch | 49 ++++++++++++++++++++++
dev-libs/protobuf/protobuf-3.6.1.ebuild | 1 +
2 files changed, 50 insertions(+)
diff --git a/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch b/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch
new file mode 100644
index 00000000000..2b357b21317
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch
@@ -0,0 +1,49 @@
+https://github.com/protocolbuffers/protobuf/issues/5219
+https://github.com/protocolbuffers/protobuf/pull/5227
+https://github.com/protocolbuffers/protobuf/commit/56b40a8f055cfd05633054aed5d3466a6e058b72
+
+--- /configure.ac
++++ /configure.ac
+@@ -165,6 +165,22 @@
+ ])
+ AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1])
+
++dnl On some platforms, std::atomic needs a helper library
++AC_MSG_CHECKING(whether -latomic is needed)
++AC_LINK_IFELSE([AC_LANG_SOURCE([[
++ #include <atomic>
++ #include <cstdint>
++ std::atomic<std::int64_t> v;
++ int main() {
++ return v;
++ }
++]])], STD_ATOMIC_NEED_LIBATOMIC=no, STD_ATOMIC_NEED_LIBATOMIC=yes)
++AC_MSG_RESULT($STD_ATOMIC_NEED_LIBATOMIC)
++if test "x$STD_ATOMIC_NEED_LIBATOMIC" = xyes; then
++ LIBATOMIC_LIBS="-latomic"
++fi
++AC_SUBST([LIBATOMIC_LIBS])
++
+ AS_IF([test "$with_protoc" != "no"], [
+ PROTOC=$with_protoc
+ AS_IF([test "$with_protoc" = "yes"], [
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -163,7 +163,7 @@
+
+ lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
+
+-libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
++libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
+ libprotobuf_lite_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
+ if HAVE_LD_VERSION_SCRIPT
+ libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
+@@ -209,7 +209,7 @@
+ google/protobuf/io/zero_copy_stream.cc \
+ google/protobuf/io/zero_copy_stream_impl_lite.cc
+
+-libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
++libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
+ libprotobuf_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
+ if HAVE_LD_VERSION_SCRIPT
+ libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
diff --git a/dev-libs/protobuf/protobuf-3.6.1.ebuild b/dev-libs/protobuf/protobuf-3.6.1.ebuild
index 3b3bdeaf351..065eed56272 100644
--- a/dev-libs/protobuf/protobuf-3.6.1.ebuild
+++ b/dev-libs/protobuf/protobuf-3.6.1.ebuild
@@ -23,6 +23,7 @@ PATCHES=(
"${FILESDIR}/${PN}-3.6.0-disable_no-warning-test.patch"
"${FILESDIR}/${PN}-3.6.0-system_libraries.patch"
"${FILESDIR}/${PN}-3.6.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.6.1-libatomic_linking.patch"
)
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2019-04-19 16:39 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2019-04-19 16:39 UTC (permalink / raw
To: gentoo-commits
commit: 8c0dbd4ca54671e2bacedc4a686567eb862bc032
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Apr 18 18:53:35 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr 19 16:39:06 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c0dbd4c
dev-libs/protobuf: Delete old versions (<3.6.1.3).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 6 -
.../protobuf-3.4.0-disable_no-warning-test.patch | 19 --
.../protobuf-3.4.0-protoc_input_output_files.patch | 233 ---------------------
.../files/protobuf-3.4.0-system_libraries.patch | 117 -----------
.../files/protobuf-3.5.0-atomic_operations.patch | 21 --
dev-libs/protobuf/protobuf-3.5.1.1.ebuild | 106 ----------
dev-libs/protobuf/protobuf-3.5.2.ebuild | 104 ---------
dev-libs/protobuf/protobuf-3.6.0.1.ebuild | 105 ----------
dev-libs/protobuf/protobuf-3.6.1.1.ebuild | 108 ----------
dev-libs/protobuf/protobuf-3.6.1.2.ebuild | 108 ----------
dev-libs/protobuf/protobuf-3.6.1.ebuild | 106 ----------
11 files changed, 1033 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 587e2bfbd47..ac2f8a09268 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,7 +1 @@
-DIST protobuf-3.5.1.1.tar.gz 4584489 BLAKE2B 995ee2f06a6358e9935b488269ee50f0dccede417c1757828b0108fbe8c67034301f3a9cb87517430acd9838ae71bb677f4edd8b59b2418f99c15d8ea3d33591 SHA512 f25ecf772facc8efd196b7c06012ce9ec24152b2c0cde38ed2e29ecded8f534221b008e649f4cbd991436ad3436130cd2e31d51e75019d08240d518111fb4496
-DIST protobuf-3.5.2.tar.gz 4584659 BLAKE2B f582212169d802a5844574eb900c9f8cbb343b7e73f2074e5ff0bfc544ebd13f4bc2b78271fb70f4465d78fdc39972ed68339f453c0d3ffe98d8564fbf520544 SHA512 09d10cf0c07a0ba249428bbf20f5dbed840965fa06b3c09682f286a4dee9d84bb96f3b5b50e993d48ef1f20440531255ce7d0e60a648bf3fe536a5f2b0b74181
-DIST protobuf-3.6.0.1.tar.gz 4483964 BLAKE2B 8afc1e4f4a6eba0eb453fa7cbee8e8ab4986ab9dda39a0005de9d07ec4bd4fd27a5af4ab359b139b4117a5da580be6da3387295266625ee8cc7ec9421c5c0235 SHA512 63cd799d5d6edbb05a87bc07992271c5bdb9595366d698b4dc5476cc89dc278d1c43186b9e56340958aefea2ce23e15a9c3a550158414add868b56e789ceafe4
-DIST protobuf-3.6.1.1.tar.gz 4489116 BLAKE2B 4ed5da3dcb56245b3ce2f979142d5e77837e8e1fbc2f0af27be48664b8b7dfa2ec44382cf75678d226dd665c289f81d95bf04c5f2795fcdd759aa8ec630dba1f SHA512 df59ed966047471d7296883a4500d657eee5e7d8713dd7e44f3f2e0b8c4400e85cb511b316f2fa8518620f1074fd0cad8ee9538c063ac371d6b59358de81ee88
-DIST protobuf-3.6.1.2.tar.gz 4490331 BLAKE2B be5fac5a38369b21941c3c615a97cf35d05a24ee03536b6ea6c1c797a82a0a7f8ecc3630b62af7728f063c850c4faac8ae670171a18bacd44e2a2fb38b2e6fce SHA512 557ffb1216f663df94a16cd8e51e20acf42378913d656f56402c6653cb58ce6a83f77a6050bd846460c7dcac59bb41ad03ac003b0b06250df6a97fd17f8a2c7c
DIST protobuf-3.6.1.3.tar.gz 4490599 BLAKE2B 5a058f937330bd562e364a8d86e0b1376fdac9fded0fd23d6914cb59c5c15e8bfc1e203ea36b5a4eece8919708c1a9a6616b0ec2028d6ec339704da53ed81963 SHA512 9eadb46c7daa19e612516958169bc90943b38b429a4b2cf2171b66b57f50a2f8a9b66cbf58bdd44517af414b78e0f3ab2e1361891dc60ecd098185da2638d37e
-DIST protobuf-3.6.1.tar.gz 4485582 BLAKE2B 546c49759df784018459809b9db692c5c94aef5d717183af5cd9edd96b4c658e759f23950cdcd5dddceaaad06ea1de2a2357b9fa8c496ed5d538fc5920174da0 SHA512 1bc175d24b49de1b1e41eaf39598194e583afffb924c86c8d2e569d935af21874be76b2cbd4d9655a1d38bac3d4cd811de88bc2c72d81bad79115e69e5b0d839
diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.4.0-disable_no-warning-test.patch
deleted file mode 100644
index 373dc7935a8..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.4.0-disable_no-warning-test.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
-
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -750,7 +750,7 @@
-
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
-- no-warning-test $(GZCHECKPROGRAMS)
-+ $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- ../gmock/gtest/lib/libgtest.la \
- ../gmock/lib/libgmock.la \
-@@ -931,4 +931,4 @@
-
- TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
- google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
-- protobuf-lite-arena-test no-warning-test
-+ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch
deleted file mode 100644
index 75c4dc28ee4..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.4.0-protoc_input_output_files.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-https://github.com/protocolbuffers/protobuf/pull/235
-
---- /src/google/protobuf/compiler/command_line_interface.cc
-+++ /src/google/protobuf/compiler/command_line_interface.cc
-@@ -942,6 +942,28 @@
- }
-
- if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
-+ bool success = false;
-+ int in_fd = STDIN_FILENO;
-+ int out_fd = STDOUT_FILENO;
-+
-+ if (!protobuf_in_path_.empty()) {
-+ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
-+ if (in_fd == -1) {
-+ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
-+ return 1;
-+ }
-+ }
-+ if (!protobuf_out_path_.empty()) {
-+ out_fd = open(protobuf_out_path_.c_str(),
-+ O_WRONLY | O_CREAT | O_TRUNC,
-+ 0644);
-+ if (out_fd == -1) {
-+ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
-+ close(in_fd);
-+ return 1;
-+ }
-+ }
-+
- if (codec_type_.empty()) {
- // HACK: Define an EmptyMessage type to use for decoding.
- DescriptorPool pool;
-@@ -950,13 +972,20 @@
- file.add_message_type()->set_name("EmptyMessage");
- GOOGLE_CHECK(pool.BuildFile(file) != NULL);
- codec_type_ = "EmptyMessage";
-- if (!EncodeOrDecode(&pool)) {
-- return 1;
-- }
-+ success = EncodeOrDecode(&pool, in_fd, out_fd);
- } else {
-- if (!EncodeOrDecode(descriptor_pool.get())) {
-- return 1;
-- }
-+ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
-+ }
-+
-+ if (in_fd != STDIN_FILENO) {
-+ close(in_fd);
-+ }
-+ if (out_fd != STDOUT_FILENO) {
-+ close(out_fd);
-+ }
-+
-+ if (!success) {
-+ return 1;
- }
- }
-
-@@ -994,6 +1023,11 @@
- for (int i = 0; i < proto_path_.size(); i++) {
- source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
- }
-+ if (mode_ == MODE_COMPILE &&
-+ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
-+ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
-+ << "decode operations. Ignoring.";
-+ }
-
- // Map input files to virtual paths if possible.
- if (!MakeInputsBeProtoPathRelative(source_tree)) {
-@@ -1561,6 +1595,12 @@
-
- codec_type_ = value;
-
-+ } else if (name == "--protobuf_in") {
-+ protobuf_in_path_ = value;
-+
-+ } else if (name == "--protobuf_out") {
-+ protobuf_out_path_ = value;
-+
- } else if (name == "--error_format") {
- if (value == "gcc") {
- error_format_ = ERROR_FORMAT_GCC;
-@@ -1684,18 +1724,29 @@
- " --version Show version info and exit.\n"
- " -h, --help Show this text and exit.\n"
- " --encode=MESSAGE_TYPE Read a text-format message of the given type\n"
--" from standard input and write it in binary\n"
--" to standard output. The message type must\n"
--" be defined in PROTO_FILES or their imports.\n"
--" --decode=MESSAGE_TYPE Read a binary message of the given type from\n"
--" standard input and write it in text format\n"
--" to standard output. The message type must\n"
-+" an write it in binary. The message type must\n"
- " be defined in PROTO_FILES or their imports.\n"
--" --decode_raw Read an arbitrary protocol message from\n"
--" standard input and write the raw tag/value\n"
--" pairs in text format to standard output. No\n"
-+" The input/output protobuf files are specified\n"
-+" using the --protobuf_in and --protobuf_out\n"
-+" command line flags.\n"
-+" --decode=MESSAGE_TYPE Read a binary message of the given type and\n"
-+" write it in text format. The message type\n"
-+" must be defined in PROTO_FILES or their\n"
-+" imports. The input/output protobuf files are\n"
-+" specified using the --protobuf_in and \n"
-+" --protobuf_out command line flags.\n"
-+" --decode_raw Read an arbitrary protocol message and write\n"
-+" the raw tag/value pairs in text format. No\n"
- " PROTO_FILES should be given when using this\n"
--" flag.\n"
-+" flag. The input/output protobuf files are\n"
-+" specified using the --protobuf_in and \n"
-+" --protobuf_out command line flags.\n"
-+" --protobuf_in Absolute path to the protobuf file to read to\n"
-+" encode/decode. If omitted, file will be read\n"
-+" from STDIN.\n"
-+" --protobuf_out Absolute path to the protobuf file to write to\n"
-+" after encode/decode operation. If omitted,\n"
-+" output is written to STDOUT.\n"
- " --descriptor_set_in=FILES Specifies a delimited list of FILES\n"
- " each containing a FileDescriptorSet (a\n"
- " protocol buffer defined in descriptor.proto).\n"
-@@ -1957,7 +2008,9 @@
- return true;
- }
-
--bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
-+bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd) {
- // Look up the type.
- const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
- if (type == NULL) {
-@@ -1969,15 +2022,15 @@
- google::protobuf::scoped_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
-
- if (mode_ == MODE_ENCODE) {
-- SetFdToTextMode(STDIN_FILENO);
-- SetFdToBinaryMode(STDOUT_FILENO);
-+ SetFdToTextMode(in_fd);
-+ SetFdToBinaryMode(out_fd);
- } else {
-- SetFdToBinaryMode(STDIN_FILENO);
-- SetFdToTextMode(STDOUT_FILENO);
-+ SetFdToBinaryMode(in_fd);
-+ SetFdToTextMode(out_fd);
- }
-
-- io::FileInputStream in(STDIN_FILENO);
-- io::FileOutputStream out(STDOUT_FILENO);
-+ io::FileInputStream in(in_fd);
-+ io::FileOutputStream out(out_fd);
-
- if (mode_ == MODE_ENCODE) {
- // Input is text.
---- /src/google/protobuf/compiler/command_line_interface.h
-+++ /src/google/protobuf/compiler/command_line_interface.h
-@@ -269,7 +269,9 @@
- GeneratorContext* generator_context, string* error);
-
- // Implements --encode and --decode.
-- bool EncodeOrDecode(const DescriptorPool* pool);
-+ bool EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd);
-
- // Implements the --descriptor_set_out option.
- bool WriteDescriptorSet(
-@@ -402,6 +404,13 @@
- // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
- std::vector<string> descriptor_set_in_names_;
-
-+ // When using --encode / --decode / --decode_raw absolute path to the output
-+ // file. (Empty string indicates write to STDOUT).
-+ string protobuf_out_path_;
-+ // When using --encode / --decode / --decode_raw, absolute path to the input
-+ // file. (Empty string indicates read from STDIN).
-+ string protobuf_in_path_;
-+
- // If --descriptor_set_out was given, this is the filename to which the
- // FileDescriptorSet should be written. Otherwise, empty.
- string descriptor_set_out_name_;
---- /src/google/protobuf/compiler/command_line_interface_unittest.cc
-+++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
-@@ -95,7 +95,7 @@
- virtual void SetUp();
- virtual void TearDown();
-
-- // Runs the CommandLineInterface with the given command line. The
-+ // Run the CommandLineInterface with the given command line. The
- // command is automatically split on spaces, and the string "$tmpdir"
- // is replaced with TestTempDir().
- void Run(const string& command);
-@@ -2308,6 +2308,17 @@
- EXPECT_EQ(StripCR(expected_text), StripCR(captured_stderr_));
- }
-
-+ void ExpectBinaryFilesMatch(const string &expected_file,
-+ const string &actual_file) {
-+ string expected_output, actual_output;
-+ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
-+ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
-+
-+ // Don't use EXPECT_EQ because we don't want to print raw binary data to
-+ // stdout on failure.
-+ EXPECT_TRUE(expected_output == actual_output);
-+ }
-+
- private:
- void WriteUnittestProtoDescriptorSet() {
- unittest_proto_descriptor_set_filename_ =
-@@ -2398,6 +2409,18 @@
- "google/protobuf/no_such_file.proto: No such file or directory\n");
- }
-
-+TEST_P(EncodeDecodeTest, RedirectInputOutput) {
-+ string out_file = TestTempDir() + "/golden_message_out.pbf";
-+ string cmd = "";
-+ cmd += "google/protobuf/unittest.proto ";
-+ cmd += "--encode=protobuf_unittest.TestAllTypes ";
-+ cmd += "--protobuf_in=" + TestSourceDir() +
-+ "/google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt ";
-+ cmd += "--protobuf_out=" + out_file;
-+ EXPECT_TRUE(Run(cmd));
-+ ExpectBinaryFilesMatch(out_file, TestSourceDir() + "/google/protobuf/testdata/golden_message_oneof_implemented");
-+}
-+
- INSTANTIATE_TEST_CASE_P(FileDescriptorSetSource,
- EncodeDecodeTest,
- testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
diff --git a/dev-libs/protobuf/files/protobuf-3.4.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.4.0-system_libraries.patch
deleted file mode 100644
index 424ad5ff58c..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.4.0-system_libraries.patch
+++ /dev/null
@@ -1,117 +0,0 @@
---- /Makefile.am
-+++ /Makefile.am
-@@ -8,31 +8,12 @@
- # the right time.
- SUBDIRS = . src
-
--# Always include gmock in distributions.
--DIST_SUBDIRS = $(subdirs) src conformance benchmarks
-+DIST_SUBDIRS = src conformance benchmarks
-
--# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
--# because then "make check" would also build and run all of gmock's own tests,
--# which takes a lot of time and is generally not useful to us. Also, we don't
--# want "make install" to recurse into gmock since we don't want to overwrite
--# the installed version of gmock if there is one.
- check-local:
-- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
-- @cd gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
-- @cd gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-
--# We would like to clean gmock when "make clean" is invoked. But we have to
--# be careful because clean-local is also invoked during "make distclean", but
--# "make distclean" already recurses into gmock because it's listed among the
--# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
--# cd to the directory again and "make clean" it will fail. So, check that the
--# Makefile exists before recursing.
- clean-local:
-- @if test -e gmock/Makefile; then \
-- echo "Making clean in gmock"; \
-- cd gmock && $(MAKE) $(AM_MAKEFLAGS) clean; \
-- fi; \
-- if test -e conformance/Makefile; then \
-+ @if test -e conformance/Makefile; then \
- echo "Making clean in conformance"; \
- cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
- fi; \
---- /configure.ac
-+++ /configure.ac
-@@ -200,12 +200,5 @@
-
- AX_CXX_COMPILE_STDCXX([11], [noext], [optional])
-
--# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
--# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
--# too.
--export CFLAGS
--export CXXFLAGS
--AC_CONFIG_SUBDIRS([gmock])
--
- AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
- AC_OUTPUT
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -752,11 +752,7 @@
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
- no-warning-test $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- ../gmock/gtest/lib/libgtest.la \
-- ../gmock/lib/libgmock.la \
-- ../gmock/lib/libgmock_main.la
--protobuf_test_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include \
-- -I$(srcdir)/../gmock/include
-+ -lgtest -lgmock -lgmock_main
- # Disable optimization for tests unless the user explicitly asked for it,
- # since test_util.cc takes forever to compile with optimization (with GCC).
- # See configure.ac for more info.
-@@ -843,12 +839,8 @@
- # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
- protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
- libprotoc.la \
-- ../gmock/gtest/lib/libgtest.la \
-- ../gmock/lib/libgmock.la \
-- ../gmock/lib/libgmock_main.la
--protobuf_lazy_descriptor_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
-- -I$(srcdir)/../gmock/gtest/include \
-- -DPROTOBUF_TEST_NO_DESCRIPTORS
-+ -lgtest -lgmock -lgmock_main
-+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
- protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lazy_descriptor_test_SOURCES = \
- google/protobuf/compiler/cpp/cpp_unittest.cc \
-@@ -868,11 +860,7 @@
- # full runtime and we want to make sure this test builds without full
- # runtime.
- protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- ../gmock/gtest/lib/libgtest.la \
-- ../gmock/lib/libgmock.la \
-- ../gmock/lib/libgmock_main.la
--protobuf_lite_test_CPPFLAGS= -I$(srcdir)/../gmock/include \
-- -I$(srcdir)/../gmock/gtest/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_test_SOURCES = \
- google/protobuf/lite_unittest.cc \
-@@ -883,11 +871,7 @@
- # gtest when building the test internally our memory sanitizer doesn't detect
- # memory leaks (don't know why).
- protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- ../gmock/gtest/lib/libgtest.la \
-- ../gmock/lib/libgmock.la \
-- ../gmock/lib/libgmock_main.la
--protobuf_lite_arena_test_CPPFLAGS = -I$(srcdir)/../gmock/include \
-- -I$(srcdir)/../gmock/gtest/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_arena_test_SOURCES = \
- google/protobuf/lite_arena_unittest.cc \
-@@ -896,8 +880,7 @@
-
- # Test plugin binary.
- test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- ../gmock/gtest/lib/libgtest.la
--test_plugin_CPPFLAGS = -I$(srcdir)/../gmock/gtest/include
-+ -lgtest
- test_plugin_SOURCES = \
- google/protobuf/compiler/mock_code_generator.cc \
- google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch b/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch
deleted file mode 100644
index 9582431d41f..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.5.0-atomic_operations.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://github.com/protocolbuffers/protobuf/issues/3937
-https://github.com/protocolbuffers/protobuf/pull/3955
-https://github.com/protocolbuffers/protobuf/commit/642e1ac635f2563b4a14c255374f02645ae85dac
-
---- /src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
-+++ /src/google/protobuf/stubs/atomicops_internals_generic_gcc.h
-@@ -146,6 +146,14 @@
- return __atomic_load_n(ptr, __ATOMIC_RELAXED);
- }
-
-+inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
-+ Atomic64 old_value,
-+ Atomic64 new_value) {
-+ __atomic_compare_exchange_n(ptr, &old_value, new_value, false,
-+ __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
-+ return old_value;
-+}
-+
- #endif // defined(__LP64__)
-
- } // namespace internal
diff --git a/dev-libs/protobuf/protobuf-3.5.1.1.ebuild b/dev-libs/protobuf/protobuf-3.5.1.1.ebuild
deleted file mode 100644
index b64b56a4da1..00000000000
--- a/dev-libs/protobuf/protobuf-3.5.1.1.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0/15"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="emacs examples static-libs test zlib"
-
-RDEPEND="emacs? ( virtual/emacs )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.4.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.4.0-protoc_input_output_files.patch"
- "${FILESDIR}/${PN}-3.5.0-atomic_operations.patch"
-)
-
-DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- local myeconfargs=(
- $(use_enable static-libs static)
- $(use_with zlib)
- )
-
- if tc-is-cross-compiler; then
- # The build system wants `protoc` when building, so we need a copy that
- # runs on the host. This is more hermetic than relying on the version
- # installed in the host being the exact same version.
- mkdir -p "${WORKDIR}/build" || die
- pushd "${WORKDIR}/build" > /dev/null || die
- ECONF_SOURCE="${S}" econf_build "${myeconfargs[@]}"
- myeconfargs+=(--with-protoc="${PWD}"/src/protoc)
- popd > /dev/null || die
- fi
-
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-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() {
- 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
-}
diff --git a/dev-libs/protobuf/protobuf-3.5.2.ebuild b/dev-libs/protobuf/protobuf-3.5.2.ebuild
deleted file mode 100644
index 0ed30529f28..00000000000
--- a/dev-libs/protobuf/protobuf-3.5.2.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0/15"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="emacs examples static-libs test zlib"
-
-RDEPEND="emacs? ( virtual/emacs )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.4.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.4.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.4.0-protoc_input_output_files.patch"
- "${FILESDIR}/${PN}-3.5.0-atomic_operations.patch"
-)
-
-DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
- 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() {
- 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
-}
diff --git a/dev-libs/protobuf/protobuf-3.6.0.1.ebuild b/dev-libs/protobuf/protobuf-3.6.0.1.ebuild
deleted file mode 100644
index fc490f98194..00000000000
--- a/dev-libs/protobuf/protobuf-3.6.0.1.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0/16"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="emacs examples static-libs test zlib"
-
-RDEPEND="emacs? ( virtual/emacs )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.6.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.6.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.6.0-protoc_input_output_files.patch"
-)
-
-DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
- 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 "${D}" -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
-}
diff --git a/dev-libs/protobuf/protobuf-3.6.1.1.ebuild b/dev-libs/protobuf/protobuf-3.6.1.1.ebuild
deleted file mode 100644
index 1d00ee9032f..00000000000
--- a/dev-libs/protobuf/protobuf-3.6.1.1.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2008-2018 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
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0/17"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="emacs examples static-libs test zlib"
-RESTRICT="!test? ( test )"
-
-BDEPEND="emacs? ( virtual/emacs )"
-DEPEND="test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-RDEPEND="emacs? ( virtual/emacs )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.6.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.6.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.6.0-protoc_input_output_files.patch"
- "${FILESDIR}/${PN}-3.6.1-libatomic_linking.patch"
-)
-
-DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
- 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 "${D}" -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
-}
diff --git a/dev-libs/protobuf/protobuf-3.6.1.2.ebuild b/dev-libs/protobuf/protobuf-3.6.1.2.ebuild
deleted file mode 100644
index 1d00ee9032f..00000000000
--- a/dev-libs/protobuf/protobuf-3.6.1.2.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2008-2018 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
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0/17"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="emacs examples static-libs test zlib"
-RESTRICT="!test? ( test )"
-
-BDEPEND="emacs? ( virtual/emacs )"
-DEPEND="test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-RDEPEND="emacs? ( virtual/emacs )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.6.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.6.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.6.0-protoc_input_output_files.patch"
- "${FILESDIR}/${PN}-3.6.1-libatomic_linking.patch"
-)
-
-DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
- 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 "${D}" -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
-}
diff --git a/dev-libs/protobuf/protobuf-3.6.1.ebuild b/dev-libs/protobuf/protobuf-3.6.1.ebuild
deleted file mode 100644
index c8c5f7d7e2f..00000000000
--- a/dev-libs/protobuf/protobuf-3.6.1.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0/17"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="emacs examples static-libs test zlib"
-
-RDEPEND="emacs? ( virtual/emacs )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.6.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.6.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.6.0-protoc_input_output_files.patch"
- "${FILESDIR}/${PN}-3.6.1-libatomic_linking.patch"
-)
-
-DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
- 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 "${D}" -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
-}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2019-06-18 15:59 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2019-06-18 15:59 UTC (permalink / raw
To: gentoo-commits
commit: 54d3b535ce7c5ed14a67512eb549d5b88364728f
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Jun 17 17:37:14 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jun 18 15:59:05 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54d3b535
dev-libs/protobuf: Version bump (3.8.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 +
.../protobuf-3.8.0-disable_no-warning-test.patch | 19 ++++
.../protobuf-3.8.0-protoc_input_output_files.patch | 4 +-
.../files/protobuf-3.8.0-system_libraries.patch | 121 +++++++++++++++++++++
...{protobuf-9999.ebuild => protobuf-3.8.0.ebuild} | 20 +++-
dev-libs/protobuf/protobuf-9999.ebuild | 12 +-
6 files changed, 164 insertions(+), 13 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 766a6d89f8d..58f115f98dd 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,2 +1,3 @@
DIST protobuf-3.6.1.3.tar.gz 4490599 BLAKE2B 5a058f937330bd562e364a8d86e0b1376fdac9fded0fd23d6914cb59c5c15e8bfc1e203ea36b5a4eece8919708c1a9a6616b0ec2028d6ec339704da53ed81963 SHA512 9eadb46c7daa19e612516958169bc90943b38b429a4b2cf2171b66b57f50a2f8a9b66cbf58bdd44517af414b78e0f3ab2e1361891dc60ecd098185da2638d37e
DIST protobuf-3.7.1.tar.gz 4795774 BLAKE2B a91155169623ee24ba49e397b151829321c01ff06bb27541e6c02701c37ac96ea9606961291ef0d4616dd6dba045bf7e893ec6288f5809d30cc026b60ae76590 SHA512 7d4cfabd4bd55926336a3baafa0bc1f1f15380b1b2af945f70a2bb3ba24c6ac6567f49c492326d6d1c43a488166bff178f9266377758a05d8541d8b242f4f80f
+DIST protobuf-3.8.0.tar.gz 4934577 BLAKE2B 4b86ab216e8a8b2c99c3620da9417c0562498e9d4dbf4957db186f51c62b0ed73b1322635a076b2d4054e015bdf6c8c50cc7fd0cb78d24a93b29d2a5b48f66fe SHA512 ba27c64e5193cd4a144bf0c9dc0d195fbbe6e580aaca01960362f0f185074588ca40046d3bcea76e1deae7508b722f6c5be484ea957122ae8e98229c7c3a4ad2
diff --git a/dev-libs/protobuf/files/protobuf-3.8.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.8.0-disable_no-warning-test.patch
new file mode 100644
index 00000000000..a09edb9ef36
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.8.0-disable_no-warning-test.patch
@@ -0,0 +1,19 @@
+Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
+
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -715,7 +715,7 @@
+ GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+- no-warning-test $(GZCHECKPROGRAMS)
++ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+ $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+ $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+@@ -899,4 +899,4 @@
+
+ TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
+ google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
+- protobuf-lite-arena-test no-warning-test
++ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.8.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.8.0-protoc_input_output_files.patch
index a60bd74f39a..fafd4bdb8f9 100644
--- a/dev-libs/protobuf/files/protobuf-3.8.0-protoc_input_output_files.patch
+++ b/dev-libs/protobuf/files/protobuf-3.8.0-protoc_input_output_files.patch
@@ -222,7 +222,7 @@ https://github.com/protocolbuffers/protobuf/pull/235
// command is automatically split on spaces, and the string "$tmpdir"
// is replaced with TestTempDir().
void Run(const std::string& command);
-@@ -2337,6 +2337,17 @@
+@@ -2335,6 +2335,17 @@
EXPECT_EQ(StripCR(expected_text), StripCR(captured_stderr_));
}
@@ -240,7 +240,7 @@ https://github.com/protocolbuffers/protobuf/pull/235
private:
void WriteUnittestProtoDescriptorSet() {
unittest_proto_descriptor_set_filename_ =
-@@ -2431,6 +2442,19 @@
+@@ -2429,6 +2440,19 @@
"net/proto2/internal/no_such_file.proto: No such file or directory\n");
}
diff --git a/dev-libs/protobuf/files/protobuf-3.8.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.8.0-system_libraries.patch
new file mode 100644
index 00000000000..020b0cc74aa
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.8.0-system_libraries.patch
@@ -0,0 +1,121 @@
+--- /Makefile.am
++++ /Makefile.am
+@@ -11,28 +11,10 @@
+ # Always include third_party directories in distributions.
+ DIST_SUBDIRS = src conformance benchmarks third_party/googletest
+
+-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
+-# because then "make check" would also build and run all of gmock's own tests,
+-# which takes a lot of time and is generally not useful to us. Also, we don't
+-# want "make install" to recurse into gmock since we don't want to overwrite
+-# the installed version of gmock if there is one.
+ check-local:
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
+- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+
+-# We would like to clean gmock when "make clean" is invoked. But we have to
+-# be careful because clean-local is also invoked during "make distclean", but
+-# "make distclean" already recurses into gmock because it's listed among the
+-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
+-# cd to the directory again and "make clean" it will fail. So, check that the
+-# Makefile exists before recursing.
+ clean-local:
+- @if test -e third_party/googletest/Makefile; then \
+- echo "Making clean in googletest"; \
+- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
+- fi; \
+- if test -e conformance/Makefile; then \
++ @if test -e conformance/Makefile; then \
+ echo "Making clean in conformance"; \
+ cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
+ fi; \
+--- /configure.ac
++++ /configure.ac
+@@ -218,12 +218,5 @@
+ esac
+ AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
+
+-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
+-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
+-# too.
+-export CFLAGS
+-export CXXFLAGS
+-AC_CONFIG_SUBDIRS([third_party/googletest])
+-
+ AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -709,19 +709,11 @@
+ google/protobuf/testing/file.cc \
+ google/protobuf/testing/file.h
+
+-GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
+-GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
+-GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
+-GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
+- -I$(GOOGLEMOCK_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ # Disable optimization for tests unless the user explicitly asked for it,
+ # since test_util.cc takes forever to compile with optimization (with GCC).
+ # See configure.ac for more info.
+@@ -810,12 +802,8 @@
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+ libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include \
+- -DPROTOBUF_TEST_NO_DESCRIPTORS
++ -lgtest -lgmock -lgmock_main
++protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lazy_descriptor_test_SOURCES = \
+ google/protobuf/compiler/cpp/cpp_unittest.cc \
+@@ -836,11 +824,7 @@
+ # full runtime and we want to make sure this test builds without full
+ # runtime.
+ protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_test_SOURCES = \
+ google/protobuf/lite_unittest.cc \
+@@ -852,11 +836,7 @@
+ # gtest when building the test internally our memory sanitizer doesn't detect
+ # memory leaks (don't know why).
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_arena_test_SOURCES = \
+ google/protobuf/lite_arena_unittest.cc \
+@@ -866,8 +846,7 @@
+
+ # Test plugin binary.
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest
+ test_plugin_SOURCES = \
+ google/protobuf/compiler/mock_code_generator.cc \
+ google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.8.0.ebuild
similarity index 82%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.8.0.ebuild
index ab63263883b..345fbe9a3df 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.8.0.ebuild
@@ -1,6 +1,8 @@
-# Copyright 2008-2019 Arfrever Frehtes Taifersar Arahesis and others
+# Copyright 2008-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# True Authors: Arfrever Frehtes Taifersar Arahesis and others
+
EAPI="7"
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
@@ -21,20 +23,20 @@ else
fi
LICENSE="BSD"
-SLOT="0/18"
-KEYWORDS=""
+SLOT="0/19"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
BDEPEND="emacs? ( virtual/emacs )"
-DEPEND="test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )
+DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
RDEPEND="emacs? ( virtual/emacs )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.7.1-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.8.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.8.0-system_libraries.patch"
"${FILESDIR}/${PN}-3.8.0-protoc_input_output_files.patch"
)
@@ -47,6 +49,12 @@ src_prepare() {
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild
index ab63263883b..f244ade24dc 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-9999.ebuild
@@ -1,6 +1,8 @@
-# Copyright 2008-2019 Arfrever Frehtes Taifersar Arahesis and others
+# Copyright 2008-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+# True Authors: Arfrever Frehtes Taifersar Arahesis and others
+
EAPI="7"
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
@@ -21,20 +23,20 @@ else
fi
LICENSE="BSD"
-SLOT="0/18"
+SLOT="0/19"
KEYWORDS=""
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
BDEPEND="emacs? ( virtual/emacs )"
-DEPEND="test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )
+DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
RDEPEND="emacs? ( virtual/emacs )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.7.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.7.1-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.8.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.8.0-system_libraries.patch"
"${FILESDIR}/${PN}-3.8.0-protoc_input_output_files.patch"
)
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2019-12-06 20:25 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2019-12-06 20:25 UTC (permalink / raw
To: gentoo-commits
commit: 90d11c8359b1720cc60a1d70f1506f37a7082fff
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Dec 6 06:43:01 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Dec 6 20:24:35 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90d11c83
dev-libs/protobuf: Delete old version (3.6.1.3).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 -
.../protobuf-3.6.0-disable_no-warning-test.patch | 19 --
.../protobuf-3.6.0-protoc_input_output_files.patch | 233 ---------------------
.../files/protobuf-3.6.0-system_libraries.patch | 121 -----------
.../files/protobuf-3.6.1-libatomic_linking.patch | 49 -----
dev-libs/protobuf/protobuf-3.6.1.3.ebuild | 108 ----------
6 files changed, 531 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 97fd9491786..7a362466e88 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,5 +1,4 @@
DIST protobuf-3.10.1.tar.gz 4905995 BLAKE2B 1dde3b6260918da8430c2ce69210462f339c492b2a4e53d5d9c1bea3747aead905370507fc4bd703560f6885c0f3f8393a998b875c19744ad94827109ecbb49f SHA512 aba0c4034c0d3b1759904adb6270eee94dd5dc568f433b219e3f1f70c0033993cdfa3bf476ad3f5767c7629edb9fd029c686405abf93731dde808286b336330d
-DIST protobuf-3.6.1.3.tar.gz 4490599 BLAKE2B 5a058f937330bd562e364a8d86e0b1376fdac9fded0fd23d6914cb59c5c15e8bfc1e203ea36b5a4eece8919708c1a9a6616b0ec2028d6ec339704da53ed81963 SHA512 9eadb46c7daa19e612516958169bc90943b38b429a4b2cf2171b66b57f50a2f8a9b66cbf58bdd44517af414b78e0f3ab2e1361891dc60ecd098185da2638d37e
DIST protobuf-3.7.1.tar.gz 4795774 BLAKE2B a91155169623ee24ba49e397b151829321c01ff06bb27541e6c02701c37ac96ea9606961291ef0d4616dd6dba045bf7e893ec6288f5809d30cc026b60ae76590 SHA512 7d4cfabd4bd55926336a3baafa0bc1f1f15380b1b2af945f70a2bb3ba24c6ac6567f49c492326d6d1c43a488166bff178f9266377758a05d8541d8b242f4f80f
DIST protobuf-3.8.0.tar.gz 4934577 BLAKE2B 4b86ab216e8a8b2c99c3620da9417c0562498e9d4dbf4957db186f51c62b0ed73b1322635a076b2d4054e015bdf6c8c50cc7fd0cb78d24a93b29d2a5b48f66fe SHA512 ba27c64e5193cd4a144bf0c9dc0d195fbbe6e580aaca01960362f0f185074588ca40046d3bcea76e1deae7508b722f6c5be484ea957122ae8e98229c7c3a4ad2
DIST protobuf-3.9.1.tar.gz 4947402 BLAKE2B c1e366438ca619044d84d7a75453c35b48d5f64867b7aaec78c04966d4e62223a8909a28be850156ce3d47f0e7f42e80a231ec5d814d2820e1edfa963d89e177 SHA512 9accb56c1aadef83bf27280e15a99809a3561cbd4b39d6605dec730cc112bf4fd2e9f1ac39127b32a1b87253e712be4b4f12afe4061a8f7be76266b3f4bca314
diff --git a/dev-libs/protobuf/files/protobuf-3.6.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.6.0-disable_no-warning-test.patch
deleted file mode 100644
index 834f6b0d1ab..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.6.0-disable_no-warning-test.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
-
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -717,7 +717,7 @@
- GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
-- no-warning-test $(GZCHECKPROGRAMS)
-+ $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-@@ -900,4 +900,4 @@
-
- TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
- google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
-- protobuf-lite-arena-test no-warning-test
-+ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.6.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.6.0-protoc_input_output_files.patch
deleted file mode 100644
index 8b583522f46..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.6.0-protoc_input_output_files.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-https://github.com/protocolbuffers/protobuf/pull/235
-
---- /src/google/protobuf/compiler/command_line_interface.cc
-+++ /src/google/protobuf/compiler/command_line_interface.cc
-@@ -931,6 +931,28 @@
- }
-
- if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
-+ bool success = false;
-+ int in_fd = STDIN_FILENO;
-+ int out_fd = STDOUT_FILENO;
-+
-+ if (!protobuf_in_path_.empty()) {
-+ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
-+ if (in_fd == -1) {
-+ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
-+ return 1;
-+ }
-+ }
-+ if (!protobuf_out_path_.empty()) {
-+ out_fd = open(protobuf_out_path_.c_str(),
-+ O_WRONLY | O_CREAT | O_TRUNC,
-+ 0644);
-+ if (out_fd == -1) {
-+ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
-+ close(in_fd);
-+ return 1;
-+ }
-+ }
-+
- if (codec_type_.empty()) {
- // HACK: Define an EmptyMessage type to use for decoding.
- DescriptorPool pool;
-@@ -939,13 +961,20 @@
- file.add_message_type()->set_name("EmptyMessage");
- GOOGLE_CHECK(pool.BuildFile(file) != NULL);
- codec_type_ = "EmptyMessage";
-- if (!EncodeOrDecode(&pool)) {
-- return 1;
-- }
-+ success = EncodeOrDecode(&pool, in_fd, out_fd);
- } else {
-- if (!EncodeOrDecode(descriptor_pool.get())) {
-- return 1;
-- }
-+ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
-+ }
-+
-+ if (in_fd != STDIN_FILENO) {
-+ close(in_fd);
-+ }
-+ if (out_fd != STDOUT_FILENO) {
-+ close(out_fd);
-+ }
-+
-+ if (!success) {
-+ return 1;
- }
- }
-
-@@ -983,6 +1012,11 @@
- for (int i = 0; i < proto_path_.size(); i++) {
- source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
- }
-+ if (mode_ == MODE_COMPILE &&
-+ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
-+ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
-+ << "decode operations. Ignoring.";
-+ }
-
- // Map input files to virtual paths if possible.
- if (!MakeInputsBeProtoPathRelative(source_tree)) {
-@@ -1571,6 +1605,12 @@
-
- codec_type_ = value;
-
-+ } else if (name == "--protobuf_in") {
-+ protobuf_in_path_ = value;
-+
-+ } else if (name == "--protobuf_out") {
-+ protobuf_out_path_ = value;
-+
- } else if (name == "--error_format") {
- if (value == "gcc") {
- error_format_ = ERROR_FORMAT_GCC;
-@@ -1693,18 +1733,29 @@
- " --version Show version info and exit.\n"
- " -h, --help Show this text and exit.\n"
- " --encode=MESSAGE_TYPE Read a text-format message of the given type\n"
--" from standard input and write it in binary\n"
--" to standard output. The message type must\n"
--" be defined in PROTO_FILES or their imports.\n"
--" --decode=MESSAGE_TYPE Read a binary message of the given type from\n"
--" standard input and write it in text format\n"
--" to standard output. The message type must\n"
-+" an write it in binary. The message type must\n"
- " be defined in PROTO_FILES or their imports.\n"
--" --decode_raw Read an arbitrary protocol message from\n"
--" standard input and write the raw tag/value\n"
--" pairs in text format to standard output. No\n"
-+" The input/output protobuf files are specified\n"
-+" using the --protobuf_in and --protobuf_out\n"
-+" command line flags.\n"
-+" --decode=MESSAGE_TYPE Read a binary message of the given type and\n"
-+" write it in text format. The message type\n"
-+" must be defined in PROTO_FILES or their\n"
-+" imports. The input/output protobuf files are\n"
-+" specified using the --protobuf_in and \n"
-+" --protobuf_out command line flags.\n"
-+" --decode_raw Read an arbitrary protocol message and write\n"
-+" the raw tag/value pairs in text format. No\n"
- " PROTO_FILES should be given when using this\n"
--" flag.\n"
-+" flag. The input/output protobuf files are\n"
-+" specified using the --protobuf_in and \n"
-+" --protobuf_out command line flags.\n"
-+" --protobuf_in Absolute path to the protobuf file to read to\n"
-+" encode/decode. If omitted, file will be read\n"
-+" from STDIN.\n"
-+" --protobuf_out Absolute path to the protobuf file to write to\n"
-+" after encode/decode operation. If omitted,\n"
-+" output is written to STDOUT.\n"
- " --descriptor_set_in=FILES Specifies a delimited list of FILES\n"
- " each containing a FileDescriptorSet (a\n"
- " protocol buffer defined in descriptor.proto).\n"
-@@ -1983,7 +2034,9 @@
- return true;
- }
-
--bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
-+bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd) {
- // Look up the type.
- const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
- if (type == NULL) {
-@@ -1995,15 +2048,15 @@
- std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
-
- if (mode_ == MODE_ENCODE) {
-- SetFdToTextMode(STDIN_FILENO);
-- SetFdToBinaryMode(STDOUT_FILENO);
-+ SetFdToTextMode(in_fd);
-+ SetFdToBinaryMode(out_fd);
- } else {
-- SetFdToBinaryMode(STDIN_FILENO);
-- SetFdToTextMode(STDOUT_FILENO);
-+ SetFdToBinaryMode(in_fd);
-+ SetFdToTextMode(out_fd);
- }
-
-- io::FileInputStream in(STDIN_FILENO);
-- io::FileOutputStream out(STDOUT_FILENO);
-+ io::FileInputStream in(in_fd);
-+ io::FileOutputStream out(out_fd);
-
- if (mode_ == MODE_ENCODE) {
- // Input is text.
---- /src/google/protobuf/compiler/command_line_interface.h
-+++ /src/google/protobuf/compiler/command_line_interface.h
-@@ -272,7 +272,9 @@
- GeneratorContext* generator_context, string* error);
-
- // Implements --encode and --decode.
-- bool EncodeOrDecode(const DescriptorPool* pool);
-+ bool EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd);
-
- // Implements the --descriptor_set_out option.
- bool WriteDescriptorSet(
-@@ -405,6 +407,13 @@
- // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
- std::vector<string> descriptor_set_in_names_;
-
-+ // When using --encode / --decode / --decode_raw absolute path to the output
-+ // file. (Empty string indicates write to STDOUT).
-+ string protobuf_out_path_;
-+ // When using --encode / --decode / --decode_raw, absolute path to the input
-+ // file. (Empty string indicates read from STDIN).
-+ string protobuf_in_path_;
-+
- // If --descriptor_set_out was given, this is the filename to which the
- // FileDescriptorSet should be written. Otherwise, empty.
- string descriptor_set_out_name_;
---- /src/google/protobuf/compiler/command_line_interface_unittest.cc
-+++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
-@@ -94,7 +94,7 @@
- virtual void SetUp();
- virtual void TearDown();
-
-- // Runs the CommandLineInterface with the given command line. The
-+ // Run the CommandLineInterface with the given command line. The
- // command is automatically split on spaces, and the string "$tmpdir"
- // is replaced with TestTempDir().
- void Run(const string& command);
-@@ -2337,6 +2337,17 @@
- EXPECT_EQ(StripCR(expected_text), StripCR(captured_stderr_));
- }
-
-+ void ExpectBinaryFilesMatch(const string &expected_file,
-+ const string &actual_file) {
-+ string expected_output, actual_output;
-+ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
-+ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
-+
-+ // Don't use EXPECT_EQ because we don't want to print raw binary data to
-+ // stdout on failure.
-+ EXPECT_TRUE(expected_output == actual_output);
-+ }
-+
- private:
- void WriteUnittestProtoDescriptorSet() {
- unittest_proto_descriptor_set_filename_ =
-@@ -2427,6 +2438,18 @@
- "google/protobuf/no_such_file.proto: No such file or directory\n");
- }
-
-+TEST_P(EncodeDecodeTest, RedirectInputOutput) {
-+ string out_file = TestTempDir() + "/golden_message_out.pbf";
-+ string cmd = "";
-+ cmd += "google/protobuf/unittest.proto ";
-+ cmd += "--encode=protobuf_unittest.TestAllTypes ";
-+ cmd += "--protobuf_in=" + TestSourceDir() +
-+ "/google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt ";
-+ cmd += "--protobuf_out=" + out_file;
-+ EXPECT_TRUE(Run(cmd));
-+ ExpectBinaryFilesMatch(out_file, TestSourceDir() + "/google/protobuf/testdata/golden_message_oneof_implemented");
-+}
-+
- INSTANTIATE_TEST_CASE_P(FileDescriptorSetSource,
- EncodeDecodeTest,
- testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
diff --git a/dev-libs/protobuf/files/protobuf-3.6.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.6.0-system_libraries.patch
deleted file mode 100644
index b1408f050e0..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.6.0-system_libraries.patch
+++ /dev/null
@@ -1,121 +0,0 @@
---- /Makefile.am
-+++ /Makefile.am
-@@ -11,28 +11,10 @@
- # Always include third_party directories in distributions.
- DIST_SUBDIRS = src conformance benchmarks third_party/googletest
-
--# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
--# because then "make check" would also build and run all of gmock's own tests,
--# which takes a lot of time and is generally not useful to us. Also, we don't
--# want "make install" to recurse into gmock since we don't want to overwrite
--# the installed version of gmock if there is one.
- check-local:
-- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
-- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
-
--# We would like to clean gmock when "make clean" is invoked. But we have to
--# be careful because clean-local is also invoked during "make distclean", but
--# "make distclean" already recurses into gmock because it's listed among the
--# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
--# cd to the directory again and "make clean" it will fail. So, check that the
--# Makefile exists before recursing.
- clean-local:
-- @if test -e third_party/googletest/Makefile; then \
-- echo "Making clean in googletest"; \
-- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
-- fi; \
-- if test -e conformance/Makefile; then \
-+ @if test -e conformance/Makefile; then \
- echo "Making clean in conformance"; \
- cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
- fi; \
---- /configure.ac
-+++ /configure.ac
-@@ -209,12 +209,5 @@
-
- AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
-
--# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
--# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
--# too.
--export CFLAGS
--export CXXFLAGS
--AC_CONFIG_SUBDIRS([third_party/googletest])
--
- AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
- AC_OUTPUT
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -711,19 +711,11 @@
- google/protobuf/testing/file.cc \
- google/protobuf/testing/file.h
-
--GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
--GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
--GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
--GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
- $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
-- -I$(GOOGLEMOCK_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- # Disable optimization for tests unless the user explicitly asked for it,
- # since test_util.cc takes forever to compile with optimization (with GCC).
- # See configure.ac for more info.
-@@ -811,12 +803,8 @@
- # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
- protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
- libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include \
-- -DPROTOBUF_TEST_NO_DESCRIPTORS
-+ -lgtest -lgmock -lgmock_main
-+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
- protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lazy_descriptor_test_SOURCES = \
- google/protobuf/compiler/cpp/cpp_unittest.cc \
-@@ -837,11 +825,7 @@
- # full runtime and we want to make sure this test builds without full
- # runtime.
- protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_test_SOURCES = \
- google/protobuf/lite_unittest.cc \
-@@ -853,11 +837,7 @@
- # gtest when building the test internally our memory sanitizer doesn't detect
- # memory leaks (don't know why).
- protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_arena_test_SOURCES = \
- google/protobuf/lite_arena_unittest.cc \
-@@ -867,8 +847,7 @@
-
- # Test plugin binary.
- test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
--test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest
- test_plugin_SOURCES = \
- google/protobuf/compiler/mock_code_generator.cc \
- google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch b/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch
deleted file mode 100644
index 2b357b21317..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-https://github.com/protocolbuffers/protobuf/issues/5219
-https://github.com/protocolbuffers/protobuf/pull/5227
-https://github.com/protocolbuffers/protobuf/commit/56b40a8f055cfd05633054aed5d3466a6e058b72
-
---- /configure.ac
-+++ /configure.ac
-@@ -165,6 +165,22 @@
- ])
- AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1])
-
-+dnl On some platforms, std::atomic needs a helper library
-+AC_MSG_CHECKING(whether -latomic is needed)
-+AC_LINK_IFELSE([AC_LANG_SOURCE([[
-+ #include <atomic>
-+ #include <cstdint>
-+ std::atomic<std::int64_t> v;
-+ int main() {
-+ return v;
-+ }
-+]])], STD_ATOMIC_NEED_LIBATOMIC=no, STD_ATOMIC_NEED_LIBATOMIC=yes)
-+AC_MSG_RESULT($STD_ATOMIC_NEED_LIBATOMIC)
-+if test "x$STD_ATOMIC_NEED_LIBATOMIC" = xyes; then
-+ LIBATOMIC_LIBS="-latomic"
-+fi
-+AC_SUBST([LIBATOMIC_LIBS])
-+
- AS_IF([test "$with_protoc" != "no"], [
- PROTOC=$with_protoc
- AS_IF([test "$with_protoc" = "yes"], [
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -163,7 +163,7 @@
-
- lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
-
--libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
-+libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
- libprotobuf_lite_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
- if HAVE_LD_VERSION_SCRIPT
- libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
-@@ -209,7 +209,7 @@
- google/protobuf/io/zero_copy_stream.cc \
- google/protobuf/io/zero_copy_stream_impl_lite.cc
-
--libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
-+libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
- libprotobuf_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
- if HAVE_LD_VERSION_SCRIPT
- libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
diff --git a/dev-libs/protobuf/protobuf-3.6.1.3.ebuild b/dev-libs/protobuf/protobuf-3.6.1.3.ebuild
deleted file mode 100644
index d498903c8c4..00000000000
--- a/dev-libs/protobuf/protobuf-3.6.1.3.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2008-2019 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
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0/17"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="emacs examples static-libs test zlib"
-RESTRICT="!test? ( test )"
-
-BDEPEND="emacs? ( virtual/emacs )"
-DEPEND="test? ( >=dev-cpp/gtest-1.8.0[${MULTILIB_USEDEP}] )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-RDEPEND="emacs? ( virtual/emacs )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.6.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.6.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.6.0-protoc_input_output_files.patch"
- "${FILESDIR}/${PN}-3.6.1-libatomic_linking.patch"
-)
-
-DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- append-cppflags -DGOOGLE_PROTOBUF_NO_RTTI
- 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 "${D}" -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
-}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2020-09-15 18:34 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2020-09-15 18:34 UTC (permalink / raw
To: gentoo-commits
commit: fd96fadd9439a276fa2d2ee6ea22f6df47e8aa8c
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Sep 14 08:00:00 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Sep 15 18:33:39 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd96fadd
dev-libs/protobuf: Version bump (3.13.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 +
.../protobuf-3.13.0-disable_no-warning-test.patch | 19 ++
...protobuf-3.13.0-protoc_input_output_files.patch | 262 +++++++++++++++++++++
.../files/protobuf-3.13.0-system_libraries.patch | 121 ++++++++++
...protobuf-9999.ebuild => protobuf-3.13.0.ebuild} | 23 +-
dev-libs/protobuf/protobuf-9999.ebuild | 8 +-
6 files changed, 425 insertions(+), 9 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 16296678879..a49bf7847ed 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -2,3 +2,4 @@ DIST protobuf-3.10.1.tar.gz 4905995 BLAKE2B 1dde3b6260918da8430c2ce69210462f339c
DIST protobuf-3.11.4.tar.gz 5140799 BLAKE2B 97b450c0623593efe6a42b66582ff183344b8831689e6a5b4d36096dbd57c33da9569bbf26578536aaf73ecd866ac0588b6cb7d55a6a9b9a6e840d4c57099001 SHA512 777bbb0e9e2375eaebe6b8c87abd660bac70ee469c9ad00dd25917b82d7fb5bbe33cf87f0d69c90e19d55c07a7285ec20974ba4768623ce9ccfadf147fd5e261
DIST protobuf-3.12.2.tar.gz 5309688 BLAKE2B 6f04ab75a165d8135b4c1de210f8698f56f309f73d664192209de10580e0ef850bf56f6f394b860f21912e341141f7bbb1f63198eaee55fd7ad74d86b00c3b1f SHA512 84a349a1dcb5bce6a6a892cf11264390b557ed1e7b05883b71fa9cfb7460d9f73119da1f2861066869e33c752246ea438d5ce2c2b3ff7a4b07696d9450b7916b
DIST protobuf-3.12.4.tar.gz 5310348 BLAKE2B 2630941672963165467221843c10079a0ed966f2fdfcbc970b0b41e1ed3c7f78734496c1fbd3ec509c68999a14f637fff267b309cf82a8acf2bb5a948484f79b SHA512 c5d24502b9a6be0a606a19213186fe462e0de6830547003636f0897781f36d0bd7e4e7d9689d96390a0399ce04b6438cda3a0fe6f97f0feb700a110e90beef0c
+DIST protobuf-3.13.0.tar.gz 5277913 BLAKE2B 168aaa5beef83be675cd2543ca8efeaf5174f5e7fd861a056b04b01c8c781dc7b1fcbd05068ae89f051dfacfdc47c34b19cc33c8d09dd3212d3827746e3408f2 SHA512 514efa65fc8a36bc0791e6d39bdfb07b2689e9c2a4b82536c657859b800e7bc1e1a0ae86a7ee33f30c43a473a49b5c346ce830ac0057b6da104ed37f90b8b0fd
diff --git a/dev-libs/protobuf/files/protobuf-3.13.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.13.0-disable_no-warning-test.patch
new file mode 100644
index 00000000000..1c583fec0fd
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.13.0-disable_no-warning-test.patch
@@ -0,0 +1,19 @@
+Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
+
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -708,7 +708,7 @@
+ GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+- no-warning-test $(GZCHECKPROGRAMS)
++ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+ $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+ $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+@@ -895,4 +895,4 @@
+
+ TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
+ google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
+- protobuf-lite-arena-test no-warning-test
++ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.13.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.13.0-protoc_input_output_files.patch
new file mode 100644
index 00000000000..0416aac68f6
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.13.0-protoc_input_output_files.patch
@@ -0,0 +1,262 @@
+https://github.com/protocolbuffers/protobuf/pull/235
+
+--- /src/google/protobuf/compiler/command_line_interface.cc
++++ /src/google/protobuf/compiler/command_line_interface.cc
+@@ -997,6 +997,28 @@
+ }
+
+ if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
++ bool success = false;
++ int in_fd = STDIN_FILENO;
++ int out_fd = STDOUT_FILENO;
++
++ if (!protobuf_in_path_.empty()) {
++ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
++ if (in_fd == -1) {
++ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
++ return 1;
++ }
++ }
++ if (!protobuf_out_path_.empty()) {
++ out_fd = open(protobuf_out_path_.c_str(),
++ O_WRONLY | O_CREAT | O_TRUNC,
++ 0644);
++ if (out_fd == -1) {
++ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
++ close(in_fd);
++ return 1;
++ }
++ }
++
+ if (codec_type_.empty()) {
+ // HACK: Define an EmptyMessage type to use for decoding.
+ DescriptorPool pool;
+@@ -1005,13 +1027,20 @@
+ file.add_message_type()->set_name("EmptyMessage");
+ GOOGLE_CHECK(pool.BuildFile(file) != NULL);
+ codec_type_ = "EmptyMessage";
+- if (!EncodeOrDecode(&pool)) {
+- return 1;
+- }
++ success = EncodeOrDecode(&pool, in_fd, out_fd);
+ } else {
+- if (!EncodeOrDecode(descriptor_pool.get())) {
+- return 1;
+- }
++ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
++ }
++
++ if (in_fd != STDIN_FILENO) {
++ close(in_fd);
++ }
++ if (out_fd != STDOUT_FILENO) {
++ close(out_fd);
++ }
++
++ if (!success) {
++ return 1;
+ }
+ }
+
+@@ -1049,6 +1078,11 @@
+ for (int i = 0; i < proto_path_.size(); i++) {
+ source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
+ }
++ if (mode_ == MODE_COMPILE &&
++ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
++ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
++ << "decode operations. Ignoring.";
++ }
+
+ // Map input files to virtual paths if possible.
+ if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
+@@ -1754,6 +1788,12 @@
+
+ codec_type_ = value;
+
++ } else if (name == "--protobuf_in") {
++ protobuf_in_path_ = value;
++
++ } else if (name == "--protobuf_out") {
++ protobuf_out_path_ = value;
++
+ } else if (name == "--error_format") {
+ if (value == "gcc") {
+ error_format_ = ERROR_FORMAT_GCC;
+@@ -1890,29 +1930,50 @@
+ " -h, --help Show this text and exit.\n"
+ " --encode=MESSAGE_TYPE Read a text-format message of the "
+ "given type\n"
+- " from standard input and write it in "
+- "binary\n"
+- " to standard output. The message type "
+- "must\n"
++ " and write it in binary. The message "
++ "type must\n"
+ " be defined in PROTO_FILES or their "
+ "imports.\n"
++ " The input/output protobuf files are "
++ "specified\n"
++ " using the --protobuf_in and "
++ "--protobuf_out\n"
++ " command line flags.\n"
+ " --decode=MESSAGE_TYPE Read a binary message of the given "
+- "type from\n"
+- " standard input and write it in text "
+- "format\n"
+- " to standard output. The message type "
+- "must\n"
+- " be defined in PROTO_FILES or their "
+- "imports.\n"
++ "type and\n"
++ " write it in text format. The message "
++ "type\n"
++ " must be defined in PROTO_FILES or "
++ "their imports.\n"
++ " The input/output protobuf files are "
++ "specified\n"
++ " using the --protobuf_in and "
++ "--protobuf_out\n"
++ " command line flags.\n"
+ " --decode_raw Read an arbitrary protocol message "
+- "from\n"
+- " standard input and write the raw "
+- "tag/value\n"
+- " pairs in text format to standard "
+- "output. No\n"
++ "and write\n"
++ " the raw tag/value pairs in text format."
++ " No\n"
+ " PROTO_FILES should be given when using "
+ "this\n"
+- " flag.\n"
++ " flag. The input/output protobuf files "
++ "are\n"
++ " specified using the --protobuf_in and\n"
++ " --protobuf_out command line flags.\n"
++ " --protobuf_in=FILE Absolute path to the protobuf file "
++ "from which\n"
++ " input of encoding/decoding operation "
++ "will be\n"
++ " read. If omitted, input will be read "
++ "from\n"
++ " standard input.\n"
++ " --protobuf_out=FILE Absolute path to the protobuf file "
++ "to which\n"
++ " output of encoding/decoding operation "
++ "will be\n"
++ " written. If omitted, output will be "
++ "written to\n"
++ " standard output.\n"
+ " --descriptor_set_in=FILES Specifies a delimited list of FILES\n"
+ " each containing a FileDescriptorSet "
+ "(a\n"
+@@ -2258,7 +2319,9 @@
+ return true;
+ }
+
+-bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
++bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd) {
+ // Look up the type.
+ const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
+ if (type == NULL) {
+@@ -2270,15 +2333,15 @@
+ std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
+
+ if (mode_ == MODE_ENCODE) {
+- SetFdToTextMode(STDIN_FILENO);
+- SetFdToBinaryMode(STDOUT_FILENO);
++ SetFdToTextMode(in_fd);
++ SetFdToBinaryMode(out_fd);
+ } else {
+- SetFdToBinaryMode(STDIN_FILENO);
+- SetFdToTextMode(STDOUT_FILENO);
++ SetFdToBinaryMode(in_fd);
++ SetFdToTextMode(out_fd);
+ }
+
+- io::FileInputStream in(STDIN_FILENO);
+- io::FileOutputStream out(STDOUT_FILENO);
++ io::FileInputStream in(in_fd);
++ io::FileOutputStream out(out_fd);
+
+ if (mode_ == MODE_ENCODE) {
+ // Input is text.
+--- /src/google/protobuf/compiler/command_line_interface.h
++++ /src/google/protobuf/compiler/command_line_interface.h
+@@ -296,7 +296,9 @@
+ GeneratorContext* generator_context, std::string* error);
+
+ // Implements --encode and --decode.
+- bool EncodeOrDecode(const DescriptorPool* pool);
++ bool EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd);
+
+ // Implements the --descriptor_set_out option.
+ bool WriteDescriptorSet(
+@@ -428,6 +430,13 @@
+ // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
+ std::vector<std::string> descriptor_set_in_names_;
+
++ // When using --encode / --decode / --decode_raw absolute path to the output
++ // file. (Empty string indicates write to STDOUT).
++ std::string protobuf_out_path_;
++ // When using --encode / --decode / --decode_raw, absolute path to the input
++ // file. (Empty string indicates read from STDIN).
++ std::string protobuf_in_path_;
++
+ // If --descriptor_set_out was given, this is the filename to which the
+ // FileDescriptorSet should be written. Otherwise, empty.
+ std::string descriptor_set_out_name_;
+--- /src/google/protobuf/compiler/command_line_interface_unittest.cc
++++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
+@@ -95,7 +95,7 @@
+ virtual void SetUp();
+ virtual void TearDown();
+
+- // Runs the CommandLineInterface with the given command line. The
++ // Run the CommandLineInterface with the given command line. The
+ // command is automatically split on spaces, and the string "$tmpdir"
+ // is replaced with TestTempDir().
+ void Run(const std::string& command);
+@@ -2627,6 +2627,17 @@
+ std::string::npos);
+ }
+
++ void ExpectBinaryFilesMatch(const string &expected_file,
++ const string &actual_file) {
++ string expected_output, actual_output;
++ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
++ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
++
++ // Don't use EXPECT_EQ because we don't want to print raw binary data to
++ // stdout on failure.
++ EXPECT_TRUE(expected_output == actual_output);
++ }
++
+ private:
+ void WriteUnittestProtoDescriptorSet() {
+ unittest_proto_descriptor_set_filename_ =
+@@ -2721,6 +2732,19 @@
+ "net/proto2/internal/no_such_file.proto: No such file or directory\n");
+ }
+
++TEST_P(EncodeDecodeTest, RedirectInputOutput) {
++ string out_file = TestTempDir() + "/golden_message_out.pbf";
++ EXPECT_TRUE(
++ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
++ " --encode=protobuf_unittest.TestAllTypes" +
++ " --protobuf_in=" + TestUtil::GetTestDataPath(
++ "net/proto2/internal/"
++ "testdata/text_format_unittest_data_oneof_implemented.txt") +
++ " --protobuf_out=" + out_file));
++ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
++ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
++}
++
+ INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
+ testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
+ } // anonymous namespace
diff --git a/dev-libs/protobuf/files/protobuf-3.13.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.13.0-system_libraries.patch
new file mode 100644
index 00000000000..990081ae1ab
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.13.0-system_libraries.patch
@@ -0,0 +1,121 @@
+--- /Makefile.am
++++ /Makefile.am
+@@ -11,28 +11,10 @@
+ # Always include third_party directories in distributions.
+ DIST_SUBDIRS = src conformance benchmarks third_party/googletest
+
+-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
+-# because then "make check" would also build and run all of gmock's own tests,
+-# which takes a lot of time and is generally not useful to us. Also, we don't
+-# want "make install" to recurse into gmock since we don't want to overwrite
+-# the installed version of gmock if there is one.
+ check-local:
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
+- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+
+-# We would like to clean gmock when "make clean" is invoked. But we have to
+-# be careful because clean-local is also invoked during "make distclean", but
+-# "make distclean" already recurses into gmock because it's listed among the
+-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
+-# cd to the directory again and "make clean" it will fail. So, check that the
+-# Makefile exists before recursing.
+ clean-local:
+- @if test -e third_party/googletest/Makefile; then \
+- echo "Making clean in googletest"; \
+- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
+- fi; \
+- if test -e conformance/Makefile; then \
++ @if test -e conformance/Makefile; then \
+ echo "Making clean in conformance"; \
+ cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
+ fi; \
+--- /configure.ac
++++ /configure.ac
+@@ -223,12 +223,5 @@
+ esac
+ AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
+
+-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
+-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
+-# too.
+-export CFLAGS
+-export CXXFLAGS
+-AC_CONFIG_SUBDIRS([third_party/googletest])
+-
+ AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -702,19 +702,11 @@
+ google/protobuf/testing/file.cc \
+ google/protobuf/testing/file.h
+
+-GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
+-GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
+-GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
+-GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
+- -I$(GOOGLEMOCK_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ # Disable optimization for tests unless the user explicitly asked for it,
+ # since test_util.cc takes forever to compile with optimization (with GCC).
+ # See configure.ac for more info.
+@@ -806,12 +798,8 @@
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+ libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include \
+- -DPROTOBUF_TEST_NO_DESCRIPTORS
++ -lgtest -lgmock -lgmock_main
++protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lazy_descriptor_test_SOURCES = \
+ google/protobuf/compiler/cpp/cpp_unittest.cc \
+@@ -832,11 +820,7 @@
+ # full runtime and we want to make sure this test builds without full
+ # runtime.
+ protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_test_SOURCES = \
+ google/protobuf/lite_unittest.cc \
+@@ -848,11 +832,7 @@
+ # gtest when building the test internally our memory sanitizer doesn't detect
+ # memory leaks (don't know why).
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_arena_test_SOURCES = \
+ google/protobuf/lite_arena_unittest.cc \
+@@ -862,8 +842,7 @@
+
+ # Test plugin binary.
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest
+ test_plugin_SOURCES = \
+ google/protobuf/compiler/mock_code_generator.cc \
+ google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.13.0.ebuild
similarity index 76%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.13.0.ebuild
index 510fd724cea..ae5381a0692 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.13.0.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/24"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.12.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.12.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.12.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.13.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/7682
+ sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"T is overaligned, see b\/151247138\");$/d" -i src/google/protobuf/arena.h || 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
}
@@ -89,7 +102,7 @@ multilib_src_test() {
}
multilib_src_install_all() {
- find "${D}" -name "*.la" -type f -delete || die
+ find "${ED}" -name "*.la" -delete || die
insinto /usr/share/vim/vimfiles/syntax
doins editors/proto.vim
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild
index 510fd724cea..c30e4aa6d46 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-9999.ebuild
@@ -33,9 +33,9 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.12.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.12.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.12.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.13.0-protoc_input_output_files.patch"
)
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
@@ -89,7 +89,7 @@ multilib_src_test() {
}
multilib_src_install_all() {
- find "${D}" -name "*.la" -type f -delete || die
+ find "${ED}" -name "*.la" -delete || die
insinto /usr/share/vim/vimfiles/syntax
doins editors/proto.vim
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2020-09-24 14:26 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2020-09-24 14:26 UTC (permalink / raw
To: gentoo-commits
commit: 9a961f54ae646f718b480c042bb5a3308d0701fa
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Sep 22 00:00:00 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Sep 24 14:26:40 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a961f54
dev-libs/protobuf: Delete old version (3.10.1).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 -
.../protobuf-3.8.0-disable_no-warning-test.patch | 19 --
.../protobuf-3.8.0-protoc_input_output_files.patch | 262 ---------------------
.../files/protobuf-3.8.0-system_libraries.patch | 121 ----------
dev-libs/protobuf/protobuf-3.10.1.ebuild | 128 ----------
5 files changed, 531 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index a49bf7847ed..579b5e38b3f 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,4 +1,3 @@
-DIST protobuf-3.10.1.tar.gz 4905995 BLAKE2B 1dde3b6260918da8430c2ce69210462f339c492b2a4e53d5d9c1bea3747aead905370507fc4bd703560f6885c0f3f8393a998b875c19744ad94827109ecbb49f SHA512 aba0c4034c0d3b1759904adb6270eee94dd5dc568f433b219e3f1f70c0033993cdfa3bf476ad3f5767c7629edb9fd029c686405abf93731dde808286b336330d
DIST protobuf-3.11.4.tar.gz 5140799 BLAKE2B 97b450c0623593efe6a42b66582ff183344b8831689e6a5b4d36096dbd57c33da9569bbf26578536aaf73ecd866ac0588b6cb7d55a6a9b9a6e840d4c57099001 SHA512 777bbb0e9e2375eaebe6b8c87abd660bac70ee469c9ad00dd25917b82d7fb5bbe33cf87f0d69c90e19d55c07a7285ec20974ba4768623ce9ccfadf147fd5e261
DIST protobuf-3.12.2.tar.gz 5309688 BLAKE2B 6f04ab75a165d8135b4c1de210f8698f56f309f73d664192209de10580e0ef850bf56f6f394b860f21912e341141f7bbb1f63198eaee55fd7ad74d86b00c3b1f SHA512 84a349a1dcb5bce6a6a892cf11264390b557ed1e7b05883b71fa9cfb7460d9f73119da1f2861066869e33c752246ea438d5ce2c2b3ff7a4b07696d9450b7916b
DIST protobuf-3.12.4.tar.gz 5310348 BLAKE2B 2630941672963165467221843c10079a0ed966f2fdfcbc970b0b41e1ed3c7f78734496c1fbd3ec509c68999a14f637fff267b309cf82a8acf2bb5a948484f79b SHA512 c5d24502b9a6be0a606a19213186fe462e0de6830547003636f0897781f36d0bd7e4e7d9689d96390a0399ce04b6438cda3a0fe6f97f0feb700a110e90beef0c
diff --git a/dev-libs/protobuf/files/protobuf-3.8.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.8.0-disable_no-warning-test.patch
deleted file mode 100644
index a09edb9ef36..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.8.0-disable_no-warning-test.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
-
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -715,7 +715,7 @@
- GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
-- no-warning-test $(GZCHECKPROGRAMS)
-+ $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-@@ -899,4 +899,4 @@
-
- TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
- google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
-- protobuf-lite-arena-test no-warning-test
-+ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.8.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.8.0-protoc_input_output_files.patch
deleted file mode 100644
index fafd4bdb8f9..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.8.0-protoc_input_output_files.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-https://github.com/protocolbuffers/protobuf/pull/235
-
---- /src/google/protobuf/compiler/command_line_interface.cc
-+++ /src/google/protobuf/compiler/command_line_interface.cc
-@@ -949,6 +949,28 @@
- }
-
- if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
-+ bool success = false;
-+ int in_fd = STDIN_FILENO;
-+ int out_fd = STDOUT_FILENO;
-+
-+ if (!protobuf_in_path_.empty()) {
-+ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
-+ if (in_fd == -1) {
-+ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
-+ return 1;
-+ }
-+ }
-+ if (!protobuf_out_path_.empty()) {
-+ out_fd = open(protobuf_out_path_.c_str(),
-+ O_WRONLY | O_CREAT | O_TRUNC,
-+ 0644);
-+ if (out_fd == -1) {
-+ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
-+ close(in_fd);
-+ return 1;
-+ }
-+ }
-+
- if (codec_type_.empty()) {
- // HACK: Define an EmptyMessage type to use for decoding.
- DescriptorPool pool;
-@@ -957,13 +979,20 @@
- file.add_message_type()->set_name("EmptyMessage");
- GOOGLE_CHECK(pool.BuildFile(file) != NULL);
- codec_type_ = "EmptyMessage";
-- if (!EncodeOrDecode(&pool)) {
-- return 1;
-- }
-+ success = EncodeOrDecode(&pool, in_fd, out_fd);
- } else {
-- if (!EncodeOrDecode(descriptor_pool.get())) {
-- return 1;
-- }
-+ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
-+ }
-+
-+ if (in_fd != STDIN_FILENO) {
-+ close(in_fd);
-+ }
-+ if (out_fd != STDOUT_FILENO) {
-+ close(out_fd);
-+ }
-+
-+ if (!success) {
-+ return 1;
- }
- }
-
-@@ -1001,6 +1030,11 @@
- for (int i = 0; i < proto_path_.size(); i++) {
- source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
- }
-+ if (mode_ == MODE_COMPILE &&
-+ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
-+ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
-+ << "decode operations. Ignoring.";
-+ }
-
- // Map input files to virtual paths if possible.
- if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
-@@ -1627,6 +1661,12 @@
-
- codec_type_ = value;
-
-+ } else if (name == "--protobuf_in") {
-+ protobuf_in_path_ = value;
-+
-+ } else if (name == "--protobuf_out") {
-+ protobuf_out_path_ = value;
-+
- } else if (name == "--error_format") {
- if (value == "gcc") {
- error_format_ = ERROR_FORMAT_GCC;
-@@ -1763,29 +1803,50 @@
- " -h, --help Show this text and exit.\n"
- " --encode=MESSAGE_TYPE Read a text-format message of the "
- "given type\n"
-- " from standard input and write it in "
-- "binary\n"
-- " to standard output. The message type "
-- "must\n"
-+ " and write it in binary. The message "
-+ "type must\n"
- " be defined in PROTO_FILES or their "
- "imports.\n"
-+ " The input/output protobuf files are "
-+ "specified\n"
-+ " using the --protobuf_in and "
-+ "--protobuf_out\n"
-+ " command line flags.\n"
- " --decode=MESSAGE_TYPE Read a binary message of the given "
-- "type from\n"
-- " standard input and write it in text "
-- "format\n"
-- " to standard output. The message type "
-- "must\n"
-- " be defined in PROTO_FILES or their "
-- "imports.\n"
-+ "type and\n"
-+ " write it in text format. The message "
-+ "type\n"
-+ " must be defined in PROTO_FILES or "
-+ "their imports.\n"
-+ " The input/output protobuf files are "
-+ "specified\n"
-+ " using the --protobuf_in and "
-+ "--protobuf_out\n"
-+ " command line flags.\n"
- " --decode_raw Read an arbitrary protocol message "
-- "from\n"
-- " standard input and write the raw "
-- "tag/value\n"
-- " pairs in text format to standard "
-- "output. No\n"
-+ "and write\n"
-+ " the raw tag/value pairs in text format."
-+ " No\n"
- " PROTO_FILES should be given when using "
- "this\n"
-- " flag.\n"
-+ " flag. The input/output protobuf files "
-+ "are\n"
-+ " specified using the --protobuf_in and\n"
-+ " --protobuf_out command line flags.\n"
-+ " --protobuf_in=FILE Absolute path to the protobuf file "
-+ "from which\n"
-+ " input of encoding/decoding operation "
-+ "will be\n"
-+ " read. If omitted, input will be read "
-+ "from\n"
-+ " standard input.\n"
-+ " --protobuf_out=FILE Absolute path to the protobuf file "
-+ "to which\n"
-+ " output of encoding/decoding operation "
-+ "will be\n"
-+ " written. If omitted, output will be "
-+ "written to\n"
-+ " standard output.\n"
- " --descriptor_set_in=FILES Specifies a delimited list of FILES\n"
- " each containing a FileDescriptorSet "
- "(a\n"
-@@ -2101,7 +2162,9 @@
- return true;
- }
-
--bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
-+bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd) {
- // Look up the type.
- const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
- if (type == NULL) {
-@@ -2113,15 +2176,15 @@
- std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
-
- if (mode_ == MODE_ENCODE) {
-- SetFdToTextMode(STDIN_FILENO);
-- SetFdToBinaryMode(STDOUT_FILENO);
-+ SetFdToTextMode(in_fd);
-+ SetFdToBinaryMode(out_fd);
- } else {
-- SetFdToBinaryMode(STDIN_FILENO);
-- SetFdToTextMode(STDOUT_FILENO);
-+ SetFdToBinaryMode(in_fd);
-+ SetFdToTextMode(out_fd);
- }
-
-- io::FileInputStream in(STDIN_FILENO);
-- io::FileOutputStream out(STDOUT_FILENO);
-+ io::FileInputStream in(in_fd);
-+ io::FileOutputStream out(out_fd);
-
- if (mode_ == MODE_ENCODE) {
- // Input is text.
---- /src/google/protobuf/compiler/command_line_interface.h
-+++ /src/google/protobuf/compiler/command_line_interface.h
-@@ -286,7 +286,9 @@
- GeneratorContext* generator_context, std::string* error);
-
- // Implements --encode and --decode.
-- bool EncodeOrDecode(const DescriptorPool* pool);
-+ bool EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd);
-
- // Implements the --descriptor_set_out option.
- bool WriteDescriptorSet(
-@@ -418,6 +420,13 @@
- // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
- std::vector<std::string> descriptor_set_in_names_;
-
-+ // When using --encode / --decode / --decode_raw absolute path to the output
-+ // file. (Empty string indicates write to STDOUT).
-+ std::string protobuf_out_path_;
-+ // When using --encode / --decode / --decode_raw, absolute path to the input
-+ // file. (Empty string indicates read from STDIN).
-+ std::string protobuf_in_path_;
-+
- // If --descriptor_set_out was given, this is the filename to which the
- // FileDescriptorSet should be written. Otherwise, empty.
- std::string descriptor_set_out_name_;
---- /src/google/protobuf/compiler/command_line_interface_unittest.cc
-+++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
-@@ -95,7 +95,7 @@
- virtual void SetUp();
- virtual void TearDown();
-
-- // Runs the CommandLineInterface with the given command line. The
-+ // Run the CommandLineInterface with the given command line. The
- // command is automatically split on spaces, and the string "$tmpdir"
- // is replaced with TestTempDir().
- void Run(const std::string& command);
-@@ -2335,6 +2335,17 @@
- EXPECT_EQ(StripCR(expected_text), StripCR(captured_stderr_));
- }
-
-+ void ExpectBinaryFilesMatch(const string &expected_file,
-+ const string &actual_file) {
-+ string expected_output, actual_output;
-+ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
-+ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
-+
-+ // Don't use EXPECT_EQ because we don't want to print raw binary data to
-+ // stdout on failure.
-+ EXPECT_TRUE(expected_output == actual_output);
-+ }
-+
- private:
- void WriteUnittestProtoDescriptorSet() {
- unittest_proto_descriptor_set_filename_ =
-@@ -2429,6 +2440,19 @@
- "net/proto2/internal/no_such_file.proto: No such file or directory\n");
- }
-
-+TEST_P(EncodeDecodeTest, RedirectInputOutput) {
-+ string out_file = TestTempDir() + "/golden_message_out.pbf";
-+ EXPECT_TRUE(
-+ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
-+ " --encode=protobuf_unittest.TestAllTypes" +
-+ " --protobuf_in=" + TestUtil::GetTestDataPath(
-+ "net/proto2/internal/"
-+ "testdata/text_format_unittest_data_oneof_implemented.txt") +
-+ " --protobuf_out=" + out_file));
-+ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
-+ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
-+}
-+
- INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
- testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
- } // anonymous namespace
diff --git a/dev-libs/protobuf/files/protobuf-3.8.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.8.0-system_libraries.patch
deleted file mode 100644
index 020b0cc74aa..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.8.0-system_libraries.patch
+++ /dev/null
@@ -1,121 +0,0 @@
---- /Makefile.am
-+++ /Makefile.am
-@@ -11,28 +11,10 @@
- # Always include third_party directories in distributions.
- DIST_SUBDIRS = src conformance benchmarks third_party/googletest
-
--# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
--# because then "make check" would also build and run all of gmock's own tests,
--# which takes a lot of time and is generally not useful to us. Also, we don't
--# want "make install" to recurse into gmock since we don't want to overwrite
--# the installed version of gmock if there is one.
- check-local:
-- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
-- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
-
--# We would like to clean gmock when "make clean" is invoked. But we have to
--# be careful because clean-local is also invoked during "make distclean", but
--# "make distclean" already recurses into gmock because it's listed among the
--# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
--# cd to the directory again and "make clean" it will fail. So, check that the
--# Makefile exists before recursing.
- clean-local:
-- @if test -e third_party/googletest/Makefile; then \
-- echo "Making clean in googletest"; \
-- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
-- fi; \
-- if test -e conformance/Makefile; then \
-+ @if test -e conformance/Makefile; then \
- echo "Making clean in conformance"; \
- cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
- fi; \
---- /configure.ac
-+++ /configure.ac
-@@ -218,12 +218,5 @@
- esac
- AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
-
--# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
--# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
--# too.
--export CFLAGS
--export CXXFLAGS
--AC_CONFIG_SUBDIRS([third_party/googletest])
--
- AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
- AC_OUTPUT
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -709,19 +709,11 @@
- google/protobuf/testing/file.cc \
- google/protobuf/testing/file.h
-
--GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
--GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
--GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
--GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
- $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
-- -I$(GOOGLEMOCK_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- # Disable optimization for tests unless the user explicitly asked for it,
- # since test_util.cc takes forever to compile with optimization (with GCC).
- # See configure.ac for more info.
-@@ -810,12 +802,8 @@
- # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
- protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
- libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include \
-- -DPROTOBUF_TEST_NO_DESCRIPTORS
-+ -lgtest -lgmock -lgmock_main
-+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
- protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lazy_descriptor_test_SOURCES = \
- google/protobuf/compiler/cpp/cpp_unittest.cc \
-@@ -836,11 +824,7 @@
- # full runtime and we want to make sure this test builds without full
- # runtime.
- protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_test_SOURCES = \
- google/protobuf/lite_unittest.cc \
-@@ -852,11 +836,7 @@
- # gtest when building the test internally our memory sanitizer doesn't detect
- # memory leaks (don't know why).
- protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_arena_test_SOURCES = \
- google/protobuf/lite_arena_unittest.cc \
-@@ -866,8 +846,7 @@
-
- # Test plugin binary.
- test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
--test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest
- test_plugin_SOURCES = \
- google/protobuf/compiler/mock_code_generator.cc \
- google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-3.10.1.ebuild b/dev-libs/protobuf/protobuf-3.10.1.ebuild
deleted file mode 100644
index 53bd166190b..00000000000
--- a/dev-libs/protobuf/protobuf-3.10.1.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright 2008-2020 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=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="BSD"
-SLOT="0/21"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
-IUSE="emacs examples static-libs test zlib"
-RESTRICT="!test? ( test )"
-
-BDEPEND="emacs? ( >=app-editors/emacs-23.1:* )"
-DEPEND="test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-RDEPEND="emacs? ( >=app-editors/emacs-23.1:* )
- zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.8.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.8.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.8.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
-
- 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 "${D}" -name "*.la" -type f -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
-}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2020-12-27 18:39 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2020-12-27 18:39 UTC (permalink / raw
To: gentoo-commits
commit: ef1803fa74e037b72cff1976ac97cbd74f2ef26e
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Dec 16 00:00:00 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 18:39:06 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef1803fa
dev-libs/protobuf: Delete old version (3.11.4).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 -
.../protobuf-3.11.0-disable_no-warning-test.patch | 19 --
...protobuf-3.11.0-protoc_input_output_files.patch | 262 ---------------------
.../files/protobuf-3.11.0-system_libraries.patch | 121 ----------
dev-libs/protobuf/protobuf-3.11.4.ebuild | 128 ----------
5 files changed, 531 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 517abfc7f26..f999d53e988 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,4 +1,3 @@
-DIST protobuf-3.11.4.tar.gz 5140799 BLAKE2B 97b450c0623593efe6a42b66582ff183344b8831689e6a5b4d36096dbd57c33da9569bbf26578536aaf73ecd866ac0588b6cb7d55a6a9b9a6e840d4c57099001 SHA512 777bbb0e9e2375eaebe6b8c87abd660bac70ee469c9ad00dd25917b82d7fb5bbe33cf87f0d69c90e19d55c07a7285ec20974ba4768623ce9ccfadf147fd5e261
DIST protobuf-3.12.2.tar.gz 5309688 BLAKE2B 6f04ab75a165d8135b4c1de210f8698f56f309f73d664192209de10580e0ef850bf56f6f394b860f21912e341141f7bbb1f63198eaee55fd7ad74d86b00c3b1f SHA512 84a349a1dcb5bce6a6a892cf11264390b557ed1e7b05883b71fa9cfb7460d9f73119da1f2861066869e33c752246ea438d5ce2c2b3ff7a4b07696d9450b7916b
DIST protobuf-3.12.4.tar.gz 5310348 BLAKE2B 2630941672963165467221843c10079a0ed966f2fdfcbc970b0b41e1ed3c7f78734496c1fbd3ec509c68999a14f637fff267b309cf82a8acf2bb5a948484f79b SHA512 c5d24502b9a6be0a606a19213186fe462e0de6830547003636f0897781f36d0bd7e4e7d9689d96390a0399ce04b6438cda3a0fe6f97f0feb700a110e90beef0c
DIST protobuf-3.13.0.tar.gz 5277913 BLAKE2B 168aaa5beef83be675cd2543ca8efeaf5174f5e7fd861a056b04b01c8c781dc7b1fcbd05068ae89f051dfacfdc47c34b19cc33c8d09dd3212d3827746e3408f2 SHA512 514efa65fc8a36bc0791e6d39bdfb07b2689e9c2a4b82536c657859b800e7bc1e1a0ae86a7ee33f30c43a473a49b5c346ce830ac0057b6da104ed37f90b8b0fd
diff --git a/dev-libs/protobuf/files/protobuf-3.11.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.11.0-disable_no-warning-test.patch
deleted file mode 100644
index ec043e3865c..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.11.0-disable_no-warning-test.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
-
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -714,7 +714,7 @@
- GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
-- no-warning-test $(GZCHECKPROGRAMS)
-+ $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-@@ -901,4 +901,4 @@
-
- TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
- google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
-- protobuf-lite-arena-test no-warning-test
-+ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.11.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.11.0-protoc_input_output_files.patch
deleted file mode 100644
index 0e22b34efc3..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.11.0-protoc_input_output_files.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-https://github.com/protocolbuffers/protobuf/pull/235
-
---- /src/google/protobuf/compiler/command_line_interface.cc
-+++ /src/google/protobuf/compiler/command_line_interface.cc
-@@ -938,6 +938,28 @@
- }
-
- if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
-+ bool success = false;
-+ int in_fd = STDIN_FILENO;
-+ int out_fd = STDOUT_FILENO;
-+
-+ if (!protobuf_in_path_.empty()) {
-+ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
-+ if (in_fd == -1) {
-+ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
-+ return 1;
-+ }
-+ }
-+ if (!protobuf_out_path_.empty()) {
-+ out_fd = open(protobuf_out_path_.c_str(),
-+ O_WRONLY | O_CREAT | O_TRUNC,
-+ 0644);
-+ if (out_fd == -1) {
-+ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
-+ close(in_fd);
-+ return 1;
-+ }
-+ }
-+
- if (codec_type_.empty()) {
- // HACK: Define an EmptyMessage type to use for decoding.
- DescriptorPool pool;
-@@ -946,13 +968,20 @@
- file.add_message_type()->set_name("EmptyMessage");
- GOOGLE_CHECK(pool.BuildFile(file) != NULL);
- codec_type_ = "EmptyMessage";
-- if (!EncodeOrDecode(&pool)) {
-- return 1;
-- }
-+ success = EncodeOrDecode(&pool, in_fd, out_fd);
- } else {
-- if (!EncodeOrDecode(descriptor_pool.get())) {
-- return 1;
-- }
-+ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
-+ }
-+
-+ if (in_fd != STDIN_FILENO) {
-+ close(in_fd);
-+ }
-+ if (out_fd != STDOUT_FILENO) {
-+ close(out_fd);
-+ }
-+
-+ if (!success) {
-+ return 1;
- }
- }
-
-@@ -990,6 +1019,11 @@
- for (int i = 0; i < proto_path_.size(); i++) {
- source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
- }
-+ if (mode_ == MODE_COMPILE &&
-+ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
-+ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
-+ << "decode operations. Ignoring.";
-+ }
-
- // Map input files to virtual paths if possible.
- if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
-@@ -1650,6 +1684,12 @@
-
- codec_type_ = value;
-
-+ } else if (name == "--protobuf_in") {
-+ protobuf_in_path_ = value;
-+
-+ } else if (name == "--protobuf_out") {
-+ protobuf_out_path_ = value;
-+
- } else if (name == "--error_format") {
- if (value == "gcc") {
- error_format_ = ERROR_FORMAT_GCC;
-@@ -1786,29 +1826,50 @@
- " -h, --help Show this text and exit.\n"
- " --encode=MESSAGE_TYPE Read a text-format message of the "
- "given type\n"
-- " from standard input and write it in "
-- "binary\n"
-- " to standard output. The message type "
-- "must\n"
-+ " and write it in binary. The message "
-+ "type must\n"
- " be defined in PROTO_FILES or their "
- "imports.\n"
-+ " The input/output protobuf files are "
-+ "specified\n"
-+ " using the --protobuf_in and "
-+ "--protobuf_out\n"
-+ " command line flags.\n"
- " --decode=MESSAGE_TYPE Read a binary message of the given "
-- "type from\n"
-- " standard input and write it in text "
-- "format\n"
-- " to standard output. The message type "
-- "must\n"
-- " be defined in PROTO_FILES or their "
-- "imports.\n"
-+ "type and\n"
-+ " write it in text format. The message "
-+ "type\n"
-+ " must be defined in PROTO_FILES or "
-+ "their imports.\n"
-+ " The input/output protobuf files are "
-+ "specified\n"
-+ " using the --protobuf_in and "
-+ "--protobuf_out\n"
-+ " command line flags.\n"
- " --decode_raw Read an arbitrary protocol message "
-- "from\n"
-- " standard input and write the raw "
-- "tag/value\n"
-- " pairs in text format to standard "
-- "output. No\n"
-+ "and write\n"
-+ " the raw tag/value pairs in text format."
-+ " No\n"
- " PROTO_FILES should be given when using "
- "this\n"
-- " flag.\n"
-+ " flag. The input/output protobuf files "
-+ "are\n"
-+ " specified using the --protobuf_in and\n"
-+ " --protobuf_out command line flags.\n"
-+ " --protobuf_in=FILE Absolute path to the protobuf file "
-+ "from which\n"
-+ " input of encoding/decoding operation "
-+ "will be\n"
-+ " read. If omitted, input will be read "
-+ "from\n"
-+ " standard input.\n"
-+ " --protobuf_out=FILE Absolute path to the protobuf file "
-+ "to which\n"
-+ " output of encoding/decoding operation "
-+ "will be\n"
-+ " written. If omitted, output will be "
-+ "written to\n"
-+ " standard output.\n"
- " --descriptor_set_in=FILES Specifies a delimited list of FILES\n"
- " each containing a FileDescriptorSet "
- "(a\n"
-@@ -2123,7 +2184,9 @@
- return true;
- }
-
--bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
-+bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd) {
- // Look up the type.
- const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
- if (type == NULL) {
-@@ -2135,15 +2198,15 @@
- std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
-
- if (mode_ == MODE_ENCODE) {
-- SetFdToTextMode(STDIN_FILENO);
-- SetFdToBinaryMode(STDOUT_FILENO);
-+ SetFdToTextMode(in_fd);
-+ SetFdToBinaryMode(out_fd);
- } else {
-- SetFdToBinaryMode(STDIN_FILENO);
-- SetFdToTextMode(STDOUT_FILENO);
-+ SetFdToBinaryMode(in_fd);
-+ SetFdToTextMode(out_fd);
- }
-
-- io::FileInputStream in(STDIN_FILENO);
-- io::FileOutputStream out(STDOUT_FILENO);
-+ io::FileInputStream in(in_fd);
-+ io::FileOutputStream out(out_fd);
-
- if (mode_ == MODE_ENCODE) {
- // Input is text.
---- /src/google/protobuf/compiler/command_line_interface.h
-+++ /src/google/protobuf/compiler/command_line_interface.h
-@@ -288,7 +288,9 @@
- GeneratorContext* generator_context, std::string* error);
-
- // Implements --encode and --decode.
-- bool EncodeOrDecode(const DescriptorPool* pool);
-+ bool EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd);
-
- // Implements the --descriptor_set_out option.
- bool WriteDescriptorSet(
-@@ -420,6 +422,13 @@
- // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
- std::vector<std::string> descriptor_set_in_names_;
-
-+ // When using --encode / --decode / --decode_raw absolute path to the output
-+ // file. (Empty string indicates write to STDOUT).
-+ std::string protobuf_out_path_;
-+ // When using --encode / --decode / --decode_raw, absolute path to the input
-+ // file. (Empty string indicates read from STDIN).
-+ std::string protobuf_in_path_;
-+
- // If --descriptor_set_out was given, this is the filename to which the
- // FileDescriptorSet should be written. Otherwise, empty.
- std::string descriptor_set_out_name_;
---- /src/google/protobuf/compiler/command_line_interface_unittest.cc
-+++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
-@@ -95,7 +95,7 @@
- virtual void SetUp();
- virtual void TearDown();
-
-- // Runs the CommandLineInterface with the given command line. The
-+ // Run the CommandLineInterface with the given command line. The
- // command is automatically split on spaces, and the string "$tmpdir"
- // is replaced with TestTempDir().
- void Run(const std::string& command);
-@@ -2491,6 +2491,17 @@
- std::string::npos);
- }
-
-+ void ExpectBinaryFilesMatch(const string &expected_file,
-+ const string &actual_file) {
-+ string expected_output, actual_output;
-+ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
-+ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
-+
-+ // Don't use EXPECT_EQ because we don't want to print raw binary data to
-+ // stdout on failure.
-+ EXPECT_TRUE(expected_output == actual_output);
-+ }
-+
- private:
- void WriteUnittestProtoDescriptorSet() {
- unittest_proto_descriptor_set_filename_ =
-@@ -2585,6 +2596,19 @@
- "net/proto2/internal/no_such_file.proto: No such file or directory\n");
- }
-
-+TEST_P(EncodeDecodeTest, RedirectInputOutput) {
-+ string out_file = TestTempDir() + "/golden_message_out.pbf";
-+ EXPECT_TRUE(
-+ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
-+ " --encode=protobuf_unittest.TestAllTypes" +
-+ " --protobuf_in=" + TestUtil::GetTestDataPath(
-+ "net/proto2/internal/"
-+ "testdata/text_format_unittest_data_oneof_implemented.txt") +
-+ " --protobuf_out=" + out_file));
-+ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
-+ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
-+}
-+
- INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
- testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
- } // anonymous namespace
diff --git a/dev-libs/protobuf/files/protobuf-3.11.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.11.0-system_libraries.patch
deleted file mode 100644
index 8311ce8b22e..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.11.0-system_libraries.patch
+++ /dev/null
@@ -1,121 +0,0 @@
---- /Makefile.am
-+++ /Makefile.am
-@@ -11,28 +11,10 @@
- # Always include third_party directories in distributions.
- DIST_SUBDIRS = src conformance benchmarks third_party/googletest
-
--# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
--# because then "make check" would also build and run all of gmock's own tests,
--# which takes a lot of time and is generally not useful to us. Also, we don't
--# want "make install" to recurse into gmock since we don't want to overwrite
--# the installed version of gmock if there is one.
- check-local:
-- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
-- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
-
--# We would like to clean gmock when "make clean" is invoked. But we have to
--# be careful because clean-local is also invoked during "make distclean", but
--# "make distclean" already recurses into gmock because it's listed among the
--# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
--# cd to the directory again and "make clean" it will fail. So, check that the
--# Makefile exists before recursing.
- clean-local:
-- @if test -e third_party/googletest/Makefile; then \
-- echo "Making clean in googletest"; \
-- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
-- fi; \
-- if test -e conformance/Makefile; then \
-+ @if test -e conformance/Makefile; then \
- echo "Making clean in conformance"; \
- cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
- fi; \
---- /configure.ac
-+++ /configure.ac
-@@ -223,12 +223,5 @@
- esac
- AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
-
--# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
--# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
--# too.
--export CFLAGS
--export CXXFLAGS
--AC_CONFIG_SUBDIRS([third_party/googletest])
--
- AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
- AC_OUTPUT
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -708,19 +708,11 @@
- google/protobuf/testing/file.cc \
- google/protobuf/testing/file.h
-
--GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
--GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
--GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
--GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
- $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
-- -I$(GOOGLEMOCK_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- # Disable optimization for tests unless the user explicitly asked for it,
- # since test_util.cc takes forever to compile with optimization (with GCC).
- # See configure.ac for more info.
-@@ -812,12 +804,8 @@
- # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
- protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
- libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include \
-- -DPROTOBUF_TEST_NO_DESCRIPTORS
-+ -lgtest -lgmock -lgmock_main
-+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
- protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lazy_descriptor_test_SOURCES = \
- google/protobuf/compiler/cpp/cpp_unittest.cc \
-@@ -838,11 +826,7 @@
- # full runtime and we want to make sure this test builds without full
- # runtime.
- protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_test_SOURCES = \
- google/protobuf/lite_unittest.cc \
-@@ -854,11 +838,7 @@
- # gtest when building the test internally our memory sanitizer doesn't detect
- # memory leaks (don't know why).
- protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_arena_test_SOURCES = \
- google/protobuf/lite_arena_unittest.cc \
-@@ -868,8 +848,7 @@
-
- # Test plugin binary.
- test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
--test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest
- test_plugin_SOURCES = \
- google/protobuf/compiler/mock_code_generator.cc \
- google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-3.11.4.ebuild b/dev-libs/protobuf/protobuf-3.11.4.ebuild
deleted file mode 100644
index 568a3f45c37..00000000000
--- a/dev-libs/protobuf/protobuf-3.11.4.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright 2008-2020 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=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="BSD"
-SLOT="0/22"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-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.11.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.11.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.11.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
-
- 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 "${D}" -name "*.la" -type f -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
-}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2021-04-09 22:32 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2021-04-09 22:32 UTC (permalink / raw
To: gentoo-commits
commit: 4ecc08556da1d6181d5eed03b0d4c4a9b29d2e67
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Apr 6 00:00:00 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr 9 22:32:17 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ecc0855
dev-libs/protobuf: Version bumps (3.15.*).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 9 +
.../protobuf-3.15.0-disable_no-warning-test.patch | 19 ++
...protobuf-3.15.0-protoc_input_output_files.patch | 240 +++++++++++++++++++++
.../files/protobuf-3.15.0-system_libraries.patch | 121 +++++++++++
...protobuf-9999.ebuild => protobuf-3.15.0.ebuild} | 21 +-
...protobuf-9999.ebuild => protobuf-3.15.1.ebuild} | 21 +-
...protobuf-9999.ebuild => protobuf-3.15.2.ebuild} | 21 +-
...protobuf-9999.ebuild => protobuf-3.15.3.ebuild} | 21 +-
...protobuf-9999.ebuild => protobuf-3.15.4.ebuild} | 21 +-
...protobuf-9999.ebuild => protobuf-3.15.5.ebuild} | 21 +-
...protobuf-9999.ebuild => protobuf-3.15.6.ebuild} | 21 +-
...protobuf-9999.ebuild => protobuf-3.15.7.ebuild} | 21 +-
...protobuf-9999.ebuild => protobuf-3.15.8.ebuild} | 21 +-
dev-libs/protobuf/protobuf-9999.ebuild | 6 +-
14 files changed, 545 insertions(+), 39 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index f999d53e988..40726bb0560 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -2,3 +2,12 @@ DIST protobuf-3.12.2.tar.gz 5309688 BLAKE2B 6f04ab75a165d8135b4c1de210f8698f56f3
DIST protobuf-3.12.4.tar.gz 5310348 BLAKE2B 2630941672963165467221843c10079a0ed966f2fdfcbc970b0b41e1ed3c7f78734496c1fbd3ec509c68999a14f637fff267b309cf82a8acf2bb5a948484f79b SHA512 c5d24502b9a6be0a606a19213186fe462e0de6830547003636f0897781f36d0bd7e4e7d9689d96390a0399ce04b6438cda3a0fe6f97f0feb700a110e90beef0c
DIST protobuf-3.13.0.tar.gz 5277913 BLAKE2B 168aaa5beef83be675cd2543ca8efeaf5174f5e7fd861a056b04b01c8c781dc7b1fcbd05068ae89f051dfacfdc47c34b19cc33c8d09dd3212d3827746e3408f2 SHA512 514efa65fc8a36bc0791e6d39bdfb07b2689e9c2a4b82536c657859b800e7bc1e1a0ae86a7ee33f30c43a473a49b5c346ce830ac0057b6da104ed37f90b8b0fd
DIST protobuf-3.14.0.tar.gz 5319779 BLAKE2B cea083eea4d7fec441536effdfe2bf1811913154b0cc0da2f14f4edeb0efb200236da102c36700e24fab73fd9883aa90576ad64603a7f175ebf5cef0dc29aae5 SHA512 9dabba81119cb6196ef5de382a1032c57f6e69038f4dce0156f8671b98e51bb5095915fb6d05bb5a8ad8b17b559e652e1e9a392dd30c7ed8dcf1d986c137be11
+DIST protobuf-3.15.0.tar.gz 5284848 BLAKE2B 6c1135499dd73b6d1764f47ded6415f8073841bccf5d5626e751fc159b67a6103d71a84096f563053c34c9e4235504238fcdc86ebb757d38b2f4bc1674d08674 SHA512 f52dfbfabdff3306d26ec05cbba7cd47bf3db8b08f4fb27e2cbd5a594de57f0a7ab2212dcea2055a9adfddc94ae4df2d0b1caea311ead75bb850ef8458b1b74a
+DIST protobuf-3.15.1.tar.gz 5284851 BLAKE2B 5e3f487ba1c3f6a3d2d87f2421f9b07aa4618df0853b05364d7f29e93d8e7dc4c3ece08ba3b7cd0bf69d0faaa32ccc952218a8df7575b74aa6216977f2b2219b SHA512 24efeec969ee72833c377e6287e3b06a431d54d9b3be50635685f6903534f15c2957d78cdbf4bcc6482732ecdbc735dc894c0b9095486419b8d11d6df6169180
+DIST protobuf-3.15.2.tar.gz 5284455 BLAKE2B 433ac18774395174798d110e4eaae95c44bc8be89cfae85648497f8531cf19513f4c7745a6afc27d6d49a07e7e1fb4faeff73530fa082665727095e837f11940 SHA512 34e82ece83f47249fd5398a955e4f0a32d0722abcaa4e90c741bdc5106a0bd92088babe3d10d818dd89e2e9254cecbb68ae0c182ea408d4f1e2d70318e7baf37
+DIST protobuf-3.15.3.tar.gz 5283923 BLAKE2B f7b7b22200a4fffe6bb89e6d15fdcdb7e53ad91d4b8dc4c0b9ec7e64de39f0e3854c649edfd5a6eca040f35ccbb2bea6a3b86c7e22a9ba011db2dc11117646f6 SHA512 ca403cc2ed28b67c4219021273be59d36a3f4382a8111aeb6152fc0ded30dfc203d96c3c60977d19ff00a1d1524b8ed4c183e8badb56c942e599f78aaf6745f6
+DIST protobuf-3.15.4.tar.gz 5283753 BLAKE2B 256eb365b26a864755b43925bd4336fc76f1fb122aacdb01243b24ecc163541fd7d2105ba66f7fa0c14ced0166cf4bc8f480ac5d9f2cea13e4cc925dab6e1810 SHA512 d98d1ed408a6f3d15fb3a60d11df896632dfdffa06759c761bc227a8c8053ec9db6c62c21b115dc109c7d9139df239b19e29aff5783b585101bcab3f4d687547
+DIST protobuf-3.15.5.tar.gz 5283712 BLAKE2B 0da6255302014c885aee47d48344a75ee4808cb91fa6cdebef15150e0b8ce7f7835d21bdc8f42fd1ba5f5c5401e6fc60b9410ff1ea8bd0d0f698d3cf7d10dd2b SHA512 b9d3b261047c354f0f8735638041562e05d93691cdfdc295622fd30aa04c859a9e3d4200981807ea0d4926d0e4a31a918b4851ebc25bfb9709494a3699002531
+DIST protobuf-3.15.6.tar.gz 5284018 BLAKE2B 5895f618e233edd5744253821036857aa23f64b76ee3318b99f3530d9dd0c49cc8c386ef15c7394475c2bf0fa33fb631e481fa3fb927c2ab8a88af31234bd0b1 SHA512 673d61b492ce0e85f5c63f3fd7a0174737cc65f7871f79d24380bffa59ea1b312065137ecc63b0f4d4ffa3eb168a09e9c1129c21b0e6c5c3a8c2fabb2cecabb5
+DIST protobuf-3.15.7.tar.gz 5284817 BLAKE2B 43821bb283a0c1f87930593046a5c55f6efae3f644337289fd438c0612a9b7ef9531b61e48940b74dc5d20253ee1b6a805b902284a442dec2efe8c79f82c5aad SHA512 2b18ccba1ff8a0623c52abed0e0674bc6cfa2cd10d49764031a47e68f654f54083f4a4f9e3a94d833a6808426904ee642f173641063e79cb41a61fc348d603ac
+DIST protobuf-3.15.8.tar.gz 5285277 BLAKE2B 798fc011ac03cdc2406acf5845c667d8482082044bdace06c2c1d02b5b1b69c1b1f30e29774180dc1801a1d21d62e2ce50325105859564a1e36d3fe478e64d8b SHA512 56fc6df2dae14eee0fb67dd4204fc1ec54a18d994a69c9e42c7888d0cd50d269d1c5e1445d74f0fa705850d4ac86a22d86781e09769a716e5c6f829b15b05592
diff --git a/dev-libs/protobuf/files/protobuf-3.15.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.15.0-disable_no-warning-test.patch
new file mode 100644
index 00000000000..031b1b222a9
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.15.0-disable_no-warning-test.patch
@@ -0,0 +1,19 @@
+Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
+
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -709,7 +709,7 @@
+ GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+- no-warning-test $(GZCHECKPROGRAMS)
++ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+ $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+ $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+@@ -896,4 +896,4 @@
+
+ TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
+ google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
+- protobuf-lite-arena-test no-warning-test
++ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.15.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.15.0-protoc_input_output_files.patch
new file mode 100644
index 00000000000..8e9733fc464
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.15.0-protoc_input_output_files.patch
@@ -0,0 +1,240 @@
+https://github.com/protocolbuffers/protobuf/pull/235
+
+--- /src/google/protobuf/compiler/command_line_interface.cc
++++ /src/google/protobuf/compiler/command_line_interface.cc
+@@ -1109,6 +1109,28 @@
+ }
+
+ if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
++ bool success = false;
++ int in_fd = STDIN_FILENO;
++ int out_fd = STDOUT_FILENO;
++
++ if (!protobuf_in_path_.empty()) {
++ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
++ if (in_fd == -1) {
++ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
++ return 1;
++ }
++ }
++ if (!protobuf_out_path_.empty()) {
++ out_fd = open(protobuf_out_path_.c_str(),
++ O_WRONLY | O_CREAT | O_TRUNC,
++ 0644);
++ if (out_fd == -1) {
++ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
++ close(in_fd);
++ return 1;
++ }
++ }
++
+ if (codec_type_.empty()) {
+ // HACK: Define an EmptyMessage type to use for decoding.
+ DescriptorPool pool;
+@@ -1117,13 +1139,20 @@
+ file.add_message_type()->set_name("EmptyMessage");
+ GOOGLE_CHECK(pool.BuildFile(file) != NULL);
+ codec_type_ = "EmptyMessage";
+- if (!EncodeOrDecode(&pool)) {
+- return 1;
+- }
++ success = EncodeOrDecode(&pool, in_fd, out_fd);
+ } else {
+- if (!EncodeOrDecode(descriptor_pool.get())) {
+- return 1;
+- }
++ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
++ }
++
++ if (in_fd != STDIN_FILENO) {
++ close(in_fd);
++ }
++ if (out_fd != STDOUT_FILENO) {
++ close(out_fd);
++ }
++
++ if (!success) {
++ return 1;
+ }
+ }
+
+@@ -1161,6 +1190,11 @@
+ for (int i = 0; i < proto_path_.size(); i++) {
+ source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
+ }
++ if (mode_ == MODE_COMPILE &&
++ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
++ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
++ << "decode operations. Ignoring.";
++ }
+
+ // Map input files to virtual paths if possible.
+ if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
+@@ -1892,6 +1926,12 @@
+ } else if (name == "--deterministic_output") {
+ deterministic_output_ = true;
+
++ } else if (name == "--protobuf_in") {
++ protobuf_in_path_ = value;
++
++ } else if (name == "--protobuf_out") {
++ protobuf_out_path_ = value;
++
+ } else if (name == "--error_format") {
+ if (value == "gcc") {
+ error_format_ = ERROR_FORMAT_GCC;
+@@ -2019,22 +2059,38 @@
+ --version Show version info and exit.
+ -h, --help Show this text and exit.
+ --encode=MESSAGE_TYPE Read a text-format message of the given type
+- from standard input and write it in binary
+- to standard output. The message type must
++ from input protobuf file and write it in binary
++ to output protobuf file. The message type must
+ be defined in PROTO_FILES or their imports.
++ The input/output protobuf files are specified
++ using the --protobuf_in and --protobuf_out
++ command line flags.
+ --deterministic_output When using --encode, ensure map fields are
+ deterministically ordered. Note that this order
+ is not canonical, and changes across builds or
+ releases of protoc.
+ --decode=MESSAGE_TYPE Read a binary message of the given type from
+- standard input and write it in text format
+- to standard output. The message type must
++ input protobuf file and write it in text format
++ to output protobuf file. The message type must
+ be defined in PROTO_FILES or their imports.
++ The input/output protobuf files are specified
++ using the --protobuf_in and --protobuf_out
++ command line flags.
+ --decode_raw Read an arbitrary protocol message from
+- standard input and write the raw tag/value
+- pairs in text format to standard output. No
++ input protobuf file and write the raw tag/value
++ pairs in text format to output protobuf file. No
+ PROTO_FILES should be given when using this
+- flag.
++ flag. The input/output protobuf files are
++ specified using the --protobuf_in and
++ --protobuf_out command line flags.
++ --protobuf_in=FILE Absolute path to the protobuf file from which
++ input of encoding/decoding operation will be
++ read. If omitted, input will be read from
++ standard input.
++ --protobuf_out=FILE Absolute path to the protobuf file to which
++ output of encoding/decoding operation will be
++ written. If omitted, output will be written to
++ standard output.
+ --descriptor_set_in=FILES Specifies a delimited list of FILES
+ each containing a FileDescriptorSet (a
+ protocol buffer defined in descriptor.proto).
+@@ -2341,7 +2397,9 @@
+ return true;
+ }
+
+-bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
++bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd) {
+ // Look up the type.
+ const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
+ if (type == NULL) {
+@@ -2353,15 +2411,15 @@
+ std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
+
+ if (mode_ == MODE_ENCODE) {
+- SetFdToTextMode(STDIN_FILENO);
+- SetFdToBinaryMode(STDOUT_FILENO);
++ SetFdToTextMode(in_fd);
++ SetFdToBinaryMode(out_fd);
+ } else {
+- SetFdToBinaryMode(STDIN_FILENO);
+- SetFdToTextMode(STDOUT_FILENO);
++ SetFdToBinaryMode(in_fd);
++ SetFdToTextMode(out_fd);
+ }
+
+- io::FileInputStream in(STDIN_FILENO);
+- io::FileOutputStream out(STDOUT_FILENO);
++ io::FileInputStream in(in_fd);
++ io::FileOutputStream out(out_fd);
+
+ if (mode_ == MODE_ENCODE) {
+ // Input is text.
+--- /src/google/protobuf/compiler/command_line_interface.h
++++ /src/google/protobuf/compiler/command_line_interface.h
+@@ -296,7 +296,9 @@
+ GeneratorContext* generator_context, std::string* error);
+
+ // Implements --encode and --decode.
+- bool EncodeOrDecode(const DescriptorPool* pool);
++ bool EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd);
+
+ // Implements the --descriptor_set_out option.
+ bool WriteDescriptorSet(
+@@ -428,6 +430,13 @@
+ // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
+ std::vector<std::string> descriptor_set_in_names_;
+
++ // When using --encode / --decode / --decode_raw absolute path to the output
++ // file. (Empty string indicates write to STDOUT).
++ std::string protobuf_out_path_;
++ // When using --encode / --decode / --decode_raw, absolute path to the input
++ // file. (Empty string indicates read from STDIN).
++ std::string protobuf_in_path_;
++
+ // If --descriptor_set_out was given, this is the filename to which the
+ // FileDescriptorSet should be written. Otherwise, empty.
+ std::string descriptor_set_out_name_;
+--- /src/google/protobuf/compiler/command_line_interface_unittest.cc
++++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
+@@ -97,7 +97,7 @@
+ virtual void SetUp();
+ virtual void TearDown();
+
+- // Runs the CommandLineInterface with the given command line. The
++ // Run the CommandLineInterface with the given command line. The
+ // command is automatically split on spaces, and the string "$tmpdir"
+ // is replaced with TestTempDir().
+ void Run(const std::string& command);
+@@ -2596,6 +2596,17 @@
+ std::string::npos);
+ }
+
++ void ExpectBinaryFilesMatch(const string &expected_file,
++ const string &actual_file) {
++ string expected_output, actual_output;
++ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
++ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
++
++ // Don't use EXPECT_EQ because we don't want to print raw binary data to
++ // stdout on failure.
++ EXPECT_TRUE(expected_output == actual_output);
++ }
++
+ private:
+ void WriteUnittestProtoDescriptorSet() {
+ unittest_proto_descriptor_set_filename_ =
+@@ -2719,6 +2730,19 @@
+ "Can only use --deterministic_output with --encode.\n");
+ }
+
++TEST_P(EncodeDecodeTest, RedirectInputOutput) {
++ string out_file = TestTempDir() + "/golden_message_out.pbf";
++ EXPECT_TRUE(
++ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
++ " --encode=protobuf_unittest.TestAllTypes" +
++ " --protobuf_in=" + TestUtil::GetTestDataPath(
++ "net/proto2/internal/"
++ "testdata/text_format_unittest_data_oneof_implemented.txt") +
++ " --protobuf_out=" + out_file));
++ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
++ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
++}
++
+ INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
+ testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
+ } // anonymous namespace
diff --git a/dev-libs/protobuf/files/protobuf-3.15.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.15.0-system_libraries.patch
new file mode 100644
index 00000000000..9a75a6665f0
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.15.0-system_libraries.patch
@@ -0,0 +1,121 @@
+--- /Makefile.am
++++ /Makefile.am
+@@ -11,28 +11,10 @@
+ # Always include third_party directories in distributions.
+ DIST_SUBDIRS = src conformance benchmarks third_party/googletest
+
+-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
+-# because then "make check" would also build and run all of gmock's own tests,
+-# which takes a lot of time and is generally not useful to us. Also, we don't
+-# want "make install" to recurse into gmock since we don't want to overwrite
+-# the installed version of gmock if there is one.
+ check-local:
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
+- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+
+-# We would like to clean gmock when "make clean" is invoked. But we have to
+-# be careful because clean-local is also invoked during "make distclean", but
+-# "make distclean" already recurses into gmock because it's listed among the
+-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
+-# cd to the directory again and "make clean" it will fail. So, check that the
+-# Makefile exists before recursing.
+ clean-local:
+- @if test -e third_party/googletest/Makefile; then \
+- echo "Making clean in googletest"; \
+- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
+- fi; \
+- if test -e conformance/Makefile; then \
++ @if test -e conformance/Makefile; then \
+ echo "Making clean in conformance"; \
+ cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
+ fi; \
+--- /configure.ac
++++ /configure.ac
+@@ -223,12 +223,5 @@
+ esac
+ AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
+
+-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
+-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
+-# too.
+-export CFLAGS
+-export CXXFLAGS
+-AC_CONFIG_SUBDIRS([third_party/googletest])
+-
+ AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -703,19 +703,11 @@
+ google/protobuf/testing/file.cc \
+ google/protobuf/testing/file.h
+
+-GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
+-GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
+-GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
+-GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
+- -I$(GOOGLEMOCK_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ # Disable optimization for tests unless the user explicitly asked for it,
+ # since test_util.cc takes forever to compile with optimization (with GCC).
+ # See configure.ac for more info.
+@@ -807,12 +799,8 @@
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+ libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include \
+- -DPROTOBUF_TEST_NO_DESCRIPTORS
++ -lgtest -lgmock -lgmock_main
++protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lazy_descriptor_test_SOURCES = \
+ google/protobuf/compiler/cpp/cpp_unittest.cc \
+@@ -833,11 +821,7 @@
+ # full runtime and we want to make sure this test builds without full
+ # runtime.
+ protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_test_SOURCES = \
+ google/protobuf/lite_unittest.cc \
+@@ -849,11 +833,7 @@
+ # gtest when building the test internally our memory sanitizer doesn't detect
+ # memory leaks (don't know why).
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_arena_test_SOURCES = \
+ google/protobuf/lite_arena_unittest.cc \
+@@ -863,8 +843,7 @@
+
+ # Test plugin binary.
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest
+ test_plugin_SOURCES = \
+ google/protobuf/compiler/mock_code_generator.cc \
+ google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.15.0.ebuild
similarity index 78%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.15.0.ebuild
index 842b1bf5554..9cadeaf4923 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.15.0.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/26"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.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
+
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.15.1.ebuild
similarity index 78%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.15.1.ebuild
index 842b1bf5554..9cadeaf4923 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.15.1.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/26"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.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
+
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.15.2.ebuild
similarity index 78%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.15.2.ebuild
index 842b1bf5554..9cadeaf4923 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.15.2.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/26"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.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
+
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.15.3.ebuild
similarity index 78%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.15.3.ebuild
index 842b1bf5554..9cadeaf4923 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.15.3.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/26"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.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
+
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.15.4.ebuild
similarity index 78%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.15.4.ebuild
index 842b1bf5554..9cadeaf4923 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.15.4.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/26"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.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
+
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.15.5.ebuild
similarity index 78%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.15.5.ebuild
index 842b1bf5554..9cadeaf4923 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.15.5.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/26"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.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
+
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.15.6.ebuild
similarity index 78%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.15.6.ebuild
index 842b1bf5554..9cadeaf4923 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.15.6.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/26"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.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
+
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.15.7.ebuild
similarity index 78%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.15.7.ebuild
index 842b1bf5554..9cadeaf4923 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.15.7.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/26"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.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
+
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.15.8.ebuild
similarity index 78%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.15.8.ebuild
index 842b1bf5554..9cadeaf4923 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.15.8.ebuild
@@ -22,7 +22,7 @@ fi
LICENSE="BSD"
SLOT="0/26"
-KEYWORDS=""
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -33,20 +33,33 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.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
+
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
}
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild
index 842b1bf5554..adc2b704358 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-9999.ebuild
@@ -33,9 +33,9 @@ RDEPEND="emacs? ( app-editors/emacs:* )
zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-3.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.14.0-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.15.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.15.0-protoc_input_output_files.patch"
)
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2021-04-09 22:32 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2021-04-09 22:32 UTC (permalink / raw
To: gentoo-commits
commit: 0319cc20d7c4e8a4e1abf6f30289b4301386eeaa
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Apr 6 03:00:00 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr 9 22:32:20 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0319cc20
dev-libs/protobuf: Delete old versions (3.12.2, 3.12.4).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 2 -
.../protobuf-3.12.0-disable_no-warning-test.patch | 19 --
...protobuf-3.12.0-protoc_input_output_files.patch | 262 ---------------------
.../files/protobuf-3.12.0-system_libraries.patch | 121 ----------
dev-libs/protobuf/protobuf-3.12.2.ebuild | 128 ----------
dev-libs/protobuf/protobuf-3.12.4.ebuild | 131 -----------
6 files changed, 663 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 40726bb0560..0737b49db14 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,5 +1,3 @@
-DIST protobuf-3.12.2.tar.gz 5309688 BLAKE2B 6f04ab75a165d8135b4c1de210f8698f56f309f73d664192209de10580e0ef850bf56f6f394b860f21912e341141f7bbb1f63198eaee55fd7ad74d86b00c3b1f SHA512 84a349a1dcb5bce6a6a892cf11264390b557ed1e7b05883b71fa9cfb7460d9f73119da1f2861066869e33c752246ea438d5ce2c2b3ff7a4b07696d9450b7916b
-DIST protobuf-3.12.4.tar.gz 5310348 BLAKE2B 2630941672963165467221843c10079a0ed966f2fdfcbc970b0b41e1ed3c7f78734496c1fbd3ec509c68999a14f637fff267b309cf82a8acf2bb5a948484f79b SHA512 c5d24502b9a6be0a606a19213186fe462e0de6830547003636f0897781f36d0bd7e4e7d9689d96390a0399ce04b6438cda3a0fe6f97f0feb700a110e90beef0c
DIST protobuf-3.13.0.tar.gz 5277913 BLAKE2B 168aaa5beef83be675cd2543ca8efeaf5174f5e7fd861a056b04b01c8c781dc7b1fcbd05068ae89f051dfacfdc47c34b19cc33c8d09dd3212d3827746e3408f2 SHA512 514efa65fc8a36bc0791e6d39bdfb07b2689e9c2a4b82536c657859b800e7bc1e1a0ae86a7ee33f30c43a473a49b5c346ce830ac0057b6da104ed37f90b8b0fd
DIST protobuf-3.14.0.tar.gz 5319779 BLAKE2B cea083eea4d7fec441536effdfe2bf1811913154b0cc0da2f14f4edeb0efb200236da102c36700e24fab73fd9883aa90576ad64603a7f175ebf5cef0dc29aae5 SHA512 9dabba81119cb6196ef5de382a1032c57f6e69038f4dce0156f8671b98e51bb5095915fb6d05bb5a8ad8b17b559e652e1e9a392dd30c7ed8dcf1d986c137be11
DIST protobuf-3.15.0.tar.gz 5284848 BLAKE2B 6c1135499dd73b6d1764f47ded6415f8073841bccf5d5626e751fc159b67a6103d71a84096f563053c34c9e4235504238fcdc86ebb757d38b2f4bc1674d08674 SHA512 f52dfbfabdff3306d26ec05cbba7cd47bf3db8b08f4fb27e2cbd5a594de57f0a7ab2212dcea2055a9adfddc94ae4df2d0b1caea311ead75bb850ef8458b1b74a
diff --git a/dev-libs/protobuf/files/protobuf-3.12.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.12.0-disable_no-warning-test.patch
deleted file mode 100644
index d7dd5b5b1bb..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.12.0-disable_no-warning-test.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
-
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -717,7 +717,7 @@
- GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
-- no-warning-test $(GZCHECKPROGRAMS)
-+ $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-@@ -904,4 +904,4 @@
-
- TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
- google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
-- protobuf-lite-arena-test no-warning-test
-+ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.12.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.12.0-protoc_input_output_files.patch
deleted file mode 100644
index 3123ae5b27b..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.12.0-protoc_input_output_files.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-https://github.com/protocolbuffers/protobuf/pull/235
-
---- /src/google/protobuf/compiler/command_line_interface.cc
-+++ /src/google/protobuf/compiler/command_line_interface.cc
-@@ -997,6 +997,28 @@
- }
-
- if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
-+ bool success = false;
-+ int in_fd = STDIN_FILENO;
-+ int out_fd = STDOUT_FILENO;
-+
-+ if (!protobuf_in_path_.empty()) {
-+ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
-+ if (in_fd == -1) {
-+ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
-+ return 1;
-+ }
-+ }
-+ if (!protobuf_out_path_.empty()) {
-+ out_fd = open(protobuf_out_path_.c_str(),
-+ O_WRONLY | O_CREAT | O_TRUNC,
-+ 0644);
-+ if (out_fd == -1) {
-+ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
-+ close(in_fd);
-+ return 1;
-+ }
-+ }
-+
- if (codec_type_.empty()) {
- // HACK: Define an EmptyMessage type to use for decoding.
- DescriptorPool pool;
-@@ -1005,13 +1027,20 @@
- file.add_message_type()->set_name("EmptyMessage");
- GOOGLE_CHECK(pool.BuildFile(file) != NULL);
- codec_type_ = "EmptyMessage";
-- if (!EncodeOrDecode(&pool)) {
-- return 1;
-- }
-+ success = EncodeOrDecode(&pool, in_fd, out_fd);
- } else {
-- if (!EncodeOrDecode(descriptor_pool.get())) {
-- return 1;
-- }
-+ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
-+ }
-+
-+ if (in_fd != STDIN_FILENO) {
-+ close(in_fd);
-+ }
-+ if (out_fd != STDOUT_FILENO) {
-+ close(out_fd);
-+ }
-+
-+ if (!success) {
-+ return 1;
- }
- }
-
-@@ -1049,6 +1078,11 @@
- for (int i = 0; i < proto_path_.size(); i++) {
- source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
- }
-+ if (mode_ == MODE_COMPILE &&
-+ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
-+ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
-+ << "decode operations. Ignoring.";
-+ }
-
- // Map input files to virtual paths if possible.
- if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
-@@ -1750,6 +1784,12 @@
-
- codec_type_ = value;
-
-+ } else if (name == "--protobuf_in") {
-+ protobuf_in_path_ = value;
-+
-+ } else if (name == "--protobuf_out") {
-+ protobuf_out_path_ = value;
-+
- } else if (name == "--error_format") {
- if (value == "gcc") {
- error_format_ = ERROR_FORMAT_GCC;
-@@ -1886,29 +1926,50 @@
- " -h, --help Show this text and exit.\n"
- " --encode=MESSAGE_TYPE Read a text-format message of the "
- "given type\n"
-- " from standard input and write it in "
-- "binary\n"
-- " to standard output. The message type "
-- "must\n"
-+ " and write it in binary. The message "
-+ "type must\n"
- " be defined in PROTO_FILES or their "
- "imports.\n"
-+ " The input/output protobuf files are "
-+ "specified\n"
-+ " using the --protobuf_in and "
-+ "--protobuf_out\n"
-+ " command line flags.\n"
- " --decode=MESSAGE_TYPE Read a binary message of the given "
-- "type from\n"
-- " standard input and write it in text "
-- "format\n"
-- " to standard output. The message type "
-- "must\n"
-- " be defined in PROTO_FILES or their "
-- "imports.\n"
-+ "type and\n"
-+ " write it in text format. The message "
-+ "type\n"
-+ " must be defined in PROTO_FILES or "
-+ "their imports.\n"
-+ " The input/output protobuf files are "
-+ "specified\n"
-+ " using the --protobuf_in and "
-+ "--protobuf_out\n"
-+ " command line flags.\n"
- " --decode_raw Read an arbitrary protocol message "
-- "from\n"
-- " standard input and write the raw "
-- "tag/value\n"
-- " pairs in text format to standard "
-- "output. No\n"
-+ "and write\n"
-+ " the raw tag/value pairs in text format."
-+ " No\n"
- " PROTO_FILES should be given when using "
- "this\n"
-- " flag.\n"
-+ " flag. The input/output protobuf files "
-+ "are\n"
-+ " specified using the --protobuf_in and\n"
-+ " --protobuf_out command line flags.\n"
-+ " --protobuf_in=FILE Absolute path to the protobuf file "
-+ "from which\n"
-+ " input of encoding/decoding operation "
-+ "will be\n"
-+ " read. If omitted, input will be read "
-+ "from\n"
-+ " standard input.\n"
-+ " --protobuf_out=FILE Absolute path to the protobuf file "
-+ "to which\n"
-+ " output of encoding/decoding operation "
-+ "will be\n"
-+ " written. If omitted, output will be "
-+ "written to\n"
-+ " standard output.\n"
- " --descriptor_set_in=FILES Specifies a delimited list of FILES\n"
- " each containing a FileDescriptorSet "
- "(a\n"
-@@ -2254,7 +2315,9 @@
- return true;
- }
-
--bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
-+bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd) {
- // Look up the type.
- const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
- if (type == NULL) {
-@@ -2266,15 +2329,15 @@
- std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
-
- if (mode_ == MODE_ENCODE) {
-- SetFdToTextMode(STDIN_FILENO);
-- SetFdToBinaryMode(STDOUT_FILENO);
-+ SetFdToTextMode(in_fd);
-+ SetFdToBinaryMode(out_fd);
- } else {
-- SetFdToBinaryMode(STDIN_FILENO);
-- SetFdToTextMode(STDOUT_FILENO);
-+ SetFdToBinaryMode(in_fd);
-+ SetFdToTextMode(out_fd);
- }
-
-- io::FileInputStream in(STDIN_FILENO);
-- io::FileOutputStream out(STDOUT_FILENO);
-+ io::FileInputStream in(in_fd);
-+ io::FileOutputStream out(out_fd);
-
- if (mode_ == MODE_ENCODE) {
- // Input is text.
---- /src/google/protobuf/compiler/command_line_interface.h
-+++ /src/google/protobuf/compiler/command_line_interface.h
-@@ -296,7 +296,9 @@
- GeneratorContext* generator_context, std::string* error);
-
- // Implements --encode and --decode.
-- bool EncodeOrDecode(const DescriptorPool* pool);
-+ bool EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd);
-
- // Implements the --descriptor_set_out option.
- bool WriteDescriptorSet(
-@@ -428,6 +430,13 @@
- // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
- std::vector<std::string> descriptor_set_in_names_;
-
-+ // When using --encode / --decode / --decode_raw absolute path to the output
-+ // file. (Empty string indicates write to STDOUT).
-+ std::string protobuf_out_path_;
-+ // When using --encode / --decode / --decode_raw, absolute path to the input
-+ // file. (Empty string indicates read from STDIN).
-+ std::string protobuf_in_path_;
-+
- // If --descriptor_set_out was given, this is the filename to which the
- // FileDescriptorSet should be written. Otherwise, empty.
- std::string descriptor_set_out_name_;
---- /src/google/protobuf/compiler/command_line_interface_unittest.cc
-+++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
-@@ -95,7 +95,7 @@
- virtual void SetUp();
- virtual void TearDown();
-
-- // Runs the CommandLineInterface with the given command line. The
-+ // Run the CommandLineInterface with the given command line. The
- // command is automatically split on spaces, and the string "$tmpdir"
- // is replaced with TestTempDir().
- void Run(const std::string& command);
-@@ -2625,6 +2625,17 @@
- std::string::npos);
- }
-
-+ void ExpectBinaryFilesMatch(const string &expected_file,
-+ const string &actual_file) {
-+ string expected_output, actual_output;
-+ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
-+ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
-+
-+ // Don't use EXPECT_EQ because we don't want to print raw binary data to
-+ // stdout on failure.
-+ EXPECT_TRUE(expected_output == actual_output);
-+ }
-+
- private:
- void WriteUnittestProtoDescriptorSet() {
- unittest_proto_descriptor_set_filename_ =
-@@ -2719,6 +2730,19 @@
- "net/proto2/internal/no_such_file.proto: No such file or directory\n");
- }
-
-+TEST_P(EncodeDecodeTest, RedirectInputOutput) {
-+ string out_file = TestTempDir() + "/golden_message_out.pbf";
-+ EXPECT_TRUE(
-+ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
-+ " --encode=protobuf_unittest.TestAllTypes" +
-+ " --protobuf_in=" + TestUtil::GetTestDataPath(
-+ "net/proto2/internal/"
-+ "testdata/text_format_unittest_data_oneof_implemented.txt") +
-+ " --protobuf_out=" + out_file));
-+ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
-+ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
-+}
-+
- INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
- testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
- } // anonymous namespace
diff --git a/dev-libs/protobuf/files/protobuf-3.12.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.12.0-system_libraries.patch
deleted file mode 100644
index cd7c3493da8..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.12.0-system_libraries.patch
+++ /dev/null
@@ -1,121 +0,0 @@
---- /Makefile.am
-+++ /Makefile.am
-@@ -11,28 +11,10 @@
- # Always include third_party directories in distributions.
- DIST_SUBDIRS = src conformance benchmarks third_party/googletest
-
--# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
--# because then "make check" would also build and run all of gmock's own tests,
--# which takes a lot of time and is generally not useful to us. Also, we don't
--# want "make install" to recurse into gmock since we don't want to overwrite
--# the installed version of gmock if there is one.
- check-local:
-- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
-- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
-
--# We would like to clean gmock when "make clean" is invoked. But we have to
--# be careful because clean-local is also invoked during "make distclean", but
--# "make distclean" already recurses into gmock because it's listed among the
--# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
--# cd to the directory again and "make clean" it will fail. So, check that the
--# Makefile exists before recursing.
- clean-local:
-- @if test -e third_party/googletest/Makefile; then \
-- echo "Making clean in googletest"; \
-- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
-- fi; \
-- if test -e conformance/Makefile; then \
-+ @if test -e conformance/Makefile; then \
- echo "Making clean in conformance"; \
- cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
- fi; \
---- /configure.ac
-+++ /configure.ac
-@@ -223,12 +223,5 @@
- esac
- AM_CONDITIONAL([OBJC_CONFORMANCE_TEST], [test $OBJC_CONFORMANCE_TEST = 1])
-
--# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
--# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
--# too.
--export CFLAGS
--export CXXFLAGS
--AC_CONFIG_SUBDIRS([third_party/googletest])
--
- AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
- AC_OUTPUT
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -711,19 +711,11 @@
- google/protobuf/testing/file.cc \
- google/protobuf/testing/file.h
-
--GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
--GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
--GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
--GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
- $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
-- -I$(GOOGLEMOCK_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- # Disable optimization for tests unless the user explicitly asked for it,
- # since test_util.cc takes forever to compile with optimization (with GCC).
- # See configure.ac for more info.
-@@ -815,12 +807,8 @@
- # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
- protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
- libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include \
-- -DPROTOBUF_TEST_NO_DESCRIPTORS
-+ -lgtest -lgmock -lgmock_main
-+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
- protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lazy_descriptor_test_SOURCES = \
- google/protobuf/compiler/cpp/cpp_unittest.cc \
-@@ -841,11 +829,7 @@
- # full runtime and we want to make sure this test builds without full
- # runtime.
- protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_test_SOURCES = \
- google/protobuf/lite_unittest.cc \
-@@ -857,11 +841,7 @@
- # gtest when building the test internally our memory sanitizer doesn't detect
- # memory leaks (don't know why).
- protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_arena_test_SOURCES = \
- google/protobuf/lite_arena_unittest.cc \
-@@ -871,8 +851,7 @@
-
- # Test plugin binary.
- test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
--test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest
- test_plugin_SOURCES = \
- google/protobuf/compiler/mock_code_generator.cc \
- google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-3.12.2.ebuild b/dev-libs/protobuf/protobuf-3.12.2.ebuild
deleted file mode 100644
index 30bc1134cda..00000000000
--- a/dev-libs/protobuf/protobuf-3.12.2.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# 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=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="BSD"
-SLOT="0/23"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~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.12.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.12.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.12.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
-
- 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 "${D}" -name "*.la" -type f -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
-}
diff --git a/dev-libs/protobuf/protobuf-3.12.4.ebuild b/dev-libs/protobuf/protobuf-3.12.4.ebuild
deleted file mode 100644
index ce7b47101c5..00000000000
--- a/dev-libs/protobuf/protobuf-3.12.4.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="BSD"
-SLOT="0/23"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~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.12.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.12.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.12.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/7682
- sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"T is overaligned, see b\/151247138\");$/d" -i src/google/protobuf/arena.h || 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
-}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2021-05-31 23:04 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2021-05-31 23:04 UTC (permalink / raw
To: gentoo-commits
commit: 4e8424d265ec5bc202e6661f5818c38777e6aca6
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri May 28 00:00:00 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon May 31 23:01:39 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e8424d2
dev-libs/protobuf: Version bump (3.16.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 +
...protobuf-3.16.0-protoc_input_output_files.patch | 240 +++++++++++++++++++++
.../files/protobuf-3.16.0-system_libraries.patch | 121 +++++++++++
dev-libs/protobuf/protobuf-3.16.0.ebuild | 140 ++++++++++++
4 files changed, 502 insertions(+)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 0737b49db14..42ad9a885e5 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -9,3 +9,4 @@ DIST protobuf-3.15.5.tar.gz 5283712 BLAKE2B 0da6255302014c885aee47d48344a75ee480
DIST protobuf-3.15.6.tar.gz 5284018 BLAKE2B 5895f618e233edd5744253821036857aa23f64b76ee3318b99f3530d9dd0c49cc8c386ef15c7394475c2bf0fa33fb631e481fa3fb927c2ab8a88af31234bd0b1 SHA512 673d61b492ce0e85f5c63f3fd7a0174737cc65f7871f79d24380bffa59ea1b312065137ecc63b0f4d4ffa3eb168a09e9c1129c21b0e6c5c3a8c2fabb2cecabb5
DIST protobuf-3.15.7.tar.gz 5284817 BLAKE2B 43821bb283a0c1f87930593046a5c55f6efae3f644337289fd438c0612a9b7ef9531b61e48940b74dc5d20253ee1b6a805b902284a442dec2efe8c79f82c5aad SHA512 2b18ccba1ff8a0623c52abed0e0674bc6cfa2cd10d49764031a47e68f654f54083f4a4f9e3a94d833a6808426904ee642f173641063e79cb41a61fc348d603ac
DIST protobuf-3.15.8.tar.gz 5285277 BLAKE2B 798fc011ac03cdc2406acf5845c667d8482082044bdace06c2c1d02b5b1b69c1b1f30e29774180dc1801a1d21d62e2ce50325105859564a1e36d3fe478e64d8b SHA512 56fc6df2dae14eee0fb67dd4204fc1ec54a18d994a69c9e42c7888d0cd50d269d1c5e1445d74f0fa705850d4ac86a22d86781e09769a716e5c6f829b15b05592
+DIST protobuf-3.16.0.tar.gz 5299781 BLAKE2B 9ace02a6038c31b7393671fb2ccd6a4866a3f8b7d87d2bc8371f49d65b9180f10792ca2430a83449dfa7d785a1244dac23c20756414c9d1e7c7e871a8038b123 SHA512 0191e5a6a23d03f691e883e259f6d06a0ac8eef427455bc7d1cc70b6f0ed260e4ad8f360c836fd4bdc95ec0ca314c887cbf7acbcda60e03cdfe69e4cd275bff5
diff --git a/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch
new file mode 100644
index 00000000000..7295e805a19
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch
@@ -0,0 +1,240 @@
+https://github.com/protocolbuffers/protobuf/pull/235
+
+--- /src/google/protobuf/compiler/command_line_interface.cc
++++ /src/google/protobuf/compiler/command_line_interface.cc
+@@ -1110,6 +1110,28 @@
+ }
+
+ if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
++ bool success = false;
++ int in_fd = STDIN_FILENO;
++ int out_fd = STDOUT_FILENO;
++
++ if (!protobuf_in_path_.empty()) {
++ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
++ if (in_fd == -1) {
++ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
++ return 1;
++ }
++ }
++ if (!protobuf_out_path_.empty()) {
++ out_fd = open(protobuf_out_path_.c_str(),
++ O_WRONLY | O_CREAT | O_TRUNC,
++ 0644);
++ if (out_fd == -1) {
++ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
++ close(in_fd);
++ return 1;
++ }
++ }
++
+ if (codec_type_.empty()) {
+ // HACK: Define an EmptyMessage type to use for decoding.
+ DescriptorPool pool;
+@@ -1118,13 +1140,20 @@
+ file.add_message_type()->set_name("EmptyMessage");
+ GOOGLE_CHECK(pool.BuildFile(file) != NULL);
+ codec_type_ = "EmptyMessage";
+- if (!EncodeOrDecode(&pool)) {
+- return 1;
+- }
++ success = EncodeOrDecode(&pool, in_fd, out_fd);
+ } else {
+- if (!EncodeOrDecode(descriptor_pool.get())) {
+- return 1;
+- }
++ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
++ }
++
++ if (in_fd != STDIN_FILENO) {
++ close(in_fd);
++ }
++ if (out_fd != STDOUT_FILENO) {
++ close(out_fd);
++ }
++
++ if (!success) {
++ return 1;
+ }
+ }
+
+@@ -1163,6 +1192,11 @@
+ for (int i = 0; i < proto_path_.size(); i++) {
+ source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
+ }
++ if (mode_ == MODE_COMPILE &&
++ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
++ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
++ << "decode operations. Ignoring.";
++ }
+
+ // Map input files to virtual paths if possible.
+ if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
+@@ -1885,6 +1919,12 @@
+ } else if (name == "--deterministic_output") {
+ deterministic_output_ = true;
+
++ } else if (name == "--protobuf_in") {
++ protobuf_in_path_ = value;
++
++ } else if (name == "--protobuf_out") {
++ protobuf_out_path_ = value;
++
+ } else if (name == "--error_format") {
+ if (value == "gcc") {
+ error_format_ = ERROR_FORMAT_GCC;
+@@ -2018,22 +2058,38 @@
+ --version Show version info and exit.
+ -h, --help Show this text and exit.
+ --encode=MESSAGE_TYPE Read a text-format message of the given type
+- from standard input and write it in binary
+- to standard output. The message type must
++ from input protobuf file and write it in binary
++ to output protobuf file. The message type must
+ be defined in PROTO_FILES or their imports.
++ The input/output protobuf files are specified
++ using the --protobuf_in and --protobuf_out
++ command line flags.
+ --deterministic_output When using --encode, ensure map fields are
+ deterministically ordered. Note that this order
+ is not canonical, and changes across builds or
+ releases of protoc.
+ --decode=MESSAGE_TYPE Read a binary message of the given type from
+- standard input and write it in text format
+- to standard output. The message type must
++ input protobuf file and write it in text format
++ to output protobuf file. The message type must
+ be defined in PROTO_FILES or their imports.
++ The input/output protobuf files are specified
++ using the --protobuf_in and --protobuf_out
++ command line flags.
+ --decode_raw Read an arbitrary protocol message from
+- standard input and write the raw tag/value
+- pairs in text format to standard output. No
++ input protobuf file and write the raw tag/value
++ pairs in text format to output protobuf file. No
+ PROTO_FILES should be given when using this
+- flag.
++ flag. The input/output protobuf files are
++ specified using the --protobuf_in and
++ --protobuf_out command line flags.
++ --protobuf_in=FILE Absolute path to the protobuf file from which
++ input of encoding/decoding operation will be
++ read. If omitted, input will be read from
++ standard input.
++ --protobuf_out=FILE Absolute path to the protobuf file to which
++ output of encoding/decoding operation will be
++ written. If omitted, output will be written to
++ standard output.
+ --descriptor_set_in=FILES Specifies a delimited list of FILES
+ each containing a FileDescriptorSet (a
+ protocol buffer defined in descriptor.proto).
+@@ -2344,7 +2400,9 @@
+ return true;
+ }
+
+-bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
++bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd) {
+ // Look up the type.
+ const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
+ if (type == NULL) {
+@@ -2356,15 +2414,15 @@
+ std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
+
+ if (mode_ == MODE_ENCODE) {
+- SetFdToTextMode(STDIN_FILENO);
+- SetFdToBinaryMode(STDOUT_FILENO);
++ SetFdToTextMode(in_fd);
++ SetFdToBinaryMode(out_fd);
+ } else {
+- SetFdToBinaryMode(STDIN_FILENO);
+- SetFdToTextMode(STDOUT_FILENO);
++ SetFdToBinaryMode(in_fd);
++ SetFdToTextMode(out_fd);
+ }
+
+- io::FileInputStream in(STDIN_FILENO);
+- io::FileOutputStream out(STDOUT_FILENO);
++ io::FileInputStream in(in_fd);
++ io::FileOutputStream out(out_fd);
+
+ if (mode_ == MODE_ENCODE) {
+ // Input is text.
+--- /src/google/protobuf/compiler/command_line_interface.h
++++ /src/google/protobuf/compiler/command_line_interface.h
+@@ -292,7 +292,9 @@
+ GeneratorContext* generator_context, std::string* error);
+
+ // Implements --encode and --decode.
+- bool EncodeOrDecode(const DescriptorPool* pool);
++ bool EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd);
+
+ // Implements the --descriptor_set_out option.
+ bool WriteDescriptorSet(
+@@ -427,6 +429,13 @@
+ // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
+ std::vector<std::string> descriptor_set_in_names_;
+
++ // When using --encode / --decode / --decode_raw absolute path to the output
++ // file. (Empty string indicates write to STDOUT).
++ std::string protobuf_out_path_;
++ // When using --encode / --decode / --decode_raw, absolute path to the input
++ // file. (Empty string indicates read from STDIN).
++ std::string protobuf_in_path_;
++
+ // If --descriptor_set_out was given, this is the filename to which the
+ // FileDescriptorSet should be written. Otherwise, empty.
+ std::string descriptor_set_out_name_;
+--- /src/google/protobuf/compiler/command_line_interface_unittest.cc
++++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
+@@ -99,7 +99,7 @@
+ virtual void SetUp();
+ virtual void TearDown();
+
+- // Runs the CommandLineInterface with the given command line. The
++ // Run the CommandLineInterface with the given command line. The
+ // command is automatically split on spaces, and the string "$tmpdir"
+ // is replaced with TestTempDir().
+ void Run(const std::string& command);
+@@ -2626,6 +2626,17 @@
+ std::string::npos);
+ }
+
++ void ExpectBinaryFilesMatch(const string &expected_file,
++ const string &actual_file) {
++ string expected_output, actual_output;
++ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
++ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
++
++ // Don't use EXPECT_EQ because we don't want to print raw binary data to
++ // stdout on failure.
++ EXPECT_TRUE(expected_output == actual_output);
++ }
++
+ private:
+ void WriteUnittestProtoDescriptorSet() {
+ unittest_proto_descriptor_set_filename_ =
+@@ -2749,6 +2760,19 @@
+ "Can only use --deterministic_output with --encode.\n");
+ }
+
++TEST_P(EncodeDecodeTest, RedirectInputOutput) {
++ string out_file = TestTempDir() + "/golden_message_out.pbf";
++ EXPECT_TRUE(
++ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
++ " --encode=protobuf_unittest.TestAllTypes" +
++ " --protobuf_in=" + TestUtil::GetTestDataPath(
++ "net/proto2/internal/"
++ "testdata/text_format_unittest_data_oneof_implemented.txt") +
++ " --protobuf_out=" + out_file));
++ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
++ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
++}
++
+ INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
+ testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
+ } // anonymous namespace
diff --git a/dev-libs/protobuf/files/protobuf-3.16.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.16.0-system_libraries.patch
new file mode 100644
index 00000000000..5b6f4101e9c
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.16.0-system_libraries.patch
@@ -0,0 +1,121 @@
+--- /Makefile.am
++++ /Makefile.am
+@@ -11,28 +11,10 @@
+ # Always include third_party directories in distributions.
+ DIST_SUBDIRS = src conformance benchmarks third_party/googletest
+
+-# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
+-# because then "make check" would also build and run all of gmock's own tests,
+-# which takes a lot of time and is generally not useful to us. Also, we don't
+-# want "make install" to recurse into gmock since we don't want to overwrite
+-# the installed version of gmock if there is one.
+ check-local:
+- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
+- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+
+-# We would like to clean gmock when "make clean" is invoked. But we have to
+-# be careful because clean-local is also invoked during "make distclean", but
+-# "make distclean" already recurses into gmock because it's listed among the
+-# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
+-# cd to the directory again and "make clean" it will fail. So, check that the
+-# Makefile exists before recursing.
+ clean-local:
+- @if test -e third_party/googletest/Makefile; then \
+- echo "Making clean in googletest"; \
+- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
+- fi; \
+- if test -e conformance/Makefile; then \
++ @if test -e conformance/Makefile; then \
+ echo "Making clean in conformance"; \
+ cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
+ fi; \
+--- /configure.ac
++++ /configure.ac
+@@ -236,12 +236,5 @@
+ fi
+ AC_SUBST([LIBLOG_LIBS])
+
+-# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
+-# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
+-# too.
+-export CFLAGS
+-export CXXFLAGS
+-AC_CONFIG_SUBDIRS([third_party/googletest])
+-
+ AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
+ AC_OUTPUT
+--- /src/Makefile.am
++++ /src/Makefile.am
+@@ -703,19 +703,11 @@
+ google/protobuf/testing/file.cc \
+ google/protobuf/testing/file.h
+
+-GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
+-GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
+-GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
+-GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
+ check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
+ protobuf-lite-test test_plugin protobuf-lite-arena-test \
+ $(GZCHECKPROGRAMS)
+ protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
+- -I$(GOOGLEMOCK_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ # Disable optimization for tests unless the user explicitly asked for it,
+ # since test_util.cc takes forever to compile with optimization (with GCC).
+ # See configure.ac for more info.
+@@ -807,12 +799,8 @@
+ # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
+ protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
+ libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include \
+- -DPROTOBUF_TEST_NO_DESCRIPTORS
++ -lgtest -lgmock -lgmock_main
++protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
+ protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lazy_descriptor_test_SOURCES = \
+ google/protobuf/compiler/cpp/cpp_unittest.cc \
+@@ -833,11 +821,7 @@
+ # full runtime and we want to make sure this test builds without full
+ # runtime.
+ protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_test_SOURCES = \
+ google/protobuf/lite_unittest.cc \
+@@ -849,11 +833,7 @@
+ # gtest when building the test internally our memory sanitizer doesn't detect
+ # memory leaks (don't know why).
+ protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
+- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
+-protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
+- -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest -lgmock -lgmock_main
+ protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
+ protobuf_lite_arena_test_SOURCES = \
+ google/protobuf/lite_arena_unittest.cc \
+@@ -863,8 +843,7 @@
+
+ # Test plugin binary.
+ test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
++ -lgtest
+ test_plugin_SOURCES = \
+ google/protobuf/compiler/mock_code_generator.cc \
+ google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-3.16.0.ebuild b/dev-libs/protobuf/protobuf-3.16.0.ebuild
new file mode 100644
index 00000000000..ed6e85a966f
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-3.16.0.ebuild
@@ -0,0 +1,140 @@
+# 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=()
+fi
+
+DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="BSD"
+SLOT="0/27"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~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.15.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.16.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
+}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2021-06-04 19:51 Mike Gilbert
0 siblings, 0 replies; 22+ messages in thread
From: Mike Gilbert @ 2021-06-04 19:51 UTC (permalink / raw
To: gentoo-commits
commit: 52f7f7972561d33b86308abc081557b6c6b8083c
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Jun 4 04:00:00 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Jun 4 19:48:09 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52f7f797
dev-libs/protobuf: Delete old version (3.13.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 -
...protobuf-3.13.0-protoc_input_output_files.patch | 262 ---------------------
dev-libs/protobuf/protobuf-3.13.0.ebuild | 131 -----------
3 files changed, 394 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 42ad9a885e5..db2b1f99008 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,4 +1,3 @@
-DIST protobuf-3.13.0.tar.gz 5277913 BLAKE2B 168aaa5beef83be675cd2543ca8efeaf5174f5e7fd861a056b04b01c8c781dc7b1fcbd05068ae89f051dfacfdc47c34b19cc33c8d09dd3212d3827746e3408f2 SHA512 514efa65fc8a36bc0791e6d39bdfb07b2689e9c2a4b82536c657859b800e7bc1e1a0ae86a7ee33f30c43a473a49b5c346ce830ac0057b6da104ed37f90b8b0fd
DIST protobuf-3.14.0.tar.gz 5319779 BLAKE2B cea083eea4d7fec441536effdfe2bf1811913154b0cc0da2f14f4edeb0efb200236da102c36700e24fab73fd9883aa90576ad64603a7f175ebf5cef0dc29aae5 SHA512 9dabba81119cb6196ef5de382a1032c57f6e69038f4dce0156f8671b98e51bb5095915fb6d05bb5a8ad8b17b559e652e1e9a392dd30c7ed8dcf1d986c137be11
DIST protobuf-3.15.0.tar.gz 5284848 BLAKE2B 6c1135499dd73b6d1764f47ded6415f8073841bccf5d5626e751fc159b67a6103d71a84096f563053c34c9e4235504238fcdc86ebb757d38b2f4bc1674d08674 SHA512 f52dfbfabdff3306d26ec05cbba7cd47bf3db8b08f4fb27e2cbd5a594de57f0a7ab2212dcea2055a9adfddc94ae4df2d0b1caea311ead75bb850ef8458b1b74a
DIST protobuf-3.15.1.tar.gz 5284851 BLAKE2B 5e3f487ba1c3f6a3d2d87f2421f9b07aa4618df0853b05364d7f29e93d8e7dc4c3ece08ba3b7cd0bf69d0faaa32ccc952218a8df7575b74aa6216977f2b2219b SHA512 24efeec969ee72833c377e6287e3b06a431d54d9b3be50635685f6903534f15c2957d78cdbf4bcc6482732ecdbc735dc894c0b9095486419b8d11d6df6169180
diff --git a/dev-libs/protobuf/files/protobuf-3.13.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.13.0-protoc_input_output_files.patch
deleted file mode 100644
index 0416aac68f6..00000000000
--- a/dev-libs/protobuf/files/protobuf-3.13.0-protoc_input_output_files.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-https://github.com/protocolbuffers/protobuf/pull/235
-
---- /src/google/protobuf/compiler/command_line_interface.cc
-+++ /src/google/protobuf/compiler/command_line_interface.cc
-@@ -997,6 +997,28 @@
- }
-
- if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
-+ bool success = false;
-+ int in_fd = STDIN_FILENO;
-+ int out_fd = STDOUT_FILENO;
-+
-+ if (!protobuf_in_path_.empty()) {
-+ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
-+ if (in_fd == -1) {
-+ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
-+ return 1;
-+ }
-+ }
-+ if (!protobuf_out_path_.empty()) {
-+ out_fd = open(protobuf_out_path_.c_str(),
-+ O_WRONLY | O_CREAT | O_TRUNC,
-+ 0644);
-+ if (out_fd == -1) {
-+ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
-+ close(in_fd);
-+ return 1;
-+ }
-+ }
-+
- if (codec_type_.empty()) {
- // HACK: Define an EmptyMessage type to use for decoding.
- DescriptorPool pool;
-@@ -1005,13 +1027,20 @@
- file.add_message_type()->set_name("EmptyMessage");
- GOOGLE_CHECK(pool.BuildFile(file) != NULL);
- codec_type_ = "EmptyMessage";
-- if (!EncodeOrDecode(&pool)) {
-- return 1;
-- }
-+ success = EncodeOrDecode(&pool, in_fd, out_fd);
- } else {
-- if (!EncodeOrDecode(descriptor_pool.get())) {
-- return 1;
-- }
-+ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
-+ }
-+
-+ if (in_fd != STDIN_FILENO) {
-+ close(in_fd);
-+ }
-+ if (out_fd != STDOUT_FILENO) {
-+ close(out_fd);
-+ }
-+
-+ if (!success) {
-+ return 1;
- }
- }
-
-@@ -1049,6 +1078,11 @@
- for (int i = 0; i < proto_path_.size(); i++) {
- source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
- }
-+ if (mode_ == MODE_COMPILE &&
-+ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
-+ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
-+ << "decode operations. Ignoring.";
-+ }
-
- // Map input files to virtual paths if possible.
- if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
-@@ -1754,6 +1788,12 @@
-
- codec_type_ = value;
-
-+ } else if (name == "--protobuf_in") {
-+ protobuf_in_path_ = value;
-+
-+ } else if (name == "--protobuf_out") {
-+ protobuf_out_path_ = value;
-+
- } else if (name == "--error_format") {
- if (value == "gcc") {
- error_format_ = ERROR_FORMAT_GCC;
-@@ -1890,29 +1930,50 @@
- " -h, --help Show this text and exit.\n"
- " --encode=MESSAGE_TYPE Read a text-format message of the "
- "given type\n"
-- " from standard input and write it in "
-- "binary\n"
-- " to standard output. The message type "
-- "must\n"
-+ " and write it in binary. The message "
-+ "type must\n"
- " be defined in PROTO_FILES or their "
- "imports.\n"
-+ " The input/output protobuf files are "
-+ "specified\n"
-+ " using the --protobuf_in and "
-+ "--protobuf_out\n"
-+ " command line flags.\n"
- " --decode=MESSAGE_TYPE Read a binary message of the given "
-- "type from\n"
-- " standard input and write it in text "
-- "format\n"
-- " to standard output. The message type "
-- "must\n"
-- " be defined in PROTO_FILES or their "
-- "imports.\n"
-+ "type and\n"
-+ " write it in text format. The message "
-+ "type\n"
-+ " must be defined in PROTO_FILES or "
-+ "their imports.\n"
-+ " The input/output protobuf files are "
-+ "specified\n"
-+ " using the --protobuf_in and "
-+ "--protobuf_out\n"
-+ " command line flags.\n"
- " --decode_raw Read an arbitrary protocol message "
-- "from\n"
-- " standard input and write the raw "
-- "tag/value\n"
-- " pairs in text format to standard "
-- "output. No\n"
-+ "and write\n"
-+ " the raw tag/value pairs in text format."
-+ " No\n"
- " PROTO_FILES should be given when using "
- "this\n"
-- " flag.\n"
-+ " flag. The input/output protobuf files "
-+ "are\n"
-+ " specified using the --protobuf_in and\n"
-+ " --protobuf_out command line flags.\n"
-+ " --protobuf_in=FILE Absolute path to the protobuf file "
-+ "from which\n"
-+ " input of encoding/decoding operation "
-+ "will be\n"
-+ " read. If omitted, input will be read "
-+ "from\n"
-+ " standard input.\n"
-+ " --protobuf_out=FILE Absolute path to the protobuf file "
-+ "to which\n"
-+ " output of encoding/decoding operation "
-+ "will be\n"
-+ " written. If omitted, output will be "
-+ "written to\n"
-+ " standard output.\n"
- " --descriptor_set_in=FILES Specifies a delimited list of FILES\n"
- " each containing a FileDescriptorSet "
- "(a\n"
-@@ -2258,7 +2319,9 @@
- return true;
- }
-
--bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
-+bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd) {
- // Look up the type.
- const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
- if (type == NULL) {
-@@ -2270,15 +2333,15 @@
- std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
-
- if (mode_ == MODE_ENCODE) {
-- SetFdToTextMode(STDIN_FILENO);
-- SetFdToBinaryMode(STDOUT_FILENO);
-+ SetFdToTextMode(in_fd);
-+ SetFdToBinaryMode(out_fd);
- } else {
-- SetFdToBinaryMode(STDIN_FILENO);
-- SetFdToTextMode(STDOUT_FILENO);
-+ SetFdToBinaryMode(in_fd);
-+ SetFdToTextMode(out_fd);
- }
-
-- io::FileInputStream in(STDIN_FILENO);
-- io::FileOutputStream out(STDOUT_FILENO);
-+ io::FileInputStream in(in_fd);
-+ io::FileOutputStream out(out_fd);
-
- if (mode_ == MODE_ENCODE) {
- // Input is text.
---- /src/google/protobuf/compiler/command_line_interface.h
-+++ /src/google/protobuf/compiler/command_line_interface.h
-@@ -296,7 +296,9 @@
- GeneratorContext* generator_context, std::string* error);
-
- // Implements --encode and --decode.
-- bool EncodeOrDecode(const DescriptorPool* pool);
-+ bool EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd);
-
- // Implements the --descriptor_set_out option.
- bool WriteDescriptorSet(
-@@ -428,6 +430,13 @@
- // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
- std::vector<std::string> descriptor_set_in_names_;
-
-+ // When using --encode / --decode / --decode_raw absolute path to the output
-+ // file. (Empty string indicates write to STDOUT).
-+ std::string protobuf_out_path_;
-+ // When using --encode / --decode / --decode_raw, absolute path to the input
-+ // file. (Empty string indicates read from STDIN).
-+ std::string protobuf_in_path_;
-+
- // If --descriptor_set_out was given, this is the filename to which the
- // FileDescriptorSet should be written. Otherwise, empty.
- std::string descriptor_set_out_name_;
---- /src/google/protobuf/compiler/command_line_interface_unittest.cc
-+++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
-@@ -95,7 +95,7 @@
- virtual void SetUp();
- virtual void TearDown();
-
-- // Runs the CommandLineInterface with the given command line. The
-+ // Run the CommandLineInterface with the given command line. The
- // command is automatically split on spaces, and the string "$tmpdir"
- // is replaced with TestTempDir().
- void Run(const std::string& command);
-@@ -2627,6 +2627,17 @@
- std::string::npos);
- }
-
-+ void ExpectBinaryFilesMatch(const string &expected_file,
-+ const string &actual_file) {
-+ string expected_output, actual_output;
-+ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
-+ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
-+
-+ // Don't use EXPECT_EQ because we don't want to print raw binary data to
-+ // stdout on failure.
-+ EXPECT_TRUE(expected_output == actual_output);
-+ }
-+
- private:
- void WriteUnittestProtoDescriptorSet() {
- unittest_proto_descriptor_set_filename_ =
-@@ -2721,6 +2732,19 @@
- "net/proto2/internal/no_such_file.proto: No such file or directory\n");
- }
-
-+TEST_P(EncodeDecodeTest, RedirectInputOutput) {
-+ string out_file = TestTempDir() + "/golden_message_out.pbf";
-+ EXPECT_TRUE(
-+ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
-+ " --encode=protobuf_unittest.TestAllTypes" +
-+ " --protobuf_in=" + TestUtil::GetTestDataPath(
-+ "net/proto2/internal/"
-+ "testdata/text_format_unittest_data_oneof_implemented.txt") +
-+ " --protobuf_out=" + out_file));
-+ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
-+ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
-+}
-+
- INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
- testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
- } // anonymous namespace
diff --git a/dev-libs/protobuf/protobuf-3.13.0.ebuild b/dev-libs/protobuf/protobuf-3.13.0.ebuild
deleted file mode 100644
index 25ec4601ee4..00000000000
--- a/dev-libs/protobuf/protobuf-3.13.0.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# 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=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="BSD"
-SLOT="0/24"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~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.13.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.13.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.13.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/7682
- sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"T is overaligned, see b\/151247138\");$/d" -i src/google/protobuf/arena.h || 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
-}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2022-01-29 15:20 Yixun Lan
0 siblings, 0 replies; 22+ messages in thread
From: Yixun Lan @ 2022-01-29 15:20 UTC (permalink / raw
To: gentoo-commits
commit: f150ada68010398c87923dbcb148ddcaf85ca183
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Jan 10 10:00:00 2022 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Jan 29 15:18:25 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f150ada6
dev-libs/protobuf: Delete old version (3.16.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 -
.../protobuf-3.15.0-disable_no-warning-test.patch | 19 ---
.../files/protobuf-3.16.0-system_libraries.patch | 121 -----------------
dev-libs/protobuf/protobuf-3.16.0.ebuild | 143 ---------------------
4 files changed, 284 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index a486c4d26a37..018b2ea1f9bf 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,4 +1,3 @@
-DIST protobuf-3.16.0.tar.gz 5299781 BLAKE2B 9ace02a6038c31b7393671fb2ccd6a4866a3f8b7d87d2bc8371f49d65b9180f10792ca2430a83449dfa7d785a1244dac23c20756414c9d1e7c7e871a8038b123 SHA512 0191e5a6a23d03f691e883e259f6d06a0ac8eef427455bc7d1cc70b6f0ed260e4ad8f360c836fd4bdc95ec0ca314c887cbf7acbcda60e03cdfe69e4cd275bff5
DIST protobuf-3.17.0.tar.gz 5185780 BLAKE2B a168619df72cdf097c7ddfd50aca96a2101bf73e7c1c842c020e6ee08a853db8674a86ca999b7706da3dd21d4d3d2159241c93232efc693701962f3a54a382e9 SHA512 36ed2de641849ce01531ff1207f62a0748f811519c40622a119a17a1e709864382de81481fb58f374a025948971c48416e7e6de9c00512a78633c7a8a3aa3a36
DIST protobuf-3.17.1.tar.gz 5192666 BLAKE2B 7f912db7e0835aaa42628fcf564a5666e2cbfa021bb35638a5eec53c3c457f1e747225dea54f732b7239a1520febca9bc20c824b1938f100796caa3ac2133bc1 SHA512 5a18aa3c1dab040dc6d22310a8503241081106acf7ca89079d7b416533d7c2cdd47719dc9023e6bc26969f0f1c796550260a04034a403c69752f6a3a7a651bb8
DIST protobuf-3.17.2.tar.gz 5192779 BLAKE2B 97f9561848e70b8d26ebcc7fc4fa8da51c4b8267efbe1d2d386c2785308e7ba7edc05f1b3863c274dc8838866d58b58509606d72c51a22b956d1d528584c4c95 SHA512 b3e7ad50ed772668df70a3a20ad1af13a5e82f23b109e4fecd34e6a74947bed300963c9f084907fbfafe28fc18365cde7df1975e2ff9538d2f5a3d2b458bca98
diff --git a/dev-libs/protobuf/files/protobuf-3.15.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.15.0-disable_no-warning-test.patch
deleted file mode 100644
index 031b1b222a9e..000000000000
--- a/dev-libs/protobuf/files/protobuf-3.15.0-disable_no-warning-test.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
-
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -709,7 +709,7 @@
- GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
-- no-warning-test $(GZCHECKPROGRAMS)
-+ $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-@@ -896,4 +896,4 @@
-
- TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
- google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
-- protobuf-lite-arena-test no-warning-test
-+ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.16.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.16.0-system_libraries.patch
deleted file mode 100644
index 5b6f4101e9ca..000000000000
--- a/dev-libs/protobuf/files/protobuf-3.16.0-system_libraries.patch
+++ /dev/null
@@ -1,121 +0,0 @@
---- /Makefile.am
-+++ /Makefile.am
-@@ -11,28 +11,10 @@
- # Always include third_party directories in distributions.
- DIST_SUBDIRS = src conformance benchmarks third_party/googletest
-
--# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
--# because then "make check" would also build and run all of gmock's own tests,
--# which takes a lot of time and is generally not useful to us. Also, we don't
--# want "make install" to recurse into gmock since we don't want to overwrite
--# the installed version of gmock if there is one.
- check-local:
-- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
-- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
-
--# We would like to clean gmock when "make clean" is invoked. But we have to
--# be careful because clean-local is also invoked during "make distclean", but
--# "make distclean" already recurses into gmock because it's listed among the
--# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
--# cd to the directory again and "make clean" it will fail. So, check that the
--# Makefile exists before recursing.
- clean-local:
-- @if test -e third_party/googletest/Makefile; then \
-- echo "Making clean in googletest"; \
-- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
-- fi; \
-- if test -e conformance/Makefile; then \
-+ @if test -e conformance/Makefile; then \
- echo "Making clean in conformance"; \
- cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
- fi; \
---- /configure.ac
-+++ /configure.ac
-@@ -236,12 +236,5 @@
- fi
- AC_SUBST([LIBLOG_LIBS])
-
--# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
--# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
--# too.
--export CFLAGS
--export CXXFLAGS
--AC_CONFIG_SUBDIRS([third_party/googletest])
--
- AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
- AC_OUTPUT
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -703,19 +703,11 @@
- google/protobuf/testing/file.cc \
- google/protobuf/testing/file.h
-
--GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
--GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
--GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
--GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
- $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
-- -I$(GOOGLEMOCK_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- # Disable optimization for tests unless the user explicitly asked for it,
- # since test_util.cc takes forever to compile with optimization (with GCC).
- # See configure.ac for more info.
-@@ -807,12 +799,8 @@
- # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
- protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
- libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include \
-- -DPROTOBUF_TEST_NO_DESCRIPTORS
-+ -lgtest -lgmock -lgmock_main
-+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
- protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lazy_descriptor_test_SOURCES = \
- google/protobuf/compiler/cpp/cpp_unittest.cc \
-@@ -833,11 +821,7 @@
- # full runtime and we want to make sure this test builds without full
- # runtime.
- protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_test_SOURCES = \
- google/protobuf/lite_unittest.cc \
-@@ -849,11 +833,7 @@
- # gtest when building the test internally our memory sanitizer doesn't detect
- # memory leaks (don't know why).
- protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_arena_test_SOURCES = \
- google/protobuf/lite_arena_unittest.cc \
-@@ -863,8 +843,7 @@
-
- # Test plugin binary.
- test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
--test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest
- test_plugin_SOURCES = \
- google/protobuf/compiler/mock_code_generator.cc \
- google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-3.16.0.ebuild b/dev-libs/protobuf/protobuf-3.16.0.ebuild
deleted file mode 100644
index 404c91cdd4aa..000000000000
--- a/dev-libs/protobuf/protobuf-3.16.0.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 2008-2022 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=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="BSD"
-SLOT="0/27"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~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.15.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.16.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
-
- # https://github.com/protocolbuffers/protobuf/issues/9392
- sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || 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
-}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2022-08-18 2:53 Matt Turner
0 siblings, 0 replies; 22+ messages in thread
From: Matt Turner @ 2022-08-18 2:53 UTC (permalink / raw
To: gentoo-commits
commit: b0065b35fcfd059708a9eac4a1ad6c19c4082036
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 18 02:35:41 2022 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Aug 18 02:53:04 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0065b35
dev-libs/protobuf: Drop old versions
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
dev-libs/protobuf/Manifest | 2 -
.../protobuf-3.17.0-disable_no-warning-test.patch | 19 ---
.../files/protobuf-3.17.0-system_libraries.patch | 121 -----------------
dev-libs/protobuf/protobuf-3.17.3.ebuild | 143 ---------------------
dev-libs/protobuf/protobuf-3.19.1.ebuild | 141 --------------------
5 files changed, 426 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 5b121b0a22b0..445bb0b6652e 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,3 +1 @@
-DIST protobuf-3.17.3.tar.gz 5235236 BLAKE2B 2495e678c8f9436d4e5a30ccee8b6226125d418ac7ecf7df20b078a1a16c221cbccab7d846dcd56a90220c106617fa75c410a21b62612fedec378cd7e8571350 SHA512 b4030b4474cc5fb5a62501200725dd488e6e66e3ced4ed12ab4ee029fcfed305e92ec966adafbdd343afffd186908163849422b95eaa500e7e741ac325d01d12
-DIST protobuf-3.19.1.tar.gz 5291573 BLAKE2B a34f1a7cf99ecb6cb8a26bc858de6273bfd26aa9be1e89e48c16cb5df0f1e9576479344c8250017238dbac0d0c4ac33001125b5fc622cb64ed6b91023198b03a SHA512 f1271f5159a7be363a5f60ce4921dfea68a8468d66808330bacaeaa1cb7f652d045ab080b5d82816a6fd4e6d7d7fe79aaa6c8d66d81692721d36ce3bbf619f31
DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6
diff --git a/dev-libs/protobuf/files/protobuf-3.17.0-disable_no-warning-test.patch b/dev-libs/protobuf/files/protobuf-3.17.0-disable_no-warning-test.patch
deleted file mode 100644
index eb1598c945fd..000000000000
--- a/dev-libs/protobuf/files/protobuf-3.17.0-disable_no-warning-test.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Disable no-warning-test which is compiled with -Werror option and whose only purpose is checking if compilation results in any warnings.
-
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -713,7 +713,7 @@
- GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
-- no-warning-test $(GZCHECKPROGRAMS)
-+ $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-@@ -900,4 +900,4 @@
-
- TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \
- google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) \
-- protobuf-lite-arena-test no-warning-test
-+ protobuf-lite-arena-test
diff --git a/dev-libs/protobuf/files/protobuf-3.17.0-system_libraries.patch b/dev-libs/protobuf/files/protobuf-3.17.0-system_libraries.patch
deleted file mode 100644
index 3d5069dd1478..000000000000
--- a/dev-libs/protobuf/files/protobuf-3.17.0-system_libraries.patch
+++ /dev/null
@@ -1,121 +0,0 @@
---- /Makefile.am
-+++ /Makefile.am
-@@ -11,28 +11,10 @@
- # Always include third_party directories in distributions.
- DIST_SUBDIRS = src conformance benchmarks third_party/googletest
-
--# Build gmock before we build protobuf tests. We don't add gmock to SUBDIRS
--# because then "make check" would also build and run all of gmock's own tests,
--# which takes a lot of time and is generally not useful to us. Also, we don't
--# want "make install" to recurse into gmock since we don't want to overwrite
--# the installed version of gmock if there is one.
- check-local:
-- @echo "Making lib/libgmock.a lib/libgmock_main.a in gmock"
-- @cd third_party/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-- @cd third_party/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
-
--# We would like to clean gmock when "make clean" is invoked. But we have to
--# be careful because clean-local is also invoked during "make distclean", but
--# "make distclean" already recurses into gmock because it's listed among the
--# DIST_SUBDIRS. distclean will delete gmock/Makefile, so if we then try to
--# cd to the directory again and "make clean" it will fail. So, check that the
--# Makefile exists before recursing.
- clean-local:
-- @if test -e third_party/googletest/Makefile; then \
-- echo "Making clean in googletest"; \
-- cd third_party/googletest && $(MAKE) $(AM_MAKEFLAGS) clean; \
-- fi; \
-- if test -e conformance/Makefile; then \
-+ @if test -e conformance/Makefile; then \
- echo "Making clean in conformance"; \
- cd conformance && $(MAKE) $(AM_MAKEFLAGS) clean; \
- fi; \
---- /configure.ac
-+++ /configure.ac
-@@ -236,12 +236,5 @@
- fi
- AC_SUBST([LIBLOG_LIBS])
-
--# HACK: Make gmock's configure script pick up our copy of CFLAGS and CXXFLAGS,
--# since the flags added by ACX_CHECK_SUNCC must be used when compiling gmock
--# too.
--export CFLAGS
--export CXXFLAGS
--AC_CONFIG_SUBDIRS([third_party/googletest])
--
- AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
- AC_OUTPUT
---- /src/Makefile.am
-+++ /src/Makefile.am
-@@ -707,19 +707,11 @@
- google/protobuf/testing/file.cc \
- google/protobuf/testing/file.h
-
--GOOGLETEST_BUILD_DIR=../third_party/googletest/googletest
--GOOGLEMOCK_BUILD_DIR=../third_party/googletest/googlemock
--GOOGLETEST_SRC_DIR=$(srcdir)/../third_party/googletest/googletest
--GOOGLEMOCK_SRC_DIR=$(srcdir)/../third_party/googletest/googlemock
- check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
- protobuf-lite-test test_plugin protobuf-lite-arena-test \
- $(GZCHECKPROGRAMS)
- protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
-- -I$(GOOGLEMOCK_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- # Disable optimization for tests unless the user explicitly asked for it,
- # since test_util.cc takes forever to compile with optimization (with GCC).
- # See configure.ac for more info.
-@@ -811,12 +803,8 @@
- # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
- protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
- libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include \
-- -DPROTOBUF_TEST_NO_DESCRIPTORS
-+ -lgtest -lgmock -lgmock_main
-+protobuf_lazy_descriptor_test_CPPFLAGS = -DPROTOBUF_TEST_NO_DESCRIPTORS
- protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lazy_descriptor_test_SOURCES = \
- google/protobuf/compiler/cpp/cpp_unittest.cc \
-@@ -837,11 +825,7 @@
- # full runtime and we want to make sure this test builds without full
- # runtime.
- protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_test_SOURCES = \
- google/protobuf/lite_unittest.cc \
-@@ -853,11 +837,7 @@
- # gtest when building the test internally our memory sanitizer doesn't detect
- # memory leaks (don't know why).
- protobuf_lite_arena_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock.la \
-- $(GOOGLEMOCK_BUILD_DIR)/lib/libgmock_main.la
--protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
-- -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest -lgmock -lgmock_main
- protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
- protobuf_lite_arena_test_SOURCES = \
- google/protobuf/lite_arena_unittest.cc \
-@@ -867,8 +847,7 @@
-
- # Test plugin binary.
- test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
-- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
--test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
-+ -lgtest
- test_plugin_SOURCES = \
- google/protobuf/compiler/mock_code_generator.cc \
- google/protobuf/testing/file.cc \
diff --git a/dev-libs/protobuf/protobuf-3.17.3.ebuild b/dev-libs/protobuf/protobuf-3.17.3.ebuild
deleted file mode 100644
index c021f1f1885f..000000000000
--- a/dev-libs/protobuf/protobuf-3.17.3.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 2008-2022 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=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="BSD"
-SLOT="0/28"
-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
-
- # https://github.com/protocolbuffers/protobuf/issues/9392
- sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || 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
-}
diff --git a/dev-libs/protobuf/protobuf-3.19.1.ebuild b/dev-libs/protobuf/protobuf-3.19.1.ebuild
deleted file mode 100644
index 8cdee6955692..000000000000
--- a/dev-libs/protobuf/protobuf-3.19.1.ebuild
+++ /dev/null
@@ -1,141 +0,0 @@
-# Copyright 2008-2022 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"
-# -hppa for bug #831728
-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
-
- # https://github.com/protocolbuffers/protobuf/issues/9392
- sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || 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
-}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2022-09-02 15:18 Arthur Zamarin
0 siblings, 0 replies; 22+ messages in thread
From: Arthur Zamarin @ 2022-09-02 15:18 UTC (permalink / raw
To: gentoo-commits
commit: 107e1921be56a3e9ca839e49f12572dee26ff07d
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 2 13:53:42 2022 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri Sep 2 15:16:25 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=107e1921
dev-libs/protobuf: add 3.20.1
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 +
...protobuf-3.20.1-protoc_input_output_files.patch | 240 +++++++++++++++++++++
dev-libs/protobuf/protobuf-3.20.1.ebuild | 143 ++++++++++++
3 files changed, 384 insertions(+)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 445bb0b6652e..dfb0564c5120 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1 +1,2 @@
DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6
+DIST protobuf-3.20.1.tar.gz 5368262 BLAKE2B 1ce1aef2e4c4f3ea4863629cc75d89fe17d0c7ac0c342ac641c787456fd4a12756c2892a27ddadedc94a7201494ec84566638ce33a03cb0c867b04e9eee0edb3 SHA512 fde3eb9f13946887ddfd87df428c5615ad09aaf191e4478b24e98e5e13231feeff4e70b4ca6a2ff7d9b9b2e2c60bc1d5479526edeafa78f9a8ed3bef2e0bacb0
diff --git a/dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch
new file mode 100644
index 000000000000..812882cf6b09
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.20.1-protoc_input_output_files.patch
@@ -0,0 +1,240 @@
+https://github.com/protocolbuffers/protobuf/pull/235
+
+--- /src/google/protobuf/compiler/command_line_interface.cc
++++ /src/google/protobuf/compiler/command_line_interface.cc
+@@ -1110,6 +1110,28 @@
+ }
+
+ if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
++ bool success = false;
++ int in_fd = STDIN_FILENO;
++ int out_fd = STDOUT_FILENO;
++
++ if (!protobuf_in_path_.empty()) {
++ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
++ if (in_fd == -1) {
++ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
++ return 1;
++ }
++ }
++ if (!protobuf_out_path_.empty()) {
++ out_fd = open(protobuf_out_path_.c_str(),
++ O_WRONLY | O_CREAT | O_TRUNC,
++ 0644);
++ if (out_fd == -1) {
++ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
++ close(in_fd);
++ return 1;
++ }
++ }
++
+ if (codec_type_.empty()) {
+ // HACK: Define an EmptyMessage type to use for decoding.
+ DescriptorPool pool;
+@@ -1118,13 +1140,20 @@
+ file.add_message_type()->set_name("EmptyMessage");
+ GOOGLE_CHECK(pool.BuildFile(file) != NULL);
+ codec_type_ = "EmptyMessage";
+- if (!EncodeOrDecode(&pool)) {
+- return 1;
+- }
++ success = EncodeOrDecode(&pool, in_fd, out_fd);
+ } else {
+- if (!EncodeOrDecode(descriptor_pool.get())) {
+- return 1;
+- }
++ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
++ }
++
++ if (in_fd != STDIN_FILENO) {
++ close(in_fd);
++ }
++ if (out_fd != STDOUT_FILENO) {
++ close(out_fd);
++ }
++
++ if (!success) {
++ return 1;
+ }
+ }
+
+@@ -1163,6 +1192,11 @@
+ for (int i = 0; i < proto_path_.size(); i++) {
+ source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
+ }
++ if (mode_ == MODE_COMPILE &&
++ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
++ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
++ << "decode operations. Ignoring.";
++ }
+
+ // Map input files to virtual paths if possible.
+ if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
+@@ -1885,6 +1919,12 @@
+ } else if (name == "--deterministic_output") {
+ deterministic_output_ = true;
+
++ } else if (name == "--protobuf_in") {
++ protobuf_in_path_ = value;
++
++ } else if (name == "--protobuf_out") {
++ protobuf_out_path_ = value;
++
+ } else if (name == "--error_format") {
+ if (value == "gcc") {
+ error_format_ = ERROR_FORMAT_GCC;
+@@ -2018,22 +2058,38 @@
+ --version Show version info and exit.
+ -h, --help Show this text and exit.
+ --encode=MESSAGE_TYPE Read a text-format message of the given type
+- from standard input and write it in binary
+- to standard output. The message type must
++ from input protobuf file and write it in binary
++ to output protobuf file. The message type must
+ be defined in PROTO_FILES or their imports.
++ The input/output protobuf files are specified
++ using the --protobuf_in and --protobuf_out
++ command line flags.
+ --deterministic_output When using --encode, ensure map fields are
+ deterministically ordered. Note that this order
+ is not canonical, and changes across builds or
+ releases of protoc.
+ --decode=MESSAGE_TYPE Read a binary message of the given type from
+- standard input and write it in text format
+- to standard output. The message type must
++ input protobuf file and write it in text format
++ to output protobuf file. The message type must
+ be defined in PROTO_FILES or their imports.
++ The input/output protobuf files are specified
++ using the --protobuf_in and --protobuf_out
++ command line flags.
+ --decode_raw Read an arbitrary protocol message from
+- standard input and write the raw tag/value
+- pairs in text format to standard output. No
++ input protobuf file and write the raw tag/value
++ pairs in text format to output protobuf file. No
+ PROTO_FILES should be given when using this
+- flag.
++ flag. The input/output protobuf files are
++ specified using the --protobuf_in and
++ --protobuf_out command line flags.
++ --protobuf_in=FILE Absolute path to the protobuf file from which
++ input of encoding/decoding operation will be
++ read. If omitted, input will be read from
++ standard input.
++ --protobuf_out=FILE Absolute path to the protobuf file to which
++ output of encoding/decoding operation will be
++ written. If omitted, output will be written to
++ standard output.
+ --descriptor_set_in=FILES Specifies a delimited list of FILES
+ each containing a FileDescriptorSet (a
+ protocol buffer defined in descriptor.proto).
+@@ -2344,7 +2400,9 @@
+ return true;
+ }
+
+-bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
++bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd) {
+ // Look up the type.
+ const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
+ if (type == NULL) {
+@@ -2356,15 +2414,15 @@
+ std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
+
+ if (mode_ == MODE_ENCODE) {
+- SetFdToTextMode(STDIN_FILENO);
+- SetFdToBinaryMode(STDOUT_FILENO);
++ SetFdToTextMode(in_fd);
++ SetFdToBinaryMode(out_fd);
+ } else {
+- SetFdToBinaryMode(STDIN_FILENO);
+- SetFdToTextMode(STDOUT_FILENO);
++ SetFdToBinaryMode(in_fd);
++ SetFdToTextMode(out_fd);
+ }
+
+- io::FileInputStream in(STDIN_FILENO);
+- io::FileOutputStream out(STDOUT_FILENO);
++ io::FileInputStream in(in_fd);
++ io::FileOutputStream out(out_fd);
+
+ if (mode_ == MODE_ENCODE) {
+ // Input is text.
+--- /src/google/protobuf/compiler/command_line_interface.h
++++ /src/google/protobuf/compiler/command_line_interface.h
+@@ -292,7 +292,9 @@
+ GeneratorContext* generator_context, std::string* error);
+
+ // Implements --encode and --decode.
+- bool EncodeOrDecode(const DescriptorPool* pool);
++ bool EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd);
+
+ // Implements the --descriptor_set_out option.
+ bool WriteDescriptorSet(
+@@ -427,6 +429,13 @@
+ // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
+ std::vector<std::string> descriptor_set_in_names_;
+
++ // When using --encode / --decode / --decode_raw absolute path to the output
++ // file. (Empty string indicates write to STDOUT).
++ std::string protobuf_out_path_;
++ // When using --encode / --decode / --decode_raw, absolute path to the input
++ // file. (Empty string indicates read from STDIN).
++ std::string protobuf_in_path_;
++
+ // If --descriptor_set_out was given, this is the filename to which the
+ // FileDescriptorSet should be written. Otherwise, empty.
+ std::string descriptor_set_out_name_;
+--- /src/google/protobuf/compiler/command_line_interface_unittest.cc
++++ /src/google/protobuf/compiler/command_line_interface_unittest.cc
+@@ -99,7 +99,7 @@
+ virtual void SetUp();
+ virtual void TearDown();
+
+- // Runs the CommandLineInterface with the given command line. The
++ // Run the CommandLineInterface with the given command line. The
+ // command is automatically split on spaces, and the string "$tmpdir"
+ // is replaced with TestTempDir().
+ void Run(const std::string& command);
+@@ -2626,6 +2626,17 @@
+ std::string::npos);
+ }
+
++ void ExpectBinaryFilesMatch(const std::string &expected_file,
++ const std::string &actual_file) {
++ std::string expected_output, actual_output;
++ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
++ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
++
++ // Don't use EXPECT_EQ because we don't want to print raw binary data to
++ // stdout on failure.
++ EXPECT_TRUE(expected_output == actual_output);
++ }
++
+ private:
+ void WriteUnittestProtoDescriptorSet() {
+ unittest_proto_descriptor_set_filename_ =
+@@ -2749,6 +2760,19 @@
+ "Can only use --deterministic_output with --encode.\n");
+ }
+
++TEST_P(EncodeDecodeTest, RedirectInputOutput) {
++ std::string out_file = TestTempDir() + "/golden_message_out.pbf";
++ EXPECT_TRUE(
++ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
++ " --encode=protobuf_unittest.TestAllTypes" +
++ " --protobuf_in=" + TestUtil::GetTestDataPath(
++ "net/proto2/internal/"
++ "testdata/text_format_unittest_data_oneof_implemented.txt") +
++ " --protobuf_out=" + out_file));
++ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
++ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
++}
++
+ INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
+ testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
+ } // anonymous namespace
diff --git a/dev-libs/protobuf/protobuf-3.20.1.ebuild b/dev-libs/protobuf/protobuf-3.20.1.ebuild
new file mode 100644
index 000000000000..872935b5b898
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-3.20.1.ebuild
@@ -0,0 +1,143 @@
+# Copyright 2008-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+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=()
+fi
+
+DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
+HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="BSD"
+SLOT="0/30"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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.19.0-disable_no-warning-test.patch"
+ "${FILESDIR}/${PN}-3.19.0-system_libraries.patch"
+ "${FILESDIR}/${PN}-3.20.1-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
+
+ # https://github.com/protocolbuffers/protobuf/issues/9433
+ sed -e "/^[[:space:]]*static_assert(alignof(U) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.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
+}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2022-10-25 21:55 Sam James
0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2022-10-25 21:55 UTC (permalink / raw
To: gentoo-commits
commit: f5f90f3cfac15df1fa6ab52f34382b977f62d85a
Author: Thibaud CANALE <thican <AT> thican <DOT> net>
AuthorDate: Tue Aug 16 22:13:04 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 25 21:53:22 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5f90f3c
dev-libs/protobuf: add 3.19.6, 3.20.3, 21.8
Signed-off-by: Thibaud CANALE <thican <AT> thican.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/protobuf/Manifest | 3 +
...protobuf-3.20.2-protoc_input_output_files.patch | 240 +++++++++++++++++++++
.../{protobuf-9999.ebuild => protobuf-21.8.ebuild} | 27 ++-
...protobuf-9999.ebuild => protobuf-3.19.6.ebuild} | 32 +--
...protobuf-9999.ebuild => protobuf-3.20.3.ebuild} | 25 ++-
dev-libs/protobuf/protobuf-9999.ebuild | 25 ++-
6 files changed, 309 insertions(+), 43 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index dfb0564c5120..74313749d43f 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,2 +1,5 @@
+DIST protobuf-21.8.tar.gz 5110670 BLAKE2B 3c1b0c857a86e9586481d63896341d0cb11290dbd710d87a6f7889d34f5f262abe2986a29ed19a730f8fa5df0b5c62d77a4db6aa415a72b239f7483ae8d6380c SHA512 cb17be759311e91172801add1f88fe7a0291b547170c40d2e3303f5c248570dddeade96bd48740edd628215f55269c97475e2f4c4a41c50f1018d525f52036cb
DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6
+DIST protobuf-3.19.6.tar.gz 5299501 BLAKE2B 3121f76b95f83c5309ce49ce296b738eff7be9d3a5093c564fbe2339fb5f3729e406f1b44bfcc05feb0d31ab63838bb4f54685017977c73a33b91215a6776072 SHA512 8f92242f2be8e1bbfba41341c87709ad91ad83b8b3e3df88bb430411541d3399295f49291fd52b50e3487b0fce33181cb4d175685fd25aac72adfaee26a612d4
DIST protobuf-3.20.1.tar.gz 5368262 BLAKE2B 1ce1aef2e4c4f3ea4863629cc75d89fe17d0c7ac0c342ac641c787456fd4a12756c2892a27ddadedc94a7201494ec84566638ce33a03cb0c867b04e9eee0edb3 SHA512 fde3eb9f13946887ddfd87df428c5615ad09aaf191e4478b24e98e5e13231feeff4e70b4ca6a2ff7d9b9b2e2c60bc1d5479526edeafa78f9a8ed3bef2e0bacb0
+DIST protobuf-3.20.3.tar.gz 5374320 BLAKE2B fb51f2a0ecf5b83235f5252051f8192ae377bb7a5e030c3f3e9435ccde25919c059830cf476e840fa6c970928a32c0075e213c9d5d4d9e3d3b24732c39a9fbfa SHA512 01d6703bdbe769a1200ee6e4ebcdcb99688ec21f576988c60d82ec36e0822820fb245fcb4ca53293143d53e666d748b5a0c6937bc659fb3cdc4cd9b05ed12a1c
diff --git a/dev-libs/protobuf/files/protobuf-3.20.2-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.20.2-protoc_input_output_files.patch
new file mode 100644
index 000000000000..e4bf6858974a
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-3.20.2-protoc_input_output_files.patch
@@ -0,0 +1,240 @@
+https://github.com/protocolbuffers/protobuf/pull/235
+
+--- a/src/google/protobuf/compiler/command_line_interface.cc
++++ b/src/google/protobuf/compiler/command_line_interface.cc
+@@ -1112,6 +1112,28 @@
+ }
+
+ if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
++ bool success = false;
++ int in_fd = STDIN_FILENO;
++ int out_fd = STDOUT_FILENO;
++
++ if (!protobuf_in_path_.empty()) {
++ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
++ if (in_fd == -1) {
++ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
++ return 1;
++ }
++ }
++ if (!protobuf_out_path_.empty()) {
++ out_fd = open(protobuf_out_path_.c_str(),
++ O_WRONLY | O_CREAT | O_TRUNC,
++ 0644);
++ if (out_fd == -1) {
++ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
++ close(in_fd);
++ return 1;
++ }
++ }
++
+ if (codec_type_.empty()) {
+ // HACK: Define an EmptyMessage type to use for decoding.
+ DescriptorPool pool;
+@@ -1120,13 +1142,20 @@
+ file.add_message_type()->set_name("EmptyMessage");
+ GOOGLE_CHECK(pool.BuildFile(file) != nullptr);
+ codec_type_ = "EmptyMessage";
+- if (!EncodeOrDecode(&pool)) {
+- return 1;
+- }
++ success = EncodeOrDecode(&pool, in_fd, out_fd);
+ } else {
+- if (!EncodeOrDecode(descriptor_pool.get())) {
+- return 1;
+- }
++ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
++ }
++
++ if (in_fd != STDIN_FILENO) {
++ close(in_fd);
++ }
++ if (out_fd != STDOUT_FILENO) {
++ close(out_fd);
++ }
++
++ if (!success) {
++ return 1;
+ }
+ }
+
+@@ -1165,6 +1194,11 @@
+ for (int i = 0; i < proto_path_.size(); i++) {
+ source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
+ }
++ if (mode_ == MODE_COMPILE &&
++ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
++ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
++ << "decode operations. Ignoring.";
++ }
+
+ // Map input files to virtual paths if possible.
+ if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
+@@ -1888,6 +1922,12 @@
+ } else if (name == "--deterministic_output") {
+ deterministic_output_ = true;
+
++ } else if (name == "--protobuf_in") {
++ protobuf_in_path_ = value;
++
++ } else if (name == "--protobuf_out") {
++ protobuf_out_path_ = value;
++
+ } else if (name == "--error_format") {
+ if (value == "gcc") {
+ error_format_ = ERROR_FORMAT_GCC;
+@@ -2021,22 +2061,38 @@
+ --version Show version info and exit.
+ -h, --help Show this text and exit.
+ --encode=MESSAGE_TYPE Read a text-format message of the given type
+- from standard input and write it in binary
+- to standard output. The message type must
++ from input protobuf file and write it in binary
++ to output protobuf file. The message type must
+ be defined in PROTO_FILES or their imports.
++ The input/output protobuf files are specified
++ using the --protobuf_in and --protobuf_out
++ command line flags.
+ --deterministic_output When using --encode, ensure map fields are
+ deterministically ordered. Note that this order
+ is not canonical, and changes across builds or
+ releases of protoc.
+ --decode=MESSAGE_TYPE Read a binary message of the given type from
+- standard input and write it in text format
+- to standard output. The message type must
++ input protobuf file and write it in text format
++ to output protobuf file. The message type must
+ be defined in PROTO_FILES or their imports.
++ The input/output protobuf files are specified
++ using the --protobuf_in and --protobuf_out
++ command line flags.
+ --decode_raw Read an arbitrary protocol message from
+- standard input and write the raw tag/value
+- pairs in text format to standard output. No
++ input protobuf file and write the raw tag/value
++ pairs in text format to output protobuf file. No
+ PROTO_FILES should be given when using this
+- flag.
++ flag. The input/output protobuf files are
++ specified using the --protobuf_in and
++ --protobuf_out command line flags.
++ --protobuf_in=FILE Absolute path to the protobuf file from which
++ input of encoding/decoding operation will be
++ read. If omitted, input will be read from
++ standard input.
++ --protobuf_out=FILE Absolute path to the protobuf file to which
++ output of encoding/decoding operation will be
++ written. If omitted, output will be written to
++ standard output.
+ --descriptor_set_in=FILES Specifies a delimited list of FILES
+ each containing a FileDescriptorSet (a
+ protocol buffer defined in descriptor.proto).
+@@ -2347,7 +2403,9 @@
+ return true;
+ }
+
+-bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
++bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd) {
+ // Look up the type.
+ const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
+ if (type == nullptr) {
+@@ -2359,15 +2417,15 @@
+ std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
+
+ if (mode_ == MODE_ENCODE) {
+- SetFdToTextMode(STDIN_FILENO);
+- SetFdToBinaryMode(STDOUT_FILENO);
++ SetFdToTextMode(in_fd);
++ SetFdToBinaryMode(out_fd);
+ } else {
+- SetFdToBinaryMode(STDIN_FILENO);
+- SetFdToTextMode(STDOUT_FILENO);
++ SetFdToBinaryMode(in_fd);
++ SetFdToTextMode(out_fd);
+ }
+
+- io::FileInputStream in(STDIN_FILENO);
+- io::FileOutputStream out(STDOUT_FILENO);
++ io::FileInputStream in(in_fd);
++ io::FileOutputStream out(out_fd);
+
+ if (mode_ == MODE_ENCODE) {
+ // Input is text.
+--- a/src/google/protobuf/compiler/command_line_interface.h
++++ b/src/google/protobuf/compiler/command_line_interface.h
+@@ -294,7 +294,9 @@
+ GeneratorContext* generator_context, std::string* error);
+
+ // Implements --encode and --decode.
+- bool EncodeOrDecode(const DescriptorPool* pool);
++ bool EncodeOrDecode(const DescriptorPool* pool,
++ int in_fd,
++ int out_fd);
+
+ // Implements the --descriptor_set_out option.
+ bool WriteDescriptorSet(
+@@ -429,6 +431,13 @@
+ // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
+ std::vector<std::string> descriptor_set_in_names_;
+
++ // When using --encode / --decode / --decode_raw absolute path to the output
++ // file. (Empty string indicates write to STDOUT).
++ std::string protobuf_out_path_;
++ // When using --encode / --decode / --decode_raw, absolute path to the input
++ // file. (Empty string indicates read from STDIN).
++ std::string protobuf_in_path_;
++
+ // If --descriptor_set_out was given, this is the filename to which the
+ // FileDescriptorSet should be written. Otherwise, empty.
+ std::string descriptor_set_out_name_;
+--- a/src/google/protobuf/compiler/command_line_interface_unittest.cc
++++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc
+@@ -99,7 +99,7 @@
+ void SetUp() override;
+ void TearDown() override;
+
+- // Runs the CommandLineInterface with the given command line. The
++ // Run the CommandLineInterface with the given command line. The
+ // command is automatically split on spaces, and the string "$tmpdir"
+ // is replaced with TestTempDir().
+ void Run(const std::string& command);
+@@ -2626,6 +2626,17 @@
+ std::string::npos);
+ }
+
++ void ExpectBinaryFilesMatch(const std::string &expected_file,
++ const std::string &actual_file) {
++ std::string expected_output, actual_output;
++ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
++ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
++
++ // Don't use EXPECT_EQ because we don't want to print raw binary data to
++ // stdout on failure.
++ EXPECT_TRUE(expected_output == actual_output);
++ }
++
+ private:
+ void WriteUnittestProtoDescriptorSet() {
+ unittest_proto_descriptor_set_filename_ =
+@@ -2749,6 +2760,19 @@
+ "Can only use --deterministic_output with --encode.\n");
+ }
+
++TEST_P(EncodeDecodeTest, RedirectInputOutput) {
++ std::string out_file = TestTempDir() + "/golden_message_out.pbf";
++ EXPECT_TRUE(
++ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
++ " --encode=protobuf_unittest.TestAllTypes" +
++ " --protobuf_in=" + TestUtil::GetTestDataPath(
++ "net/proto2/internal/"
++ "testdata/text_format_unittest_data_oneof_implemented.txt") +
++ " --protobuf_out=" + out_file));
++ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
++ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
++}
++
+ INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
+ testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
+ } // anonymous namespace
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-21.8.ebuild
similarity index 85%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-21.8.ebuild
index 0e620717ec44..523c763c265c 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-21.8.ebuild
@@ -5,24 +5,23 @@ EAPI=8
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
-if [[ "${PV}" == "9999" ]]; then
+if [[ "${PV}" == *9999 ]]; then
inherit git-r3
- EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
+ EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
EGIT_SUBMODULES=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
fi
+DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
+HOMEPAGE="
+ https://developers.google.com/protocol-buffers/
+"
+
LICENSE="BSD"
-SLOT="0/31"
+SLOT="0/32"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -35,7 +34,7 @@ RDEPEND="emacs? ( app-editors/emacs:* )
PATCHES=(
"${FILESDIR}/${PN}-3.19.0-disable_no-warning-test.patch"
"${FILESDIR}/${PN}-3.19.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.20.1-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.20.2-protoc_input_output_files.patch"
)
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
@@ -116,6 +115,12 @@ 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
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.19.6.ebuild
similarity index 80%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.19.6.ebuild
index 0e620717ec44..8784499c1fd7 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.19.6.ebuild
@@ -5,24 +5,23 @@ EAPI=8
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
-if [[ "${PV}" == "9999" ]]; then
+if [[ "${PV}" == *9999 ]]; then
inherit git-r3
- EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
+ EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
EGIT_SUBMODULES=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
fi
+DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
+HOMEPAGE="
+ https://developers.google.com/protocol-buffers/
+"
+
LICENSE="BSD"
-SLOT="0/31"
+SLOT="0/30"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -35,7 +34,7 @@ RDEPEND="emacs? ( app-editors/emacs:* )
PATCHES=(
"${FILESDIR}/${PN}-3.19.0-disable_no-warning-test.patch"
"${FILESDIR}/${PN}-3.19.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.20.1-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.16.0-protoc_input_output_files.patch"
)
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
@@ -58,8 +57,11 @@ src_prepare() {
# 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
+ # https://github.com/protocolbuffers/protobuf/issues/9392
+ sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die
+
# https://github.com/protocolbuffers/protobuf/issues/9433
- sed -e "/^[[:space:]]*static_assert(alignof(U) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.cc || die
+ sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.cc || die
eautoreconf
}
@@ -116,6 +118,12 @@ 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
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-3.20.3.ebuild
similarity index 85%
copy from dev-libs/protobuf/protobuf-9999.ebuild
copy to dev-libs/protobuf/protobuf-3.20.3.ebuild
index 0e620717ec44..cade7f688a49 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-3.20.3.ebuild
@@ -5,22 +5,21 @@ EAPI=8
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
-if [[ "${PV}" == "9999" ]]; then
+if [[ "${PV}" == *9999 ]]; then
inherit git-r3
- EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
+ EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
EGIT_SUBMODULES=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
fi
+DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
+HOMEPAGE="
+ https://developers.google.com/protocol-buffers/
+"
+
LICENSE="BSD"
SLOT="0/31"
IUSE="emacs examples static-libs test zlib"
@@ -35,7 +34,7 @@ RDEPEND="emacs? ( app-editors/emacs:* )
PATCHES=(
"${FILESDIR}/${PN}-3.19.0-disable_no-warning-test.patch"
"${FILESDIR}/${PN}-3.19.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.20.1-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-3.20.2-protoc_input_output_files.patch"
)
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
@@ -116,6 +115,12 @@ 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
diff --git a/dev-libs/protobuf/protobuf-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild
index 0e620717ec44..9f84c789877f 100644
--- a/dev-libs/protobuf/protobuf-9999.ebuild
+++ b/dev-libs/protobuf/protobuf-9999.ebuild
@@ -5,24 +5,23 @@ EAPI=8
inherit autotools elisp-common flag-o-matic multilib-minimal toolchain-funcs
-if [[ "${PV}" == "9999" ]]; then
+if [[ "${PV}" == *9999 ]]; then
inherit git-r3
- EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf"
+ EGIT_REPO_URI="https://github.com/protocolbuffers/protobuf.git"
EGIT_SUBMODULES=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
fi
+DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
+HOMEPAGE="
+ https://developers.google.com/protocol-buffers/
+"
+
LICENSE="BSD"
-SLOT="0/31"
+SLOT="0/32"
IUSE="emacs examples static-libs test zlib"
RESTRICT="!test? ( test )"
@@ -116,6 +115,12 @@ 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
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2023-01-04 6:04 Sam James
0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2023-01-04 6:04 UTC (permalink / raw
To: gentoo-commits
commit: 7778f9cadb610c8d9cdc057fe1781009d776511f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 4 05:58:56 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 4 06:04:21 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7778f9ca
dev-libs/protobuf: backport 32-bit test fixes
Closes: https://bugs.gentoo.org/875584
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/protobuf-21.9-disable-32-bit-tests.patch | 118 +++++++++++++++++++++
dev-libs/protobuf/protobuf-21.9.ebuild | 3 +-
2 files changed, 120 insertions(+), 1 deletion(-)
diff --git a/dev-libs/protobuf/files/protobuf-21.9-disable-32-bit-tests.patch b/dev-libs/protobuf/files/protobuf-21.9-disable-32-bit-tests.patch
new file mode 100644
index 000000000000..cd6b5aa2db6d
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-21.9-disable-32-bit-tests.patch
@@ -0,0 +1,118 @@
+https://bugs.gentoo.org/875584
+https://github.com/protocolbuffers/protobuf/pull/10589
+
+From 5f4a52d9bff7595ec47fb6727662a1cada3cd404 Mon Sep 17 00:00:00 2001
+From: Mike Kruskal <mkruskal@google.com>
+Date: Thu, 15 Sep 2022 10:23:23 -0700
+Subject: [PATCH 3/7] Patching static assert test failure
+
+--- a/src/google/protobuf/extension_set_unittest.cc
++++ b/src/google/protobuf/extension_set_unittest.cc
+@@ -855,8 +855,10 @@ TEST(ExtensionSetTest, SpaceUsedExcludingSelf) {
+ const size_t old_capacity = \
+ message->GetRepeatedExtension(unittest::repeated_##type##_extension) \
+ .Capacity(); \
+- EXPECT_GE(old_capacity, \
+- (RepeatedFieldLowerClampLimit<cpptype, sizeof(void*)>())); \
++ EXPECT_GE( \
++ old_capacity, \
++ (RepeatedFieldLowerClampLimit<cpptype, std::max(sizeof(cpptype), \
++ sizeof(void*))>())); \
+ for (int i = 0; i < 16; ++i) { \
+ message->AddExtension(unittest::repeated_##type##_extension, value); \
+ } \
+
+From c94b66706bec17d918495f4715183a5eaf0f8044 Mon Sep 17 00:00:00 2001
+From: Mike Kruskal <mkruskal@google.com>
+Date: Thu, 15 Sep 2022 11:31:31 -0700
+Subject: [PATCH 4/7] Test fixes for 32-bit architectures
+
+--- a/src/google/protobuf/compiler/cpp/message_size_unittest.cc
++++ b/src/google/protobuf/compiler/cpp/message_size_unittest.cc
+@@ -139,9 +139,9 @@ TEST(GeneratedMessageTest, OneStringSize) {
+
+ TEST(GeneratedMessageTest, MoreStringSize) {
+ struct MockGenerated : public MockMessageBase { // 16 bytes
+- int has_bits[1]; // 4 bytes
+ int cached_size; // 4 bytes
+ MockRepeatedPtrField data; // 24 bytes
++ // + 4 bytes padding
+ };
+ GOOGLE_CHECK_MESSAGE_SIZE(MockGenerated, 48);
+ EXPECT_EQ(sizeof(protobuf_unittest::MoreString), sizeof(MockGenerated));
+--- a/src/google/protobuf/io/zero_copy_stream_unittest.cc
++++ b/src/google/protobuf/io/zero_copy_stream_unittest.cc
+@@ -720,6 +720,9 @@ TEST_F(IoTest, StringIo) {
+
+ // Verifies that outputs up to kint32max can be created.
+ TEST_F(IoTest, LargeOutput) {
++ // Filter out this test on 32-bit architectures.
++ if(sizeof(void*) < 8) return;
++
+ std::string str;
+ StringOutputStream output(&str);
+ void* unused_data;
+--- a/src/google/protobuf/repeated_field_unittest.cc
++++ b/src/google/protobuf/repeated_field_unittest.cc
+@@ -429,14 +429,14 @@ TEST(RepeatedField, ReserveNothing) {
+
+ TEST(RepeatedField, ReserveLowerClamp) {
+ int clamped_value = internal::CalculateReserveSize<bool, sizeof(void*)>(0, 1);
+- EXPECT_GE(clamped_value, 8 / sizeof(bool));
++ EXPECT_GE(clamped_value, sizeof(void*) / sizeof(bool));
+ EXPECT_EQ((internal::RepeatedFieldLowerClampLimit<bool, sizeof(void*)>()),
+ clamped_value);
+ // EXPECT_EQ(clamped_value, (internal::CalculateReserveSize<bool,
+ // sizeof(void*)>( clamped_value, 2)));
+
+ clamped_value = internal::CalculateReserveSize<int, sizeof(void*)>(0, 1);
+- EXPECT_GE(clamped_value, 8 / sizeof(int));
++ EXPECT_GE(clamped_value, sizeof(void*) / sizeof(int));
+ EXPECT_EQ((internal::RepeatedFieldLowerClampLimit<int, sizeof(void*)>()),
+ clamped_value);
+ // EXPECT_EQ(clamped_value, (internal::CalculateReserveSize<int,
+--- a/src/google/protobuf/util/time_util_test.cc
++++ b/src/google/protobuf/util/time_util_test.cc
+@@ -48,15 +48,18 @@ using google::protobuf::Timestamp;
+ namespace {
+
+ TEST(TimeUtilTest, TimestampStringFormat) {
+- Timestamp begin, end;
+- EXPECT_TRUE(TimeUtil::FromString("0001-01-01T00:00:00Z", &begin));
+- EXPECT_EQ(TimeUtil::kTimestampMinSeconds, begin.seconds());
+- EXPECT_EQ(0, begin.nanos());
+- EXPECT_TRUE(TimeUtil::FromString("9999-12-31T23:59:59.999999999Z", &end));
+- EXPECT_EQ(TimeUtil::kTimestampMaxSeconds, end.seconds());
+- EXPECT_EQ(999999999, end.nanos());
+- EXPECT_EQ("0001-01-01T00:00:00Z", TimeUtil::ToString(begin));
+- EXPECT_EQ("9999-12-31T23:59:59.999999999Z", TimeUtil::ToString(end));
++ // These these are out of bounds for 32-bit architectures.
++ if(sizeof(time_t) >= sizeof(uint64_t)) {
++ Timestamp begin, end;
++ EXPECT_TRUE(TimeUtil::FromString("0001-01-01T00:00:00Z", &begin));
++ EXPECT_EQ(TimeUtil::kTimestampMinSeconds, begin.seconds());
++ EXPECT_EQ(0, begin.nanos());
++ EXPECT_TRUE(TimeUtil::FromString("9999-12-31T23:59:59.999999999Z", &end));
++ EXPECT_EQ(TimeUtil::kTimestampMaxSeconds, end.seconds());
++ EXPECT_EQ(999999999, end.nanos());
++ EXPECT_EQ("0001-01-01T00:00:00Z", TimeUtil::ToString(begin));
++ EXPECT_EQ("9999-12-31T23:59:59.999999999Z", TimeUtil::ToString(end));
++ }
+
+ // Test negative timestamps.
+ Timestamp time = TimeUtil::NanosecondsToTimestamp(-1);
+@@ -94,9 +97,12 @@ TEST(TimeUtilTest, DurationStringFormat) {
+ EXPECT_TRUE(TimeUtil::FromString("0001-01-01T00:00:00Z", &begin));
+ EXPECT_TRUE(TimeUtil::FromString("9999-12-31T23:59:59.999999999Z", &end));
+
+- EXPECT_EQ("315537897599.999999999s", TimeUtil::ToString(end - begin));
++ // These these are out of bounds for 32-bit architectures.
++ if(sizeof(time_t) >= sizeof(uint64_t)) {
++ EXPECT_EQ("315537897599.999999999s", TimeUtil::ToString(end - begin));
++ EXPECT_EQ("-315537897599.999999999s", TimeUtil::ToString(begin - end));
++ }
+ EXPECT_EQ(999999999, (end - begin).nanos());
+- EXPECT_EQ("-315537897599.999999999s", TimeUtil::ToString(begin - end));
+ EXPECT_EQ(-999999999, (begin - end).nanos());
+
+ // Generated output should contain 3, 6, or 9 fractional digits.
diff --git a/dev-libs/protobuf/protobuf-21.9.ebuild b/dev-libs/protobuf/protobuf-21.9.ebuild
index c282450ef22d..7960f6d252ce 100644
--- a/dev-libs/protobuf/protobuf-21.9.ebuild
+++ b/dev-libs/protobuf/protobuf-21.9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2008-2022 Gentoo Authors
+# Copyright 2008-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -35,6 +35,7 @@ PATCHES=(
"${FILESDIR}/${PN}-3.19.0-disable_no-warning-test.patch"
"${FILESDIR}/${PN}-3.19.0-system_libraries.patch"
"${FILESDIR}/${PN}-3.20.2-protoc_input_output_files.patch"
+ "${FILESDIR}/${PN}-21.9-disable-32-bit-tests.patch"
)
DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md)
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2023-06-27 20:14 Andreas Sturmlechner
0 siblings, 0 replies; 22+ messages in thread
From: Andreas Sturmlechner @ 2023-06-27 20:14 UTC (permalink / raw
To: gentoo-commits
commit: 7ff3e7e2d1447f4377cdeb6824f1563aa79a560e
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 27 19:40:24 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 20:14:35 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ff3e7e2
dev-libs/protobuf: drop 3.19.3, 3.19.6, 3.20.1-r1, 3.20.3, 21.8
Bug: https://bugs.gentoo.org/905797
Bug: https://bugs.gentoo.org/872434
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
dev-libs/protobuf/Manifest | 5 -
...protobuf-3.16.0-protoc_input_output_files.patch | 240 ---------------------
dev-libs/protobuf/protobuf-21.8.ebuild | 148 -------------
dev-libs/protobuf/protobuf-3.19.3.ebuild | 146 -------------
dev-libs/protobuf/protobuf-3.19.6.ebuild | 151 -------------
dev-libs/protobuf/protobuf-3.20.1-r1.ebuild | 143 ------------
dev-libs/protobuf/protobuf-3.20.3.ebuild | 148 -------------
7 files changed, 981 deletions(-)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 5dd5ef74895c..85bcbb4bda71 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1,6 +1 @@
-DIST protobuf-21.8.tar.gz 5110670 BLAKE2B 3c1b0c857a86e9586481d63896341d0cb11290dbd710d87a6f7889d34f5f262abe2986a29ed19a730f8fa5df0b5c62d77a4db6aa415a72b239f7483ae8d6380c SHA512 cb17be759311e91172801add1f88fe7a0291b547170c40d2e3303f5c248570dddeade96bd48740edd628215f55269c97475e2f4c4a41c50f1018d525f52036cb
DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1
-DIST protobuf-3.19.3.tar.gz 5293258 BLAKE2B c05b70ffca97f7166ea6a511a36907eed125edf1ebf17f908718221d9b851be84dfb2b1b39973f2faf35f6ade630e6ba4f9e8b91b8fbc922c5db97079323ee6e SHA512 1c003e7cbc8eae6a038f46e688b401ee202ba47f502561e909df79770f6e8b7daf3dc1ccc727e31bfb5b52cd04cb4fef7d2d2a28d650c13f396872ad4aa076c6
-DIST protobuf-3.19.6.tar.gz 5299501 BLAKE2B 3121f76b95f83c5309ce49ce296b738eff7be9d3a5093c564fbe2339fb5f3729e406f1b44bfcc05feb0d31ab63838bb4f54685017977c73a33b91215a6776072 SHA512 8f92242f2be8e1bbfba41341c87709ad91ad83b8b3e3df88bb430411541d3399295f49291fd52b50e3487b0fce33181cb4d175685fd25aac72adfaee26a612d4
-DIST protobuf-3.20.1.tar.gz 5368262 BLAKE2B 1ce1aef2e4c4f3ea4863629cc75d89fe17d0c7ac0c342ac641c787456fd4a12756c2892a27ddadedc94a7201494ec84566638ce33a03cb0c867b04e9eee0edb3 SHA512 fde3eb9f13946887ddfd87df428c5615ad09aaf191e4478b24e98e5e13231feeff4e70b4ca6a2ff7d9b9b2e2c60bc1d5479526edeafa78f9a8ed3bef2e0bacb0
-DIST protobuf-3.20.3.tar.gz 5374320 BLAKE2B fb51f2a0ecf5b83235f5252051f8192ae377bb7a5e030c3f3e9435ccde25919c059830cf476e840fa6c970928a32c0075e213c9d5d4d9e3d3b24732c39a9fbfa SHA512 01d6703bdbe769a1200ee6e4ebcdcb99688ec21f576988c60d82ec36e0822820fb245fcb4ca53293143d53e666d748b5a0c6937bc659fb3cdc4cd9b05ed12a1c
diff --git a/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch b/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch
deleted file mode 100644
index 60c450eb2822..000000000000
--- a/dev-libs/protobuf/files/protobuf-3.16.0-protoc_input_output_files.patch
+++ /dev/null
@@ -1,240 +0,0 @@
-https://github.com/protocolbuffers/protobuf/pull/235
-
---- a/src/google/protobuf/compiler/command_line_interface.cc
-+++ b/src/google/protobuf/compiler/command_line_interface.cc
-@@ -1110,6 +1110,28 @@
- }
-
- if (mode_ == MODE_ENCODE || mode_ == MODE_DECODE) {
-+ bool success = false;
-+ int in_fd = STDIN_FILENO;
-+ int out_fd = STDOUT_FILENO;
-+
-+ if (!protobuf_in_path_.empty()) {
-+ in_fd = open(protobuf_in_path_.c_str(), O_RDONLY);
-+ if (in_fd == -1) {
-+ std::cerr << protobuf_in_path_ << ": error: failed to open file." << std::endl;
-+ return 1;
-+ }
-+ }
-+ if (!protobuf_out_path_.empty()) {
-+ out_fd = open(protobuf_out_path_.c_str(),
-+ O_WRONLY | O_CREAT | O_TRUNC,
-+ 0644);
-+ if (out_fd == -1) {
-+ std::cerr << protobuf_out_path_ << ": error: failed to open file." << std::endl;
-+ close(in_fd);
-+ return 1;
-+ }
-+ }
-+
- if (codec_type_.empty()) {
- // HACK: Define an EmptyMessage type to use for decoding.
- DescriptorPool pool;
-@@ -1118,13 +1140,20 @@
- file.add_message_type()->set_name("EmptyMessage");
- GOOGLE_CHECK(pool.BuildFile(file) != NULL);
- codec_type_ = "EmptyMessage";
-- if (!EncodeOrDecode(&pool)) {
-- return 1;
-- }
-+ success = EncodeOrDecode(&pool, in_fd, out_fd);
- } else {
-- if (!EncodeOrDecode(descriptor_pool.get())) {
-- return 1;
-- }
-+ success = EncodeOrDecode(descriptor_pool.get(), in_fd, out_fd);
-+ }
-+
-+ if (in_fd != STDIN_FILENO) {
-+ close(in_fd);
-+ }
-+ if (out_fd != STDOUT_FILENO) {
-+ close(out_fd);
-+ }
-+
-+ if (!success) {
-+ return 1;
- }
- }
-
-@@ -1163,6 +1192,11 @@
- for (int i = 0; i < proto_path_.size(); i++) {
- source_tree->MapPath(proto_path_[i].first, proto_path_[i].second);
- }
-+ if (mode_ == MODE_COMPILE &&
-+ (!protobuf_in_path_.empty() || !protobuf_out_path_.empty())) {
-+ std::cerr << "--protobuf_in and --protobuf_out are only valid with "
-+ << "decode operations. Ignoring.";
-+ }
-
- // Map input files to virtual paths if possible.
- if (!MakeInputsBeProtoPathRelative(source_tree, fallback_database)) {
-@@ -1885,6 +1919,12 @@
- } else if (name == "--deterministic_output") {
- deterministic_output_ = true;
-
-+ } else if (name == "--protobuf_in") {
-+ protobuf_in_path_ = value;
-+
-+ } else if (name == "--protobuf_out") {
-+ protobuf_out_path_ = value;
-+
- } else if (name == "--error_format") {
- if (value == "gcc") {
- error_format_ = ERROR_FORMAT_GCC;
-@@ -2018,22 +2058,38 @@
- --version Show version info and exit.
- -h, --help Show this text and exit.
- --encode=MESSAGE_TYPE Read a text-format message of the given type
-- from standard input and write it in binary
-- to standard output. The message type must
-+ from input protobuf file and write it in binary
-+ to output protobuf file. The message type must
- be defined in PROTO_FILES or their imports.
-+ The input/output protobuf files are specified
-+ using the --protobuf_in and --protobuf_out
-+ command line flags.
- --deterministic_output When using --encode, ensure map fields are
- deterministically ordered. Note that this order
- is not canonical, and changes across builds or
- releases of protoc.
- --decode=MESSAGE_TYPE Read a binary message of the given type from
-- standard input and write it in text format
-- to standard output. The message type must
-+ input protobuf file and write it in text format
-+ to output protobuf file. The message type must
- be defined in PROTO_FILES or their imports.
-+ The input/output protobuf files are specified
-+ using the --protobuf_in and --protobuf_out
-+ command line flags.
- --decode_raw Read an arbitrary protocol message from
-- standard input and write the raw tag/value
-- pairs in text format to standard output. No
-+ input protobuf file and write the raw tag/value
-+ pairs in text format to output protobuf file. No
- PROTO_FILES should be given when using this
-- flag.
-+ flag. The input/output protobuf files are
-+ specified using the --protobuf_in and
-+ --protobuf_out command line flags.
-+ --protobuf_in=FILE Absolute path to the protobuf file from which
-+ input of encoding/decoding operation will be
-+ read. If omitted, input will be read from
-+ standard input.
-+ --protobuf_out=FILE Absolute path to the protobuf file to which
-+ output of encoding/decoding operation will be
-+ written. If omitted, output will be written to
-+ standard output.
- --descriptor_set_in=FILES Specifies a delimited list of FILES
- each containing a FileDescriptorSet (a
- protocol buffer defined in descriptor.proto).
-@@ -2344,7 +2400,9 @@
- return true;
- }
-
--bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool) {
-+bool CommandLineInterface::EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd) {
- // Look up the type.
- const Descriptor* type = pool->FindMessageTypeByName(codec_type_);
- if (type == NULL) {
-@@ -2356,15 +2414,15 @@
- std::unique_ptr<Message> message(dynamic_factory.GetPrototype(type)->New());
-
- if (mode_ == MODE_ENCODE) {
-- SetFdToTextMode(STDIN_FILENO);
-- SetFdToBinaryMode(STDOUT_FILENO);
-+ SetFdToTextMode(in_fd);
-+ SetFdToBinaryMode(out_fd);
- } else {
-- SetFdToBinaryMode(STDIN_FILENO);
-- SetFdToTextMode(STDOUT_FILENO);
-+ SetFdToBinaryMode(in_fd);
-+ SetFdToTextMode(out_fd);
- }
-
-- io::FileInputStream in(STDIN_FILENO);
-- io::FileOutputStream out(STDOUT_FILENO);
-+ io::FileInputStream in(in_fd);
-+ io::FileOutputStream out(out_fd);
-
- if (mode_ == MODE_ENCODE) {
- // Input is text.
---- a/src/google/protobuf/compiler/command_line_interface.h
-+++ b/src/google/protobuf/compiler/command_line_interface.h
-@@ -292,7 +292,9 @@
- GeneratorContext* generator_context, std::string* error);
-
- // Implements --encode and --decode.
-- bool EncodeOrDecode(const DescriptorPool* pool);
-+ bool EncodeOrDecode(const DescriptorPool* pool,
-+ int in_fd,
-+ int out_fd);
-
- // Implements the --descriptor_set_out option.
- bool WriteDescriptorSet(
-@@ -427,6 +429,13 @@
- // parsed FileDescriptorSets to be used for loading protos. Otherwise, empty.
- std::vector<std::string> descriptor_set_in_names_;
-
-+ // When using --encode / --decode / --decode_raw absolute path to the output
-+ // file. (Empty string indicates write to STDOUT).
-+ std::string protobuf_out_path_;
-+ // When using --encode / --decode / --decode_raw, absolute path to the input
-+ // file. (Empty string indicates read from STDIN).
-+ std::string protobuf_in_path_;
-+
- // If --descriptor_set_out was given, this is the filename to which the
- // FileDescriptorSet should be written. Otherwise, empty.
- std::string descriptor_set_out_name_;
---- a/src/google/protobuf/compiler/command_line_interface_unittest.cc
-+++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc
-@@ -99,7 +99,7 @@
- virtual void SetUp();
- virtual void TearDown();
-
-- // Runs the CommandLineInterface with the given command line. The
-+ // Run the CommandLineInterface with the given command line. The
- // command is automatically split on spaces, and the string "$tmpdir"
- // is replaced with TestTempDir().
- void Run(const std::string& command);
-@@ -2626,6 +2626,17 @@
- std::string::npos);
- }
-
-+ void ExpectBinaryFilesMatch(const string &expected_file,
-+ const string &actual_file) {
-+ string expected_output, actual_output;
-+ ASSERT_TRUE(File::ReadFileToString(expected_file, &expected_output));
-+ ASSERT_TRUE(File::ReadFileToString(actual_file, &actual_output));
-+
-+ // Don't use EXPECT_EQ because we don't want to print raw binary data to
-+ // stdout on failure.
-+ EXPECT_TRUE(expected_output == actual_output);
-+ }
-+
- private:
- void WriteUnittestProtoDescriptorSet() {
- unittest_proto_descriptor_set_filename_ =
-@@ -2749,6 +2760,19 @@
- "Can only use --deterministic_output with --encode.\n");
- }
-
-+TEST_P(EncodeDecodeTest, RedirectInputOutput) {
-+ string out_file = TestTempDir() + "/golden_message_out.pbf";
-+ EXPECT_TRUE(
-+ Run(TestUtil::MaybeTranslatePath("net/proto2/internal/unittest.proto") +
-+ " --encode=protobuf_unittest.TestAllTypes" +
-+ " --protobuf_in=" + TestUtil::GetTestDataPath(
-+ "net/proto2/internal/"
-+ "testdata/text_format_unittest_data_oneof_implemented.txt") +
-+ " --protobuf_out=" + out_file));
-+ ExpectBinaryFilesMatch(out_file, TestUtil::GetTestDataPath(
-+ "net/proto2/internal/testdata/golden_message_oneof_implemented"));
-+}
-+
- INSTANTIATE_TEST_SUITE_P(FileDescriptorSetSource, EncodeDecodeTest,
- testing::Values(PROTO_PATH, DESCRIPTOR_SET_IN));
- } // anonymous namespace
diff --git a/dev-libs/protobuf/protobuf-21.8.ebuild b/dev-libs/protobuf/protobuf-21.8.ebuild
deleted file mode 100644
index 523c763c265c..000000000000
--- a/dev-libs/protobuf/protobuf-21.8.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 2008-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-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.git"
- EGIT_SUBMODULES=()
-else
- SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="
- https://developers.google.com/protocol-buffers/
-"
-
-LICENSE="BSD"
-SLOT="0/32"
-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.19.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.19.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.20.2-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
-
- # https://github.com/protocolbuffers/protobuf/issues/9433
- sed -e "/^[[:space:]]*static_assert(alignof(U) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.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
-
- 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
-}
diff --git a/dev-libs/protobuf/protobuf-3.19.3.ebuild b/dev-libs/protobuf/protobuf-3.19.3.ebuild
deleted file mode 100644
index 5a3b627ea4de..000000000000
--- a/dev-libs/protobuf/protobuf-3.19.3.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 2008-2022 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=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="BSD"
-SLOT="0/30"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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.19.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.19.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
-
- # https://github.com/protocolbuffers/protobuf/issues/9392
- sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die
-
- # https://github.com/protocolbuffers/protobuf/issues/9433
- sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.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
-}
diff --git a/dev-libs/protobuf/protobuf-3.19.6.ebuild b/dev-libs/protobuf/protobuf-3.19.6.ebuild
deleted file mode 100644
index 8784499c1fd7..000000000000
--- a/dev-libs/protobuf/protobuf-3.19.6.ebuild
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 2008-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-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.git"
- EGIT_SUBMODULES=()
-else
- SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="
- https://developers.google.com/protocol-buffers/
-"
-
-LICENSE="BSD"
-SLOT="0/30"
-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.19.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.19.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
-
- # https://github.com/protocolbuffers/protobuf/issues/9392
- sed -e "s/^AC_PROG_OBJC$/AS_CASE([\$target_os], [darwin*], [AC_PROG_OBJC], [AM_CONDITIONAL([am__fastdepOBJC], [false])])/" -i configure.ac || die
-
- # https://github.com/protocolbuffers/protobuf/issues/9433
- sed -e "/^[[:space:]]*static_assert(alignof(T) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.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
-
- 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
-}
diff --git a/dev-libs/protobuf/protobuf-3.20.1-r1.ebuild b/dev-libs/protobuf/protobuf-3.20.1-r1.ebuild
deleted file mode 100644
index 9d47f00fd02f..000000000000
--- a/dev-libs/protobuf/protobuf-3.20.1-r1.ebuild
+++ /dev/null
@@ -1,143 +0,0 @@
-# Copyright 2008-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-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=()
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="https://developers.google.com/protocol-buffers/ https://github.com/protocolbuffers/protobuf"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://github.com/protocolbuffers/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-fi
-
-LICENSE="BSD"
-SLOT="0/31"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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.19.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.19.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.20.1-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
-
- # https://github.com/protocolbuffers/protobuf/issues/9433
- sed -e "/^[[:space:]]*static_assert(alignof(U) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.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
-}
diff --git a/dev-libs/protobuf/protobuf-3.20.3.ebuild b/dev-libs/protobuf/protobuf-3.20.3.ebuild
deleted file mode 100644
index cade7f688a49..000000000000
--- a/dev-libs/protobuf/protobuf-3.20.3.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 2008-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-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.git"
- EGIT_SUBMODULES=()
-else
- SRC_URI="https://github.com/protocolbuffers/protobuf/archive/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
-fi
-
-DESCRIPTION="Google's Protocol Buffers - Extensible mechanism for serializing structured data"
-HOMEPAGE="
- https://developers.google.com/protocol-buffers/
-"
-
-LICENSE="BSD"
-SLOT="0/31"
-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.19.0-disable_no-warning-test.patch"
- "${FILESDIR}/${PN}-3.19.0-system_libraries.patch"
- "${FILESDIR}/${PN}-3.20.2-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
-
- # https://github.com/protocolbuffers/protobuf/issues/9433
- sed -e "/^[[:space:]]*static_assert(alignof(U) <= 8, \"\");$/d" -i src/google/protobuf/descriptor.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
-
- 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
-}
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/
@ 2023-08-21 17:31 Sam James
0 siblings, 0 replies; 22+ messages in thread
From: Sam James @ 2023-08-21 17:31 UTC (permalink / raw
To: gentoo-commits
commit: 1bb07c91ec18d88372147c4da436b7788ee84df6
Author: Mark Conway <mark.conway <AT> themobiusproject <DOT> com>
AuthorDate: Mon Jun 26 00:46:57 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Aug 21 17:29:13 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bb07c91
dev-libs/protobuf: version bump to 23.3
Upstream's versioning has change which messes with slot numbers.
Closes: https://bugs.gentoo.org/906811
Signed-off-by: Mark Conway <mark.conway <AT> themobiusproject.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-libs/protobuf/Manifest | 1 +
.../files/protobuf-23.3-disable-32-bit-tests.patch | 34 +++++++
.../protobuf-23.3-static_assert-failure.patch | 11 +++
dev-libs/protobuf/protobuf-23.3.ebuild | 107 +++++++++++++++++++++
4 files changed, 153 insertions(+)
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 85bcbb4bda71..54444c1352c6 100644
--- a/dev-libs/protobuf/Manifest
+++ b/dev-libs/protobuf/Manifest
@@ -1 +1,2 @@
DIST protobuf-21.9.tar.gz 5110670 BLAKE2B a4f5b7f58e1c5904ca990b100a72992f6f56177b28773f8de8c99e4158391d33cfb8aa8575915887fc9ae4294faf81d4ff6b470bc07b394bfd5885a09ba0fafe SHA512 6954b42d21921e630173b7848c056ab95635627d8eddec960f3db2ddda13eedde00520a9b350722e76e2998649eb8ebe10758e1db938b6a91e38ff3295b1b7c1
+DIST protobuf-23.3.tar.gz 5043803 BLAKE2B ee2edee230969555c9ef95069c7b1d6c23c3d1f8ea1b2249fb3e9f6fcf63312c6e10e9da65b80629fb08d5fb08d05a19bb9c752c25b892c1e3fd6f18b9279eb3 SHA512 646af367dbc61b42e322cf0b335f360e428b272e2b1f5361b2f17c18d3dc9dddd615e1279436028b1a42275a0beadda37c2c934fc27d6c892131cc8d526d8b3b
diff --git a/dev-libs/protobuf/files/protobuf-23.3-disable-32-bit-tests.patch b/dev-libs/protobuf/files/protobuf-23.3-disable-32-bit-tests.patch
new file mode 100644
index 000000000000..1e49bc981d8e
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-23.3-disable-32-bit-tests.patch
@@ -0,0 +1,34 @@
+https://github.com/protocolbuffers/protobuf/issues/8460
+--- a/src/google/protobuf/any_test.cc
++++ b/src/google/protobuf/any_test.cc
+@@ -63,6 +63,8 @@ TEST(AnyTest, TestPackAndUnpack) {
+ }
+
+ TEST(AnyTest, TestPackFromSerializationExceedsSizeLimit) {
++ // 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;
diff --git a/dev-libs/protobuf/files/protobuf-23.3-static_assert-failure.patch b/dev-libs/protobuf/files/protobuf-23.3-static_assert-failure.patch
new file mode 100644
index 000000000000..53ca65814251
--- /dev/null
+++ b/dev-libs/protobuf/files/protobuf-23.3-static_assert-failure.patch
@@ -0,0 +1,11 @@
+https://github.com/protocolbuffers/protobuf/issues/9433
+--- a/src/google/protobuf/descriptor.cc
++++ b/src/google/protobuf/descriptor.cc
+@@ -384,7 +384,6 @@ class FlatAllocatorImpl {
+ ABSL_CHECK(!has_allocated());
+ if (std::is_trivially_destructible<U>::value) {
+ // Trivial types are aligned to 8 bytes.
+- static_assert(alignof(U) <= 8, "");
+ total_.template Get<char>() += RoundUpTo<8>(array_size * sizeof(U));
+ } else {
+ // Since we can't use `if constexpr`, just make the expression compile
diff --git a/dev-libs/protobuf/protobuf-23.3.ebuild b/dev-libs/protobuf/protobuf-23.3.ebuild
new file mode 100644
index 000000000000..d4664ca777c0
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-23.3.ebuild
@@ -0,0 +1,107 @@
+# Copyright 2008-2023 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 ~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)"
+IUSE="emacs examples test zlib"
+RESTRICT="!test? ( test )"
+
+BDEPEND="emacs? ( app-editors/emacs:* )"
+DEPEND="
+ dev-cpp/abseil-cpp:=[${MULTILIB_USEDEP}]
+ zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
+ test? ( >=dev-cpp/gtest-1.9[${MULTILIB_USEDEP}] )
+"
+RDEPEND="
+ 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"
+)
+
+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
+}
+
+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
+}
^ permalink raw reply related [flat|nested] 22+ messages in thread
end of thread, other threads:[~2023-08-21 17:31 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-15 18:34 [gentoo-commits] repo/gentoo:master commit in: dev-libs/protobuf/files/, dev-libs/protobuf/ Mike Gilbert
-- strict thread matches above, loose matches on Subject: below --
2023-08-21 17:31 Sam James
2023-06-27 20:14 Andreas Sturmlechner
2023-01-04 6:04 Sam James
2022-10-25 21:55 Sam James
2022-09-02 15:18 Arthur Zamarin
2022-08-18 2:53 Matt Turner
2022-01-29 15:20 Yixun Lan
2021-06-04 19:51 Mike Gilbert
2021-05-31 23:04 Mike Gilbert
2021-04-09 22:32 Mike Gilbert
2021-04-09 22:32 Mike Gilbert
2020-12-27 18:39 Mike Gilbert
2020-09-24 14:26 Mike Gilbert
2019-12-06 20:25 Mike Gilbert
2019-06-18 15:59 Mike Gilbert
2019-04-19 16:39 Mike Gilbert
2018-10-19 17:39 Mike Gilbert
2018-10-02 20:08 Mike Gilbert
2017-09-21 21:06 Mike Gilbert
2017-05-09 17:18 Michał Górny
2016-04-21 9:52 Ian Delaney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox