Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/4952

This commit is contained in:
Phil Christensen 2018-12-18 15:33:10 -08:00
commit 47c60f9b6b
97 changed files with 1014 additions and 1037 deletions

View File

@ -0,0 +1,42 @@
## Environment and Configuration
### Environment Variables
#### VCPKG_DOWNLOADS
This environment variable can be set to an existing directory to use for storing downloads instead of the internal
`downloads/` directory. It should always be set to an absolute path.
#### VCPKG_FEATURE_FLAGS
This environment variable can be set to a comma-separated list of off-by-default features in vcpkg. These features are
subject to change without notice and should be considered highly unstable.
Non-exhaustive list of off-by-default features:
- `binarycaching`
#### EDITOR
This environment variable can be set to the full path of an executable to be used for `vcpkg edit`. Please see
`vcpkg help edit` for command-specific help.
#### VCPKG_ROOT
This environment variable can be set to a directory to use as the root of the vcpkg instance. Note that mixing vcpkg
repo versions and executable versions can cause issues.
#### VCPKG_DEFAULT_VS_PATH
This environment variable can be set to the full path to a Visual Studio instance on the machine. This Visual Studio instance
will be used if the triplet does not override it via the [`VCPKG_VISUAL_STUDIO_PATH` triplet setting](triplets.md#VCPKG_VISUAL_STUDIO_PATH).
Example: `D:\2017`
#### VCPKG_DEFAULT_TRIPLET
This environment variable can be set to a triplet name which will be used for unqualified triplet references in command lines.
#### VCPKG_FORCE_SYSTEM_BINARIES
This environment variable, if set, suppresses the downloading of CMake and Ninja and forces the use of the system binaries.

View File

@ -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()

View File

@ -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/

View File

@ -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
)

View File

@ -62,6 +62,7 @@ target_link_libraries(aubio PUBLIC
${LIBLZMA_LIBRARIES}
ws2_32.lib
Secur32.lib
bcrypt.lib
)
if(BUILD_TOOLS)

View File

@ -1,4 +1,4 @@
Source: aubio
Version: 0.4.6-2
Version: 0.4.8
Description: Aubio is a tool designed for the extraction of annotations from audio signals. Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio.
Build-Depends: ffmpeg, libsndfile, libogg, libflac, libvorbis, bzip2, liblzma

View File

@ -3,8 +3,8 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/aubio-3c230fae309e9ea3298783368dd7
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO aubio/aubio
REF 0.4.6
SHA512 9bb787d81f39ab8e3440be9936552a712a24e009884818e13e80dde756ad3874055bcd931ca3af638122f6a0d0bc53e62e1abeedce3fd79af35fe9ddea6bc707
REF 0.4.8
SHA512 0422ec9ceb645dd5cdb1ca8b17f552edf9197dbf9c929ca75aacfb89f092c02db8b6d2b8aec567ddc1df5b310770de77cd941b45ed74700c3d3584924f39b576
HEAD_REF master
)

View File

@ -0,0 +1,4 @@
Source: aws-lambda-cpp
Version: 0.1.0
Build-Depends: curl
Description: C++ Runtime for AWS Lambda.

View File

@ -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)

View File

@ -1,3 +1,3 @@
Source: botan
Version: 2.8.0
Version: 2.9.0
Description: A cryptography library written in C++11

View File

@ -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
)

View File

@ -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.

View File

@ -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

View File

@ -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(

View File

@ -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

View File

@ -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

View File

@ -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++.

View File

@ -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
)

View File

@ -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).

View File

@ -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

View File

@ -1,5 +1,5 @@
Source: ffmpeg
Version: 3.3.3-5
Version: 4.1
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.

View File

@ -1,9 +1,9 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-3.3.3)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-4.1)
vcpkg_download_distfile(ARCHIVE
URLS "http://ffmpeg.org/releases/ffmpeg-3.3.3.tar.bz2"
FILENAME "ffmpeg-3.3.3.tar.bz2"
SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab
URLS "http://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2"
FILENAME "ffmpeg-4.1.tar.bz2"
SHA512 ccf6d07268dc47e08ca619eb182a003face2a8ee73ec1a28157330dd7de1df88939def1fc1c7e6b6ac7b59752cdad84657d589b2fafb73e14e5ef03fb6e33417
)
if (${SOURCE_PATH} MATCHES " ")
@ -59,12 +59,6 @@ else()
set(OPTIONS "${OPTIONS} --disable-ffplay")
endif()
if("ffserver" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-ffserver")
else()
set(OPTIONS "${OPTIONS} --disable-ffserver")
endif()
if("ffprobe" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-ffprobe")
else()

View File

@ -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

View File

@ -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})

View File

@ -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})
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)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-cmake-config-and-install.patch
)
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")

View File

@ -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

View File

@ -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
)

View File

@ -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.

View File

@ -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
)

View File

@ -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

View File

@ -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)

View File

@ -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()

View File

@ -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

View File

@ -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)

View File

@ -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.

View File

@ -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
)

View File

@ -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

View File

@ -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

3
ports/libcopp/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: libcopp
Version: 1.1.0-1
Description: A cross-platfrom coroutine library for C++

View File

@ -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)

5
ports/libcopp/usage Normal file
View File

@ -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})

View File

@ -6,24 +6,47 @@ if(BUILD_SHARED_LIBS)
else()
set(LIBICONV_DYNAMIC "0 /*LIBICONV_DYNAMIC*/")
endif()
set(HAVE_WCHAR_T "1 /*HAVE_WCHAR_T*/")
set(USE_MBSTATE_T "0 /*USE_MBSTATE_T*/")
set(BROKEN_WCHAR_H "0 /*BROKEN_WCHAR_H*/")
set(HAVE_VISIBILITY "0 /*HAVE_VISIBILITY*/")
configure_file(config.h.in config.h)
file(READ "${CMAKE_CURRENT_BINARY_DIR}/config.h" _contents)
string(REPLACE "#undef HAVE_WORKING_O_NOFOLLOW" "#define HAVE_WORKING_O_NOFOLLOW 0" _contents "${_contents}")
string(REPLACE "#undef HAVE_MBRTOWC" "#define HAVE_MBRTOWC 1" _contents "${_contents}")
string(REPLACE "#undef HAVE_MBSINIT" "#define HAVE_MBSINIT 1" _contents "${_contents}")
string(REPLACE "#undef HAVE_WCRTOMB" "#define HAVE_WCRTOMB 1" _contents "${_contents}")
string(REPLACE "#undef ICONV_CONST" "#define ICONV_CONST const" _contents "${_contents}")
string(REPLACE "#undef EILSEQ" "" _contents "${_contents}")
string(REPLACE "#undef WORDS_LITTLEENDIAN" "#define WORDS_LITTLEENDIAN 1" _contents "${_contents}")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.h" "${_contents}")
set(CMAKE_STATIC_LIBRARY_PREFIX)
set(CMAKE_SHARED_LIBRARY_PREFIX)
configure_file(libcharset/include/localcharset.h.build.in localcharset.h)
configure_file(include/iconv.h.build.in iconv.h)
if(WIN32)
set(HAVE_WCHAR_T "1 /*HAVE_WCHAR_T*/")
set(USE_MBSTATE_T "0 /*USE_MBSTATE_T*/")
set(BROKEN_WCHAR_H "0 /*BROKEN_WCHAR_H*/")
set(HAVE_VISIBILITY "0 /*HAVE_VISIBILITY*/")
configure_file(config.h.in config.h)
file(READ "${CMAKE_CURRENT_BINARY_DIR}/config.h" _contents)
string(REPLACE "#undef HAVE_WORKING_O_NOFOLLOW" "#define HAVE_WORKING_O_NOFOLLOW 0" _contents "${_contents}")
string(REPLACE "#undef HAVE_MBRTOWC" "#define HAVE_MBRTOWC 1" _contents "${_contents}")
string(REPLACE "#undef HAVE_MBSINIT" "#define HAVE_MBSINIT 1" _contents "${_contents}")
string(REPLACE "#undef HAVE_WCRTOMB" "#define HAVE_WCRTOMB 1" _contents "${_contents}")
string(REPLACE "#undef ICONV_CONST" "#define ICONV_CONST const" _contents "${_contents}")
string(REPLACE "#undef EILSEQ" "" _contents "${_contents}")
string(REPLACE "#undef WORDS_LITTLEENDIAN" "#define WORDS_LITTLEENDIAN 1" _contents "${_contents}")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.h" "${_contents}")
configure_file(libcharset/include/localcharset.h.build.in localcharset.h)
configure_file(include/iconv.h.build.in iconv.h)
else()
if(BUILD_SHARED_LIBS)
set(STATIC_SHARED --enable-shared --disable-static)
else()
set(STATIC_SHARED --disable-shared --enable-static)
endif()
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/autoconf)
execute_process(
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/configure --enable-relocatable ${STATIC_SHARED} --without-libiconv-prefix --without-libintl-prefix
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/autoconf
)
configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/config.h config.h @ONLY)
configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/include/iconv.h iconv.h @ONLY)
configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/libcharset/include/localcharset.h localcharset.h @ONLY)
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})

View File

@ -1,3 +1,3 @@
Source: libiconv
Version: 1.15-4
Version: 1.15-5
Description: GNU Unicode text conversion

View File

@ -6,24 +6,27 @@ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStor
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libiconv-1.15)
set(LIBICONV_VERSION 1.15)
vcpkg_download_distfile(ARCHIVE
URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz"
FILENAME "libiconv-1.15.tar.gz"
URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz"
FILENAME "libiconv-${LIBICONV_VERSION}.tar.gz"
SHA512 1233fe3ca09341b53354fd4bfe342a7589181145a1232c9919583a8c9979636855839049f3406f253a9d9829908816bb71fd6d34dd544ba290d6f04251376b1a
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${LIBICONV_VERSION}
PATCHES
0001-Add-export-definitions.patch
0002-Config-for-MSVC.patch
0003-Fix-uwp.patch
)
#Since libiconv uses automake, make and configure, we use a custom CMake file
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Add-export-definitions.patch
${CMAKE_CURRENT_LIST_DIR}/0002-Config-for-MSVC.patch
${CMAKE_CURRENT_LIST_DIR}/0003-Fix-uwp.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA

View File

@ -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.

View File

@ -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()

View File

@ -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}

View File

@ -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

View File

@ -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})

View File

@ -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)

View File

@ -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.

View File

@ -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}")

View File

@ -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)

View File

@ -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()

View File

@ -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

View File

@ -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);
//! @}

View File

@ -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;

View File

@ -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.

View File

@ -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

View File

@ -1,4 +1,4 @@
Source: osgearth
Version: 2.9-2
Version: 2.10
Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.
Build-Depends: osg

View File

@ -26,8 +26,8 @@ vcpkg_download_distfile(
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO gwaldron/osgearth
REF d1884d819d4a43de32b7ca1ded655c73964bed17
SHA512 525ad4ce8bcbd7d73a2ed66e7fbcd9d302582276f26dda1ef2baa3828da5c1e302ba81aac95d0a0632c7395cbcd072d2b19d084ba641c1ba92872d42bb6f769c
REF osgearth-2.10
SHA512 ba742f4fc8dbbdaee65e413d477b713cad8da313a1dc68327997359aca88dadc871b03ad4b09172e3e048164989c2797108db67f14edff8ee5a0c63a8fe1bb0c
HEAD_REF master
PATCHES ${VS2017PATCH}
)

View File

@ -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)

View File

@ -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)

View File

@ -1,4 +1,4 @@
Source: pangolin
Version: 0.5-3
Version: 0.5-4
Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg
Description: Lightweight GUI Library

View File

@ -0,0 +1,69 @@
diff --git a/src/video/drivers/ffmpeg.cpp b/src/video/drivers/ffmpeg.cpp
index 435225d..ff30349 100644
--- a/src/video/drivers/ffmpeg.cpp
+++ b/src/video/drivers/ffmpeg.cpp
@@ -34,6 +34,8 @@ extern "C"
#include <libavutil/mathematics.h>
}
+#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
+
namespace pangolin
{
@@ -74,8 +76,10 @@ std::string FfmpegFmtToString(const AVPixelFormat fmt)
TEST_PIX_FMT_RETURN(YUVJ420P);
TEST_PIX_FMT_RETURN(YUVJ422P);
TEST_PIX_FMT_RETURN(YUVJ444P);
+#ifdef FF_API_XVMC
TEST_PIX_FMT_RETURN(XVMC_MPEG2_MC);
TEST_PIX_FMT_RETURN(XVMC_MPEG2_IDCT);
+#endif
TEST_PIX_FMT_RETURN(UYVY422);
TEST_PIX_FMT_RETURN(UYYVYY411);
TEST_PIX_FMT_RETURN(BGR8);
@@ -95,11 +99,13 @@ std::string FfmpegFmtToString(const AVPixelFormat fmt)
TEST_PIX_FMT_RETURN(YUV440P);
TEST_PIX_FMT_RETURN(YUVJ440P);
TEST_PIX_FMT_RETURN(YUVA420P);
+#ifdef FF_API_VDPAU
TEST_PIX_FMT_RETURN(VDPAU_H264);
TEST_PIX_FMT_RETURN(VDPAU_MPEG1);
TEST_PIX_FMT_RETURN(VDPAU_MPEG2);
TEST_PIX_FMT_RETURN(VDPAU_WMV3);
TEST_PIX_FMT_RETURN(VDPAU_VC1);
+#endif
TEST_PIX_FMT_RETURN(RGB48BE );
TEST_PIX_FMT_RETURN(RGB48LE );
TEST_PIX_FMT_RETURN(RGB565BE);
@@ -119,7 +125,9 @@ std::string FfmpegFmtToString(const AVPixelFormat fmt)
TEST_PIX_FMT_RETURN(YUV422P16BE);
TEST_PIX_FMT_RETURN(YUV444P16LE);
TEST_PIX_FMT_RETURN(YUV444P16BE);
+#ifdef FF_API_VDPAU
TEST_PIX_FMT_RETURN(VDPAU_MPEG4);
+#endif
TEST_PIX_FMT_RETURN(DXVA2_VLD);
TEST_PIX_FMT_RETURN(RGB444BE);
TEST_PIX_FMT_RETURN(RGB444LE);
@@ -559,7 +567,8 @@ void FfmpegVideoOutputStream::WriteFrame(AVFrame* frame)
int ret;
int got_packet = 1;
-
+
+#if FF_API_LAVF_FMT_RAWPICTURE
// Setup AVPacket
if (recorder.oc->oformat->flags & AVFMT_RAWPICTURE) {
/* Raw video case - directly store the picture in the packet */
@@ -569,6 +578,10 @@ void FfmpegVideoOutputStream::WriteFrame(AVFrame* frame)
pkt.pts = frame->pts;
ret = 0;
} else {
+#else
+ {
+#endif
+
/* encode the image */
#if (LIBAVFORMAT_VERSION_MAJOR >= 54)
ret = avcodec_encode_video2(stream->codec, &pkt, frame, &got_packet);

View File

@ -6,6 +6,7 @@ vcpkg_from_github(
REF v0.5
SHA512 7ebeec108f33f1aa8b1ad08e3ca128a837b22d33e3fc580021f981784043b023a1bf563bbfa8b51d46863db770b336d24fc84ee3d836b85e0da1848281b2a5b2
HEAD_REF master
PATCHES deprecated_constants.patch # Change from upstream pangolin to address build failures from latest ffmpeg library
)
file(REMOVE ${SOURCE_PATH}/CMakeModules/FindGLEW.cmake)

View File

@ -0,0 +1,3 @@
Source: rapidstring
Version: 2018-08-03
Description: rapidstring is maybe the fastest string library ever written in ANSI C.

View File

@ -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)

View File

@ -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)

View File

@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.8)
project(sajson)
add_library(sajson INTERFACE)
target_compile_features(sajson INTERFACE cxx_std_11)
target_include_directories(sajson INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
$<INSTALL_INTERFACE:include>)
install(DIRECTORY include/
DESTINATION include
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN "*.h"
)
install(TARGETS sajson EXPORT unofficial-sajson-config)
install(EXPORT unofficial-sajson-config
FILE unofficial-sajson-config.cmake
NAMESPACE unofficial::sajson::
DESTINATION share/cmake/unofficial-sajson
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)

3
ports/sajson/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: sajson
Version: 2018-09-21
Description: Lightweight, extremely high-performance JSON parser for C++11

View File

@ -0,0 +1,27 @@
# Header-only library
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO chadaustin/sajson
REF 2dcfd350586375f9910f74821d4f07d67ae455ba
SHA512 6029a640f8bd6c7cefc507819a18a708f6d7e9ce84fdd2998506cea26d597b999d2776a7307908f5df02994bc53c3c9bdf6a73344ab70ee6a5c775b54351e7d2
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/unofficial-sajson TARGET_PATH share/unofficial-sajson)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
# Handle copyright
configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/sajson/copyright COPYONLY)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,18 @@
cmake_minimum_required (VERSION 3.9)
project (sparsepp)
set(HEADERS
sparsepp/spp.h
sparsepp/spp_config.h
sparsepp/spp_dlalloc.h
sparsepp/spp_memory.h
sparsepp/spp_smartptr.h
sparsepp/spp_stdint.h
sparsepp/spp_timer.h
sparsepp/spp_traits.h
sparsepp/spp_utils.h
)
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES ${HEADERS} DESTINATION include/sparsepp)
endif()

3
ports/sparsepp/CONTROL Normal file
View File

@ -0,0 +1,3 @@
Source: sparsepp
Version: 1.22
Description: A fast, memory efficient hash map for C++

View File

@ -0,0 +1,32 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO greg7mdp/sparsepp
REF 1.22
SHA512 b660cd7de48fcab50d4a0df4e4813226b0b0a8a3791aba4e4cc6a456af7bba0be6694bc44781a7d00b5582b32b1d85b9afa83095b7e5c0a26d1b0344ddc94b0f
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
)
# Note: we could add: OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
# but it's an header only package, so there's no INSTALL target. So
# we remove the duplicate headers.
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sparsepp RENAME copyright)

View File

@ -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

View File

@ -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)
function(_vtk_remove_tool TOOL_NAME)
set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe)
if(EXISTS ${filename})
file(REMOVE ${filename})
endif()
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}.exe)
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()
# =============================================================================

View File

@ -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)

View File

@ -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

View File

@ -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()

View File

@ -1,4 +1,4 @@
Source: xalan-c
Version: 1.11-4
Version: 1.11-5
Description: Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types
Build-Depends: xerces-c

View File

@ -10,6 +10,18 @@ vcpkg_download_distfile(ARCHIVE
SHA512 2e79a2c8f755c9660ffc94b26b6bd4b140685e05a88d8e5abb19a2f271383a3f2f398b173ef403f65dc33af75206214bd21ac012c39b4c0051b3a9f61f642fe6
)
vcpkg_download_distfile(XALAN_PATCH8
URLS "https://github.com/rleigh-codelibre/vcpkg-patches/raw/ca09d69280469ce8f787c67b48f86e46a463ef5d/xalan-c/0008-remove-unary-binary-function.patch"
FILENAME "0008-remove-unary-binary-function.patch"
SHA512 059d9a39b29125ae770369e4c44ab7804ae16d4ff5c90e35f25b7990dc987161bf1187ceb2dcbab181ffb72490a9d9f45e30ab5928644734e7627cb74b03e201
)
vcpkg_download_distfile(XALAN_PATCH9
URLS "https://raw.githubusercontent.com/rleigh-codelibre/vcpkg-patches/ca09d69280469ce8f787c67b48f86e46a463ef5d/xalan-c/0009-remove-select-workaround.patch"
FILENAME "0009-remove-select-workaround.patch"
SHA512 73730736cd1f1809ebcc35562017402d606cbfd5a64665d104a21d89d679ab3274f6f5685ab63305c57fffab74e62084c0e18c76d19eb5f9c2e36be6679fd4d3
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
@ -22,6 +34,8 @@ vcpkg_extract_source_archive_ex(
0005-fix-ftbfs-ld-as-needed.patch
0006-fix-testxslt-segfault.patch
0007-fix-readme-typos.patch
${XALAN_PATCH8}
${XALAN_PATCH9}
)
if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86")

View File

@ -1,3 +1,7 @@
Source: xerces-c
Version: 3.2.2-5
Version: 3.2.2-6
Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs.
Feature: icu
Description: ICU support
Build-Depends: icu

View File

@ -9,6 +9,11 @@ vcpkg_from_github(
PATCHES disable-tests.patch
)
set(DISABLE_ICU ON)
if("icu" IN_LIST FEATURES)
set(DISABLE_ICU OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@ -16,6 +21,7 @@ vcpkg_configure_cmake(
-DDISABLE_TESTS=ON
-DDISABLE_DOC=ON
-DDISABLE_SAMPLES=ON
-DCMAKE_DISABLE_FIND_PACKAGE_ICU=${DISABLE_ICU}
)
vcpkg_install_cmake()

View File

@ -1,12 +1,23 @@
#!/bin/sh
vcpkgDisableMetrics="OFF"
vcpkgUseSystem=false
for var in "$@"
do
if [ "$var" = "-disableMetrics" ]; then
if [ "$var" = "-disableMetrics" -o "$var" = "--disableMetrics" ]; then
vcpkgDisableMetrics="ON"
elif [ "$var" = "-useSystemBinaries" -o "$var" = "--useSystemBinaries" ]; then
vcpkgUseSystem=true
elif [ "$var" = "-help" -o "$var" = "--help" ]; then
echo "Usage: ./bootstrap-vcpkg.sh [options]"
echo
echo "Options:"
echo " -help Display usage help"
echo " -disableMetrics Do not build metrics reporting into the executable"
echo " -useSystemBinaries Force use of the system utilities for building vcpkg"
exit 1
else
echo "Unknown argument $var"
echo "Unknown argument $var. Use '-help' for help."
exit 1
fi
done
@ -191,13 +202,13 @@ selectCXX()
if [ "$gccversion" -lt "6" ]; then
echo "CXX ($CXX) is too old; please install a newer compiler such as g++-7."
echo "On Ubuntu try the following:"
echo "sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y"
echo "sudo apt-get update -y"
echo "sudo apt-get install g++-7 -y"
echo " sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y"
echo " sudo apt-get update -y"
echo " sudo apt-get install g++-7 -y"
echo "On CentOS try the following:"
echo "sudo yum install centos-release-scl"
echo "sudo yum install devtoolset-7"
echo "scl enable devtoolset-7 bash"
echo " sudo yum install centos-release-scl"
echo " sudo yum install devtoolset-7"
echo " scl enable devtoolset-7 bash"
return 1
fi
@ -206,8 +217,14 @@ selectCXX()
# Preparation
UNAME="$(uname)"
fetchTool "cmake" "$UNAME" cmakeExe || exit 1
fetchTool "ninja" "$UNAME" ninjaExe || exit 1
if $vcpkgUseSystem; then
cmakeExe="cmake"
ninjaExe="ninja"
else
fetchTool "cmake" "$UNAME" cmakeExe || exit 1
fetchTool "ninja" "$UNAME" ninjaExe || exit 1
fi
selectCXX CXX || exit 1
# Do the build

View File

@ -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)

View File

@ -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()

View File

@ -16,5 +16,9 @@ if(NOT _CMAKE_IN_TRY_COMPILE)
string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ")
string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ")
if(VCPKG_CRT_LINKAGE STREQUAL "static")
string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT "-static ")
string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT "-static ")
endif()
endif()
endif()

View File

@ -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>

View File

@ -171,8 +171,10 @@ static void inner(const VcpkgCmdArguments& args)
default_triplet = Triplet::from_canonical_name("x64-osx");
#elif defined(__FreeBSD__)
default_triplet = Triplet::from_canonical_name("x64-freebsd");
#else
#elif defined(__GLIBC__)
default_triplet = Triplet::from_canonical_name("x64-linux");
#else
default_triplet = Triplet::from_canonical_name("x64-linux-musl");
#endif
}
}

View File

@ -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);

View File

@ -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;

View File

@ -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,
struct ToolProvider
{
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;
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;
};
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)
{
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;
}
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]);
});
if (it == candidates.cend())
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,71 +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
CMake suite maintained and supported by Kitware (kitware.com/cmake).
*/
return StringRange::find_exactly_one_enclosed(rc.output, "cmake version ", "\n").to_string();
}
};
static PathAndVersion get_path(const VcpkgPaths& paths)
auto& exe_stem = tool.exe_stem();
if (!exe_stem.empty())
{
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());
auto paths_from_path = fs.find_from_PATH(exe_stem);
candidate_paths.insert(candidate_paths.end(), paths_from_path.cbegin(), paths_from_path.cend());
}
tool.add_special_paths(candidate_paths);
const auto maybe_path = find_first_with_sufficient_version(fs, tool, candidate_paths, min_version);
if (const auto p = maybe_path.get())
{
return *p;
}
if (auto tool_data = maybe_tool_data.get())
{
return fetch_tool(paths, tool, *tool_data);
}
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);
@ -295,190 +302,131 @@ namespace vcpkg
#endif
}
namespace Ninja
struct NinjaProvider : ToolProvider
{
struct NinjaVersionProvider : VersionProvider
std::string m_exe = "ninja";
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 Optional<std::string> get_version(const fs::path& path_to_exe) const override
{
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)
{
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;
}
/* Sample output:
1.8.2
*/
return rc.output;
}
};
static PathAndVersion get_path(const VcpkgPaths& paths)
{
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())
{
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
std::string m_exe = "nuget";
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}; }
virtual Optional<std::string> get_version(const fs::path& path_to_exe) const override
{
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)
{
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;
}
/* 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();
}
};
static PathAndVersion get_path(const VcpkgPaths& paths)
{
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())
{
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
std::string m_exe = "git";
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}; }
virtual void add_special_paths(std::vector<fs::path>& out_candidate_paths) const
{
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;
}
/* 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);
}
};
static PathAndVersion get_path(const VcpkgPaths& paths)
{
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");
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())
{
return *p;
}
return fetch_tool(paths, Tools::GIT, TOOL_DATA, version_provider);
if (const auto pf = program_files_32_bit.get())
out_candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe");
#endif
}
}
namespace IfwInstallerBase
{
struct IfwInstallerBaseVersionProvider : VersionProvider
virtual Optional<std::string> get_version(const fs::path& path_to_exe) const override
{
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)
{
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;
}
/* Sample output:
3.1.81
*/
return rc.output;
return nullopt;
}
};
static PathAndVersion get_path(const VcpkgPaths& paths)
/* 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);
}
};
struct IfwInstallerBaseProvider : ToolProvider
{
std::string m_exe = "";
std::string m_toolname = "installerbase";
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}; }
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");
// 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())
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
{
@ -496,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;
@ -512,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);
});