aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md75
-rw-r--r--README.md2
-rw-r--r--docs/maintainers/control-files.md53
-rw-r--r--docs/specifications/feature-packages.md2
-rw-r--r--ports/catch2/CONTROL2
-rw-r--r--ports/catch2/portfile.cmake4
-rw-r--r--ports/cgicc/CMakeLists.txt115
-rw-r--r--ports/cgicc/CONTROL3
-rw-r--r--ports/cgicc/portfile.cmake25
-rw-r--r--ports/curl/CONTROL3
-rw-r--r--ports/curl/portfile.cmake13
-rw-r--r--ports/discord-rpc/CONTROL2
-rw-r--r--ports/discord-rpc/fix-debug.diff24
-rw-r--r--ports/discord-rpc/portfile.cmake21
-rw-r--r--ports/dlib/CONTROL2
-rw-r--r--ports/dlib/portfile.cmake8
-rw-r--r--ports/forest/CONTROL3
-rw-r--r--ports/forest/portfile.cmake16
-rw-r--r--ports/gflags/CONTROL2
-rw-r--r--ports/gflags/fix-install.patch15
-rw-r--r--ports/gflags/portfile.cmake7
-rw-r--r--ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch37
-rw-r--r--ports/gtest/CONTROL2
-rw-r--r--ports/libbson/CONTROL2
-rw-r--r--ports/libbson/portfile.cmake43
-rw-r--r--ports/libdisasm/CMakeLists.txt46
-rw-r--r--ports/libdisasm/CONTROL3
-rw-r--r--ports/libdisasm/portfile.cmake34
-rw-r--r--ports/libdisasm/sizeofvoid.patch29
-rw-r--r--ports/libspatialite/CONTROL2
-rw-r--r--ports/libspatialite/fix-latin-literals.patch108
-rw-r--r--ports/libspatialite/portfile.cmake1
-rw-r--r--ports/libwebsockets/0001-Fix-UWP.patch120
-rw-r--r--ports/libwebsockets/CONTROL2
-rw-r--r--ports/libwebsockets/portfile.cmake20
-rw-r--r--ports/libzip/CONTROL2
-rw-r--r--ports/libzip/cmake_dont_build_more_than_needed.patch19
-rw-r--r--ports/libzip/enable-static.patch77
-rw-r--r--ports/libzip/fix-attribute.patch12
-rw-r--r--ports/libzip/portfile.cmake31
-rw-r--r--ports/log4cplus/portfile.cmake2
-rw-r--r--ports/lz4/CONTROL2
-rw-r--r--ports/lz4/portfile.cmake4
-rw-r--r--ports/mongo-c-driver/CONTROL2
-rw-r--r--ports/mongo-c-driver/portfile.cmake43
-rw-r--r--ports/msmpi/portfile.cmake5
-rw-r--r--ports/opengl/CONTROL4
-rw-r--r--ports/opengl/portfile.cmake12
-rw-r--r--ports/openni2/CONTROL2
-rw-r--r--ports/openni2/openni2deploy.ps118
-rw-r--r--ports/openni2/portfile.cmake16
-rw-r--r--ports/openssl/CONTROL2
-rw-r--r--ports/openssl/RemoveNonASCIIChar.patch13
-rw-r--r--ports/openssl/portfile.cmake1
-rw-r--r--ports/openvr/CONTROL2
-rw-r--r--ports/openvr/portfile.cmake21
-rw-r--r--ports/osg/CONTROL2
-rw-r--r--ports/osg/portfile.cmake2
-rw-r--r--ports/qt5-base/CONTROL4
-rw-r--r--ports/qt5-base/portfile.cmake1
-rw-r--r--ports/qt5-base/qtdeploy.ps18
-rw-r--r--ports/realsense2/CONTROL2
-rw-r--r--ports/realsense2/portfile.cmake4
-rw-r--r--ports/sciter/CONTROL2
-rw-r--r--ports/sciter/portfile.cmake4
-rw-r--r--ports/wincrypt/portfile.cmake10
-rw-r--r--ports/winsock2/portfile.cmake10
-rw-r--r--scripts/VcpkgPowershellUtils-ClearEnvironment.ps152
-rw-r--r--scripts/VcpkgPowershellUtils.ps135
-rw-r--r--scripts/addPoshVcpkgToPowershellProfile.ps12
-rw-r--r--scripts/bootstrap.ps146
-rw-r--r--scripts/buildsystems/msbuild/applocal.ps16
-rw-r--r--scripts/cmake/vcpkg_apply_patches.cmake2
-rw-r--r--scripts/fetchDependency.ps133
-rw-r--r--scripts/findAnyMSBuildWithCppPlatformToolset.ps12
-rw-r--r--scripts/findVisualStudioInstallationInstances.ps12
-rw-r--r--toolsrc/VERSION.txt2
-rw-r--r--toolsrc/include/tests.utils.h3
-rw-r--r--toolsrc/include/vcpkg/base/span.h14
-rw-r--r--toolsrc/include/vcpkg/dependencies.h40
-rw-r--r--toolsrc/include/vcpkg/remove.h2
-rw-r--r--toolsrc/include/vcpkg/statusparagraph.h17
-rw-r--r--toolsrc/include/vcpkg/statusparagraphs.h9
-rw-r--r--toolsrc/include/vcpkg/versiont.h1
-rw-r--r--toolsrc/src/tests.plan.cpp10
-rw-r--r--toolsrc/src/tests.statusparagraphs.cpp10
-rw-r--r--toolsrc/src/tests.utils.cpp8
-rw-r--r--toolsrc/src/vcpkg.cpp4
-rw-r--r--toolsrc/src/vcpkg/build.cpp11
-rw-r--r--toolsrc/src/vcpkg/commands.cache.cpp2
-rw-r--r--toolsrc/src/vcpkg/commands.create.cpp2
-rw-r--r--toolsrc/src/vcpkg/commands.exportifw.cpp15
-rw-r--r--toolsrc/src/vcpkg/commands.hash.cpp4
-rw-r--r--toolsrc/src/vcpkg/commands.list.cpp2
-rw-r--r--toolsrc/src/vcpkg/dependencies.cpp148
-rw-r--r--toolsrc/src/vcpkg/export.cpp5
-rw-r--r--toolsrc/src/vcpkg/install.cpp31
-rw-r--r--toolsrc/src/vcpkg/remove.cpp41
-rw-r--r--toolsrc/src/vcpkg/statusparagraph.cpp12
-rw-r--r--toolsrc/src/vcpkg/statusparagraphs.cpp45
-rw-r--r--toolsrc/src/vcpkg/vcpkglib.cpp6
-rw-r--r--toolsrc/src/vcpkg/vcpkgpaths.cpp4
-rw-r--r--toolsrc/src/vcpkg/versiont.cpp1
103 files changed, 1199 insertions, 615 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e2e2b42b9..59da20df1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,78 @@
+vcpkg (0.0.103)
+--------------
+ * `vcpkg upgrade`: Fix issue with any command executing more than 10 transactions with mixed transaction types (install + remove)
+
+-- vcpkg team <vcpkg@microsoft.com> WED, 24 Jan 2017 14:30:00 -0800
+
+
+vcpkg (0.0.102)
+--------------
+ * Add ports:
+ - catch-classic 1.12.0
+ - catch2 2.1.0
+ - cgicc 3.2.19
+ - libdisasm 0.23
+ - qt5-3d 5.9.2-0
+ - qt5-base 5.9.2-1
+ - qt5-charts 5.9.2-0
+ - qt5-datavis3d 5.9.2-0
+ - qt5-declarative 5.9.2-0
+ - qt5-gamepad 5.9.2-0
+ - qt5-imageformats 5.9.2-0
+ - qt5-modularscripts 1
+ - qt5-multimedia 5.9.2-0
+ - qt5-networkauth 5.9.2-0
+ - qt5-scxml 5.9.2-0
+ - qt5-serialport 5.9.2-0
+ - qt5-speech 5.9.2-0
+ - qt5-svg 5.9.2-0
+ - qt5-tools 5.9.2-0
+ - qt5-virtualkeyboard 5.9.2-0
+ - qt5-websockets 5.9.2-0
+ - qt5-winextras 5.9.2-0
+ - qt5-xmlpatterns 5.9.2-0
+ - tre 0.8.0-1
+ * Update ports:
+ - boost-asio 1.66.0 -> 1.66.0-1
+ - boost-build 1.66.0 -> 1.66.0-3
+ - boost-vcpkg-helpers 3 -> 4
+ - corrade jun2017-3 -> jan2018-1
+ - curl 7.57.0-1 -> 7.57.0-2
+ - date 2.3-c286981b3bf83c79554769df68b27415cee68d77 -> 2.4
+ - discord-rpc 2.0.1 -> 2.1.0
+ - dlib 19.8 -> 19.9
+ - libbson 1.9.0 -> 1.9.2
+ - libconfig 1.7.1 -> 1.7.2
+ - libjpeg-turbo 1.5.2-2 -> 1.5.3
+ - libodb 2.4.0-1 -> 2.4.0-2
+ - libogg 1.3.2-cab46b1-3 -> 1.3.3
+ - libwebp 0.6.0-2 -> 0.6.1
+ - libwebsockets 2.0.0-4 -> 2.4.1
+ - lz4 1.8.0-1 -> 1.8.1.2
+ - magnum jun2017-6 -> jan2018-1
+ - magnum-plugins jun2017-5 -> jan2018-1
+ - mongo-c-driver 1.9.0 -> 1.9.2
+ - mpg123 1.25.8 -> 1.25.8-1
+ - openni2 2.2.0.33-4 -> 2.2.0.33-7
+ - osg 3.5.6-1 -> 3.5.6-2
+ - poco 1.8.0.1 -> 1.8.1
+ - qca 2.2.0-1 -> 2.2.0-2
+ - qscintilla 2.10-1 -> 2.10-4
+ - qt5 5.8-6 -> 5.9.2-1
+ - qwt 6.1.3-2 -> 6.1.3-4
+ - sciter 4.1.0 -> 4.1.1
+ - sdl2 2.0.7-3 -> 2.0.7-4
+ - tiff 4.0.8-1 -> 4.0.9
+ - xxhash 0.6.3-1 -> 0.6.4
+ * Remove usage of `BITS-transfer`. Use .NET functions (which used to be the fallback if `BITS-transfer` failed) by default.
+ * Enable the usage of `feature-packages` by default. More info [here](docs/specifications/feature-packages.md).
+ * Bootstrapping `vcpkg` now happens in a clean environment to avoid issues when building in a VS Developer Prompt among others.
+ * Update required version & auto-downloaded version of `cmake` to 3.10.2
+ * Update required version & auto-downloaded version of `vswhere` to 2.3.2
+
+-- vcpkg team <vcpkg@microsoft.com> TUE, 23 Jan 2018 17:00:00 -0800
+
+
vcpkg (0.0.101)
--------------
* Add ports:
diff --git a/README.md b/README.md
index 6cb2d9755..85f8fc922 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ Prerequisites:
- Windows 10, 8.1, or 7
- Visual Studio 2017 or Visual Studio 2015 Update 3
- Git
-- *Optional: CMake 3.10.1*
+- *Optional: CMake 3.10.2*
Clone this repository, then run
```
diff --git a/docs/maintainers/control-files.md b/docs/maintainers/control-files.md
index 17cb50311..eb03f1d94 100644
--- a/docs/maintainers/control-files.md
+++ b/docs/maintainers/control-files.md
@@ -1,16 +1,29 @@
# CONTROL files
+
Each port has some static metadata in the form of a `CONTROL` file. This file uses the same syntax and a subset of the fields from [the Debian `control` format][debian].
Field names are case-sensitive.
[debian]: https://www.debian.org/doc/debian-policy/ch-controlfields.html
-## Recognized fields
+## Source Paragraph
+
+The first paragraph appearing in a `CONTROL` file is the Source paragraph, which defines the core attributes of the package (name, version, and so on).
+
+### Example:
+```no-highlight
+Source: vtk
+Version: 8.1.0-1
+Description: Software system for 3D computer graphics, image processing, and visualization
+Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype
+```
+
+### Recognized fields
-### Source
+#### Source
The name of the port.
-### Version
+#### Version
The port version.
This field should be an alphanumeric string which may also contain `.`, `_`, or `-`. No attempt at ordering versions is made; all versions are treated as bitstrings and are only evaluated for equality.
@@ -22,15 +35,15 @@ Example:
Version: 1.0.5-2
```
-### Description
+#### Description
A description of the library
The first sentence of the description should concisely describe the purpose and contents of the library. Then, a larger description including the library's "proper name" should follow.
-### Maintainer
+#### Maintainer
Reserved for future use.
-### Build-Depends
+#### Build-Depends
The list of dependencies required to build and use this library.
Example:
@@ -49,3 +62,31 @@ Example:
Build-Depends: zlib (windows), openssl (windows), boost (windows), websocketpp (windows)
```
+## Feature Paragraphs
+
+After the Source Paragraph, `CONTROL` files can list zero or more Feature Paragraphs which declare features.
+
+### Example:
+```no-highlight
+Source: vtk
+Version: 8.1.0-1
+Description: Software system for 3D computer graphics, image processing, and visualization
+Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype
+
+Feature: mpi
+Description: MPI functionality for VTK
+Build-Depends: msmpi, hdf5[parallel]
+```
+
+### Recognized fields
+
+#### Feature
+The name of the feature.
+
+#### Description
+A description of the feature
+
+#### Build-Depends
+The list of dependencies required to build and use this feature.
+
+All dependencies from selected features are unioned together to produce the final dependency set for the build. This field follows the same syntax as `Build-Depends` in the Source Paragraph.
diff --git a/docs/specifications/feature-packages.md b/docs/specifications/feature-packages.md
index 2c7f60ff9..198a602ba 100644
--- a/docs/specifications/feature-packages.md
+++ b/docs/specifications/feature-packages.md
@@ -1,5 +1,7 @@
# Proposal: Features / Feature packages (Feb 23 2017)
+**Note: this is the proposal as it was initially accepted and does not neccessarily reflect the current behavior.**
+
## 1. Motivation
### A. OpenCV + CUDA
diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL
index 6eeb40c21..0f169ae4e 100644
--- a/ports/catch2/CONTROL
+++ b/ports/catch2/CONTROL
@@ -1,4 +1,4 @@
Source: catch2
-Version: 2.1.0
+Version: 2.1.1
Description: A modern, header-only test framework for unit testing.
Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2
diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake
index 635bc385a..34adb60db 100644
--- a/ports/catch2/portfile.cmake
+++ b/ports/catch2/portfile.cmake
@@ -1,11 +1,11 @@
include(vcpkg_common_functions)
-set(CATCH_VERSION v2.1.0)
+set(CATCH_VERSION v2.1.1)
vcpkg_download_distfile(HEADER
URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp"
FILENAME "catchorg-catch2-${CATCH_VERSION}.hpp"
- SHA512 967a9b4046ec2c72f094bebae381b5090e88358faefde9bdbca3d7e058c299c1bed0542653de79c857f78139d7969b0815bb8b8a60ff13e2144fcb7af2a2020c
+ SHA512 52a3161b92b7a21b360ce023b69b881c23869fa9194f22b4aadc9b3d1415520a1b525d5dd22b599495bef6ad4f051ecf853528c0e6296d2bf0c1bf99842bce52
)
vcpkg_download_distfile(LICENSE
diff --git a/ports/cgicc/CMakeLists.txt b/ports/cgicc/CMakeLists.txt
new file mode 100644
index 000000000..0a9ad3e13
--- /dev/null
+++ b/ports/cgicc/CMakeLists.txt
@@ -0,0 +1,115 @@
+
+cmake_minimum_required (VERSION 3.8)
+project (cgicc)
+include (CheckIncludeFiles)
+include(CheckSymbolExists)
+include (CheckCXXSourceCompiles)
+
+set (VERSION "3.2.19")
+execute_process (COMMAND hostname OUTPUT_VARIABLE HOST OUTPUT_STRIP_TRAILING_WHITESPACE)
+check_include_files (dlfcn.h HAVE_DLFCN_H)
+check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY)
+check_include_files (inttypes.h HAVE_INTTYPES_H)
+check_include_files (memory.h HAVE_MEMORY_H)
+
+check_cxx_source_compiles ("
+ namespace test { }
+ int main(int, char**) {
+ using namespace ::test;
+}" HAVE_NAMESPACES)
+check_include_files (stdint.h HAVE_STDINT_H)
+check_include_files (stdlib.h HAVE_STDLIB_H)
+set (CMAKE_REQUIRED_FLAGS "-DHAVE_NAMESPACES")
+check_cxx_source_compiles ("
+ #include <list>
+ #include <deque>
+ #ifdef HAVE_NAMESPACES
+ using namespace std;
+#endif
+int
+main ()
+{
+list<int> x; x.push_back(5);
+list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;
+ ;
+ return 0;
+}" HAVE_STL)
+check_include_files (strings.h HAVE_STRINGS_H)
+check_include_files (string.h HAVE_STRING_H)
+check_include_files (sys/stat.h HAVE_SYS_STAT_H)
+check_include_files (sys/time.h HAVE_SYS_TIME_H)
+check_include_files (sys/types.h HAVE_SYS_TYPES_H)
+check_include_files (sys/utsname.h HAVE_SYS_UTSNAME_H)
+check_symbol_exists (uname sys/utsname.h HAVE_UNAME)
+check_include_files (unistd.h HAVE_UNISTD_H)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/CgiDefs.h.in ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h)
+add_definitions (-DHAVE_CONFIG_H)
+set (cgicc_SOURCES
+ cgicc/CgiEnvironment.cpp
+ cgicc/CgiInput.cpp
+ cgicc/CgiUtils.cpp
+ cgicc/Cgicc.cpp
+ cgicc/FormEntry.cpp
+ cgicc/FormFile.cpp
+ cgicc/HTMLAttribute.cpp
+ cgicc/HTMLAttributeList.cpp
+ cgicc/HTMLDoctype.cpp
+ cgicc/HTMLElement.cpp
+ cgicc/HTMLElementList.cpp
+ cgicc/HTTPContentHeader.cpp
+ cgicc/HTTPCookie.cpp
+ cgicc/HTTPHTMLHeader.cpp
+ cgicc/HTTPHeader.cpp
+ cgicc/HTTPPlainHeader.cpp
+ cgicc/HTTPRedirectHeader.cpp
+ cgicc/HTTPResponseHeader.cpp
+ cgicc/HTTPStatusHeader.cpp
+ cgicc/HTTPXHTMLHeader.cpp
+ cgicc/MStreamable.cpp
+ cgicc/XHTMLDoctype.cpp
+cgicc/XMLPI.cpp)
+set (cgicc_HEADERS
+ cgicc/Cgicc.h
+ cgicc/CgiEnvironment.h
+ cgicc/CgiInput.h
+ cgicc/CgiUtils.h
+ cgicc/FormEntry.h
+ cgicc/FormFile.h
+ cgicc/HTMLAtomicElement.h
+ cgicc/HTMLAttribute.h
+ cgicc/HTMLAttributeList.h
+ cgicc/HTMLBooleanElement.h
+ cgicc/HTMLClasses.h
+ cgicc/HTMLDoctype.h
+ cgicc/HTMLElement.h
+ cgicc/HTMLElementList.h
+ cgicc/HTTPContentHeader.h
+ cgicc/HTTPCookie.h
+ cgicc/HTTPHeader.h
+ cgicc/HTTPHTMLHeader.h
+ cgicc/HTTPPlainHeader.h
+ cgicc/HTTPRedirectHeader.h
+ cgicc/HTTPResponseHeader.h
+ cgicc/HTTPStatusHeader.h
+ cgicc/HTTPXHTMLHeader.h
+ cgicc/MStreamable.h
+ cgicc/XHTMLDoctype.h
+ cgicc/XMLDeclaration.h
+ cgicc/XMLPI.h
+ ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h
+ ${CMAKE_CURRENT_BINARY_DIR}/config.h
+)
+
+include_directories (. ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+add_library (cgicc ${cgicc_SOURCES} ${cgicc_HEADERS})
+
+install(TARGETS cgicc
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES ${cgicc_HEADERS} DESTINATION include/cgicc)
+endif()
diff --git a/ports/cgicc/CONTROL b/ports/cgicc/CONTROL
new file mode 100644
index 000000000..6caa44df1
--- /dev/null
+++ b/ports/cgicc/CONTROL
@@ -0,0 +1,3 @@
+Source: cgicc
+Version: 3.2.19
+Description: GNU Cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web
diff --git a/ports/cgicc/portfile.cmake b/ports/cgicc/portfile.cmake
new file mode 100644
index 000000000..9851e0f80
--- /dev/null
+++ b/ports/cgicc/portfile.cmake
@@ -0,0 +1,25 @@
+
+include(vcpkg_common_functions)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Warning: Dynamic building not supported. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+ endif()
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/cgicc-3.2.19)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://ftp.gnu.org/gnu/cgicc/cgicc-3.2.19.tar.gz"
+ FILENAME "cgicc-3.2.19.tar.gz"
+ SHA512 c361923cf3ac876bc3fc94dffd040d2be7cd44751d8534f4cfa3545e9f58a8ec35ebcd902a8ce6a19da0efe52db67506d8b02e5cc868188d187ce3092519abdf
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/COPYING.DOC DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgicc RENAME copyright)
diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL
index cdc514006..450f43d59 100644
--- a/ports/curl/CONTROL
+++ b/ports/curl/CONTROL
@@ -1,4 +1,5 @@
Source: curl
-Version: 7.57.0-1
+Version: 7.58.0
Build-Depends: zlib, openssl, libssh2
Description: A library for transferring data with URLs
+# For WINSSL create target triplet which contains set(CURL_USE_WINSSL ON)
diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake
index 8a5d17ed6..64001704a 100644
--- a/ports/curl/portfile.cmake
+++ b/ports/curl/portfile.cmake
@@ -2,8 +2,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO curl/curl
- REF curl-7_57_0
- SHA512 19f963d86682153d2d73731c784adf6457bc3fd48b628d6d701649f64718b10df268797ce21ad5f5339efc5df81b8547772edcc36c046665309e32997d5d1afc
+ REF curl-7_58_0
+ SHA512 148c25152732dd5ad2626bc70c7725577e25033a73eecefa4dd820927ec552f9c2d0235cc3f597404d3893eced7d5d2bd9522f6302b7f930e9f65912ac2c91f6
HEAD_REF master
)
@@ -20,6 +20,12 @@ else()
SET(CURL_STATICLIB ON)
endif()
+set(USE_OPENSSL ON)
+if(CURL_USE_WINSSL)
+ set(USE_OPENSSL OFF)
+ set(USE_WINSSL ON)
+endif()
+
set(UWP_OPTIONS)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(UWP_OPTIONS
@@ -43,7 +49,8 @@ vcpkg_configure_cmake(
-DBUILD_CURL_EXE=OFF
-DENABLE_MANUAL=OFF
-DCURL_STATICLIB=${CURL_STATICLIB}
- -DCMAKE_USE_OPENSSL=ON
+ -DCMAKE_USE_OPENSSL=${USE_OPENSSL}
+ -DCMAKE_USE_WINSSL=${USE_WINSSL}
OPTIONS_DEBUG
-DENABLE_DEBUG=ON
)
diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL
index e6d3462aa..94769dae5 100644
--- a/ports/discord-rpc/CONTROL
+++ b/ports/discord-rpc/CONTROL
@@ -1,3 +1,3 @@
Source: discord-rpc
-Version: 2.0.1
+Version: 2.1.0
Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together.
diff --git a/ports/discord-rpc/fix-debug.diff b/ports/discord-rpc/fix-debug.diff
deleted file mode 100644
index df33249b9..000000000
--- a/ports/discord-rpc/fix-debug.diff
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -30,7 +30,6 @@ if(WIN32)
- set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_win.cpp discord_register_win.cpp)
- add_library(discord-rpc ${RPC_LIBRARY_TYPE} ${BASE_RPC_SRC})
- target_compile_options(discord-rpc PRIVATE /EHsc
-- /MT
- /Wall
- /wd4100 # unreferenced formal parameter
- /wd4514 # unreferenced inline
-@@ -102,13 +101,10 @@ install(
- EXPORT "discord-rpc"
- RUNTIME
- DESTINATION "bin"
-- CONFIGURATIONS Release
- LIBRARY
- DESTINATION "lib"
-- CONFIGURATIONS Release
- ARCHIVE
- DESTINATION "lib"
-- CONFIGURATIONS Release
- INCLUDES
- DESTINATION "include"
- )
diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake
index ea59126a3..9c35458a3 100644
--- a/ports/discord-rpc/portfile.cmake
+++ b/ports/discord-rpc/portfile.cmake
@@ -3,28 +3,19 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO discordapp/discord-rpc
- REF v2.0.1
- SHA512 496f8f34184c4be3c3341b05ebd440a9e89e36ecf15747ea8f4d1cc0404f1341404fda6c8358a2c08e0149023775472ea78603b9d41687f1004828523debda99
+ REF v2.1.0
+ SHA512 24bbc391670bfb53f0501ed189cef8193f35332de9fff3016fc18eb7eab4970d5c90576aa95dfcc4f1ef553e8b1ea781e1e40e595cbbcc1c4200e4ff174369de
HEAD_REF master
)
-vcpkg_apply_patches(
- SOURCE_PATH
- ${SOURCE_PATH}
- PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/fix-debug.diff
-)
-
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- set(BUILD_DYNAMIC_LIB ON)
-else()
- set(BUILD_DYNAMIC_LIB OFF)
+set(STATIC_CRT OFF)
+if(VCPKG_CRT_LINKAGE STREQUAL static)
+ set(STATIC_CRT ON)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
- -DBUILD_DYNAMIC_LIB=${BUILD_DYNAMIC_LIB}
+ OPTIONS -DUSE_STATIC_CRT=${STATIC_CRT}
)
vcpkg_install_cmake()
diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL
index 51f4d1e03..d711849f0 100644
--- a/ports/dlib/CONTROL
+++ b/ports/dlib/CONTROL
@@ -1,5 +1,5 @@
Source: dlib
-Version: 19.8
+Version: 19.9-1
Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack
Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++
diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake
index 99784551a..cf3ae4079 100644
--- a/ports/dlib/portfile.cmake
+++ b/ports/dlib/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO davisking/dlib
- REF v19.8
- SHA512 5fbe306dab1fe025de0892808431ddc4bc6f3e91eb509881a0b341dd2d0a5a36c5d99d45ece19c428d6025b0601b996cab4b554332323a0c73a65d66b82db01a
+ REF v19.9
+ SHA512 1e2123c22e1b13cc84108fa627bfa92eadc9dee63f93a9f45676bbf2b752c8728117d915ac327f5223b0cdbce87dd3bef2f4d8d5ed3f8f5a314ffa9e8962a246
HEAD_REF master
)
@@ -61,8 +61,8 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm)
# Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead.
file(READ ${CURRENT_PACKAGES_DIR}/include/dlib/config.h _contents)
-string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if !defined(NDEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents})
-string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if defined(NDEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents})
+string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if defined(_DEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents})
+string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents})
file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h ${_contents})
file(READ ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake _contents)
diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL
new file mode 100644
index 000000000..522668d9d
--- /dev/null
+++ b/ports/forest/CONTROL
@@ -0,0 +1,3 @@
+Source: forest
+Version: 4.5.0
+Description: Forest is an open-source, template library of tree data structures written in C++11.
diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake
new file mode 100644
index 000000000..6f076a0db
--- /dev/null
+++ b/ports/forest/portfile.cmake
@@ -0,0 +1,16 @@
+# Ηeader-only library
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/forest-4.5.0)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/xorz57/forest/archive/4.5.0.zip"
+ FILENAME "forest-4.5.0.zip"
+ SHA512 ae256ad38802d0827cfcd45ffae35ddb95cf74e38cf3e5d806f6e2215f701abfb8159f82e2bb6362788fe96a9f9008429d366e7abbc7980b29b3528052cfe43e
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+# Handle headers
+file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h")
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/forest RENAME copyright)
diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL
index c41d49217..a1bcb795c 100644
--- a/ports/gflags/CONTROL
+++ b/ports/gflags/CONTROL
@@ -1,3 +1,3 @@
Source: gflags
-Version: 2.2.1
+Version: 2.2.1-1
Description: A C++ library that implements commandline flags processing
diff --git a/ports/gflags/fix-install.patch b/ports/gflags/fix-install.patch
deleted file mode 100644
index eda5b7f98..000000000
--- a/ports/gflags/fix-install.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 922a038..7d6af45 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -410,8 +410,8 @@ if (OS_WINDOWS)
- set (RUNTIME_INSTALL_DIR "bin")
- set (LIBRARY_INSTALL_DIR "lib")
- set (INCLUDE_INSTALL_DIR "include")
-- set (CONFIG_INSTALL_DIR "lib/cmake/${PACKAGE_NAME}")
-- set (PKGCONFIG_INSTALL_DIR)
-+ set (CONFIG_INSTALL_DIR "share/${PACKAGE_NAME}")
-+ set (PKGCONFIG_INSTALL_DIR "")
- else ()
- set (RUNTIME_INSTALL_DIR bin)
- # The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora
diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake
index 59811f487..0e89a8f16 100644
--- a/ports/gflags/portfile.cmake
+++ b/ports/gflags/portfile.cmake
@@ -12,11 +12,6 @@ vcpkg_from_github(
HEAD_REF master
)
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install.patch"
-)
-
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
@@ -27,7 +22,7 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gflags)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
diff --git a/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch b/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch
index 274942482..b5082a1b2 100644
--- a/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch
+++ b/ports/gtest/0001-Enable-C-11-features-for-VS2015-fix-appveyor-fail.patch
@@ -1,16 +1,3 @@
-From 1695708beda0306f3b4dffd66f4be142425894a0 Mon Sep 17 00:00:00 2001
-From: Arkady Shapkin <arkady.shapkin@gmail.com>
-Date: Wed, 2 Mar 2016 02:53:10 +0300
-Subject: [PATCH] Enable C++11 features for VS2015 (fix appveyor fail)
-
----
- .gitignore | 13 ++++++++
- googlemock/test/gmock-matchers_test.cc | 5 +++
- googletest/include/gtest/internal/gtest-port.h | 10 ++++--
- googletest/test/gtest-printers_test.cc | 43 ++++++++++++++++++++++---
- googletest/test/gtest_catch_exceptions_test_.cc | 2 +-
- 5 files changed, 64 insertions(+), 9 deletions(-)
-
diff --git a/.gitignore b/.gitignore
index ce310bc..08a67cd 100644
--- a/.gitignore
@@ -48,7 +35,7 @@ index 9f62c3d..eaba362 100644
namespace internal {
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
-index 0094ed5..c07c455 100644
+index 0094ed5..09779fa 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -323,7 +323,7 @@
@@ -87,6 +74,25 @@ index 0094ed5..c07c455 100644
# define GTEST_HAS_HASH_MAP_ 1 // Indicates that hash_map is available.
# define GTEST_HAS_HASH_SET_ 1 // Indicates that hash_set is available.
# endif // _MSC_VER
+@@ -629,6 +633,9 @@ struct _RTL_CRITICAL_SECTION;
+ # if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR)
+ // STLport, provided with the Android NDK, has neither <tr1/tuple> or <tuple>.
+ # define GTEST_HAS_TR1_TUPLE 0
++# elif defined(_MSC_VER) && (_MSC_VER >= 1910)
++// Prevent `warning C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1 namespace and TR1-only machinery are deprecated and will be REMOVED.`
++# define GTEST_HAS_TR1_TUPLE 0
+ # else
+ // The user didn't tell us not to do it, so we assume it's OK.
+ # define GTEST_HAS_TR1_TUPLE 1
+@@ -813,7 +820,7 @@ using ::std::tuple_size;
+ // value-parameterized tests are enabled. The implementation doesn't
+ // work on Sun Studio since it doesn't understand templated conversion
+ // operators.
+-#if GTEST_HAS_PARAM_TEST && GTEST_HAS_TR1_TUPLE && !defined(__SUNPRO_CC)
++#if GTEST_HAS_PARAM_TEST && (GTEST_HAS_TR1_TUPLE || GTEST_HAS_STD_TUPLE_) && !defined(__SUNPRO_CC)
+ # define GTEST_HAS_COMBINE 1
+ #endif
+
diff --git a/googletest/test/gtest-printers_test.cc b/googletest/test/gtest-printers_test.cc
index 3e97cc2..6320563 100644
--- a/googletest/test/gtest-printers_test.cc
@@ -172,6 +178,3 @@ index d0fc82c..c6d953c 100644
class CxxExceptionInDestructorTest : public Test {
public:
static void TearDownTestCase() {
---
-2.10.0.windows.1
-
diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL
index d3086b8ac..f41aec0b9 100644
--- a/ports/gtest/CONTROL
+++ b/ports/gtest/CONTROL
@@ -1,3 +1,3 @@
Source: gtest
-Version: 1.8.0-5
+Version: 1.8.0-6
Description: GoogleTest and GoogleMock testing frameworks.
diff --git a/ports/libbson/CONTROL b/ports/libbson/CONTROL
index bc99eb9a3..8ba25697f 100644
--- a/ports/libbson/CONTROL
+++ b/ports/libbson/CONTROL
@@ -1,3 +1,3 @@
Source: libbson
-Version: 1.9.0
+Version: 1.9.2
Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents.
diff --git a/ports/libbson/portfile.cmake b/ports/libbson/portfile.cmake
index 956e39ff0..3bc9cd18a 100644
--- a/ports/libbson/portfile.cmake
+++ b/ports/libbson/portfile.cmake
@@ -1,10 +1,10 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.9.0)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libbson-1.9.2)
vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/mongodb/libbson/archive/1.9.0.tar.gz"
- FILENAME "libbson-1.9.0.tar.gz"
- SHA512 ced5e20a043096bbb2bd97f179c50fa105498fd089a54fcf7c0e3edda52030e7a6363ff1ab75c885649590a7d8846fa8adf880026cc059772cdfd87da23a244d
+ URLS "https://github.com/mongodb/libbson/archive/1.9.2.tar.gz"
+ FILENAME "libbson-1.9.2.tar.gz"
+ SHA512 a05f1e8fbabb34e847692397e2e41fc5923ddd18dba861e5ab8a31acdf6738e13ab719eae8f9f8563f08fc43aab5c8d1f53cb6a47c38c96e132fa4a62a48d2bf
)
vcpkg_extract_source_archive(${ARCHIVE})
@@ -28,6 +28,11 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libbson-static-1.0")
+else()
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libbson-1.0")
+endif()
# This rename is needed because the official examples expect to use #include <bson.h>
# See Microsoft/vcpkg#904
@@ -61,26 +66,18 @@ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/li
file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
-file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-static-1.0/libbson-static-1.0-config.cmake LIBBSON_CONFIG_CMAKE)
-string(REPLACE "/../../../" "/../../" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}")
-string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}")
-string(REPLACE "bson-static-1.0" "bson-1.0" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake "${LIBBSON_CONFIG_CMAKE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson-static-1.0/libbson-static-1.0-config.cmake "${LIBBSON_CONFIG_CMAKE}")
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-static-1.0/libbson-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-static-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake)
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-static-1.0/libbson-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-static-1.0)
+ set(PORT_POSTFIX "static-1.0")
else()
-file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-1.0/libbson-1.0-config.cmake LIBBSON_CONFIG_CMAKE)
-string(REPLACE "/../../../" "/../../" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}")
-string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake "${LIBBSON_CONFIG_CMAKE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson-1.0/libbson-1.0-config.cmake "${LIBBSON_CONFIG_CMAKE}")
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-1.0/libbson-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake)
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libbson-1.0/libbson-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-1.0)
+ set(PORT_POSTFIX "1.0")
endif()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/lib/cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
+
+file(READ ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake LIBBSON_CONFIG_CMAKE)
+string(REPLACE "/include/libbson-1.0" "/include" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}")
+string(REPLACE "bson-static-1.0" "bson-1.0" LIBBSON_CONFIG_CMAKE "${LIBBSON_CONFIG_CMAKE}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake "${LIBBSON_CONFIG_CMAKE}")
+file(COPY ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX})
+file(COPY ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson-${PORT_POSTFIX})
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config.cmake)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-${PORT_POSTFIX}-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/libbson/libbson-config-version.cmake)
vcpkg_copy_pdbs() \ No newline at end of file
diff --git a/ports/libdisasm/CMakeLists.txt b/ports/libdisasm/CMakeLists.txt
new file mode 100644
index 000000000..295f0f72b
--- /dev/null
+++ b/ports/libdisasm/CMakeLists.txt
@@ -0,0 +1,46 @@
+cmake_minimum_required(VERSION 3.9)
+project(libdisasm)
+set(
+ SRCS
+ ia32_implicit.c
+ ia32_implicit.h
+ ia32_insn.c
+ ia32_insn.h
+ ia32_invariant.c
+ ia32_invariant.h
+ ia32_modrm.c
+ ia32_modrm.h
+ ia32_opcode_tables.c
+ ia32_opcode_tables.h
+ ia32_operand.c
+ ia32_operand.h
+ ia32_reg.c
+ ia32_reg.h
+ ia32_settings.c
+ ia32_settings.h
+ libdis.h
+ qword.h
+ x86_disasm.c
+ x86_format.c
+ x86_imm.c
+ x86_imm.h
+ x86_insn.c
+ x86_misc.c
+ x86_operand_list.c
+ x86_operand_list.h
+)
+
+include_directories(libdisasm)
+
+add_library(libdisasm ${SRCS})
+
+install(
+ TARGETS libdisasm
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(FILES libdis.h DESTINATION include)
+endif()
diff --git a/ports/libdisasm/CONTROL b/ports/libdisasm/CONTROL
new file mode 100644
index 000000000..3d41823ca
--- /dev/null
+++ b/ports/libdisasm/CONTROL
@@ -0,0 +1,3 @@
+Source: libdisasm
+Version: 0.23
+Description: x86 Disassembler Library.
diff --git a/ports/libdisasm/portfile.cmake b/ports/libdisasm/portfile.cmake
new file mode 100644
index 000000000..21a022c42
--- /dev/null
+++ b/ports/libdisasm/portfile.cmake
@@ -0,0 +1,34 @@
+include(vcpkg_common_functions)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(WARNING "Warning: Dynamic building not supported. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+ endif()
+
+set(BASE_PATH ${CURRENT_BUILDTREES_DIR}/src/libdisasm-0.23)
+set(SOURCE_PATH ${BASE_PATH}/libdisasm)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://sourceforge.net/projects/bastard/files/libdisasm/0.23/libdisasm-0.23.tar.gz"
+ FILENAME "libdisasm-0.23.tar.gz"
+ SHA512 29eecfbfd8168188242278a1a38f0c90770d0581a52d4600ae6343829dd0d6607b98329f12a3d7409d43dd56dca6a7d1eb25d58a001c2bfd3eb8474c0e7879e7
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/sizeofvoid.patch
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+# Handle copyright
+file(INSTALL ${BASE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libdisasm RENAME copyright)
diff --git a/ports/libdisasm/sizeofvoid.patch b/ports/libdisasm/sizeofvoid.patch
new file mode 100644
index 000000000..428c5616c
--- /dev/null
+++ b/ports/libdisasm/sizeofvoid.patch
@@ -0,0 +1,29 @@
+diff --git a/x86_disasm.c b/x86_disasm.c
+index 04574fa..177bfb8 100644
+--- a/x86_disasm.c
++++ b/x86_disasm.c
+@@ -35,7 +35,7 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len,
+
+ if ( offset >= buf_len ) {
+ /* another caller screwup ;) */
+- x86_report_error(report_disasm_bounds, (void*)(long)buf_rva+offset);
++ x86_report_error(report_disasm_bounds, (void*)(long)(buf_rva+offset));
+ return 0;
+ }
+
+@@ -53,13 +53,13 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len,
+
+ /* check and see if we had an invalid instruction */
+ if (! size ) {
+- x86_report_error(report_invalid_insn, (void*)(long)buf_rva+offset );
++ x86_report_error(report_invalid_insn, (void*)(long)(buf_rva+offset));
+ return 0;
+ }
+
+ /* check if we overran the end of the buffer */
+ if ( size > len ) {
+- x86_report_error( report_insn_bounds, (void*)(long)buf_rva + offset );
++ x86_report_error( report_insn_bounds, (void*)(long)(buf_rva + offset));
+ MAKE_INVALID( insn, bytes );
+ return 0;
+ }
diff --git a/ports/libspatialite/CONTROL b/ports/libspatialite/CONTROL
index 1f7917a36..b363528e8 100644
--- a/ports/libspatialite/CONTROL
+++ b/ports/libspatialite/CONTROL
@@ -1,5 +1,5 @@
Source: libspatialite
-Version: 4.3.0a
+Version: 4.3.0a-1
Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.
Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv
diff --git a/ports/libspatialite/fix-latin-literals.patch b/ports/libspatialite/fix-latin-literals.patch
new file mode 100644
index 000000000..3060593e7
--- /dev/null
+++ b/ports/libspatialite/fix-latin-literals.patch
@@ -0,0 +1,108 @@
+diff --git a/src/srsinit/epsg_inlined_prussian.c b/src/srsinit/epsg_inlined_prussian.c
+index a5c8334..dd75dde 100644
+--- a/src/srsinit/epsg_inlined_prussian.c
++++ b/src/srsinit/epsg_inlined_prussian.c
+@@ -282,10 +282,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
+ add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",17.11233917],");
+ add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
+ add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187913\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
+- p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,"DHDN / Soldner 14 Gröditzberg I");
++ p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,u8"DHDN / Soldner 14 Gr\u00f6ditzberg I");
+ add_proj4text(p,0,"+proj=cass +lat_0=51.17819342 +lon_0=15.76127086 ");
+ add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
+- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 14 Gröditzberg I\",");
++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 14 Gr\u00f6ditzberg I\",");
+ add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
+ add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
+ add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
+@@ -346,10 +346,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
+ add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",14.70144539],");
+ add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
+ add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187916\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
+- p = add_epsg_def(filter,first,last,187918,"mj10777.de",187918,"DHDN / Soldner 18 Müggelberg 600");
++ p = add_epsg_def(filter,first,last,187918,u8"mj10777.de",187918,"DHDN / Soldner 18 M\u00fcggelberg 600");
+ add_proj4text(p,0,"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 ");
+ add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
+- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 18 Müggelberg 600\",");
++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 18 M\u00fcggelberg 600\",");
+ add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
+ add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
+ add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
+@@ -362,10 +362,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
+ add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",13.62720366666667],");
+ add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
+ add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187918\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
+- p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,"DHDN / Soldner 19 Götzer Berg 650");
++ p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,u8"DHDN / Soldner 19 G\u00f6tzer Berg 650");
+ add_proj4text(p,0,"+proj=cass +lat_0=52.43725961111112 +lon_0=12.72882972222223 ");
+ add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
+- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 19 Götzer Berg 650\",");
++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 19 G\u00f6tzer Berg 650\",");
+ add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
+ add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
+ add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
+@@ -458,10 +458,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
+ add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.23411097],");
+ add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
+ add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187924\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
+- p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,"DHDN / Soldner 25 Rathkrügen");
++ p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,u8"DHDN / Soldner 25 Rathkr\u00fcgen");
+ add_proj4text(p,0,"+proj=cass +lat_0=53.81839364 +lon_0=10.04220189 ");
+ add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
+- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 25 Rathkrügen\",");
++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 25 Rathkr\u00fcgen\",");
+ add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
+ add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
+ add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
+@@ -570,10 +570,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
+ add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",8.84051853],");
+ add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
+ add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187931\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
+- p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,"DHDN / Soldner 32 Münster");
++ p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,u8"DHDN / Soldner 32 M\u00fcnster");
+ add_proj4text(p,0,"+proj=cass +lat_0=51.96547642 +lon_0=7.62334994 ");
+ add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
+- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 32 Münster\",");
++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 32 M\u00fcnster\",");
+ add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
+ add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
+ add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
+@@ -634,10 +634,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
+ add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.50203072],");
+ add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
+ add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187935\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
+- p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,"DHDN / Soldner 36 Schaumburg, Schloßturm");
++ p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,u8"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm");
+ add_proj4text(p,0,"+proj=cass +lat_0=50.34048964 +lon_0=7.97808156 ");
+ add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
+- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 36 Schaumburg, Schloßturm\",");
++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm\",");
+ add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
+ add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
+ add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
+@@ -666,10 +666,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
+ add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",7.60594289],");
+ add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
+ add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187937\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
+- p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,"DHDN / Soldner 38 Cöln, Dom");
++ p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,u8"DHDN / Soldner 38 C\u00f6ln, Dom");
+ add_proj4text(p,0,"+proj=cass +lat_0=50.94257242 +lon_0=6.95897600 ");
+ add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
+- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 38 Cöln, Dom\",");
++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 38 C\u00f6ln, Dom\",");
+ add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
+ add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
+ add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
+@@ -682,10 +682,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs *
+ add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",6.95897600],");
+ add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],");
+ add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187938\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]");
+- p = add_epsg_def(filter,first,last,187939,"mj10777.de",187939,"DHDN / Soldner 39 Langschoß");
++ p = add_epsg_def(filter,first,last,187939,u8"mj10777.de",187939,"DHDN / Soldner 39 Langscho\u00df");
+ add_proj4text(p,0,"+proj=cass +lat_0=50.66738711 +lon_0=6.28935703 ");
+ add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs");
+- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 39 Langschoß\",");
++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 39 Langscho\u00df\",");
+ add_srs_wkt(p,1,"GEOGCS[\"DHDN\",");
+ add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\",");
+ add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],");
diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake
index 6517c1d55..1efb9c159 100644
--- a/ports/libspatialite/portfile.cmake
+++ b/ports/libspatialite/portfile.cmake
@@ -14,6 +14,7 @@ vcpkg_apply_patches(
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fix-makefiles.patch
${CMAKE_CURRENT_LIST_DIR}/fix-sources.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-latin-literals.patch
)
# fix most of the problems when spacebar is in the path
diff --git a/ports/libwebsockets/0001-Fix-UWP.patch b/ports/libwebsockets/0001-Fix-UWP.patch
index 8996c4e0e..c4cf22140 100644
--- a/ports/libwebsockets/0001-Fix-UWP.patch
+++ b/ports/libwebsockets/0001-Fix-UWP.patch
@@ -1,91 +1,99 @@
-diff --git a/lib/lws-plat-win.c b/lib/lws-plat-win.c
+diff --git a/lib/plat/lws-plat-win.c b/lib/plat/lws-plat-win.c
index dd3e95a..eb1690a 100644
---- a/lib/lws-plat-win.c
-+++ b/lib/lws-plat-win.c
-@@ -155,7 +155,7 @@ lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
+--- a/lib/plat/lws-plat-win.c
++++ b/lib/plat/lws-plat-win.c
+@@ -157,7 +157,7 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
{
- struct lws_context_per_thread *pt = &context->pt[tsi];
+ struct lws_context_per_thread *pt;
WSANETWORKEVENTS networkevents;
- struct lws_pollfd *pfd;
+ struct lws_pollfd *pfd = NULL;
struct lws *wsi;
unsigned int i;
DWORD ev;
-@@ -493,6 +493,7 @@ lws_plat_inet_ntop(int af, const void *src, char *dst, int cnt)
- return ok ? dst : NULL;
+@@ -591,6 +591,7 @@ lws_plat_inet_pton(int af, const char *src, void *dst)
+ return ok ? 1 : -1;
}
+#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
- static lws_filefd_type
- _lws_plat_file_open(struct lws *wsi, const char *filename,
- unsigned long *filelen, int flags)
-@@ -516,6 +517,35 @@ _lws_plat_file_open(struct lws *wsi, const char *filename,
-
- return ret;
+ LWS_VISIBLE lws_fop_fd_t
+ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
+ const char *vpath, lws_fop_flags_t *flags)
+@@ -631,6 +632,49 @@ _lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
+ bail:
+ return NULL;
}
+#else
-+static lws_filefd_type
-+_lws_plat_file_open(struct lws *wsi, const char *filename,
-+ unsigned long *filelen, int flags)
++LWS_VISIBLE lws_fop_fd_t
++_lws_plat_file_open(const struct lws_plat_file_ops *fops, const char *filename,
++ const char *vpath, lws_fop_flags_t *flags)
+{
-+ HANDLE ret;
-+ WCHAR buf[MAX_PATH];
++ HANDLE ret;
++ WCHAR buf[MAX_PATH];
++ lws_fop_fd_t fop_fd;
++ LARGE_INTEGER llFileSize = {0};
++
++ MultiByteToWideChar(CP_UTF8, 0, filename, -1, buf, ARRAY_SIZE(buf));
++ if (((*flags) & 7) == _O_RDONLY) {
++ ret = CreateFile2(buf, GENERIC_READ, FILE_SHARE_READ,
++ OPEN_EXISTING, NULL);
++ } else {
++ lwsl_err("%s: open for write not implemented\n", __func__);
++ *filelen = 0;
++ ret = LWS_INVALID_FILE;
++ }
++
++ if (ret == LWS_INVALID_FILE)
++ goto bail;
++
++ fop_fd = malloc(sizeof(*fop_fd));
++ if (!fop_fd)
++ goto bail;
++
++ fop_fd->fops = fops;
++ fop_fd->fd = ret;
++ fop_fd->filesystem_priv = NULL; /* we don't use it */
++ fop_fd->flags = *flags;
++ fop_fd->len = GetFileSize(ret, NULL);
++ if(GetFileSizeEx(ret, &llFileSize))
++ fop_fd->len = llFileSize.QuadPart;
+
-+ (void)wsi;
-+ MultiByteToWideChar(CP_UTF8, 0, filename, -1, buf, ARRAY_SIZE(buf));
-+ if ((flags & 7) == _O_RDONLY) {
-+ ret = CreateFile2(buf, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, NULL);
-+ }
-+ else {
-+ lwsl_err("%s: open for write not implemented\n", __func__);
-+ *filelen = 0;
-+ return LWS_INVALID_FILE;
-+ }
++ fop_fd->pos = 0;
+
-+ if (ret != LWS_INVALID_FILE)
-+ {
-+ struct stat info;
-+ int result = stat(filename, &info);
-+ *filelen = result != 0 ? -1 : (long)(info.st_size);
-+ }
++ return fop_fd;
+
-+ return ret;
++bail:
++ return NULL;
+}
+#endif
- static int
- _lws_plat_file_close(struct lws *wsi, lws_filefd_type fd)
+ LWS_VISIBLE int
+ _lws_plat_file_close(lws_fop_fd_t *fop_fd)
diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h
index 23f8f4d..bc32aef 100644
--- a/lib/private-libwebsockets.h
+++ b/lib/private-libwebsockets.h
-@@ -48,12 +48,25 @@
+@@ -111,12 +111,23 @@
+ #define WIN32_LEAN_AND_MEAN
#endif
- #if defined(WIN32) || defined(_WIN32)
-+
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
-+ #ifndef WINVER
-+ #define WINVER 0x0602
-+ #define _WIN32_WINNT WINVER
-+ #endif
++#ifndef WINVER
++#define WINVER 0x0602
++#define _WIN32_WINNT WINVER
++#endif
+
-+ #define getenv(x) NULL
-+ #define _WINSOCK_DEPRECATED_NO_WARNINGS
++#define getenv(x) NULL
++#define _WINSOCK_DEPRECATED_NO_WARNINGS
+#else
+
#if (WINVER < 0x0501)
--#undef WINVER
--#undef _WIN32_WINNT
--#define WINVER 0x0501
--#define _WIN32_WINNT WINVER
-+ #undef WINVER
-+ #undef _WIN32_WINNT
-+ #define WINVER 0x0501
-+ #define _WIN32_WINNT WINVER
-+ #endif
+ #undef WINVER
+ #undef _WIN32_WINNT
+ #define WINVER 0x0501
+ #define _WIN32_WINNT WINVER
#endif
-+
++#endif
#define LWS_NO_DAEMONIZE
#define LWS_ERRNO WSAGetLastError()
#define LWS_EAGAIN WSAEWOULDBLOCK
diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL
index 64bf929bd..50db40c85 100644
--- a/ports/libwebsockets/CONTROL
+++ b/ports/libwebsockets/CONTROL
@@ -1,4 +1,4 @@
Source: libwebsockets
-Version: 2.0.0-4
+Version: 2.4.1
Build-Depends: zlib, openssl
Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server.
diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake
index ae74f5268..ca6c49a73 100644
--- a/ports/libwebsockets/portfile.cmake
+++ b/ports/libwebsockets/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO warmcat/libwebsockets
- REF v2.0.0
- SHA512 26bc09877c1595b80b08e788e4ae3908af86b67e19f4b9f7ac48d90783cf5c563d4d03e5586d18f6bb8e67d15a03d000f31f67f3a327d898844f77e5d22f7c9d
+ REF v2.4.1
+ SHA512 a5f6a3388517d6f46183dfd1e625475ac1d4d509690e431a581d6ca927078fa50ac9a0787b4305fe088c694af1809335020bfc083a4d4d98585143f13ff61c75
HEAD_REF master
)
@@ -35,7 +35,21 @@ vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets-test-server)
+file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsConfig.cmake LIBWEBSOCKETSCONFIG_CMAKE)
+string(REPLACE "/../include" "/../../include" LIBWEBSOCKETSCONFIG_CMAKE "${LIBWEBSOCKETSCONFIG_CMAKE}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsConfig.cmake "${LIBWEBSOCKETSCONFIG_CMAKE}")
+file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake LIBWEBSOCKETSTARGETSDEBUG_CMAKE)
+string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSDEBUG_CMAKE "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}")
+file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake LIBWEBSOCKETSTARGETSRELEASE_CMAKE)
+string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSRELEASE_CMAKE "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}")
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebsockets)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LICENSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/copyright)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/websockets.lib)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/lib/websockets.lib)
+endif ()
vcpkg_copy_pdbs()
diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL
index 3ca61d39b..763275196 100644
--- a/ports/libzip/CONTROL
+++ b/ports/libzip/CONTROL
@@ -1,4 +1,4 @@
Source: libzip
-Version: 1.3.2
+Version: 1.4.0
Build-Depends: zlib
Description: A library for reading, creating, and modifying zip archives.
diff --git a/ports/libzip/cmake_dont_build_more_than_needed.patch b/ports/libzip/cmake_dont_build_more_than_needed.patch
new file mode 100644
index 000000000..bb0af9749
--- /dev/null
+++ b/ports/libzip/cmake_dont_build_more_than_needed.patch
@@ -0,0 +1,19 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 69cdb8b..4c985fb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -149,10 +149,10 @@ ENABLE_TESTING()
+
+ # Targets
+ ADD_SUBDIRECTORY(lib)
+-ADD_SUBDIRECTORY(man)
+-ADD_SUBDIRECTORY(src)
+-ADD_SUBDIRECTORY(regress)
+-ADD_SUBDIRECTORY(examples)
++#ADD_SUBDIRECTORY(man)
++#ADD_SUBDIRECTORY(src)
++#ADD_SUBDIRECTORY(regress)
++#ADD_SUBDIRECTORY(examples)
+
+ # pkgconfig file
+ SET(prefix ${CMAKE_INSTALL_PREFIX})
diff --git a/ports/libzip/enable-static.patch b/ports/libzip/enable-static.patch
deleted file mode 100644
index 61c93b435..000000000
--- a/ports/libzip/enable-static.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index deceb65..1283013 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -113,6 +113,15 @@ ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS")
- ADD_DEFINITIONS("-D_CRT_NONSTDC_NO_DEPRECATE")
- ENDIF(MSVC)
-
-+OPTION(ENABLE_STATIC "Enable static builds" OFF)
-+IF(ENABLE_STATIC)
-+ set(BUILD_SHARED_LIBS OFF)
-+ set(ZIP_EXTERN_OVERRIDE ON)
-+ set(ZIP_EXTERN ON)
-+ELSE(ENABLE_STATIC)
-+ set(BUILD_SHARED_LIBS ON)
-+ENDIF(ENABLE_STATIC)
-+
- ADD_DEFINITIONS("-DHAVE_CONFIG_H")
-
- # rpath handling: use rpath in installed binaries
-@@ -121,10 +130,10 @@ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-
- # Targets
- ADD_SUBDIRECTORY(lib)
--ADD_SUBDIRECTORY(man)
--ADD_SUBDIRECTORY(src)
--ADD_SUBDIRECTORY(regress)
--ADD_SUBDIRECTORY(examples)
-+# ADD_SUBDIRECTORY(man)
-+# ADD_SUBDIRECTORY(src)
-+# ADD_SUBDIRECTORY(regress)
-+# ADD_SUBDIRECTORY(examples)
-
- # pkgconfig file
- SET(prefix ${CMAKE_INSTALL_PREFIX})
-diff --git a/cmake-config.h.in b/cmake-config.h.in
-index 0d1839c..dd450ff 100644
---- a/cmake-config.h.in
-+++ b/cmake-config.h.in
-@@ -60,7 +60,7 @@
- #cmakedefine WORDS_BIGENDIAN
- /* END DEFINES */
- #define PACKAGE "@PACKAGE@"
--#define VERSION "@VERSION@"
-+#define LIBZIP_VERSION "@VERSION@"
-
- #ifndef HAVE_SSIZE_T_LIBZIP
- # if SIZE_T_LIBZIP == INT_LIBZIP
-diff --git a/cmake-zipconf.h.in b/cmake-zipconf.h.in
-index 6a276f6..410c898 100644
---- a/cmake-zipconf.h.in
-+++ b/cmake-zipconf.h.in
-@@ -118,4 +118,10 @@ typedef unsigned long long zip_uint64_t;
- #define ZIP_INT64_MAX 0x7fffffffffffffffLL
- #define ZIP_UINT64_MAX 0xffffffffffffffffULL
-
-+#cmakedefine ZIP_EXTERN_OVERRIDE
-+#ifdef ZIP_EXTERN_OVERRIDE
-+#undef ZIP_EXTERN
-+#cmakedefine ZIP_EXTERN
-+#endif
-+
- #endif /* zipconf.h */
-diff --git a/lib/compat.h b/lib/compat.h
-index 625c84e..8943587 100644
---- a/lib/compat.h
-+++ b/lib/compat.h
-@@ -42,7 +42,9 @@
- #define __STDC_LIMIT_MACROS
-
- #ifdef _WIN32
-+#ifndef ZIP_EXTERN_OVERRIDE
- #define ZIP_EXTERN __declspec(dllexport)
-+#endif
- /* for dup(), close(), etc. */
- #include <io.h>
- #endif
diff --git a/ports/libzip/fix-attribute.patch b/ports/libzip/fix-attribute.patch
new file mode 100644
index 000000000..0669d75d6
--- /dev/null
+++ b/ports/libzip/fix-attribute.patch
@@ -0,0 +1,12 @@
+diff --git a/lib/zip_algorithm_bzip2.c b/lib/zip_algorithm_bzip2.c
+index 1748fd4..fd74503 100644
+--- a/lib/zip_algorithm_bzip2.c
++++ b/lib/zip_algorithm_bzip2.c
+@@ -270,6 +270,6 @@ zip_compression_algorithm_t zip_algorithm_bzip2_decompress = {
+
+ #else
+
+-static int dummy __attribute__((used));
++static int dummy;
+
+ #endif /* HAVE_LIBBZ2 */
diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake
index bcde856e2..ae95a3ae4 100644
--- a/ports/libzip/portfile.cmake
+++ b/ports/libzip/portfile.cmake
@@ -1,34 +1,27 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libzip-1.3.2)
-vcpkg_download_distfile(ARCHIVE_FILE
- URLS "https://nih.at/libzip/libzip-1.3.2.tar.gz"
- FILENAME "libzip-1.3.2.tar.gz"
- SHA512 75b7e6f541be30e721275723f264c20f9a3be5335d954b5909acdddb0f6dd9b2420166904c9b88206692a57a4aa54e4fe8ed4d62c1f4b900aebf6ad40f767376
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO nih-at/libzip
+ REF rel-1-4-0
+ SHA512 3d8c5e64c567d2b91670ea041228d74cc8415116dfeb5c9bcf587ab817618eace668c5171122eeccf2a5f25242c2439c5f60b361f99a06274ab58aea720fe0bb
)
-vcpkg_extract_source_archive(${ARCHIVE_FILE})
# Patch cmake and configuration to allow static builds
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
- PATCHES "${CMAKE_CURRENT_LIST_DIR}/enable-static.patch"
+ PATCHES
+ "${CMAKE_CURRENT_LIST_DIR}/cmake_dont_build_more_than_needed.patch"
+ "${CMAKE_CURRENT_LIST_DIR}/fix-attribute.patch"
)
-if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
- vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- OPTIONS -DENABLE_STATIC=OFF
- )
-else()
- vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- OPTIONS -DENABLE_STATIC=ON
- )
-endif()
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
vcpkg_install_cmake()
# Move zipconf.h to include and remove include directories from lib
-file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libzip/include/zipconf.h ${CURRENT_PACKAGES_DIR}/include/zipconf.h)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/debug/lib/libzip)
# Remove debug include
diff --git a/ports/log4cplus/portfile.cmake b/ports/log4cplus/portfile.cmake
index acd101c9b..d6e600221 100644
--- a/ports/log4cplus/portfile.cmake
+++ b/ports/log4cplus/portfile.cmake
@@ -32,7 +32,7 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/log4cplus)
vcpkg_copy_pdbs()
diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL
index 5e8b87bd2..ae7d57377 100644
--- a/ports/lz4/CONTROL
+++ b/ports/lz4/CONTROL
@@ -1,3 +1,3 @@
Source: lz4
-Version: 1.8.0-1
+Version: 1.8.1.2
Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core.
diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake
index 6664c2b79..1928d7e70 100644
--- a/ports/lz4/portfile.cmake
+++ b/ports/lz4/portfile.cmake
@@ -2,8 +2,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lz4/lz4
- REF v1.8.0
- SHA512 aea46d4a900a3ede7dd7b498ee938ecd98397d3277c5b3a85b4236a44777cba85cd68a2f32c993b872afda96c5dafe0cb3dd391101fe8181e17c9f48884c1535
+ REF v1.8.1.2
+ SHA512 f4ed450bc05477cc6c2b42e6fe1fbb1fb0907f1d05b68b1d69d975b555ddb385550f204258e6d91642e14ce373815141dc218cda03b711793935d5458bc45c7f
HEAD_REF dev)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL
index 6391682c4..9a367df3a 100644
--- a/ports/mongo-c-driver/CONTROL
+++ b/ports/mongo-c-driver/CONTROL
@@ -1,4 +1,4 @@
Source: mongo-c-driver
-Version: 1.9.0
+Version: 1.9.2
Build-Depends: libbson, openssl (uwp)
Description: Client library written in C for MongoDB.
diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake
index 3b3b1f863..74f4bd66b 100644
--- a/ports/mongo-c-driver/portfile.cmake
+++ b/ports/mongo-c-driver/portfile.cmake
@@ -1,10 +1,10 @@
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.9.0)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mongo-c-driver-1.9.2)
vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/mongodb/mongo-c-driver/archive/1.9.0.tar.gz"
- FILENAME "mongo-c-driver-1.9.0.tar.gz"
- SHA512 e7785f336c38bbf7dd519351bba2facab025b4d2bcd1eef82e98606a21510af7f799edaf4b4f074bd4c5a17ad63176c276f8c57e499b8d9afd098bce274da4ae
+ URLS "https://github.com/mongodb/mongo-c-driver/archive/1.9.2.tar.gz"
+ FILENAME "mongo-c-driver-1.9.2.tar.gz"
+ SHA512 a2c819da77aef93ce261093e98e8e8c41c449af56bd03d875e2838a067ae71b5ceb16fed2fb8df9458c84310451b813464377592806fc9ac39d9df2f4ddba83b
)
vcpkg_extract_source_archive(${ARCHIVE})
@@ -36,6 +36,11 @@ vcpkg_configure_cmake(
)
vcpkg_install_cmake()
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libmongoc-static-1.0")
+else()
+ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libmongoc-1.0")
+endif()
# This rename is needed because the official examples expect to use #include <mongoc.h>
# See Microsoft/vcpkg#904
@@ -69,26 +74,18 @@ file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mo
file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
-file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config.cmake LIBMONGOC_CONFIG_CMAKE)
-string(REPLACE "/../../../" "/../../" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
-string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
-string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config.cmake "${LIBMONGOC_CONFIG_CMAKE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/libmongoc-static-1.0/libmongoc-static-1.0-config.cmake "${LIBMONGOC_CONFIG_CMAKE}")
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-static-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config-version.cmake)
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-static-1.0/libmongoc-static-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-static-1.0)
+ set(PORT_POSTFIX "static-1.0")
else()
-file(READ ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-1.0/libmongoc-1.0-config.cmake LIBMONGOC_CONFIG_CMAKE)
-string(REPLACE "/../../../" "/../../" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
-string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config.cmake "${LIBMONGOC_CONFIG_CMAKE}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0/libmongoc-1.0-config.cmake "${LIBMONGOC_CONFIG_CMAKE}")
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-1.0/libmongoc-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-1.0-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config-version.cmake)
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/libmongoc-1.0/libmongoc-1.0-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-1.0)
+ set(PORT_POSTFIX "1.0")
endif()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/lib/cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
+
+file(READ ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake LIBMONGOC_CONFIG_CMAKE)
+string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
+string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}")
+file(WRITE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake "${LIBMONGOC_CONFIG_CMAKE}")
+file(COPY ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX})
+file(COPY ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX})
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config.cmake)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/libmongoc-${PORT_POSTFIX}-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver/mongo-c-driver-config-version.cmake)
vcpkg_copy_pdbs()
diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake
index 893e6f124..0992f5f5d 100644
--- a/ports/msmpi/portfile.cmake
+++ b/ports/msmpi/portfile.cmake
@@ -20,7 +20,7 @@ endmacro()
# We always want the ProgramFiles folder even on a 64-bit machine (not the ProgramFilesx86 folder)
vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS)
set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe")
-set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438.1084")
+set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438")
if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}")
set(MPIEXEC_VERSION_LOGNAME "mpiexec-version")
@@ -31,7 +31,8 @@ if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}")
)
file(READ ${CURRENT_BUILDTREES_DIR}/${MPIEXEC_VERSION_LOGNAME}-out.log MPIEXEC_OUTPUT)
- if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)\\]")
+ # Note: v8.1.1 was released with version 8.1.12438.1091. This is compatible with 8.1.12438.1084 (the version above), so ignore the fourth version number.
+ if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+)\\.[0-9]+\\]")
if(NOT CMAKE_MATCH_1 STREQUAL MSMPI_EXPECTED_FULL_VERSION)
download_msmpi_redistributable_package()
diff --git a/ports/opengl/CONTROL b/ports/opengl/CONTROL
index 15acb1f0f..365b908cf 100644
--- a/ports/opengl/CONTROL
+++ b/ports/opengl/CONTROL
@@ -1,3 +1,3 @@
Source: opengl
-Version: 0.0-4
-Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. \ No newline at end of file
+Version: 0.0-5
+Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics.
diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake
index 154cb039e..6e9e1d14f 100644
--- a/ports/opengl/portfile.cmake
+++ b/ports/opengl/portfile.cmake
@@ -6,7 +6,6 @@ vcpkg_get_windows_sdk(WINDOWS_SDK)
if (WINDOWS_SDK MATCHES "10.")
set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib")
- set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf")
set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
elseif(WINDOWS_SDK MATCHES "8.")
set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
@@ -41,9 +40,8 @@ file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-if (DEFINED LICENSEPATH)
- file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/opengl)
- file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See the accompanying sdk_license.rtf")
-else()
- file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license")
-endif() \ No newline at end of file
+if (WINDOWS_SDK MATCHES "10.")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license")
+elseif(WINDOWS_SDK MATCHES "8.")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license")
+endif()
diff --git a/ports/openni2/CONTROL b/ports/openni2/CONTROL
index b1d60d860..26fcebaba 100644
--- a/ports/openni2/CONTROL
+++ b/ports/openni2/CONTROL
@@ -1,4 +1,4 @@
Source: openni2
-Version: 2.2.0.33-4
+Version: 2.2.0.33-7
Build-Depends: kinectsdk1
Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera.
diff --git a/ports/openni2/openni2deploy.ps1 b/ports/openni2/openni2deploy.ps1
new file mode 100644
index 000000000..f420014cf
--- /dev/null
+++ b/ports/openni2/openni2deploy.ps1
@@ -0,0 +1,18 @@
+# Note: This function signature and behavior is depended upon by applocal.ps1
+
+function deployOpenNI2([string]$targetBinaryDir, [string]$installedDir, [string]$targetBinaryName) {
+ if ($targetBinaryName -like "OpenNI2.dll") {
+ if(Test-Path "$installedDir\bin\OpenNI2\OpenNI.ini") {
+ Write-Verbose " Deploying OpenNI2 Initialization"
+ deployBinary "$targetBinaryDir" "$installedDir\bin\OpenNI2" "OpenNI.ini"
+ }
+ if(Test-Path "$installedDir\bin\OpenNI2\Drivers") {
+ Write-Verbose " Deploying OpenNI2 Drivers"
+ New-Item "$targetBinaryDir\OpenNI2\Drivers" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null
+ Get-ChildItem "$installedDir\bin\OpenNI2\Drivers\*.*" -include "*.dll","*.ini" | % {
+ deployBinary "$targetBinaryDir\OpenNI2\Drivers" "$installedDir\bin\OpenNI2\Drivers" $_.Name
+ }
+ }
+ }
+}
+
diff --git a/ports/openni2/portfile.cmake b/ports/openni2/portfile.cmake
index cc428ddb7..fb7eeade6 100644
--- a/ports/openni2/portfile.cmake
+++ b/ports/openni2/portfile.cmake
@@ -150,6 +150,12 @@ file(
file(
INSTALL
"${SOURCE_CONFIG_PATH}/OpenNI.ini"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/bin/OpenNI2
+)
+
+file(
+ INSTALL
"${SOURCE_BIN_PATH_RELEASE}/OpenNI2.dll"
DESTINATION
${CURRENT_PACKAGES_DIR}/bin
@@ -170,6 +176,12 @@ file(
file(
INSTALL
"${SOURCE_CONFIG_PATH}/OpenNI.ini"
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2
+)
+
+file(
+ INSTALL
"${SOURCE_BIN_PATH_DEBUG}/OpenNI2.dll"
DESTINATION
${CURRENT_PACKAGES_DIR}/debug/bin
@@ -205,6 +217,10 @@ file(
${CURRENT_PACKAGES_DIR}/tools/openni2
)
+# Deploy Script
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/openni2deploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/OpenNI2)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/openni2deploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2)
+
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openni2)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright) \ No newline at end of file
diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL
index dcdda9cc6..e1cea2799 100644
--- a/ports/openssl/CONTROL
+++ b/ports/openssl/CONTROL
@@ -1,3 +1,3 @@
Source: openssl
-Version: 1.0.2n-1
+Version: 1.0.2n-2
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.
diff --git a/ports/openssl/RemoveNonASCIIChar.patch b/ports/openssl/RemoveNonASCIIChar.patch
new file mode 100644
index 000000000..5c4553b0a
--- /dev/null
+++ b/ports/openssl/RemoveNonASCIIChar.patch
@@ -0,0 +1,13 @@
+diff --git a/ssl/bad_dtls_test.c b/ssl/bad_dtls_test.c
+index 34af37d..ff754e1 100644
+--- a/ssl/bad_dtls_test.c
++++ b/ssl/bad_dtls_test.c
+@@ -19,7 +19,7 @@
+ * Note that unlike other SSL tests, we don't test against our own SSL
+ * server method. Firstly because we don't have one; we *only* support
+ * DTLS1_BAD_VER as a client. And secondly because even if that were
+- * fixed up it's the wrong thing to test against — because if changes
++ * fixed up it's the wrong thing to test against - because if changes
+ * are made in generic DTLS code which don't take DTLS1_BAD_VER into
+ * account, there's plenty of scope for making those changes such that
+ * they break *both* the client and the server in the same way.
diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake
index 349144e91..65662dd86 100644
--- a/ports/openssl/portfile.cmake
+++ b/ports/openssl/portfile.cmake
@@ -28,6 +28,7 @@ vcpkg_apply_patches(
PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch
${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch
${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch
+ ${CMAKE_CURRENT_LIST_DIR}/RemoveNonASCIIChar.patch
)
set(CONFIGURE_COMMAND ${PERL} Configure
diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL
index 69d7ba966..18d040b95 100644
--- a/ports/openvr/CONTROL
+++ b/ports/openvr/CONTROL
@@ -1,3 +1,3 @@
Source: openvr
-Version: 1.0.9
+Version: 1.0.12
Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting.
diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake
index 50ec79d77..1a18b4fd0 100644
--- a/ports/openvr/portfile.cmake
+++ b/ports/openvr/portfile.cmake
@@ -1,19 +1,12 @@
-# Common Ambient Variables:
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# TARGET_TRIPLET is the current triplet (x86-windows, etc)
-# PORT is the current port name (zlib, etc)
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-#
-
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openvr-1.0.9)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/ValveSoftware/openvr/archive/v1.0.9.zip"
- FILENAME "openvr-v1.0.9.zip"
- SHA512 969cf6bf94802553bb4f1e5d6a2348566847b3d60efee9d8f83233d1d85e44a870e388028be956950d4f8ecb79f8e0bcf0a6b987b0ab3083060ece5ea48b8fa7
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ValveSoftware/openvr
+ REF v1.0.12
+ SHA512 42e6ac8635417fbb2c95a4b290f917d057c0d66ac1e07b4a0d16c4f8197b06c8ebf553299060a7996b5a9b5420f299f2bda257b8133dc99f9441c67331293ad1
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
set(VCPKG_LIBRARY_LINKAGE dynamic)
diff --git a/ports/osg/CONTROL b/ports/osg/CONTROL
index df2af4bc1..4e3a308a4 100644
--- a/ports/osg/CONTROL
+++ b/ports/osg/CONTROL
@@ -1,4 +1,4 @@
Source: osg
-Version: 3.5.6-1
+Version: 3.5.6-2
Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit.
Build-Depends: freetype, jasper, openexr, zlib, gdal, giflib, libjpeg-turbo, libpng, tiff
diff --git a/ports/osg/portfile.cmake b/ports/osg/portfile.cmake
index 5d68a57be..ac6f8e2ee 100644
--- a/ports/osg/portfile.cmake
+++ b/ports/osg/portfile.cmake
@@ -47,7 +47,7 @@ file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE_RECURSE ${OSG_TOOLS_DBG})
file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/*.dll)
-file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.5.6)
+file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/osg/osgPlugins-3.5.6)
file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-3.5.6/*.dll)
file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-3.5.6)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-3.5.6/)
diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL
index 039a0b873..619b9f577 100644
--- a/ports/qt5-base/CONTROL
+++ b/ports/qt5-base/CONTROL
@@ -1,4 +1,4 @@
Source: qt5-base
-Version: 5.9.2-1
+Version: 5.9.2-3
Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.
-Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion
+Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl
diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake
index 9284f09b5..62c1396c2 100644
--- a/ports/qt5-base/portfile.cmake
+++ b/ports/qt5-base/portfile.cmake
@@ -112,5 +112,6 @@ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.lib)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/qtmaind.prl)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins)
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins)
file(INSTALL ${SOURCE_PATH}/LICENSE.LGPLv3 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
diff --git a/ports/qt5-base/qtdeploy.ps1 b/ports/qt5-base/qtdeploy.ps1
index 9d514e411..b25a46e7a 100644
--- a/ports/qt5-base/qtdeploy.ps1
+++ b/ports/qt5-base/qtdeploy.ps1
@@ -10,6 +10,9 @@
# Note: this function signature and behavior is depended upon by applocal.ps1
function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [string]$targetBinaryName) {
+ $baseDir = Split-Path $QtPluginsDir -parent
+ $binDir = "$baseDir\bin"
+
function deployPlugins([string]$pluginSubdirName) {
if (Test-Path "$QtPluginsDir\$pluginSubdirName") {
Write-Verbose " Deploying plugins directory '$pluginSubdirName'"
@@ -36,6 +39,11 @@ function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [str
deployPlugins "platforminputcontexts"
} elseif ($targetBinaryName -like "Qt5Network*.dll") {
deployPlugins "bearer"
+ if (Test-Path "$binDir\libeay32.dll")
+ {
+ deployBinary "$targetBinaryDir" "$binDir" "libeay32.dll"
+ deployBinary "$targetBinaryDir" "$binDir" "ssleay32.dll"
+ }
} elseif ($targetBinaryName -like "Qt5Sql*.dll") {
deployPlugins "sqldrivers"
} elseif ($targetBinaryName -like "Qt5Multimedia*.dll") {
diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL
index 244fe200f..76ce98ffa 100644
--- a/ports/realsense2/CONTROL
+++ b/ports/realsense2/CONTROL
@@ -1,3 +1,3 @@
Source: realsense2
-Version: 2.9.0
+Version: 2.9.1
Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300).
diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake
index ccbc664ef..0ae449aaf 100644
--- a/ports/realsense2/portfile.cmake
+++ b/ports/realsense2/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO IntelRealSense/librealsense
- REF v2.9.0
- SHA512 10b4d165e5763567517fc2320b7094af5a078d1b5da2374cfa8480cab0715303ea29a87f04876cbc39b5d22ac72cba7d13711c0b46fa125fbd2cf13fcb1a28e6
+ REF v2.9.1
+ SHA512 065b772948ebe34d187d44110326f711f3184876b1f129de83552c5cfe333485f9b0c9e4774b391e55d7fe533619818594f0946eee07d528dfe91b2c5e96d942
HEAD_REF master
)
diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL
index 65dd215ac..349f0d6bf 100644
--- a/ports/sciter/CONTROL
+++ b/ports/sciter/CONTROL
@@ -1,4 +1,4 @@
Source: sciter
-Version: 4.1.1
+Version: 4.1.2
Description: Sciter is an embeddable HTML/CSS/scripting engine.
Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com
diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake
index 4aec0c397..df3fb0507 100644
--- a/ports/sciter/portfile.cmake
+++ b/ports/sciter/portfile.cmake
@@ -12,8 +12,8 @@ include(vcpkg_common_functions)
# header-only library
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
-set(SCITER_REVISION c6f5f5e826160920dd7409481c1d064bde995cde)
-set(SCITER_SHA 47c634dc5ad5907d7f21207d1d4bfe4df06910417ce53169020466afcebe94f1cae9a0cccbf3fc105eab16315da65c74eed7af5efc9ca438b9cbb5d6e9bb09e1)
+set(SCITER_REVISION 38c277d6b4642ad5f00e24c11bcc4cab099d9a7a)
+set(SCITER_SHA efce6bb9fd733cde5f0f11f54375e40389454feb6f0170a18423bb75e43d6bcb9621e05320f8e9954231439e8295e2a6eda236b671fb8dfa5c9c256e3ed7bb03)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(SCITER_ARCH 64)
diff --git a/ports/wincrypt/portfile.cmake b/ports/wincrypt/portfile.cmake
index 6ce62cfee..5cb5a1b19 100644
--- a/ports/wincrypt/portfile.cmake
+++ b/ports/wincrypt/portfile.cmake
@@ -5,7 +5,6 @@ vcpkg_get_windows_sdk(WINDOWS_SDK)
if (WINDOWS_SDK MATCHES "10.")
set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib")
- set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf")
set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
elseif(WINDOWS_SDK MATCHES "8.")
set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib")
@@ -21,11 +20,10 @@ endif()
file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-if (DEFINED LICENSEPATH)
- file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/wincrypt)
- file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See the accompanying sdk_license.rtf")
-else()
- file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license")
+if (WINDOWS_SDK MATCHES "10.")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license")
+elseif(WINDOWS_SDK MATCHES "8.")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license")
endif()
# Allow empty include directory
diff --git a/ports/winsock2/portfile.cmake b/ports/winsock2/portfile.cmake
index 0f55c1227..76f3bc23d 100644
--- a/ports/winsock2/portfile.cmake
+++ b/ports/winsock2/portfile.cmake
@@ -5,7 +5,6 @@ vcpkg_get_windows_sdk(WINDOWS_SDK)
if (WINDOWS_SDK MATCHES "10.")
set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib")
- set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf")
set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
elseif(WINDOWS_SDK MATCHES "8.")
set(LIBFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib")
@@ -21,11 +20,10 @@ endif()
file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
-if (DEFINED LICENSEPATH)
- file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/winsock2)
- file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See the accompanying sdk_license.rtf")
-else()
- file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license")
+if (WINDOWS_SDK MATCHES "10.")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license")
+elseif(WINDOWS_SDK MATCHES "8.")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license")
endif()
# Allow empty include directory
diff --git a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 b/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1
new file mode 100644
index 000000000..0a133f5f8
--- /dev/null
+++ b/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1
@@ -0,0 +1,52 @@
+# Capture environment variables for the System and User. Also add some special/built-in variables.
+# These will be used to synthesize a clean environment
+$specialEnvironmentMap = @{ "SystemDrive"=$env:SystemDrive; "SystemRoot"=$env:SystemRoot; "UserProfile"=$env:UserProfile } # These are built-in and not set in the registry
+$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
+$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment
+
+# Identify the keySet of environment variable names
+$nameSet = ($specialEnvironmentMap.Keys + $machineEnvironmentMap.Keys + $userEnvironmentMap.Keys) | Sort-Object | Select-Object -Unique
+
+# Any environment variable in the $nameSet should be restored to its original value
+foreach ($name in $nameSet)
+{
+ if ($specialEnvironmentMap.ContainsKey($name))
+ {
+ [Environment]::SetEnvironmentVariable($name, $specialEnvironmentMap[$name], 'Process')
+ continue;
+ }
+
+ # PATH needs to be concatenated as it has values in both machine and user environment. Any other values should be set.
+ if ($name -match 'path')
+ {
+ $pathValuePartial = @()
+ # Machine values before user values
+ $pathValuePartial += $machineEnvironmentMap[$name] -split ';'
+ $pathValuePartial += $userEnvironmentMap[$name] -split ';'
+ $pathValue = $pathValuePartial -join ';'
+ [Environment]::SetEnvironmentVariable($name, $pathValue, 'Process')
+ continue;
+ }
+
+ if ($userEnvironmentMap.ContainsKey($name))
+ {
+ [Environment]::SetEnvironmentVariable($name, $userEnvironmentMap[$name], 'Process')
+ continue;
+ }
+
+ if ($machineEnvironmentMap.ContainsKey($name))
+ {
+ [Environment]::SetEnvironmentVariable($name, $machineEnvironmentMap[$name], 'Process')
+ continue;
+ }
+
+ throw "Unreachable: Unknown variable $name"
+}
+
+# Any environment variable NOT in the $nameSet should be removed
+$processEnvironmentMap = [Environment]::GetEnvironmentVariables('Process')
+$variablesForRemoval = $processEnvironmentMap.Keys | Where-Object {$nameSet -notcontains $_}
+foreach ($name in $variablesForRemoval)
+{
+ [Environment]::SetEnvironmentVariable($name, $null, 'Process')
+}
diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1
index 5381523f0..63da1a508 100644
--- a/scripts/VcpkgPowershellUtils.ps1
+++ b/scripts/VcpkgPowershellUtils.ps1
@@ -167,15 +167,32 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file,
function vcpkgInvokeCommand()
{
param ( [Parameter(Mandatory=$true)][string]$executable,
- [string]$arguments = "",
- [switch]$wait)
+ [string]$arguments = "")
Write-Verbose "Executing: ${executable} ${arguments}"
- $process = Start-Process -FilePath $executable -ArgumentList $arguments -PassThru
- if ($wait)
- {
- Wait-Process -InputObject $process
- $ec = $process.ExitCode
- Write-Verbose "Execution terminated with exit code $ec."
- }
+ $process = Start-Process -FilePath "`"$executable`"" -ArgumentList $arguments -PassThru -NoNewWindow
+ Wait-Process -InputObject $process
+ $ec = $process.ExitCode
+ Write-Verbose "Execution terminated with exit code $ec."
+ return $ec
+}
+
+function vcpkgInvokeCommandClean()
+{
+ param ( [Parameter(Mandatory=$true)][string]$executable,
+ [string]$arguments = "")
+
+ Write-Verbose "Clean-Executing: ${executable} ${arguments}"
+ $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition
+ $cleanEnvScript = "$scriptsDir\VcpkgPowershellUtils-ClearEnvironment.ps1"
+ $command = "& `"$cleanEnvScript`"; & `"$executable`" $arguments"
+ $bytes = [System.Text.Encoding]::Unicode.GetBytes($command)
+ $encodedCommand = [Convert]::ToBase64String($bytes)
+ $arg = "-NoProfile -ExecutionPolicy Bypass -encodedCommand $encodedCommand"
+
+ $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow
+ Wait-Process -InputObject $process
+ $ec = $process.ExitCode
+ Write-Verbose "Execution terminated with exit code $ec."
+ return $ec
} \ No newline at end of file
diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1
index 7a12e7d34..dcbd2e0be 100644
--- a/scripts/addPoshVcpkgToPowershellProfile.ps1
+++ b/scripts/addPoshVcpkgToPowershellProfile.ps1
@@ -13,7 +13,7 @@ function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string]
return
}
-$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
+$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition
. "$scriptsDir\VcpkgPowershellUtils.ps1"
$profileEntry = "Import-Module '$scriptsDir\posh-vcpkg'"
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index 3f40a2ead..03f05d50b 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -4,7 +4,8 @@ param(
[Parameter(Mandatory=$False)][string]$withVSPath = ""
)
-$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
+$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition
+. "$scriptsDir\VcpkgPowershellUtils.ps1"
$vcpkgRootDir = & $scriptsDir\findFileRecursivelyUp.ps1 $scriptsDir .vcpkg-root
Write-Verbose("vcpkg Path " + $vcpkgRootDir)
@@ -36,26 +37,31 @@ if (!(Test-Path $vcpkgSourcesPath))
return
}
-try
-{
- Push-Location $vcpkgSourcesPath
- $msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath
- $msbuildExe = $msbuildExeWithPlatformToolset[0]
- $platformToolset = $msbuildExeWithPlatformToolset[1]
- $windowsSDK = & $scriptsDir\getWindowsSDK.ps1
- & $msbuildExe "/p:VCPKG_VERSION=-$gitHash" "/p:DISABLE_METRICS=$disableMetrics" /p:Configuration=Release /p:Platform=x86 /p:PlatformToolset=$platformToolset /p:TargetPlatformVersion=$windowsSDK /m dirs.proj
- if ($LASTEXITCODE -ne 0)
- {
- Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++."
- return
- }
+$msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath
+$msbuildExe = $msbuildExeWithPlatformToolset[0]
+$platformToolset = $msbuildExeWithPlatformToolset[1]
+$windowsSDK = & $scriptsDir\getWindowsSDK.ps1
- Write-Verbose("Placing vcpkg.exe in the correct location")
+$arguments = (
+"`"/p:VCPKG_VERSION=-$gitHash`"",
+"`"/p:DISABLE_METRICS=$disableMetrics`"",
+"/p:Configuration=Release",
+"/p:Platform=x86",
+"/p:PlatformToolset=$platformToolset",
+"/p:TargetPlatformVersion=$windowsSDK",
+"/m",
+"`"$vcpkgSourcesPath\dirs.proj`"") -join " "
- Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null
- Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null
-}
-finally
+# vcpkgInvokeCommandClean cmd "/c echo %PATH%"
+$ec = vcpkgInvokeCommandClean $msbuildExe $arguments
+
+if ($ec -ne 0)
{
- Pop-Location
+ Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++."
+ return
}
+
+Write-Verbose("Placing vcpkg.exe in the correct location")
+
+Copy-Item $vcpkgSourcesPath\Release\vcpkg.exe $vcpkgRootDir\vcpkg.exe | Out-Null
+Copy-Item $vcpkgSourcesPath\Release\vcpkgmetricsuploader.exe $vcpkgRootDir\scripts\vcpkgmetricsuploader.exe | Out-Null
diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1
index 08a6d9a8f..0b56356a0 100644
--- a/scripts/buildsystems/msbuild/applocal.ps1
+++ b/scripts/buildsystems/msbuild/applocal.ps1
@@ -49,6 +49,7 @@ function resolve([string]$targetBinary) {
if (Test-Path "$installedDir\$_") {
deployBinary $targetBinaryDir $installedDir "$_"
if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" }
+ if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" }
resolve "$targetBinaryDir\$_"
} elseif (Test-Path "$targetBinaryDir\$_") {
Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed"
@@ -66,5 +67,10 @@ if (Test-Path "$g_install_root\plugins\qtdeploy.ps1") {
. "$g_install_root\plugins\qtdeploy.ps1"
}
+# Note: This is a hack to make OpenNI2 work.
+if (Test-Path "$g_install_root\bin\OpenNI2\openni2deploy.ps1") {
+ . "$g_install_root\bin\OpenNI2\openni2deploy.ps1"
+}
+
resolve($targetBinary)
Write-Verbose $($g_searched | out-string) \ No newline at end of file
diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake
index ac6e5cc93..1894d6e9a 100644
--- a/scripts/cmake/vcpkg_apply_patches.cmake
+++ b/scripts/cmake/vcpkg_apply_patches.cmake
@@ -47,7 +47,7 @@ function(vcpkg_apply_patches)
RESULT_VARIABLE error_code
)
- if(error_code AND NOT ${_ap_QUIET})
+ if(error_code AND NOT _ap_QUIET)
message(STATUS "Applying patch failed. This is expected if this patch was previously applied.")
endif()
diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1
index e4cab124c..ad0b774d4 100644
--- a/scripts/fetchDependency.ps1
+++ b/scripts/fetchDependency.ps1
@@ -3,7 +3,7 @@ param(
[Parameter(Mandatory=$true)][string]$Dependency
)
-$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
+$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition
. "$scriptsDir\VcpkgPowershellUtils.ps1"
Write-Verbose "Fetching dependency: $Dependency"
@@ -20,12 +20,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
if($Dependency -eq "cmake")
{
- $requiredVersion = "3.10.1"
- $downloadVersion = "3.10.1"
- $url = "https://cmake.org/files/v3.10/cmake-3.10.1-win32-x86.zip"
- $downloadPath = "$downloadsDir\cmake-3.10.1-win32-x86.zip"
- $expectedDownloadedFileHash = "6fe010cce1201d884cd7a9535db8a1f16d98b8965341251fde8f1c5069ee58c0"
- $executableFromDownload = "$downloadsDir\cmake-3.10.1-win32-x86\bin\cmake.exe"
+ $requiredVersion = "3.10.2"
+ $downloadVersion = "3.10.2"
+ $url = "https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip"
+ $downloadPath = "$downloadsDir\cmake-3.10.2-win32-x86.zip"
+ $expectedDownloadedFileHash = "f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6"
+ $executableFromDownload = "$downloadsDir\cmake-3.10.2-win32-x86\bin\cmake.exe"
$extractionType = $ExtractionType_ZIP
}
elseif($Dependency -eq "nuget")
@@ -40,11 +40,11 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
}
elseif($Dependency -eq "vswhere")
{
- $requiredVersion = "2.2.11"
- $downloadVersion = "2.2.11"
- $url = "https://github.com/Microsoft/vswhere/releases/download/2.2.11/vswhere.exe"
+ $requiredVersion = "2.3.2"
+ $downloadVersion = "2.3.2"
+ $url = "https://github.com/Microsoft/vswhere/releases/download/2.3.2/vswhere.exe"
$downloadPath = "$downloadsDir\vswhere-$downloadVersion\vswhere.exe"
- $expectedDownloadedFileHash = "0235c2cb6341978abdf32e27fcf1d7af5cb5514c035e529c4cd9283e6f1a261f"
+ $expectedDownloadedFileHash = "103f2784c4b2c8e70c7c1c03687abbf22bce052aae30639406e4e13ffa29ee04"
$executableFromDownload = $downloadPath
$extractionType = $ExtractionType_NO_EXTRACTION_REQUIRED
}
@@ -75,9 +75,12 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
throw "Unknown program requested"
}
- Write-Host "Downloading $Dependency..."
- vcpkgDownloadFile $url $downloadPath
- Write-Host "Downloading $Dependency has completed successfully."
+ if (!(Test-Path $downloadPath))
+ {
+ Write-Host "Downloading $Dependency..."
+ vcpkgDownloadFile $url $downloadPath
+ Write-Host "Downloading $Dependency has completed successfully."
+ }
$downloadedFileHash = vcpkgGetSHA256 $downloadPath
vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash
@@ -100,7 +103,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency)
{
if (-not (Test-Path $executableFromDownload))
{
- vcpkgInvokeCommand $downloadPath "-y" -wait:$true
+ vcpkgInvokeCommand $downloadPath "-y"
}
}
else
diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1
index 46ba767b9..570ebdf44 100644
--- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1
+++ b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1
@@ -6,7 +6,7 @@ param(
$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash
-$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
+$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition
$VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1
if ($VisualStudioInstallationInstances -eq $null)
{
diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1
index e3bc67ff6..359da9caa 100644
--- a/scripts/findVisualStudioInstallationInstances.ps1
+++ b/scripts/findVisualStudioInstallationInstances.ps1
@@ -3,7 +3,7 @@ param(
)
-$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition
+$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition
$vswhereExe = (& $scriptsDir\fetchDependency.ps1 "vswhere") -replace "<sol>::" -replace "::<eol>"
$output = & $vswhereExe -prerelease -legacy -products * -format xml
diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt
index d78a54a5e..486716ae3 100644
--- a/toolsrc/VERSION.txt
+++ b/toolsrc/VERSION.txt
@@ -1 +1 @@
-"0.0.101" \ No newline at end of file
+"0.0.103" \ No newline at end of file
diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h
index 0c0add7ab..b23abe4eb 100644
--- a/toolsrc/include/tests.utils.h
+++ b/toolsrc/include/tests.utils.h
@@ -6,6 +6,7 @@
#include <vcpkg/packagespec.h>
#include <vcpkg/packagespecparseresult.h>
#include <vcpkg/statusparagraph.h>
+#include <vcpkg/triplet.h>
#include <memory>
@@ -38,3 +39,5 @@ T&& unwrap(vcpkg::Optional<T>&& opt)
Assert::IsTrue(opt.has_value());
return std::move(*opt.get());
}
+
+vcpkg::PackageSpec unsafe_pspec(std::string name, vcpkg::Triplet t = vcpkg::Triplet::X86_WINDOWS);
diff --git a/toolsrc/include/vcpkg/base/span.h b/toolsrc/include/vcpkg/base/span.h
index 158f1ac74..c9ac18afe 100644
--- a/toolsrc/include/vcpkg/base/span.h
+++ b/toolsrc/include/vcpkg/base/span.h
@@ -11,15 +11,17 @@ namespace vcpkg
struct Span
{
public:
+ static_assert(!std::is_reference<T>::value, "Span<&> is illegal");
+
using element_type = T;
- using pointer = T*;
- using reference = T&;
- using iterator = T*;
+ using pointer = std::add_pointer_t<T>;
+ using reference = std::add_lvalue_reference_t<T>;
+ using iterator = pointer;
constexpr Span() noexcept : m_ptr(nullptr), m_count(0) {}
constexpr Span(std::nullptr_t) noexcept : Span() {}
- constexpr Span(T* ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {}
- constexpr Span(T* ptr_begin, T* ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {}
+ constexpr Span(pointer ptr, size_t count) noexcept : m_ptr(ptr), m_count(count) {}
+ constexpr Span(pointer ptr_begin, pointer ptr_end) noexcept : m_ptr(ptr_begin), m_count(ptr_end - ptr_begin) {}
constexpr Span(std::initializer_list<T> l) noexcept : m_ptr(l.begin()), m_count(l.size()) {}
template<size_t N>
@@ -69,4 +71,4 @@ namespace vcpkg
{
return sp.end();
}
-} \ No newline at end of file
+}
diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h
index 8902a7b08..014f004a2 100644
--- a/toolsrc/include/vcpkg/dependencies.h
+++ b/toolsrc/include/vcpkg/dependencies.h
@@ -23,23 +23,10 @@ namespace vcpkg::Dependencies
const Build::BuildPackageOptions& options);
std::string to_output_string(RequestType request_type, const CStringView s);
- struct AnyParagraph
- {
- std::vector<PackageSpec> dependencies(const Triplet& triplet) const;
-
- Optional<StatusParagraph> status_paragraph;
- Optional<BinaryControlFile> binary_control_file;
- Optional<const SourceControlFile*> source_control_file;
- };
-}
-
-namespace vcpkg::Dependencies
-{
enum class InstallPlanType
{
UNKNOWN,
BUILD_AND_INSTALL,
- INSTALL,
ALREADY_INSTALLED,
EXCLUDED
};
@@ -51,18 +38,22 @@ namespace vcpkg::Dependencies
InstallPlanAction();
InstallPlanAction(const PackageSpec& spec,
+ InstalledPackageView&& spghs,
const std::unordered_set<std::string>& features,
const RequestType& request_type);
- InstallPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type);
+
InstallPlanAction(const PackageSpec& spec,
- const SourceControlFile& any_paragraph,
+ const SourceControlFile& scf,
const std::unordered_set<std::string>& features,
const RequestType& request_type);
std::string displayname() const;
PackageSpec spec;
- AnyParagraph any_paragraph;
+
+ Optional<const SourceControlFile&> source_control_file;
+ Optional<InstalledPackageView> installed_package;
+
InstallPlanType plan_type;
RequestType request_type;
Build::BuildPackageOptions build_options;
@@ -111,12 +102,21 @@ namespace vcpkg::Dependencies
static bool compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right);
ExportPlanAction();
- ExportPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type);
+ ExportPlanAction(const PackageSpec& spec,
+ InstalledPackageView&& installed_package,
+ const RequestType& request_type);
+
+ ExportPlanAction(const PackageSpec& spec, const RequestType& request_type);
PackageSpec spec;
- AnyParagraph any_paragraph;
ExportPlanType plan_type;
RequestType request_type;
+
+ Optional<const BinaryParagraph&> core_paragraph() const;
+ std::vector<PackageSpec> dependencies(const Triplet& triplet) const;
+
+ private:
+ Optional<InstalledPackageView> m_installed_package;
};
struct PortFileProvider
@@ -151,8 +151,8 @@ namespace vcpkg::Dependencies
PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db);
~PackageGraph();
- void install(const FeatureSpec& spec);
- void upgrade(const PackageSpec& spec);
+ void install(const FeatureSpec& spec) const;
+ void upgrade(const PackageSpec& spec) const;
std::vector<AnyAction> serialize() const;
diff --git a/toolsrc/include/vcpkg/remove.h b/toolsrc/include/vcpkg/remove.h
index 6d8a3ebe9..36aeda2ad 100644
--- a/toolsrc/include/vcpkg/remove.h
+++ b/toolsrc/include/vcpkg/remove.h
@@ -17,7 +17,7 @@ namespace vcpkg::Remove
void perform_remove_plan_action(const VcpkgPaths& paths,
const Dependencies::RemovePlanAction& action,
const Purge purge,
- StatusParagraphs& status_db);
+ StatusParagraphs* status_db);
extern const CommandStructure COMMAND_STRUCTURE;
diff --git a/toolsrc/include/vcpkg/statusparagraph.h b/toolsrc/include/vcpkg/statusparagraph.h
index ca84b1bb7..0802de530 100644
--- a/toolsrc/include/vcpkg/statusparagraph.h
+++ b/toolsrc/include/vcpkg/statusparagraph.h
@@ -32,6 +32,8 @@ namespace vcpkg
StatusParagraph();
explicit StatusParagraph(std::unordered_map<std::string, std::string>&& fields);
+ bool is_installed() const { return want == Want::INSTALL && state == InstallState::INSTALLED; }
+
BinaryParagraph package;
Want want;
InstallState state;
@@ -42,4 +44,19 @@ namespace vcpkg
std::string to_string(InstallState f);
std::string to_string(Want f);
+
+ struct InstalledPackageView
+ {
+ InstalledPackageView() : core(nullptr) {}
+
+ InstalledPackageView(const StatusParagraph* c, std::vector<const StatusParagraph*>&& fs)
+ : core(c), features(std::move(fs))
+ {
+ }
+
+ std::vector<PackageSpec> dependencies() const;
+
+ const StatusParagraph* core;
+ std::vector<const StatusParagraph*> features;
+ };
}
diff --git a/toolsrc/include/vcpkg/statusparagraphs.h b/toolsrc/include/vcpkg/statusparagraphs.h
index 747a0c1ab..fd33f8094 100644
--- a/toolsrc/include/vcpkg/statusparagraphs.h
+++ b/toolsrc/include/vcpkg/statusparagraphs.h
@@ -21,11 +21,10 @@ namespace vcpkg
std::vector<std::unique_ptr<StatusParagraph>*> find_all(const std::string& name, const Triplet& triplet);
- const_iterator find_installed(const PackageSpec& spec) const
- {
- return find_installed(spec.name(), spec.triplet());
- }
- const_iterator find_installed(const std::string& name, const Triplet& triplet) const;
+ Optional<InstalledPackageView> find_all_installed(const PackageSpec& spec) const;
+
+ const_iterator find_installed(const PackageSpec& spec) const;
+ bool is_installed(const PackageSpec& spec) const;
iterator insert(std::unique_ptr<StatusParagraph>);
diff --git a/toolsrc/include/vcpkg/versiont.h b/toolsrc/include/vcpkg/versiont.h
index 6d8332521..8427dfe3b 100644
--- a/toolsrc/include/vcpkg/versiont.h
+++ b/toolsrc/include/vcpkg/versiont.h
@@ -6,6 +6,7 @@ namespace vcpkg
struct VersionT
{
VersionT();
+ VersionT(std::string&& value);
VersionT(const std::string& value);
const std::string& to_string() const;
diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp
index 593003b80..86386be14 100644
--- a/toolsrc/src/tests.plan.cpp
+++ b/toolsrc/src/tests.plan.cpp
@@ -41,8 +41,7 @@ namespace UnitTest1
Assert::AreEqual(plan.spec.triplet().to_string().c_str(), triplet.to_string().c_str());
- Assert::AreEqual(pkg_name.c_str(),
- (*plan.any_paragraph.source_control_file.get())->core_paragraph->name.c_str());
+ Assert::AreEqual(pkg_name.c_str(), plan.source_control_file.get()->core_paragraph->name.c_str());
Assert::AreEqual(size_t(vec.size()), feature_list.size());
for (auto&& feature_name : vec)
@@ -505,13 +504,6 @@ namespace UnitTest1
}
};
- static PackageSpec unsafe_pspec(std::string name, Triplet t = Triplet::X86_WINDOWS)
- {
- auto m_ret = PackageSpec::from_name_and_triplet(name, t);
- Assert::IsTrue(m_ret.has_value());
- return m_ret.value_or_exit(VCPKG_LINE_INFO);
- }
-
class RemovePlanTests : public TestClass<RemovePlanTests>
{
TEST_METHOD(basic_remove_scheme)
diff --git a/toolsrc/src/tests.statusparagraphs.cpp b/toolsrc/src/tests.statusparagraphs.cpp
index ed6eaa764..0d5324a8c 100644
--- a/toolsrc/src/tests.statusparagraphs.cpp
+++ b/toolsrc/src/tests.statusparagraphs.cpp
@@ -1,5 +1,7 @@
#include "tests.pch.h"
+#include <tests.utils.h>
+
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
using namespace vcpkg;
@@ -25,7 +27,7 @@ Status: install ok installed
StatusParagraphs status_db(Util::fmap(
*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); }));
- auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS);
+ auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS));
Assert::IsTrue(it != status_db.end());
}
@@ -45,7 +47,7 @@ Status: purge ok not-installed
StatusParagraphs status_db(Util::fmap(
*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); }));
- auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS);
+ auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS));
Assert::IsTrue(it == status_db.end());
}
@@ -73,8 +75,8 @@ Status: purge ok not-installed
StatusParagraphs status_db(Util::fmap(
*pghs.get(), [](RawParagraph& rpgh) { return std::make_unique<StatusParagraph>(std::move(rpgh)); }));
- auto it = status_db.find_installed("ffmpeg", Triplet::X64_WINDOWS);
+ auto it = status_db.find_installed(unsafe_pspec("ffmpeg", Triplet::X64_WINDOWS));
Assert::IsTrue(it != status_db.end());
}
};
-} \ No newline at end of file
+}
diff --git a/toolsrc/src/tests.utils.cpp b/toolsrc/src/tests.utils.cpp
index b9fb51a59..19e877920 100644
--- a/toolsrc/src/tests.utils.cpp
+++ b/toolsrc/src/tests.utils.cpp
@@ -13,7 +13,6 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework
{
case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED";
case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL";
- case Dependencies::InstallPlanType::INSTALL: return L"INSTALL";
case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED";
case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN";
default: return ToString(static_cast<int>(t));
@@ -60,3 +59,10 @@ std::unique_ptr<StatusParagraph> make_status_feature_pgh(const char* name,
{"Depends", depends},
{"Status", "install ok installed"}});
}
+
+PackageSpec unsafe_pspec(std::string name, Triplet t)
+{
+ auto m_ret = PackageSpec::from_name_and_triplet(name, t);
+ Assert::IsTrue(m_ret.has_value());
+ return m_ret.value_or_exit(VCPKG_LINE_INFO);
+}
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp
index 094ea1dc5..9f29dcdd2 100644
--- a/toolsrc/src/vcpkg.cpp
+++ b/toolsrc/src/vcpkg.cpp
@@ -4,7 +4,7 @@
#pragma warning(push)
#pragma warning(disable : 4768)
-#include <Shlobj.h>
+#include <ShlObj.h>
#pragma warning(pop)
#else
#include <unistd.h>
@@ -214,7 +214,7 @@ static void load_config()
static std::string trim_path_from_command_line(const std::string& full_command_line)
{
Checks::check_exit(
- VCPKG_LINE_INFO, full_command_line.size() > 0, "Internal failure - cannot have empty command line");
+ VCPKG_LINE_INFO, !full_command_line.empty(), "Internal failure - cannot have empty command line");
if (full_command_line[0] == '"')
{
diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp
index 960ba0400..db1360ba0 100644
--- a/toolsrc/src/vcpkg/build.cpp
+++ b/toolsrc/src/vcpkg/build.cpp
@@ -61,7 +61,8 @@ namespace vcpkg::Build::Command
spec.name());
const StatusParagraphs status_db = database_load_check(paths);
- const Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES};
+ const Build::BuildPackageOptions build_package_options{
+ Build::UseHeadVersion::NO, Build::AllowDownloads::YES, Build::CleanBuildtrees::NO};
const std::unordered_set<std::string> features_as_set(full_spec.features.begin(), full_spec.features.end());
@@ -269,10 +270,10 @@ namespace vcpkg::Build
std::vector<PackageSpec> missing_specs;
for (auto&& dep : filter_dependencies(config.scf.core_paragraph->depends, triplet))
{
- if (status_db.find_installed(dep, triplet) == status_db.end())
+ auto dep_spec = PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO);
+ if (!status_db.is_installed(dep_spec))
{
- missing_specs.push_back(
- PackageSpec::from_name_and_triplet(dep, triplet).value_or_exit(VCPKG_LINE_INFO));
+ missing_specs.push_back(std::move(dep_spec));
}
}
// Fail the build if any dependencies were missing
@@ -295,7 +296,7 @@ namespace vcpkg::Build
{
features.append(feature + ";");
}
- if (features.size() > 0)
+ if (!features.empty())
{
features.pop_back();
}
diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp
index 6fd123b7c..85bf5fb4d 100644
--- a/toolsrc/src/vcpkg/commands.cache.cpp
+++ b/toolsrc/src/vcpkg/commands.cache.cpp
@@ -47,7 +47,7 @@ namespace vcpkg::Commands::Cache
Checks::exit_success(VCPKG_LINE_INFO);
}
- if (args.command_arguments.size() == 0)
+ if (args.command_arguments.empty())
{
for (const BinaryParagraph& binary_paragraph : binary_paragraphs)
{
diff --git a/toolsrc/src/vcpkg/commands.create.cpp b/toolsrc/src/vcpkg/commands.create.cpp
index 44f5f7928..25c34cf09 100644
--- a/toolsrc/src/vcpkg/commands.create.cpp
+++ b/toolsrc/src/vcpkg/commands.create.cpp
@@ -34,7 +34,7 @@ namespace vcpkg::Commands::Create
R"(Filename cannot contain invalid chars %s, but was %s)",
Files::FILESYSTEM_INVALID_CHARACTERS,
zip_file_name);
- cmake_args.push_back({"FILENAME", zip_file_name});
+ cmake_args.emplace_back("FILENAME", zip_file_name);
}
const std::string cmd_launch_cmake = make_cmake_cmd(cmake_exe, paths.ports_cmake, cmake_args);
diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp
index 682267acb..58d9aa0be 100644
--- a/toolsrc/src/vcpkg/commands.exportifw.cpp
+++ b/toolsrc/src/vcpkg/commands.exportifw.cpp
@@ -69,8 +69,7 @@ namespace vcpkg::Export::IFW
{
std::error_code ec;
- const BinaryParagraph& binary_paragraph =
- action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph;
+ const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO);
// Prepare meta dir
const fs::path package_xml_file_path =
@@ -139,14 +138,13 @@ namespace vcpkg::Export::IFW
)###",
create_release_date()));
- for (auto package = unique_packages.begin(); package != unique_packages.end(); ++package)
+ for (const auto& unique_package : unique_packages)
{
- const ExportPlanAction& action = *(package->second);
- const BinaryParagraph& binary_paragraph =
- action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph;
+ const ExportPlanAction& action = *(unique_package.second);
+ const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO);
package_xml_file_path =
- raw_exported_dir_path / Strings::format("packages.%s", package->first) / "meta" / "package.xml";
+ raw_exported_dir_path / Strings::format("packages.%s", unique_package.first) / "meta" / "package.xml";
package_xml_dir_path = package_xml_file_path.parent_path();
fs.create_directories(package_xml_dir_path, ec);
Checks::check_exit(VCPKG_LINE_INFO,
@@ -436,8 +434,7 @@ namespace vcpkg::Export::IFW
const std::string display_name = action.spec.to_string();
System::println("Exporting package %s... ", display_name);
- const BinaryParagraph& binary_paragraph =
- action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph;
+ const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO);
unique_packages[action.spec.name()] = &action;
unique_triplets.insert(action.spec.triplet().canonical_name());
diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp
index 1e3e5b23d..fa3d80f27 100644
--- a/toolsrc/src/vcpkg/commands.hash.cpp
+++ b/toolsrc/src/vcpkg/commands.hash.cpp
@@ -7,7 +7,7 @@
namespace vcpkg::Commands::Hash
{
- static void do_file_hash(fs::path const &cmake_exe_path, fs::path const& path, std::string const& hash_type)
+ static void do_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type)
{
const std::string cmd_line = Strings::format(
R"("%s" -E %ssum %s)", cmake_exe_path.u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string());
@@ -17,7 +17,7 @@ namespace vcpkg::Commands::Hash
std::string const& output = ec_data.output;
- const auto start = output.find_first_of(" ");
+ const auto start = output.find_first_of(' ');
Checks::check_exit(
VCPKG_LINE_INFO, start != std::string::npos, "Unexpected output format from command: %s", cmd_line);
diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp
index 2570c8a6d..a5efd5442 100644
--- a/toolsrc/src/vcpkg/commands.list.cpp
+++ b/toolsrc/src/vcpkg/commands.list.cpp
@@ -58,7 +58,7 @@ namespace vcpkg::Commands::List
return lhs->package.displayname() < rhs->package.displayname();
});
- if (args.command_arguments.size() == 0)
+ if (args.command_arguments.empty())
{
for (const StatusParagraph* status_paragraph : installed_packages)
{
diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp
index 76aeb0eaa..4842fde96 100644
--- a/toolsrc/src/vcpkg/dependencies.cpp
+++ b/toolsrc/src/vcpkg/dependencies.cpp
@@ -22,7 +22,8 @@ namespace vcpkg::Dependencies
struct Cluster : Util::MoveOnlyBase
{
- std::vector<StatusParagraph*> status_paragraphs;
+ InstalledPackageView installed_package;
+
Optional<const SourceControlFile*> source_control_file;
PackageSpec spec;
std::unordered_map<std::string, FeatureNodeEdges> edges;
@@ -103,30 +104,6 @@ namespace vcpkg::Dependencies
const PortFileProvider& m_provider;
};
- std::vector<PackageSpec> AnyParagraph::dependencies(const Triplet& triplet) const
- {
- if (const auto p = this->status_paragraph.get())
- {
- return PackageSpec::from_dependencies_of_port(p->package.spec.name(), p->package.depends, triplet);
- }
-
- if (const auto p = this->binary_control_file.get())
- {
- auto deps = Util::fmap_flatten(p->features, [](const BinaryParagraph& pgh) { return pgh.depends; });
- deps.insert(deps.end(), p->core_paragraph.depends.cbegin(), p->core_paragraph.depends.cend());
- return PackageSpec::from_dependencies_of_port(p->core_paragraph.spec.name(), deps, triplet);
- }
-
- if (const auto p = this->source_control_file.value_or(nullptr))
- {
- return PackageSpec::from_dependencies_of_port(
- p->core_paragraph->name, filter_dependencies(p->core_paragraph->depends, triplet), triplet);
- }
-
- Checks::exit_with_message(VCPKG_LINE_INFO,
- "Cannot get dependencies because there was none of: source/binary/status paragraphs");
- }
-
std::string to_output_string(RequestType request_type,
const CStringView s,
const Build::BuildPackageOptions& options)
@@ -154,47 +131,29 @@ namespace vcpkg::Dependencies
InstallPlanAction::InstallPlanAction() : plan_type(InstallPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {}
InstallPlanAction::InstallPlanAction(const PackageSpec& spec,
- const SourceControlFile& any_paragraph,
+ const SourceControlFile& scf,
const std::unordered_set<std::string>& features,
const RequestType& request_type)
- : spec(spec), plan_type(InstallPlanType::BUILD_AND_INSTALL), request_type(request_type), feature_list(features)
+ : spec(spec)
+ , source_control_file(scf)
+ , plan_type(InstallPlanType::BUILD_AND_INSTALL)
+ , request_type(request_type)
+ , feature_list(features)
{
- this->any_paragraph.source_control_file = &any_paragraph;
}
InstallPlanAction::InstallPlanAction(const PackageSpec& spec,
+ InstalledPackageView&& ipv,
const std::unordered_set<std::string>& features,
const RequestType& request_type)
- : spec(spec), plan_type(InstallPlanType::ALREADY_INSTALLED), request_type(request_type), feature_list(features)
+ : spec(spec)
+ , installed_package(std::move(ipv))
+ , plan_type(InstallPlanType::ALREADY_INSTALLED)
+ , request_type(request_type)
+ , feature_list(features)
{
}
- InstallPlanAction::InstallPlanAction(const PackageSpec& spec,
- const AnyParagraph& any_paragraph,
- const RequestType& request_type)
- : spec(spec), any_paragraph(any_paragraph), plan_type(InstallPlanType::UNKNOWN), request_type(request_type)
- {
- if (auto p = any_paragraph.status_paragraph.get())
- {
- this->plan_type = InstallPlanType::ALREADY_INSTALLED;
- return;
- }
-
- if (auto p = any_paragraph.binary_control_file.get())
- {
- this->plan_type = InstallPlanType::INSTALL;
- return;
- }
-
- if (auto p = any_paragraph.source_control_file.get())
- {
- this->plan_type = InstallPlanType::BUILD_AND_INSTALL;
- return;
- }
-
- Checks::unreachable(VCPKG_LINE_INFO);
- }
-
std::string InstallPlanAction::displayname() const
{
if (this->feature_list.empty())
@@ -243,21 +202,35 @@ namespace vcpkg::Dependencies
ExportPlanAction::ExportPlanAction() : plan_type(ExportPlanType::UNKNOWN), request_type(RequestType::UNKNOWN) {}
ExportPlanAction::ExportPlanAction(const PackageSpec& spec,
- const AnyParagraph& any_paragraph,
+ InstalledPackageView&& installed_package,
const RequestType& request_type)
- : spec(spec), any_paragraph(any_paragraph), plan_type(ExportPlanType::UNKNOWN), request_type(request_type)
+ : spec(spec)
+ , plan_type(ExportPlanType::ALREADY_BUILT)
+ , request_type(request_type)
+ , m_installed_package(std::move(installed_package))
{
- if (auto p = any_paragraph.binary_control_file.get())
- {
- this->plan_type = ExportPlanType::ALREADY_BUILT;
- return;
- }
+ }
+
+ ExportPlanAction::ExportPlanAction(const PackageSpec& spec, const RequestType& request_type)
+ : spec(spec), plan_type(ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT), request_type(request_type)
+ {
+ }
- if (auto p = any_paragraph.source_control_file.get())
+ Optional<const BinaryParagraph&> ExportPlanAction::core_paragraph() const
+ {
+ if (auto p_ip = m_installed_package.get())
{
- this->plan_type = ExportPlanType::PORT_AVAILABLE_BUT_NOT_BUILT;
- return;
+ return p_ip->core->package;
}
+ return nullopt;
+ }
+
+ std::vector<PackageSpec> ExportPlanAction::dependencies(const Triplet&) const
+ {
+ if (auto p_ip = m_installed_package.get())
+ return p_ip->dependencies();
+ else
+ return {};
}
bool RemovePlanAction::compare_by_name(const RemovePlanAction* left, const RemovePlanAction* right)
@@ -404,7 +377,7 @@ namespace vcpkg::Dependencies
std::vector<PackageSpec> adjacency_list(const ExportPlanAction& plan) const override
{
- return plan.any_paragraph.dependencies(plan.spec.triplet());
+ return plan.dependencies(plan.spec.triplet());
}
ExportPlanAction load_vertex_data(const PackageSpec& spec) const override
@@ -413,14 +386,14 @@ namespace vcpkg::Dependencies
? RequestType::USER_REQUESTED
: RequestType::AUTO_SELECTED;
- Expected<BinaryControlFile> maybe_bpgh = Paragraphs::try_load_cached_control_package(paths, spec);
- if (auto bcf = maybe_bpgh.get())
- return ExportPlanAction{spec, AnyParagraph{nullopt, std::move(*bcf), nullopt}, request_type};
+ auto maybe_ipv = status_db.find_all_installed(spec);
- auto maybe_scf = provider.get_control_file(spec.name());
- if (auto scf = maybe_scf.get()) return ExportPlanAction{spec, {nullopt, nullopt, scf}, request_type};
+ if (auto p_ipv = maybe_ipv.get())
+ {
+ return ExportPlanAction{spec, std::move(*p_ipv), request_type};
+ }
- Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec);
+ return ExportPlanAction{spec, request_type};
}
std::string to_string(const PackageSpec& spec) const override { return spec.to_string(); }
@@ -440,10 +413,10 @@ namespace vcpkg::Dependencies
static MarkPlusResult mark_plus(const std::string& feature,
Cluster& cluster,
- ClusterGraph& pkg_to_cluster,
+ ClusterGraph& graph,
GraphPlan& graph_plan);
- static void mark_minus(Cluster& cluster, ClusterGraph& pkg_to_cluster, GraphPlan& graph_plan);
+ static void mark_minus(Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan);
MarkPlusResult mark_plus(const std::string& feature, Cluster& cluster, ClusterGraph& graph, GraphPlan& graph_plan)
{
@@ -554,7 +527,7 @@ namespace vcpkg::Dependencies
return create_feature_install_plan(provider, specs, status_db);
}
- void PackageGraph::install(const FeatureSpec& spec)
+ void PackageGraph::install(const FeatureSpec& spec) const
{
Cluster& spec_cluster = m_graph->get(spec.spec());
spec_cluster.request_type = RequestType::USER_REQUESTED;
@@ -592,7 +565,7 @@ namespace vcpkg::Dependencies
m_graph_plan->install_graph.add_vertex(ClusterPtr{&spec_cluster});
}
- void PackageGraph::upgrade(const PackageSpec& spec)
+ void PackageGraph::upgrade(const PackageSpec& spec) const
{
Cluster& spec_cluster = m_graph->get(spec);
spec_cluster.request_type = RequestType::USER_REQUESTED;
@@ -642,6 +615,7 @@ namespace vcpkg::Dependencies
if (p_cluster->request_type != RequestType::USER_REQUESTED) continue;
plan.emplace_back(InstallPlanAction{
p_cluster->spec,
+ InstalledPackageView{p_cluster->installed_package},
p_cluster->original_features,
p_cluster->request_type,
});
@@ -664,17 +638,18 @@ namespace vcpkg::Dependencies
cluster.transient_uninstalled = false;
- cluster.status_paragraphs.emplace_back(status_paragraph);
-
auto& status_paragraph_feature = status_paragraph->package.feature;
+
// In this case, empty string indicates the "core" paragraph for a package.
if (status_paragraph_feature.empty())
{
cluster.original_features.insert("core");
+ cluster.installed_package.core = status_paragraph;
}
else
{
cluster.original_features.insert(status_paragraph_feature);
+ cluster.installed_package.features.emplace_back(status_paragraph);
}
}
@@ -701,11 +676,11 @@ namespace vcpkg::Dependencies
}
PackageGraph::PackageGraph(const PortFileProvider& provider, const StatusParagraphs& status_db)
- : m_graph(create_feature_install_graph(provider, status_db)), m_graph_plan(std::make_unique<GraphPlan>())
+ : m_graph_plan(std::make_unique<GraphPlan>()), m_graph(create_feature_install_graph(provider, status_db))
{
}
- PackageGraph::~PackageGraph() {}
+ PackageGraph::~PackageGraph() = default;
void print_plan(const std::vector<AnyAction>& action_plan, const bool is_recursive)
{
@@ -739,7 +714,6 @@ namespace vcpkg::Dependencies
{
switch (install_action->plan_type)
{
- case InstallPlanType::INSTALL: only_install_plans.emplace_back(install_action); break;
case InstallPlanType::ALREADY_INSTALLED:
if (install_action->request_type == RequestType::USER_REQUESTED)
already_installed_plans.emplace_back(install_action);
@@ -769,29 +743,29 @@ namespace vcpkg::Dependencies
});
};
- if (excluded.size() > 0)
+ if (!excluded.empty())
{
System::println("The following packages are excluded:\n%s", actions_to_output_string(excluded));
}
- if (already_installed_plans.size() > 0)
+ if (!already_installed_plans.empty())
{
System::println("The following packages are already installed:\n%s",
actions_to_output_string(already_installed_plans));
}
- if (rebuilt_plans.size() > 0)
+ if (!rebuilt_plans.empty())
{
System::println("The following packages will be rebuilt:\n%s", actions_to_output_string(rebuilt_plans));
}
- if (new_plans.size() > 0)
+ if (!new_plans.empty())
{
System::println("The following packages will be built and installed:\n%s",
actions_to_output_string(new_plans));
}
- if (only_install_plans.size() > 0)
+ if (!only_install_plans.empty())
{
System::println("The following packages will be directly installed:\n%s",
actions_to_output_string(only_install_plans));
@@ -800,7 +774,7 @@ namespace vcpkg::Dependencies
if (has_non_user_requested_packages)
System::println("Additional packages (*) will be modified to complete this operation.");
- if (remove_plans.size() > 0 && !is_recursive)
+ if (!remove_plans.empty() && !is_recursive)
{
System::println(System::Color::warning,
"If you are sure you want to rebuild the above packages, run the command with the "
diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp
index 64cb3c804..a9c407dd8 100644
--- a/toolsrc/src/vcpkg/export.cpp
+++ b/toolsrc/src/vcpkg/export.cpp
@@ -385,7 +385,7 @@ namespace vcpkg::Export
" %s"
"\n",
cmake_variable.s);
- };
+ }
static void handle_raw_based_export(Span<const ExportPlanAction> export_plan,
const ExportArguments& opts,
@@ -410,8 +410,7 @@ namespace vcpkg::Export
const std::string display_name = action.spec.to_string();
System::println("Exporting package %s... ", display_name);
- const BinaryParagraph& binary_paragraph =
- action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO).core_paragraph;
+ const BinaryParagraph& binary_paragraph = action.core_paragraph().value_or_exit(VCPKG_LINE_INFO);
const InstallDir dirs = InstallDir::from_destination_root(
raw_exported_dir_path / "installed",
diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp
index d6a28d57c..081063633 100644
--- a/toolsrc/src/vcpkg/install.cpp
+++ b/toolsrc/src/vcpkg/install.cpp
@@ -292,12 +292,11 @@ namespace vcpkg::Install
System::println("Building package %s... ", display_name_with_features);
auto result = [&]() -> Build::ExtendedBuildResult {
- const Build::BuildPackageConfig build_config{
- *action.any_paragraph.source_control_file.value_or_exit(VCPKG_LINE_INFO),
- action.spec.triplet(),
- paths.port_dir(action.spec),
- action.build_options,
- action.feature_list};
+ const Build::BuildPackageConfig build_config{action.source_control_file.value_or_exit(VCPKG_LINE_INFO),
+ action.spec.triplet(),
+ paths.port_dir(action.spec),
+ action.build_options,
+ action.feature_list};
return Build::build_package(paths, build_config, status_db);
}();
@@ -315,18 +314,6 @@ namespace vcpkg::Install
return {code, std::move(bcf)};
}
- if (plan_type == InstallPlanType::INSTALL)
- {
- if (use_head_version && is_user_requested)
- {
- System::println(
- System::Color::warning, "Package %s is already built -- not building from HEAD", display_name);
- }
- auto code = aux_install(display_name_with_features,
- action.any_paragraph.binary_control_file.value_or_exit(VCPKG_LINE_INFO));
- return code;
- }
-
if (plan_type == InstallPlanType::EXCLUDED)
{
System::println(System::Color::warning, "Package %s is excluded", display_name);
@@ -399,7 +386,7 @@ namespace vcpkg::Install
}
else if (const auto remove_action = action.remove_action.get())
{
- Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, status_db);
+ Remove::perform_remove_plan_action(paths, *remove_action, Remove::Purge::YES, &status_db);
}
else
{
@@ -662,11 +649,9 @@ namespace vcpkg::Install
if (action)
if (auto p_install_plan = action->install_action.get())
{
- if (auto p_bcf = p_install_plan->any_paragraph.binary_control_file.get())
- return &p_bcf->core_paragraph;
- else if (auto p_status = p_install_plan->any_paragraph.status_paragraph.get())
+ if (auto p_status = p_install_plan->installed_package.get())
{
- return &p_status->package;
+ return &p_status->core->package;
}
}
return nullptr;
diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp
index e03df2ed2..3eaf991ce 100644
--- a/toolsrc/src/vcpkg/remove.cpp
+++ b/toolsrc/src/vcpkg/remove.cpp
@@ -21,19 +21,28 @@ namespace vcpkg::Remove
void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db)
{
auto& fs = paths.get_filesystem();
- auto spghs = status_db->find_all(spec.name(), spec.triplet());
- const auto core_pkg = **status_db->find(spec.name(), spec.triplet(), "");
+ auto maybe_ipv = status_db->find_all_installed(spec);
+
+ Checks::check_exit(
+ VCPKG_LINE_INFO, maybe_ipv.has_value(), "unable to remove package %s: already removed", spec);
+
+ auto&& ipv = maybe_ipv.value_or_exit(VCPKG_LINE_INFO);
+
+ std::vector<StatusParagraph> spghs;
+ spghs.emplace_back(*ipv.core);
+ for (auto&& feature : ipv.features)
+ {
+ spghs.emplace_back(*feature);
+ }
for (auto&& spgh : spghs)
{
- StatusParagraph& pkg = **spgh;
- if (pkg.state != InstallState::INSTALLED) continue;
- pkg.want = Want::PURGE;
- pkg.state = InstallState::HALF_INSTALLED;
- write_update(paths, pkg);
+ spgh.want = Want::PURGE;
+ spgh.state = InstallState::HALF_INSTALLED;
+ write_update(paths, spgh);
}
- auto maybe_lines = fs.read_lines(paths.listfile_path(core_pkg.package));
+ auto maybe_lines = fs.read_lines(paths.listfile_path(ipv.core->package));
if (const auto lines = maybe_lines.get())
{
@@ -90,15 +99,15 @@ namespace vcpkg::Remove
}
}
- fs.remove(paths.listfile_path(core_pkg.package));
+ fs.remove(paths.listfile_path(ipv.core->package));
}
for (auto&& spgh : spghs)
{
- StatusParagraph& pkg = **spgh;
- if (pkg.state != InstallState::HALF_INSTALLED) continue;
- pkg.state = InstallState::NOT_INSTALLED;
- write_update(paths, pkg);
+ spgh.state = InstallState::NOT_INSTALLED;
+ write_update(paths, spgh);
+
+ status_db->insert(std::make_unique<StatusParagraph>(std::move(spgh)));
}
}
@@ -136,7 +145,7 @@ namespace vcpkg::Remove
void perform_remove_plan_action(const VcpkgPaths& paths,
const RemovePlanAction& action,
const Purge purge,
- StatusParagraphs& status_db)
+ StatusParagraphs* status_db)
{
const std::string display_name = action.spec.to_string();
@@ -147,7 +156,7 @@ namespace vcpkg::Remove
break;
case RemovePlanType::REMOVE:
System::println("Removing package %s... ", display_name);
- remove_package(paths, action.spec, &status_db);
+ remove_package(paths, action.spec, status_db);
System::println(System::Color::success, "Removing package %s... done", display_name);
break;
case RemovePlanType::UNKNOWN:
@@ -278,7 +287,7 @@ namespace vcpkg::Remove
for (const RemovePlanAction& action : remove_plan)
{
- perform_remove_plan_action(paths, action, purge, status_db);
+ perform_remove_plan_action(paths, action, purge, &status_db);
}
Checks::exit_success(VCPKG_LINE_INFO);
diff --git a/toolsrc/src/vcpkg/statusparagraph.cpp b/toolsrc/src/vcpkg/statusparagraph.cpp
index 5f00825e1..05238ba8b 100644
--- a/toolsrc/src/vcpkg/statusparagraph.cpp
+++ b/toolsrc/src/vcpkg/statusparagraph.cpp
@@ -1,5 +1,6 @@
#include "pch.h"
+#include <vcpkg/base/util.h>
#include <vcpkg/statusparagraph.h>
using namespace vcpkg::Parse;
@@ -83,4 +84,15 @@ namespace vcpkg
default: return "error";
}
}
+ std::vector<PackageSpec> InstalledPackageView::dependencies() const
+ {
+ auto deps = Util::fmap_flatten(features, [](const StatusParagraph* pgh) -> std::vector<std::string> const& {
+ return pgh->package.depends;
+ });
+
+ deps.insert(deps.end(), core->package.depends.begin(), core->package.depends.end());
+
+ auto&& spec = core->package.spec;
+ return PackageSpec::from_dependencies_of_port(spec.name(), deps, spec.triplet());
+ }
}
diff --git a/toolsrc/src/vcpkg/statusparagraphs.cpp b/toolsrc/src/vcpkg/statusparagraphs.cpp
index d4afc0427..475f86279 100644
--- a/toolsrc/src/vcpkg/statusparagraphs.cpp
+++ b/toolsrc/src/vcpkg/statusparagraphs.cpp
@@ -18,12 +18,38 @@ namespace vcpkg
{
if (p->package.spec.name() == name && p->package.spec.triplet() == triplet)
{
- spghs.emplace_back(&p);
+ if (p->package.feature.empty())
+ spghs.emplace(spghs.begin(), &p);
+ else
+ spghs.emplace_back(&p);
}
}
return spghs;
}
+ Optional<InstalledPackageView> StatusParagraphs::find_all_installed(const PackageSpec& spec) const
+ {
+ InstalledPackageView ipv;
+ for (auto&& p : *this)
+ {
+ if (p->package.spec.name() == spec.name() && p->package.spec.triplet() == spec.triplet() &&
+ p->is_installed())
+ {
+ if (p->package.feature.empty())
+ {
+ Checks::check_exit(VCPKG_LINE_INFO, ipv.core == nullptr);
+ ipv.core = p.get();
+ }
+ else
+ ipv.features.emplace_back(p.get());
+ }
+ }
+ if (ipv.core != nullptr)
+ return std::move(ipv);
+ else
+ return nullopt;
+ }
+
StatusParagraphs::iterator StatusParagraphs::find(const std::string& name,
const Triplet& triplet,
const std::string& feature)
@@ -44,16 +70,23 @@ namespace vcpkg
});
}
- StatusParagraphs::const_iterator StatusParagraphs::find_installed(const std::string& name,
- const Triplet& triplet) const
+ StatusParagraphs::const_iterator StatusParagraphs::find_installed(const PackageSpec& spec) const
{
- const const_iterator it = find(name, triplet);
- if (it != end() && (*it)->want == Want::INSTALL && (*it)->state == InstallState::INSTALLED)
+ auto it = find(spec);
+ if (it != end() && (*it)->is_installed())
{
return it;
}
+ else
+ {
+ return end();
+ }
+ }
- return end();
+ bool vcpkg::StatusParagraphs::is_installed(const PackageSpec& spec) const
+ {
+ auto it = find(spec);
+ return it != end() && (*it)->is_installed();
}
StatusParagraphs::iterator StatusParagraphs::insert(std::unique_ptr<StatusParagraph> pgh)
diff --git a/toolsrc/src/vcpkg/vcpkglib.cpp b/toolsrc/src/vcpkg/vcpkglib.cpp
index 5b2cec4d0..220c29720 100644
--- a/toolsrc/src/vcpkg/vcpkglib.cpp
+++ b/toolsrc/src/vcpkg/vcpkglib.cpp
@@ -92,7 +92,7 @@ namespace vcpkg
const auto my_update_id = update_id++;
const auto tmp_update_filename = paths.vcpkg_dir_updates / "incomplete";
- const auto update_filename = paths.vcpkg_dir_updates / std::to_string(my_update_id);
+ const auto update_filename = paths.vcpkg_dir_updates / Strings::format("%010d", my_update_id);
fs.write_contents(tmp_update_filename, Strings::serialize(p));
fs.rename(tmp_update_filename, update_filename);
@@ -173,7 +173,7 @@ namespace vcpkg
std::vector<StatusParagraph*> installed_packages;
for (auto&& pgh : status_db)
{
- if (pgh->state != InstallState::INSTALLED || pgh->want != Want::INSTALL) continue;
+ if (!pgh->is_installed()) continue;
installed_packages.push_back(pgh.get());
}
@@ -189,7 +189,7 @@ namespace vcpkg
for (const std::unique_ptr<StatusParagraph>& pgh : status_db)
{
- if (pgh->state != InstallState::INSTALLED || !pgh->package.feature.empty())
+ if (!pgh->is_installed() || !pgh->package.feature.empty())
{
continue;
}
diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp
index fa5fb128c..e6daedcd4 100644
--- a/toolsrc/src/vcpkg/vcpkgpaths.cpp
+++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp
@@ -115,7 +115,7 @@ namespace vcpkg
static fs::path get_cmake_path(const fs::path& downloads_folder, const fs::path& scripts_folder)
{
#if defined(_WIN32)
- static constexpr std::array<int, 3> EXPECTED_VERSION = {3, 10, 1};
+ static constexpr std::array<int, 3> EXPECTED_VERSION = {3, 10, 2};
#else
static constexpr std::array<int, 3> EXPECTED_VERSION = {3, 5, 1};
#endif
@@ -124,7 +124,7 @@ namespace vcpkg
const std::vector<fs::path> from_path = Files::find_from_PATH("cmake");
std::vector<fs::path> candidate_paths;
- const fs::path downloaded_copy = downloads_folder / "cmake-3.10.1-win32-x86" / "bin" / "cmake.exe";
+ const fs::path downloaded_copy = downloads_folder / "cmake-3.10.2-win32-x86" / "bin" / "cmake.exe";
#if defined(_WIN32)
candidate_paths.push_back(downloaded_copy);
#endif
diff --git a/toolsrc/src/vcpkg/versiont.cpp b/toolsrc/src/vcpkg/versiont.cpp
index 91f7e23ef..0d4a39255 100644
--- a/toolsrc/src/vcpkg/versiont.cpp
+++ b/toolsrc/src/vcpkg/versiont.cpp
@@ -6,6 +6,7 @@
namespace vcpkg
{
VersionT::VersionT() : value("0.0.0") {}
+ VersionT::VersionT(std::string&& value) : value(std::move(value)) {}
VersionT::VersionT(const std::string& value) : value(value) {}
const std::string& VersionT::to_string() const { return value; }
bool operator==(const VersionT& left, const VersionT& right) { return left.to_string() == right.to_string(); }