From e916630f208b8069790e654fcc5bbf1b420eab46 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 19 Nov 2019 11:14:40 -0800 Subject: [PATCH] [libbson][mongo-c-driver] Update to 1.15.1. Parse CONTROL file for version number (#8790) --- ports/libbson/CONTROL | 2 +- ports/libbson/portfile.cmake | 11 ++++++----- ports/mongo-c-driver/CONTROL | 2 +- ports/mongo-c-driver/portfile.cmake | 11 ++++++----- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL index 42d87161b7e..ab99da6baa1 100644 --- a/ports/libbson/CONTROL +++ b/ports/libbson/CONTROL @@ -1,4 +1,4 @@ Source: libbson -Version: 1.14.0-3 +Version: 1.15.1-1 Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. Homepage: https://github.com/mongodb/libbson diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake index 09d84266c25..bec809e7e75 100644 --- a/ports/libbson/portfile.cmake +++ b/ports/libbson/portfile.cmake @@ -1,11 +1,8 @@ -include(vcpkg_common_functions) -set(BUILD_VERSION 1.14.0) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mongodb/mongo-c-driver - REF ${BUILD_VERSION} - SHA512 bf2bb835543dd2a445aac6cafa7bbbf90921ec41014534779924a5eb7cbd9fd532acd8146ce81dfcf1bcac33a78d8fce22b962ed7f776449e4357eccab8d6110 + REF 541086adcf1eecf88ac09fda47d9a8ec1598015d # debian/1.15.1-1 + SHA512 a57438dfae9d0993ae04b7a76677f79331699898f21e7645db5edd2c91014f33b738a0af67b58234d1ee03aab2ae3b58c183bbd043fc2bde5cc1a4e111755b70 HEAD_REF master PATCHES fix-uwp.patch ) @@ -16,6 +13,10 @@ else() set(ENABLE_STATIC OFF) endif() +file(READ ${CMAKE_CURRENT_LIST_DIR}/CONTROL _contents) +string(REGEX MATCH "\nVersion:[ ]*[^ \n]+" _contents "${_contents}") +string(REGEX REPLACE ".+Version:[ ]*([\\.0-9]+).*" "\\1" BUILD_VERSION "${_contents}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index 18f189170ef..efc81c03a4f 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -1,5 +1,5 @@ Source: mongo-c-driver -Version: 1.14.0-5 +Version: 1.15.1-1 Build-Depends: libbson, openssl (!windows), zlib Description: Client library written in C for MongoDB. Homepage: https://github.com/mongodb/mongo-c-driver diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index 958ffbcdeb6..a138f7872a1 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -1,11 +1,8 @@ -include(vcpkg_common_functions) -set(BUILD_VERSION 1.14.0) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mongodb/mongo-c-driver - REF ${BUILD_VERSION} - SHA512 bf2bb835543dd2a445aac6cafa7bbbf90921ec41014534779924a5eb7cbd9fd532acd8146ce81dfcf1bcac33a78d8fce22b962ed7f776449e4357eccab8d6110 + REF 541086adcf1eecf88ac09fda47d9a8ec1598015d # debian/1.15.1-1 + SHA512 a57438dfae9d0993ae04b7a76677f79331699898f21e7645db5edd2c91014f33b738a0af67b58234d1ee03aab2ae3b58c183bbd043fc2bde5cc1a4e111755b70 HEAD_REF master ) @@ -25,6 +22,10 @@ else() set(ENABLE_SSL "OPENSSL") endif() +file(READ ${CMAKE_CURRENT_LIST_DIR}/CONTROL _contents) +string(REGEX MATCH "\nVersion:[ ]*[^ \n]+" _contents "${_contents}") +string(REGEX REPLACE ".+Version:[ ]*([\\.0-9]+).*" "\\1" BUILD_VERSION "${_contents}") + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA