Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[protobuf] Fix protoc.exe use the new headers with old DLLs #32800

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ports/protobuf/fix-new-headers.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 608c580..382e15e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,13 @@ if(protobuf_DEPRECATED_CMAKE_SUBDIRECTORY_USAGE)
endif()

# Add c++11 flags
+if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.38.32920.95")
+ string(APPEND CMAKE_CXX_FLAGS "/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
+ string(APPEND CMAKE_C_FLAGS "/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
+ endif()
+endif()
+
if (CYGWIN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
else()
1 change: 1 addition & 0 deletions ports/protobuf/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ vcpkg_from_github(
fix-static-build.patch
fix-default-proto-file-path.patch
compile_options.patch
fix-new-headers.patch
)

string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" protobuf_BUILD_PROTOC_BINARIES)
Expand Down
1 change: 1 addition & 0 deletions ports/protobuf/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "protobuf",
"version": "3.21.12",
"port-version": 1,
"description": "Protocol Buffers - Google's data interchange format",
"homepage": "https://github.com/protocolbuffers/protobuf",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6494,7 +6494,7 @@
},
"protobuf": {
"baseline": "3.21.12",
"port-version": 0
"port-version": 1
},
"protobuf-c": {
"baseline": "1.4.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/protobuf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ff70b6d76363b92baa81c9de147d31091037a5cc",
"version": "3.21.12",
"port-version": 1
},
{
"git-tree": "3b145508ba614fe26989b23f6317f15bf6467be4",
"version": "3.21.12",
Expand Down