aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2017-09-03 23:57:55 -0700
committerGitHub <noreply@github.com>2017-09-03 23:57:55 -0700
commit04ccdf9512603fa41422d09ee0f205bf6c390914 (patch)
tree3baa996b8091d34f1ed662910426845a2aa2fe44
parent35a9d223bc14fb4b35d6ad876d208897c8ce590a (diff)
parenta64bc4a8be6c8ce563f96eb5fffb829783ed91a4 (diff)
downloadvcpkg-04ccdf9512603fa41422d09ee0f205bf6c390914.tar.gz
vcpkg-04ccdf9512603fa41422d09ee0f205bf6c390914.zip
Merge pull request #1750 from thierryba/protobuf3.4
protobuf: switching to 3.4
-rw-r--r--ports/protobuf/0001-fix-missing-export.patch13
-rw-r--r--ports/protobuf/001-add-compiler-flag.patch25
-rw-r--r--ports/protobuf/portfile.cmake11
3 files changed, 20 insertions, 29 deletions
diff --git a/ports/protobuf/0001-fix-missing-export.patch b/ports/protobuf/0001-fix-missing-export.patch
deleted file mode 100644
index c7d5ff6c8..000000000
--- a/ports/protobuf/0001-fix-missing-export.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/google/protobuf/generated_message_util.h b/src/google/protobuf/generated_message_util.h
-index 4417446..a7154b4 100644
---- a/src/google/protobuf/generated_message_util.h
-+++ b/src/google/protobuf/generated_message_util.h
-@@ -164,7 +164,7 @@ class ExplicitlyConstructed {
-
- // Default empty string object. Don't use this directly. Instead, call
- // GetEmptyString() to get the reference.
--extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
-+LIBPROTOBUF_EXPORT extern ExplicitlyConstructed< ::std::string> fixed_address_empty_string;
- LIBPROTOBUF_EXPORT extern ProtobufOnceType empty_string_once_init_;
- LIBPROTOBUF_EXPORT void InitEmptyString();
-
diff --git a/ports/protobuf/001-add-compiler-flag.patch b/ports/protobuf/001-add-compiler-flag.patch
index aec510f44..dd1285cea 100644
--- a/ports/protobuf/001-add-compiler-flag.patch
+++ b/ports/protobuf/001-add-compiler-flag.patch
@@ -1,14 +1,13 @@
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
-index 7618ba21..bd92b09d 100644
+index 7618ba2..d282a60 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
-@@ -165,8 +165,11 @@ endif (protobuf_UNICODE)
+@@ -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)
@@ -16,18 +15,26 @@ index 7618ba21..bd92b09d 100644
if (protobuf_BUILD_TESTS)
include(tests.cmake)
+
diff --git a/cmake/install.cmake b/cmake/install.cmake
-index 28dc90dc..52c1f721 100644
+index 441bf55..4158820 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
-@@ -1,9 +1,12 @@
+@@ -1,14 +1,17 @@
include(GNUInstallDirs)
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake
+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}/libprotobuf.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY)
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake
++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libprotobuf-lite.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY)
+
foreach(_library
- libprotobuf-lite
- libprotobuf
@@ -36,7 +43,7 @@ index 28dc90dc..52c1f721 100644
set_property(TARGET ${_library}
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${protobuf_source_dir}/src>
-@@ -14,8 +17,10 @@ foreach(_library
+@@ -19,8 +22,10 @@ foreach(_library
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library})
endforeach()
@@ -47,9 +54,9 @@ index 28dc90dc..52c1f721 100644
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
+endif()
- file(STRINGS extract_includes.bat.in _extract_strings
- REGEX "^copy")
-@@ -94,7 +99,12 @@ configure_file(protobuf-options.cmake
+ 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.
diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake
index fa81e0542..83f9e1e1d 100644
--- a/ports/protobuf/portfile.cmake
+++ b/ports/protobuf/portfile.cmake
@@ -1,16 +1,16 @@
include(vcpkg_common_functions)
-set(PROTOBUF_VERSION 3.3.0)
+set(PROTOBUF_VERSION 3.4.0)
vcpkg_download_distfile(ARCHIVE_FILE
URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz"
FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz"
- SHA512 ef01300bdda4a1a33a6056aea1d55e9d66ab1ca644aa2d9d5633cfc0bccfe4c24fdfa1015889b2c1c568e89ad053c701de1aca45196a6439130b7bb8f461595f
+ SHA512 ce9bd9bc818c4a8e8b08c83e8a4eba6fca008a64a5ad9d322b19683b1de2b5fa622ed99093323f3c9d0820ef23430f7ee07f6930f7f877d334e5d36df9b0be0e
)
vcpkg_download_distfile(TOOL_ARCHIVE_FILE
URLS "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-win32.zip"
FILENAME "protoc-${PROTOBUF_VERSION}-win32.zip"
- SHA512 9b4902b3187fb978a8153aaf050314a3ca9ca161b0712a3672ccdfabb7f5a57035e71c2dfde9a0b99f9417e159dcbdedaf9a2b1917d712dc3d9d554bba0d4ee8
+ SHA512 b874c3f47b39ac78f5675e05220318683004a365c248bf47ba50d8c66c8ed7763432451bab30524e131e1185a2bdaa6e6071b389eb61ad58b1b95974cf39d41b
)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION})
@@ -18,13 +18,10 @@ set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32)
vcpkg_extract_source_archive(${ARCHIVE_FILE})
-# Patch to fix the missing export of fixed_address_empty_string,
-# see https://github.com/google/protobuf/pull/3216
# Add a flag that can be set to disable the protobuf compiler
vcpkg_apply_patches(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-missing-export.patch"
- "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch"
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch"
)