aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2018-08-07 12:08:29 -0700
committerGitHub <noreply@github.com>2018-08-07 12:08:29 -0700
commita37eb3ce57e516d47daf5ad4a8fb05613d7110b2 (patch)
tree3eb60b4b5abaf44db38728b5ff5f6718577d60b6
parentff5d6eb3c84d6a41fefc2ab10b77790db933c8ed (diff)
parent7dba50c8e4bd46c4deacc348ff2245ded0727021 (diff)
downloadvcpkg-a37eb3ce57e516d47daf5ad4a8fb05613d7110b2.tar.gz
vcpkg-a37eb3ce57e516d47daf5ad4a8fb05613d7110b2.zip
Merge pull request #4000 from TheAifam5/protobuf
[protobuf] Update to 3.6.1
-rw-r--r--ports/protobuf/001-add-compiler-flag.patch70
-rw-r--r--ports/protobuf/CONTROL2
-rw-r--r--ports/protobuf/export-ParseGeneratorParameter.patch13
-rw-r--r--ports/protobuf/js-embed.patch25
-rw-r--r--ports/protobuf/portfile.cmake1
-rw-r--r--ports/protobuf/wire_format_lite_h_fix_error_C4146.patch35
6 files changed, 1 insertions, 145 deletions
diff --git a/ports/protobuf/001-add-compiler-flag.patch b/ports/protobuf/001-add-compiler-flag.patch
deleted file mode 100644
index ad545cad3..000000000
--- a/ports/protobuf/001-add-compiler-flag.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
-index 7618ba2..d282a60 100644
---- a/cmake/CMakeLists.txt
-+++ b/cmake/CMakeLists.txt
-@@ -165,8 +165,10 @@ endif (protobuf_UNICODE)
-
- include(libprotobuf-lite.cmake)
- include(libprotobuf.cmake)
--include(libprotoc.cmake)
--include(protoc.cmake)
-+if(protobuf_BUILD_COMPILER)
-+ include(libprotoc.cmake)
-+ include(protoc.cmake)
-+endif()
-
- if (protobuf_BUILD_TESTS)
- include(tests.cmake)
-
-diff --git a/cmake/install.cmake b/cmake/install.cmake
-index 441bf55..20b3aa0 100644
---- a/cmake/install.cmake
-+++ b/cmake/install.cmake
-@@ -1,14 +1,17 @@
- include(GNUInstallDirs)
-
-+set(LIBRARIES_TO_SET_DEST libprotobuf-lite libprotobuf)
-+if(protobuf_BUILD_COMPILER)
-+ list(APPEND LIBRARIES_TO_SET_DEST libprotoc)
-+endif()
-+
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY)
- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY)
-
- foreach(_library
-- libprotobuf-lite
-- libprotobuf
-- libprotoc)
-+ ${LIBRARIES_TO_SET_DEST})
- set_property(TARGET ${_library}
- PROPERTY INTERFACE_INCLUDE_DIRECTORIES
- $<BUILD_INTERFACE:${protobuf_source_dir}/src>
-@@ -19,8 +22,10 @@ foreach(_library
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library})
- endforeach()
-
--install(TARGETS protoc EXPORT protobuf-targets
-- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
-+if(protobuf_BUILD_COMPILER)
-+ install(TARGETS protoc EXPORT protobuf-targets
-+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
-+endif()
-
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
-
-@@ -101,7 +106,12 @@ configure_file(protobuf-options.cmake
- ${CMAKE_INSTALL_CMAKEDIR}/protobuf-options.cmake @ONLY)
-
- # Allows the build directory to be used as a find directory.
--export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc
-+set(FIND_DIRS libprotobuf-lite libprotobuf)
-+if(protobuf_BUILD_COMPILER)
-+ list(APPEND FIND_DIRS libprotoc protoc)
-+endif()
-+
-+export(TARGETS ${FIND_DIRS}
- NAMESPACE protobuf::
- FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake
- )
diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL
index 911a32135..20209cb6c 100644
--- a/ports/protobuf/CONTROL
+++ b/ports/protobuf/CONTROL
@@ -1,5 +1,5 @@
Source: protobuf
-Version: 3.6.1
+Version: 3.6.1-1
Description: Protocol Buffers - Google's data interchange format
Feature: zlib
diff --git a/ports/protobuf/export-ParseGeneratorParameter.patch b/ports/protobuf/export-ParseGeneratorParameter.patch
deleted file mode 100644
index 38b45a4c4..000000000
--- a/ports/protobuf/export-ParseGeneratorParameter.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/google/protobuf/compiler/code_generator.h b/src/google/protobuf/compiler/code_generator.h
-index 4b1d90b..4c2b3ee 100644
---- a/src/google/protobuf/compiler/code_generator.h
-+++ b/src/google/protobuf/compiler/code_generator.h
-@@ -166,7 +166,7 @@ typedef GeneratorContext OutputDirectory;
- // "foo=bar,baz,qux=corge"
- // parses to the pairs:
- // ("foo", "bar"), ("baz", ""), ("qux", "corge")
--void ParseGeneratorParameter(
-+LIBPROTOC_EXPORT void ParseGeneratorParameter(
- const string&, std::vector<std::pair<string, string> >*);
-
- } // namespace compiler
diff --git a/ports/protobuf/js-embed.patch b/ports/protobuf/js-embed.patch
deleted file mode 100644
index ded45ad06..000000000
--- a/ports/protobuf/js-embed.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake
-index 107c1c5..233bcf6 100644
---- a/cmake/libprotoc.cmake
-+++ b/cmake/libprotoc.cmake
-@@ -73,7 +73,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
-@@ -210,9 +210,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}
diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake
index 5fbfa6178..93f85d186 100644
--- a/ports/protobuf/portfile.cmake
+++ b/ports/protobuf/portfile.cmake
@@ -7,7 +7,6 @@ vcpkg_from_github(
SHA512 1bc175d24b49de1b1e41eaf39598194e583afffb924c86c8d2e569d935af21874be76b2cbd4d9655a1d38bac3d4cd811de88bc2c72d81bad79115e69e5b0d839
HEAD_REF master
PATCHES
- "${CMAKE_CURRENT_LIST_DIR}/js-embed.patch"
"${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch"
)
diff --git a/ports/protobuf/wire_format_lite_h_fix_error_C4146.patch b/ports/protobuf/wire_format_lite_h_fix_error_C4146.patch
deleted file mode 100644
index b56892a22..000000000
--- a/ports/protobuf/wire_format_lite_h_fix_error_C4146.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 24493eef9395e5b832360e12efabf9c363c9cb15 Mon Sep 17 00:00:00 2001
-From: Rodrigo Hernandez <kwizatz@aeongames.com>
-Date: Mon, 4 Dec 2017 19:04:42 -0600
-Subject: [PATCH] Using binary one's complement to negate an unsigned int
-
-This removes a Visual Studio warning:
-
-warning C4146: unary minus operator applied to unsigned type, result
-still unsigned.
----
- src/google/protobuf/wire_format_lite.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/google/protobuf/wire_format_lite.h b/src/google/protobuf/wire_format_lite.h
-index cf614c02a4..361920b8ec 100644
---- a/src/google/protobuf/wire_format_lite.h
-+++ b/src/google/protobuf/wire_format_lite.h
-@@ -860,7 +860,7 @@ inline uint32 WireFormatLite::ZigZagEncode32(int32 n) {
-
- inline int32 WireFormatLite::ZigZagDecode32(uint32 n) {
- // Note: Using unsigned types prevent undefined behavior
-- return static_cast<int32>((n >> 1) ^ -(n & 1));
-+ return static_cast<int32>((n >> 1) ^ (~(n & 1) + 1));
- }
-
- inline uint64 WireFormatLite::ZigZagEncode64(int64 n) {
-@@ -871,7 +871,7 @@ inline uint64 WireFormatLite::ZigZagEncode64(int64 n) {
-
- inline int64 WireFormatLite::ZigZagDecode64(uint64 n) {
- // Note: Using unsigned types prevent undefined behavior
-- return static_cast<int64>((n >> 1) ^ -(n & 1));
-+ return static_cast<int64>((n >> 1) ^ (~(n & 1) + 1));
- }
-
- // String is for UTF-8 text only, but, even so, ReadString() can simply