aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
authorAlexander Karatarakis <alex@karatarakis.com>2017-06-12 12:22:35 -0700
committerGitHub <noreply@github.com>2017-06-12 12:22:35 -0700
commitf8f35255303e6be7a6a4eb7e7504b637fcd0c0dd (patch)
tree84705e4887a150747f715583a9fcbb8849d92bf2 /ports
parent41d003e8e8055934832b28c09cf70e5de2ef16a0 (diff)
parent0e50d7019929bcf9d4fabe58f9c8b1be467f5471 (diff)
downloadvcpkg-f8f35255303e6be7a6a4eb7e7504b637fcd0c0dd.tar.gz
vcpkg-f8f35255303e6be7a6a4eb7e7504b637fcd0c0dd.zip
Merge pull request #1270 from traversaro/fix-dynamic-protobuf
Fix protobuf dynamic build
Diffstat (limited to 'ports')
-rw-r--r--ports/protobuf/0001-fix-missing-export.patch13
-rw-r--r--ports/protobuf/portfile.cmake9
2 files changed, 22 insertions, 0 deletions
diff --git a/ports/protobuf/0001-fix-missing-export.patch b/ports/protobuf/0001-fix-missing-export.patch
new file mode 100644
index 000000000..c7d5ff6c8
--- /dev/null
+++ b/ports/protobuf/0001-fix-missing-export.patch
@@ -0,0 +1,13 @@
+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/portfile.cmake b/ports/protobuf/portfile.cmake
index c053e1bb5..852086ff5 100644
--- a/ports/protobuf/portfile.cmake
+++ b/ports/protobuf/portfile.cmake
@@ -17,6 +17,15 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION})
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
+vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-missing-export.patch"
+)
+
+
vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH})
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)