[packages/protobuf] - updated to 3.13.0 (note: new sonames) - updated system-gtest patch, adjusted for gtest/gmock 1.10

qboosh qboosh at pld-linux.org
Tue Sep 8 17:53:59 CEST 2020


commit d2d2012569428d08ea6090d1f52827ea7e5b635b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Sep 8 17:56:36 2020 +0200

    - updated to 3.13.0 (note: new sonames)
    - updated system-gtest patch, adjusted for gtest/gmock 1.10 packaging

 protobuf.spec      | 22 ++++++++--------------
 system-gtest.patch | 35 ++++++++++++++---------------------
 2 files changed, 22 insertions(+), 35 deletions(-)
---
diff --git a/protobuf.spec b/protobuf.spec
index 42f6023..9f19837 100644
--- a/protobuf.spec
+++ b/protobuf.spec
@@ -12,21 +12,21 @@
 Summary:	Protocol Buffers - Google's data interchange format
 Summary(pl.UTF-8):	Protocol Buffers - format wymiany danych Google
 Name:		protobuf
-Version:	3.12.1
+Version:	3.13.0
 Release:	1
 License:	BSD
 Group:		Libraries
 #Source0Download: https://github.com/google/protobuf/releases
 Source0:	https://github.com/google/protobuf/releases/download/v%{version}/%{name}-all-%{version}.tar.gz
-# Source0-md5:	fac64fc43aaf4529e394508e2fa86ad5
+# Source0-md5:	cafa623d51361228c83c874d95f51992
 Source1:	ftdetect-proto.vim
 Patch0:		system-gtest.patch
 Patch1:		no-wrap-memcpy.patch
 URL:		https://github.com/google/protobuf/
 BuildRequires:	autoconf >= 2.59
 BuildRequires:	automake >= 1:1.9
-#%{?with_tests:BuildRequires:	gmock-devel >= 1.9.0}
-#%{?with_tests:BuildRequires:	gtest-devel >= 1.9.0}
+%{?with_tests:BuildRequires:	gmock-devel >= 1.9.0}
+%{?with_tests:BuildRequires:	gtest-devel >= 1.9.0}
 BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	libtool
 BuildRequires:	pkgconfig
@@ -204,15 +204,9 @@ opisów buforów protokołowych (Protocol Buffers).
 
 %prep
 %setup -q
-# protobuf needs gtest 1.9.0 (not released yet), use bundled version
-#patch0 -p1
+%patch0 -p1
 %patch1 -p1
 
-#ln -s /usr/src/gmock/src/gmock*.cc src
-
-# remove for gtest >= 1.9
-#%{__sed} -i -e 's/INSTANTIATE_TEST_SUITE_P/INSTANTIATE_TEST_CASE_P/' src/google/protobuf/{compiler/command_line_interface_unittest.cc,descriptor_unittest.cc,dynamic_message_unittest.cc,map_field_test.cc,util/internal/default_value_objectwriter_test.cc,util/internal/protostream_objectsource_test.cc,util/internal/protostream_objectwriter_test.cc}
-
 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' \
       examples/add_person.py \
       examples/list_people.py
@@ -300,17 +294,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.23
+%attr(755,root,root) %ghost %{_libdir}/libprotoc.so.24
 
 %files libs
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libprotobuf.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libprotobuf.so.23
+%attr(755,root,root) %ghost %{_libdir}/libprotobuf.so.24
 
 %files lite
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libprotobuf-lite.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libprotobuf-lite.so.23
+%attr(755,root,root) %ghost %{_libdir}/libprotobuf-lite.so.24
 
 %files devel
 %defattr(644,root,root,755)
diff --git a/system-gtest.patch b/system-gtest.patch
index 033e982..63af15e 100644
--- a/system-gtest.patch
+++ b/system-gtest.patch
@@ -32,7 +32,7 @@
  	fi; \
 --- 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 @@
+@@ -692,19 +692,17 @@
    google/protobuf/testing/file.cc                              \
    google/protobuf/testing/file.h
  
@@ -40,15 +40,8 @@
 -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
-+check_LTLIBRARIES = libgmock.la libgmock_main.la
-+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
++GOOGLEMOCK_INC_DIR=/usr/include/gmock
  check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \
                   protobuf-lite-test test_plugin protobuf-lite-arena-test \
                   no-warning-test $(GZCHECKPROGRAMS)
@@ -59,14 +52,14 @@
 -protobuf_test_CPPFLAGS = -I$(GOOGLETEST_SRC_DIR)/include \
 -                         -I$(GOOGLEMOCK_SRC_DIR)/include
 +                      -lgtest     \
-+                      libgmock_main.la     \
-+                      libgmock.la
++                      -lgmock_main     \
++                      -lgmock
 +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.
-@@ -792,11 +797,11 @@
+@@ -792,11 +790,11 @@
  # Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined.
  protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \
                        libprotoc.la                                   \
@@ -76,14 +69,14 @@
 -protobuf_lazy_descriptor_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include \
 -                                         -I$(GOOGLETEST_SRC_DIR)/include \
 +                      -lgtest        \
-+                      libgmock_main.la        \
-+                      libgmock.la
++                      -lgmock_main        \
++                      -lgmock
 +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 =                        \
-@@ -818,11 +823,11 @@
+@@ -818,11 +816,11 @@
  # full runtime and we want to make sure this test builds without full
  # runtime.
  protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la     \
@@ -93,14 +86,14 @@
 -protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_SRC_DIR)/include \
 -                             -I$(GOOGLETEST_SRC_DIR)/include
 +                           -lgtest \
-+                           libgmock_main.la \
-+                           libgmock.la
++                           -lgmock_main \
++                           -lgmock
 +protobuf_lite_test_CPPFLAGS= -I$(GOOGLEMOCK_INC_DIR) \
 +                             -I$(GOOGLETEST_INC_DIR)
  protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS)
  protobuf_lite_test_SOURCES =                                           \
    google/protobuf/lite_unittest.cc                                     \
-@@ -834,11 +839,11 @@
+@@ -834,11 +832,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 \
@@ -110,14 +103,14 @@
 -protobuf_lite_arena_test_CPPFLAGS = -I$(GOOGLEMOCK_SRC_DIR)/include  \
 -                                    -I$(GOOGLETEST_SRC_DIR)/include
 +                      -lgtest        \
-+                      libgmock_main.la        \
-+                      libgmock.la
++                      -lgmock_main        \
++                      -lgmock
 +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 \
-@@ -848,8 +853,8 @@
+@@ -848,8 +846,8 @@
  
  # Test plugin binary.
  test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/protobuf.git/commitdiff/d2d2012569428d08ea6090d1f52827ea7e5b635b



More information about the pld-cvs-commit mailing list