]> git.pld-linux.org Git - packages/protobuf.git/commitdiff
- updated to 3.13.0 (note: new sonames) auto/th/protobuf-3.13.0-1
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 8 Sep 2020 15:56:36 +0000 (17:56 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 8 Sep 2020 15:56:36 +0000 (17:56 +0200)
- updated system-gtest patch, adjusted for gtest/gmock 1.10 packaging

protobuf.spec
system-gtest.patch

index 42f60231148be9a49c91e6ae24452bde8fde5c2d..9f1983786a87a1e10feb5c04b613e3d1c3e8c521 100644 (file)
 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)
index 033e982b21d186b836c6fd8a0780016454bc6bcd..63af15eea0a5134405643c358e7b834cd02f940a 100644 (file)
@@ -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
  
 -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)
 -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                                   \
 -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     \
 -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 \
 -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 \
This page took 0.087573 seconds and 4 git commands to generate.