From ebe62c9ca7ba80fc6f79e993dc41f3ed123d3b3d Mon Sep 17 00:00:00 2001 From: JonLiu1993 <13720414433@163.com> Date: Tue, 9 Jun 2020 16:23:06 +0800 Subject: [PATCH 1/7] [protobuf] Update to 3.12.3 --- ports/protobuf/CONTROL | 2 +- ports/protobuf/portfile.cmake | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 0feaaed4c92bea..2daa1ecaa17339 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.12.0-2 +Version: 3.12.3 Homepage: https://github.com/google/protobuf Description: Protocol Buffers - Google's data interchange format diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 6a27a95decd4eb..519d266bf5d498 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO protocolbuffers/protobuf - REF v3.12.0 - SHA512 2a5448651db557505ad0ad88e681b88c956de7a7b8b029f8685416629d55b09dd35a0d1219311c524b9981067c3685178d89918d4fc2540d30669e9ad0c7c2d0 + REF 31ebe2ac71400344a5db91ffc13c4ddfb7589f92 + SHA512 74e623547bb9448ccea29925172bf13fcbffab80eb02f58d248180000b4ae7249f0dee88bb4ef438857b0e1a96a600ab270ebf3b58568da28cbf97d8a2398297 HEAD_REF master PATCHES fix-uwp.patch From 91f9a21b6c6d298160a9ff8a9b70fa259565a661 Mon Sep 17 00:00:00 2001 From: LonLiu1993 <13720414433@163.com> Date: Wed, 10 Jun 2020 19:00:10 +0800 Subject: [PATCH 2/7] fixCmakeLists.txt --- ports/protobuf/portfile.cmake | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 519d266bf5d498..0af53750a9e230 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -1,7 +1,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO protocolbuffers/protobuf - REF 31ebe2ac71400344a5db91ffc13c4ddfb7589f92 + REF 31ebe2ac71400344a5db91ffc13c4ddfb7589f92 #v3.12.3 SHA512 74e623547bb9448ccea29925172bf13fcbffab80eb02f58d248180000b4ae7249f0dee88bb4ef438857b0e1a96a600ab270ebf3b58568da28cbf97d8a2398297 HEAD_REF master PATCHES @@ -45,7 +45,6 @@ vcpkg_configure_cmake( OPTIONS -Dprotobuf_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} -Dprotobuf_MSVC_STATIC_RUNTIME=${VCPKG_BUILD_STATIC_CRT} - -Dprotobuf_WITH_ZLIB=${protobuf_WITH_ZLIB} -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_INSTALL_CMAKEDIR:STRING=share/protobuf -Dprotobuf_BUILD_PROTOC_BINARIES=${protobuf_BUILD_PROTOC_BINARIES} @@ -73,10 +72,17 @@ else() set(EXECUTABLE_SUFFIX "") endif() +#if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") +# file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) +# string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") +# file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") +#endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake + "\"\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}\"" + "\"\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}\"" +) endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") @@ -114,10 +120,17 @@ else() endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(READ ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h _contents) - string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#ifndef PROTOBUF_USE_DLLS\n\#define PROTOBUF_USE_DLLS\n\#endif // PROTOBUF_USE_DLLS\n\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h "${_contents}") +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h + "\"\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_\"" + "\"\#define PROTOBUF_USE_DLLS\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_\"" +) endif() +#if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") +# file(READ ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h _contents) +# string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}") +# file(WRITE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h "${_contents}") +#endif() + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() From f78be61761bc2ab96c3ad0f77cdb4cec57bc8408 Mon Sep 17 00:00:00 2001 From: JonLiu1993 <13720414433@163.com> Date: Thu, 11 Jun 2020 10:48:59 +0800 Subject: [PATCH 3/7] fixportfile.cmake --- ports/protobuf/portfile.cmake | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 0af53750a9e230..c54be874561038 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -72,12 +72,6 @@ else() set(EXECUTABLE_SUFFIX "") endif() -#if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") -# file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) -# string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") -# file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") -#endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "\"\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}\"" @@ -126,11 +120,6 @@ vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platf ) endif() -#if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") -# file(READ ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h _contents) -# string(REPLACE "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" "\#define PROTOBUF_USE_DLLS\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" _contents "${_contents}") -# file(WRITE ${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h "${_contents}") -#endif() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() From 66b78b61006416575b401772b42e310f2e6ea86e Mon Sep 17 00:00:00 2001 From: JonLiu1993 <13720414433@163.com> Date: Wed, 24 Jun 2020 17:21:42 +0800 Subject: [PATCH 4/7] fixprotobufbuild --- ports/protobuf/portfile.cmake | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index c54be874561038..f8610470ac6b86 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -73,9 +73,9 @@ else() endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") -vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake - "\"\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}\"" - "\"\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}\"" + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake + "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" + "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" ) endif() @@ -114,12 +114,11 @@ else() endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") -vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h - "\"\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_\"" - "\"\#define PROTOBUF_USE_DLLS\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_\"" + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h + "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" + "\#ifndef PROTOBUF_USE_DLLS\n\#define PROTOBUF_USE_DLLS\n\#endif // PROTOBUF_USE_DLLS\n\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" ) endif() - file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) vcpkg_copy_pdbs() From 191c5fafc766482029a2c5a9e72988358acc993b Mon Sep 17 00:00:00 2001 From: JonLiu1993 <13720414433@163.com> Date: Thu, 2 Jul 2020 18:48:58 +0800 Subject: [PATCH 5/7] fixprotobuf --- ports/protobuf/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index f8610470ac6b86..b5c68a253d1155 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -42,7 +42,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake PREFER_NINJA - OPTIONS + OPTIONS ${FEATURE_OPTIONS} -Dprotobuf_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} -Dprotobuf_MSVC_STATIC_RUNTIME=${VCPKG_BUILD_STATIC_CRT} -Dprotobuf_BUILD_TESTS=OFF From 497b49307b3b452536e9f93f65a1e386c1fb8fb4 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Thu, 2 Jul 2020 18:52:31 +0800 Subject: [PATCH 6/7] Update ports/protobuf/portfile.cmake --- ports/protobuf/portfile.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index b5c68a253d1155..08f89d9b9b0747 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -42,7 +42,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake PREFER_NINJA - OPTIONS ${FEATURE_OPTIONS} -Dprotobuf_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} -Dprotobuf_MSVC_STATIC_RUNTIME=${VCPKG_BUILD_STATIC_CRT} -Dprotobuf_BUILD_TESTS=OFF From 1cad67adf775b04051b99d6cce60b42ee9516db0 Mon Sep 17 00:00:00 2001 From: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Date: Thu, 2 Jul 2020 19:09:16 +0800 Subject: [PATCH 7/7] Update portfile.cmake --- ports/protobuf/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 08f89d9b9b0747..f8610470ac6b86 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -42,6 +42,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake PREFER_NINJA + OPTIONS -Dprotobuf_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} -Dprotobuf_MSVC_STATIC_RUNTIME=${VCPKG_BUILD_STATIC_CRT} -Dprotobuf_BUILD_TESTS=OFF