[packages/protobuf] - updated to 3.6.1 (note: new sonames; C++11 is obligatory now) - updated system-gtest,no-wrap-memcp
qboosh
qboosh at pld-linux.org
Fri Oct 12 21:37:10 CEST 2018
commit c19d590f455fd35bc42b1c51bf802fb9edfbcd6f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Oct 12 21:40:39 2018 +0200
- updated to 3.6.1 (note: new sonames; C++11 is obligatory now)
- updated system-gtest,no-wrap-memcpy patches
no-wrap-memcpy.patch | 13 ++---
protobuf.spec | 24 ++++-----
system-gtest.patch | 144 +++++++++++++++++++++++----------------------------
3 files changed, 83 insertions(+), 98 deletions(-)
---
diff --git a/protobuf.spec b/protobuf.spec
index 838fca7..bfd87c1 100644
--- a/protobuf.spec
+++ b/protobuf.spec
@@ -12,13 +12,13 @@
Summary: Protocol Buffers - Google's data interchange format
Summary(pl.UTF-8): Protocol Buffers - format wymiany danych Google
Name: protobuf
-Version: 3.5.1.1
-Release: 3
+Version: 3.6.1
+Release: 1
License: BSD
Group: Libraries
#Source0Download: https://github.com/google/protobuf/releases
Source0: https://github.com/google/protobuf/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 5005003ae6b94773c4bbca87a644b131
+# Source0-md5: e8ce2659ea4f5df1a1e0dbd107dd61d9
Source1: ftdetect-proto.vim
Patch0: system-gtest.patch
Patch1: no-wrap-memcpy.patch
@@ -27,7 +27,7 @@ BuildRequires: autoconf >= 2.59
BuildRequires: automake >= 1:1.9
%{?with_tests:BuildRequires: gmock-devel}
%{?with_tests:BuildRequires: gtest-devel}
-BuildRequires: libstdc++-devel
+BuildRequires: libstdc++-devel >= 6:4.7
BuildRequires: libtool
BuildRequires: pkgconfig
%if %{with python2}
@@ -130,7 +130,7 @@ Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs = %{version}-%{release}
Requires: %{name}-lite = %{version}-%{release}
-Requires: libstdc++-devel
+Requires: libstdc++-devel >= 6:4.7
%description devel
Header files for Protocol Buffers libraries.
@@ -290,17 +290,17 @@ rm -rf $RPM_BUILD_ROOT
%doc CHANGES.txt CONTRIBUTORS.txt LICENSE README.md
%attr(755,root,root) %{_bindir}/protoc
%attr(755,root,root) %{_libdir}/libprotoc.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libprotoc.so.15
+%attr(755,root,root) %ghost %{_libdir}/libprotoc.so.17
%files libs
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libprotobuf.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libprotobuf.so.15
+%attr(755,root,root) %ghost %{_libdir}/libprotobuf.so.17
%files lite
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libprotobuf-lite.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libprotobuf-lite.so.15
+%attr(755,root,root) %ghost %{_libdir}/libprotobuf-lite.so.17
%files devel
%defattr(644,root,root,755)
@@ -329,8 +329,8 @@ rm -rf $RPM_BUILD_ROOT
%doc python/README.md
%dir %{py_sitescriptdir}/google
%{py_sitescriptdir}/google/protobuf
-%{py_sitescriptdir}/protobuf-*-py*.egg-info
-%{py_sitescriptdir}/protobuf-*-py*-nspkg.pth
+%{py_sitescriptdir}/protobuf-%{version}-py*.egg-info
+%{py_sitescriptdir}/protobuf-%{version}-py*-nspkg.pth
%endif
%if %{with python3}
@@ -339,8 +339,8 @@ rm -rf $RPM_BUILD_ROOT
%doc python/README.md
%dir %{py3_sitescriptdir}/google
%{py3_sitescriptdir}/google/protobuf
-%{py3_sitescriptdir}/protobuf-*-py*.egg-info
-%{py3_sitescriptdir}/protobuf-*-py*-nspkg.pth
+%{py3_sitescriptdir}/protobuf-%{version}-py*.egg-info
+%{py3_sitescriptdir}/protobuf-%{version}-py*-nspkg.pth
%endif
%if %{with ruby}
diff --git a/no-wrap-memcpy.patch b/no-wrap-memcpy.patch
index ed20e7a..f3b1589 100644
--- a/no-wrap-memcpy.patch
+++ b/no-wrap-memcpy.patch
@@ -1,11 +1,12 @@
---- protobuf-3.5.1.1/ruby/ext/google/protobuf_c/extconf.rb~ 2018-01-05 22:42:10.000000000 +0100
-+++ protobuf-3.5.1.1/ruby/ext/google/protobuf_c/extconf.rb 2018-06-06 08:25:28.643970843 +0200
-@@ -2,16 +2,10 @@
-
+--- protobuf-3.6.1/ruby/ext/google/protobuf_c/extconf.rb.orig 2018-10-12 18:23:59.206483460 +0200
++++ protobuf-3.6.1/ruby/ext/google/protobuf_c/extconf.rb 2018-10-12 18:42:35.729804045 +0200
+@@ -3,17 +3,11 @@
require 'mkmf'
--$CFLAGS += " -std=c99 -O3 -DNDEBUG"
-+$CFLAGS += " -std=c99 -DNDEBUG"
+ unless RUBY_PLATFORM =~ /mswin|mingw/
+- $CFLAGS += " -std=c99 -O3 -DNDEBUG"
++ $CFLAGS += " -std=c99 -DNDEBUG"
+ end
-if RUBY_PLATFORM =~ /linux/
diff --git a/system-gtest.patch b/system-gtest.patch
index b51aa9f..033e982 100644
--- a/system-gtest.patch
+++ b/system-gtest.patch
@@ -1,34 +1,8 @@
---- protobuf-3.5.0/autogen.sh.orig 2017-11-17 17:49:36.389442867 +0100
-+++ protobuf-3.5.0/autogen.sh 2017-11-17 17:51:03.439441874 +0100
-@@ -27,23 +27,6 @@
- exit 1
- fi
-
--# Check that gmock is present. Usually it is already there since the
--# directory is set up as an SVN external.
--if test ! -e gmock; then
-- echo "Google Mock not present. Fetching gmock-1.7.0 from the web..."
-- curl $curlopts -L -O https://github.com/google/googlemock/archive/release-1.7.0.zip
-- unzip -q release-1.7.0.zip
-- rm release-1.7.0.zip
-- mv googlemock-release-1.7.0 gmock
--fi
--
--if test ! -e gmock/gtest; then
-- curl $curlopts -L -O https://github.com/google/googletest/archive/release-1.7.0.zip
-- unzip -q release-1.7.0.zip
-- rm release-1.7.0.zip
-- mv googletest-release-1.7.0 gmock/gtest
--fi
--
- set -ex
-
- # TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
---- protobuf-3.1.0/Makefile.am.orig 2016-09-24 04:12:45.000000000 +0200
-+++ protobuf-3.1.0/Makefile.am 2016-12-29 21:03:50.640290792 +0100
+--- protobuf-3.6.1/Makefile.am.orig 2018-10-12 17:44:11.446510724 +0200
++++ protobuf-3.6.1/Makefile.am 2018-10-12 17:46:58.769842145 +0200
@@ -11,28 +11,8 @@
- # Always include gmock in distributions.
- DIST_SUBDIRS = $(subdirs) src conformance benchmarks
+ # 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,
@@ -37,8 +11,8 @@
-# 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
+- @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
@@ -47,21 +21,25 @@
-# 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; \
+- @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; \
---- protobuf-3.5.0/src/Makefile.am.orig 2017-11-13 19:47:29.000000000 +0100
-+++ protobuf-3.5.0/src/Makefile.am 2017-11-17 17:49:36.389442867 +0100
-@@ -756,15 +756,22 @@
+--- protobuf-3.6.1/src/Makefile.am.orig 2018-10-12 17:44:11.446510724 +0200
++++ protobuf-3.6.1/src/Makefile.am 2018-10-12 18:23:32.609817094 +0200
+@@ -692,19 +692,24 @@
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
+gmock_dir = /usr/src/gmock/src
+gmock_inc_dir = /usr/src/gmock/src
+gtest_inc_dir = /usr/include/gtest
@@ -69,78 +47,84 @@
+libgmock_la_SOURCES = ./gmock-all.cc
+libgmock_main_la_SOURCES = ./gmock_main.cc
+
++GOOGLETEST_INC_DIR=/usr/include/gtest
++GOOGLEMOCK_INC_DIR=/usr/src/gmock/src
check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
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 \
-+ libgmock_main.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 \
++ libgmock_main.la \
+ libgmock.la
-+protobuf_test_CPPFLAGS = -I$(gtest_inc_dir) \
-+ -I$(gmock_inc_dir)
++protobuf_test_CPPFLAGS = -I$(GOOGLETEST_INC_DIR) \
++ -I$(GOOGLEMOCK_INC_DIR)
# 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.
-@@ -853,11 +860,11 @@
+@@ -792,11 +797,11 @@
# 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 \
-+ -lgtest \
-+ libgmock_main.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 \
++ -lgtest \
++ libgmock_main.la \
+ libgmock.la
-+protobuf_lazy_descriptor_test_CPPFLAGS = -I$(gmock_dir) \
-+ -I$(gtest_inc_dir) \
++protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_INC_DIR) \
++ -I$(GOOGLETEST_INC_DIR) \
-DPROTOBUF_TEST_NO_DESCRIPTORS
protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
protobuf_lazy_descriptor_test_SOURCES = \
-@@ -878,9 +885,9 @@
+@@ -818,11 +823,11 @@
# 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
-+ -lgtest \
-+ libgmock_main.la \
+ 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 \
++ libgmock_main.la \
+ libgmock.la
- protobuf_lite_test_CPPFLAGS= -I$(srcdir)/../gmock/include \
- -I$(srcdir)/../gmock/gtest/include
++protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_INC_DIR) \
++ -I$(GOOGLETEST_INC_DIR)
protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
-@@ -893,11 +900,11 @@
+ protobuf_lite_test_SOURCES = \
+ google/protobuf/lite_unittest.cc \
+@@ -834,11 +839,11 @@
# 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 \
-+ libgmock_main.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 \
++ libgmock_main.la \
+ libgmock.la
-+protobuf_lite_arena_test_CPPFLAGS = -I$(gmock_inc_dir) \
-+ -I$(gtest_inc_dir)
++protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_INC_DIR) \
++ -I$(GOOGLETEST_INC_DIR)
protobuf_lite_arena_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
protobuf_lite_arena_test_SOURCES = \
google/protobuf/lite_arena_unittest.cc \
-@@ -906,8 +913,8 @@
+@@ -848,8 +853,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
+- $(GOOGLETEST_BUILD_DIR)/lib/libgtest.la
+-test_plugin_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include
+ -lgtest
-+test_plugin_CPPFLAGS = -I$(gmock_inc_dir)
++test_plugin_CPPFLAGS = -I$(GOOGLETEST_INC_DIR)
test_plugin_SOURCES = \
google/protobuf/compiler/mock_code_generator.cc \
google/protobuf/testing/file.cc \
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/protobuf.git/commitdiff/c19d590f455fd35bc42b1c51bf802fb9edfbcd6f
More information about the pld-cvs-commit
mailing list