[packages/protobuf] - remove obsolete patches

baggins baggins at pld-linux.org
Sun Sep 21 14:51:14 CEST 2025


commit e5fa14e3596797a882e5b8887315c27d9cc8ab2b
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Sep 21 16:51:07 2025 +0200

    - remove obsolete patches

 musttail.patch                       |  14 ----
 no-wrap-memcpy.patch                 |  29 ---------
 protobuf-disable-64bitptr-test.patch |  23 -------
 system-gtest.patch                   | 123 -----------------------------------
 4 files changed, 189 deletions(-)
---
diff --git a/musttail.patch b/musttail.patch
deleted file mode 100644
index b8f65c3..0000000
--- a/musttail.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- protobuf-3.20.3/src/google/protobuf/port_def.inc	2022-09-29 21:09:51.000000000 +0000
-+++ protobuf-3.20.3/src/google/protobuf/port_def.inc	2025-08-27 14:16:29.721253876 +0000
-@@ -233,9 +233,8 @@
- #ifdef PROTOBUF_TAILCALL
- #error PROTOBUF_TAILCALL was previously defined
- #endif
--#if __has_cpp_attribute(clang::musttail) && !defined(__arm__) && \
--    !defined(_ARCH_PPC) && !defined(__wasm__) &&                 \
--    !(defined(_MSC_VER) && defined(_M_IX86))
-+#if __has_cpp_attribute(clang::musttail) && (defined(__aarch64__) || \
-+    defined(__x86_64__) || defined(_M_X64))
- #  ifndef PROTO2_OPENSOURCE
- // Compilation fails on ARM32: b/195943306
- // Compilation fails on powerpc64le: b/187985113
diff --git a/no-wrap-memcpy.patch b/no-wrap-memcpy.patch
deleted file mode 100644
index d73a692..0000000
--- a/no-wrap-memcpy.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- protobuf-3.20.3/ruby/ext/google/protobuf_c/extconf.rb.orig	2024-09-02 21:30:25.709818155 +0200
-+++ protobuf-3.20.3/ruby/ext/google/protobuf_c/extconf.rb	2024-09-02 21:33:20.092206778 +0200
-@@ -7,22 +7,22 @@ ext_name = "google/protobuf_c"
- dir_config(ext_name)
- 
- if RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
--  $CFLAGS += " -std=gnu99 -O3 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement"
-+  $CFLAGS += " -std=gnu99 -DNDEBUG -fvisibility=hidden -Wall -Wsign-compare -Wno-declaration-after-statement"
- else
--  $CFLAGS += " -std=gnu99 -O3 -DNDEBUG"
-+  $CFLAGS += " -std=gnu99 -DNDEBUG"
- end
- 
- 
- if RUBY_PLATFORM =~ /linux/
-   # Instruct the linker to point memcpy calls at our __wrap_memcpy wrapper.
--  $LDFLAGS += " -Wl,-wrap,memcpy"
-+  $LDFLAGS += " -std=c99"
- end
- 
- $VPATH << "$(srcdir)/third_party/utf8_range"
- $INCFLAGS << "$(srcdir)/third_party/utf8_range"
- 
- $srcs = ["protobuf.c", "convert.c", "defs.c", "message.c",
--         "repeated_field.c", "map.c", "ruby-upb.c", "wrap_memcpy.c",
-+         "repeated_field.c", "map.c", "ruby-upb.c",
-          "naive.c", "range2-neon.c", "range2-sse.c"]
- 
- create_makefile(ext_name)
diff --git a/protobuf-disable-64bitptr-test.patch b/protobuf-disable-64bitptr-test.patch
deleted file mode 100644
index 312a485..0000000
--- a/protobuf-disable-64bitptr-test.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- protobuf-3.14.0/src/google/protobuf/io/zero_copy_stream_unittest.cc.orig	2020-11-13 23:55:22.000000000 +0100
-+++ protobuf-3.14.0/src/google/protobuf/io/zero_copy_stream_unittest.cc	2021-01-18 21:39:55.771550717 +0100
-@@ -712,20 +712,6 @@
-   }
- }
- 
--// Verifies that outputs up to kint32max can be created.
--TEST_F(IoTest, LargeOutput) {
--  std::string str;
--  StringOutputStream output(&str);
--  void* unused_data;
--  int size;
--  // Repeatedly calling Next should eventually grow the buffer to kint32max.
--  do {
--    EXPECT_TRUE(output.Next(&unused_data, &size));
--  } while (str.size() < std::numeric_limits<int>::max());
--  // Further increases should be possible.
--  output.Next(&unused_data, &size);
--  EXPECT_GT(size, 0);
--}
- 
- 
- // To test files, we create a temporary file, write, read, truncate, repeat.
diff --git a/system-gtest.patch b/system-gtest.patch
deleted file mode 100644
index 919de88..0000000
--- a/system-gtest.patch
+++ /dev/null
@@ -1,123 +0,0 @@
---- 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 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; \
---- protobuf-3.20.3/src/Makefile.am.orig	2022-09-29 23:09:51.000000000 +0200
-+++ protobuf-3.20.3/src/Makefile.am	2024-09-02 21:14:47.428234596 +0200
-@@ -717,19 +717,17 @@ COMMON_TEST_SOURCES =
-   google/protobuf/testing/googletest.cc                        \
-   google/protobuf/testing/googletest.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
-+GOOGLETEST_INC_DIR=/usr/include/gtest
-+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_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_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.
-@@ -823,11 +821,11 @@ $(am_protobuf_test_OBJECTS): unittest_pr
- # 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 \
-+                      -lgtest        \
-+                      -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 =                        \
-@@ -850,11 +848,11 @@ COMMON_LITE_TEST_SOURCES =
- # 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_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                                     \
-@@ -866,11 +864,11 @@ $(am_protobuf_lite_test_OBJECTS): unitte
- # 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_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 \
-@@ -880,8 +878,8 @@ $(am_protobuf_lite_arena_test_OBJECTS):
- 
- # 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_CPPFLAGS = -I$(GOOGLETEST_INC_DIR)
- test_plugin_SOURCES =                                          \
-   google/protobuf/compiler/mock_code_generator.cc              \
-   google/protobuf/compiler/test_plugin.cc                      \
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list