summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>2019-06-17 17:37:14 +0000
committerMike Gilbert <floppym@gentoo.org>2019-06-18 11:59:05 -0400
commit54d3b535ce7c5ed14a67512eb549d5b88364728f (patch)
tree188c4bd5d9ebbecf65b3cf2c648366acb6d5e9a9
parentdev-libs/protobuf: Stabilize 3.7.1 on amd64/x86. (diff)
downloadgentoo-54d3b535ce7c5ed14a67512eb549d5b88364728f.tar.gz
gentoo-54d3b535ce7c5ed14a67512eb549d5b88364728f.tar.bz2
gentoo-54d3b535ce7c5ed14a67512eb549d5b88364728f.zip
dev-libs/protobuf: Version bump (3.8.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
-rw-r--r--dev-libs/protobuf/Manifest1
-rw-r--r--dev-libs/protobuf/files/protobuf-3.8.0-disable_no-warning-test.patch19
-rw-r--r--dev-libs/protobuf/files/protobuf-3.8.0-protoc_input_output_files.patch4
-rw-r--r--dev-libs/protobuf/files/protobuf-3.8.0-system_libraries.patch121
-rw-r--r--dev-libs/protobuf/protobuf-3.8.0.ebuild126
-rw-r--r--dev-libs/protobuf/protobuf-9999.ebuild12
6 files changed, 276 insertions, 7 deletions
diff --git a/dev-libs/protobuf/Manifest b/dev-libs/protobuf/Manifest
index 766a6d89f8dc..58f115f98dd4 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 000000000000..a09edb9ef368
--- /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 a60bd74f39a1..fafd4bdb8f96 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 000000000000..020b0cc74aaa
--- /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-3.8.0.ebuild b/dev-libs/protobuf/protobuf-3.8.0.ebuild
new file mode 100644
index 000000000000..345fbe9a3df1
--- /dev/null
+++ b/dev-libs/protobuf/protobuf-3.8.0.ebuild
@@ -0,0 +1,126 @@
+# 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
+
+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/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.9[${MULTILIB_USEDEP}] )
+ zlib? ( sys-libs/zlib[${MULTILIB_USEDEP}] )"
+RDEPEND="emacs? ( virtual/emacs )
+ 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
+ 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" -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-9999.ebuild b/dev-libs/protobuf/protobuf-9999.ebuild
index ab63263883b6..f244ade24dc9 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"
)