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] update to v3.6.0 #3787

Closed
wants to merge 7 commits into from

Conversation

jozefizso
Copy link
Contributor

Update protobuf port to v3.6.0

I've cleaned up patches as most of the are included in this release.

Tested with x64-windows, x64-windows-static, x86-windows and x86-windows-static triplets.

@thierryba
Copy link
Contributor

I'm not in power to review this but I'd appreciate if it was reviewed and merged.

@jozefizso
Copy link
Contributor Author

@alexkaratarakis @ras0219-msft Is there any more work required to get this accepted?

# Conflicts:
#	ports/protobuf/CONTROL
#	ports/protobuf/js-embed.patch
#	ports/protobuf/portfile.cmake
@alexkaratarakis
Copy link
Contributor

@jozefizso
First off, sorry for not handling this sooner. I have resolved the current conflicts. The patch remaining here is jsembed.patch. It appears the first part:

@@ -62,7 +62,7 @@ set(libprotoc_files
   ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field.cc
   ${protobuf_source_dir}/src/google/protobuf/compiler/java/java_string_field_lite.cc
   ${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc
-  ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
+  ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc
   ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
   ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
   ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc

still applies but the second part:

@@ -168,9 +168,9 @@ set(js_well_known_types_sources
 )
 add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc)
 add_custom_command(
-  OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
+  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc
   DEPENDS js_embed ${js_well_known_types_sources}
-  COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
+  COMMAND "$<TARGET_FILE:js_embed>" ${js_well_known_types_sources} > ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc
 )

 add_library(libprotoc ${protobuf_SHARED_OR_STATIC}

does not. The corresponding directives don't exist in the most updated file.

Do you know whether this patch is still required?

@jozefizso
Copy link
Contributor Author

jozefizso commented Aug 10, 2018

They removed the js_embed binary: protocolbuffers/protobuf@b3e4e3a#diff-cfb00c0281078b8a94d5f2d6569d64dc

So the second part of the patch can be removed.

diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake
index ec6958bce2..58568bb2fc 100644
--- a/cmake/libprotoc.cmake
+++ b/cmake/libprotoc.cmake
@@ -161,17 +161,11 @@ set(libprotoc_headers
   ${protobuf_source_dir}/src/google/protobuf/compiler/zip_writer.h
 )
 
-set(js_well_known_types_sources
-  ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/any.js
-  ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/struct.js
-  ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types/timestamp.js
-)
-add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc)
-add_custom_command(
-  OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
-  DEPENDS js_embed ${js_well_known_types_sources}
-  COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
+if (MSVC)
+set(libprotoc_rc_files
+  ${CMAKE_CURRENT_BINARY_DIR}/version.rc
 )
+endif()
 
 add_library(libprotoc ${protobuf_SHARED_OR_STATIC}
   ${libprotoc_files} ${libprotoc_headers})

@jozefizso
Copy link
Contributor Author

Closing as newer port exists already.

@jozefizso jozefizso closed this Aug 10, 2018
@jozefizso jozefizso deleted the feature/protobuf_v3.6.0 branch August 10, 2018 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants