Skip to content

Commit

Permalink
Merge pull request #166 from regro-cf-autotick-bot/23.3_h34b4d1
Browse files Browse the repository at this point in the history
libprotobuf v23.3
  • Loading branch information
h-vetinari authored Jun 30, 2023
2 parents e871f90 + 183fa4f commit b81e13d
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 374 deletions.
12 changes: 4 additions & 8 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# keep this without major version to let the bot pick it up
{% set version = "23.2" %}
{% set version = "23.3" %}
# protobuf doesn't add the major version in the tag, it's defined per language in
# https://github.com/protocolbuffers/protobuf/blob/main/version.json
{% set major = "4" %}
Expand All @@ -12,23 +12,19 @@ package:

source:
- url: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v{{ version.replace(".rc", "-rc") }}.tar.gz
sha256: 0b0395d34e000f1229679e10d984ed7913078f3dd7f26cf0476467f5e65716f4
sha256: 4e176116949be52b0408dfd24f8925d1eb674a781ae242a75296b17a1c721395
patches:
- patches/0001-use-consistent-cmake-location.patch
- patches/0002-set-static-lib-extension-on-windows.patch
# backport https://github.com/protocolbuffers/protobuf/pull/12577
- patches/0003-Enable-the-selection-of-system-provided-jsoncpp-1257.patch
- patches/0004-always-look-for-shared-abseil-builds.patch
- patches/0005-be-more-lenient-with-abseil-version.patch
# backports from https://github.com/protocolbuffers/protobuf/pull/12987 (3 commits)
- patches/0006-feat-workaround-for-DOMAIN-macro-12903.patch
- patches/0007-fix-missing-PROTOBUF_EXPORT-for-public-symbols.patch
- patches/0008-CMake-Fix-abseil_dll-target-name-when-using-find_pac.patch
# grpc_cpp_java_plugin links against otherwise internal symbols
- patches/0009-Export-functions-in-google-compiler-java-names.patch
- patches/0006-Export-functions-in-google-compiler-java-names.patch

build:
number: 5
number: 0

outputs:
- name: libprotobuf
Expand Down
9 changes: 3 additions & 6 deletions recipe/patches/0001-use-consistent-cmake-location.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 09c7fc2f822ce64ed95b69cd190b36878f96d9e0 Mon Sep 17 00:00:00 2001
From 1a0df0ca9e8d5320556ca15ed1685d578a98500c Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sat, 3 Sep 2022 19:48:04 +0200
Subject: [PATCH 1/9] use consistent cmake location
Subject: [PATCH 1/6] use consistent cmake location

---
cmake/install.cmake | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/cmake/install.cmake b/cmake/install.cmake
index e7eb210..24d7a3e 100644
index e7eb2103b..24d7a3ec9 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -84,15 +84,9 @@ set(_install_cmakedir_desc "Directory relative to CMAKE_INSTALL to install the c
Expand All @@ -30,6 +30,3 @@ index e7eb210..24d7a3e 100644
set(CMAKE_BUILD_CMAKEDIR "${CMAKE_CURRENT_BINARY_DIR}/${protobuf_CMAKE_SUBDIR}" CACHE STRING "${_build_cmakedir_desc}")
mark_as_advanced(protobuf_CMAKE_SUBDIR)
mark_as_advanced(CMAKE_BUILD_CMAKEDIR)
--
2.39.2 (Apple Git-143)

9 changes: 3 additions & 6 deletions recipe/patches/0002-set-static-lib-extension-on-windows.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From 9153376cb056ac871eb4dfb4e8a89f5ae07c2ab8 Mon Sep 17 00:00:00 2001
From 8e995af87c7cc4ac02f573dc10364765b7b0adfb Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sun, 4 Sep 2022 10:57:08 +0200
Subject: [PATCH 2/9] set static lib extension on windows
Subject: [PATCH 2/6] set static lib extension on windows

---
CMakeLists.txt | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1fb018b..61e9ac3 100644
index dc09f63db..d0015b799 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -371,6 +371,12 @@ else ()
Expand All @@ -24,6 +24,3 @@ index 1fb018b..61e9ac3 100644
# Ensure we have a protoc executable and protobuf libraries if we need one
if (protobuf_BUILD_TESTS OR protobuf_BUILD_CONFORMANCE OR protobuf_BUILD_EXAMPLES)
if (NOT DEFINED protobuf_PROTOC_EXE)
--
2.39.2 (Apple Git-143)

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From b016914542095d63cf9e52378390540273c42407 Mon Sep 17 00:00:00 2001
From e29e3dc895a1dcd60d0a955dbc63f848a0c14e66 Mon Sep 17 00:00:00 2001
From: Mike Rochefort <mroche@omenos.dev>
Date: Mon, 1 May 2023 09:34:17 -0700
Subject: [PATCH 3/9] Enable the selection of system provided jsoncpp (#12577)
Subject: [PATCH 3/6] Enable the selection of system provided jsoncpp (#12577)

Allows the use of an external `jsoncpp` library to be used. Replicates the model used by `abseil-cpp` as a "package" or "module" to the `protobuf_JSONCPP_PROVIDER` option.

Expand All @@ -17,7 +17,7 @@ PiperOrigin-RevId: 528492610
2 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 61e9ac3..3db1d0e 100644
index d0015b799..ae0fd1c64 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -332,6 +332,9 @@ endif (protobuf_UNICODE)
Expand All @@ -31,7 +31,7 @@ index 61e9ac3..3db1d0e 100644
include(${protobuf_SOURCE_DIR}/cmake/gtest.cmake)
endif (protobuf_BUILD_TESTS)
diff --git a/cmake/conformance.cmake b/cmake/conformance.cmake
index 61ac25a..6ba9050 100644
index 61ac25a0d..6ba9050af 100644
--- a/cmake/conformance.cmake
+++ b/cmake/conformance.cmake
@@ -1,12 +1,15 @@
Expand Down Expand Up @@ -73,6 +73,3 @@ index 61ac25a..6ba9050 100644
+else()
+ target_link_libraries(conformance_test_runner jsoncpp)
+endif()
--
2.39.2 (Apple Git-143)

13 changes: 5 additions & 8 deletions recipe/patches/0004-always-look-for-shared-abseil-builds.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From a70dac74e264567943e07e8753330505c4413cda Mon Sep 17 00:00:00 2001
From 137cfa12dbc793c2358e8048dde9b35d4e77292d Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Sat, 13 May 2023 22:43:45 +1100
Subject: [PATCH 4/9] always look for shared abseil builds
Subject: [PATCH 4/6] always look for shared abseil builds

---
cmake/abseil-cpp.cmake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake
index e7bfb2b..32310f5 100644
index b50fb89e6..b07e63f26 100644
--- a/cmake/abseil-cpp.cmake
+++ b/cmake/abseil-cpp.cmake
@@ -37,7 +37,7 @@ elseif(protobuf_ABSL_PROVIDER STREQUAL "package")
Expand All @@ -18,8 +18,5 @@ index e7bfb2b..32310f5 100644
-if (BUILD_SHARED_LIBS AND MSVC)
+if (MSVC)
# On MSVC Abseil is bundled into a single DLL.
set(protobuf_ABSL_USED_TARGETS abseil_dll)

--
2.39.2 (Apple Git-143)

# This condition is necessary as of abseil 20230125.3 when abseil is consumed via add_subdirectory,
# the abseil_dll target is named abseil_dll, while if abseil is consumed via find_package, the target
9 changes: 3 additions & 6 deletions recipe/patches/0005-be-more-lenient-with-abseil-version.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 58bde6be0e9e355ca5b1219ea1d7313cda8a27d1 Mon Sep 17 00:00:00 2001
From 905908b06fdc6a30c395d4648af67cf5cb5afe67 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari@gmx.com>
Date: Thu, 18 May 2023 09:02:21 +1100
Subject: [PATCH 5/9] be more lenient with abseil version
Subject: [PATCH 5/6] be more lenient with abseil version

we carry the patch for the only pertinent difference
between .2 & .3 anyway
Expand All @@ -10,7 +10,7 @@ between .2 & .3 anyway
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
index 18d7ccf..90f58f6 100644
index 644bb87e0..94755d9fa 100644
--- a/src/google/protobuf/port_def.inc
+++ b/src/google/protobuf/port_def.inc
@@ -216,7 +216,7 @@ static_assert(PROTOBUF_CPLUSPLUS_MIN(201402L), "Protobuf only supports C++14 and
Expand All @@ -22,6 +22,3 @@ index 18d7ccf..90f58f6 100644
"Protobuf only supports Abseil version 20230125.3 and newer.");

// Future versions of protobuf will include breaking changes to some APIs.
--
2.39.2 (Apple Git-143)

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
From e22594d73a25056925cd56a02ea7fd447b86cb75 Mon Sep 17 00:00:00 2001
From d84ed5304325e4321a3c86c255a87868f72eb371 Mon Sep 17 00:00:00 2001
From: "Uwe L. Korn" <uwe.korn@quantco.com>
Date: Wed, 14 Jun 2023 11:36:55 +0200
Subject: [PATCH 9/9] Export functions in google::compiler::java::names
Subject: [PATCH 6/6] Export functions in google::compiler::java::names

---
src/google/protobuf/compiler/java/names.h | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/google/protobuf/compiler/java/names.h b/src/google/protobuf/compiler/java/names.h
index ddfc8e6..f26004c 100644
index ddfc8e65d..f26004cd7 100644
--- a/src/google/protobuf/compiler/java/names.h
+++ b/src/google/protobuf/compiler/java/names.h
@@ -63,67 +63,67 @@ namespace java {
Expand Down Expand Up @@ -89,6 +89,3 @@ index ddfc8e6..f26004c 100644


} // namespace java
--
2.39.2 (Apple Git-143)

Loading

0 comments on commit b81e13d

Please sign in to comment.