[vlc-commits] [Git][videolan/vlc][master] contrib: protobuf: update to 3.4.1

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Oct 4 07:08:52 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
15192dc0 by Steve Lhomme at 2022-10-04T05:41:43+00:00
contrib: protobuf: update to 3.4.1

This version with the CVE-2015-5237 fix, without std::mutex and without
CompareString internal function that is a define on Windows.

- - - - -


7 changed files:

- configure.ac
- contrib/src/protobuf/SHA512SUMS
- − contrib/src/protobuf/dont-build-protoc.patch
- − contrib/src/protobuf/include-algorithm.patch
- − contrib/src/protobuf/protobuf-disable-gmock.patch
- − contrib/src/protobuf/protobuf-fix-build.patch
- contrib/src/protobuf/rules.mak


Changes:

=====================================
configure.ac
=====================================
@@ -3856,7 +3856,7 @@ AC_CHECK_TOOL(PROTOC, protoc, no)
 AS_IF([test "${PROTOC}" != "no"], [
     protoc_ver="$(eval ${PROTOC} --version 2>/dev/null | head -1 | sed s/'.* '//)"
 ],[
-    protoc_ver="3.1.0"
+    protoc_ver="3.4.1"
 ])
 m4_pushdef([protobuf_lite_version], ${protoc_ver})
 PKG_WITH_MODULES([CHROMECAST],[protobuf-lite = protobuf_lite_version], [


=====================================
contrib/src/protobuf/SHA512SUMS
=====================================
@@ -1 +1 @@
-9f85a98e55cbc9f245a3079d5a597f778454bc945f0942cb10fbdfbde5fe12b17d6dda93d6a8d5281459ad30a3840be7e0712feb33a824226884e7e4da54a061  protobuf-3.1.0-cpp.tar.gz
+6189e23c7e381f62e971bd0e35ad9c3ed8effe584755357013887c6a582cb5a9a654c39affa2a073b658854138f31bfb70f89fa1df494e9386f1d64fd73d07d2  protobuf-3.4.1-cpp.tar.gz


=====================================
contrib/src/protobuf/dont-build-protoc.patch deleted
=====================================
@@ -1,19 +0,0 @@
-diff -p1 -ru protobuf.orig/src/Makefile.am protobuf/src/Makefile.am
---- protobuf.orig/src/Makefile.am	2022-01-19 19:57:56.774686401 +0200
-+++ protobuf/src/Makefile.am	2022-01-19 20:02:13.977240991 +0200
-@@ -176,3 +176,4 @@ nobase_include_HEADERS =
- 
--lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
-+lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la
-+check_LTLIBRARIES = libprotoc.la
- 
-@@ -483,3 +484,3 @@ libprotoc_la_SOURCES =
- 
--bin_PROGRAMS = protoc
-+#bin_PROGRAMS = protoc
- protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la
-@@ -661,3 +662,3 @@ protoc_outputs =
- 
--BUILT_SOURCES = $(protoc_outputs)
-+#BUILT_SOURCES = $(protoc_outputs)
- 


=====================================
contrib/src/protobuf/include-algorithm.patch deleted
=====================================
@@ -1,14 +0,0 @@
---- protobuf/src/google/protobuf/repeated_field.h.orig	2022-02-17 12:44:54.526527423 +0200
-+++ protobuf/src/google/protobuf/repeated_field.h	2022-02-17 12:44:58.190446363 +0200
-@@ -46,11 +46,7 @@
- #ifndef GOOGLE_PROTOBUF_REPEATED_FIELD_H__
- #define GOOGLE_PROTOBUF_REPEATED_FIELD_H__
- 
--#ifdef _MSC_VER
--// This is required for min/max on VS2013 only.
- #include <algorithm>
--#endif
--
- #include <string>
- #include <iterator>
- #include <google/protobuf/stubs/casts.h>


=====================================
contrib/src/protobuf/protobuf-disable-gmock.patch deleted
=====================================
@@ -1,11 +0,0 @@
---- protobuf/configure.ac.gmock	2016-09-24 04:12:20.000000000 +0200
-+++ protobuf/configure.ac	2020-03-24 14:46:28.900969300 +0100
-@@ -183,7 +183,7 @@ AM_CONDITIONAL([OBJC_CONFORMANCE_TEST],
- #   too.
- export CFLAGS
- export CXXFLAGS
--AC_CONFIG_SUBDIRS([gmock])
-+dnl AC_CONFIG_SUBDIRS([gmock])
- 
- AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc])
- AC_OUTPUT


=====================================
contrib/src/protobuf/protobuf-fix-build.patch deleted
=====================================
@@ -1,27 +0,0 @@
-From 01a05a53f40ca2ac5f0af10c6cc0810bee39b792 Mon Sep 17 00:00:00 2001
-From: Ross Wang <rosswang at google.com>
-Date: Fri, 17 Feb 2017 15:48:08 -0800
-Subject: [PATCH] const FieldDescriptorCompare
-
-Clang now validates that <set> comparators must have a const operator():
-https://reviews.llvm.org/rL291969
-
-Discussion:
-https://groups.google.com/d/msg/protobuf/9W6zFIHaJ-4/9RrfwelpEQAJ
----
- src/google/protobuf/compiler/java/java_file.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/google/protobuf/compiler/java/java_file.cc b/src/google/protobuf/compiler/java/java_file.cc
-index cb4503f637..86719f704c 100644
---- a/src/google/protobuf/compiler/java/java_file.cc
-+++ b/src/google/protobuf/compiler/java/java_file.cc
-@@ -65,7 +65,7 @@ namespace java {
- namespace {
- 
- struct FieldDescriptorCompare {
--  bool operator ()(const FieldDescriptor* f1, const FieldDescriptor* f2) {
-+  bool operator ()(const FieldDescriptor* f1, const FieldDescriptor* f2) const {
-     if(f1 == NULL) {
-       return false;
-     }


=====================================
contrib/src/protobuf/rules.mak
=====================================
@@ -1,5 +1,5 @@
 # protobuf
-PROTOBUF_VERSION := 3.1.0
+PROTOBUF_VERSION := 3.4.1
 PROTOBUF_URL := $(GITHUB)/google/protobuf/releases/download/v$(PROTOBUF_VERSION)/protobuf-cpp-$(PROTOBUF_VERSION).tar.gz
 
 ifndef HAVE_TVOS
@@ -43,9 +43,13 @@ PROTOCCONF += --enable-static --disable-shared
 protoc: protoc-$(PROTOBUF_VERSION)-cpp.tar.gz .sum-protoc
 	$(RM) -Rf $@ $(UNPACK_DIR) && mkdir -p $(UNPACK_DIR)
 	tar xvzfo "$<" -C $(UNPACK_DIR) --strip-components=1
-	$(APPLY) $(SRC)/protobuf/protobuf-disable-gmock.patch
-	$(APPLY) $(SRC)/protobuf/protobuf-fix-build.patch
-	$(APPLY) $(SRC)/protobuf/include-algorithm.patch
+	# don't build benchmarks and conformance
+	sed -i.orig 's, conformance benchmarks,,' "$(UNPACK_DIR)/Makefile.am"
+	sed -i.orig 's, benchmarks/Makefile conformance/Makefile,,' "$(UNPACK_DIR)/configure.ac"
+	# don't use gmock or any sub project to configure
+	sed -i.orig 's,AC_CONFIG_SUBDIRS,dnl AC_CONFIG_SUBDIRS,' "$(UNPACK_DIR)/configure.ac"
+	# force include <algorithm>
+	sed -i.orig 's,#ifdef _MSC_VER,#if 1,' "$(UNPACK_DIR)/src/google/protobuf/repeated_field.h"
 	$(APPLY) $(SRC)/protobuf/protobuf-no-mingw-pthread.patch
 	$(MOVE)
 
@@ -59,11 +63,19 @@ protoc: protoc-$(PROTOBUF_VERSION)-cpp.tar.gz .sum-protoc
 
 protobuf: protobuf-$(PROTOBUF_VERSION)-cpp.tar.gz .sum-protobuf
 	$(UNPACK)
+	$(RM) -Rf $(UNPACK_DIR)
 	mv protobuf-$(PROTOBUF_VERSION) protobuf-$(PROTOBUF_VERSION)-cpp
-	$(APPLY) $(SRC)/protobuf/protobuf-disable-gmock.patch
-	$(APPLY) $(SRC)/protobuf/dont-build-protoc.patch
-	$(APPLY) $(SRC)/protobuf/protobuf-fix-build.patch
-	$(APPLY) $(SRC)/protobuf/include-algorithm.patch
+	# don't build benchmarks and conformance
+	sed -i.orig 's, conformance benchmarks,,' "$(UNPACK_DIR)/Makefile.am"
+	sed -i.orig 's, benchmarks/Makefile conformance/Makefile,,' "$(UNPACK_DIR)/configure.ac"
+	# don't use gmock or any sub project to configure
+	sed -i.orig 's,AC_CONFIG_SUBDIRS,dnl AC_CONFIG_SUBDIRS,' "$(UNPACK_DIR)/configure.ac"
+	# don't build protoc
+	sed -i.orig 's,bin_PROGRAMS,#bin_PROGRAMS,' "$(UNPACK_DIR)/src/Makefile.am"
+	sed -i.orig 's,BUILT_SOURCES,#BUILT_SOURCES,' "$(UNPACK_DIR)/src/Makefile.am"
+	sed -i.orig 's,libprotobuf-lite.la libprotobuf.la libprotoc.la,libprotobuf-lite.la libprotobuf.la,' "$(UNPACK_DIR)/src/Makefile.am"
+	# force include <algorithm>
+	sed -i.orig 's,#ifdef _MSC_VER,#if 1,' "$(UNPACK_DIR)/src/google/protobuf/repeated_field.h"
 	$(APPLY) $(SRC)/protobuf/protobuf-no-mingw-pthread.patch
 	$(MOVE)
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/15192dc0b26c839ca0c3d2e82e52c52d78463b64

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/15192dc0b26c839ca0c3d2e82e52c52d78463b64
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list