diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2018-12-18 11:43:25 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-12-18 11:43:25 -0800 |
| commit | 7a67785e14130170679d19be832f2e1ba2530560 (patch) | |
| tree | 49196cc5252f2e800a18802548006977da276447 | |
| parent | 524a1414fc395fdc60951d63f4a66683309fd630 (diff) | |
| parent | b2996e1fd48842446a64443d057c576f819bda00 (diff) | |
| download | vcpkg-7a67785e14130170679d19be832f2e1ba2530560.tar.gz vcpkg-7a67785e14130170679d19be832f2e1ba2530560.zip | |
Merge branch 'master' of https://github.com/Microsoft/vcpkg into dev/roschuma/4988
70 files changed, 654 insertions, 976 deletions
diff --git a/docs/users/integration.md b/docs/users/integration.md index fbaea41d9..10f5574c1 100644 --- a/docs/users/integration.md +++ b/docs/users/integration.md @@ -50,7 +50,7 @@ The `CMAKE_TOOLCHAIN_FILE` setting simply must be set before the `project()` dir ```cmake if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE) - set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "") endif() diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index a2aefabec..59a6580ba 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.9 +Version: 1.7.10 Build-Depends: ilmbase, hdf5 Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index 295afa34a..7e2bc233f 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.9 - SHA512 8025c20525ffbd5bdc9dd5a33ad8238e49f063d244ab9d112e7d1ddb7ee7cf9b36ceb74cb45d658ce22d3033552c89bddf6b818cf466ea46aa1a70a41fdeddb2 + REF 1.7.10 + SHA512 e98ffaedb98dbc5c53fe9703d3063bb118d32c83c47e3af04c8fc96237034b02fe0fc2c628ca82bdd0e0ef17d9375f4f48e0022ce33380b9ad91970539611ced HEAD_REF master ) diff --git a/ports/aws-lambda-cpp/CONTROL b/ports/aws-lambda-cpp/CONTROL new file mode 100644 index 000000000..fb45cc22d --- /dev/null +++ b/ports/aws-lambda-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: aws-lambda-cpp +Version: 0.1.0 +Build-Depends: curl +Description: C++ Runtime for AWS Lambda. diff --git a/ports/aws-lambda-cpp/portfile.cmake b/ports/aws-lambda-cpp/portfile.cmake new file mode 100644 index 000000000..977c9bd40 --- /dev/null +++ b/ports/aws-lambda-cpp/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-lambda-cpp + REF v0.1.0 + SHA512 78b1ad1dcd88176a954c03b38cbb962c77488da6c75acb37a8b64cde147c030b02c6e51f0a974edb042e59c3c969d110d181ad097ef76f43255500b272a94454 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/aws-lambda-cpp RENAME copyright) + diff --git a/ports/botan/CONTROL b/ports/botan/CONTROL index 5582c3a7a..3961c2ccb 100644 --- a/ports/botan/CONTROL +++ b/ports/botan/CONTROL @@ -1,3 +1,3 @@ Source: botan -Version: 2.8.0 +Version: 2.9.0 Description: A cryptography library written in C++11 diff --git a/ports/botan/portfile.cmake b/ports/botan/portfile.cmake index 200d00f9f..f405b8f45 100644 --- a/ports/botan/portfile.cmake +++ b/ports/botan/portfile.cmake @@ -1,12 +1,12 @@ include(vcpkg_common_functions) -set(BOTAN_VERSION 2.8.0) +set(BOTAN_VERSION 2.9.0) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO randombit/botan - REF cb14e9ce95bcaae2ada7ffe96ef0cce6a2b38593 - SHA512 3d8fbf1c65e2b0259f225db46ffa4a7eb989a518b230574e94f82dc13afd7dc32cfe6a8a0127e7dd0dea30e06f3946db78db50e107937382eff8ed823e996dc3 + REF 0129d3172ec419beb90a2b3487f6385a35da0742 + SHA512 a8328df5ad2693a96935d1d2202ddd6678a5ba9c63a8159acbe56f1c884fa5faaa71339e8f56284cfd00574a9b4f91bdb1fb22c36c8e899d9b4cbe881f4867d3 HEAD_REF master ) diff --git a/ports/caf/CONTROL b/ports/caf/CONTROL index e9b8cd0bf..6f39010be 100644 --- a/ports/caf/CONTROL +++ b/ports/caf/CONTROL @@ -1,4 +1,4 @@ Source: caf -Version: 0.15.7 +Version: 0.16.2 Build-Depends: openssl Description: an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more. diff --git a/ports/caf/openssl-version-override.patch b/ports/caf/openssl-version-override.patch index bccbd6ca4..5a0337134 100644 --- a/ports/caf/openssl-version-override.patch +++ b/ports/caf/openssl-version-override.patch @@ -1,14 +1,14 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a7b75f7..794af1d 100644
+index 2d908e8..d270297 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -545,6 +545,9 @@ if(NOT CAF_NO_OPENSSL)
+@@ -495,6 +495,9 @@ if(NOT CAF_NO_OPENSSL)
message(STATUS
"Disable OpenSSL. Required >= 1.0.1 due to TLSv1.2 support.")
set(CAF_NO_OPENSSL yes)
+ elseif(CAF_OPENSSL_VERSION_OVERRIDE)
-+ include_directories(BEFORE ${OPENSSL_INCLUDE_DIR})
-+ add_optional_caf_lib(openssl)
++ include_directories(BEFORE ${OPENSSL_INCLUDE_DIR})
++ add_optional_caf_lib(openssl)
else()
- # Check if openssl headers and library versions match
- set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
+ if(NOT CMAKE_CROSSCOMPILING)
+ # Check if openssl headers and library versions match
diff --git a/ports/caf/portfile.cmake b/ports/caf/portfile.cmake index aecd84116..ae5e24c1b 100644 --- a/ports/caf/portfile.cmake +++ b/ports/caf/portfile.cmake @@ -8,14 +8,11 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO actor-framework/actor-framework - REF 0.15.7 - SHA512 ff0fa205ad71677b84fa09a2e6ce6bb6d1bc9b790bbbc3ac51505467402ff61a218528004212efa2063c798cc512972d318a2c9423067ee51cef719de2b6b186 + REF 2cc4377715afc3d3c35848f9d59b9e6876afd875 + SHA512 7e7962bf5a30122bde8be63f6de0058f865bd890e2d10f4d90f4885b7953467fb6532f69c1a77a35802de7c531f6aac192a2993b53a8dc0b05f503c3f4083a31 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/openssl-version-override.patch + PATCHES + openssl-version-override.patch ) vcpkg_configure_cmake( diff --git a/ports/cairo/CMakeLists.txt b/ports/cairo/CMakeLists.txt index 137dba7f3..9fc476539 100644 --- a/ports/cairo/CMakeLists.txt +++ b/ports/cairo/CMakeLists.txt @@ -160,6 +160,7 @@ endif() set(CMAKE_DEBUG_POSTFIX "d") +find_package(Threads REQUIRED) find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) find_package(Freetype REQUIRED) @@ -176,7 +177,7 @@ add_definitions( -DHAVE_FT_GET_X11_FONT_FORMAT=1) # additional features for macOS -if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") +if((CMAKE_SYSTEM_NAME STREQUAL "Darwin") OR (CMAKE_SYSTEM_NAME STREQUAL "Linux")) add_definitions( -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 diff --git a/ports/cairo/CONTROL b/ports/cairo/CONTROL index 2f182e84b..365fe38e7 100644 --- a/ports/cairo/CONTROL +++ b/ports/cairo/CONTROL @@ -1,4 +1,4 @@ Source: cairo -Version: 1.15.8-3 +Version: 1.15.8-4 Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. Build-Depends: zlib, libpng, pixman, glib, freetype, fontconfig diff --git a/ports/celero/CONTROL b/ports/celero/CONTROL index 2afd57484..aa90dad66 100644 --- a/ports/celero/CONTROL +++ b/ports/celero/CONTROL @@ -1,3 +1,3 @@ Source: celero -Version: 2.4.0 +Version: 2.4.0-1 Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++. diff --git a/ports/celero/portfile.cmake b/ports/celero/portfile.cmake index f9288fb8e..61dbec10e 100644 --- a/ports/celero/portfile.cmake +++ b/ports/celero/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO DigitalInBlue/Celero - REF v2.4.0 - SHA512 4ba9f26bcda85bea00de27a6e8166f874f2c3852f74c54c089373caf71e1c066ac771fda73799d84c4c7a20986a71fd7a3b101b7b8972b9797ab3e8ed7918c30 + REF 9f41c21e35b04d7d65dcb0aff4c962f6e5f2cbc3 + SHA512 62a4803e61cf9e876c09cc68be07d4bfa31f291d3ced23e092347bf43b48086b3ba7862fc454082f42263d9ec0c260e8ba58da5c0c461ebff9c871209784e2a7 HEAD_REF master ) diff --git a/ports/docopt/CONTROL b/ports/docopt/CONTROL index 0fc6d09c8..b6599438c 100644 --- a/ports/docopt/CONTROL +++ b/ports/docopt/CONTROL @@ -1,3 +1,3 @@ Source: docopt -Version: 2018-04-16-2 +Version: 2018-11-01 Description: Command line arguments parser that will make you smile (C++11 port). diff --git a/ports/docopt/portfile.cmake b/ports/docopt/portfile.cmake index 5076bf742..ec3a764d6 100644 --- a/ports/docopt/portfile.cmake +++ b/ports/docopt/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO docopt/docopt.cpp - REF 4f491249e6def236937dbfac7602852e7d99aff8 - SHA512 d3a61f8d8a8c11723064f3405f03eb838a2ac9aa574f86771b1db89a2dd81996b639215fe5d4465343b893bf71502da178c7af8d883c112c1e45f43c17d473b7 + REF 7476f8e56b4650aaeafb4e1cda2e5d8f01fddd97 + SHA512 6765e8a3a834ad75bd87effee5ac7e174482039d26015346b95d7d64e4e0097cc3f1f2e6fd9e3e5970bf4c5719095c0a3e5edfac18217913dc88fbe569d37ae8 HEAD_REF master PATCHES 001-fix-unresolved-symbol.patch diff --git a/ports/geogram/CONTROL b/ports/geogram/CONTROL index 687174914..7b19ca9cf 100644 --- a/ports/geogram/CONTROL +++ b/ports/geogram/CONTROL @@ -1,5 +1,5 @@ Source: geogram -Version: 1.6.4 +Version: 1.6.9-2 Description: Geogram is a programming library of geometric algorithms. Build-Depends: openblas, clapack diff --git a/ports/geogram/fix-cmake-config-and-install.patch b/ports/geogram/fix-cmake-config-and-install.patch index f5d933586..2c7790923 100644 --- a/ports/geogram/fix-cmake-config-and-install.patch +++ b/ports/geogram/fix-cmake-config-and-install.patch @@ -3,7 +3,7 @@ index 17dc02e..e489d75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ set(VORPALINE_VERSION_MINOR 6) - set(VORPALINE_VERSION_PATCH 4) + set(VORPALINE_VERSION_PATCH 9) set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH}) -set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR}) diff --git a/ports/geogram/portfile.cmake b/ports/geogram/portfile.cmake index 17060723f..46709f6c3 100644 --- a/ports/geogram/portfile.cmake +++ b/ports/geogram/portfile.cmake @@ -1,64 +1,48 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/geogram_1.6.4) +set(GEOGRAM_VERSION 1.6.9) + vcpkg_download_distfile(ARCHIVE - URLS "https://gforge.inria.fr/frs/download.php/file/37525/geogram_1.6.4.tar.gz" - FILENAME "geogram_1.6.4.tar.gz" - SHA512 a89b824cc7c055b7d0a5882e2f1922f09729f6eed5ed656136e8375e9b414e286fdbc5372fdb69b1ea5ce340dc81231db0228974b997be805043227de3c341b8 + URLS "https://gforge.inria.fr/frs/download.php/file/37779/geogram_${GEOGRAM_VERSION}.tar.gz" + FILENAME "geogram_${GEOGRAM_VERSION}.tar.gz" + SHA512 1b5c7540bef734c1908f213f26780aba63b4911a8022d5eb3f7c90eabe2cb69efd1f298b30cdc8e2c636a5b37c8c25832dd4aad0b7c2ff5f0a5b5caa17970136 ) -vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-cmake-config-and-install.patch + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GEOGRAM_VERSION} + PATCHES fix-cmake-config-and-install.patch ) +file(COPY ${CURRENT_PORT_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/cmake) + set(GEOGRAM_WITH_GRAPHICS OFF) if("graphics" IN_LIST FEATURES) set(GEOGRAM_WITH_GRAPHICS ON) endif() -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - # PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - -DVORPALINE_BUILD_DYNAMIC=FALSE - -DGEOGRAM_WITH_GRAPHICS=${GEOGRAM_WITH_GRAPHICS} - -DGEOGRAM_LIB_ONLY=ON - -DGEOGRAM_USE_SYSTEM_GLFW3=ON - -DVORPALINE_PLATFORM=Win-vs-generic - -DGEOGRAM_WITH_VORPALINE=OFF - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 - ) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(VORPALINE_BUILD_DYNAMIC FALSE) + set(VORPALINE_PLATFORM Win-vs-generic) else() - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - # PREFER_NINJA # Disable this option if project cannot be built with Ninja - OPTIONS - -DVORPALINE_BUILD_DYNAMIC=TRUE - -DGEOGRAM_WITH_GRAPHICS=${GEOGRAM_WITH_GRAPHICS} - -DGEOGRAM_LIB_ONLY=ON - -DGEOGRAM_USE_SYSTEM_GLFW3=ON - -DVORPALINE_PLATFORM=Win-vs-dynamic-generic - -DGEOGRAM_WITH_VORPALINE=OFF - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 - ) + set(VORPALINE_BUILD_DYNAMIC TRUE) + set(VORPALINE_PLATFORM Win-vs-dynamic-generic) endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + # Geogram cannot be built with ninja because it embeds $(Configuration) in some of the generated paths. These require MSBuild in order to be evaluated. + #PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DVORPALINE_BUILD_DYNAMIC=${VORPALINE_BUILD_DYNAMIC} + -DGEOGRAM_WITH_GRAPHICS=${GEOGRAM_WITH_GRAPHICS} + -DGEOGRAM_LIB_ONLY=ON + -DGEOGRAM_USE_SYSTEM_GLFW3=ON + -DVORPALINE_PLATFORM=${VORPALINE_PLATFORM} + -DGEOGRAM_WITH_VORPALINE=OFF +) + vcpkg_install_cmake() vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets(CONFIG_PATH "share/geogram") diff --git a/ports/glbinding/CONTROL b/ports/glbinding/CONTROL index d225e60c8..9671eda4b 100644 --- a/ports/glbinding/CONTROL +++ b/ports/glbinding/CONTROL @@ -1,3 +1,3 @@ Source: glbinding -Version: 3.0.2-3 +Version: 3.0.2-4 Description: glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API diff --git a/ports/glbinding/portfile.cmake b/ports/glbinding/portfile.cmake index 64063bc73..d7a896723 100644 --- a/ports/glbinding/portfile.cmake +++ b/ports/glbinding/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO cginternals/glbinding - REF v3.0.2 - SHA512 524ad20a11af7d8ee1764f53326b43efb3b3dbd6c64d1539f4d9fa2bcb7b58a6bd6caf460d6944aed4fd7439b82536d8f28a0f0f51c14c62c2f0c73baab9afcb + REF d7a1873ad741fb13a9c6dcbae93d0cda45a11933 + SHA512 70848d8ddad3e2ddfc54549ed3cdde569991858135140b30b50fa6e92c5aec6e3dd235418e091456f9b68da2fad09fbef117dedac7b48c26bcab62b6f0fa791f HEAD_REF master PATCHES force-system-install.patch ) diff --git a/ports/google-cloud-cpp/CONTROL b/ports/google-cloud-cpp/CONTROL index 7a64d2e14..5689f78bb 100644 --- a/ports/google-cloud-cpp/CONTROL +++ b/ports/google-cloud-cpp/CONTROL @@ -1,4 +1,4 @@ Source: google-cloud-cpp
-Version: 0.3.0-1
+Version: 0.4.0
Build-Depends: grpc, gtest, curl, crc32c
Description: C++ Client Libraries for Google Cloud Platform APIs.
diff --git a/ports/google-cloud-cpp/portfile.cmake b/ports/google-cloud-cpp/portfile.cmake index 2081b20f7..54fa6d483 100644 --- a/ports/google-cloud-cpp/portfile.cmake +++ b/ports/google-cloud-cpp/portfile.cmake @@ -8,8 +8,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO GoogleCloudPlatform/google-cloud-cpp - REF v0.3.0 - SHA512 90f876ebf4bea40c5bc12d2bd20d27b48202f951d57a68b657c07b7d468b2ac5a00e39a3a6fca48f92030d89ba7d9706eb52b3c8e734b392aee63632af042b5d + REF v0.4.0 + SHA512 2198a7e055c37c2a0d782e2226c2cfb4009e01c36783fe23a0a32b10c7800c1998fbaea17281cb831e7b58975d1bcdb1b2bfec0a5e4fd9d08f25299b96e8893a HEAD_REF master PATCHES include-protobuf.patch ) diff --git a/ports/graphqlparser/CONTROL b/ports/graphqlparser/CONTROL index 4a66842c0..0f6ed481e 100644 --- a/ports/graphqlparser/CONTROL +++ b/ports/graphqlparser/CONTROL @@ -1,3 +1,3 @@ Source: graphqlparser
-Version: v0.7.0
+Version: 0.7.0
Description: A GraphQL query parser in C++ with C and C++ APIs
diff --git a/ports/graphqlparser/portfile.cmake b/ports/graphqlparser/portfile.cmake index 0e1414583..6e175fe6b 100644 --- a/ports/graphqlparser/portfile.cmake +++ b/ports/graphqlparser/portfile.cmake @@ -1,15 +1,3 @@ -# Common Ambient Variables:
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
-# PORT = current port name (zlib, etc)
-# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
-# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
-# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
-#
-
include(vcpkg_common_functions)
vcpkg_from_github(
@@ -18,7 +6,7 @@ vcpkg_from_github( REF v0.7.0
SHA512 973292b164d0d2cfe453a2f01559dbdb1b9d22b6304f6a3aabf71e2c0a3e24ab69dfd72a086764ad5befecf0005620f8e86f552dacc324f9615a05f31de7cede
HEAD_REF master
- PATCHES ${CMAKE_CURRENT_LIST_DIR}/win-cmake.patch
+ PATCHES win-cmake.patch
)
if(UNIX)
@@ -28,7 +16,7 @@ if(UNIX) )
elseif(WIN32)
vcpkg_find_acquire_program(PYTHON2)
- vcpkg_find_acquire_program(FLEX)
+ vcpkg_find_acquire_program(FLEX) #
vcpkg_find_acquire_program(BISON)
get_filename_component(VCPKG_DOWNLOADS_PYTHON2_DIR "${PYTHON2}" DIRECTORY)
@@ -47,5 +35,7 @@ endif() vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/graphqlparser RENAME copyright)
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/graphqlparser/copyright COPYONLY)
diff --git a/ports/graphqlparser/win-cmake.patch b/ports/graphqlparser/win-cmake.patch index c71ba97ff..bd2f4c7c1 100644 --- a/ports/graphqlparser/win-cmake.patch +++ b/ports/graphqlparser/win-cmake.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index c4c8b3e..f19cda3 100644 +index c4c8b3e..3373d82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -3,16 +3,37 @@ PROJECT(libgraphqlparser C CXX) +@@ -3,9 +3,26 @@ PROJECT(libgraphqlparser C CXX) SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") @@ -31,19 +31,7 @@ index c4c8b3e..f19cda3 100644 FIND_PACKAGE(PythonInterp 2 REQUIRED) IF (NOT PYTHON_VERSION_MAJOR EQUAL 2) - MESSAGE(FATAL_ERROR "Python 2 is required.") - ENDIF() - --FIND_PROGRAM(CTYPESGEN_FOUND ctypesgen.py) -+IF(UNIX) -+ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h") -+ELSEIF(WIN32) -+ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h --wincompat") -+ENDIF() - - FIND_PACKAGE(BISON 3) - FIND_PACKAGE(FLEX) -@@ -21,7 +42,7 @@ IF (BISON_FOUND) +@@ -21,7 +38,7 @@ IF (BISON_FOUND) ENDIF() IF(FLEX_FOUND) @@ -52,20 +40,27 @@ index c4c8b3e..f19cda3 100644 IF (BISON_FOUND) ADD_FLEX_BISON_DEPENDENCY(GraphQLScanner graphqlparser) ENDIF() -@@ -83,11 +104,8 @@ GENERATE_AST_FILE(cxx_json_visitor_header JsonVisitor.h.inc) +@@ -31,7 +48,7 @@ FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/c) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) - GENERATE_AST_FILE(cxx_json_visitor_impl JsonVisitor.cpp.inc) +-ADD_LIBRARY(graphqlparser SHARED ++ADD_LIBRARY(graphqlparser + JsonVisitor.cpp + ${CMAKE_CURRENT_BINARY_DIR}/Ast.h + ${CMAKE_CURRENT_BINARY_DIR}/Ast.cpp +@@ -87,7 +104,9 @@ ADD_SUBDIRECTORY(python) --ADD_SUBDIRECTORY(python) -- --OPTION(test "Build tests." OFF) -- - INSTALL(DIRECTORY c ${CMAKE_CURRENT_BINARY_DIR}/c DESTINATION include/graphqlparser + OPTION(test "Build tests." OFF) + +-INSTALL(DIRECTORY c ${CMAKE_CURRENT_BINARY_DIR}/c DESTINATION include/graphqlparser ++INSTALL(DIRECTORY c ${CMAKE_CURRENT_BINARY_DIR}/c ++ DESTINATION include/graphqlparser + CONFIGURATIONS Release FILES_MATCHING PATTERN "*.h" PATTERN "build" EXCLUDE) -@@ -103,9 +121,12 @@ INSTALL(FILES +@@ -103,9 +122,13 @@ INSTALL(FILES position.hh stack.hh syntaxdefs.h @@ -75,12 +70,13 @@ index c4c8b3e..f19cda3 100644 + INSTALL(TARGETS graphqlparser - LIBRARY DESTINATION lib) ++ ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin) if (UNIX) # generate pkgconfig file -@@ -116,16 +137,9 @@ if (UNIX) +@@ -116,6 +139,11 @@ if (UNIX) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libgraphqlparser.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") endif() @@ -90,15 +86,15 @@ index c4c8b3e..f19cda3 100644 + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.pdb + DESTINATION bin) endif() + + IF (test) +@@ -126,6 +154,8 @@ IF (test) + ADD_CUSTOM_TARGET(memcheck + valgrind --leak-check=full --suppressions=./test/valgrind.supp --dsymutil=yes --error-exitcode=1 ./test/runTests >/dev/null + ) ++ else() ++ ADD_CUSTOM_TARGET(runTests ++ ./test/runTests >/dev/null) + endif() - --IF (test) -- ADD_SUBDIRECTORY(test) -- -- if(UNIX) -- # setup valgrind -- ADD_CUSTOM_TARGET(memcheck -- valgrind --leak-check=full --suppressions=./test/valgrind.supp --dsymutil=yes --error-exitcode=1 ./test/runTests >/dev/null -- ) -- endif() -- --ENDIF() + ENDIF() diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index f3c58ee6e..32d70f5ec 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,5 +1,5 @@ Source: harfbuzz -Version: 1.8.4-2 +Version: 1.8.4-3 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, ragel Default-Features: ucdn diff --git a/ports/harfbuzz/glib-cmake.patch b/ports/harfbuzz/glib-cmake.patch index cdd7f48a6..ddbc96712 100644 --- a/ports/harfbuzz/glib-cmake.patch +++ b/ports/harfbuzz/glib-cmake.patch @@ -1,8 +1,8 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3c52731..8305f27 100644 +index 2d6e77e8..36e4b4e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -314,22 +314,12 @@ endif () +@@ -306,22 +306,14 @@ endif () if (HB_HAVE_GLIB) add_definitions(-DHAVE_GLIB) @@ -15,6 +15,8 @@ index 3c52731..8305f27 100644 - find_path(GLIB_INCLUDE_DIR NAMES glib.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0) - - include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR}) ++ find_package(Threads REQUIRED) ++ find_package(unofficial-iconv REQUIRED) + find_package(unofficial-glib CONFIG REQUIRED) list(APPEND project_sources ${PROJECT_SOURCE_DIR}/src/hb-glib.cc) diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index 8f310b04f..46d927c9e 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,3 +1,3 @@ Source: imgui -Version: 1.66 +Version: 1.66b Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 8f5452042..756574d76 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF v1.66 - SHA512 85d41e6fa2141da87b72e5c39d23fe285bea086d6dd758a5ec048a495c29bbcf0a49ee1e9f442d5db3452fd0f28d1e52a2c41b5402cbbaa3ad6612818aaea670 + REF v1.66b + SHA512 894339a70f99c517d9306c49d861a43710b936e71067ddd322f5e771396f8e658a541111fcb00ce9010599f0ec9702d029d18b155199c7635129fd659ac13dbc HEAD_REF master ) diff --git a/ports/itk/CONTROL b/ports/itk/CONTROL index f4b29af94..a2cc426e8 100644 --- a/ports/itk/CONTROL +++ b/ports/itk/CONTROL @@ -1,4 +1,8 @@ Source: itk Version: 4.13.0 Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis. -Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat +Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, hdf5[cpp] + +Feature: vtk +Description: Build ITKVtkGlue module. +Build-Depends: vtk diff --git a/ports/itk/portfile.cmake b/ports/itk/portfile.cmake index 1fea599d8..b42d8be75 100644 --- a/ports/itk/portfile.cmake +++ b/ports/itk/portfile.cmake @@ -8,9 +8,19 @@ vcpkg_from_github( HEAD_REF master ) +if ("vtk" IN_LIST FEATURES) + set(ITKVtkGlue ON ) +else() + set(ITKVtkGlue OFF ) +endif() + # directory path length needs to be shorter than 50 characters -file(RENAME ${SOURCE_PATH} ${CURRENT_BUILDTREES_DIR}/ITK) -set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/ITK") +set(ITK_BUILD_DIR ${CURRENT_BUILDTREES_DIR}/ITK) +if(EXISTS ${ITK_BUILD_DIR}) + file(REMOVE_RECURSE ${ITK_BUILD_DIR}) +endif() +file(RENAME ${SOURCE_PATH} ${ITK_BUILD_DIR}) +set(SOURCE_PATH "${ITK_BUILD_DIR}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -41,9 +51,9 @@ vcpkg_configure_cmake( #-DITK_PYTHON_VERSION=3 # HDF5 must NOT be installed, otherwise it causes: ...\installed\x64-windows-static\include\H5Tpkg.h(25): fatal error C1189: #error: "Do not include this file outside the H5T package!" - -DITK_USE_SYSTEM_HDF5=OFF # if ON, causes: ...\buildtrees\itk\x64-windows-static-rel\Modules\ThirdParty\HDF5\src\itk_H5Cpp.h(25): fatal error C1083: Cannot open include file: 'H5Cpp.h': No such file or directory + -DITK_USE_SYSTEM_HDF5=ON # if ON, causes: ...\buildtrees\itk\x64-windows-static-rel\Modules\ThirdParty\HDF5\src\itk_H5Cpp.h(25): fatal error C1083: Cannot open include file: 'H5Cpp.h': No such file or directory - # -DModule_ITKVtkGlue=ON # this option requires VTK to be a dependency in CONTROL file. VTK depends on HDF5! + -DModule_ITKVtkGlue=${ITKVtkGlue} # this option requires VTK to be a dependency in CONTROL file. VTK depends on HDF5! -DModule_IOSTL=ON # example how to turn on a non-default module -DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module -DModule_RLEImage=ON # example how to turn on a remote module diff --git a/ports/libcopp/CONTROL b/ports/libcopp/CONTROL new file mode 100644 index 000000000..35fca9b7e --- /dev/null +++ b/ports/libcopp/CONTROL @@ -0,0 +1,3 @@ +Source: libcopp +Version: 1.1.0-1 +Description: A cross-platfrom coroutine library for C++ diff --git a/ports/libcopp/portfile.cmake b/ports/libcopp/portfile.cmake new file mode 100644 index 000000000..85b2de09c --- /dev/null +++ b/ports/libcopp/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO owt5008137/libcopp + REF 1.1.0 + SHA512 27b444d158281786154830c6e216e701ba0301af1d7a08873b33e27ce3d2db6ddb4753239878633f4c2aed9f759b46f961408a2eb7b50b5d445c3531c1fa9546 + HEAD_REF v2 +) + +# Use libcopp's own build process, skipping examples and tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + # PREFER_NINJA # Disabled because Ninja does not invoke masm correctly for this project +) +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libcopp) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp) +file(COPY ${SOURCE_PATH}/BOOST_LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcopp/copyright) + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/libcopp/usage b/ports/libcopp/usage new file mode 100644 index 000000000..4593a42ad --- /dev/null +++ b/ports/libcopp/usage @@ -0,0 +1,5 @@ +The package libcopp provides CMake integration:
+
+ find_package(Libcopp CONFIG REQUIRED)
+ target_include_directories(main PRIVATE ${Libcopp_INCLUDE_DIRS})
+ target_link_libraries(main PRIVATE ${Libcotask_LIBRARIES} ${Libcopp_LIBRARIES})
diff --git a/ports/libpng-apng/CONTROL b/ports/libpng-apng/CONTROL index f4ea530fe..81db06eee 100644 --- a/ports/libpng-apng/CONTROL +++ b/ports/libpng-apng/CONTROL @@ -1,4 +1,4 @@ Source: libpng-apng -Version: 1.6.34-2 +Version: 1.6.36-1 Build-Depends: zlib Description: libpng-apng is a library implementing an interface for reading and writing (A)PNG ((Animated) Portable Network Graphics) format files. This is backward compatible with the regular libpng, both in library usage and format. diff --git a/ports/libpng-apng/portfile.cmake b/ports/libpng-apng/portfile.cmake index b1ec137a8..948b0a2f3 100644 --- a/ports/libpng-apng/portfile.cmake +++ b/ports/libpng-apng/portfile.cmake @@ -1,19 +1,19 @@ include(vcpkg_common_functions) -set(LIBPNG_APNG_VERSION 1.6.34) +set(LIBPNG_APNG_VERSION 1.6.36) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO glennrp/libpng REF v${LIBPNG_APNG_VERSION} - SHA512 23b6112a1d16a34c8037d5c5812944d4385fc96ed819a22172776bdd5acd3a34e55f073b46087b77d1c12cecc68f9e8ba7754c86b5ab6ed3016063e1c795de7a + SHA512 aeb00b48347c9e84d31995b3fe7e40580029734aa8103d774eee5745f5ca1fd1fd91a15f32d492277ab94346e4e7f731ee9bfea1783f930094f9f87eb3d9397d HEAD_REF master ) vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${LIBPNG_APNG_VERSION}/libpng-${LIBPNG_APNG_VERSION}-apng.patch.gz" FILENAME "libpng-${LIBPNG_APNG_VERSION}-apng.patch.gz" - SHA512 0777b8e55aeee207ee92479f2258ef1f60f16d7951fdbc6d89a80ef533b86dadecd1ef659d6fe7602d8ea3a8e711a096b0f77ee09b993799b73dfffddfe5dd3c + SHA512 8fa213204768b058459ffd5eae6b3661c3f185d3baf1913da4337e7b7855e567f2525e7f67411c32fa8cb177a5f93d538c3d0ce17a94d4aa71bd9cffabe8b311 ) vcpkg_find_acquire_program(7Z) @@ -35,6 +35,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch + ${CMAKE_CURRENT_LIST_DIR}/skip-install-symlink.patch ${CURRENT_BUILDTREES_DIR}/src/libpng-${LIBPNG_APNG_VERSION}-apng.patch ) @@ -57,15 +58,20 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_PROGRAMS=ON -DSKIP_INSTALL_EXECUTABLES=ON -DSKIP_INSTALL_FILES=ON + -DSKIP_INSTALL_SYMLINK=ON OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) + endif() endif() # Remove CMake config files as they are incorrectly generated and everyone uses built-in FindPNG anyway. @@ -76,3 +82,7 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/share/libpng-apng/LICENSE ${CURRENT_PACKAGES vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/png) +endif() diff --git a/ports/libpng-apng/skip-install-symlink.patch b/ports/libpng-apng/skip-install-symlink.patch new file mode 100644 index 000000000..c25075941 --- /dev/null +++ b/ports/libpng-apng/skip-install-symlink.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 48c6fa2..589e5f9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -853,7 +853,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+- if(PNG_SHARED)
++ if(PNG_SHARED AND NOT SKIP_INSTALL_SYMLINK)
+ # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
+ if(CYGWIN OR MINGW)
+ create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
+@@ -868,7 +868,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+ endif()
+ endif()
+
+- if(PNG_STATIC)
++ if(PNG_STATIC AND NOT SKIP_INSTALL_SYMLINK)
+ if(NOT WIN32 OR CYGWIN OR MINGW)
+ create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static)
+ install(FILES $<TARGET_LINKER_FILE_DIR:png_static>/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
diff --git a/ports/libpng-apng/use-abort-on-all-platforms.patch b/ports/libpng-apng/use-abort-on-all-platforms.patch index 0a629e059..ef21211c6 100644 --- a/ports/libpng-apng/use-abort-on-all-platforms.patch +++ b/ports/libpng-apng/use-abort-on-all-platforms.patch @@ -2,7 +2,7 @@ diff --git a/pngpriv.h b/pngpriv.h index fe3355d..5a049b5 100644 --- a/pngpriv.h +++ b/pngpriv.h -@@ -457,11 +457,7 @@ +@@ -556,11 +556,7 @@ /* Memory model/platform independent fns */ #ifndef PNG_ABORT diff --git a/ports/libpng-apng/vcpkg-cmake-wrapper.cmake b/ports/libpng-apng/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..cb9c74f32 --- /dev/null +++ b/ports/libpng-apng/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a")
+ set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a" CACHE FILEPATH "")
+elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}")
+ set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE FILEPATH "")
+endif()
+_find_package(${ARGS})
diff --git a/ports/libuv/CMakeLists.txt b/ports/libuv/CMakeLists.txt index c4b7c3882..0f46ec07e 100644 --- a/ports/libuv/CMakeLists.txt +++ b/ports/libuv/CMakeLists.txt @@ -60,7 +60,7 @@ else() # Assume some Linux variant add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_LINUX}) endif() -target_include_directories(libuv PUBLIC ./include PRIVATE ./src) +target_include_directories(libuv PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>) set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED) if(NOT UV_SKIP_HEADERS) @@ -71,7 +71,9 @@ if(NOT UV_SKIP_HEADERS) endif() install(TARGETS libuv + EXPORT libuv RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) +install(EXPORT libuv FILE unofficial-libuv-targets.cmake NAMESPACE unofficial::libuv:: DESTINATION share/unofficial-libuv) diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index e90eaa545..7a8a79098 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.24.0 +Version: 1.24.0-1 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 782d946c3..76077fc3d 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -18,8 +18,15 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-libuv TARGET_PATH share/unofficial-libuv) vcpkg_copy_pdbs() +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/unofficial-libuv-config.in.cmake + ${CURRENT_PACKAGES_DIR}/share/unofficial-libuv/unofficial-libuv-config.cmake + @ONLY +) + file(READ ${CURRENT_PACKAGES_DIR}/include/uv.h UV_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") string(REPLACE "defined(USING_UV_SHARED)" "1" UV_H "${UV_H}") diff --git a/ports/libuv/unofficial-libuv-config.in.cmake b/ports/libuv/unofficial-libuv-config.in.cmake new file mode 100644 index 000000000..7ff66b12c --- /dev/null +++ b/ports/libuv/unofficial-libuv-config.in.cmake @@ -0,0 +1,7 @@ +
+if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32)
+ include(CMakeFindDependencyMacro)
+ find_dependency(Threads)
+endif()
+
+include(${CMAKE_CURRENT_LIST_DIR}/unofficial-libuv-targets.cmake)
diff --git a/ports/nanodbc/0001_cmake.patch b/ports/nanodbc/0001_cmake.patch deleted file mode 100644 index 36d57be0e..000000000 --- a/ports/nanodbc/0001_cmake.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9f4aa71..94edd95 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -201,9 +201,16 @@ endif() - if(NANODBC_INSTALL) - install(FILES src/nanodbc.h DESTINATION include) - if(NANODBC_STATIC) -- install(TARGETS nanodbc ARCHIVE DESTINATION lib) -+ install( -+ TARGETS nanodbc -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib) - else() -- install(TARGETS nanodbc LIBRARY DESTINATION lib) -+ install( -+ TARGETS nanodbc -+ ARCHIVE DESTINATION lib -+ LIBRARY DESTINATION lib -+ RUNTIME DESTINATION bin) - endif() - message(STATUS "Target install: Turned on") - else() diff --git a/ports/nanodbc/0002_msvc14_codecvt.patch b/ports/nanodbc/0002_msvc14_codecvt.patch deleted file mode 100644 index ae499bcf9..000000000 --- a/ports/nanodbc/0002_msvc14_codecvt.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/src/nanodbc.cpp b/src/nanodbc.cpp -index 8e02d4a..2e42b91 100644 ---- a/src/nanodbc.cpp -+++ b/src/nanodbc.cpp -@@ -209,10 +209,11 @@ namespace - out = utf_to_utf<char>(in.c_str(), in.c_str() + in.size()); - #else - #if defined(_MSC_VER) && (_MSC_VER == 1900) -- // Workaround for confirmed bug in VS2015. -- // See: https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error -- auto p = reinterpret_cast<wide_char_t const*>(in.data()); -- out = std::wstring_convert<NANODBC_CODECVT_TYPE<wide_char_t>, wide_char_t>().to_bytes(p, p + in.size()); -+ // Workaround for confirmed bug in VS2015. See: -+ // https://connect.microsoft.com/VisualStudio/Feedback/Details/1403302 -+ // https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error -+ auto p = reinterpret_cast<unsigned short const*>(in.data()); -+ out = std::wstring_convert<NANODBC_CODECVT_TYPE<unsigned short>, unsigned short>().to_bytes(p, p + in.size()); - #else - out = std::wstring_convert<NANODBC_CODECVT_TYPE<wide_char_t>, wide_char_t>().to_bytes(in); - #endif -@@ -226,9 +227,10 @@ namespace - using boost::locale::conv::utf_to_utf; - out = utf_to_utf<wide_char_t>(in.c_str(), in.c_str() + in.size()); - #elif defined(_MSC_VER) && (_MSC_VER == 1900) -- // Workaround for confirmed bug in VS2015. -- // See: https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error -- auto s = std::wstring_convert<NANODBC_CODECVT_TYPE<wide_char_t>, wide_char_t>().from_bytes(in); -+ // Workaround for confirmed bug in VS2015. See: -+ // https://connect.microsoft.com/VisualStudio/Feedback/Details/1403302 -+ // https://social.msdn.microsoft.com/Forums/en-US/8f40dcd8-c67f-4eba-9134-a19b9178e481/vs-2015-rc-linker-stdcodecvt-error -+ auto s = std::wstring_convert<NANODBC_CODECVT_TYPE<unsigned short>, unsigned short>().from_bytes(in); - auto p = reinterpret_cast<wide_char_t const*>(s.data()); - out.assign(p, p + s.size()); - #else diff --git a/ports/nanodbc/0003_export_def.patch b/ports/nanodbc/0003_export_def.patch deleted file mode 100644 index 3dd3649ae..000000000 --- a/ports/nanodbc/0003_export_def.patch +++ /dev/null @@ -1,417 +0,0 @@ -diff --git a/src/nanodbc.cpp b/src/nanodbc.cpp -index 8e02d4a..0483660 100644 ---- a/src/nanodbc.cpp -+++ b/src/nanodbc.cpp -@@ -3253,10 +3253,10 @@ unsigned long statement::parameter_size(short param) const - - // We need to instantiate each form of bind() for each of our supported data types. - #define NANODBC_INSTANTIATE_BINDS(type) \ -- template void statement::bind(short, const type*, param_direction); /* 1-ary */ \ -- template void statement::bind(short, const type*, std::size_t, param_direction); /* n-ary */ \ -- template void statement::bind(short, const type*, std::size_t, const type*, param_direction); /* n-ary, sentry */ \ -- template void statement::bind(short, const type*, std::size_t, const bool*, param_direction) /* n-ary, flags */ \ -+ template NANODBC_API void statement::bind(short, const type*, param_direction); /* 1-ary */ \ -+ template NANODBC_API void statement::bind(short, const type*, std::size_t, param_direction); /* n-ary */ \ -+ template NANODBC_API void statement::bind(short, const type*, std::size_t, const type*, param_direction); /* n-ary, sentry */ \ -+ template NANODBC_API void statement::bind(short, const type*, std::size_t, const bool*, param_direction) /* n-ary, flags */ \ - /**/ - - // The following are the only supported instantiations of statement::bind(). -@@ -3875,112 +3875,112 @@ result::operator bool() const - } - - // The following are the only supported instantiations of result::get_ref(). --template void result::get_ref(short, string_type::value_type&) const; --template void result::get_ref(short, short&) const; --template void result::get_ref(short, unsigned short&) const; --template void result::get_ref(short, int32_t&) const; --template void result::get_ref(short, uint32_t&) const; --template void result::get_ref(short, int64_t&) const; --template void result::get_ref(short, uint64_t&) const; --template void result::get_ref(short, float&) const; --template void result::get_ref(short, double&) const; --template void result::get_ref(short, string_type&) const; --template void result::get_ref(short, date&) const; --template void result::get_ref(short, timestamp&) const; -- --template void result::get_ref(const string_type&, string_type::value_type&) const; --template void result::get_ref(const string_type&, short&) const; --template void result::get_ref(const string_type&, unsigned short&) const; --template void result::get_ref(const string_type&, int32_t&) const; --template void result::get_ref(const string_type&, uint32_t&) const; --template void result::get_ref(const string_type&, int64_t&) const; --template void result::get_ref(const string_type&, uint64_t&) const; --template void result::get_ref(const string_type&, float&) const; --template void result::get_ref(const string_type&, double&) const; --template void result::get_ref(const string_type&, string_type&) const; --template void result::get_ref(const string_type&, date&) const; --template void result::get_ref(const string_type&, timestamp&) const; -+template NANODBC_API void result::get_ref(short, string_type::value_type&) const; -+template NANODBC_API void result::get_ref(short, short&) const; -+template NANODBC_API void result::get_ref(short, unsigned short&) const; -+template NANODBC_API void result::get_ref(short, int32_t&) const; -+template NANODBC_API void result::get_ref(short, uint32_t&) const; -+template NANODBC_API void result::get_ref(short, int64_t&) const; -+template NANODBC_API void result::get_ref(short, uint64_t&) const; -+template NANODBC_API void result::get_ref(short, float&) const; -+template NANODBC_API void result::get_ref(short, double&) const; -+template NANODBC_API void result::get_ref(short, string_type&) const; -+template NANODBC_API void result::get_ref(short, date&) const; -+template NANODBC_API void result::get_ref(short, timestamp&) const; -+ -+template NANODBC_API void result::get_ref(const string_type&, string_type::value_type&) const; -+template NANODBC_API void result::get_ref(const string_type&, short&) const; -+template NANODBC_API void result::get_ref(const string_type&, unsigned short&) const; -+template NANODBC_API void result::get_ref(const string_type&, int32_t&) const; -+template NANODBC_API void result::get_ref(const string_type&, uint32_t&) const; -+template NANODBC_API void result::get_ref(const string_type&, int64_t&) const; -+template NANODBC_API void result::get_ref(const string_type&, uint64_t&) const; -+template NANODBC_API void result::get_ref(const string_type&, float&) const; -+template NANODBC_API void result::get_ref(const string_type&, double&) const; -+template NANODBC_API void result::get_ref(const string_type&, string_type&) const; -+template NANODBC_API void result::get_ref(const string_type&, date&) const; -+template NANODBC_API void result::get_ref(const string_type&, timestamp&) const; - - // The following are the only supported instantiations of result::get_ref() with fallback. --template void result::get_ref(short, const string_type::value_type&, string_type::value_type&) const; --template void result::get_ref(short, const short&, short&) const; --template void result::get_ref(short, const unsigned short&, unsigned short&) const; --template void result::get_ref(short, const int32_t&, int32_t&) const; --template void result::get_ref(short, const uint32_t&, uint32_t&) const; --template void result::get_ref(short, const int64_t&, int64_t&) const; --template void result::get_ref(short, const uint64_t&, uint64_t&) const; --template void result::get_ref(short, const float&, float&) const; --template void result::get_ref(short, const double&, double&) const; --template void result::get_ref(short, const string_type&, string_type&) const; --template void result::get_ref(short, const date&, date&) const; --template void result::get_ref(short, const timestamp&, timestamp&) const; -- --template void result::get_ref(const string_type&, const string_type::value_type&, string_type::value_type&) const; --template void result::get_ref(const string_type&, const short&, short&) const; --template void result::get_ref(const string_type&, const unsigned short&, unsigned short&) const; --template void result::get_ref(const string_type&, const int32_t&, int32_t&) const; --template void result::get_ref(const string_type&, const uint32_t&, uint32_t&) const; --template void result::get_ref(const string_type&, const int64_t&, int64_t&) const; --template void result::get_ref(const string_type&, const uint64_t&, uint64_t&) const; --template void result::get_ref(const string_type&, const float&, float&) const; --template void result::get_ref(const string_type&, const double&, double&) const; --template void result::get_ref(const string_type&, const string_type&, string_type&) const; --template void result::get_ref(const string_type&, const date&, date&) const; --template void result::get_ref(const string_type&, const timestamp&, timestamp&) const; -+template NANODBC_API void result::get_ref(short, const string_type::value_type&, string_type::value_type&) const; -+template NANODBC_API void result::get_ref(short, const short&, short&) const; -+template NANODBC_API void result::get_ref(short, const unsigned short&, unsigned short&) const; -+template NANODBC_API void result::get_ref(short, const int32_t&, int32_t&) const; -+template NANODBC_API void result::get_ref(short, const uint32_t&, uint32_t&) const; -+template NANODBC_API void result::get_ref(short, const int64_t&, int64_t&) const; -+template NANODBC_API void result::get_ref(short, const uint64_t&, uint64_t&) const; -+template NANODBC_API void result::get_ref(short, const float&, float&) const; -+template NANODBC_API void result::get_ref(short, const double&, double&) const; -+template NANODBC_API void result::get_ref(short, const string_type&, string_type&) const; -+template NANODBC_API void result::get_ref(short, const date&, date&) const; -+template NANODBC_API void result::get_ref(short, const timestamp&, timestamp&) const; -+ -+template NANODBC_API void result::get_ref(const string_type&, const string_type::value_type&, string_type::value_type&) const; -+template NANODBC_API void result::get_ref(const string_type&, const short&, short&) const; -+template NANODBC_API void result::get_ref(const string_type&, const unsigned short&, unsigned short&) const; -+template NANODBC_API void result::get_ref(const string_type&, const int32_t&, int32_t&) const; -+template NANODBC_API void result::get_ref(const string_type&, const uint32_t&, uint32_t&) const; -+template NANODBC_API void result::get_ref(const string_type&, const int64_t&, int64_t&) const; -+template NANODBC_API void result::get_ref(const string_type&, const uint64_t&, uint64_t&) const; -+template NANODBC_API void result::get_ref(const string_type&, const float&, float&) const; -+template NANODBC_API void result::get_ref(const string_type&, const double&, double&) const; -+template NANODBC_API void result::get_ref(const string_type&, const string_type&, string_type&) const; -+template NANODBC_API void result::get_ref(const string_type&, const date&, date&) const; -+template NANODBC_API void result::get_ref(const string_type&, const timestamp&, timestamp&) const; - - // The following are the only supported instantiations of result::get(). --template string_type::value_type result::get(short) const; --template short result::get(short) const; --template unsigned short result::get(short) const; --template int32_t result::get(short) const; --template uint32_t result::get(short) const; --template int64_t result::get(short) const; --template uint64_t result::get(short) const; --template float result::get(short) const; --template double result::get(short) const; --template string_type result::get(short) const; --template date result::get(short) const; --template timestamp result::get(short) const; -- --template string_type::value_type result::get(const string_type&) const; --template short result::get(const string_type&) const; --template unsigned short result::get(const string_type&) const; --template int32_t result::get(const string_type&) const; --template uint32_t result::get(const string_type&) const; --template int64_t result::get(const string_type&) const; --template uint64_t result::get(const string_type&) const; --template float result::get(const string_type&) const; --template double result::get(const string_type&) const; --template string_type result::get(const string_type&) const; --template date result::get(const string_type&) const; --template timestamp result::get(const string_type&) const; -+template NANODBC_API string_type::value_type result::get(short) const; -+template NANODBC_API short result::get(short) const; -+template NANODBC_API unsigned short result::get(short) const; -+template NANODBC_API int32_t result::get(short) const; -+template NANODBC_API uint32_t result::get(short) const; -+template NANODBC_API int64_t result::get(short) const; -+template NANODBC_API uint64_t result::get(short) const; -+template NANODBC_API float result::get(short) const; -+template NANODBC_API double result::get(short) const; -+template NANODBC_API string_type result::get(short) const; -+template NANODBC_API date result::get(short) const; -+template NANODBC_API timestamp result::get(short) const; -+ -+template NANODBC_API string_type::value_type result::get(const string_type&) const; -+template NANODBC_API short result::get(const string_type&) const; -+template NANODBC_API unsigned short result::get(const string_type&) const; -+template NANODBC_API int32_t result::get(const string_type&) const; -+template NANODBC_API uint32_t result::get(const string_type&) const; -+template NANODBC_API int64_t result::get(const string_type&) const; -+template NANODBC_API uint64_t result::get(const string_type&) const; -+template NANODBC_API float result::get(const string_type&) const; -+template NANODBC_API double result::get(const string_type&) const; -+template NANODBC_API string_type result::get(const string_type&) const; -+template NANODBC_API date result::get(const string_type&) const; -+template NANODBC_API timestamp result::get(const string_type&) const; - - // The following are the only supported instantiations of result::get() with fallback. --template string_type::value_type result::get(short, const string_type::value_type&) const; --template short result::get(short, const short&) const; --template unsigned short result::get(short, const unsigned short&) const; --template int32_t result::get(short, const int32_t&) const; --template uint32_t result::get(short, const uint32_t&) const; --template int64_t result::get(short, const int64_t&) const; --template uint64_t result::get(short, const uint64_t&) const; --template float result::get(short, const float&) const; --template double result::get(short, const double&) const; --template string_type result::get(short, const string_type&) const; --template date result::get(short, const date&) const; --template timestamp result::get(short, const timestamp&) const; -- --template string_type::value_type result::get(const string_type&, const string_type::value_type&) const; --template short result::get(const string_type&, const short&) const; --template unsigned short result::get(const string_type&, const unsigned short&) const; --template int32_t result::get(const string_type&, const int32_t&) const; --template uint32_t result::get(const string_type&, const uint32_t&) const; --template int64_t result::get(const string_type&, const int64_t&) const; --template uint64_t result::get(const string_type&, const uint64_t&) const; --template float result::get(const string_type&, const float&) const; --template double result::get(const string_type&, const double&) const; --template string_type result::get(const string_type&, const string_type&) const; --template date result::get(const string_type&, const date&) const; --template timestamp result::get(const string_type&, const timestamp&) const; -+template NANODBC_API string_type::value_type result::get(short, const string_type::value_type&) const; -+template NANODBC_API short result::get(short, const short&) const; -+template NANODBC_API unsigned short result::get(short, const unsigned short&) const; -+template NANODBC_API int32_t result::get(short, const int32_t&) const; -+template NANODBC_API uint32_t result::get(short, const uint32_t&) const; -+template NANODBC_API int64_t result::get(short, const int64_t&) const; -+template NANODBC_API uint64_t result::get(short, const uint64_t&) const; -+template NANODBC_API float result::get(short, const float&) const; -+template NANODBC_API double result::get(short, const double&) const; -+template NANODBC_API string_type result::get(short, const string_type&) const; -+template NANODBC_API date result::get(short, const date&) const; -+template NANODBC_API timestamp result::get(short, const timestamp&) const; -+ -+template NANODBC_API string_type::value_type result::get(const string_type&, const string_type::value_type&) const; -+template NANODBC_API short result::get(const string_type&, const short&) const; -+template NANODBC_API unsigned short result::get(const string_type&, const unsigned short&) const; -+template NANODBC_API int32_t result::get(const string_type&, const int32_t&) const; -+template NANODBC_API uint32_t result::get(const string_type&, const uint32_t&) const; -+template NANODBC_API int64_t result::get(const string_type&, const int64_t&) const; -+template NANODBC_API uint64_t result::get(const string_type&, const uint64_t&) const; -+template NANODBC_API float result::get(const string_type&, const float&) const; -+template NANODBC_API double result::get(const string_type&, const double&) const; -+template NANODBC_API string_type result::get(const string_type&, const string_type&) const; -+template NANODBC_API date result::get(const string_type&, const date&) const; -+template NANODBC_API timestamp result::get(const string_type&, const timestamp&) const; - - } // namespace nanodbc - -diff --git a/src/nanodbc.h b/src/nanodbc.h -index f4e7b3d..2bfc6a8 100644 ---- a/src/nanodbc.h -+++ b/src/nanodbc.h -@@ -164,6 +164,16 @@ namespace nanodbc - #define NANODBC_NOEXCEPT noexcept - #endif - -+#pragma warning(disable: 4275) -+#pragma warning(disable: 4251) -+#ifdef nanodbc_EXPORTS -+ /* We are building this library */ -+ #define NANODBC_API __declspec(dllexport) -+#else -+ /* We are using this library */ -+ #define NANODBC_API __declspec(dllimport) -+#endif -+ - // 8888888888 888 888 888 888 d8b - // 888 888 888 888 888 Y8P - // 888 888 888 888 888 -@@ -188,16 +198,17 @@ namespace nanodbc - - //! \brief Type incompatible. - //! \see exceptions --class type_incompatible_error : public std::runtime_error -+class NANODBC_API type_incompatible_error : public std::runtime_error - { - public: - type_incompatible_error(); - const char* what() const NANODBC_NOEXCEPT; - }; - -+ - //! \brief Accessed null data. - //! \see exceptions --class null_access_error : public std::runtime_error -+class NANODBC_API null_access_error : public std::runtime_error - { - public: - null_access_error(); -@@ -206,7 +217,7 @@ public: - - //! \brief Index out of range. - //! \see exceptions --class index_range_error : public std::runtime_error -+class NANODBC_API index_range_error : public std::runtime_error - { - public: - index_range_error(); -@@ -215,7 +226,7 @@ public: - - //! \brief Programming logic error. - //! \see exceptions --class programming_error : public std::runtime_error -+class NANODBC_API programming_error : public std::runtime_error - { - public: - explicit programming_error(const std::string& info); -@@ -224,7 +235,7 @@ public: - - //! \brief General database error. - //! \see exceptions --class database_error : public std::runtime_error -+class NANODBC_API database_error : public std::runtime_error - { - public: - //! \brief Creates a runtime_error with a message describing the last ODBC error generated for the given handle and handle_type. -@@ -298,7 +309,7 @@ struct timestamp - //! \brief A resource for managing transaction commits and rollbacks. - //! - //! \attention You will want to use transactions if you are doing batch operations because it will prevent auto commits from occurring after each individual operation is executed. --class transaction -+class NANODBC_API transaction - { - public: - //! \brief Begin a transaction on the given connection object. -@@ -361,7 +372,7 @@ private: - // MARK: Statement - - - //! \brief Represents a statement on the database. --class statement -+class NANODBC_API statement - { - public: - //! \brief Provides support for retrieving output/return parameters. -@@ -734,7 +745,7 @@ private: - // MARK: Connection - - - //! \brief Manages and encapsulates ODBC resources such as the connection and environment handles. --class connection -+class NANODBC_API connection - { - public: - //! \brief Create new connection object, initially not connected. -@@ -903,7 +914,7 @@ class catalog; - //! - //! \see statement::execute(), statement::execute_direct() - //! \note result objects may be copied, however all copies will refer to the same underlying ODBC result set. --class result -+class NANODBC_API result - { - public: - //! Empty result set. -@@ -1023,7 +1034,7 @@ public: - //! \param column position. - //! \throws database_error, index_range_error, type_incompatible_error, null_access_error - template<class T> -- T get(short column) const; -+ T get(short column) const; - - //! \brief Gets data from the given column of the current rowset. - //! If the data is null, fallback is returned instead. -@@ -1139,7 +1150,7 @@ private: - // "Y88P" - // MARK: Catalog - - --class catalog -+class NANODBC_API catalog - { - public: - -@@ -1319,7 +1330,7 @@ private: - //! \return A result set object. - //! \attention You will want to use transactions if you are doing batch operations because it will prevent auto commits from occurring after each individual operation is executed. - //! \see open(), prepare(), execute(), result, transaction --result execute( -+result NANODBC_API execute( - connection& conn - , const string_type& query - , long batch_operations = 1 -@@ -1333,7 +1344,7 @@ result execute( - //! \return A result set object. - //! \attention You will want to use transactions if you are doing batch operations because it will prevent auto commits from occurring after each individual operation is executed. - //! \see open(), prepare(), execute(), result, transaction --void just_execute( -+void NANODBC_API just_execute( - connection& conn - , const string_type& query - , long batch_operations = 1 -@@ -1346,7 +1357,7 @@ void just_execute( - //! \return A result set object. - //! \attention You will want to use transactions if you are doing batch operations because it will prevent auto commits from occurring after each individual operation is executed. - //! \see open(), prepare(), execute(), result --result execute(statement& stmt, long batch_operations = 1); -+result NANODBC_API execute(statement& stmt, long batch_operations = 1); - - //! \brief Execute the previously prepared query now and without creating result object. - //! \param stmt The prepared statement that will be executed. -@@ -1355,7 +1366,7 @@ result execute(statement& stmt, long batch_operations = 1); - //! \return A result set object. - //! \attention You will want to use transactions if you are doing batch operations because it will prevent auto commits from occurring after each individual operation is executed. - //! \see open(), prepare(), execute(), result --void just_execute(statement& stmt, long batch_operations = 1); -+void NANODBC_API just_execute(statement& stmt, long batch_operations = 1); - - //! \brief Execute the previously prepared query now. - //! Executes within the context of a transaction object and commits the transaction directly after execution. -@@ -1364,7 +1375,7 @@ void just_execute(statement& stmt, long batch_operations = 1); - //! \throws database_error - //! \return A result set object. - //! \see open(), prepare(), execute(), result, transaction --result transact(statement& stmt, long batch_operations); -+result NANODBC_API transact(statement& stmt, long batch_operations); - - //! \brief Execute the previously prepared query now and without creating result object. - //! Executes within the context of a transaction object and commits the transaction directly after execution. -@@ -1373,7 +1384,7 @@ result transact(statement& stmt, long batch_operations); - //! \throws database_error - //! \return A result set object. - //! \see open(), prepare(), execute(), result, transaction --void just_transact(statement& stmt, long batch_operations); -+void NANODBC_API just_transact(statement& stmt, long batch_operations); - - //! \brief Prepares the given statement to execute on it associated connection. - //! If the statement is not open throws programming_error. -@@ -1382,7 +1393,7 @@ void just_transact(statement& stmt, long batch_operations); - //! \param timeout The number in seconds before query timeout. Default is 0 indicating no timeout. - //! \see open() - //! \throws database_error, programming_error --void prepare(statement& stmt, const string_type& query, long timeout = 0); -+void NANODBC_API prepare(statement& stmt, const string_type& query, long timeout = 0); - - //! @} - diff --git a/ports/nanodbc/0004_unicode.patch b/ports/nanodbc/0004_unicode.patch deleted file mode 100644 index a4def235c..000000000 --- a/ports/nanodbc/0004_unicode.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/src/nanodbc.cpp b/src/nanodbc.cpp -index 8e02d4a..c408af7 100644 ---- a/src/nanodbc.cpp -+++ b/src/nanodbc.cpp -@@ -90,7 +90,7 @@ - typedef std::u32string wide_string_type; - #define NANODBC_CODECVT_TYPE std::codecvt_utf8 - #else -- typedef std::u16string wide_string_type; -+ typedef std::wstring wide_string_type; - #define NANODBC_CODECVT_TYPE std::codecvt_utf8_utf16 - #endif - typedef wide_string_type::value_type wide_char_t; -diff --git a/src/nanodbc.h b/src/nanodbc.h -index f4e7b3d..bb7bacd 100644 ---- a/src/nanodbc.h -+++ b/src/nanodbc.h -@@ -127,13 +127,13 @@ namespace nanodbc - - //! @} - --// You must explicitly request Unicode support by defining NANODBC_USE_UNICODE at compile time. -+#define NANODBC_USE_UNICODE 1 - #ifndef DOXYGEN - #ifdef NANODBC_USE_UNICODE - #ifdef NANODBC_USE_IODBC_WIDE_STRINGS - typedef std::u32string string_type; - #else -- typedef std::u16string string_type; -+ typedef std::wstring string_type; - #endif - #else - typedef std::string string_type; diff --git a/ports/nanodbc/CONTROL b/ports/nanodbc/CONTROL index ef676937e..075bd4d82 100644 --- a/ports/nanodbc/CONTROL +++ b/ports/nanodbc/CONTROL @@ -1,3 +1,3 @@ Source: nanodbc -Version: 2.12.4-2 +Version: 2.12.4-3 Description: A small C++ wrapper for the native C ODBC API. diff --git a/ports/nanodbc/portfile.cmake b/ports/nanodbc/portfile.cmake index ff90b4b19..7014c7eac 100644 --- a/ports/nanodbc/portfile.cmake +++ b/ports/nanodbc/portfile.cmake @@ -2,33 +2,16 @@ include(vcpkg_common_functions) # Only static libraries are supported. # See https://github.com/nanodbc/nanodbc/issues/13 -if(VCPKG_USE_HEAD_VERSION) # v2.13 - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -else() # v2.12.4 - vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) -endif() - +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nanodbc/nanodbc - REF v2.12.4 - SHA512 b9a924516b2a777e5f1497774997672320548722ed53413b0a7ad5d503e2f8ca1099f5059a912b7aae410928f4c4edcdfd02e4cfbf415976cd222697b354b4e6 + REF fe1d590991da30dc9cb71676c4d80cb2d9acb49e + SHA512 9c7e638b15b3c7ce418374c22a76be4f3f5901e7736938a8b0549b312bb7fa80bc8d34b2a52242a5b94196bb0994481a36e043a4f71cdc1d9af778915d017ac2 HEAD_REF master ) -# Legacy, remove at release of v2.13 -if(NOT VCPKG_USE_HEAD_VERSION) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/0002_msvc14_codecvt.patch - ${CMAKE_CURRENT_LIST_DIR}/0003_export_def.patch - ${CMAKE_CURRENT_LIST_DIR}/0004_unicode.patch -) -endif() -# /Legacy - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS diff --git a/ports/pango/CMakeLists.txt b/ports/pango/CMakeLists.txt index 71b5f9fed..cc21d3eee 100644 --- a/ports/pango/CMakeLists.txt +++ b/ports/pango/CMakeLists.txt @@ -14,9 +14,11 @@ endif() add_definitions(-DHAVE_CONFIG_H) include_directories(. ./pango ${CMAKE_CURRENT_BINARY_DIR}) +if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") # find libintl find_path(LIBINTL_INCLUDE_DIR libintl.h) find_library(LIBINTL_LIBRARY NAMES libintl intl) +endif() # find glib find_path(GLIB_INCLUDE_DIR glib.h) diff --git a/ports/pango/CONTROL b/ports/pango/CONTROL index e7b365e0b..9b176290b 100644 --- a/ports/pango/CONTROL +++ b/ports/pango/CONTROL @@ -1,4 +1,4 @@ Source: pango
-Version: 1.40.11-2
+Version: 1.40.11-3
Description: Text and font handling library.
Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz[glib] (!windows-static)
diff --git a/ports/rapidstring/CONTROL b/ports/rapidstring/CONTROL new file mode 100644 index 000000000..e88c40ec2 --- /dev/null +++ b/ports/rapidstring/CONTROL @@ -0,0 +1,3 @@ +Source: rapidstring
+Version: 2018-08-03
+Description: rapidstring is maybe the fastest string library ever written in ANSI C.
diff --git a/ports/rapidstring/fix-cmake-install.patch b/ports/rapidstring/fix-cmake-install.patch new file mode 100644 index 000000000..624a71d2b --- /dev/null +++ b/ports/rapidstring/fix-cmake-install.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8543256..8ebce9c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,15 +1,26 @@ + cmake_minimum_required(VERSION 3.8 FATAL_ERROR) + project(rapidstring LANGUAGES C VERSION 0.1.0) + add_library(rapidstring INTERFACE) +-target_include_directories(rapidstring INTERFACE include) ++target_include_directories(rapidstring INTERFACE ++ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include> ++ $<INSTALL_INTERFACE:include>) + + include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/utility.cmake) + + # TODO: Installation. ++install(FILES include/rapidstring.h DESTINATION include) ++ ++install(TARGETS rapidstring EXPORT rapidstringConfig) ++ ++install(EXPORT rapidstringConfig ++ FILE unofficial-rapidstringConfig.cmake ++ NAMESPACE unofficial::rapidstring:: ++ DESTINATION share/cmake/rapidstring ++ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) + + if(BUILD_TESTING) + enable_testing() + endif() + +-add_subdirectory(test) +-add_subdirectory(benchmark) ++#add_subdirectory(test) ++#add_subdirectory(benchmark) diff --git a/ports/rapidstring/portfile.cmake b/ports/rapidstring/portfile.cmake new file mode 100644 index 000000000..2bce2d015 --- /dev/null +++ b/ports/rapidstring/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO boyerjohn/rapidstring
+ REF ee433955c1e9cacfaecbf53c0a13318ab5825bd4
+ SHA512 89e0656323d53dc3c47ba24ad9a032445b0985f21aaace05ea5bdbfb0ade5291193ac06145faf5984bcdff67c2a07a500109ce938174dbf1339fea2d79a6bd10
+ HEAD_REF master
+ PATCHES
+ fix-cmake-install.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_TESTING=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/rapidstring TARGET_PATH share/unofficial-rapidstring)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/rapidstring/copyright COPYONLY)
diff --git a/ports/sfgui/CONTROL b/ports/sfgui/CONTROL index 59a7cdab3..da3ee41a9 100644 --- a/ports/sfgui/CONTROL +++ b/ports/sfgui/CONTROL @@ -1,4 +1,4 @@ Source: sfgui -Version: 0.3.2-2 +Version: 0.4.0 Description: simple and fast graphical user interface library Build-Depends: sfml diff --git a/ports/sfgui/portfile.cmake b/ports/sfgui/portfile.cmake index 66ce7d830..16eeb5618 100644 --- a/ports/sfgui/portfile.cmake +++ b/ports/sfgui/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO TankOs/SFGUI - REF 0.3.2 - SHA512 cd97e421695f6189995c1b7a4180e3738bf785abae37d3eb51ac6d687a88a26a1f088863b37e065edaff6ba43eea379e423b31118324c4daa65dba0b3e904869 + REF 0.4.0 + SHA512 15456c6080b7095bcdcec08489b2b91b5cfc36cdf3c0b645b305072e7e835837eb4f95b59371ff176630b2b7ae51da475d8ea0bde5ff7fc0ba74c463bf5f54cf HEAD_REF master PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-sfml-targets.patch" ) @@ -27,9 +27,6 @@ vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfgui RENAME copyright) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/Modules/FindSFGUI.cmake ${CURRENT_PACKAGES_DIR}/share/sfgui/FindSFGUI.cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake/Modules) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL index 371300221..8fcda5bc1 100644 --- a/ports/sfml/CONTROL +++ b/ports/sfml/CONTROL @@ -1,4 +1,4 @@ Source: sfml
-Version: 2.5.1 +Version: 2.5.1-1
Description: Simple and fast multimedia library
Build-Depends: freetype, libflac, libogg, libvorbis, openal-soft, stb
diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index 22ab3b8a3..a25c5628b 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -32,9 +32,9 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SFML)
vcpkg_copy_pdbs()
-if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
FILE(READ ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake SFML_CONFIG)
- FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES true)\n${SFML_CONFIG}")
+ FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES true)\ninclude(CMakeFindDependencyMacro)\nfind_dependency(Freetype)\n${SFML_CONFIG}")
endif()
# move sfml-main to manual link dir
diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index d06f16331..0eb485dcd 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.1.0-3 +Version: 8.1.0-6 Description: Software system for 3D computer graphics, image processing, and visualization Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index edb245eb0..7a5536163 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -1,3 +1,7 @@ +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(WARNING "You will need to install Xorg dependencies to build vtk:\napt-get install libxt-dev\n") +endif() + include(vcpkg_common_functions) set(VTK_SHORT_VERSION "8.1") @@ -162,6 +166,7 @@ vcpkg_configure_cmake( -DVTK_INSTALL_DATA_DIR=share/vtk/data -DVTK_INSTALL_DOC_DIR=share/vtk/doc -DVTK_INSTALL_PACKAGE_DIR=share/vtk + -DVTK_INSTALL_RUNTIME_DIR=tools -DVTK_FORBID_DOWNLOADS=ON ${ADDITIONAL_OPTIONS} ) @@ -299,15 +304,14 @@ foreach(FILE IN LISTS CMAKE_FILES) endforeach() # ============================================================================= -# Move executable to tools directory and clean-up other directories -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/vtk) +# Clean-up other directories -function(_vtk_move_tool TOOL_NAME) - if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe) - file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}.exe ${CURRENT_PACKAGES_DIR}/tools/vtk/${TOOL_NAME}.exe) - endif() - file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe) +function(_vtk_remove_tool TOOL_NAME) + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() endfunction() set(VTK_TOOLS @@ -331,7 +335,7 @@ string(REPLACE "vtk::hdf5::hdf5" "" _contents "${_contents}") file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/Modules/vtkhdf5.cmake" "${_contents}") foreach(TOOL_NAME IN LISTS VTK_TOOLS) - _vtk_move_tool("${TOOL_NAME}") + _vtk_remove_tool("${TOOL_NAME}") endforeach() # ============================================================================= diff --git a/ports/wt/0004-link-ssl.patch b/ports/wt/0004-link-ssl.patch new file mode 100644 index 000000000..8579223dc --- /dev/null +++ b/ports/wt/0004-link-ssl.patch @@ -0,0 +1,46 @@ +diff --git a/cmake/WtFindSsl.txt b/cmake/WtFindSsl.txt +index c5f7bbc8..6e2c2f4d 100644 +--- a/cmake/WtFindSsl.txt ++++ b/cmake/WtFindSsl.txt +@@ -121,6 +121,16 @@ ELSEIF(APPLE) + /usr/local/lib + NO_DEFAULT_PATH + ) ++ FIND_LIBRARY(CRYPTO_LIB ++ NAMES ++ crypto ++ PATHS ++ ${SSL_PREFIX}/lib ++ ${SSL_PREFIX}/lib/VC ++ /usr/lib ++ /usr/local/lib ++ NO_DEFAULT_PATH ++ ) + ELSE (WIN32) + FIND_LIBRARY(SSL_LIB + NAMES +@@ -131,6 +141,15 @@ ELSE (WIN32) + /usr/lib + /usr/local/lib + ) ++ FIND_LIBRARY(CRYPTO_LIB ++ NAMES ++ crypto ++ PATHS ++ ${SSL_PREFIX}/lib ++ ${SSL_PREFIX}/lib/VC ++ /usr/lib ++ /usr/local/lib ++ ) + ENDIF (WIN32) + + IF(SSL_LIB +@@ -144,7 +163,7 @@ IF(SSL_LIB + ENDIF(SSL_TOO_LIB) + ELSE(WIN32) + SET(SSL_FOUND true) +- SET(SSL_LIBRARIES ${SSL_LIB} -lcrypto) ++ SET(SSL_LIBRARIES ${SSL_LIB} ${CRYPTO_LIB}) + ENDIF(WIN32) + ENDIF(SSL_LIB + AND SSL_INCLUDE_DIRS) diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL index ff99b10b5..a66c39f42 100644 --- a/ports/wt/CONTROL +++ b/ports/wt/CONTROL @@ -1,4 +1,4 @@ Source: wt -Version: 4.0.4 +Version: 4.0.4-2 Description: Wt is a C++ library for developing web applications Build-Depends: openssl, sqlite3, libpq, pango, glew, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic, boost-interprocess diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index 614480168..0ac9fef61 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -10,6 +10,7 @@ vcpkg_from_github( 0001-boost-1.66.patch 0002-link-glew.patch 0003-disable-boost-autolink.patch + 0004-link-ssl.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIBS) @@ -36,13 +37,18 @@ vcpkg_configure_cmake( -DUSE_SYSTEM_SQLITE3=ON -DUSE_SYSTEM_GLEW=ON + + -DCMAKE_INSTALL_DIR=share ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/wt) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/wt) # There is no way to suppress installation of the headers and resource files in debug build. file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/var) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/var) + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wt RENAME copyright) vcpkg_copy_pdbs() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index ebe46b335..b6cfc4aab 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -153,6 +153,9 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://sourceforge.net/projects/winflexbison/files/winflexbison-2.5.16.zip/download") set(ARCHIVE "win_flex_bison-2.5.16.zip") set(HASH 0a14154bff5d998feb23903c46961528f8ccb4464375d5384db8c4a7d230c0c599da9b68e7a32f3217a0a0735742242eaf3769cb4f03e00931af8640250e9123) + if(NOT EXISTS "${PATHS}/data/m4sugar/m4sugar.m4" AND SUBDIR STREQUAL "win_flex-2.5.16") + file(REMOVE_RECURSE "${PATHS}") + endif() else() set(PROGNAME flex) set(APT_PACKAGE_NAME flex) diff --git a/scripts/toolchains/android.cmake b/scripts/toolchains/android.cmake index 893463056..69192aeca 100644 --- a/scripts/toolchains/android.cmake +++ b/scripts/toolchains/android.cmake @@ -1,11 +1,22 @@ set(ANDROID_CPP_FEATURES "rtti exceptions" CACHE STRING "")
set(CMAKE_SYSTEM_NAME Android CACHE STRING "")
-set(ANDROID_ABI x86_64 CACHE STRING "")
set(ANDROID_TOOLCHAIN clang CACHE STRING "")
set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "")
+if (VCPKG_TARGET_TRIPLET STREQUAL "arm64-android")
+ set(ANDROID_ABI arm64-v8a CACHE STRING "")
+elseif(VCPKG_TARGET_TRIPLET STREQUAL "arm-android")
+ set(ANDROID_ABI armeabi-v7a CACHE STRING "")
+elseif(VCPKG_TARGET_TRIPLET STREQUAL "x64-android")
+ set(ANDROID_ABI x86_64 CACHE STRING "")
+elseif(VCPKG_TARGET_TRIPLET STREQUAL "x86-android")
+ set(ANDROID_ABI x86 CACHE STRING "")
+else()
+ message(FATAL_ERROR "Unknown ABI for target triplet ${VCPKG_TARGET_TRIPLET}")
+endif()
+
if(DEFINED ENV{ANDROID_NDK_HOME})
set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME})
else()
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 650e46b03..9378c7832 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -22,11 +22,11 @@ <archiveName>cmake-3.12.4-Linux-x86_64.tar.gz</archiveName> </tool> <tool name="git" os="windows"> - <version>2.19.1</version> + <version>2.20.0</version> <exeRelativePath>cmd\git.exe</exeRelativePath> - <url>https://github.com/git-for-windows/git/releases/download/v2.19.1.windows.1/MinGit-2.19.1-32-bit.zip</url> - <sha512>8a6d2caae2cbaacee073a641cda21465a749325c0af620dabd0e5521c84c92c8d747caa468b111d2ec52b99aee2ee3e6ec41a0a07a8fff582f4c8da568ea329e</sha512> - <archiveName>MinGit-2.19.1-32-bit.zip</archiveName> + <url>https://github.com/git-for-windows/git/releases/download/v2.20.0.windows.1/PortableGit-2.20.0-32-bit.7z.exe</url> + <sha512>81647a87df9fde0945ef597cb1cafd8f5f42859da89e9b1db55222a261407bc16bdcc0cf1e86e315697f0981832fe10fc02845cad4b4c82ea64bbd218aec6a49</sha512> + <archiveName>PortableGit-2.20.0-32-bit.7z.exe</archiveName> </tool> <tool name="git" os="linux"> <version>2.7.4</version> diff --git a/toolsrc/src/vcpkg/archives.cpp b/toolsrc/src/vcpkg/archives.cpp index 8943893d6..38efedf87 100644 --- a/toolsrc/src/vcpkg/archives.cpp +++ b/toolsrc/src/vcpkg/archives.cpp @@ -8,7 +8,11 @@ namespace vcpkg::Archives void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path) { Files::Filesystem& fs = paths.get_filesystem(); - const fs::path to_path_partial = to_path.u8string() + ".partial"; + const fs::path to_path_partial = to_path.u8string() + ".partial" +#if defined(_WIN32) + + "." + std::to_string(GetCurrentProcessId()) +#endif + ; std::error_code ec; fs.remove_all(to_path, ec); diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index 9c72f8401..8aa1db53c 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -170,6 +170,8 @@ namespace vcpkg::System L"NVCUDASAMPLES_ROOT", // Enables find_package(Vulkan) in CMake. Environmental variable generated by Vulkan SDK installer L"VULKAN_SDK", + // Enable targeted Android NDK + L"ANDROID_NDK_HOME", }; std::wstring env_cstr; diff --git a/toolsrc/src/vcpkg/tools.cpp b/toolsrc/src/vcpkg/tools.cpp index c623d816d..365271872 100644 --- a/toolsrc/src/vcpkg/tools.cpp +++ b/toolsrc/src/vcpkg/tools.cpp @@ -44,7 +44,7 @@ namespace vcpkg return result; } - static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) + static ExpectedT<ToolData, std::string> parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) { #if defined(_WIN32) static constexpr StringLiteral OS_STRING = "windows"; @@ -53,13 +53,13 @@ namespace vcpkg #elif defined(__linux__) static constexpr StringLiteral OS_STRING = "linux"; #else - return ToolData{}; + return std::string("operating system is unknown"); #endif #if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) static const std::string XML_VERSION = "2"; static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; - static const std::regex XML_VERSION_REGEX{R"###(<tools[\s]+version="([^"]+)">)###"}; + static const std::regex XML_VERSION_REGEX {R"###(<tools[\s]+version="([^"]+)">)###"}; static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); std::smatch match_xml_version; const bool has_xml_version = std::regex_search(XML.cbegin(), XML.cend(), match_xml_version, XML_VERSION_REGEX); @@ -67,22 +67,22 @@ namespace vcpkg has_xml_version, R"(Could not find <tools version="%s"> in %s)", XML_VERSION, - XML_PATH.generic_string()); + XML_PATH.u8string()); Checks::check_exit(VCPKG_LINE_INFO, XML_VERSION == match_xml_version[1], "Expected %s version: [%s], but was [%s]. Please re-run bootstrap-vcpkg.", - XML_PATH.generic_string(), + XML_PATH.u8string(), XML_VERSION, match_xml_version[1]); - const std::regex tool_regex{Strings::format(R"###(<tool[\s]+name="%s"[\s]+os="%s">)###", tool, OS_STRING)}; + const std::regex tool_regex {Strings::format(R"###(<tool[\s]+name="%s"[\s]+os="%s">)###", tool, OS_STRING)}; std::smatch match_tool_entry; const bool has_tool_entry = std::regex_search(XML.cbegin(), XML.cend(), match_tool_entry, tool_regex); - Checks::check_exit(VCPKG_LINE_INFO, - has_tool_entry, - "Could not find entry for tool [%s] in %s", - tool, - XML_PATH.generic_string()); + if (!has_tool_entry) + { + return Strings::format( + "Could not find entry for tool %s in %s for os=%s", tool, XML_PATH.u8string(), OS_STRING); + } const std::string tool_data = StringRange::find_exactly_one_enclosed(XML, match_tool_entry[0], "</tool>").to_string(); @@ -106,13 +106,13 @@ namespace vcpkg const fs::path tool_dir_path = paths.tools / tool_dir_name; const fs::path exe_path = tool_dir_path / exe_relative_path; - return ToolData{*version.get(), - exe_path, - url, - paths.downloads / archive_name.value_or(exe_relative_path).to_string(), - archive_name.has_value(), - tool_dir_path, - sha512}; + return ToolData {*version.get(), + exe_path, + url, + paths.downloads / archive_name.value_or(exe_relative_path).to_string(), + archive_name.has_value(), + tool_dir_path, + sha512}; #endif } @@ -122,55 +122,43 @@ namespace vcpkg std::string version; }; - static Optional<PathAndVersion> find_first_with_sufficient_version(const std::vector<PathAndVersion>& candidates, - const std::array<int, 3>& expected_version) + struct ToolProvider { - const auto it = Util::find_if(candidates, [&](const PathAndVersion& candidate) { - const auto parsed_version = parse_version_string(candidate.version); - if (!parsed_version.has_value()) - { - return false; - } + virtual const std::string& tool_data_name() const = 0; + virtual const std::string& exe_stem() const = 0; + virtual std::array<int, 3> default_min_version() const = 0; - const std::array<int, 3> actual_version = *parsed_version.get(); - return actual_version[0] > expected_version[0] || - (actual_version[0] == expected_version[0] && actual_version[1] > expected_version[1]) || - (actual_version[0] == expected_version[0] && actual_version[1] == expected_version[1] && - actual_version[2] >= expected_version[2]); - }); + virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const {} + virtual Optional<std::string> get_version(const fs::path& path_to_exe) const = 0; + }; - if (it == candidates.cend()) + static Optional<PathAndVersion> find_first_with_sufficient_version(const Files::Filesystem& fs, + const ToolProvider& tool_provider, + const std::vector<fs::path>& candidates, + const std::array<int, 3>& expected_version) + { + for (auto&& candidate : candidates) { - return nullopt; + if (!fs.exists(candidate)) continue; + auto maybe_version = tool_provider.get_version(candidate); + const auto version = maybe_version.get(); + if (!version) continue; + const auto parsed_version = parse_version_string(*version); + if (!parsed_version) continue; + auto& actual_version = *parsed_version.get(); + const auto version_acceptable = + actual_version[0] > expected_version[0] || + (actual_version[0] == expected_version[0] && actual_version[1] > expected_version[1]) || + (actual_version[0] == expected_version[0] && actual_version[1] == expected_version[1] && + actual_version[2] >= expected_version[2]); + if (!version_acceptable) continue; + + return PathAndVersion {candidate, *version}; } - return *it; + return nullopt; } - struct VersionProvider - { - virtual Optional<std::string> get_version(const fs::path& path_to_exe) const = 0; - - std::vector<PathAndVersion> get_versions(const std::vector<fs::path>& candidate_paths) const - { - auto&& fs = Files::get_real_filesystem(); - - std::vector<PathAndVersion> output; - for (auto&& p : candidate_paths) - { - if (!fs.exists(p)) continue; - auto maybe_version = this->get_version(p); - if (const auto version = maybe_version.get()) - { - output.emplace_back(PathAndVersion{p, *version}); - return output; - } - } - - return output; - } - }; - static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) { const std::array<int, 3>& version = tool_data.version; @@ -220,76 +208,90 @@ namespace vcpkg } static PathAndVersion fetch_tool(const VcpkgPaths& paths, - const std::string& tool_name, - const ToolData& tool_data, - const VersionProvider& version_provider) + const ToolProvider& tool_provider, + const ToolData& tool_data) { - const auto downloaded_path = fetch_tool(paths, tool_name, tool_data); - const auto downloaded_version = version_provider.get_version(downloaded_path).value_or_exit(VCPKG_LINE_INFO); + const auto downloaded_path = fetch_tool(paths, tool_provider.tool_data_name(), tool_data); + const auto downloaded_version = tool_provider.get_version(downloaded_path).value_or_exit(VCPKG_LINE_INFO); return {downloaded_path, downloaded_version}; } - namespace CMake + static PathAndVersion get_path(const VcpkgPaths& paths, const ToolProvider& tool) { - struct CmakeVersionProvider : VersionProvider + auto& fs = paths.get_filesystem(); + + std::array<int, 3> min_version = tool.default_min_version(); + + std::vector<fs::path> candidate_paths; + auto maybe_tool_data = parse_tool_data_from_xml(paths, tool.tool_data_name()); + if (auto tool_data = maybe_tool_data.get()) { - Optional<std::string> get_version(const fs::path& path_to_exe) const override - { - const std::string cmd = Strings::format(R"("%s" --version)", path_to_exe.u8string()); - const auto rc = System::cmd_execute_and_capture_output(cmd); - if (rc.exit_code != 0) - { - return nullopt; - } + candidate_paths.push_back(tool_data->exe_path); + min_version = tool_data->version; + } - /* Sample output: - cmake version 3.10.2 + auto& exe_stem = tool.exe_stem(); + if (!exe_stem.empty()) + { + auto paths_from_path = fs.find_from_PATH(exe_stem); + candidate_paths.insert(candidate_paths.end(), paths_from_path.cbegin(), paths_from_path.cend()); + } - CMake suite maintained and supported by Kitware (kitware.com/cmake). - */ - return StringRange::find_exactly_one_enclosed(rc.output, "cmake version ", "\n").to_string(); - } - }; + tool.add_special_paths(candidate_paths); - static PathAndVersion get_path(const VcpkgPaths& paths) + const auto maybe_path = find_first_with_sufficient_version(fs, tool, candidate_paths, min_version); + if (const auto p = maybe_path.get()) { - if (System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) - { - return {"cmake", "0"}; - } + return *p; + } + if (auto tool_data = maybe_tool_data.get()) + { + return fetch_tool(paths, tool, *tool_data); + } - std::vector<fs::path> candidate_paths; -#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake"); - candidate_paths.push_back(TOOL_DATA.exe_path); -#else - static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""}; -#endif - const std::vector<fs::path> from_path = paths.get_filesystem().find_from_PATH("cmake"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); + Checks::exit_with_message(VCPKG_LINE_INFO, maybe_tool_data.error()); + } + + struct CMakeProvider : ToolProvider + { + std::string m_exe = "cmake"; + + virtual const std::string& tool_data_name() const override { return m_exe; } + virtual const std::string& exe_stem() const override { return m_exe; } + virtual std::array<int, 3> default_min_version() const override { return {3, 5, 1}; } + virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const override + { +#if defined(_WIN32) const auto& program_files = System::get_program_files_platform_bitness(); - if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); + if (const auto pf = program_files.get()) out_candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); const auto& program_files_32_bit = System::get_program_files_32_bit(); if (const auto pf = program_files_32_bit.get()) - candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); - - const CmakeVersionProvider version_provider{}; - const std::vector<PathAndVersion> candidates_with_versions = version_provider.get_versions(candidate_paths); - const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); - if (const auto p = maybe_path.get()) + out_candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); +#endif + } + virtual Optional<std::string> get_version(const fs::path& path_to_exe) const override + { + const std::string cmd = Strings::format(R"("%s" --version)", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) { - return *p; + return nullopt; } - return fetch_tool(paths, Tools::CMAKE, TOOL_DATA, version_provider); + /* Sample output: +cmake version 3.10.2 + +CMake suite maintained and supported by Kitware (kitware.com/cmake). + */ + return StringRange::find_exactly_one_enclosed(rc.output, "cmake version ", "\n").to_string(); } - } + }; static fs::path get_7za_path(const VcpkgPaths& paths) { #if defined(_WIN32) - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip"); + static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip").value_or_exit(VCPKG_LINE_INFO); if (!paths.get_filesystem().exists(TOOL_DATA.exe_path)) { return fetch_tool(paths, "7zip", TOOL_DATA); @@ -300,195 +302,131 @@ namespace vcpkg #endif } - namespace Ninja + struct NinjaProvider : ToolProvider { - struct NinjaVersionProvider : VersionProvider - { - Optional<std::string> get_version(const fs::path& path_to_exe) const override - { - const std::string cmd = Strings::format(R"("%s" --version)", path_to_exe.u8string()); - const auto rc = System::cmd_execute_and_capture_output(cmd); - if (rc.exit_code != 0) - { - return nullopt; - } + std::string m_exe = "ninja"; - /* Sample output: - 1.8.2 - */ - return rc.output; - } - }; + virtual const std::string& tool_data_name() const override { return m_exe; } + virtual const std::string& exe_stem() const override { return m_exe; } + virtual std::array<int, 3> default_min_version() const override { return {3, 5, 1}; } - static PathAndVersion get_path(const VcpkgPaths& paths) + virtual Optional<std::string> get_version(const fs::path& path_to_exe) const override { - if (System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) - { - return {"ninja", "0"}; - } - - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "ninja"); - - std::vector<fs::path> candidate_paths; - candidate_paths.push_back(TOOL_DATA.exe_path); - const std::vector<fs::path> from_path = paths.get_filesystem().find_from_PATH("ninja"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - const NinjaVersionProvider version_provider{}; - const std::vector<PathAndVersion> candidates_with_versions = version_provider.get_versions(candidate_paths); - const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); - if (const auto p = maybe_path.get()) + const std::string cmd = Strings::format(R"("%s" --version)", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) { - return *p; + return nullopt; } - return fetch_tool(paths, Tools::NINJA, TOOL_DATA, version_provider); + /* Sample output: +1.8.2 + */ + return rc.output; } - } + }; - namespace Nuget + struct NuGetProvider : ToolProvider { - struct NugetVersionProvider : VersionProvider - { - Optional<std::string> get_version(const fs::path& path_to_exe) const override - { - const std::string cmd = Strings::format(R"("%s")", path_to_exe.u8string()); - const auto rc = System::cmd_execute_and_capture_output(cmd); - if (rc.exit_code != 0) - { - return nullopt; - } + std::string m_exe = "nuget"; - /* Sample output: - NuGet Version: 4.6.2.5055 - usage: NuGet <command> [args] [options] - Type 'NuGet help <command>' for help on a specific command. - - [[[List of available commands follows]]] - */ - return StringRange::find_exactly_one_enclosed(rc.output, "NuGet Version: ", "\n").to_string(); - } - }; + virtual const std::string& tool_data_name() const override { return m_exe; } + virtual const std::string& exe_stem() const override { return m_exe; } + virtual std::array<int, 3> default_min_version() const override { return {4, 6, 2}; } - static PathAndVersion get_path(const VcpkgPaths& paths) + virtual Optional<std::string> get_version(const fs::path& path_to_exe) const override { - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "nuget"); - - std::vector<fs::path> candidate_paths; - candidate_paths.push_back(TOOL_DATA.exe_path); - const std::vector<fs::path> from_path = paths.get_filesystem().find_from_PATH("nuget"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - - const NugetVersionProvider version_provider{}; - const std::vector<PathAndVersion> candidates_with_versions = version_provider.get_versions(candidate_paths); - const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); - if (const auto p = maybe_path.get()) + const std::string cmd = Strings::format(R"("%s")", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) { - return *p; + return nullopt; } - return fetch_tool(paths, Tools::NUGET, TOOL_DATA, version_provider); + /* Sample output: +NuGet Version: 4.6.2.5055 +usage: NuGet <command> [args] [options] +Type 'NuGet help <command>' for help on a specific command. + +[[[List of available commands follows]]] + */ + return StringRange::find_exactly_one_enclosed(rc.output, "NuGet Version: ", "\n").to_string(); } - } + }; - namespace Git + struct GitProvider : ToolProvider { - struct GitVersionProvider : VersionProvider - { - Optional<std::string> get_version(const fs::path& path_to_exe) const override - { - const std::string cmd = Strings::format(R"("%s" --version)", path_to_exe.u8string()); - const auto rc = System::cmd_execute_and_capture_output(cmd); - if (rc.exit_code != 0) - { - return nullopt; - } + std::string m_exe = "git"; - /* Sample output: - git version 2.17.1.windows.2 - */ - const auto idx = rc.output.find("git version "); - Checks::check_exit(VCPKG_LINE_INFO, - idx != std::string::npos, - "Unexpected format of git version string: %s", - rc.output); - return rc.output.substr(idx); - } - }; + virtual const std::string& tool_data_name() const override { return m_exe; } + virtual const std::string& exe_stem() const override { return m_exe; } + virtual std::array<int, 3> default_min_version() const override { return {2, 7, 4}; } - static PathAndVersion get_path(const VcpkgPaths& paths) + virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const { - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "git"); - - std::vector<fs::path> candidate_paths; #if defined(_WIN32) - candidate_paths.push_back(TOOL_DATA.exe_path); -#endif - const std::vector<fs::path> from_path = paths.get_filesystem().find_from_PATH("git"); - candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - const auto& program_files = System::get_program_files_platform_bitness(); - if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); + if (const auto pf = program_files.get()) out_candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); const auto& program_files_32_bit = System::get_program_files_32_bit(); - if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); + if (const auto pf = program_files_32_bit.get()) + out_candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); +#endif + } - const GitVersionProvider version_provider{}; - const std::vector<PathAndVersion> candidates_with_versions = version_provider.get_versions(candidate_paths); - const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); - if (const auto p = maybe_path.get()) + virtual Optional<std::string> get_version(const fs::path& path_to_exe) const override + { + const std::string cmd = Strings::format(R"("%s" --version)", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) { - return *p; + return nullopt; } - return fetch_tool(paths, Tools::GIT, TOOL_DATA, version_provider); + /* Sample output: +git version 2.17.1.windows.2 + */ + const auto idx = rc.output.find("git version "); + Checks::check_exit( + VCPKG_LINE_INFO, idx != std::string::npos, "Unexpected format of git version string: %s", rc.output); + return rc.output.substr(idx); } - } + }; - namespace IfwInstallerBase + struct IfwInstallerBaseProvider : ToolProvider { - struct IfwInstallerBaseVersionProvider : VersionProvider - { - Optional<std::string> get_version(const fs::path& path_to_exe) const override - { - const std::string cmd = Strings::format(R"("%s" --framework-version)", path_to_exe.u8string()); - const auto rc = System::cmd_execute_and_capture_output(cmd); - if (rc.exit_code != 0) - { - return nullopt; - } + std::string m_exe = ""; + std::string m_toolname = "installerbase"; - /* Sample output: - 3.1.81 - */ - return rc.output; - } - }; + virtual const std::string& tool_data_name() const override { return m_toolname; } + virtual const std::string& exe_stem() const override { return m_exe; } + virtual std::array<int, 3> default_min_version() const override { return {0, 0, 0}; } - static PathAndVersion get_path(const VcpkgPaths& paths) + virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const { - static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "installerbase"); - - std::vector<fs::path> candidate_paths; - candidate_paths.push_back(TOOL_DATA.exe_path); // TODO: Uncomment later // const std::vector<fs::path> from_path = Files::find_from_PATH("installerbase"); // candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / - // "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); - // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / - // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); - - const IfwInstallerBaseVersionProvider version_provider{}; - const std::vector<PathAndVersion> candidates_with_versions = version_provider.get_versions(candidate_paths); - const auto maybe_path = find_first_with_sufficient_version(candidates_with_versions, TOOL_DATA.version); - if (const auto p = maybe_path.get()) + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / + // "Qt" / "Tools" / "QtInstallerFramework" / "3.1" / "bin" / "installerbase.exe"); + // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / + // "Qt" / "QtIFW-3.1.0" / "bin" / "installerbase.exe"); + } + + virtual Optional<std::string> get_version(const fs::path& path_to_exe) const override + { + const std::string cmd = Strings::format(R"("%s" --framework-version)", path_to_exe.u8string()); + const auto rc = System::cmd_execute_and_capture_output(cmd); + if (rc.exit_code != 0) { - return *p; + return nullopt; } - return fetch_tool(paths, Tools::IFW_INSTALLER_BASE, TOOL_DATA, version_provider); + /* Sample output: +3.1.81 + */ + return rc.output; } - } + }; struct ToolCacheImpl final : ToolCache { @@ -506,12 +444,12 @@ namespace vcpkg tool == Tools::IFW_INSTALLER_BASE) return get_tool_pathversion(paths, tool).path; if (tool == Tools::IFW_BINARYCREATOR) - return IfwInstallerBase::get_path(paths).path.parent_path() / "binarycreator.exe"; + return get_tool_path(paths, Tools::IFW_INSTALLER_BASE).parent_path() / "binarycreator.exe"; if (tool == Tools::IFW_REPOGEN) - return IfwInstallerBase::get_path(paths).path.parent_path() / "repogen.exe"; + return get_tool_path(paths, Tools::IFW_INSTALLER_BASE).parent_path() / "repogen.exe"; // For other tools, we simply always auto-download them. - const ToolData tool_data = parse_tool_data_from_xml(paths, tool); + const ToolData tool_data = parse_tool_data_from_xml(paths, tool).value_or_exit(VCPKG_LINE_INFO); if (paths.get_filesystem().exists(tool_data.exe_path)) { return tool_data.exe_path; @@ -522,12 +460,33 @@ namespace vcpkg const PathAndVersion& get_tool_pathversion(const VcpkgPaths& paths, const std::string& tool) const { - return path_version_cache.get_lazy(tool, [&]() { - if (tool == Tools::CMAKE) return CMake::get_path(paths); - if (tool == Tools::GIT) return Git::get_path(paths); - if (tool == Tools::NINJA) return Ninja::get_path(paths); - if (tool == Tools::NUGET) return Nuget::get_path(paths); - if (tool == Tools::IFW_INSTALLER_BASE) return IfwInstallerBase::get_path(paths); + return path_version_cache.get_lazy(tool, [&]() -> PathAndVersion { + if (tool == Tools::CMAKE) + { + if (System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) + { + return {"cmake", "0"}; + } + return get_path(paths, CMakeProvider()); + } + if (tool == Tools::GIT) + { + if (System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) + { + return {"git", "0"}; + } + return get_path(paths, GitProvider()); + } + if (tool == Tools::NINJA) + { + if (System::get_environment_variable("VCPKG_FORCE_SYSTEM_BINARIES").has_value()) + { + return {"ninja", "0"}; + } + return get_path(paths, NinjaProvider()); + } + if (tool == Tools::NUGET) return get_path(paths, NuGetProvider()); + if (tool == Tools::IFW_INSTALLER_BASE) return get_path(paths, IfwInstallerBaseProvider()); Checks::exit_with_message(VCPKG_LINE_INFO, "Finding version for %s is not implemented yet.", tool); }); |
