aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis J Bezault <curtbezault@gmail.com>2019-07-24 14:26:34 -0700
committerGitHub <noreply@github.com>2019-07-24 14:26:34 -0700
commitd60047280dcdafabc45f456cd7f86b836387e0f9 (patch)
treefb5e98d1e16548635a96a5c49e7981db06a9c6f8
parent0c7669d009548616aeb754276deea974ba7a53c3 (diff)
parentaeecc01fbd9b888a186a407532af679eacdaab2c (diff)
downloadvcpkg-d60047280dcdafabc45f456cd7f86b836387e0f9.tar.gz
vcpkg-d60047280dcdafabc45f456cd7f86b836387e0f9.zip
Merge branch 'master' into external_file_abi
-rw-r--r--.github/ISSUE_TEMPLATE/i-have-a-question.md10
-rw-r--r--.github/ISSUE_TEMPLATE/other-type-of-bug-report.md31
-rw-r--r--.github/ISSUE_TEMPLATE/report-package-build-failure.md23
-rw-r--r--.github/ISSUE_TEMPLATE/request-a-feature-or-improvement-to-a-port.md22
-rw-r--r--.github/ISSUE_TEMPLATE/request-a-feature-or-improvement.md22
-rw-r--r--.github/ISSUE_TEMPLATE/request-a-new-port.md18
-rw-r--r--.github/ISSUE_TEMPLATE/request-an-update-to-an-existing-port.md14
-rw-r--r--NOTICE.txt46
-rw-r--r--docs/maintainers/maintainer-guide.md13
-rw-r--r--ports/arrow/CONTROL2
-rw-r--r--ports/arrow/all.patch333
-rw-r--r--ports/arrow/findzstd.patch79
-rw-r--r--ports/arrow/msvc-libname.patch13
-rw-r--r--ports/arrow/portfile.cmake6
-rw-r--r--ports/boolinq/CONTROL4
-rw-r--r--ports/boolinq/portfile.cmake16
-rw-r--r--ports/cmcstl2/CONTROL4
-rw-r--r--ports/cmcstl2/portfile.cmake31
-rw-r--r--ports/cutelyst2/CONTROL2
-rw-r--r--ports/cutelyst2/fix-static-build.patch38
-rw-r--r--ports/cutelyst2/portfile.cmake11
-rw-r--r--ports/date/CMakeLists.txt2
-rw-r--r--ports/date/CONTROL2
-rw-r--r--ports/freetype/CONTROL2
-rw-r--r--ports/freetype/portfile.cmake8
-rw-r--r--ports/inja/CONTROL2
-rw-r--r--ports/inja/cmake-version.patch13
-rw-r--r--ports/inja/portfile.cmake24
-rw-r--r--ports/irrlicht/CMakeLists.txt10
-rw-r--r--ports/irrlicht/CONTROL2
-rw-r--r--ports/irrlicht/portfile.cmake2
-rw-r--r--ports/irrlicht/support-unicode-on-windows.patch28
-rw-r--r--ports/libconfuse/CMakeLists.txt139
-rw-r--r--ports/libconfuse/CONTROL4
-rw-r--r--ports/libconfuse/config.h.in99
-rw-r--r--ports/libconfuse/portfile.cmake43
-rw-r--r--ports/libexif/CONTROL4
-rw-r--r--ports/libexif/add-missing-_stdint-h.patch7
-rw-r--r--ports/libexif/portfile.cmake15
-rw-r--r--ports/liblas/CONTROL12
-rw-r--r--ports/liblas/fix-BuildError.patch47
-rw-r--r--ports/liblas/portfile.cmake48
-rw-r--r--ports/libmariadb/CONTROL2
-rw-r--r--ports/libmariadb/fix-InstallPath.patch146
-rw-r--r--ports/libmariadb/portfile.cmake38
-rw-r--r--ports/libzippp/CONTROL4
-rw-r--r--ports/libzippp/portfile.cmake27
-rw-r--r--ports/mimalloc/CONTROL13
-rw-r--r--ports/mimalloc/fix-cmake.patch52
-rw-r--r--ports/mimalloc/portfile.cmake73
-rw-r--r--ports/mimalloc/vcpkg-cmake-wrapper.cmake9
-rw-r--r--ports/mongo-c-driver/CONTROL4
-rw-r--r--ports/mongo-c-driver/portfile.cmake5
-rw-r--r--ports/openxr-loader/0004-fix-fatal-errorC1189.patch13
-rw-r--r--ports/openxr-loader/CONTROL2
-rw-r--r--ports/openxr-loader/portfile.cmake1
-rw-r--r--ports/pcl/CONTROL2
-rw-r--r--ports/pcl/cuda_10_1.patch133
-rw-r--r--ports/pcl/portfile.cmake1
-rw-r--r--ports/qhull/CONTROL2
-rw-r--r--ports/qhull/portfile.cmake6
-rw-r--r--ports/rttr/portfile.cmake27
-rw-r--r--ports/sdl2-image/CONTROL2
-rw-r--r--ports/sdl2-image/portfile.cmake4
-rw-r--r--ports/sqlite3/CONTROL2
-rw-r--r--ports/sqlite3/portfile.cmake4
-rw-r--r--ports/tesseract/CONTROL4
-rw-r--r--ports/tesseract/fix-text2image.patch64
-rw-r--r--ports/tesseract/portfile.cmake1
-rw-r--r--ports/xtensor-io/CONTROL5
-rw-r--r--ports/xtensor-io/portfile.cmake31
-rw-r--r--scripts/buildsystems/msbuild/applocal.ps12
-rw-r--r--toolsrc/CMakeLists.txt32
-rw-r--r--toolsrc/include/vcpkg-test/catch.h (renamed from toolsrc/include/vcpkg-tests/catch.h)0
-rw-r--r--toolsrc/include/vcpkg-test/util.h (renamed from toolsrc/include/vcpkg-tests/util.h)9
-rw-r--r--toolsrc/include/vcpkg/base/files.h57
-rw-r--r--toolsrc/include/vcpkg/base/strings.h5
-rw-r--r--toolsrc/include/vcpkg/base/work_queue.h230
-rw-r--r--toolsrc/src/vcpkg-test/arguments.cpp (renamed from toolsrc/src/vcpkg-tests/arguments.cpp)2
-rw-r--r--toolsrc/src/vcpkg-test/catch.cpp (renamed from toolsrc/src/vcpkg-tests/catch.cpp)2
-rw-r--r--toolsrc/src/vcpkg-test/chrono.cpp (renamed from toolsrc/src/vcpkg-tests/chrono.cpp)2
-rw-r--r--toolsrc/src/vcpkg-test/dependencies.cpp (renamed from toolsrc/src/vcpkg-tests/dependencies.cpp)2
-rw-r--r--toolsrc/src/vcpkg-test/files.cpp121
-rw-r--r--toolsrc/src/vcpkg-test/paragraph.cpp (renamed from toolsrc/src/vcpkg-tests/paragraph.cpp)4
-rw-r--r--toolsrc/src/vcpkg-test/plan.cpp (renamed from toolsrc/src/vcpkg-tests/plan.cpp)4
-rw-r--r--toolsrc/src/vcpkg-test/specifier.cpp (renamed from toolsrc/src/vcpkg-tests/specifier.cpp)2
-rw-r--r--toolsrc/src/vcpkg-test/statusparagraphs.cpp (renamed from toolsrc/src/vcpkg-tests/statusparagraphs.cpp)4
-rw-r--r--toolsrc/src/vcpkg-test/strings.cpp33
-rw-r--r--toolsrc/src/vcpkg-test/supports.cpp (renamed from toolsrc/src/vcpkg-tests/supports.cpp)2
-rw-r--r--toolsrc/src/vcpkg-test/update.cpp (renamed from toolsrc/src/vcpkg-tests/update.cpp)4
-rw-r--r--toolsrc/src/vcpkg-test/util.cpp177
-rw-r--r--toolsrc/src/vcpkg-tests/util.cpp47
-rw-r--r--toolsrc/src/vcpkg/archives.cpp5
-rw-r--r--toolsrc/src/vcpkg/base/files.cpp244
-rw-r--r--toolsrc/src/vcpkg/base/strings.cpp40
-rw-r--r--toolsrc/src/vcpkg/build.cpp9
-rw-r--r--toolsrc/src/vcpkg/commands.exportifw.cpp16
-rw-r--r--toolsrc/src/vcpkg/commands.portsdiff.cpp2
-rw-r--r--toolsrc/src/vcpkg/export.cpp6
-rw-r--r--toolsrc/src/vcpkg/install.cpp3
-rw-r--r--toolsrc/src/vcpkg/remove.cpp3
-rw-r--r--toolsrc/vcpkg/vcpkg.vcxproj2
-rw-r--r--toolsrc/vcpkglib/vcpkglib.vcxproj2
-rw-r--r--toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj2
-rw-r--r--toolsrc/vcpkgtest/vcpkgtest.vcxproj2
-rw-r--r--toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters6
106 files changed, 2461 insertions, 550 deletions
diff --git a/.github/ISSUE_TEMPLATE/i-have-a-question.md b/.github/ISSUE_TEMPLATE/i-have-a-question.md
new file mode 100644
index 000000000..712997630
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/i-have-a-question.md
@@ -0,0 +1,10 @@
+---
+name: I have a question
+about: I have a question and don't see a clear answer in documentation
+title: How do I ...
+labels: Question
+assignees: ''
+
+---
+
+When asking a question please also include where you looked for an answer (so we can update the documentation if needed).
diff --git a/.github/ISSUE_TEMPLATE/other-type-of-bug-report.md b/.github/ISSUE_TEMPLATE/other-type-of-bug-report.md
new file mode 100644
index 000000000..85c296745
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/other-type-of-bug-report.md
@@ -0,0 +1,31 @@
+---
+name: Other type of bug report
+about: Let us know about an issues that does not fit into any of the other issues
+ types
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**Environment**
+- OS: [e.g. Windows/Linux etc...]
+- Compiler: revision
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. ./vcpkg install xxxx
+2. See error
+Repro code when
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Failure logs**
+-(please attached failure logs)
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/report-package-build-failure.md b/.github/ISSUE_TEMPLATE/report-package-build-failure.md
new file mode 100644
index 000000000..e42ff43f8
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/report-package-build-failure.md
@@ -0,0 +1,23 @@
+---
+name: Report package build failure
+about: Let us know about build failures in ports.
+title: "[<port name>] build failure"
+labels: port bug
+assignees: ''
+
+---
+
+**Host Environment**
+- OS: [e.g. Windows/Linux etc...]
+- Compiler: revision
+
+**To Reproduce**
+Steps to reproduce the behavior:
+`./vcpkg install xxxx`
+
+**Failure logs**
+-Cut and past the appropriate build messages from the console output.
+-Please attach any additional failure logs mentioned in the console output.
+
+**Additional context**
+Add any other context about the problem here, such as what you have already tried to resolve the issue.
diff --git a/.github/ISSUE_TEMPLATE/request-a-feature-or-improvement-to-a-port.md b/.github/ISSUE_TEMPLATE/request-a-feature-or-improvement-to-a-port.md
new file mode 100644
index 000000000..a40036f95
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/request-a-feature-or-improvement-to-a-port.md
@@ -0,0 +1,22 @@
+---
+name: Request a feature or improvement to a port
+about: Suggest an improvement to one the the ports/libraries in vcpkg
+title: "[<portname>] <short description of feature>"
+labels: port feature
+assignees: ''
+
+---
+
+****
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Proposed solution**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered if applicable.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/request-a-feature-or-improvement.md b/.github/ISSUE_TEMPLATE/request-a-feature-or-improvement.md
new file mode 100644
index 000000000..55d06b16a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/request-a-feature-or-improvement.md
@@ -0,0 +1,22 @@
+---
+name: Request a feature or improvement
+about: Suggest an improvement to vcpkg
+title: ''
+labels: vcpkg feature
+assignees: ''
+
+---
+
+****
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Proposed solution**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/request-a-new-port.md b/.github/ISSUE_TEMPLATE/request-a-new-port.md
new file mode 100644
index 000000000..65c9bf01c
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/request-a-new-port.md
@@ -0,0 +1,18 @@
+---
+name: Request a new port
+about: Request a new port/library that vcpkg should support
+title: "[New Port Request] <library name here>"
+labels: new port request - consider making a PR!
+assignees: ''
+
+---
+
+Library name:
+
+Library description:
+
+Source repository URL:
+
+Project homepage (if different from the source repository):
+
+Anything else that is useful to know when adding (such as optional features the library may have that should be included):
diff --git a/.github/ISSUE_TEMPLATE/request-an-update-to-an-existing-port.md b/.github/ISSUE_TEMPLATE/request-an-update-to-an-existing-port.md
new file mode 100644
index 000000000..f1689b097
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/request-an-update-to-an-existing-port.md
@@ -0,0 +1,14 @@
+---
+name: Request an update to an existing port
+about: Let us know about a new version of a library we should pick up.
+title: "[<port name>] update to <version>"
+labels: port feature
+assignees: ''
+
+---
+
+Library name:
+
+New version number:
+
+Other information that may be useful (release notes, etc...)
diff --git a/NOTICE.txt b/NOTICE.txt
new file mode 100644
index 000000000..0e2e96048
--- /dev/null
+++ b/NOTICE.txt
@@ -0,0 +1,46 @@
+vcpkg uses third party material from the projects listed below.
+The original copyright notice and the license under which Microsoft
+received such third party material are set forth below. Microsoft
+reserves all other rights not expressly granted, whether by
+implication, estoppel or otherwise.
+
+In the event that we accidentally failed to list a required notice, please
+bring it to our attention by posting an issue.
+
+THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
+Do Not Translate or Localize
+
+vcpkg incorporates third party material from the projects listed below.
+The original copyright notice and the license under which Microsoft received
+such third party materials are set forth below. Microsoft reserved all other
+rights not expressly granted, whether by implication, estoppel or otherwise.
+
+1. Catch2
+
+%% Catch2 NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+=========================================
+END OF Catch2 NOTICES, INFORMATION, AND LICENSE
diff --git a/docs/maintainers/maintainer-guide.md b/docs/maintainers/maintainer-guide.md
index 0baa45a02..e4938844f 100644
--- a/docs/maintainers/maintainer-guide.md
+++ b/docs/maintainers/maintainer-guide.md
@@ -34,7 +34,7 @@ At this time, the following helpers are deprecated:
### Avoid excessive comments in portfiles
-Ideally, portfiles should be short, simple, and as declarative as possible. Remove any helper comments introduced by the `create` command before submitting a PR.
+Ideally, portfiles should be short, simple, and as declarative as possible. Remove any boiler plate comments introduced by the `create` command before submitting a PR.
## Build Techniques
@@ -85,6 +85,15 @@ vcpkg_configure_cmake(
Note that `ZLIB` in the above is case-sensitive. See the [cmake documentation](https://cmake.org/cmake/help/v3.15/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html) for more details.
+### Place conflicting libs in a `manual-link` directory
+
+A lib is considered conflicting if it does any of the following:
++ Define `main`
++ Define malloc
++ Define symbols that are also declared in other libraries
+
+Conflicting libs are typically by design and not considered a defect. Because some build systems link against everything in the lib directory, these should be moved into a subdirectory named `manual-link`.
+
## Versioning
### Follow common conventions for the `Version:` field
@@ -157,7 +166,7 @@ While `portfile.cmake`'s and `CMakeLists.txt`'s share a common syntax and core C
Portfiles have direct access to variables set in the triplet file, but `CMakeLists.txt`s do not (though there is often a translation that happens -- `VCPKG_LIBRARY_LINKAGE` versus `BUILD_SHARED_LIBS`).
-Finally, portfiles and CMake builds invoked by portfiles are run in different processes. Conceptually:
+Portfiles and CMake builds invoked by portfiles are run in different processes. Conceptually:
```no-highlight
+----------------------------+ +------------------------------------+
diff --git a/ports/arrow/CONTROL b/ports/arrow/CONTROL
index ada95e2d0..ea787e24a 100644
--- a/ports/arrow/CONTROL
+++ b/ports/arrow/CONTROL
@@ -1,5 +1,5 @@
Source: arrow
-Version: 0.13.0-4
+Version: 0.14.1
Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser
Homepage: https://github.com/apache/arrow
Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations.
diff --git a/ports/arrow/all.patch b/ports/arrow/all.patch
index 3257dc437..0675356ff 100644
--- a/ports/arrow/all.patch
+++ b/ports/arrow/all.patch
@@ -1,120 +1,21 @@
-diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
-index 52081c4..e1e13b5 100644
---- a/cpp/CMakeLists.txt
-+++ b/cpp/CMakeLists.txt
-@@ -804,6 +804,9 @@ if(ARROW_USE_GLOG)
- list(APPEND ARROW_LINK_LIBS GLOG::glog)
- list(APPEND ARROW_STATIC_LINK_LIBS GLOG::glog)
- list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS GLOG::glog)
-+ if(ARROW_NEED_GFLAGS)
-+ list(APPEND ARROW_STATIC_LINK_LIBS gflags::gflags)
-+ endif()
- add_definitions("-DARROW_USE_GLOG")
- endif()
-
-diff --git a/cpp/cmake_modules/FindBrotli.cmake b/cpp/cmake_modules/FindBrotli.cmake
-index e1429a2..6dee036 100644
---- a/cpp/cmake_modules/FindBrotli.cmake
-+++ b/cpp/cmake_modules/FindBrotli.cmake
-@@ -18,6 +18,7 @@
- # find_package(Brotli)
-
- pkg_check_modules(BROTLI_PC libbrotlicommon libbrotlienc libbrotlidec)
-+
- if(BROTLI_PC_FOUND)
- set(BROTLI_INCLUDE_DIR "${BROTLI_PC_libbrotlicommon_INCLUDEDIR}")
-
-@@ -25,80 +26,16 @@ if(BROTLI_PC_FOUND)
- list(APPEND BROTLI_PC_LIBRARY_DIRS "${BROTLI_PC_libbrotlicommon_LIBDIR}")
- list(APPEND BROTLI_PC_LIBRARY_DIRS "${BROTLI_PC_libbrotlienc_LIBDIR}")
- list(APPEND BROTLI_PC_LIBRARY_DIRS "${BROTLI_PC_libbrotlidec_LIBDIR}")
--
-- find_library(BROTLI_COMMON_LIBRARY brotlicommon
-- PATHS ${BROTLI_PC_LIBRARY_DIRS}
-- NO_DEFAULT_PATH)
-- find_library(BROTLI_ENC_LIBRARY brotlienc
-- PATHS ${BROTLI_PC_LIBRARY_DIRS}
-- NO_DEFAULT_PATH)
-- find_library(BROTLI_DEC_LIBRARY brotlidec
-- PATHS ${BROTLI_PC_LIBRARY_DIRS}
-- NO_DEFAULT_PATH)
- elseif(BROTLI_ROOT)
-- find_library(
-- BROTLI_COMMON_LIBRARY
-- NAMES brotlicommon
-- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlicommon${CMAKE_SHARED_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon-static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon_static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- PATHS ${BROTLI_ROOT} "${BROTLI_ROOT}/Library"
-- PATH_SUFFIXES "lib64" "lib" "bin"
-- NO_DEFAULT_PATH)
-- find_library(
-- BROTLI_ENC_LIBRARY
-- NAMES brotlienc
-- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlienc${CMAKE_SHARED_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc-static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc_static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- PATHS ${BROTLI_ROOT} "${BROTLI_ROOT}/Library"
-- PATH_SUFFIXES "lib64" "lib" "bin"
-- NO_DEFAULT_PATH)
-- find_library(
-- BROTLI_DEC_LIBRARY
-- NAMES brotlidec
-- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlidec${CMAKE_SHARED_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec-static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec_static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- PATHS ${BROTLI_ROOT} "${BROTLI_ROOT}/Library"
-- PATH_SUFFIXES "lib64" "lib" "bin"
-- NO_DEFAULT_PATH)
-- find_path(BROTLI_INCLUDE_DIR
-- NAMES brotli/decode.h
-- PATHS ${BROTLI_ROOT} "${BROTLI_ROOT}/Library"
-- NO_DEFAULT_PATH
-- PATH_SUFFIXES "include")
-+ find_path(BROTLI_INCLUDE_DIR NAMES brotli/decode.h PATH_SUFFIXES "include")
- else()
-- find_library(
-- BROTLI_COMMON_LIBRARY
-- NAMES brotlicommon
-- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlicommon${CMAKE_SHARED_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon-static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon_static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- PATH_SUFFIXES "lib64" "lib" "bin")
-- find_library(
-- BROTLI_ENC_LIBRARY
-- NAMES brotlienc
-- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlienc${CMAKE_SHARED_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc-static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc_static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- PATH_SUFFIXES "lib64" "lib" "bin")
-- find_library(
-- BROTLI_DEC_LIBRARY
-- NAMES brotlidec
-- ${CMAKE_SHARED_LIBRARY_PREFIX}brotlidec${CMAKE_SHARED_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec-static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec_static${CMAKE_STATIC_LIBRARY_SUFFIX}
-- PATH_SUFFIXES "lib64" "lib" "bin")
- find_path(BROTLI_INCLUDE_DIR NAMES brotli/decode.h PATH_SUFFIXES "include")
- endif()
+diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake
+index 4ef2948..9c3c121 100644
+--- a/cpp/cmake_modules/BuildUtils.cmake
++++ b/cpp/cmake_modules/BuildUtils.cmake
+@@ -305,7 +305,7 @@ function(ADD_ARROW_LIB LIB_NAME)
+ target_include_directories(${LIB_NAME}_static PRIVATE ${ARG_PRIVATE_INCLUDES})
+ endif()
-+find_library(BROTLI_COMMON_LIBRARY NAMES brotlicommon brotlicommon-static libbrotlicommon libbrotlicommon-static)
-+find_library(BROTLI_ENC_LIBRARY NAMES libbrotlienc libbrotlienc-static brotlienc brotlienc-static)
-+find_library(BROTLI_DEC_LIBRARY NAMES brotlidec libbrotlidec libbrotlidec-static brotlidec brotlidec-static)
-+
- find_package_handle_standard_args(Brotli
- REQUIRED_VARS
- BROTLI_COMMON_LIBRARY
+- if(MSVC)
++ if(MSVC AND 0)
+ set(LIB_NAME_STATIC ${LIB_NAME}_static)
+ else()
+ set(LIB_NAME_STATIC ${LIB_NAME})
diff --git a/cpp/cmake_modules/FindLz4.cmake b/cpp/cmake_modules/FindLz4.cmake
-index 3606f5c..1d18b7c 100644
+index 8410916..a196b25 100644
--- a/cpp/cmake_modules/FindLz4.cmake
+++ b/cpp/cmake_modules/FindLz4.cmake
-@@ -19,24 +19,26 @@ if(MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX)
+@@ -19,14 +19,16 @@ if(MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX)
set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static")
endif()
@@ -126,42 +27,36 @@ index 3606f5c..1d18b7c 100644
-set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_STATIC_LIB_SUFFIX})
+set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_MSVC_STATIC_LIB_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
- pkg_check_modules(LZ4_PC liblz4)
- if(LZ4_PC_FOUND)
- set(LZ4_INCLUDE_DIR "${LZ4_PC_INCLUDEDIR}")
-
- list(APPEND LZ4_PC_LIBRARY_DIRS "${LZ4_PC_LIBDIR}")
-- find_library(LZ4_LIB lz4
-+ find_library(LZ4_LIB lz4${LZ4_LIB_NAME_DEBUG_SUFFIX}
- PATHS ${LZ4_PC_LIBRARY_DIRS}
- NO_DEFAULT_PATH
- PATH_SUFFIXES "${CMAKE_LIBRARY_ARCHITECTURE}")
- elseif(LZ4_ROOT)
+ if(LZ4_ROOT)
find_library(
LZ4_LIB
- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME}
-- "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME}
-+ "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}"
- PATHS ${LZ4_ROOT} "${LZ4_ROOT}/Library"
- PATH_SUFFIXES "lib64" "lib" "bin"
- NO_DEFAULT_PATH)
-@@ -48,8 +50,8 @@ elseif(LZ4_ROOT)
- else()
- find_library(
- LZ4_LIB
-- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME}
-- "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}"
-+ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME}
-+ "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}"
- PATH_SUFFIXES "lib64" "lib" "bin")
- find_path(LZ4_INCLUDE_DIR NAMES lz4.h PATH_SUFFIXES "include")
- endif()
+ "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ PATHS ${LZ4_ROOT}
+ PATH_SUFFIXES ${LIB_PATH_SUFFIXES}
+@@ -43,14 +45,14 @@ else()
+ set(LZ4_INCLUDE_DIR "${LZ4_PC_INCLUDEDIR}")
+
+ list(APPEND LZ4_PC_LIBRARY_DIRS "${LZ4_PC_LIBDIR}")
+- find_library(LZ4_LIB lz4
++ find_library(LZ4_LIB lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME}
+ PATHS ${LZ4_PC_LIBRARY_DIRS}
+ NO_DEFAULT_PATH
+ PATH_SUFFIXES ${LIB_PATH_SUFFIXES})
+ else()
+ find_library(
+ LZ4_LIB
+- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME}
++ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME}
+ "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ PATH_SUFFIXES ${LIB_PATH_SUFFIXES})
+ find_path(LZ4_INCLUDE_DIR NAMES lz4.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES})
diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThrift.cmake
-index a4decf7..78ec7c8 100644
+index 87cc24e..4de0760 100644
--- a/cpp/cmake_modules/FindThrift.cmake
+++ b/cpp/cmake_modules/FindThrift.cmake
-@@ -65,6 +65,10 @@ if(MSVC AND NOT THRIFT_MSVC_STATIC_LIB_SUFFIX)
+@@ -54,6 +54,10 @@ if(MSVC AND NOT THRIFT_MSVC_STATIC_LIB_SUFFIX)
set(THRIFT_MSVC_STATIC_LIB_SUFFIX md)
endif()
@@ -169,33 +64,33 @@ index a4decf7..78ec7c8 100644
+ set(THRIFT_LIB_NAME_DEBUG_SUFFIX d)
+endif()
+
- pkg_check_modules(THRIFT_PC thrift)
-
- # THRIFT-4760: The pkgconfig files are currently only installed when using autotools.
-@@ -74,15 +78,13 @@ if(THRIFT_PC_FOUND)
-
- list(APPEND THRIFT_PC_LIBRARY_DIRS "${THRIFT_PC_LIBDIR}")
-
-- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}
-- PATHS ${THRIFT_PC_LIBRARY_DIRS}
-- NO_DEFAULT_PATH)
-+ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX}
-+ PATHS ${THRIFT_PC_LIBRARY_DIRS})
- find_program(THRIFT_COMPILER thrift
- HINTS ${THRIFT_PC_PREFIX}
-- NO_DEFAULT_PATH
- PATH_SUFFIXES "bin")
- else()
-- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}
-+ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX}
- HINTS ${Thrift_ROOT}
- PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib")
- find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h
+ if(Thrift_ROOT)
+ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}
+ PATHS ${Thrift_ROOT}
+@@ -71,15 +75,13 @@ else()
+
+ list(APPEND THRIFT_PC_LIBRARY_DIRS "${THRIFT_PC_LIBDIR}")
+
+- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}
+- PATHS ${THRIFT_PC_LIBRARY_DIRS}
+- NO_DEFAULT_PATH)
++ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX}
++ PATHS ${THRIFT_PC_LIBRARY_DIRS})
+ find_program(THRIFT_COMPILER thrift
+ HINTS ${THRIFT_PC_PREFIX}
+- NO_DEFAULT_PATH
+ PATH_SUFFIXES "bin")
+ else()
+- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}
++ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX}
+ PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib")
+ find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h PATH_SUFFIXES "include")
+ find_program(THRIFT_COMPILER thrift PATH_SUFFIXES "bin")
diff --git a/cpp/cmake_modules/FindZSTD.cmake b/cpp/cmake_modules/FindZSTD.cmake
-index 17b58a3..fa2ab05 100644
+index 8e47086..d7ce559 100644
--- a/cpp/cmake_modules/FindZSTD.cmake
+++ b/cpp/cmake_modules/FindZSTD.cmake
-@@ -19,7 +19,11 @@ if(MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX)
+@@ -19,14 +19,18 @@ if(MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX)
set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static")
endif()
@@ -207,91 +102,29 @@ index 17b58a3..fa2ab05 100644
+set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(ZSTD_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX})
- pkg_check_modules(ZSTD_PC libzstd)
-@@ -27,18 +31,15 @@ if(ZSTD_PC_FOUND)
- set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}")
-
- list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}")
-- find_library(ZSTD_LIB zstd
-+ find_library(ZSTD_LIB zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX}
- PATHS ${ZSTD_PC_LIBRARY_DIRS}
- NO_DEFAULT_PATH
- PATH_SUFFIXES "${CMAKE_LIBRARY_ARCHITECTURE}")
- elseif(ZSTD_ROOT)
+ # First, find via if specified ZTD_ROOT
+ if(ZSTD_ROOT)
message(STATUS "Using ZSTD_ROOT: ${ZSTD_ROOT}")
find_library(ZSTD_LIB
- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}"
-- "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}"
-- PATHS ${ZSTD_ROOT} "${ZSTD_ROOT}/Library"
-- PATH_SUFFIXES "lib64" "lib" "bin"
-- NO_DEFAULT_PATH)
-+ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}"
-+ "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
- find_path(ZSTD_INCLUDE_DIR
- NAMES zstd.h
- PATHS ${ZSTD_ROOT} "${ZSTD_ROOT}/Library"
-@@ -46,9 +47,8 @@ elseif(ZSTD_ROOT)
- PATH_SUFFIXES "include")
- else()
- find_library(ZSTD_LIB
-- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}"
-- "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}"
-- PATH_SUFFIXES "lib64" "lib" "bin")
+ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}"
-+ "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
- find_path(ZSTD_INCLUDE_DIR NAMES zstd.h PATH_SUFFIXES "include")
- endif()
-
-diff --git a/cpp/cmake_modules/FindgflagsAlt.cmake b/cpp/cmake_modules/FindgflagsAlt.cmake
-index a9b8684..fdb815a 100644
---- a/cpp/cmake_modules/FindgflagsAlt.cmake
-+++ b/cpp/cmake_modules/FindgflagsAlt.cmake
-@@ -15,18 +15,13 @@
- # specific language governing permissions and limitations
- # under the License.
-
--if(gflags_ROOT)
-- find_library(gflags_LIB NAMES gflags PATHS ${gflags_ROOT} NO_DEFAULT_PATH)
-- find_path(GFLAGS_INCLUDE_DIR
-- NAMES gflags/gflags.h
-- PATHS ${gflags_ROOT}
-- NO_DEFAULT_PATH
-- PATH_SUFFIXES "include")
--else()
-- find_library(gflags_LIB NAMES gflags)
-- find_path(GFLAGS_INCLUDE_DIR NAMES gflags/gflags.h PATH_SUFFIXES "include")
-+if(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
-+ set(GFLAGS_LIB_NAME_DEBUG_SUFFIX _debug)
- endif()
-
-+find_library(gflags_LIB NAMES gflags${GFLAGS_LIB_NAME_DEBUG_SUFFIX} gflags_static${GFLAGS_LIB_NAME_DEBUG_SUFFIX})
-+find_path(GFLAGS_INCLUDE_DIR NAMES gflags/gflags.h PATH_SUFFIXES "include")
-+
- find_package_handle_standard_args(gflagsAlt REQUIRED_VARS gflags_LIB GFLAGS_INCLUDE_DIR)
-
- if(gflagsAlt_FOUND)
-diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
-index bdb122b..58c123e 100644
---- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
-+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
-@@ -923,10 +923,7 @@ if(ARROW_NEED_GFLAGS)
- elseif(gflags_SOURCE STREQUAL "SYSTEM")
- # gflagsConfig.cmake is not installed on Ubuntu/Debian
- # TODO: Make a bug report upstream
-- find_package(gflags)
-- if(NOT gflags_FOUND)
-- find_package(gflagsAlt REQUIRED)
-- endif()
-+ find_package(gflagsAlt REQUIRED)
- endif()
- # TODO: Don't use global includes but rather target_include_directories
- include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR})
-@@ -1558,7 +1555,7 @@ if(ARROW_WITH_FLATBUFFERS)
- elseif(Flatbuffers_SOURCE STREQUAL "BUNDLED")
- build_flatbuffers()
- elseif(Flatbuffers_SOURCE STREQUAL "SYSTEM")
-- find_package(Flatbuffers QUIET)
-+ #find_package(Flatbuffers QUIET) - disabled because on vcpkg this looks in the wrong place for the fb compiler and causes an error
- if(NOT Flatbuffers_FOUND)
- find_package(FlatbuffersAlt REQUIRED)
- endif()
+ "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ PATHS ${ZSTD_ROOT}
+ PATH_SUFFIXES ${LIB_PATH_SUFFIXES}
+@@ -44,14 +48,14 @@ else()
+ set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}")
+
+ list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}")
+- find_library(ZSTD_LIB zstd
++ find_library(ZSTD_LIB zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX}
+ PATHS ${ZSTD_PC_LIBRARY_DIRS}
+ NO_DEFAULT_PATH
+ PATH_SUFFIXES ${LIB_PATH_SUFFIXES})
+ # Third, check all other CMake paths
+ else()
+ find_library(ZSTD_LIB
+- NAMES zstd "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}"
++ NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}"
+ "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ PATH_SUFFIXES ${LIB_PATH_SUFFIXES})
+ find_path(ZSTD_INCLUDE_DIR NAMES zstd.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES})
diff --git a/ports/arrow/findzstd.patch b/ports/arrow/findzstd.patch
deleted file mode 100644
index ac77202f9..000000000
--- a/ports/arrow/findzstd.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff --git a/cpp/cmake_modules/FindZSTD.cmake b/cpp/cmake_modules/FindZSTD.cmake
-index 21b4981ec..818e4b5e1 100644
---- a/cpp/cmake_modules/FindZSTD.cmake
-+++ b/cpp/cmake_modules/FindZSTD.cmake
-@@ -19,44 +19,60 @@ if(MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX)
- set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static")
- endif()
-
--if(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
-- set(ZSTD_LIB_NAME_DEBUG_SUFFIX d)
--endif()
--
-+set(ZSTD_LIB_NAME_DEBUG_SUFFIX d)
--set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-+set(ZSTD_STATIC_LIB_SUFFIX "${ZSTD_MSVC_STATIC_LIB_SUFFIX}")
- set(ZSTD_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX})
-
-+set(ZSTD_LIB_NAMES_RELEASE zstd "${ZSTD_STATIC_LIB_NAME}"
-+ "${CMAKE_SHARED_LIBRARY_PREFIX}zstd")
-+set(ZSTD_LIB_NAMES_DEBUG)
-+foreach(_zstd_name ${ZSTD_LIB_NAMES_RELEASE})
-+ list(APPEND ZSTD_LIB_NAMES_DEBUG ${_zstd_name}${ZSTD_LIB_NAME_DEBUG_SUFFIX})
-+ if(DEFINED CMAKE_DEBUG_POSTFIX)
-+ list(APPEND ZSTD_LIB_NAMES_DEBUG ${_zstd_name}${CMAKE_DEBUG_POSTFIX})
-+ endif()
-+endforeach()
-+
- pkg_check_modules(ZSTD_PC libzstd)
- if(ZSTD_PC_FOUND)
- set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}")
-
- list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}")
-- find_library(ZSTD_LIB zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX}
-+ find_library(ZSTD_LIBRARY_RELEASE ${ZSTD_LIB_NAMES_RELEASE}
- PATHS ${ZSTD_PC_LIBRARY_DIRS}
- NO_DEFAULT_PATH
- PATH_SUFFIXES "${CMAKE_LIBRARY_ARCHITECTURE}")
-+ find_library(ZSTD_LIBRARY_DEBUG ${ZSTD_LIB_NAMES_DEBUG}
-+ PATHS ${ZSTD_PC_LIBRARY_DIRS}
-+ NO_DEFAULT_PATH
-+ PATH_SUFFIXES "${CMAKE_LIBRARY_ARCHITECTURE}")
-+
- elseif(ZSTD_ROOT)
- message(STATUS "Using ZSTD_ROOT: ${ZSTD_ROOT}")
-- find_library(ZSTD_LIB
-- NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}"
-- "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-+ find_library(ZSTD_LIBRARY_RELEASE
-+ NAMES ${ZSTD_LIB_NAMES_RELEASE})
-+ find_library(ZSTD_LIBRARY_DEBUG
-+ NAMES ${ZSTD_LIB_NAMES_DEBUG})
- find_path(ZSTD_INCLUDE_DIR
- NAMES zstd.h
- PATHS ${ZSTD_ROOT} "${ZSTD_ROOT}/Library"
- NO_DEFAULT_PATH
- PATH_SUFFIXES "include")
- else()
-- find_library(ZSTD_LIB
-- NAMES zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX} "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}"
-- "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${ZSTD_LIB_NAME_DEBUG_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
-+ find_library(ZSTD_LIBRARY_RELEASE
-+ NAMES ${ZSTD_LIB_NAMES_RELEASE})
-+ find_library(ZSTD_LIBRARY_DEBUG
-+ NAMES ${ZSTD_LIB_NAMES_DEBUG})
- find_path(ZSTD_INCLUDE_DIR NAMES zstd.h PATH_SUFFIXES "include")
- endif()
--
-+select_library_configurations(ZSTD)
-+set(ZSTD_LIB ${ZSTD_LIBRARY})
- find_package_handle_standard_args(ZSTD REQUIRED_VARS ZSTD_LIB ZSTD_INCLUDE_DIR)
-
- if(ZSTD_FOUND)
- add_library(ZSTD::zstd UNKNOWN IMPORTED)
- set_target_properties(ZSTD::zstd
-- PROPERTIES IMPORTED_LOCATION "${ZSTD_LIB}"
-+ PROPERTIES IMPORTED_LOCATION_RELEASE "${ZSTD_LIBRARY_RELEASE}"
-+ IMPORTED_LOCATION_DEBUG "${ZSTD_LIBRARY_DEBUG}"
- INTERFACE_INCLUDE_DIRECTORIES "${ZSTD_INCLUDE_DIR}")
- endif()
diff --git a/ports/arrow/msvc-libname.patch b/ports/arrow/msvc-libname.patch
deleted file mode 100644
index a997822d0..000000000
--- a/ports/arrow/msvc-libname.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake
-index 0f014ba..fd2e7b3 100644
---- a/cpp/cmake_modules/BuildUtils.cmake
-+++ b/cpp/cmake_modules/BuildUtils.cmake
-@@ -289,7 +289,7 @@ function(ADD_ARROW_LIB LIB_NAME)
- target_include_directories(${LIB_NAME}_static PRIVATE ${ARG_PRIVATE_INCLUDES})
- endif()
-
-- if(MSVC)
-+ if(MSVC AND 0)
- set(LIB_NAME_STATIC ${LIB_NAME}_static)
- else()
- set(LIB_NAME_STATIC ${LIB_NAME})
diff --git a/ports/arrow/portfile.cmake b/ports/arrow/portfile.cmake
index fd8fd52fc..58b6f489c 100644
--- a/ports/arrow/portfile.cmake
+++ b/ports/arrow/portfile.cmake
@@ -7,13 +7,11 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/arrow
- REF apache-arrow-0.13.0
- SHA512 bbb14d11abf267a6902c7c9e0215ba7c5284f07482be2de42707145265d2809c89c2d4d8f8b918fdb8c33a5ecbd650875b987a1a694cdf653e766822be67a47d
+ REF apache-arrow-0.14.1
+ SHA512 f5493a62becaaee9d26e05f33509f51c98e96a5efd5d5bbdffdf70456c254b62075f1c9bc63d1119289a22d00359dfe9862078a284f8e063ecf13bd338a50728
HEAD_REF master
PATCHES
all.patch
- msvc-libname.patch
- findzstd.patch
)
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED)
diff --git a/ports/boolinq/CONTROL b/ports/boolinq/CONTROL
new file mode 100644
index 000000000..aa246d2dc
--- /dev/null
+++ b/ports/boolinq/CONTROL
@@ -0,0 +1,4 @@
+Source: boolinq
+Version: 2019-07-22
+Description: Super tiny C++11 single-file header-only LINQ library
+Homepage: https://github.com/k06a/boolinq
diff --git a/ports/boolinq/portfile.cmake b/ports/boolinq/portfile.cmake
new file mode 100644
index 000000000..35ad4994f
--- /dev/null
+++ b/ports/boolinq/portfile.cmake
@@ -0,0 +1,16 @@
+# Single-file header-only library
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO k06a/boolinq
+ REF 1d09dc8b3df79801062e5c0e758572552fa4ce98
+ SHA512 0714a97d09bb8299d39062803a8cd5de28834c372f7826afc36e17ea6aa90d2ec368d5bbb907914ad1ca5a65be41a5caeaa1583f66358577d7ea88d3c0906238
+ HEAD_REF master
+)
+
+file(COPY ${SOURCE_PATH}/include/boolinq/boolinq.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/boolinq)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
diff --git a/ports/cmcstl2/CONTROL b/ports/cmcstl2/CONTROL
new file mode 100644
index 000000000..42b652ce4
--- /dev/null
+++ b/ports/cmcstl2/CONTROL
@@ -0,0 +1,4 @@
+Source: cmcstl2
+Version: 2019-07-20
+Description: An implementation of C++ Extensions for Ranges
+Homepage: https://github.com/CaseyCarter/cmcstl2
diff --git a/ports/cmcstl2/portfile.cmake b/ports/cmcstl2/portfile.cmake
new file mode 100644
index 000000000..e2a0b9a3f
--- /dev/null
+++ b/ports/cmcstl2/portfile.cmake
@@ -0,0 +1,31 @@
+# header-only library
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO CaseyCarter/cmcstl2
+ REF cca84b9fd362ea37334ccbe09a66be4121768ac9
+ SHA512 a528dda26964a8c29f2bf7ddb24a861f337246e9ab2bda19f62d4ca107951aa77e37070623db3b5574973404ccf2f201bc2020654b3d53de36d8a22de521e5b9
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DSTL2_BUILD_EXAMPLES=OFF
+ -DSTL2_BUILD_TESTING=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+vcpkg_test_cmake(PACKAGE_NAME ${PORT})
diff --git a/ports/cutelyst2/CONTROL b/ports/cutelyst2/CONTROL
index 499e039ce..8d5ce89a0 100644
--- a/ports/cutelyst2/CONTROL
+++ b/ports/cutelyst2/CONTROL
@@ -1,4 +1,4 @@
Source: cutelyst2
-Version: 2.7.0
+Version: 2.8.0
Description: A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework
Build-Depends: qt5-base
diff --git a/ports/cutelyst2/fix-static-build.patch b/ports/cutelyst2/fix-static-build.patch
new file mode 100644
index 000000000..e40cd1dab
--- /dev/null
+++ b/ports/cutelyst2/fix-static-build.patch
@@ -0,0 +1,38 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9a695fd..0667668 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -129,6 +129,33 @@ add_definitions(
+ -DQT_DISABLE_DEPRECATED_BEFORE=0x050c00
+ )
+
++if (BUILD_WIN_STATIC)
++ add_definitions(
++ -DCutelyst2Qt5_EXPORTS
++ -DActionRenderView_EXPORTS
++ -DActionREST_EXPORTS
++ -DActionRoleACL_EXPORTS
++ -DCutelyst2Qt5Authentication_EXPORTS
++ -DCutelyst2Qt5Session_EXPORTS
++ -DCutelyst2Qt5StaticSimple_EXPORTS
++ -DCutelyst2Qt5StaticCompressed_EXPORTS
++ -DCutelyst2Qt5UtilsPagination_EXPORTS
++ -DCutelyst2Qt5StatusMessage_EXPORTS
++ -DCutelyst2Qt5Memcached_EXPORTS
++ -DCutelyst2Qt5MemcachedSessionStore_EXPORTS
++ -DCutelyst2Qt5CSRFProtection_EXPORTS
++ -DCutelyst2Qt5UtilsSql_EXPORTS
++ -DCutelyst2Qt5UtilsValidator_EXPORTS
++ -DCutelyst2Qt5UtilsLangSelect_EXPORTS
++ -DCutelyst2Qt5ViewClearSilver_EXPORTS
++ -DCutelyst2Qt5ViewEmail_EXPORTS
++ -DCutelyst2Qt5ViewGrantlee_EXPORTS
++ -DCutelyst2Qt5ViewJson_EXPORTS
++ -DCutelyst2Qt5Wsgi_EXPORTS
++ -DCutelyst2Qt5UserAgent_EXPORTS
++ )
++endif()
++
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ set(CMAKE_CXX_EXTENSIONS OFF)
diff --git a/ports/cutelyst2/portfile.cmake b/ports/cutelyst2/portfile.cmake
index 755cc3ed5..320059cd9 100644
--- a/ports/cutelyst2/portfile.cmake
+++ b/ports/cutelyst2/portfile.cmake
@@ -3,16 +3,23 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cutelyst/cutelyst
- REF v2.7.0
- SHA512 78848d6d4e79149d9e9ae07211875dd212eb046bcdde7cde0bd781ed89d006247b21bc7a37c4e028d0982bb0f69654d469eb37b857dc0d585e9adc79ecd6291d
+ REF c020f115b392bb8e22bed1e1669724102a31ab0c #v2.8.0
+ SHA512 79b440f6dc0a78bc6b3ea83b496a4a9fd7bb016ea2492393c53d82af2c304291ac62a11af96bb05b1fc6422bf2012bec501bb8eb4bd770c54ad166d119891bc1
HEAD_REF master
+ PATCHES fix-static-build.patch
)
+set(BUILD_WIN_STATIC OFF)
+if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(BUILD_WIN_STATIC ON)
+endif()
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_TESTS:BOOL=OFF
+ -DBUILD_WIN_STATIC=${BUILD_WIN_STATIC}
)
vcpkg_install_cmake()
diff --git a/ports/date/CMakeLists.txt b/ports/date/CMakeLists.txt
index 292c1758a..bacbf2716 100644
--- a/ports/date/CMakeLists.txt
+++ b/ports/date/CMakeLists.txt
@@ -18,8 +18,8 @@ target_include_directories(tz PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DI
if(HAS_REMOTE_API)
find_package(CURL REQUIRED)
- target_link_libraries(tz PUBLIC $<BUILD_INTERFACE:${CURL_LIBRARIES}>)
target_include_directories(tz PUBLIC $<BUILD_INTERFACE:${CURL_INCLUDE_DIRS}>)
+ target_link_libraries(tz PUBLIC ${CURL_LIBRARIES})
endif()
if(BUILD_SHARED_LIBS)
diff --git a/ports/date/CONTROL b/ports/date/CONTROL
index 93f4b37cd..03cd721cb 100644
--- a/ports/date/CONTROL
+++ b/ports/date/CONTROL
@@ -1,5 +1,5 @@
Source: date
-Version: ed0368f
+Version: 2019-05-18-1
Homepage: https://github.com/HowardHinnant/date
Description: A date and time library based on the C++11/14/17 <chrono> header
diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL
index 3a52d3222..20d4bb93c 100644
--- a/ports/freetype/CONTROL
+++ b/ports/freetype/CONTROL
@@ -1,5 +1,5 @@
Source: freetype
-Version: 2.10.0-1
+Version: 2.10.1-1
Build-Depends: zlib, bzip2, libpng
Homepage: https://www.freetype.org/
Description: A library to render fonts.
diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake
index a5c2fde79..d1822481f 100644
--- a/ports/freetype/portfile.cmake
+++ b/ports/freetype/portfile.cmake
@@ -1,10 +1,10 @@
include(vcpkg_common_functions)
-set(FT_VERSION 2.10.0)
+set(FT_VERSION 2.10.1)
vcpkg_download_distfile(ARCHIVE
- URLS "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.bz2" "https://downloads.sourceforge.net/project/freetype/freetype2/${FT_VERSION}/freetype-${FT_VERSION}.tar.bz2"
- FILENAME "freetype-${FT_VERSION}.tar.bz2"
- SHA512 dfad66f419ea9577f09932e0730c0c887bdcbdbc8152fa7477a0c39d69a5b68476761deed6864ddcc5cf18d100a7a3f728049768e24afcb04b1a74b25b6acf7e
+ URLS "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.xz" "https://downloads.sourceforge.net/project/freetype/freetype2/${FT_VERSION}/freetype-${FT_VERSION}.tar.xz"
+ FILENAME "freetype-${FT_VERSION}.tar.xz"
+ SHA512 c7a565b0ab3dce81927008a6965d5c7540f0dc973fcefdc1677c2e65add8668b4701c2958d25593cb41f706f4488765365d40b93da71dbfa72907394f28b2650
)
vcpkg_extract_source_archive_ex(
diff --git a/ports/inja/CONTROL b/ports/inja/CONTROL
index ec53d0748..ae7291bfb 100644
--- a/ports/inja/CONTROL
+++ b/ports/inja/CONTROL
@@ -1,4 +1,4 @@
Source: inja
-Version: 2.1.0
+Version: 2.1.0-1
Build-Depends: nlohmann-json
Description: Inja - A Template Engine for Modern C++
diff --git a/ports/inja/cmake-version.patch b/ports/inja/cmake-version.patch
new file mode 100644
index 000000000..37b048870
--- /dev/null
+++ b/ports/inja/cmake-version.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 115c898..176bf2d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,7 +1,7 @@
+ cmake_minimum_required(VERSION 3.5)
+
+
+-project(inja LANGUAGES CXX VERSION 2.0.0)
++project(inja LANGUAGES CXX VERSION 2.1.0)
+
+
+ option(INJA_USE_EMBEDDED_JSON "Use the shipped json header if not available on the system" ON)
diff --git a/ports/inja/portfile.cmake b/ports/inja/portfile.cmake
index 17bde913a..4fb028a1e 100644
--- a/ports/inja/portfile.cmake
+++ b/ports/inja/portfile.cmake
@@ -5,7 +5,27 @@ vcpkg_from_github(
REF v2.1.0
SHA512 6b3a3a6a9e2adff14083a8e83c95fdc5ccf0c930acff40c4cf6c11d67b0df18fd941307e5d1f0c45dcfcb4c4afd0026b718ca510a2b297b9c6be048f5b144d42
HEAD_REF master
+ PATCHES
+ cmake-version.patch
)
-file(INSTALL ${SOURCE_PATH}/single_include/inja/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include)
-file(INSTALL ${SOURCE_PATH}/single_include/inja/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/inja RENAME copyright)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH "${SOURCE_PATH}"
+ PREFER_NINJA
+ OPTIONS
+ -DINJA_USE_EMBEDDED_JSON=OFF
+ -DBUILD_TESTING=OFF
+ -DBUILD_BENCHMARK=OFF
+)
+
+vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/inja)
vcpkg_copy_pdbs()
+
+# Inja is a header-only library
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
+# Don't need built-in nlohmann-json as this package depends on nlohmann-json
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/inja/json")
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/inja RENAME copyright)
diff --git a/ports/irrlicht/CMakeLists.txt b/ports/irrlicht/CMakeLists.txt
index b58739836..e61a1d270 100644
--- a/ports/irrlicht/CMakeLists.txt
+++ b/ports/irrlicht/CMakeLists.txt
@@ -85,6 +85,13 @@ target_link_libraries(Irrlicht PRIVATE
${BZIP2_LIBRARY}
)
+target_compile_definitions(Irrlicht PRIVATE
+ NO_IRR_USE_NON_SYSTEM_ZLIB_
+ NO_IRR_USE_NON_SYSTEM_LIB_PNG_
+ NO_IRR_USE_NON_SYSTEM_JPEG_LIB_
+ NO_IRR_USE_NON_SYSTEM_BZLIB_
+ )
+
if(IRR_BUILD_TOOLS)
add_executable(FileToHeader ${IRR_TOOL_FILES_FILE_TO_HEADER})
@@ -144,6 +151,9 @@ endif()
target_compile_definitions(Irrlicht PRIVATE IRRLICHT_EXPORTS)
if(WIN32)
+ # Unicode
+ target_compile_definitions(Irrlicht PRIVATE UNICODE _UNICODE)
+
# Import the symbols of bzip2
target_compile_definitions(Irrlicht PRIVATE BZ_IMPORT)
diff --git a/ports/irrlicht/CONTROL b/ports/irrlicht/CONTROL
index 7cc3e4223..89c782b46 100644
--- a/ports/irrlicht/CONTROL
+++ b/ports/irrlicht/CONTROL
@@ -1,5 +1,5 @@
Source: irrlicht
-Version: 1.8.4-1
+Version: 1.8.4-2
Description: Irrlicht lightning fast 3d engine
Build-Depends: zlib, libpng, bzip2, libjpeg-turbo
diff --git a/ports/irrlicht/portfile.cmake b/ports/irrlicht/portfile.cmake
index f4eaf5fc8..5bee54b42 100644
--- a/ports/irrlicht/portfile.cmake
+++ b/ports/irrlicht/portfile.cmake
@@ -22,6 +22,8 @@ vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF "1.8.4"
+ PATCHES
+ "support-unicode-on-windows.patch"
# [NO_REMOVE_ONE_LEVEL]
# [WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/src>]
# [PATCHES <a.patch>...]
diff --git a/ports/irrlicht/support-unicode-on-windows.patch b/ports/irrlicht/support-unicode-on-windows.patch
new file mode 100644
index 000000000..609824401
--- /dev/null
+++ b/ports/irrlicht/support-unicode-on-windows.patch
@@ -0,0 +1,28 @@
+diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h
+index c2c5d12..7c44f0c 100644
+--- a/include/IrrCompileConfig.h
++++ b/include/IrrCompileConfig.h
+@@ -233,7 +233,9 @@ you will not be able to use anything provided by the GUI Environment, including
+ disable this feature, the engine behave as before (ansi). This is currently only supported
+ for Windows based systems. You also have to set #define UNICODE for this to compile.
+ */
+-//#define _IRR_WCHAR_FILESYSTEM
++#if defined(_IRR_WINDOWS_) && (defined(_UNICODE) || defined(UNICODE))
++#define _IRR_WCHAR_FILESYSTEM
++#endif
+ #ifdef NO_IRR_WCHAR_FILESYSTEM
+ #undef _IRR_WCHAR_FILESYSTEM
+ #endif
+diff --git a/include/Keycodes.h b/include/Keycodes.h
+index e56eca1..57ab312 100644
+--- a/include/Keycodes.h
++++ b/include/Keycodes.h
+@@ -89,7 +89,7 @@ namespace irr
+ KEY_KEY_X = 0x58, // X key
+ KEY_KEY_Y = 0x59, // Y key
+ KEY_KEY_Z = 0x5A, // Z key
+- KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard)
++ KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard)
+ KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard)
+ KEY_APPS = 0x5D, // Applications key (Natural keyboard)
+ KEY_SLEEP = 0x5F, // Computer Sleep key
diff --git a/ports/libconfuse/CMakeLists.txt b/ports/libconfuse/CMakeLists.txt
new file mode 100644
index 000000000..651dab2f0
--- /dev/null
+++ b/ports/libconfuse/CMakeLists.txt
@@ -0,0 +1,139 @@
+cmake_minimum_required(VERSION 3.14)
+
+set(ac_init_line_re "AC_INIT\\(([^,]+), ([^,]+), ([^,]+), ([^)]+)\\)")
+file(STRINGS
+ ${CMAKE_CURRENT_LIST_DIR}/configure.ac
+ ac_init_line
+ REGEX ${ac_init_line_re}
+)
+
+string(REGEX REPLACE "${ac_init_line_re}" "\\1" PACKAGE_NAME ${ac_init_line})
+string(REGEX REPLACE "${ac_init_line_re}" "\\2" PACKAGE_VERSION ${ac_init_line})
+string(REGEX REPLACE "${ac_init_line_re}" "\\3" PACKAGE_BUGREPORT ${ac_init_line})
+string(REGEX REPLACE "${ac_init_line_re}" "\\4" PACKAGE ${ac_init_line})
+
+set(PACKAGE_TARNAME ${PACKAGE})
+set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+
+string(REGEX REPLACE "([0-9]+.[0-9]+.[0-9]+).*" "\\1" SEMANTIC_VERSION ${PACKAGE_VERSION})
+
+project(libconfuse VERSION ${SEMANTIC_VERSION} LANGUAGES C)
+
+include(CheckFunctionExists)
+include(CheckIncludeFile)
+include(GNUInstallDirs)
+
+find_package(FLEX REQUIRED)
+find_package(Gettext QUIET)
+find_package(Intl QUIET)
+
+set(CMAKE_DISABLE_SOURCE_CHANGES ON)
+set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
+
+if (GETTEXT_FOUND)
+ set(ENABLE_NLS 1)
+endif ()
+
+# libconfig.pc.in
+set(prefix ${CMAKE_INSTALL_PREFIX})
+set(exec_prefix ${prefix})
+set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
+set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
+set(VERSION ${PROJECT_VERSION})
+
+if (Intl_FOUND AND Intl_LIBRARIES)
+ set(LTLIBINTL ${Intl_LIBRARIES})
+endif ()
+
+configure_file(libconfuse.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libconfuse.pc @ONLY)
+
+check_function_exists(dcgettext HAVE_DCGETTEXT)
+check_function_exists(fmemopen HAVE_FMEMOPEN)
+check_function_exists(funopen HAVE_FUNOPEN)
+check_function_exists(gettext HAVE_GETTEXT)
+check_function_exists(iconv HAVE_ICONV)
+check_function_exists(strcasecmp HAVE_STRCASECMP)
+check_function_exists(strdup HAVE_STRDUP)
+check_function_exists(_strdup HAVE__STRDUP)
+check_function_exists(strndup HAVE_STRNDUP)
+check_function_exists(setenv HAVE_SETENV)
+check_function_exists(unsetenv HAVE_UNSETENV)
+check_function_exists(_putenv HAVE__PUTENV)
+
+if (MSVC)
+ check_function_exists(_fileno HAVE__FILENO)
+ check_function_exists(_isatty HAVE__ISATTY)
+ check_function_exists(_stricmp HAVE_STRCASECMP)
+endif ()
+
+check_include_file(stdlib.h HAVE_STDLIB_H)
+check_include_file(string.h HAVE_STRING_H)
+
+check_include_file(strings.h HAVE_STRINGS_H)
+check_include_file(sys/stat.h HAVE_SYS_STAT_H)
+check_include_file(sys/types.h HAVE_SYS_TYPES_H)
+check_include_file(unistd.h HAVE_UNISTD_H)
+check_include_file(windows.h HAVE_WINDOWS_H)
+
+configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
+flex_target(
+ CONFUSE
+ src/lexer.l
+ ${CMAKE_CURRENT_BINARY_DIR}/lexer.c
+ COMPILE_FLAGS -Pcfg_yy
+)
+
+set(libconfuse_sources
+ src/confuse.c
+ ${FLEX_CONFUSE_OUTPUTS}
+)
+
+if (NOT HAVE_FMEMOPEN)
+ list(APPEND libconfuse_sources src/fmemopen.c)
+endif ()
+
+add_library(libconfuse ${libconfuse_sources})
+
+if (BUILD_SHARED_LIBS)
+ if (WIN32)
+ target_compile_definitions(libconfuse PRIVATE BUILDING_DLL)
+ endif ()
+else ()
+ target_compile_definitions(libconfuse PUBLIC BUILDING_STATIC)
+endif ()
+
+string(COMPARE EQUAL "${CMAKE_C_COMPILER_ID}" "GNU" USING_GNUC)
+
+target_compile_definitions(libconfuse
+ PUBLIC
+ $<BUILD_INTERFACE:HAVE_CONFIG_H>
+ PRIVATE
+ $<$<BOOL:${MSVC}>:_CRT_SECURE_NO_WARNINGS>
+ $<$<BOOL:${MSVC}>:_CRT_NONSTDC_NO_DEPRECATE>
+ $<$<BOOL:${MSVC}>:strcasecmp=_stricmp>
+ $<$<BOOL:${USING_GNUC}>:_GNU_SOURCE>
+)
+
+target_include_directories(libconfuse
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+)
+
+set_target_properties(libconfuse PROPERTIES PUBLIC_HEADER src/confuse.h)
+
+install(TARGETS libconfuse EXPORT unofficial-libconfuse-config)
+
+install(
+ EXPORT unofficial-libconfuse-config
+ NAMESPACE unofficial::libconfuse::
+ DESTINATION share/unofficial-libconfuse
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+)
+
+install(
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/libconfuse.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
+)
diff --git a/ports/libconfuse/CONTROL b/ports/libconfuse/CONTROL
new file mode 100644
index 000000000..15044cce3
--- /dev/null
+++ b/ports/libconfuse/CONTROL
@@ -0,0 +1,4 @@
+Source: libconfuse
+Version: 2019-07-14
+Description: Small configuration file parser library for C
+Homepage: https://github.com/martinh/libconfuse
diff --git a/ports/libconfuse/config.h.in b/ports/libconfuse/config.h.in
new file mode 100644
index 000000000..3a43264bd
--- /dev/null
+++ b/ports/libconfuse/config.h.in
@@ -0,0 +1,99 @@
+/* Define if translation of program messages to the user's native
+ language is requested. */
+#cmakedefine ENABLE_NLS
+
+/* Define if you have the <stdlib.h> header file. */
+#cmakedefine HAVE_STDLIB_H
+
+/* Define if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H
+
+/* Define if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H
+
+/* Define if you have the <sys/stat.h> header file. */
+#cmakedefine HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H
+
+/* Define if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H
+
+/* Define if you have the <windows.h> header file. */
+#cmakedefine HAVE_WINDOWS_H
+
+/* Define if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define if you have the `_fileno' function. */
+#cmakedefine HAVE__FILENO
+
+/* Define if you have the `_isatty' function. */
+#cmakedefine HAVE__ISATTY
+
+/* Define if the GNU dcgettext() function is already present or preinstalled. */
+#cmakedefine HAVE_DCGETTEXT
+
+/* Define if you have the `fmemopen' function. */
+#cmakedefine HAVE_FMEMOPEN
+
+/* Define if you have the `funopen' function. */
+#cmakedefine HAVE_FUNOPEN
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#cmakedefine HAVE_GETTEXT
+
+/* Define if you have the iconv() function. */
+#cmakedefine HAVE_ICONV
+
+/* Define if you have the `strcasecmp' function. */
+#cmakedefine HAVE_STRCASECMP
+
+/* Define if you have the `strdup' function. */
+#cmakedefine HAVE_STRDUP
+
+/* Define if you have the `_strdup' function. */
+#cmakedefine HAVE__STRDUP
+
+/* Define if you have the strndup function */
+#cmakedefine HAVE_STRNDUP
+
+/* Define if you have the `setenv' function. */
+#cmakedefine HAVE_SETENV
+
+/* Define if you have the `unsetenv' function. */
+#cmakedefine HAVE_UNSETENV
+
+/* Define if you have the `_putenv' function. */
+#cmakedefine HAVE__PUTENV
+
+/* Define if `lex' declares `yytext' as a `char *' by default, not a
+ `char[]'. */
+/*#undef YYTEXT_POINTER*/
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/*#undef const*/
+
+/* Name of package */
+#define PACKAGE "@PACKAGE@"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "@PACKAGE_NAME@"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "@PACKAGE_STRING@"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "@PACKAGE_VERSION@"
+
+/* Version number of package */
+#define VERSION "@PACKAGE_VERSION@"
+
+#define LOCALEDIR "@CMAKE_INSTALL_LOCALEDIR@"
diff --git a/ports/libconfuse/portfile.cmake b/ports/libconfuse/portfile.cmake
new file mode 100644
index 000000000..01c6290cd
--- /dev/null
+++ b/ports/libconfuse/portfile.cmake
@@ -0,0 +1,43 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO martinh/libconfuse
+ REF 67e1207c8de440525a3fdde1448a586791ebc052
+ SHA512 15d4eb0640fe74cc90910820715a70b2f944d2ed9753cca3be90f0ac6840beeda6a370b0624588d81ed2def2f8463e404473721351a685af711cf1d59efb870a
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH})
+
+vcpkg_find_acquire_program(FLEX)
+get_filename_component(FLEX_DIR ${FLEX} DIRECTORY)
+vcpkg_add_to_path(${FLEX_DIR})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ vcpkg_replace_string(
+ ${CURRENT_PACKAGES_DIR}/include/confuse.h
+ "ifdef BUILDING_STATIC"
+ "if 1 // ifdef BUILDING_STATIC"
+ )
+endif()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT})
diff --git a/ports/libexif/CONTROL b/ports/libexif/CONTROL
index d99eb31b9..e37d0960e 100644
--- a/ports/libexif/CONTROL
+++ b/ports/libexif/CONTROL
@@ -1,4 +1,4 @@
Source: libexif
-Version: 0.6.21-1
-Homepage: https://sourceforge.net/projects/libexif/
+Version: 0.6.21-2
+Homepage: https://libexif.github.io/
Description: a library for parsing, editing, and saving EXIF data
diff --git a/ports/libexif/add-missing-_stdint-h.patch b/ports/libexif/add-missing-_stdint-h.patch
new file mode 100644
index 000000000..1c4c95d1c
--- /dev/null
+++ b/ports/libexif/add-missing-_stdint-h.patch
@@ -0,0 +1,7 @@
+diff --git a/libexif/_stdint.h b/libexif/_stdint.h
+new file mode 100644
+index 0000000..9a6118b
+--- /dev/null
++++ b/libexif/_stdint.h
+@@ -0,0 +1 @@
++#include <stdint.h>
diff --git a/ports/libexif/portfile.cmake b/ports/libexif/portfile.cmake
index 0442d8c15..11f7080d1 100644
--- a/ports/libexif/portfile.cmake
+++ b/ports/libexif/portfile.cmake
@@ -4,15 +4,14 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "libexif currently only supports being built for desktop")
endif()
-set(LIBEXIF_VERSION 0.6.21)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libexif-${LIBEXIF_VERSION})
-
-vcpkg_download_distfile(ARCHIVE
- URLS "https://freefr.dl.sourceforge.net/project/libexif/libexif/${LIBEXIF_VERSION}/libexif-${LIBEXIF_VERSION}.tar.bz2"
- FILENAME "libexif-${LIBEXIF_VERSION}.tar.bz2"
- SHA512 4e0fe2abe85d1c95b41cb3abe1f6333dc3a9eb69dba106a674a78d74a4d5b9c5a19647118fa1cc2d72b98a29853394f1519eda9e2889eb28d3be26b21c7cfc35
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO libexif/libexif
+ REF libexif-0_6_21-release
+ SHA512 aecba54eb9c8b4ce29d11985a547074b381d72027b563c7aef865852b661a6f18a258c748fca6b16198344f4a86568b658071ac95cc1d332f576c6160e1f257d
+ HEAD_REF master
+ PATCHES add-missing-_stdint-h.patch
)
-vcpkg_extract_source_archive(${ARCHIVE})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH})
diff --git a/ports/liblas/CONTROL b/ports/liblas/CONTROL
new file mode 100644
index 000000000..4b983c937
--- /dev/null
+++ b/ports/liblas/CONTROL
@@ -0,0 +1,12 @@
+Source: liblas
+Version: 1.8.1
+Build-Depends: boost, boost-thread, boost-system, boost-iostreams, boost-filesystem, libgeotiff
+Description: A C/C++ library for reading and writing the very common LAS LiDAR format.
+
+Feature: jpeg
+Description: Support for jpeg
+Build-Depends: libjpeg-turbo
+
+Feature: zlib
+Build-Depends: zlib
+Description: Support zlib for compression \ No newline at end of file
diff --git a/ports/liblas/fix-BuildError.patch b/ports/liblas/fix-BuildError.patch
new file mode 100644
index 000000000..277e81ef7
--- /dev/null
+++ b/ports/liblas/fix-BuildError.patch
@@ -0,0 +1,47 @@
+diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
+index beb83e2..6f216bd 100644
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -155,7 +152,7 @@ endif()
+ # Targets installation
+
+ install(TARGETS ${LIBLAS_UTILITIES}
+- RUNTIME DESTINATION ${LIBLAS_BIN_DIR}
++ RUNTIME DESTINATION tools
+ LIBRARY DESTINATION ${LIBLAS_LIB_DIR}
+ ARCHIVE DESTINATION ${LIBLAS_LIB_DIR})
+
+diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
+index c7f583d..ca9e602 100644
+--- a/cmake/CMakeLists.txt
++++ b/cmake/CMakeLists.txt
+@@ -5,13 +5,8 @@
+ # Set where cmake will install liblas-config.cmake. It's installed in
+ # ${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR} and ${PROJECT_ROOT_DIR}
+ # is the relative path to the root from there.
+-if (NOT WIN32)
+- set(INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
+- set (PROJECT_ROOT_DIR "../../..")
+-else ()
+- set(INSTALL_CMAKE_DIR "cmake")
+- set (PROJECT_ROOT_DIR "..")
+-endif ()
++set(INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
++set (PROJECT_ROOT_DIR "../../..")
+
+ # Now create the liblas-config files using the .in templates
+ configure_file (liblas-config.cmake.in
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index e35de06..f7c25d2 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -226,7 +226,8 @@ target_link_libraries(${LIBLAS_LIB_NAME}
+ ${GEOTIFF_LIBRARY}
+ ${GDAL_LIBRARY}
+ ${LASZIP_LIBRARY}
+- ${Boost_LIBRARIES})
++ ${Boost_LIBRARIES}
++ proj)
+
+ target_link_libraries(${LIBLAS_C_LIB_NAME}
+ ${LIBLAS_LIB_NAME} )
diff --git a/ports/liblas/portfile.cmake b/ports/liblas/portfile.cmake
new file mode 100644
index 000000000..0ad91aa0d
--- /dev/null
+++ b/ports/liblas/portfile.cmake
@@ -0,0 +1,48 @@
+include(vcpkg_common_functions)
+
+set(VERSION 1.8.1)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://download.osgeo.org/liblas/libLAS-${VERSION}.tar.bz2"
+ FILENAME "libLAS-${VERSION}-src.tar.bz2"
+ SHA512 1cb39c557af0006c54f1100d0d409977fcc1886abd155c1b144d806c47f8675a9f2125d3a9aca16bae65d2aabba84d5e5e322b42085e7db312f3d53f92342acf
+ HEAD_REF master
+)
+
+vcpkg_extract_source_archive_ex(
+ ARCHIVE ${ARCHIVE}
+ OUT_SOURCE_PATH SOURCE_PATH
+ PATCHES fix-BuildError.patch
+)
+
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_OSGEO4W=OFF # Disable osgeo4w
+ -DWITH_TESTS=OFF
+ -DWITH_UTILITIES=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB}
+ -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=${CMAKE_DISABLE_FIND_PACKAGE_JPEG}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/share/cmake/liblas/liblas-depends.cmake)
+
+if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/share/cmake/liblas)
+ vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/liblas)
+endif()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblas RENAME copyright)
diff --git a/ports/libmariadb/CONTROL b/ports/libmariadb/CONTROL
index 986eb5d23..887a52ed0 100644
--- a/ports/libmariadb/CONTROL
+++ b/ports/libmariadb/CONTROL
@@ -1,4 +1,4 @@
Source: libmariadb
-Version: 3.0.10-1
+Version: 3.0.10-2
Homepage: https://github.com/MariaDB/mariadb-connector-c
Description: MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases
diff --git a/ports/libmariadb/fix-InstallPath.patch b/ports/libmariadb/fix-InstallPath.patch
new file mode 100644
index 000000000..1a317aa2d
--- /dev/null
+++ b/ports/libmariadb/fix-InstallPath.patch
@@ -0,0 +1,146 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 02757a9..b2715dd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -15,6 +15,11 @@ IF(COMMAND CMAKE_POLICY)
+ ENDFOREACH()
+ ENDIF()
+
++if (BUILD_SHARED_LIBS)
++ set(DEFAULT_LINKAGE DYNAMIC)
++else()
++ set(DEFAULT_LINKAGE STATIC)
++endif()
+
+ PROJECT(mariadb-connector-c C)
+
+diff --git a/cmake/install_plugins.cmake b/cmake/install_plugins.cmake
+index cd5616c..d058a5c 100644
+--- a/cmake/install_plugins.cmake
++++ b/cmake/install_plugins.cmake
+@@ -8,7 +8,7 @@
+ # plugin installation
+
+ MACRO(INSTALL_PLUGIN name binary_dir)
+- INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR})
++ INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}/../../../bin/plugin)
+ IF(WIN32)
+ FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "<File Id=\"${name}.dll\" Name=\"${name}.dll\" DiskId=\"1\" Source=\"${binary_dir}/${CMAKE_BUILD_TYPE}/${name}.dll\"/>\n")
+ FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "<File Id=\"${name}.pdb\" Name=\"${name}.pdb\" DiskId=\"1\" Source=\"${binary_dir}/${CMAKE_BUILD_TYPE}/${name}.pdb\"/>\n")
+diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
+index a1f039e..03a3a6f 100644
+--- a/libmariadb/CMakeLists.txt
++++ b/libmariadb/CMakeLists.txt
+@@ -386,10 +386,10 @@ ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE})
+ TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS})
+
+ IF(UNIX)
+- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE})
++ ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE})
+ SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
+ ELSE()
+- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} mariadbclient.def)
++ ADD_LIBRARY(libmariadb ${libmariadb_RC} mariadbclient.def)
+ TARGET_LINK_LIBRARIES(libmariadb mariadbclient)
+ SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C)
+ ENDIF()
+@@ -441,13 +441,14 @@ ENDIF()
+
+ INSTALL(TARGETS mariadbclient
+ COMPONENT Development
+- DESTINATION ${INSTALL_LIBDIR})
++ LIBRARY DESTINATION lib)
+ INSTALL(TARGETS libmariadb
+ COMPONENT SharedLibraries
+- DESTINATION ${INSTALL_LIBDIR})
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib)
+
+-
+-IF(WIN32)
++IF(0)
+ # On Windows, install PDB
+ INSTALL(FILES $<TARGET_PDB_FILE:libmariadb> DESTINATION "${INSTALL_LIBDIR}"
+ CONFIGURATIONS Debug RelWithDebInfo
+diff --git a/plugins/auth/CMakeLists.txt b/plugins/auth/CMakeLists.txt
+index 42f6f05..9a57146 100644
+--- a/plugins/auth/CMakeLists.txt
++++ b/plugins/auth/CMakeLists.txt
+@@ -14,7 +14,7 @@ REGISTER_PLUGIN(TARGET mysql_native_password
+ REGISTER_PLUGIN(TARGET dialog
+ TYPE MARIADB_CLIENT_PLUGIN_AUTH
+ CONFIGURATIONS DYNAMIC STATIC OFF
+- DEFAULT DYNAMIC
++ DEFAULT ${DEFAULT_LINKAGE}
+ SOURCES ${CC_SOURCE_DIR}/plugins/auth/dialog.c
+ ${CC_SOURCE_DIR}/libmariadb/get_password.c)
+
+@@ -33,7 +33,7 @@ IF(WITH_SSL)
+ REGISTER_PLUGIN(TARGET caching_sha2_password
+ TYPE MARIADB_CLIENT_PLUGIN_AUTH
+ CONFIGURATIONS DYNAMIC STATIC OFF
+- DEFAULT DYNAMIC
++ DEFAULT ${DEFAULT_LINKAGE}
+ SOURCES ${CC_SOURCE_DIR}/plugins/auth/caching_sha2_pw.c
+ ${CRYPT_SOURCE}
+ LIBRARIES ${CACHING_SHA2_LIBS})
+@@ -53,7 +53,7 @@ IF(GSSAPI_SOURCES)
+ REGISTER_PLUGIN(TARGET auth_gssapi_client
+ TYPE MARIADB_CLIENT_PLUGIN_AUTH
+ CONFIGURATIONS DYNAMIC STATIC OFF
+- DEFAULT DYNAMIC
++ DEFAULT ${DEFAULT_LINKAGE}
+ SOURCES ${GSSAPI_SOURCES}
+ INCLUDES ${CC_SOURCE_DIR}/plugins/auth ${GSSAPI_INCS}
+ LIBRARIES ${GSSAPI_LIBS})
+@@ -68,7 +68,7 @@ IF(${WITH_SSL} STREQUAL "OPENSSL" OR ${WITH_SSL} STREQUAL "SCHANNEL")
+ REGISTER_PLUGIN(TARGET sha256_password
+ TYPE MARIADB_CLIENT_PLUGIN_AUTH
+ CONFIGURATIONS DYNAMIC STATIC OFF
+- DEFAULT DYNAMIC
++ DEFAULT ${DEFAULT_LINKAGE}
+ SOURCES ${AUTH_DIR}/sha256_pw.c
+ LIBRARIES ${SHA256_LIBS})
+ ENDIF()
+@@ -85,6 +85,6 @@ REGISTER_PLUGIN(TARGET mysql_old_password
+ REGISTER_PLUGIN(TARGET mysql_clear_password
+ TYPE MARIADB_CLIENT_PLUGIN_AUTH
+ CONFIGURATIONS DYNAMIC STATIC OFF
+- DEFAULT DYNAMIC
++ DEFAULT ${DEFAULT_LINKAGE}
+ SOURCES ${AUTH_DIR}/mariadb_cleartext.c)
+
+diff --git a/plugins/io/CMakeLists.txt b/plugins/io/CMakeLists.txt
+index 8c304c9..3547107 100644
+--- a/plugins/io/CMakeLists.txt
++++ b/plugins/io/CMakeLists.txt
+@@ -7,7 +7,7 @@ IF (WITH_CURL)
+ REGISTER_PLUGIN(TARGET remote_io
+ TYPE MARIADB_CLIENT_PLUGIN_IO
+ CONFIGURATIONS DYNAMIC STATIC OFF
+- DEFAULT DYNAMIC
++ DEFAULT ${DEFAULT_LINKAGE}
+ SOURCES ${CC_SOURCE_DIR}/plugins/io/remote_io.c
+ INCLUDES ${CURL_INCLUDE_DIR}
+ LIBRARIES ${CURL_LIBRARIES})
+diff --git a/plugins/pvio/CMakeLists.txt b/plugins/pvio/CMakeLists.txt
+index 76eb3ef..3601622 100644
+--- a/plugins/pvio/CMakeLists.txt
++++ b/plugins/pvio/CMakeLists.txt
+@@ -15,13 +15,13 @@ IF(WIN32)
+ REGISTER_PLUGIN(TARGET pvio_npipe
+ TYPE MARIADB_CLIENT_PLUGIN_PVIO
+ CONFIGURATIONS STATIC DYNAMIC DEFAULT
+- DEFAULT DYNAMIC
++ DEFAULT ${DEFAULT_LINKAGE}
+ SOURCES ${CC_SOURCE_DIR}/plugins/pvio/pvio_npipe.c)
+
+ # shared memory
+ REGISTER_PLUGIN(TARGET pvio_shmem
+ TYPE MARIADB_CLIENT_PLUGIN_PVIO
+ CONFIGURATIONS STATIC DYNAMIC DEFAULT
+- DEFAULT DYNAMIC
++ DEFAULT ${DEFAULT_LINKAGE}
+ SOURCES ${CC_SOURCE_DIR}/plugins/pvio/pvio_shmem.c)
+ ENDIF()
diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake
index 0089ec0a3..5fab1502c 100644
--- a/ports/libmariadb/portfile.cmake
+++ b/ports/libmariadb/portfile.cmake
@@ -14,6 +14,7 @@ vcpkg_from_github(
PATCHES
md.patch
disable-test-build.patch
+ fix-InstallPath.patch
)
vcpkg_configure_cmake(
@@ -38,45 +39,8 @@ if(VCPKG_BUILD_TYPE STREQUAL "debug")
${CURRENT_PACKAGES_DIR}/include)
endif()
-# fix libmariadb lib & dll directory.
-if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/lib/mariadb/mariadbclient.lib
- ${CURRENT_PACKAGES_DIR}/lib/mariadbclient.lib)
- endif()
-
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/mariadbclient.lib
- ${CURRENT_PACKAGES_DIR}/debug/lib/mariadbclient.lib)
- endif()
-else()
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
- file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.dll
- ${CURRENT_PACKAGES_DIR}/bin/libmariadb.dll)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.lib
- ${CURRENT_PACKAGES_DIR}/lib/libmariadb.lib)
- endif()
-
- if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.dll
- ${CURRENT_PACKAGES_DIR}/debug/bin/libmariadb.dll)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.lib
- ${CURRENT_PACKAGES_DIR}/debug/lib/libmariadb.lib)
- endif()
-endif()
-
# remove plugin folder
file(REMOVE_RECURSE
- ${CURRENT_PACKAGES_DIR}/lib/plugin
- ${CURRENT_PACKAGES_DIR}/debug/lib/plugin
${CURRENT_PACKAGES_DIR}/lib/mariadb
${CURRENT_PACKAGES_DIR}/debug/lib/mariadb)
diff --git a/ports/libzippp/CONTROL b/ports/libzippp/CONTROL
new file mode 100644
index 000000000..f2a6b24d6
--- /dev/null
+++ b/ports/libzippp/CONTROL
@@ -0,0 +1,4 @@
+Source: libzippp
+Version: 2019-07-22
+Description: Simple basic C++ wrapper around the libzip library. It is meant to be a portable and easy-to-use library for ZIP handling
+Build-Depends: zlib, libzip[bzip2]
diff --git a/ports/libzippp/portfile.cmake b/ports/libzippp/portfile.cmake
new file mode 100644
index 000000000..3c3a22ffa
--- /dev/null
+++ b/ports/libzippp/portfile.cmake
@@ -0,0 +1,27 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ctabin/libzippp
+ REF be75a3413b648a3264e94a2c1921c83081dec1e0
+ SHA512 86c6040bbaea0817486218e96c4d230a328e3560ada41861fbd18d78faa085b158199318d633085e616509084082bf29d6f97afdd2d2dfbc6b843dfbf6a20c85
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_TESTS=OFF
+ OPTIONS_DEBUG
+ -DINSTALL_HEADERS=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "share/libzippp")
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzippp RENAME copyright)
diff --git a/ports/mimalloc/CONTROL b/ports/mimalloc/CONTROL
new file mode 100644
index 000000000..127d64590
--- /dev/null
+++ b/ports/mimalloc/CONTROL
@@ -0,0 +1,13 @@
+Source: mimalloc
+Version: 2019-06-25
+Description: Compact general purpose allocator with excellent performance
+Homepage: https://github.com/microsoft/mimalloc
+
+Feature: asm
+Description: Generate assembly files
+
+Feature: override
+Description: Override the standard malloc interface
+
+Feature: secure
+Description: Use security mitigations (like guard pages and randomization)
diff --git a/ports/mimalloc/fix-cmake.patch b/ports/mimalloc/fix-cmake.patch
new file mode 100644
index 000000000..3fd5f3050
--- /dev/null
+++ b/ports/mimalloc/fix-cmake.patch
@@ -0,0 +1,52 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a35e885..76b6f60 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -105,7 +105,7 @@ else()
+ list(APPEND mi_libraries pthread)
+ endif()
+
+-
++if(BUILD_SHARED_LIBS)
+ # shared library
+ add_library(mimalloc SHARED ${mi_sources})
+ set_target_properties(mimalloc PROPERTIES VERSION ${mi_version} NO_SONAME "YES" OUTPUT_NAME ${mi_basename} )
+@@ -116,7 +116,7 @@ endif()
+ target_compile_options(mimalloc PRIVATE ${mi_cflags})
+ target_include_directories(mimalloc PRIVATE include PUBLIC $<INSTALL_INTERFACE:${mi_install_dir}/include>)
+ target_link_libraries(mimalloc PUBLIC ${mi_libraries})
+-
++else()
+ # static library
+ add_library(mimalloc-static STATIC ${mi_sources})
+ if(WIN32)
+@@ -135,15 +135,18 @@ endif()
+ target_compile_options(mimalloc-static PRIVATE ${mi_cflags})
+ target_include_directories(mimalloc-static PRIVATE include PUBLIC $<INSTALL_INTERFACE:${mi_install_dir}/include>)
+ target_link_libraries(mimalloc-static PUBLIC ${mi_libraries})
++endif()
+
+ # install static and shared library, and the include files
+-install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_dir} LIBRARY NAMELINK_SKIP)
+-install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_dir})
++if(BUILD_SHARED_LIBS)
++install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib NAMELINK_SKIP)
++else()
++install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION lib)
++endif()
+ install(FILES include/mimalloc.h DESTINATION ${mi_install_dir}/include)
+ install(FILES cmake/mimalloc-config.cmake DESTINATION ${mi_install_dir}/cmake)
+ install(FILES cmake/mimalloc-config-version.cmake DESTINATION ${mi_install_dir}/cmake)
+ install(EXPORT mimalloc DESTINATION ${mi_install_dir}/cmake)
+-install(FILES "$<TARGET_FILE:mimalloc>" DESTINATION lib) # duplicate the .so in the lib directory (unversioned)
+
+ # single object file for more predictable static overriding
+ add_library(mimalloc-obj OBJECT src/static.c)
+@@ -154,7 +157,3 @@ if(NOT WIN32 AND MI_OVERRIDE MATCHES "ON")
+ endif()
+ target_compile_options(mimalloc-obj PRIVATE ${mi_cflags})
+ target_include_directories(mimalloc-obj PRIVATE include PUBLIC $<INSTALL_INTERFACE:include>)
+-
+-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION}
+- DESTINATION ${mi_install_dir}
+- RENAME ${mi_basename}${CMAKE_C_OUTPUT_EXTENSION} )
diff --git a/ports/mimalloc/portfile.cmake b/ports/mimalloc/portfile.cmake
new file mode 100644
index 000000000..a520b3ba5
--- /dev/null
+++ b/ports/mimalloc/portfile.cmake
@@ -0,0 +1,73 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO microsoft/mimalloc
+ REF c6c1d5fffd0cf8dcb2ab969cde8fd170af44fdef
+ SHA512 3b9ce5d7dd70dd5ea56b70833c842068312a739e6131d956fd733e9893441e7e3340b6734bea0b799ac292533b0082975c08facd963961062dac821ccc44f9a9
+ HEAD_REF master
+ PATCHES
+ fix-cmake.patch
+)
+
+vcpkg_check_features(
+ asm MI_SEE_ASM
+ secure MI_SECURE
+ override MI_OVERRIDE
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS_DEBUG
+ -DMI_CHECK_FULL=ON
+ OPTIONS_RELEASE
+ -DMI_CHECK_FULL=OFF
+ OPTIONS
+ -DMI_OVERRIDE=${MI_OVERRIDE}
+ -DMI_INTERPOSE=ON
+ -DMI_SEE_ASM=${MI_SEE_ASM}
+ -DMI_USE_CXX=OFF
+ -DMI_SECURE=${MI_SECURE}
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+file(GLOB lib_directories RELATIVE ${CURRENT_PACKAGES_DIR}/lib "${CURRENT_PACKAGES_DIR}/lib/${PORT}-*")
+list(GET lib_directories 0 lib_install_dir)
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/${lib_install_dir}/cmake)
+
+vcpkg_replace_string(
+ ${CURRENT_PACKAGES_DIR}/share/${PORT}/mimalloc.cmake
+ "lib/${lib_install_dir}/"
+ ""
+)
+
+file(COPY
+ ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
+)
+
+file(COPY ${CURRENT_PACKAGES_DIR}/lib/${lib_install_dir}/include DESTINATION ${CURRENT_PACKAGES_DIR})
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/lib/${lib_install_dir}
+ ${CURRENT_PACKAGES_DIR}/debug/share
+ ${CURRENT_PACKAGES_DIR}/lib/${lib_install_dir}
+)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ vcpkg_replace_string(
+ ${CURRENT_PACKAGES_DIR}/include/mimalloc.h
+ "!defined(MI_SHARED_LIB)"
+ "0 // !defined(MI_SHARED_LIB)"
+ )
+endif()
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
+
+# CMake integration test
+vcpkg_test_cmake(PACKAGE_NAME ${PORT})
diff --git a/ports/mimalloc/vcpkg-cmake-wrapper.cmake b/ports/mimalloc/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..4e2a70c4b
--- /dev/null
+++ b/ports/mimalloc/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,9 @@
+_find_package(${ARGS})
+
+if(TARGET mimalloc AND NOT TARGET mimalloc-static)
+ add_library(mimalloc-static INTERFACE IMPORTED)
+ set_target_properties(mimalloc-static PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc)
+elseif(TARGET mimalloc-static AND NOT TARGET mimalloc)
+ add_library(mimalloc INTERFACE IMPORTED)
+ set_target_properties(mimalloc PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc-static)
+endif()
diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL
index 5d3b3a5f0..77a40437f 100644
--- a/ports/mongo-c-driver/CONTROL
+++ b/ports/mongo-c-driver/CONTROL
@@ -3,3 +3,7 @@ Version: 1.14.0-3
Build-Depends: libbson, openssl (!windows), zlib
Description: Client library written in C for MongoDB.
Homepage: https://github.com/mongodb/mongo-c-driver
+
+Feature: snappy
+Description: Enables snappy compressor support
+Build-Depends: snappy
diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake
index f2b72fc08..40d1effa8 100644
--- a/ports/mongo-c-driver/portfile.cmake
+++ b/ports/mongo-c-driver/portfile.cmake
@@ -10,6 +10,10 @@ vcpkg_from_github(
PATCHES fix-uwp.patch
)
+vcpkg_check_features(
+ "snappy" MONGO_ENABLE_SNAPPY
+)
+
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(ENABLE_STATIC ON)
else()
@@ -34,6 +38,7 @@ vcpkg_configure_cmake(
-DENABLE_SSL=${ENABLE_SSL}
-DENABLE_ZLIB=SYSTEM
-DENABLE_STATIC=${ENABLE_STATIC}
+ -DENABLE_SNAPPY=${MONGO_ENABLE_SNAPPY}
-DBUILD_VERSION=${BUILD_VERSION}
)
diff --git a/ports/openxr-loader/0004-fix-fatal-errorC1189.patch b/ports/openxr-loader/0004-fix-fatal-errorC1189.patch
new file mode 100644
index 000000000..f71a99c62
--- /dev/null
+++ b/ports/openxr-loader/0004-fix-fatal-errorC1189.patch
@@ -0,0 +1,13 @@
+diff --git a/src/loader/CMakeLists.txt b/src/loader/CMakeLists.txt
+index 92985a5..b265091 100644
+--- a/src/loader/CMakeLists.txt
++++ b/src/loader/CMakeLists.txt
+@@ -134,7 +134,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ endforeach()
+
+ target_link_libraries(${LOADER_NAME} shlwapi)
+- target_compile_options(${LOADER_NAME} PRIVATE)
++ target_compile_options(${LOADER_NAME} PRIVATE /std:c++17)
+ generate_export_header(${LOADER_NAME})
+ # set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS false)
+
diff --git a/ports/openxr-loader/CONTROL b/ports/openxr-loader/CONTROL
index 3c9379e9b..7fd84105b 100644
--- a/ports/openxr-loader/CONTROL
+++ b/ports/openxr-loader/CONTROL
@@ -1,5 +1,5 @@
Source: openxr-loader
-Version: 0.90.1
+Version: 0.90.1-1
Description: Khronos API for abstracting VR/MR/AR hardware
Feature: vulkan
diff --git a/ports/openxr-loader/portfile.cmake b/ports/openxr-loader/portfile.cmake
index 8b2fb4671..c1de0d142 100644
--- a/ports/openxr-loader/portfile.cmake
+++ b/ports/openxr-loader/portfile.cmake
@@ -22,6 +22,7 @@ vcpkg_from_github(
0002-fix-linux-pkgconfig-dependency.patch
# Python < 3.6 doesn't allow a WindowsPath object to act as a pathlike in os.path functions
0003-windows-path-python-fix.patch
+ 0004-fix-fatal-errorC1189.patch
)
# Weird behavior inside the OpenXR loader. On Windows they force shared libraries to use static crt, and
diff --git a/ports/pcl/CONTROL b/ports/pcl/CONTROL
index 1a9852c8e..41714a66a 100644
--- a/ports/pcl/CONTROL
+++ b/ports/pcl/CONTROL
@@ -1,5 +1,5 @@
Source: pcl
-Version: 1.9.1-4
+Version: 1.9.1-5
Homepage: https://github.com/PointCloudLibrary/pcl
Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.
Build-Depends: eigen3, flann, qhull, vtk, libpng, boost-system, boost-filesystem, boost-thread, boost-date-time, boost-iostreams, boost-random, boost-foreach, boost-dynamic-bitset, boost-property-map, boost-graph, boost-multi-array, boost-signals2, boost-ptr-container, boost-uuid, boost-interprocess, boost-asio
diff --git a/ports/pcl/cuda_10_1.patch b/ports/pcl/cuda_10_1.patch
new file mode 100644
index 000000000..4b46149a4
--- /dev/null
+++ b/ports/pcl/cuda_10_1.patch
@@ -0,0 +1,133 @@
+diff --git a/cuda/common/include/pcl/cuda/thrust.h b/cuda/common/include/pcl/cuda/thrust.h
+index 57586ab..af073d7 100644
+--- a/cuda/common/include/pcl/cuda/thrust.h
++++ b/cuda/common/include/pcl/cuda/thrust.h
+@@ -42,6 +42,7 @@
+
+ #include <thrust/host_vector.h>
+ #include <thrust/device_vector.h>
++#include <thrust/device_malloc.h>
+ #include <thrust/copy.h>
+ #include <thrust/device_ptr.h>
+ #include <thrust/sequence.h>
+diff --git a/gpu/features/src/fpfh.cu b/gpu/features/src/fpfh.cu
+index 8d34f76..59a5f0c 100644
+--- a/gpu/features/src/fpfh.cu
++++ b/gpu/features/src/fpfh.cu
+@@ -231,12 +231,12 @@ namespace pcl
+ int *sinds = sindices + Warp::WARP_SIZE * warp_idx;
+ int size = sizes[idx];
+
+- for(int i = lane; __any(i < size); i += Warp::STRIDE)
++ for(int i = lane; __any_sync(0xFFFFFFFF, i < size); i += Warp::STRIDE)
+ {
+ if (i < size)
+ sinds[lane] = ginds[i];
+
+- int inds_num = __popc(__ballot(i < size));
++ int inds_num = __popc(__ballot_sync(0xFFFFFFFF, i < size));
+
+ for(int j = 0; j < inds_num; ++j)
+ {
+diff --git a/gpu/octree/src/cuda/approx_nsearch.cu b/gpu/octree/src/cuda/approx_nsearch.cu
+index e457255..3e1adfe 100644
+--- a/gpu/octree/src/cuda/approx_nsearch.cu
++++ b/gpu/octree/src/cuda/approx_nsearch.cu
+@@ -141,7 +141,7 @@ namespace pcl { namespace device { namespace appnearest_search
+ {
+ __shared__ volatile int per_warp_buffer[KernelPolicy::WARPS_COUNT];
+
+- int mask = __ballot(node_idx != -1);
++ int mask = __ballot_sync(0xFFFFFFFF, node_idx != -1);
+
+ while(mask)
+ {
+@@ -275,7 +275,7 @@ namespace pcl { namespace device { namespace appnearest_search
+
+ bool active = query_index < batch.queries_num;
+
+- if (__all(active == false))
++ if (__all_sync(0xFFFFFFFF, active == false))
+ return;
+
+ Warp_appNearestSearch search(batch, query_index);
+diff --git a/gpu/octree/src/cuda/knn_search.cu b/gpu/octree/src/cuda/knn_search.cu
+index a99655d..b55e3c1 100644
+--- a/gpu/octree/src/cuda/knn_search.cu
++++ b/gpu/octree/src/cuda/knn_search.cu
+@@ -106,7 +106,7 @@ namespace pcl { namespace device { namespace knn_search
+ else
+ query_index = -1;
+
+- while(__any(active))
++ while(__any_sync(0xFFFFFFFF, active))
+ {
+ int leaf = -1;
+
+@@ -163,7 +163,7 @@ namespace pcl { namespace device { namespace knn_search
+
+ __device__ __forceinline__ void processLeaf(int node_idx)
+ {
+- int mask = __ballot(node_idx != -1);
++ int mask = __ballot_sync(0xFFFFFFFF, node_idx != -1);
+
+ unsigned int laneId = Warp::laneId();
+ unsigned int warpId = Warp::id();
+@@ -310,7 +310,7 @@ namespace pcl { namespace device { namespace knn_search
+
+ bool active = query_index < batch.queries_num;
+
+- if (__all(active == false))
++ if (__all_sync(0xFFFFFFFF, active == false))
+ return;
+
+ Warp_knnSearch search(batch, query_index);
+diff --git a/gpu/octree/src/cuda/radius_search.cu b/gpu/octree/src/cuda/radius_search.cu
+index f90273f..8ae84e7 100644
+--- a/gpu/octree/src/cuda/radius_search.cu
++++ b/gpu/octree/src/cuda/radius_search.cu
+@@ -155,7 +155,7 @@ namespace pcl
+ else
+ query_index = -1;
+
+- while(__any(active))
++ while(__any_sync(0xFFFFFFFF, active))
+ {
+ int leaf = -1;
+
+@@ -217,7 +217,7 @@ namespace pcl
+
+ __device__ __forceinline__ void processLeaf(int leaf)
+ {
+- int mask = __ballot(leaf != -1);
++ int mask = __ballot_sync(0xFFFFFFFF, leaf != -1);
+
+ while(mask)
+ {
+@@ -255,7 +255,7 @@ namespace pcl
+ int *out = batch.output + active_query_index * batch.max_results + active_found_count;
+ int length_left = batch.max_results - active_found_count;
+
+- int test = __any(active_lane == laneId && (leaf & KernelPolicy::CHECK_FLAG));
++ int test = __any_sync(0xFFFFFFFF, active_lane == laneId && (leaf & KernelPolicy::CHECK_FLAG));
+
+ if (test)
+ {
+@@ -329,7 +329,7 @@ namespace pcl
+ total_new += new_nodes;
+ out += new_nodes;
+
+- if (__all(idx >= length) || __any(out_of_bounds) || total_new == length_left)
++ if (__all_sync(0xFFFFFFFF, idx >= length) || __any_sync(0xFFFFFFFF, out_of_bounds) || total_new == length_left)
+ break;
+ }
+ return min(total_new, length_left);
+@@ -343,7 +343,7 @@ namespace pcl
+
+ bool active = query_index < batch.queries.size;
+
+- if (__all(active == false))
++ if (__all_sync(0xFFFFFFFF, active == false))
+ return;
+
+ Warp_radiusSearch<BatchType> search(batch, query_index);
diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake
index b30ceb0d8..b855831e9 100644
--- a/ports/pcl/portfile.cmake
+++ b/ports/pcl/portfile.cmake
@@ -11,6 +11,7 @@ vcpkg_from_github(
pcl_config.patch
use_flann_targets.patch
boost-1.70.patch
+ cuda_10_1.patch
)
file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindFLANN.cmake)
diff --git a/ports/qhull/CONTROL b/ports/qhull/CONTROL
index d8a402049..9ea30f011 100644
--- a/ports/qhull/CONTROL
+++ b/ports/qhull/CONTROL
@@ -1,4 +1,4 @@
Source: qhull
-Version: 7.2.1-3
+Version: 7.3.2
Homepage: https://github.com/qhull/qhull
Description: computes the convex hull, Delaunay triangulation, Voronoi diagram
diff --git a/ports/qhull/portfile.cmake b/ports/qhull/portfile.cmake
index b7939dddb..a9c689923 100644
--- a/ports/qhull/portfile.cmake
+++ b/ports/qhull/portfile.cmake
@@ -3,8 +3,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO qhull/qhull
- REF v7.2.1 # Qhull 2015.2
- SHA512 8f5177ea45f82fa28f13e95105497e7e29086d7301e1cb8d3860fff09ebf8d0f01cfcb0f044c422f0ac0ba94b845bba223232e5eeb613bf671f65a569b8766d0
+ REF v7.3.2 # Qhull 2019.1
+ SHA512 aea2c70179de10f648aba960129a3b9a3fe309a0eb085bdb86f697e3d4b214570c241e88d4f0b4d2974137759ee7086452d0a3957c4b2a256708402fb3c9eb3d
HEAD_REF master
)
if(${TARGET_TRIPLET} STREQUAL "x64-windows-static")
@@ -37,6 +37,8 @@ endif()
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Qhull)
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(GLOB_RECURSE HTMFILES ${CURRENT_PACKAGES_DIR}/include/*.htm)
file(REMOVE ${HTMFILES})
diff --git a/ports/rttr/portfile.cmake b/ports/rttr/portfile.cmake
index a85a2b157..cb3bfe68c 100644
--- a/ports/rttr/portfile.cmake
+++ b/ports/rttr/portfile.cmake
@@ -1,7 +1,5 @@
include(vcpkg_common_functions)
-vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO rttrorg/rttr
@@ -10,15 +8,23 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix-directory-output.patch
- remove-owner-read-perms.patch
+ remove-owner-read-perms.patch
)
+#Handle static lib
+set(BUILD_STATIC_LIB OFF)
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ set(BUILD_STATIC_LIB ON)
+else()
+ set(BUILD_STATIC_LIB OFF)
+endif()
vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
- OPTIONS
- -DBUILD_BENCHMARKS=OFF
- -DBUILD_UNIT_TESTS=OFF
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_BENCHMARKS=OFF
+ -DBUILD_UNIT_TESTS=OFF
+ -DBUILD_STATIC=${BUILD_STATIC_LIB}
)
vcpkg_install_cmake()
@@ -31,6 +37,11 @@ else()
message(FATAL_ERROR "RTTR does not support this platform")
endif()
+#Handle static lib
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
#Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rttr)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/rttr/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/rttr/copyright)
diff --git a/ports/sdl2-image/CONTROL b/ports/sdl2-image/CONTROL
index 1c28b50f0..19218ef3e 100644
--- a/ports/sdl2-image/CONTROL
+++ b/ports/sdl2-image/CONTROL
@@ -1,5 +1,5 @@
Source: sdl2-image
-Version: 2.0.4-3
+Version: 2.0.5
Build-Depends: sdl2, libpng
Homepage: https://www.libsdl.org/projects/SDL_image
Description: SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV
diff --git a/ports/sdl2-image/portfile.cmake b/ports/sdl2-image/portfile.cmake
index a1e69af54..ea4744148 100644
--- a/ports/sdl2-image/portfile.cmake
+++ b/ports/sdl2-image/portfile.cmake
@@ -1,11 +1,11 @@
include(vcpkg_common_functions)
-set(SDL2_IMAGE_VERSION "2.0.4")
+set(SDL2_IMAGE_VERSION "2.0.5")
vcpkg_download_distfile(ARCHIVE
URLS "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${SDL2_IMAGE_VERSION}.zip"
FILENAME "SDL2_image-${SDL2_IMAGE_VERSION}.zip"
- SHA512 b26ef2546718754481385ddad800ee61c84c58a9e141127c0a12215362d41c23603bfb21d556803396c0cb17bd7f48a45dd1b2e66573a1b2e32f590cc3fa48d0
+ SHA512 c10e28a0d50fb7a6c985ffe8904370ab4faeb9bbed6f2ffbc81536422e8f8bb66eddbf69b12423082216c2bcfcb617cba4c5970f63fe75bfacccd9f99f02a6a2
)
vcpkg_extract_source_archive_ex(
diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL
index 081ea47b8..d4109ccc9 100644
--- a/ports/sqlite3/CONTROL
+++ b/ports/sqlite3/CONTROL
@@ -1,5 +1,5 @@
Source: sqlite3
-Version: 3.28.0-2
+Version: 3.29.0-1
Homepage: https://sqlite.org/
Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.
diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake
index b9be87433..4ddc2d8b2 100644
--- a/ports/sqlite3/portfile.cmake
+++ b/ports/sqlite3/portfile.cmake
@@ -1,7 +1,7 @@
include(vcpkg_common_functions)
-set(SQLITE_VERSION 3280000)
-set(SQLITE_HASH 6a2b9c0accd286b09d7e077393a627e22112ef11c76ff6a5896f5ff1a11eb62a8b2700f5a99eebda82df63b3968814ca460582aa4619852f96a899d2f59b9f8d)
+set(SQLITE_VERSION 3290000)
+set(SQLITE_HASH 3306ac3e37ec46f1b2ac74155756c82afadff7bf5b8b4c9b5516f5e8c1c785b5f50ec9b840482292f2f6c5d72cf6d9a78a0dfb727f0a9cf134b6c5522606e9b3 )
vcpkg_download_distfile(ARCHIVE
URLS "https://sqlite.org/2019/sqlite-amalgamation-${SQLITE_VERSION}.zip"
diff --git a/ports/tesseract/CONTROL b/ports/tesseract/CONTROL
index 3f04dcf96..a31493e76 100644
--- a/ports/tesseract/CONTROL
+++ b/ports/tesseract/CONTROL
@@ -1,12 +1,12 @@
Source: tesseract
-Version: 4.1.0
+Version: 4.1.0-1
Homepage: https://github.com/tesseract-ocr/tesseract
Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.
Build-Depends: leptonica
Feature: training_tools
Description: build training tools
-Build-Depends: icu
+Build-Depends: icu, pango, cairo, fontconfig
Feature: cpu_independed
Description: build on any cpu extension commands support
diff --git a/ports/tesseract/fix-text2image.patch b/ports/tesseract/fix-text2image.patch
new file mode 100644
index 000000000..a4ff21d6b
--- /dev/null
+++ b/ports/tesseract/fix-text2image.patch
@@ -0,0 +1,64 @@
+diff --git a/src/training/CMakeLists.txt b/src/training/CMakeLists.txt
+index 8fd96a9..ef258e1 100644
+--- a/src/training/CMakeLists.txt
++++ b/src/training/CMakeLists.txt
+@@ -253,7 +253,7 @@ if (NOT CPPAN_BUILD)
+ find_package(PkgConfig)
+ endif()
+
+-if (PKG_CONFIG_FOUND OR CPPAN_BUILD)
++if (1)
+
+ if (PKG_CONFIG_FOUND)
+ pkg_check_modules(Pango REQUIRED pango)
+@@ -261,8 +261,35 @@ pkg_check_modules(Cairo REQUIRED cairo)
+ pkg_check_modules(PangoFt2 REQUIRED pangoft2)
+ pkg_check_modules(PangoCairo REQUIRED pangocairo)
+ pkg_check_modules(FontConfig REQUIRED fontconfig)
+-endif()
++else()
++find_library(Glib_LIBRARY_RELEASE NAMES glib-2.0)
++find_library(Glib_LIBRARY_DEBUG NAMES glib-2.0)
++select_library_configurations(Glib)
++
++find_library(GObject_LIBRARY_RELEASE NAMES gobject-2.0)
++find_library(GObject_LIBRARY_DEBUG NAMES gobject-2.0)
++select_library_configurations(GObject)
++
++find_library(Pango_LIBRARY_RELEASE NAMES pango-1.0)
++find_library(Pango_LIBRARY_DEBUG NAMES pango-1.0)
++select_library_configurations(Pango)
++
++find_library(Cairo_LIBRARY_RELEASE NAMES cairo)
++find_library(Cairo_LIBRARY_DEBUG NAMES cairod)
++select_library_configurations(Cairo)
+
++find_library(FontConfig_LIBRARY_RELEASE NAMES fontconfig)
++find_library(FontConfig_LIBRARY_DEBUG NAMES fontconfig)
++select_library_configurations(FontConfig)
++
++find_library(PangoFt2_LIBRARY_RELEASE NAMES pangoft2-1.0)
++find_library(PangoFt2_LIBRARY_DEBUG NAMES pangoft2-1.0)
++select_library_configurations(PangoFt2)
++
++find_library(PangoCairo_LIBRARY_RELEASE NAMES pangocairo-1.0)
++find_library(PangoCairo_LIBRARY_DEBUG NAMES pangocairo-1.0)
++select_library_configurations(PangoCairo)
++endif()
+ set(text2image_src
+ text2image.cpp
+ boxchar.cpp
+@@ -285,10 +312,12 @@ set(text2image_src
+
+ add_executable (text2image ${text2image_src})
+ target_link_libraries (text2image unicharset_training)
+-if (PKG_CONFIG_FOUND)
++if (1)
+ target_include_directories (text2image BEFORE PRIVATE ${Cairo_INCLUDE_DIRS} ${Pango_INCLUDE_DIRS})
+ target_compile_definitions (text2image PRIVATE -DPANGO_ENABLE_ENGINE)
+ target_link_libraries (text2image
++ ${GObject_LIBRARIES}
++ ${Glib_LIBRARIES}
+ ${Pango_LIBRARIES}
+ ${Cairo_LIBRARIES}
+ ${PangoCairo_LIBRARIES}
diff --git a/ports/tesseract/portfile.cmake b/ports/tesseract/portfile.cmake
index dc03a69e7..e9c2ffa9f 100644
--- a/ports/tesseract/portfile.cmake
+++ b/ports/tesseract/portfile.cmake
@@ -9,6 +9,7 @@ vcpkg_from_github(
SHA512 d617f5c5b826640b2871dbe3d7973bcc5e66fafd837921a20e009d683806ed50f0f258aa455019d99fc54f5cb65c2fa0380e3a3c92b39ab0684b8799c730b09d
PATCHES
fix-tiff-linkage.patch
+ fix-text2image.patch
)
# The built-in cmake FindICU is better
diff --git a/ports/xtensor-io/CONTROL b/ports/xtensor-io/CONTROL
new file mode 100644
index 000000000..734c0becf
--- /dev/null
+++ b/ports/xtensor-io/CONTROL
@@ -0,0 +1,5 @@
+Source: xtensor-io
+Version: 0.7.0
+Description: xtensor plugin to read and write images, audio files, numpy (compressed) npz and HDF5
+Build-Depends: xtensor, xtl
+
diff --git a/ports/xtensor-io/portfile.cmake b/ports/xtensor-io/portfile.cmake
new file mode 100644
index 000000000..d8cc89a09
--- /dev/null
+++ b/ports/xtensor-io/portfile.cmake
@@ -0,0 +1,31 @@
+# header-only library
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO QuantStack/xtensor-io
+ REF 0.7.0
+ SHA512 6c8416c595d022ed60cd802deec6d63128d205d6fd13962098b6242ace4fa9e61122e5b05837a1aab3b64bc042da7cbf2f72f2328155c342de3a6db741d4d4ee
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_TESTS=OFF
+ -DDOWNLOAD_GTEST=OFF
+ -DDOWNLOAD_GBENCHMARK=OFF
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)
+
diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1
index 2fdd9fdb4..ab51dc9be 100644
--- a/scripts/buildsystems/msbuild/applocal.ps1
+++ b/scripts/buildsystems/msbuild/applocal.ps1
@@ -29,7 +29,7 @@ function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$tar
Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir
}
if ($copiedFilesLog) { Add-Content $copiedFilesLog "$targetBinaryDir\$targetBinaryName" -Encoding UTF8 }
- if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" }
+ if ($tlogFile) { Add-Content $tlogFile "$targetBinaryDir\$targetBinaryName" -Encoding Unicode }
}
diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt
index ca23db413..5bfae1511 100644
--- a/toolsrc/CMakeLists.txt
+++ b/toolsrc/CMakeLists.txt
@@ -35,7 +35,7 @@ if(GCC OR CLANG)
endif()
file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp)
-file(GLOB_RECURSE VCPKGTEST_SOURCES src/vcpkg-tests/*.cpp)
+file(GLOB_RECURSE VCPKGTEST_SOURCES src/vcpkg-test/*.cpp)
if (DEFINE_DISABLE_METRICS)
set(DISABLE_METRICS_VALUE "1")
@@ -43,16 +43,28 @@ else()
set(DISABLE_METRICS_VALUE "0")
endif()
-add_executable(vcpkg src/vcpkg.cpp ${VCPKGLIB_SOURCES})
-target_compile_definitions(vcpkg PRIVATE -DDISABLE_METRICS=${DISABLE_METRICS_VALUE})
-target_include_directories(vcpkg PRIVATE include)
+add_library(vcpkglib OBJECT ${VCPKGLIB_SOURCES})
+add_executable(vcpkg src/vcpkg.cpp $<TARGET_OBJECTS:vcpkglib>)
+add_executable(vcpkg-test
+ EXCLUDE_FROM_ALL
+ ${VCPKGTEST_SOURCES}
+ $<TARGET_OBJECTS:vcpkglib>)
+foreach(TARGET_NAME vcpkglib vcpkg vcpkg-test)
+ target_compile_definitions(${TARGET_NAME} PRIVATE -DDISABLE_METRICS=${DISABLE_METRICS_VALUE})
+ target_include_directories(${TARGET_NAME} PRIVATE include)
+endforeach()
-add_executable(vcpkg-test EXCLUDE_FROM_ALL ${VCPKGTEST_SOURCES} ${VCPKGLIB_SOURCES})
-target_compile_definitions(vcpkg-test PRIVATE -DDISABLE_METRICS=${DISABLE_METRICS_VALUE})
-target_include_directories(vcpkg-test PRIVATE include)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(Threads REQUIRED)
+target_link_libraries(vcpkg PRIVATE Threads::Threads)
+target_link_libraries(vcpkg-test PRIVATE Threads::Threads)
-foreach(TEST_NAME arguments chrono dependencies paragraph plan specifier supports)
+foreach(TEST_NAME
+ arguments chrono dependencies files
+ paragraph plan specifier statusparagraphs
+ strings supports update
+)
add_test(${TEST_NAME} vcpkg-test [${TEST_NAME}])
endforeach()
@@ -87,7 +99,3 @@ if(MSVC)
target_sources(vcpkg PRIVATE src/pch.cpp)
target_compile_options(vcpkg PRIVATE /Yupch.h /FIpch.h /Zm200)
endif()
-
-set(THREADS_PREFER_PTHREAD_FLAG ON)
-find_package(Threads REQUIRED)
-target_link_libraries(vcpkg PRIVATE Threads::Threads)
diff --git a/toolsrc/include/vcpkg-tests/catch.h b/toolsrc/include/vcpkg-test/catch.h
index 303f664ff..303f664ff 100644
--- a/toolsrc/include/vcpkg-tests/catch.h
+++ b/toolsrc/include/vcpkg-test/catch.h
diff --git a/toolsrc/include/vcpkg-tests/util.h b/toolsrc/include/vcpkg-test/util.h
index fe4ee0eec..fa650abc8 100644
--- a/toolsrc/include/vcpkg-tests/util.h
+++ b/toolsrc/include/vcpkg-test/util.h
@@ -1,3 +1,4 @@
+#include <vcpkg/base/files.h>
#include <vcpkg/statusparagraph.h>
#include <memory>
@@ -30,4 +31,12 @@ T&& unwrap(vcpkg::Optional<T>&& opt)
return std::move(*opt.get());
}
+extern const bool SYMLINKS_ALLOWED;
+
+extern const fs::path TEMPORARY_DIRECTORY;
+
+void create_symlink(const fs::path& file, const fs::path& target, std::error_code& ec);
+
+void create_directory_symlink(const fs::path& file, const fs::path& target, std::error_code& ec);
+
}
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h
index 3ea0d6036..a5e04db25 100644
--- a/toolsrc/include/vcpkg/base/files.h
+++ b/toolsrc/include/vcpkg/base/files.h
@@ -13,13 +13,60 @@ namespace fs
using stdfs::file_status;
using stdfs::file_type;
using stdfs::path;
+ using stdfs::perms;
using stdfs::u8path;
- inline bool is_regular_file(file_status s) { return stdfs::is_regular_file(s); }
- inline bool is_directory(file_status s) { return stdfs::is_directory(s); }
- inline bool is_symlink(file_status s) { return stdfs::is_symlink(s); }
+ /*
+ std::experimental::filesystem's file_status and file_type are broken in
+ the presence of symlinks -- a symlink is treated as the object it points
+ to for `symlink_status` and `symlink_type`
+ */
+
+ using stdfs::status;
+
+ // we want to poison ADL with these niebloids
+
+ namespace detail
+ {
+ struct symlink_status_t
+ {
+ file_status operator()(const path& p, std::error_code& ec) const noexcept;
+ file_status operator()(const path& p, vcpkg::LineInfo li) const noexcept;
+ };
+ struct is_symlink_t
+ {
+ inline bool operator()(file_status s) const { return stdfs::is_symlink(s); }
+ };
+ struct is_regular_file_t
+ {
+ inline bool operator()(file_status s) const { return stdfs::is_regular_file(s); }
+ };
+ struct is_directory_t
+ {
+ inline bool operator()(file_status s) const { return stdfs::is_directory(s); }
+ };
+ }
+
+ constexpr detail::symlink_status_t symlink_status{};
+ constexpr detail::is_symlink_t is_symlink{};
+ constexpr detail::is_regular_file_t is_regular_file{};
+ constexpr detail::is_directory_t is_directory{};
}
+/*
+ if someone attempts to use unqualified `symlink_status` or `is_symlink`,
+ they might get the ADL version, which is broken.
+ Therefore, put `symlink_status` in the global namespace, so that they get
+ our symlink_status.
+
+ We also want to poison the ADL on is_regular_file and is_directory, because
+ we don't want people calling these functions on paths
+*/
+using fs::is_directory;
+using fs::is_regular_file;
+using fs::is_symlink;
+using fs::symlink_status;
+
namespace vcpkg::Files
{
struct Filesystem
@@ -44,7 +91,9 @@ namespace vcpkg::Files
std::error_code& ec) = 0;
bool remove(const fs::path& path, LineInfo linfo);
virtual bool remove(const fs::path& path, std::error_code& ec) = 0;
- virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec) = 0;
+
+ virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec, fs::path& failure_point) = 0;
+ std::uintmax_t remove_all(const fs::path& path, LineInfo li);
virtual bool exists(const fs::path& path) const = 0;
virtual bool is_directory(const fs::path& path) const = 0;
virtual bool is_regular_file(const fs::path& path) const = 0;
diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h
index d553d1d41..d7de9b0b2 100644
--- a/toolsrc/include/vcpkg/base/strings.h
+++ b/toolsrc/include/vcpkg/base/strings.h
@@ -184,4 +184,9 @@ namespace vcpkg::Strings
const char* search(StringView haystack, StringView needle);
bool contains(StringView haystack, StringView needle);
+
+ // base 32 encoding, since base64 encoding requires lowercase letters,
+ // which are not distinct from uppercase letters on macOS or Windows filesystems.
+ // follows RFC 4648
+ std::string b32_encode(std::uint64_t x) noexcept;
}
diff --git a/toolsrc/include/vcpkg/base/work_queue.h b/toolsrc/include/vcpkg/base/work_queue.h
new file mode 100644
index 000000000..70142e110
--- /dev/null
+++ b/toolsrc/include/vcpkg/base/work_queue.h
@@ -0,0 +1,230 @@
+#pragma once
+
+#include <condition_variable>
+#include <memory>
+#include <queue>
+
+namespace vcpkg
+{
+ template<class Action, class ThreadLocalData>
+ struct WorkQueue;
+
+ namespace detail
+ {
+ // for SFINAE purposes, keep out of the class
+ template<class Action, class ThreadLocalData>
+ auto call_moved_action(Action& action,
+ const WorkQueue<Action, ThreadLocalData>& work_queue,
+ ThreadLocalData& tld) -> decltype(static_cast<void>(std::move(action)(tld, work_queue)))
+ {
+ std::move(action)(tld, work_queue);
+ }
+
+ template<class Action, class ThreadLocalData>
+ auto call_moved_action(Action& action, const WorkQueue<Action, ThreadLocalData>&, ThreadLocalData& tld)
+ -> decltype(static_cast<void>(std::move(action)(tld)))
+ {
+ std::move(action)(tld);
+ }
+ }
+
+ template<class Action, class ThreadLocalData>
+ struct WorkQueue
+ {
+ template<class F>
+ WorkQueue(std::uint16_t num_threads, LineInfo li, const F& tld_init) noexcept
+ {
+ m_line_info = li;
+
+ set_unjoined_workers(num_threads);
+ m_threads.reserve(num_threads);
+ for (std::size_t i = 0; i < num_threads; ++i)
+ {
+ m_threads.push_back(std::thread(Worker{this, tld_init()}));
+ }
+ }
+
+ WorkQueue(WorkQueue const&) = delete;
+ WorkQueue(WorkQueue&&) = delete;
+
+ ~WorkQueue()
+ {
+ auto lck = std::unique_lock<std::mutex>(m_mutex);
+ if (!is_joined(m_state))
+ {
+ Checks::exit_with_message(m_line_info, "Failed to call join() on a WorkQueue that was destroyed");
+ }
+ }
+
+ // should only be called once; anything else is an error
+ void run(LineInfo li)
+ {
+ // this should _not_ be locked before `run()` is called; however, we
+ // want to terminate if someone screws up, rather than cause UB
+ auto lck = std::unique_lock<std::mutex>(m_mutex);
+
+ if (m_state != State::BeforeRun)
+ {
+ Checks::exit_with_message(li, "Attempted to run() twice");
+ }
+
+ m_state = State::Running;
+ }
+
+ // runs all remaining tasks, and blocks on their finishing
+ // if this is called in an existing task, _will block forever_
+ // DO NOT DO THAT
+ // thread-unsafe
+ void join(LineInfo li)
+ {
+ {
+ auto lck = std::unique_lock<std::mutex>(m_mutex);
+ if (is_joined(m_state))
+ {
+ Checks::exit_with_message(li, "Attempted to call join() more than once");
+ }
+ else if (m_state == State::Terminated)
+ {
+ m_state = State::TerminatedJoined;
+ }
+ else
+ {
+ m_state = State::Joined;
+ }
+ }
+
+ while (unjoined_workers())
+ {
+ if (!running_workers())
+ {
+ m_cv.notify_one();
+ }
+ }
+
+ // wait for all threads to join
+ for (auto& thrd : m_threads)
+ {
+ thrd.join();
+ }
+ }
+
+ // useful in the case of errors
+ // doesn't stop any existing running tasks
+ // returns immediately, so that one can call this in a task
+ void terminate() const
+ {
+ {
+ auto lck = std::unique_lock<std::mutex>(m_mutex);
+ if (is_joined(m_state))
+ {
+ m_state = State::TerminatedJoined;
+ }
+ else
+ {
+ m_state = State::Terminated;
+ }
+ }
+ m_cv.notify_all();
+ }
+
+ void enqueue_action(Action a) const
+ {
+ {
+ auto lck = std::unique_lock<std::mutex>(m_mutex);
+ m_actions.push_back(std::move(a));
+
+ if (m_state == State::BeforeRun) return;
+ }
+ m_cv.notify_one();
+ }
+
+ private:
+ struct Worker
+ {
+ const WorkQueue* work_queue;
+ ThreadLocalData tld;
+
+ void operator()()
+ {
+ // unlocked when waiting, or when in the action
+ // locked otherwise
+ auto lck = std::unique_lock<std::mutex>(work_queue->m_mutex);
+
+ work_queue->m_cv.wait(lck, [&] { return work_queue->m_state != State::BeforeRun; });
+
+ work_queue->increment_running_workers();
+ for (;;)
+ {
+ const auto state = work_queue->m_state;
+
+ if (is_terminated(state))
+ {
+ break;
+ }
+
+ if (work_queue->m_actions.empty())
+ {
+ if (state == State::Running || work_queue->running_workers() > 1)
+ {
+ work_queue->decrement_running_workers();
+ work_queue->m_cv.wait(lck);
+ work_queue->increment_running_workers();
+ continue;
+ }
+
+ // the queue is joining, and we are the only worker running
+ // no more work!
+ break;
+ }
+
+ Action action = std::move(work_queue->m_actions.back());
+ work_queue->m_actions.pop_back();
+
+ lck.unlock();
+ work_queue->m_cv.notify_one();
+ detail::call_moved_action(action, *work_queue, tld);
+ lck.lock();
+ }
+
+ work_queue->decrement_running_workers();
+ work_queue->decrement_unjoined_workers();
+ }
+ };
+
+ enum class State : std::int16_t
+ {
+ // can only exist upon construction
+ BeforeRun = -1,
+
+ Running,
+ Joined,
+ Terminated,
+ TerminatedJoined,
+ };
+
+ static bool is_terminated(State st) { return st == State::Terminated || st == State::TerminatedJoined; }
+
+ static bool is_joined(State st) { return st == State::Joined || st == State::TerminatedJoined; }
+
+ mutable std::mutex m_mutex{};
+ // these are all under m_mutex
+ mutable State m_state = State::BeforeRun;
+ mutable std::vector<Action> m_actions{};
+ mutable std::condition_variable m_cv{};
+
+ mutable std::atomic<std::uint32_t> m_workers;
+ // = unjoined_workers << 16 | running_workers
+
+ void set_unjoined_workers(std::uint16_t threads) { m_workers = std::uint32_t(threads) << 16; }
+ void decrement_unjoined_workers() const { m_workers -= 1 << 16; }
+
+ std::uint16_t unjoined_workers() const { return std::uint16_t(m_workers >> 16); }
+
+ void increment_running_workers() const { ++m_workers; }
+ void decrement_running_workers() const { --m_workers; }
+ std::uint16_t running_workers() const { return std::uint16_t(m_workers); }
+
+ std::vector<std::thread> m_threads{};
+ LineInfo m_line_info;
+ };
+}
diff --git a/toolsrc/src/vcpkg-tests/arguments.cpp b/toolsrc/src/vcpkg-test/arguments.cpp
index 8c625be0f..3fe5fa420 100644
--- a/toolsrc/src/vcpkg-tests/arguments.cpp
+++ b/toolsrc/src/vcpkg-test/arguments.cpp
@@ -1,4 +1,4 @@
-#include <vcpkg-tests/catch.h>
+#include <vcpkg-test/catch.h>
#include <vcpkg/vcpkgcmdarguments.h>
diff --git a/toolsrc/src/vcpkg-tests/catch.cpp b/toolsrc/src/vcpkg-test/catch.cpp
index 701dcb39a..8b5d1aa15 100644
--- a/toolsrc/src/vcpkg-tests/catch.cpp
+++ b/toolsrc/src/vcpkg-test/catch.cpp
@@ -1,5 +1,5 @@
#define CATCH_CONFIG_RUNNER
-#include <vcpkg-tests/catch.h>
+#include <vcpkg-test/catch.h>
#include <vcpkg/base/system.debug.h>
diff --git a/toolsrc/src/vcpkg-tests/chrono.cpp b/toolsrc/src/vcpkg-test/chrono.cpp
index c164753f9..306217ad0 100644
--- a/toolsrc/src/vcpkg-tests/chrono.cpp
+++ b/toolsrc/src/vcpkg-test/chrono.cpp
@@ -1,4 +1,4 @@
-#include <vcpkg-tests/catch.h>
+#include <vcpkg-test/catch.h>
#include <vcpkg/base/chrono.h>
diff --git a/toolsrc/src/vcpkg-tests/dependencies.cpp b/toolsrc/src/vcpkg-test/dependencies.cpp
index 0dee6f296..5ed05cc07 100644
--- a/toolsrc/src/vcpkg-tests/dependencies.cpp
+++ b/toolsrc/src/vcpkg-test/dependencies.cpp
@@ -1,4 +1,4 @@
-#include <vcpkg-tests/catch.h>
+#include <vcpkg-test/catch.h>
#include <vcpkg/sourceparagraph.h>
diff --git a/toolsrc/src/vcpkg-test/files.cpp b/toolsrc/src/vcpkg-test/files.cpp
new file mode 100644
index 000000000..9e14cec0c
--- /dev/null
+++ b/toolsrc/src/vcpkg-test/files.cpp
@@ -0,0 +1,121 @@
+#include <vcpkg-test/catch.h>
+#include <vcpkg-test/util.h>
+
+#include <vcpkg/base/files.h>
+#include <vcpkg/base/strings.h>
+
+#include <iostream>
+#include <random>
+
+#include <vector>
+
+using vcpkg::Test::SYMLINKS_ALLOWED;
+using vcpkg::Test::TEMPORARY_DIRECTORY;
+
+namespace
+{
+ using uid = std::uniform_int_distribution<std::uint64_t>;
+
+ std::mt19937_64 get_urbg(std::uint64_t index)
+ {
+ // smallest prime > 2**63 - 1
+ return std::mt19937_64{index + 9223372036854775837ULL};
+ }
+
+ std::string get_random_filename(std::mt19937_64& urbg) { return vcpkg::Strings::b32_encode(uid{}(urbg)); }
+
+ void create_directory_tree(std::mt19937_64& urbg,
+ vcpkg::Files::Filesystem& fs,
+ std::uint64_t depth,
+ const fs::path& base)
+ {
+ std::random_device rd;
+ constexpr std::uint64_t max_depth = 5;
+ constexpr std::uint64_t width = 5;
+
+ // we want ~70% of our "files" to be directories, and then a third
+ // each of the remaining ~30% to be regular files, directory symlinks,
+ // and regular symlinks
+ constexpr std::uint64_t directory_min_tag = 0;
+ constexpr std::uint64_t directory_max_tag = 6;
+ constexpr std::uint64_t regular_file_tag = 7;
+ constexpr std::uint64_t regular_symlink_tag = 8;
+ constexpr std::uint64_t directory_symlink_tag = 9;
+
+ // if we're at the max depth, we only want to build non-directories
+ std::uint64_t file_type;
+ if (depth < max_depth)
+ {
+ file_type = uid{directory_min_tag, regular_symlink_tag}(urbg);
+ }
+ else
+ {
+ file_type = uid{regular_file_tag, regular_symlink_tag}(urbg);
+ }
+
+ if (!SYMLINKS_ALLOWED && file_type > regular_file_tag)
+ {
+ file_type = regular_file_tag;
+ }
+
+ std::error_code ec;
+ if (file_type <= directory_max_tag)
+ {
+ fs.create_directory(base, ec);
+ if (ec) {
+ INFO("File that failed: " << base);
+ REQUIRE_FALSE(ec);
+ }
+
+ for (int i = 0; i < width; ++i)
+ {
+ create_directory_tree(urbg, fs, depth + 1, base / get_random_filename(urbg));
+ }
+ }
+ else if (file_type == regular_file_tag)
+ {
+ // regular file
+ fs.write_contents(base, "", ec);
+ }
+ else if (file_type == regular_symlink_tag)
+ {
+ // regular symlink
+ fs.write_contents(base, "", ec);
+ REQUIRE_FALSE(ec);
+ auto base_link = base;
+ base_link.replace_filename(base.filename().u8string() + "-link");
+ vcpkg::Test::create_symlink(base, base_link, ec);
+ }
+ else // type == directory_symlink_tag
+ {
+ // directory symlink
+ vcpkg::Test::create_directory_symlink(base / "..", base, ec);
+ }
+
+ REQUIRE_FALSE(ec);
+ }
+}
+
+TEST_CASE ("remove all", "[files]")
+{
+ auto urbg = get_urbg(0);
+
+ fs::path temp_dir = TEMPORARY_DIRECTORY / get_random_filename(urbg);
+
+ auto& fs = vcpkg::Files::get_real_filesystem();
+
+ std::error_code ec;
+ fs.create_directory(TEMPORARY_DIRECTORY, ec);
+
+ REQUIRE_FALSE(ec);
+
+ INFO("temp dir is: " << temp_dir);
+
+ create_directory_tree(urbg, fs, 0, temp_dir);
+
+ fs::path fp;
+ fs.remove_all(temp_dir, ec, fp);
+ REQUIRE_FALSE(ec);
+
+ REQUIRE_FALSE(fs.exists(temp_dir));
+}
diff --git a/toolsrc/src/vcpkg-tests/paragraph.cpp b/toolsrc/src/vcpkg-test/paragraph.cpp
index 0fb85ec69..a95879cfa 100644
--- a/toolsrc/src/vcpkg-tests/paragraph.cpp
+++ b/toolsrc/src/vcpkg-test/paragraph.cpp
@@ -1,5 +1,5 @@
-#include <vcpkg-tests/catch.h>
-#include <vcpkg-tests/util.h>
+#include <vcpkg-test/catch.h>
+#include <vcpkg-test/util.h>
#include <vcpkg/base/strings.h>
diff --git a/toolsrc/src/vcpkg-tests/plan.cpp b/toolsrc/src/vcpkg-test/plan.cpp
index 7ecab460b..049ef2066 100644
--- a/toolsrc/src/vcpkg-tests/plan.cpp
+++ b/toolsrc/src/vcpkg-test/plan.cpp
@@ -1,5 +1,5 @@
-#include <vcpkg-tests/catch.h>
-#include <vcpkg-tests/util.h>
+#include <vcpkg-test/catch.h>
+#include <vcpkg-test/util.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/sourceparagraph.h>
diff --git a/toolsrc/src/vcpkg-tests/specifier.cpp b/toolsrc/src/vcpkg-test/specifier.cpp
index 52ef044e7..330a96d78 100644
--- a/toolsrc/src/vcpkg-tests/specifier.cpp
+++ b/toolsrc/src/vcpkg-test/specifier.cpp
@@ -1,4 +1,4 @@
-#include <vcpkg-tests/catch.h>
+#include <vcpkg-test/catch.h>
#include <vcpkg/base/util.h>
#include <vcpkg/packagespec.h>
diff --git a/toolsrc/src/vcpkg-tests/statusparagraphs.cpp b/toolsrc/src/vcpkg-test/statusparagraphs.cpp
index df52ccb87..c0833e8ba 100644
--- a/toolsrc/src/vcpkg-tests/statusparagraphs.cpp
+++ b/toolsrc/src/vcpkg-test/statusparagraphs.cpp
@@ -1,5 +1,5 @@
-#include <vcpkg-tests/catch.h>
-#include <vcpkg-tests/util.h>
+#include <vcpkg-test/catch.h>
+#include <vcpkg-test/util.h>
#include <vcpkg/base/util.h>
#include <vcpkg/paragraphs.h>
diff --git a/toolsrc/src/vcpkg-test/strings.cpp b/toolsrc/src/vcpkg-test/strings.cpp
new file mode 100644
index 000000000..6b744eee6
--- /dev/null
+++ b/toolsrc/src/vcpkg-test/strings.cpp
@@ -0,0 +1,33 @@
+#include <vcpkg-test/catch.h>
+
+#include <vcpkg/base/strings.h>
+
+#include <cstdint>
+#include <utility>
+#include <vector>
+
+TEST_CASE ("b32 encoding", "[strings]")
+{
+ using u64 = std::uint64_t;
+
+ std::vector<std::pair<std::uint64_t, std::string>> map;
+
+ map.emplace_back(0, "AAAAAAAAAAAAA");
+ map.emplace_back(1, "BAAAAAAAAAAAA");
+
+ map.emplace_back(u64(1) << 32, "AAAAAAEAAAAAA");
+ map.emplace_back((u64(1) << 32) + 1, "BAAAAAEAAAAAA");
+
+ map.emplace_back(0xE4D0'1065'D11E'0229, "JRA4RIXMQAUJO");
+ map.emplace_back(0xA626'FE45'B135'07FF, "77BKTYWI6XJMK");
+ map.emplace_back(0xEE36'D228'0C31'D405, "FAVDDGAFSWN4O");
+ map.emplace_back(0x1405'64E7'FE7E'A88C, "MEK5H774ELBIB");
+ map.emplace_back(0xFFFF'FFFF'FFFF'FFFF, "777777777777P");
+
+ std::string result;
+ for (const auto& pr : map)
+ {
+ result = vcpkg::Strings::b32_encode(pr.first);
+ REQUIRE(vcpkg::Strings::b32_encode(pr.first) == pr.second);
+ }
+}
diff --git a/toolsrc/src/vcpkg-tests/supports.cpp b/toolsrc/src/vcpkg-test/supports.cpp
index c6c88bdbc..8bd386da0 100644
--- a/toolsrc/src/vcpkg-tests/supports.cpp
+++ b/toolsrc/src/vcpkg-test/supports.cpp
@@ -1,4 +1,4 @@
-#include <vcpkg-tests/catch.h>
+#include <vcpkg-test/catch.h>
#include <vcpkg/sourceparagraph.h>
diff --git a/toolsrc/src/vcpkg-tests/update.cpp b/toolsrc/src/vcpkg-test/update.cpp
index 93a8f74a9..70b2f04c1 100644
--- a/toolsrc/src/vcpkg-tests/update.cpp
+++ b/toolsrc/src/vcpkg-test/update.cpp
@@ -1,5 +1,5 @@
-#include <vcpkg-tests/catch.h>
-#include <vcpkg-tests/util.h>
+#include <vcpkg-test/catch.h>
+#include <vcpkg-test/util.h>
#include <vcpkg/base/sortedvector.h>
diff --git a/toolsrc/src/vcpkg-test/util.cpp b/toolsrc/src/vcpkg-test/util.cpp
new file mode 100644
index 000000000..a80ab36a0
--- /dev/null
+++ b/toolsrc/src/vcpkg-test/util.cpp
@@ -0,0 +1,177 @@
+#include <vcpkg-test/catch.h>
+#include <vcpkg-test/util.h>
+
+#include <vcpkg/base/checks.h>
+#include <vcpkg/base/files.h>
+#include <vcpkg/statusparagraph.h>
+
+// used to get the implementation specific compiler flags (i.e., __cpp_lib_filesystem)
+#include <ciso646>
+
+#include <iostream>
+#include <memory>
+
+#if defined(_WIN32)
+#include <windows.h>
+#endif
+
+#define FILESYSTEM_SYMLINK_STD 0
+#define FILESYSTEM_SYMLINK_UNIX 1
+#define FILESYSTEM_SYMLINK_NONE 2
+
+#if defined(__cpp_lib_filesystem)
+
+#define FILESYSTEM_SYMLINK FILESYSTEM_SYMLINK_STD
+#include <filesystem> // required for filesystem::create_{directory_}symlink
+
+#elif !defined(_MSC_VER)
+
+#define FILESYSTEM_SYMLINK FILESYSTEM_SYMLINK_UNIX
+#include <unistd.h>
+
+#else
+
+#define FILESYSTEM_SYMLINK FILESYSTEM_SYMLINK_NONE
+
+#endif
+
+namespace vcpkg::Test
+{
+ std::unique_ptr<vcpkg::StatusParagraph> make_status_pgh(const char* name,
+ const char* depends,
+ const char* default_features,
+ const char* triplet)
+ {
+ using Pgh = std::unordered_map<std::string, std::string>;
+ return std::make_unique<StatusParagraph>(Pgh{{"Package", name},
+ {"Version", "1"},
+ {"Architecture", triplet},
+ {"Multi-Arch", "same"},
+ {"Depends", depends},
+ {"Default-Features", default_features},
+ {"Status", "install ok installed"}});
+ }
+
+ std::unique_ptr<StatusParagraph> make_status_feature_pgh(const char* name,
+ const char* feature,
+ const char* depends,
+ const char* triplet)
+ {
+ using Pgh = std::unordered_map<std::string, std::string>;
+ return std::make_unique<StatusParagraph>(Pgh{{"Package", name},
+ {"Version", "1"},
+ {"Feature", feature},
+ {"Architecture", triplet},
+ {"Multi-Arch", "same"},
+ {"Depends", depends},
+ {"Status", "install ok installed"}});
+ }
+
+ PackageSpec unsafe_pspec(std::string name, Triplet t)
+ {
+ auto m_ret = PackageSpec::from_name_and_triplet(name, t);
+ REQUIRE(m_ret.has_value());
+ return m_ret.value_or_exit(VCPKG_LINE_INFO);
+ }
+
+ static bool system_allows_symlinks()
+ {
+#if defined(_WIN32)
+ if (!__cpp_lib_filesystem)
+ {
+ return false;
+ }
+
+ HKEY key;
+ bool allow_symlinks = true;
+
+ const auto status = RegOpenKeyExW(
+ HKEY_LOCAL_MACHINE, LR"(SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock)", 0, 0, &key);
+
+ if (status == ERROR_FILE_NOT_FOUND)
+ {
+ allow_symlinks = false;
+ std::clog << "Symlinks are not allowed on this system\n";
+ }
+
+ if (status == ERROR_SUCCESS) RegCloseKey(key);
+
+ return allow_symlinks;
+#else
+ return true;
+#endif
+ }
+
+ static fs::path internal_temporary_directory()
+ {
+#if defined(_WIN32)
+ wchar_t* tmp = static_cast<wchar_t*>(std::calloc(32'767, 2));
+
+ if (!GetEnvironmentVariableW(L"TEMP", tmp, 32'767))
+ {
+ std::cerr << "No temporary directory found.\n";
+ std::abort();
+ }
+
+ fs::path result = tmp;
+ std::free(tmp);
+
+ return result / L"vcpkg-test";
+#else
+ return "/tmp/vcpkg-test";
+#endif
+ }
+
+ const bool SYMLINKS_ALLOWED = system_allows_symlinks();
+ const fs::path TEMPORARY_DIRECTORY = internal_temporary_directory();
+
+#if FILESYSTEM_SYMLINK == FILSYSTEM_SYMLINK_NONE
+ constexpr inline char no_filesystem_message[] =
+ "<filesystem> doesn't exist; on windows, we don't attempt to use the win32 calls to create symlinks";
+#endif
+
+ void create_symlink(const fs::path& target, const fs::path& file, std::error_code& ec)
+ {
+#if FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_STD
+ if (SYMLINKS_ALLOWED)
+ {
+ std::filesystem::path targetp = target.native();
+ std::filesystem::path filep = file.native();
+
+ std::filesystem::create_symlink(targetp, filep);
+ }
+ else
+ {
+ vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, "Symlinks are not allowed on this system");
+ }
+#elif FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_UNIX
+ if (symlink(target.c_str(), file.c_str()) != 0)
+ {
+ ec.assign(errno, std::system_category());
+ }
+#else
+ vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, no_filesystem_message);
+#endif
+ }
+
+ void create_directory_symlink(const fs::path& target, const fs::path& file, std::error_code& ec)
+ {
+#if FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_STD
+ if (SYMLINKS_ALLOWED)
+ {
+ std::filesystem::path targetp = target.native();
+ std::filesystem::path filep = file.native();
+
+ std::filesystem::create_symlink(targetp, filep);
+ }
+ else
+ {
+ vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, "Symlinks are not allowed on this system");
+ }
+#elif FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_UNIX
+ ::vcpkg::Test::create_symlink(target, file, ec);
+#else
+ vcpkg::Checks::exit_with_message(VCPKG_LINE_INFO, no_filesystem_message);
+#endif
+ }
+}
diff --git a/toolsrc/src/vcpkg-tests/util.cpp b/toolsrc/src/vcpkg-tests/util.cpp
deleted file mode 100644
index 54102f1aa..000000000
--- a/toolsrc/src/vcpkg-tests/util.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-#include <vcpkg-tests/catch.h>
-#include <vcpkg-tests/util.h>
-
-#include <vcpkg/statusparagraph.h>
-
-#include <memory>
-
-namespace vcpkg::Test
-{
- std::unique_ptr<vcpkg::StatusParagraph> make_status_pgh(const char* name,
- const char* depends,
- const char* default_features,
- const char* triplet)
- {
- using Pgh = std::unordered_map<std::string, std::string>;
- return std::make_unique<StatusParagraph>(Pgh{{"Package", name},
- {"Version", "1"},
- {"Architecture", triplet},
- {"Multi-Arch", "same"},
- {"Depends", depends},
- {"Default-Features", default_features},
- {"Status", "install ok installed"}});
- }
-
- std::unique_ptr<StatusParagraph> make_status_feature_pgh(const char* name,
- const char* feature,
- const char* depends,
- const char* triplet)
- {
- using Pgh = std::unordered_map<std::string, std::string>;
- return std::make_unique<StatusParagraph>(Pgh{{"Package", name},
- {"Version", "1"},
- {"Feature", feature},
- {"Architecture", triplet},
- {"Multi-Arch", "same"},
- {"Depends", depends},
- {"Status", "install ok installed"}});
- }
-
- PackageSpec unsafe_pspec(std::string name, Triplet t)
- {
- auto m_ret = PackageSpec::from_name_and_triplet(name, t);
- REQUIRE(m_ret.has_value());
- return m_ret.value_or_exit(VCPKG_LINE_INFO);
- }
-
-}
diff --git a/toolsrc/src/vcpkg/archives.cpp b/toolsrc/src/vcpkg/archives.cpp
index 69a916828..d22e841de 100644
--- a/toolsrc/src/vcpkg/archives.cpp
+++ b/toolsrc/src/vcpkg/archives.cpp
@@ -15,9 +15,10 @@ namespace vcpkg::Archives
#endif
;
+ fs.remove_all(to_path, VCPKG_LINE_INFO);
+ fs.remove_all(to_path_partial, VCPKG_LINE_INFO);
+ // TODO: check this error code
std::error_code ec;
- fs.remove_all(to_path, ec);
- fs.remove_all(to_path_partial, ec);
fs.create_directories(to_path_partial, ec);
const auto ext = archive.extension();
#if defined(_WIN32)
diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp
index 5099795e9..6c6945e44 100644
--- a/toolsrc/src/vcpkg/base/files.cpp
+++ b/toolsrc/src/vcpkg/base/files.cpp
@@ -6,6 +6,7 @@
#include <vcpkg/base/system.print.h>
#include <vcpkg/base/system.process.h>
#include <vcpkg/base/util.h>
+#include <vcpkg/base/work_queue.h>
#if defined(__linux__) || defined(__APPLE__)
#include <fcntl.h>
@@ -20,6 +21,59 @@
#include <copyfile.h>
#endif
+namespace fs::detail
+{
+ file_status symlink_status_t::operator()(const path& p, std::error_code& ec) const noexcept
+ {
+#if defined(_WIN32)
+ static_cast<void>(ec);
+
+ /*
+ do not find the permissions of the file -- it's unnecessary for the
+ things that vcpkg does.
+ if one were to add support for this in the future, one should look
+ into GetFileSecurityW
+ */
+ perms permissions = perms::unknown;
+
+ WIN32_FILE_ATTRIBUTE_DATA file_attributes;
+ file_type ft = file_type::unknown;
+ if (!GetFileAttributesExW(p.c_str(), GetFileExInfoStandard, &file_attributes))
+ {
+ ft = file_type::not_found;
+ }
+ else if (file_attributes.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ {
+ // check for reparse point -- if yes, then symlink
+ ft = file_type::symlink;
+ }
+ else if (file_attributes.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
+ ft = file_type::directory;
+ }
+ else
+ {
+ // otherwise, the file is a regular file
+ ft = file_type::regular;
+ }
+
+ return file_status(ft, permissions);
+
+#else
+ return stdfs::symlink_status(p, ec);
+#endif
+ }
+
+ file_status symlink_status_t::operator()(const path& p, vcpkg::LineInfo li) const noexcept
+ {
+ std::error_code ec;
+ auto result = symlink_status(p, ec);
+ if (ec) vcpkg::Checks::exit_with_message(li, "error getting status of path %s: %s", p.string(), ec.message());
+
+ return result;
+ }
+}
+
namespace vcpkg::Files
{
static const std::regex FILESYSTEM_INVALID_CHARACTERS_REGEX = std::regex(R"([\/:*?"<>|])");
@@ -63,6 +117,25 @@ namespace vcpkg::Files
if (ec) Checks::exit_with_message(linfo, "error writing lines: %s: %s", path.u8string(), ec.message());
}
+ std::uintmax_t Filesystem::remove_all(const fs::path& path, LineInfo li)
+ {
+ std::error_code ec;
+ fs::path failure_point;
+
+ const auto result = this->remove_all(path, ec, failure_point);
+
+ if (ec)
+ {
+ Checks::exit_with_message(li,
+ "Failure to remove_all(%s) due to file %s: %s",
+ path.string(),
+ failure_point.string(),
+ ec.message());
+ }
+
+ return result;
+ }
+
struct RealFilesystem final : Filesystem
{
virtual Expected<std::string> read_contents(const fs::path& file_path) const override
@@ -87,7 +160,7 @@ namespace vcpkg::Files
file_stream.read(&output[0], length);
file_stream.close();
- return std::move(output);
+ return output;
}
virtual Expected<std::vector<std::string>> read_lines(const fs::path& file_path) const override
{
@@ -105,7 +178,7 @@ namespace vcpkg::Files
}
file_stream.close();
- return std::move(output);
+ return output;
}
virtual fs::path find_file_recursively_up(const fs::path& starting_dir,
const std::string& filename) const override
@@ -254,28 +327,163 @@ namespace vcpkg::Files
#endif
}
virtual bool remove(const fs::path& path, std::error_code& ec) override { return fs::stdfs::remove(path, ec); }
- virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec) override
+ virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec, fs::path& failure_point) override
{
- // Working around the currently buggy remove_all()
- std::uintmax_t out = fs::stdfs::remove_all(path, ec);
+ /*
+ does not use the std::filesystem call since it is buggy, and can
+ have spurious errors before VS 2017 update 6, and on later versions
+ (as well as on macOS and Linux), this is just as fast and will have
+ fewer spurious errors due to locks.
+ */
+
+ /*
+ `remove` doesn't actually remove anything -- it simply moves the
+ files into a parent directory (which ends up being at `path`),
+ and then inserts `actually_remove{current_path}` into the work
+ queue.
+ */
+ struct remove
+ {
+ struct tld
+ {
+ const fs::path& tmp_directory;
+ std::uint64_t index;
+
+ std::atomic<std::uintmax_t>& files_deleted;
- for (int i = 0; i < 5 && this->exists(path); i++)
+ std::mutex& ec_mutex;
+ std::error_code& ec;
+ fs::path& failure_point;
+ };
+
+ struct actually_remove;
+ using queue = WorkQueue<actually_remove, tld>;
+
+ /*
+ if `current_path` is a directory, first `remove`s all
+ elements of the directory, then calls remove.
+
+ else, just calls remove.
+ */
+ struct actually_remove
+ {
+ fs::path current_path;
+
+ void operator()(tld& info, const queue& queue) const
+ {
+ std::error_code ec;
+ const auto path_type = fs::symlink_status(current_path, ec).type();
+
+ if (check_ec(ec, info, queue, current_path)) return;
+
+ if (path_type == fs::file_type::directory)
+ {
+ for (const auto& entry : fs::stdfs::directory_iterator(current_path))
+ {
+ remove{}(entry, info, queue);
+ }
+ }
+
+ if (fs::stdfs::remove(current_path, ec))
+ {
+ info.files_deleted.fetch_add(1, std::memory_order_relaxed);
+ }
+ else
+ {
+ check_ec(ec, info, queue, current_path);
+ }
+ }
+ };
+
+ static bool check_ec(const std::error_code& ec,
+ tld& info,
+ const queue& queue,
+ const fs::path& failure_point)
+ {
+ if (ec)
+ {
+ queue.terminate();
+
+ auto lck = std::unique_lock<std::mutex>(info.ec_mutex);
+ if (!info.ec)
+ {
+ info.ec = ec;
+ info.failure_point = failure_point;
+ }
+
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void operator()(const fs::path& current_path, tld& info, const queue& queue) const
+ {
+ std::error_code ec;
+
+ const auto tmp_name = Strings::b32_encode(info.index++);
+ const auto tmp_path = info.tmp_directory / tmp_name;
+
+ fs::stdfs::rename(current_path, tmp_path, ec);
+ if (check_ec(ec, info, queue, current_path)) return;
+
+ queue.enqueue_action(actually_remove{std::move(tmp_path)});
+ }
+ };
+
+ const auto path_type = fs::symlink_status(path, ec).type();
+
+ std::atomic<std::uintmax_t> files_deleted{0};
+
+ if (path_type == fs::file_type::directory)
{
- using namespace std::chrono_literals;
- std::this_thread::sleep_for(i * 100ms);
- out += fs::stdfs::remove_all(path, ec);
+ std::uint64_t index = 0;
+ std::mutex ec_mutex;
+
+ auto const tld_gen = [&] {
+ index += static_cast<std::uint64_t>(1) << 32;
+ return remove::tld{path, index, files_deleted, ec_mutex, ec, failure_point};
+ };
+
+ remove::queue queue{4, VCPKG_LINE_INFO, tld_gen};
+
+ // note: we don't actually start the queue running until the
+ // `join()`. This allows us to rename all the top-level files in
+ // peace, so that we don't get collisions.
+ auto main_tld = tld_gen();
+ for (const auto& entry : fs::stdfs::directory_iterator(path))
+ {
+ remove{}(entry, main_tld, queue);
+ }
+
+ queue.join(VCPKG_LINE_INFO);
}
- if (this->exists(path))
+ /*
+ we need to do backoff on the removal of the top level directory,
+ since we need to place all moved files into that top level
+ directory, and so we can only delete the directory after all the
+ lower levels have been deleted.
+ */
+ for (int backoff = 0; backoff < 5; ++backoff)
{
- System::print2(
- System::Color::warning,
- "Some files in ",
- path.u8string(),
- " were unable to be removed. Close any editors operating in this directory and retry.\n");
+ if (backoff)
+ {
+ using namespace std::chrono_literals;
+ auto backoff_time = 100ms * backoff;
+ std::this_thread::sleep_for(backoff_time);
+ }
+
+ if (fs::stdfs::remove(path, ec))
+ {
+ files_deleted.fetch_add(1, std::memory_order_relaxed);
+ break;
+ }
}
- return out;
+ return files_deleted;
}
virtual bool exists(const fs::path& path) const override { return fs::stdfs::exists(path); }
virtual bool is_directory(const fs::path& path) const override { return fs::stdfs::is_directory(path); }
@@ -307,11 +515,11 @@ namespace vcpkg::Files
virtual fs::file_status status(const fs::path& path, std::error_code& ec) const override
{
- return fs::stdfs::status(path, ec);
+ return fs::status(path, ec);
}
virtual fs::file_status symlink_status(const fs::path& path, std::error_code& ec) const override
{
- return fs::stdfs::symlink_status(path, ec);
+ return fs::symlink_status(path, ec);
}
virtual void write_contents(const fs::path& file_path, const std::string& data, std::error_code& ec) override
{
diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp
index 54a74a7a1..46e78a363 100644
--- a/toolsrc/src/vcpkg/base/strings.cpp
+++ b/toolsrc/src/vcpkg/base/strings.cpp
@@ -288,3 +288,43 @@ bool Strings::contains(StringView haystack, StringView needle)
{
return Strings::search(haystack, needle) != haystack.end();
}
+
+namespace vcpkg::Strings
+{
+ namespace
+ {
+ template<class Integral>
+ std::string b32_encode_implementation(Integral x)
+ {
+ static_assert(std::is_integral<Integral>::value, "b64url_encode must take an integer type");
+ using Unsigned = std::make_unsigned_t<Integral>;
+ auto value = static_cast<Unsigned>(x);
+
+ // 32 values, plus the implicit \0
+ constexpr static char map[33] = "ABCDEFGHIJKLMNOP"
+ "QRSTUVWXYZ234567";
+
+ // log2(32)
+ constexpr static int shift = 5;
+ // 32 - 1
+ constexpr static auto mask = 31;
+
+ // ceiling(bitsize(Integral) / log2(32))
+ constexpr static auto result_size = (sizeof(value) * 8 + shift - 1) / shift;
+
+ std::string result;
+ result.reserve(result_size);
+
+ for (std::size_t i = 0; i < result_size; ++i)
+ {
+ result.push_back(map[value & mask]);
+ value >>= shift;
+ }
+
+ return result;
+ }
+ }
+
+ std::string b32_encode(std::uint64_t x) noexcept { return b32_encode_implementation(x); }
+
+}
diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp
index 9d5b490e3..a5383b2a8 100644
--- a/toolsrc/src/vcpkg/build.cpp
+++ b/toolsrc/src/vcpkg/build.cpp
@@ -642,7 +642,8 @@ namespace vcpkg::Build
if (fs.is_directory(file)) // Will only keep the logs
{
std::error_code ec;
- fs.remove_all(file, ec);
+ fs::path failure_point;
+ fs.remove_all(file, ec, failure_point);
}
}
}
@@ -787,8 +788,8 @@ namespace vcpkg::Build
auto& fs = paths.get_filesystem();
auto pkg_path = paths.package_dir(spec);
+ fs.remove_all(pkg_path, VCPKG_LINE_INFO);
std::error_code ec;
- fs.remove_all(pkg_path, ec);
fs.create_directories(pkg_path, ec);
auto files = fs.get_files_non_recursive(pkg_path);
Checks::check_exit(VCPKG_LINE_INFO, files.empty(), "unable to clear path: %s", pkg_path.u8string());
@@ -980,7 +981,7 @@ namespace vcpkg::Build
fs.rename_or_copy(tmp_failure_zip, archive_tombstone_path, ".tmp", ec);
// clean up temporary directory
- fs.remove_all(tmp_log_path, ec);
+ fs.remove_all(tmp_log_path, VCPKG_LINE_INFO);
}
}
@@ -1143,7 +1144,7 @@ namespace vcpkg::Build
{
switch (maybe_option->second)
{
- case VcpkgTripletVar::TARGET_ARCHITECTURE :
+ case VcpkgTripletVar::TARGET_ARCHITECTURE :
pre_build_info.target_architecture = variable_value;
break;
case VcpkgTripletVar::CMAKE_SYSTEM_NAME :
diff --git a/toolsrc/src/vcpkg/commands.exportifw.cpp b/toolsrc/src/vcpkg/commands.exportifw.cpp
index f0946110c..3d963a297 100644
--- a/toolsrc/src/vcpkg/commands.exportifw.cpp
+++ b/toolsrc/src/vcpkg/commands.exportifw.cpp
@@ -352,13 +352,15 @@ namespace vcpkg::Export::IFW
System::print2("Generating repository ", repository_dir.generic_u8string(), "...\n");
std::error_code ec;
+ fs::path failure_point;
Files::Filesystem& fs = paths.get_filesystem();
- fs.remove_all(repository_dir, ec);
+ fs.remove_all(repository_dir, ec, failure_point);
Checks::check_exit(VCPKG_LINE_INFO,
!ec,
- "Could not remove outdated repository directory %s",
- repository_dir.generic_u8string());
+ "Could not remove outdated repository directory %s due to file %s",
+ repository_dir.generic_u8string(),
+ failure_point.string());
const auto cmd_line = Strings::format(R"("%s" --packages "%s" "%s" > nul)",
repogen_exe.u8string(),
@@ -414,16 +416,18 @@ namespace vcpkg::Export::IFW
const VcpkgPaths& paths)
{
std::error_code ec;
+ fs::path failure_point;
Files::Filesystem& fs = paths.get_filesystem();
// Prepare packages directory
const fs::path ifw_packages_dir_path = get_packages_dir_path(export_id, ifw_options, paths);
- fs.remove_all(ifw_packages_dir_path, ec);
+ fs.remove_all(ifw_packages_dir_path, ec, failure_point);
Checks::check_exit(VCPKG_LINE_INFO,
!ec,
- "Could not remove outdated packages directory %s",
- ifw_packages_dir_path.generic_u8string());
+ "Could not remove outdated packages directory %s due to file %s",
+ ifw_packages_dir_path.generic_u8string(),
+ failure_point.string());
fs.create_directory(ifw_packages_dir_path, ec);
Checks::check_exit(
diff --git a/toolsrc/src/vcpkg/commands.portsdiff.cpp b/toolsrc/src/vcpkg/commands.portsdiff.cpp
index b30c38f43..cddc274b8 100644
--- a/toolsrc/src/vcpkg/commands.portsdiff.cpp
+++ b/toolsrc/src/vcpkg/commands.portsdiff.cpp
@@ -105,7 +105,7 @@ namespace vcpkg::Commands::PortsDiff
std::map<std::string, VersionT> names_and_versions;
for (auto&& port : all_ports)
names_and_versions.emplace(port->core_paragraph->name, port->core_paragraph->version);
- fs.remove_all(temp_checkout_path, ec);
+ fs.remove_all(temp_checkout_path, VCPKG_LINE_INFO);
return names_and_versions;
}
diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp
index 88c1526c5..f306bf4e6 100644
--- a/toolsrc/src/vcpkg/export.cpp
+++ b/toolsrc/src/vcpkg/export.cpp
@@ -400,8 +400,10 @@ namespace vcpkg::Export
Files::Filesystem& fs = paths.get_filesystem();
const fs::path export_to_path = paths.root;
const fs::path raw_exported_dir_path = export_to_path / export_id;
+ fs.remove_all(raw_exported_dir_path, VCPKG_LINE_INFO);
+
+ // TODO: error handling
std::error_code ec;
- fs.remove_all(raw_exported_dir_path, ec);
fs.create_directory(raw_exported_dir_path, ec);
// execute the plan
@@ -476,7 +478,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
if (!opts.raw)
{
- fs.remove_all(raw_exported_dir_path, ec);
+ fs.remove_all(raw_exported_dir_path, VCPKG_LINE_INFO);
}
}
diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp
index 425a4cdbc..32af57b39 100644
--- a/toolsrc/src/vcpkg/install.cpp
+++ b/toolsrc/src/vcpkg/install.cpp
@@ -354,8 +354,7 @@ namespace vcpkg::Install
{
auto& fs = paths.get_filesystem();
const fs::path package_dir = paths.package_dir(action.spec);
- std::error_code ec;
- fs.remove_all(package_dir, ec);
+ fs.remove_all(package_dir, VCPKG_LINE_INFO);
}
if (action.build_options.clean_downloads == Build::CleanDownloads::YES)
diff --git a/toolsrc/src/vcpkg/remove.cpp b/toolsrc/src/vcpkg/remove.cpp
index a40b27bd7..84ec6c981 100644
--- a/toolsrc/src/vcpkg/remove.cpp
+++ b/toolsrc/src/vcpkg/remove.cpp
@@ -179,8 +179,7 @@ namespace vcpkg::Remove
{
System::printf("Purging package %s...\n", display_name);
Files::Filesystem& fs = paths.get_filesystem();
- std::error_code ec;
- fs.remove_all(paths.packages / action.spec.dir(), ec);
+ fs.remove_all(paths.packages / action.spec.dir(), VCPKG_LINE_INFO);
System::printf(System::Color::success, "Purging package %s... done\n", display_name);
}
}
diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj
index 8edea2244..917cd3b9c 100644
--- a/toolsrc/vcpkg/vcpkg.vcxproj
+++ b/toolsrc/vcpkg/vcpkg.vcxproj
@@ -147,4 +147,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj
index 2eff1abee..d28bae8ec 100644
--- a/toolsrc/vcpkglib/vcpkglib.vcxproj
+++ b/toolsrc/vcpkglib/vcpkglib.vcxproj
@@ -274,4 +274,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj
index e533d0e15..14ec1e105 100644
--- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj
+++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj
@@ -144,4 +144,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj
index 929092dae..530dfbc5d 100644
--- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj
+++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj
@@ -23,10 +23,12 @@
<ClCompile Include="..\src\vcpkg-tests\catch.cpp" />
<ClCompile Include="..\src\vcpkg-tests\chrono.cpp" />
<ClCompile Include="..\src\vcpkg-tests\dependencies.cpp" />
+ <ClCompile Include="..\src\vcpkg-tests\files.cpp" />
<ClCompile Include="..\src\vcpkg-tests\paragraph.cpp" />
<ClCompile Include="..\src\vcpkg-tests\plan.cpp" />
<ClCompile Include="..\src\vcpkg-tests\specifier.cpp" />
<ClCompile Include="..\src\vcpkg-tests\statusparagraphs.cpp" />
+ <ClCompile Include="..\src\vcpkg-tests\strings.cpp" />
<ClCompile Include="..\src\vcpkg-tests\supports.cpp" />
<ClCompile Include="..\src\vcpkg-tests\update.cpp" />
<ClCompile Include="..\src\vcpkg-tests\util.cpp" />
diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters
index fcf513fa9..d9808ca89 100644
--- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters
+++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj.filters
@@ -48,6 +48,12 @@
<ClCompile Include="..\src\vcpkg-tests\util.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\src\tests.files.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\tests.strings.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\vcpkg-tests\catch.h">