diff options
352 files changed, 4262 insertions, 2362 deletions
diff --git a/.gitignore b/.gitignore index d105fd368..796739b31 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ +vcpkg # Visual Studio 2015 cache/options directory .vs/ @@ -273,6 +274,7 @@ __pycache__/ ############################################################ .vscode/ +*.code-workspace buildtrees/ build*/ downloads/ @@ -299,4 +301,4 @@ triplets/* ############################################################ # vcpkg - End -############################################################
\ No newline at end of file +############################################################ diff --git a/CHANGELOG.md b/CHANGELOG.md index 24f6df0b9..7440dcdc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,173 @@ +vcpkg (0.0.113) +-------------- + * Add ports: + - json-dto 0.2.5 + - keystone 0.9.1 + - osgearth 2.9 + - pdal 1.7.1-2 + - sdl2pp 0.16.0-1 + * Update ports: + - args 2018-02-23 -> 2018-05-17 + - aws-sdk-cpp 1.4.40 -> 1.4.52 + - chakracore 1.8.3 -> 1.8.4 + - cimg 2.2.2 -> 2.2.3 + - curl 7_59_0-2 -> 7.60.0 + - directxmesh apr2018 -> may2018 + - directxtex apr2018 -> may2018 + - directxtk apr2018 -> may2018 + - doctest 1.2.8 -> 1.2.9 + - entt 2.4.2-1 -> 2.5.0 + - exiv2 2018-04-25 -> 2018-05-17 + - fdk-aac 2018-03-07 -> 2018-05-17 + - forest 7.0.6 -> 7.0.7 + - gdal 2.2.2-1 -> 2.3.0-1 + - grpc 1.10.1-1 -> 1.10.1-2 + - jsonnet 2018-05-01 -> 2018-05-17 + - libuv 1.20.2 -> 1.20.3-2 + - libwebsockets 2.4.2 -> 3.0.0 + - lodepng 2018-02-25 -> 2018-05-17 + - mpg123 1.25.8-4 -> 1.25.8-5 + - ms-gsl 2018-05-01 -> 2018-05-17 + - mujs 2018-05-01 -> 2018-05-17 + - nuklear 2018-04-25 -> 2018-05-17 + - opus 1.2.1 -> 1.2.1-1 + - parson 2018-04-17 -> 2018-05-17 + - pmdk 1.4-1 -> 1.4-2 + - podofo 0.9.5-1 -> 0.9.5-2 + - re2 2018-05-01 -> 2018-05-17 + - rocksdb 5.12.4 -> 5.13.1 + - rs-core-lib 2018-05-01 -> 2018-05-17 + - sdl2-mixer 2.0.2-2 -> 2.0.2-4 + - thrift 2018-05-01 -> 2018-05-17 + - unicorn 2018-04-25 -> 2018-05-17 + - unicorn-lib 2018-05-01 -> 2018-05-17 + - uwebsockets 0.14.8-1 -> 0.14.8-2 + - wtl 10.0 -> 10.0-1 + - zeromq 2018-05-01 -> 2018-05-17 + * `vcpkg` no longer calls `powershell` from `cmake`. + - This completes the fix for the issue where `vcpkg.exe` would change the console's font when invoking `powershell`. + - `Powershell` is no longer called other than for bootstrap and powershell integration for tab-completion. + +-- vcpkg team <vcpkg@microsoft.com> SAT, 16 May 2018 19:30:00 -0800 + + +vcpkg (0.0.112) +-------------- + * Add ports: + - robin-map 0.2.0 + * Update ports: + - abseil 2018-04-25-1 -> 2018-05-01-1 + - ace 6.4.7 -> 6.4.8 + - aws-sdk-cpp 1.4.38 -> 1.4.40 + - azure-storage-cpp 3.2.1 -> 4.0.0 + - blosc 1.13.5 -> 1.13.5-1 + - boost-modular-build-helper 2018-04-16-4 -> 2018-05-14 + - brotli 1.0.2-2 -> 1.0.2-3 + - catch-classic 1.12.1 -> 1.12.2 + - folly 2018.04.23.00 -> 2018.05.14.00 + - jsonnet 2018-04-25 -> 2018-05-01 + - ms-gsl 2018-04-25 -> 2018-05-01 + - mujs 25821e6d74fab5fcc200fe5e818362e03e114428 -> 2018-05-01 + - openimageio 1.8.10 -> Release-1.9.2dev + - openvr 1.0.14 -> 1.0.15 + - protobuf 3.5.1-3 -> 3.5.1-4 + - re2 2018-03-17 -> 2018-05-01 + - rs-core-lib 2018-04-25 -> 2018-05-01 + - sol 2.20.0 -> 2.20.0-1 + - thrift 2018-04-25 -> 2018-05-01 + - unicorn-lib 2018-04-09 -> 2018-05-01 + - zeromq 2018-04-25 -> 2018-05-01 + * `vcpkg` no longer calls powershell for downloading/extracting and detecting Visual Studio. + - This also fixes an issue where `vcpkg.exe` would change the console's font when invoking `powershell`. + +-- vcpkg team <vcpkg@microsoft.com> WED, 16 May 2018 19:00:00 -0800 + + +vcpkg (0.0.111) +-------------- + * Add ports: + - cmark 0.28.3-1 + - inja 1.0.0 + - libgo 2.7 + - range-v3-vs2015 20151130-vcpkg5 + - restinio 0.4.5.1 + - treehopper 1.11.3-1 + - yajl 2.1.0-1 + - yato 1.0-1 + * Update ports: + - abseil 2018-04-12 -> 2018-04-25-1 + - alembic 1.7.7 -> 1.7.8 + - aws-sdk-cpp 1.4.33 -> 1.4.38 + - bigint 2010.04.30-1 -> 2010.04.30-2 + - box2d 2.3.1-374664b -> 2.3.1-374664b-1 + - brotli 1.0.2-1 -> 1.0.2-2 + - cgal 4.11.1 -> 4.12 + - corrade 2018.02-1 -> 2018.04-1 + - directxmesh feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 -> apr2018 + - directxtex feb2018b -> apr2018 + - directxtk feb2018 -> apr2018 + - discord-rpc 3.2.0 -> 3.3.0 + - exiv2 2018-04-12 -> 2018-04-25 + - exprtk 2018.01.01-f32d2b4 -> 2018.04.30-46877b6 + - folly 2018.04.16.00 -> 2018.04.23.00 + - freeglut 3.0.0-3 -> 3.0.0-4 + - gainput 1.0.0 -> 1.0.0-1 + - geos 3.6.2-2 -> 3.6.2-3 + - http-parser 2.7.1-2 -> 2.7.1-3 + - imgui 1.53 -> 1.60 + - ismrmrd 1.3.2-1 -> 1.3.2-2 + - jsonnet 2018-04-17 -> 2018-04-25 + - leveldb 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-1 -> 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-2 + - libflac 1.3.2-4 -> 1.3.2-5 + - libqrencode 4.0.0-1 -> 4.0.0-2 + - libuv 1.20.0 -> 1.20.2 + - libxmlpp 2.40.1-1 -> 2.40.1-2 + - llvm 6.0.0 -> 6.0.0-1 + - magnum 2018.02-2 -> 2018.04-1 + - magnum-extras 2018.02-2 -> 2018.04-1 + - magnum-integration 2018.02-1 -> 2018.04-1 + - magnum-plugins 2018.02-2 -> 2018.04-1 + - ms-gsl 2018-03-17 -> 2018-04-25 + - nuklear 2018-04-17 -> 2018-04-25 + - openal-soft 1.18.2-1 -> 1.18.2-2 + - physfs 2.0.3-2 -> 3.0.1 + - poco 1.8.1-1 -> 1.9.0 + - python3 3.6.4 -> 3.6.4-1 + - quirc 1.0-1 -> 1.0-2 + - range-v3 20151130-vcpkg5 -> 0.3.5 + - rapidjson 1.1.0 -> 1.1.0-1 + - realsense2 2.10.1-1 -> 2.10.4 + - rhash 1.3.5-1 -> 1.3.6 + - rocksdb 5.12.2 -> 5.12.4 + - rs-core-lib 2018-04-12 -> 2018-04-25 + - sciter 4.1.5 -> 4.1.7 + - sfml 2.4.2-2 -> 2.4.2-3 + - sobjectizer 5.5.21 -> 5.5.22 + - sol 2.19.5 -> 2.20.0 + - sqlite3 3.23.0 -> 3.23.1-1 + - strtk 2018.01.01-5579ed1 -> 2018.05.07-48c9554 + - thrift 2018-04-17 -> 2018-04-25 + - unicorn 2018-03-20 -> 2018-04-25 + - uwebsockets 0.14.7-1 -> 0.14.8-1 + - vlpp 0.9.3.1 -> 0.9.3.1-1 + - zeromq 2018-04-17 -> 2018-04-25 + - zstd 1.3.3 -> 1.3.4 + * Add clean patching for vcpkg_from_github() + - `vcpkg_from_github()` now takes a PATCHES argument (see the azure-storage-cpp [portfile](ports\azure-storage-cpp\portfile.cmake) as an example) + - A unique directory name is derived from the source hash and the patch hashes + - Modifying the patches would previously cause the new patches to fail to apply if sources with a previous version of the patches were present in the buildtrees. This is no longer the case. + * Fix various cross-platform issues + +-- vcpkg team <vcpkg@microsoft.com> FRI, 11 May 2018 21:45:00 -0800 + + +vcpkg (0.0.110) +-------------- + * `vcpkg` is now available for Linux and MacOS. More information [here](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/). + +-- vcpkg team <vcpkg@microsoft.com> TUE, 24 Apr 2018 10:30:00 -0800 + + vcpkg (0.0.109) -------------- * Add ports: @@ -1,35 +1,48 @@ # Vcpkg <a href="#"></a> ## Overview -Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are currently in a preview state; your involvement is vital to its success. +Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. This tool and ecosystem are currently in a preview state; your involvement is vital to its success! For short description of available commands, run `vcpkg help`. ## Quick Start Prerequisites: -- Windows 10, 8.1, or 7 -- Visual Studio 2017 or Visual Studio 2015 Update 3 +- Windows 10, 8.1, 7, Linux, or MacOS +- Visual Studio 2017 or Visual Studio 2015 Update 3 (on Windows) - Git - *Optional: CMake 3.10.2* -Clone this repository, then run +To get started: ``` -C:\src\vcpkg> .\bootstrap-vcpkg.bat +> git clone https://github.com/Microsoft/vcpkg +> cd vcpkg + +PS> .\bootstrap-vcpkg.bat +Ubuntu:~/$ ./bootstrap-vcpkg.sh ``` + Then, to hook up user-wide integration, run (note: requires admin on first use) ``` -C:\src\vcpkg> .\vcpkg integrate install +PS> .\vcpkg integrate install +Ubuntu:~/$ ./vcpkg integrate install ``` + Install any packages with ``` -C:\src\vcpkg> .\vcpkg install sdl2 curl +PS> .\vcpkg install sdl2 curl +Ubuntu:~/$ ./vcpkg install sdl2 curl ``` -Finally, create a New Project (or open an existing one) in Visual Studio 2017 or 2015. All installed libraries are immediately ready to be `#include`'d and used in your project. -For CMake projects, simply include our toolchain file. See our [using a package](docs/examples/using-sqlite.md) example for the specifics. +The best way to use installed libraries with CMake is via the toolchain file `scripts\buildsystems\vcpkg.cmake`. To use this file, you simply need to add it onto your CMake command line as `-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]\scripts\buildsystems\vcpkg.cmake`. + +In Visual Studio, you can create a New Project (or open an existing one). All installed libraries are immediately ready to be `#include`'d and used in your project without additional configuration. + +For more information, see our [using a package](docs/examples/using-sqlite.md) example for the specifics. + +Additional notes on macOS and Linux support can be found in the [official announcement](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/). ## Tab-Completion / Auto-Completion -`Vcpkg` supports auto-completion of commands, package names, options etc. To enable tab-completion in Powershell, use +`vcpkg` supports auto-completion of commands, package names, options etc. To enable tab-completion in Powershell, use ``` .\vcpkg integrate powershell ``` diff --git a/bootstrap-vcpkg.sh b/bootstrap-vcpkg.sh index 4bfb17308..a7643894c 100644..100755 --- a/bootstrap-vcpkg.sh +++ b/bootstrap-vcpkg.sh @@ -1,2 +1,4 @@ +#!/bin/sh + vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) -$vcpkgRootDir/scripts/bootstrap.sh
\ No newline at end of file +. "$vcpkgRootDir/scripts/bootstrap.sh" diff --git a/docs/about/faq.md b/docs/about/faq.md index b345b4fd0..87496da44 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -26,7 +26,7 @@ To see an example of this, look at [`ports\opengl\portfile.cmake`](https://githu We currently target Windows Desktop (x86 and x64) as well as the Universal Windows Platform (x86, x64, and ARM). See `vcpkg help triplet` for the current list. ## Does Vcpkg run on Linux/OSX? -No, for this preview we are focusing on Windows as a host platform. If you'd be interested in having Vcpkg run on Linux or OSX, please let us know in [this issue](https://github.com/microsoft/vcpkg/issues/57)! +Yes! We continously test on OSX and Ubuntu 16.04, however we know users have been successful with Arch, Fedora, and FreeBSD. If you have trouble with your favorite Linux distribution, let us know in an issue and we'd be happy to help! ## How do I use different versions of a library on one machine? Within a single instance of Vcpkg (e.g. one set of `installed\`, `packages\`, `ports\` and so forth), you can only have one version of a library installed (otherwise, the headers would conflict with each other!). For those with experience with system-wide package managers, packages in Vcpkg correspond to the `X-dev` or `X-devel` packages. diff --git a/docs/examples/using-sqlite.md b/docs/examples/using-sqlite.md index d12695bfb..35da141d0 100644 --- a/docs/examples/using-sqlite.md +++ b/docs/examples/using-sqlite.md @@ -71,7 +71,7 @@ See `.\vcpkg help triplet` for all supported targets. <a name="msbuild"></a> #### VS/MSBuild Project (User-wide integration) -The recommended and most productive way to use vcpkg is via user-wide integration, making the system available for all projects you build. The user-wide integration will prompt for administrator access the first time it is used on a given machine, but afterwords is no longer required and the integration is configured on a per-user basis. +The recommended and most productive way to use vcpkg is via user-wide integration, making the system available for all projects you build. The user-wide integration will prompt for administrator access the first time it is used on a given machine, but afterwards is no longer required and the integration is configured on a per-user basis. ```no-highlight PS D:\src\vcpkg> .\vcpkg integrate install Applied user-wide integration for this vcpkg root. diff --git a/docs/index.md b/docs/index.md index 3fa5784e9..c34715a27 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,7 +25,8 @@ Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are - [Export](specifications/export-command.md) ### Blog posts - +- [Announcing a single C++ library manager for Linux, macOS and Windows: Vcpkg](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/) +- [Vcpkg: Using multiple enlistments to handle multiple versions of a library](https://blogs.msdn.microsoft.com/vcblog/2017/10/23/vcpkg-using-multiple-enlistments/) - [Vcpkg: introducing the export command](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) - [Binary Compatibility and Pain-free Upgrade Why Moving to Visual Studio 2017 is almost "too easy"](https://blogs.msdn.microsoft.com/vcblog/2017/03/07/binary-compatibility-and-pain-free-upgrade-why-moving-to-visual-studio-2017-is-almost-too-easy/) - [Vcpkg recent enhancements](https://blogs.msdn.microsoft.com/vcblog/2017/02/14/vcpkg-recent-enhancements/) diff --git a/docs/maintainers/vcpkg_build_cmake.md b/docs/maintainers/vcpkg_build_cmake.md index ddfa46f6b..1e17eb975 100644 --- a/docs/maintainers/vcpkg_build_cmake.md +++ b/docs/maintainers/vcpkg_build_cmake.md @@ -15,6 +15,9 @@ The underlying buildsystem will be instructed to not parallelize The target passed to the cmake build command (`cmake --build . --target <target>`). If not specified, no target will be passed. +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + ## Notes: This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the diff --git a/docs/maintainers/vcpkg_find_acquire_program.md b/docs/maintainers/vcpkg_find_acquire_program.md index 8107c8dd2..57a2bf75a 100644 --- a/docs/maintainers/vcpkg_find_acquire_program.md +++ b/docs/maintainers/vcpkg_find_acquire_program.md @@ -25,6 +25,7 @@ The current list of programs includes: - NASM - NINJA - YASM +- ARIA2 (Downloader) Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). diff --git a/docs/users/triplets.md b/docs/users/triplets.md index eb83aeb10..911ab5469 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -35,6 +35,9 @@ Specifies the C/C++ compiler toolchain to use. This can be set to `v141`, `v140`, or left blank. If left blank, we select the latest compiler toolset available on your machine. +Visual Studio 2015 platform toolset is `v140` +Visual Studio 2017 platform toolset is `v141` + ## Per-port customization The CMake Macro `PORT` will be set when interpreting the triplet file and can be used to change settings (such as `VCPKG_LIBRARY_LINKAGE`) on a per-port basis. diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt index ced5b14ca..fabe1516c 100644 --- a/ports/abseil/CMakeLists.txt +++ b/ports/abseil/CMakeLists.txt @@ -16,7 +16,7 @@ endif() function(add_sublibrary LIB) file(GLOB_RECURSE SOURCES "absl/${LIB}/*.cc") - list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$") + list(FILTER SOURCES EXCLUDE REGEX "_test(ing)?(_.+)?.cc$|_nonprod.cc$|test_util.cc$") file(GLOB HEADERS "absl/${LIB}/*.h" "absl/${LIB}/*.inc") file(GLOB INTERNAL_HEADERS "absl/${LIB}/internal/*.h") @@ -75,6 +75,7 @@ add_sublibrary(utility) target_link_public_libraries(algorithm base meta) target_link_public_libraries(container algorithm base memory) +target_link_public_libraries(debugging base) target_link_public_libraries(memory meta) target_link_public_libraries(meta base) target_link_public_libraries(numeric base) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index b1a1def7f..0b46aff1e 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil
-Version: 2018-04-12 +Version: 2018-05-01-1
Description: an open-source collection designed to augment the C++ standard library.
Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.
In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.
diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 71d26de69..46a31b2e4 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -7,8 +7,8 @@ endif() vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO abseil/abseil-cpp
- REF a7e522daf1ec9cda69b356472f662142dd0c1215 - SHA512 250b602fc3f5a4c3b6522ef0f49bdf63db0070289cb415cb31bb672b95b35dc9494f881adeb1b090927b1cd942c3674b6142747f601c8f7233bd12d4078583f3
+ REF 9613678332c976568272c8f4a78631a29159271d + SHA512 a3694d4c74f542f7a55872707548469e1bdc6dcd05d40ffd62de41d7440dc1fb98d260f690a6799ad39142e35226b04aacc6122aa1edf104fc9d396997995a8c
HEAD_REF master
)
diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index 9baa763dc..4dc7311b2 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.4.7 +Version: 6.4.8 Description: The ADAPTIVE Communication Environment diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index 25eeabb0b..5f8f178e5 100644 --- a/ports/ace/portfile.cmake +++ b/ports/ace/portfile.cmake @@ -9,9 +9,9 @@ endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ACE_wrappers/ace) vcpkg_download_distfile(ARCHIVE - URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.7.zip" - FILENAME "ACE-6.4.7.zip" - SHA512 931c7e5902f3999ed05c13f9d2c53a605e9b59b4ce78f33b42238ac25286aa13fb510e2f780b6aea9505d03edf834109ab4481870327fec1b5bb11d29cfbafdc + URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.8.zip" + FILENAME "ACE-6.4.8.zip" + SHA512 a46e7d03bf9d8a76905c91e416749b092016210bd93308bdee0ca8740f7f3ac7c4b4d5688929729fa277c02019710c7e288f5f5f9ee187a0ec176d9ebbb90f96 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/alembic/CONTROL b/ports/alembic/CONTROL index 4e24aab9b..9a43a7b00 100644 --- a/ports/alembic/CONTROL +++ b/ports/alembic/CONTROL @@ -1,4 +1,4 @@ Source: alembic -Version: 1.7.7 +Version: 1.7.8 Build-Depends: ilmbase, hdf5 Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications. http://alembic.io/ diff --git a/ports/alembic/portfile.cmake b/ports/alembic/portfile.cmake index a44771ab2..d9720a178 100644 --- a/ports/alembic/portfile.cmake +++ b/ports/alembic/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO alembic/alembic - REF 1.7.7 - SHA512 0ebcf6b9304e84bc60f1c146d0b5e5c5b1de43974ec0725293c444b48b22640945f5883eb9afd46c1ac9f0c260d6f22ff29b4866d6525c416339877be984b149 + REF 1.7.8 + SHA512 bc36e30d1aecd67da16247365a973c462e9716309d090fefe36f625c8d2ab2d517fe8ac694a9188cd6eeb623a3217f59f461c82fcfec43d0a60a07381526983a HEAD_REF master ) diff --git a/ports/args/CONTROL b/ports/args/CONTROL index ee2a6a09a..83205335a 100644 --- a/ports/args/CONTROL +++ b/ports/args/CONTROL @@ -1,3 +1,3 @@ Source: args -Version: 2018-02-23 +Version: 2018-05-17 Description: A simple header-only C++ argument parser library. diff --git a/ports/args/portfile.cmake b/ports/args/portfile.cmake index 29d76b81f..215f1ce92 100644 --- a/ports/args/portfile.cmake +++ b/ports/args/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Taywee/args - REF 7bf17000aa0969b8ca3178c72ec834b105944a41 - SHA512 38f038f2ea3cdbf62678112a28f6b9a2b46b7b291ec9a7c78393c28b1169dc393a086393f24534804188d434583896d9eaedca964c00a2db032fb337ebc9c214 + REF bd0429e91f5bb140271870d5421e412bf78b9f31 + SHA512 585314e572b97d9b1689f71617f33562da46652141f094a3845eeace7acedc8560e010e5b7fb7afa4ff2dc37a62724445f5c8650c0c6270d42c4b5fd271a5e76 HEAD_REF master ) diff --git a/ports/aws-sdk-cpp/CONTROL b/ports/aws-sdk-cpp/CONTROL index fbc86b58f..d91cf33c7 100644 --- a/ports/aws-sdk-cpp/CONTROL +++ b/ports/aws-sdk-cpp/CONTROL @@ -1,5 +1,5 @@ Source: aws-sdk-cpp -Version: 1.4.33 +Version: 1.4.52 Description: AWS SDK for C++ Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows) Default-Features: dynamodb, ec2, kms, rds, s3, sns, sqs diff --git a/ports/aws-sdk-cpp/portfile.cmake b/ports/aws-sdk-cpp/portfile.cmake index 815926ddd..1d566339e 100644 --- a/ports/aws-sdk-cpp/portfile.cmake +++ b/ports/aws-sdk-cpp/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO aws/aws-sdk-cpp - REF 1.4.33 - SHA512 ebe8e402107b7b70a9b397c94ad981ff02d97e10e6fd8337f19b732185ecbb79e132eecd513300ce733a765fd780dd765c1d2b34479e5e1d891fa771722bad81 + REF 1.4.52 + SHA512 ef10a2d9d491ae28179ec7622b34470153cf3a6fdf50ca8f942c098d74a12a9e555c314537c91e06285990fe942bee9e4ff21396752153d482e9db1776981d6b HEAD_REF master ) diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index c68552bba..eec7c8fcd 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.2.1 -Build-Depends: cpprestsdk, atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), glibmm (!windows&!uwp), libxmlpp (!windows&!uwp), libuuid (!windows&!uwp) +Version: 4.0.0 +Build-Depends: cpprestsdk, atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp) Description: Microsoft Azure Storage Client SDK for C++ A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. Microsoft Azure Storage team's blog - http://blogs.msdn.com/b/windowsazurestorage/ diff --git a/ports/azure-storage-cpp/cmake.patch b/ports/azure-storage-cpp/cmake.patch index 96fdace2d..04f6b5ade 100644 --- a/ports/azure-storage-cpp/cmake.patch +++ b/ports/azure-storage-cpp/cmake.patch @@ -1,8 +1,32 @@ diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 07878c2..8d1c47e 100644 +index a23b93f..e471b86 100644 --- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -51,20 +51,25 @@ if(UNIX) +@@ -1,5 +1,5 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 0) +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.8) + project(azurestorage) + + enable_testing() +@@ -21,8 +21,6 @@ if(UNIX) + + # Prefer the latest (make the latest one first) + list(REVERSE OPENSSL_ROOT_DIR) +- +- + if(NOT GETTEXT_LIB_DIR) + message(WARNING "No GETTEXT_LIB_DIR specified, assuming: /usr/local/opt/gettext/lib") + set(GETTEXT_LIB_DIR "/usr/local/opt/gettext/lib") +@@ -40,6 +38,7 @@ if(UNIX) + find_package(OpenSSL 1.0.0 REQUIRED) + + ++ + find_package(UUID REQUIRED) + find_package(Casablanca REQUIRED) + find_package(LibXML2 REQUIRED) +@@ -48,20 +47,25 @@ if(UNIX) find_package(UnitTest++ REQUIRED) endif() @@ -36,7 +60,7 @@ index 07878c2..8d1c47e 100644 message("-- Setting gcc options") set(WARNINGS "-Wall -Wextra -Wunused-parameter -Wcast-align -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-format-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls -Wunreachable-code") -@@ -81,22 +86,29 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") +@@ -78,22 +82,31 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") add_definitions(-DBOOST_LOG_DYN_LINK) endif() add_definitions(-D_TURN_OFF_PLATFORM_STRING) @@ -75,23 +99,39 @@ index 07878c2..8d1c47e 100644 + add_compile_options(/MP) + if(BUILD_SHARED_LIBS) + add_definitions(-DWASTORAGE_DLL -D_USRDLL) ++ else() ++ add_definitions(-D_NO_WASTORAGE_API) + endif() else() message("-- Unknown compiler, success is doubtful.") endif() -@@ -109,7 +121,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) +@@ -106,7 +119,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/Binaries) set(AZURESTORAGE_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/includes) - set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${LibXML++_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${Glibmm_INCLUDE_DIRS}) + set(AZURESTORAGE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/includes ${CASABLANCA_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS} ${LibXML2_INCLUDE_DIR}) - set(AZURESTORAGE_LIBRARY azurestorage) - set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARIES} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${LibXML++_LIBRARIES} ${UUID_LIBRARIES} ${Glibmm_LIBRARIES}) + set(AZURESTORAGE_LIBRARIES ${AZURESTORAGE_LIBRARY} ${CASABLANCA_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK} ${OPENSSL_LIBRARIES} ${UUID_LIBRARIES} ${LibXML2_LIBRARIES}) diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -index 5c1df3c..da66eb4 100644 +index 5c1df3c..40e1767 100644 --- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake +++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -@@ -27,6 +27,7 @@ find_path(CASABLANCA_INCLUDE_DIR +@@ -23,10 +23,21 @@ find_path(CASABLANCA_INCLUDE_DIR + include + ) + ++find_package(cpprestsdk) ++ ++if(cpprestsdk_FOUND) ++ set(CASABLANCA_LIBRARY cpprestsdk::cpprest) ++ set(CASABLANCA_PROCESS_LIBS CASABLANCA_LIBRARY) ++ set(CASABLANCA_PROCESS_INCLUDES CASABLANCA_INCLUDE_DIR) ++ libfind_process(CASABLANCA) ++ return() ++endif() ++ + # Library find_library(CASABLANCA_LIBRARY NAMES cpprest @@ -100,7 +140,7 @@ index 5c1df3c..da66eb4 100644 ${CASABLANCA_PKGCONF_LIBRARY_DIRS} ${CASABLANCA_DIR} diff --git a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt -index b08111f..74ba2fb 100644 +index 59fedac..3737eeb 100644 --- a/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt +++ b/Microsoft.WindowsAzure.Storage/src/CMakeLists.txt @@ -2,7 +2,7 @@ include_directories(${Boost_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR}) @@ -110,9 +150,9 @@ index b08111f..74ba2fb 100644 -if(UNIX) +if(UNIX OR WIN32) set(SOURCES + xml_wrapper.cpp xmlhelpers.cpp - response_parsers.cpp -@@ -64,24 +64,46 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") +@@ -65,24 +65,46 @@ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage") endif() if (APPLE) @@ -139,7 +179,7 @@ index b08111f..74ba2fb 100644 target_link_libraries(${AZURESTORAGE_LIBRARIES}) +if(WIN32) -+ target_link_libraries(${AZURESTORAGE_LIBRARY} Ws2_32.lib rpcrt4.lib xmllite.lib bcrypt.lib) ++ target_link_libraries(${AZURESTORAGE_LIBRARY} Ws2_32.lib rpcrt4.lib xmllite.lib bcrypt.lib) +endif() # Portions specific to azure storage binary versioning and installation. diff --git a/ports/azure-storage-cpp/glibmm-cmake.patch b/ports/azure-storage-cpp/glibmm-cmake.patch deleted file mode 100644 index 4d3e4a8cd..000000000 --- a/ports/azure-storage-cpp/glibmm-cmake.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake
-index 79a4bcb..fe130bd 100644
---- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake
-+++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindGlibmm.cmake
-@@ -36,7 +36,7 @@ find_path(GlibmmConfig_INCLUDE_DIR
- )
-
- find_library(Glibmm_LIBRARY
-- NAMES glibmm-2.4
-+ NAMES glibmm glibmm-2.4
- PATHS
- ${Glibmm_PKGCONF_LIBRARY_DIRS}
- /usr
diff --git a/ports/azure-storage-cpp/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index 2f8e921a5..99c388208 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -7,18 +7,11 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-storage-cpp - REF v3.2.1 - SHA512 8d1e8de439e52f53eb28b77e8adf394468f4861c2c4c1f79ec1437c72e3fc0bc871e4e2662ee58090748915b0f12ce6736a7cc6ede619d332686b9fb6a026c9f + REF v4.0.0 + SHA512 5ca264e014685852eb52b5b732d352e3eaaca3358d4bdf78ac2a571fd3b18f2d967583ce4ec64105fb87f0ef182a84671248f3f6a62c4886ff05dfa10c773605 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch - ${CMAKE_CURRENT_LIST_DIR}/static-builds.patch - ${CMAKE_CURRENT_LIST_DIR}/support-cpprest-findpackage.patch - ${CMAKE_CURRENT_LIST_DIR}/glibmm-cmake.patch ${CMAKE_CURRENT_LIST_DIR}/pplx-do-while.patch ) @@ -35,7 +28,7 @@ vcpkg_install_cmake() file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure-storage-cpp RENAME copyright) -file(REMOVE_RECURSE +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_copy_pdbs() diff --git a/ports/azure-storage-cpp/static-builds.patch b/ports/azure-storage-cpp/static-builds.patch deleted file mode 100644 index 09b2f1077..000000000 --- a/ports/azure-storage-cpp/static-builds.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 8d1c47e..3b4d1c0 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -108,6 +108,8 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - add_compile_options(/MP) - if(BUILD_SHARED_LIBS) - add_definitions(-DWASTORAGE_DLL -D_USRDLL) -+ else() -+ add_definitions(-D_NO_WASTORAGE_API) - endif() - else() - message("-- Unknown compiler, success is doubtful.") diff --git a/ports/azure-storage-cpp/support-cpprest-findpackage.patch b/ports/azure-storage-cpp/support-cpprest-findpackage.patch deleted file mode 100644 index 5cd805208..000000000 --- a/ports/azure-storage-cpp/support-cpprest-findpackage.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/Microsoft.WindowsAzure.Storage/CMakeLists.txt b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -index 3b4d1c0..d8818ac 100644 ---- a/Microsoft.WindowsAzure.Storage/CMakeLists.txt -+++ b/Microsoft.WindowsAzure.Storage/CMakeLists.txt -@@ -1,5 +1,5 @@ - set(CMAKE_LEGACY_CYGWIN_WIN32 0) --cmake_minimum_required(VERSION 2.6) -+cmake_minimum_required(VERSION 3.8) - project(azurestorage) - - enable_testing() -diff --git a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -index da66eb4..40e1767 100644 ---- a/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -+++ b/Microsoft.WindowsAzure.Storage/cmake/Modules/FindCasablanca.cmake -@@ -23,6 +23,16 @@ find_path(CASABLANCA_INCLUDE_DIR - include - ) - -+find_package(cpprestsdk) -+ -+if(cpprestsdk_FOUND) -+ set(CASABLANCA_LIBRARY cpprestsdk::cpprest) -+ set(CASABLANCA_PROCESS_LIBS CASABLANCA_LIBRARY) -+ set(CASABLANCA_PROCESS_INCLUDES CASABLANCA_INCLUDE_DIR) -+ libfind_process(CASABLANCA) -+ return() -+endif() -+ - # Library - find_library(CASABLANCA_LIBRARY - NAMES diff --git a/ports/bigint/CMakeLists.txt b/ports/bigint/CMakeLists.txt index cb62597ef..e4cccbe12 100644 --- a/ports/bigint/CMakeLists.txt +++ b/ports/bigint/CMakeLists.txt @@ -13,7 +13,7 @@ set( BigInteger.cc BigIntegerAlgorithms.cc BigUnsignedInABase.cc - BigIntegerUtils.cc + BigIntegerUtils.cc ) set( @@ -24,6 +24,7 @@ set( BigIntegerAlgorithms.hh BigUnsignedInABase.hh BigIntegerLibrary.hh + BigIntegerUtils.hh ) add_library(bigint ${bigint_srcs}) diff --git a/ports/bigint/CONTROL b/ports/bigint/CONTROL index 4079363f1..5247cbf81 100644 --- a/ports/bigint/CONTROL +++ b/ports/bigint/CONTROL @@ -1,3 +1,3 @@ Source: bigint -Version: 2010.04.30-1 +Version: 2010.04.30-2 Description: C++ Big Integer Library diff --git a/ports/blosc/CONTROL b/ports/blosc/CONTROL index d6ec941e1..1a2378aed 100644 --- a/ports/blosc/CONTROL +++ b/ports/blosc/CONTROL @@ -1,4 +1,4 @@ Source: blosc -Version: 1.13.5 +Version: 1.13.5-1 Build-Depends: lz4, snappy, zlib, zstd Description: A blocking, shuffling and loss-less compression library that can be faster than `memcpy()` diff --git a/ports/blosc/portfile.cmake b/ports/blosc/portfile.cmake index d2107b106..33d6f729a 100644 --- a/ports/blosc/portfile.cmake +++ b/ports/blosc/portfile.cmake @@ -16,6 +16,8 @@ else() set(BLOSC_SHARED ON) endif() +file(REMOVE_RECURSE ${SOURCE_PATH}/internal-complibs) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS -DPREFER_EXTERNAL_LZ4=ON diff --git a/ports/boost-hana-msvc/CONTROL b/ports/boost-hana-msvc/CONTROL new file mode 100644 index 000000000..0d2f178f8 --- /dev/null +++ b/ports/boost-hana-msvc/CONTROL @@ -0,0 +1,4 @@ +Source: boost-hana-msvc
+Version: 1.67.0-1
+Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers
+Description: Boost hana module
diff --git a/ports/boost-hana-msvc/portfile.cmake b/ports/boost-hana-msvc/portfile.cmake new file mode 100644 index 000000000..c56926499 --- /dev/null +++ b/ports/boost-hana-msvc/portfile.cmake @@ -0,0 +1,12 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO xiangfan-ms/hana
+ REF caa985795ab6c4b2c7bcf1458ccbb6ded65c15cb
+ SHA512 7ed65bda17042c42f7a76d88e66df61155800066119f6b256e20cf04dcd18d46584d3e44ad6555e9a17d9c0bf85fbf173ae6079f5a4a878341f959c855ebee6b
+ HEAD_REF master
+)
+
+include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
+boost_modular_headers(SOURCE_PATH ${SOURCE_PATH})
diff --git a/ports/boost-hana/CONTROL b/ports/boost-hana/CONTROL index 0cdc62ad6..a64771061 100644 --- a/ports/boost-hana/CONTROL +++ b/ports/boost-hana/CONTROL @@ -1,5 +1,5 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
+# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 but has edits
Source: boost-hana
-Version: 1.67.0
-Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers
+Version: 1.67.0-1
+Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers, boost-hana-msvc (windows), boost-hana-msvc (uwp)
Description: Boost hana module
diff --git a/ports/boost-hana/portfile.cmake b/ports/boost-hana/portfile.cmake index 5a48a4e9e..ef2bc9bb3 100644 --- a/ports/boost-hana/portfile.cmake +++ b/ports/boost-hana/portfile.cmake @@ -1,7 +1,12 @@ -# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
+# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 but has edits
include(vcpkg_common_functions)
+if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME)
+ message("The current MSVC releases can't compile boost hana yet.")
+ message("Use a fork from boost 1.67 which has source workarounds instead.")
+ set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+else()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO boostorg/hana
@@ -12,3 +17,4 @@ vcpkg_from_github( include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)
boost_modular_headers(SOURCE_PATH ${SOURCE_PATH})
+endif()
diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt index f75a6ee66..dc4d13dd1 100644 --- a/ports/boost-modular-build-helper/CMakeLists.txt +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -28,8 +28,10 @@ else() list(APPEND B2_OPTIONS link=static)
endif()
-if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND B2_OPTIONS address-model=64)
+else()
+ list(APPEND B2_OPTIONS address-model=32)
endif()
if(APPLE)
diff --git a/ports/boost-modular-build-helper/CONTROL b/ports/boost-modular-build-helper/CONTROL index 7324d6ba0..0ee783390 100644 --- a/ports/boost-modular-build-helper/CONTROL +++ b/ports/boost-modular-build-helper/CONTROL @@ -1,2 +1,2 @@ Source: boost-modular-build-helper
-Version: 2018-04-16-4
+Version: 2018-05-14
diff --git a/ports/box2d/CMakeLists.txt b/ports/box2d/CMakeLists.txt new file mode 100644 index 000000000..951554266 --- /dev/null +++ b/ports/box2d/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.9)
+project(Box2d CXX)
+
+file(GLOB_RECURSE SOURCES Box2D/Box2D/*.cpp)
+
+add_library(Box2D ${SOURCES})
+target_include_directories(Box2D PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Box2D> $<INSTALL_INTERFACE:include>)
+
+install(TARGETS Box2D
+ EXPORT unofficial-box2d-targets
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+)
+
+install(
+ EXPORT unofficial-box2d-targets
+ FILE unofficial-box2d-config.cmake
+ NAMESPACE unofficial::box2d::
+ DESTINATION share/unofficial-box2d
+)
diff --git a/ports/box2d/CONTROL b/ports/box2d/CONTROL index 7cfcb01a0..220a5a058 100644 --- a/ports/box2d/CONTROL +++ b/ports/box2d/CONTROL @@ -1,3 +1,3 @@ Source: box2d -Version: 2.3.1-374664b +Version: 2.3.1-374664b-1 Description: Box2D (http://box2d.org) is an open source C++ engine for simulating rigid bodies in 2D. diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index 87aaefc74..c35f37444 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -1,17 +1,8 @@ - -# Get output directory -set(PROJECT_ARCH_BITS "x64") -if(TRIPLET_SYSTEM_ARCH MATCHES "x86") - set(PROJECT_ARCH_BITS "x32") -elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR "ARM not supported") -endif(TRIPLET_SYSTEM_ARCH MATCHES "x86") - - include(vcpkg_common_functions) -if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("Box2D only supports building as a static library") + set(VCPKG_LIBRARY_LINKAGE "static") endif() vcpkg_from_github( @@ -22,54 +13,23 @@ vcpkg_from_github( HEAD_REF master ) -if(VCPKG_CRT_LINKAGE STREQUAL "static") - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/use-static-linkage.patch - ) -endif() - -# Put the licence and readme files where vcpkg expects it -message(STATUS "Packaging license") -file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) -file(COPY ${SOURCE_PATH}/Box2D/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/box2d/License.txt ${CURRENT_PACKAGES_DIR}/share/box2d/copyright) -message(STATUS "Packaging license done") - -# Building: -set(OUTPUTS_PATH "${SOURCE_PATH}/Box2D/Build/vs2015/bin/${PROJECT_ARCH_BITS}") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -vcpkg_build_msbuild(PROJECT_PATH ${SOURCE_PATH}/Box2D/Build/vs2015/Box2D.vcxproj) - -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib") - file( - INSTALL ${OUTPUTS_PATH}/Release/ - DESTINATION ${CURRENT_PACKAGES_DIR}/lib - FILES_MATCHING PATTERN "*.lib" - ) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/lib/box2d.lib) - message(STATUS "Packaging ${TARGET_TRIPLET}-Release lib done") -endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib") - file( - INSTALL ${OUTPUTS_PATH}/Debug/ - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib - FILES_MATCHING PATTERN "*.lib" - ) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Box2D.lib ${CURRENT_PACKAGES_DIR}/debug/lib/box2d.lib) - message(STATUS "Packaging ${TARGET_TRIPLET}-Debug lib done") -endif() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-box2d TARGET_PATH share/unofficial-box2d) -message(STATUS "Packaging headers") file( COPY ${SOURCE_PATH}/Box2D/Box2D DESTINATION ${CURRENT_PACKAGES_DIR}/include - PATTERN "*.h" + FILES_MATCHING PATTERN "*.h" ) -message(STATUS "Packaging headers done") vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/Box2D/License.txt ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/box2d) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/box2d/License.txt ${CURRENT_PACKAGES_DIR}/share/box2d/copyright) diff --git a/ports/box2d/use-static-linkage.patch b/ports/box2d/use-static-linkage.patch deleted file mode 100644 index 4c3fccd53..000000000 --- a/ports/box2d/use-static-linkage.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/Box2D/Build/vs2015/Box2D.vcxproj b/Box2D/Build/vs2015/Box2D.vcxproj -index 830803c..5dda519 100644 ---- a/Box2D/Build/vs2015/Box2D.vcxproj -+++ b/Box2D/Build/vs2015/Box2D.vcxproj -@@ -86,7 +86,7 @@ - <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> -- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> -+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> -@@ -115,7 +115,7 @@ - <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>true</MinimalRebuild> - <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> -- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> -+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> -@@ -145,7 +145,7 @@ - <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>false</MinimalRebuild> - <StringPooling>true</StringPooling> -- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> -+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> -@@ -176,7 +176,7 @@ - <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <MinimalRebuild>false</MinimalRebuild> - <StringPooling>true</StringPooling> -- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> -+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary> - <FunctionLevelLinking>true</FunctionLevelLinking> - <PrecompiledHeader> - </PrecompiledHeader> diff --git a/ports/brotli/CONTROL b/ports/brotli/CONTROL index 0c4d7eb0c..512faf203 100644 --- a/ports/brotli/CONTROL +++ b/ports/brotli/CONTROL @@ -1,3 +1,3 @@ Source: brotli
-Version: 1.0.2-1
+Version: 1.0.2-3
Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling.
diff --git a/ports/brotli/portfile.cmake b/ports/brotli/portfile.cmake index b4e33086e..64f1485a6 100644 --- a/ports/brotli/portfile.cmake +++ b/ports/brotli/portfile.cmake @@ -17,8 +17,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/brotli) -file(RENAME ${CURRENT_PACKAGES_DIR}/bin/brotli.exe ${CURRENT_PACKAGES_DIR}/tools/brotli/brotli.exe) -file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/brotli.exe) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/brotli ${CURRENT_PACKAGES_DIR}/bin/brotli.exe) +file(GLOB DEBUG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/brotli ${CURRENT_PACKAGES_DIR}/debug/bin/brotli.exe) +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/brotli) +file(REMOVE ${EXES} ${DEBUG_EXES}) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/brotli) @@ -26,8 +28,14 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") file(GLOB STATIC_LIBS "${CURRENT_PACKAGES_DIR}/lib/*-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*-static.lib") file(REMOVE ${STATIC_LIBS}) else() - file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/lib/*.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib") + file(GLOB LIBS + "${CURRENT_PACKAGES_DIR}/lib/*.lib" + "${CURRENT_PACKAGES_DIR}/debug/lib/*.lib" + "${CURRENT_PACKAGES_DIR}/lib/*.a" + "${CURRENT_PACKAGES_DIR}/debug/lib/*.a" + ) list(FILTER LIBS EXCLUDE REGEX "-static\\.lib\$") + list(FILTER LIBS EXCLUDE REGEX "-static\\.a\$") file(REMOVE_RECURSE ${LIBS} ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) endif() diff --git a/ports/catch-classic/CONTROL b/ports/catch-classic/CONTROL index 93650d2e6..af4d6a737 100644 --- a/ports/catch-classic/CONTROL +++ b/ports/catch-classic/CONTROL @@ -1,5 +1,5 @@ Source: catch-classic -Version: 1.12.1 +Version: 1.12.2 Description: A modern, header-only test framework for unit tests This is specifically the legacy 1.x branch provided for compatibility with older compilers. diff --git a/ports/catch-classic/portfile.cmake b/ports/catch-classic/portfile.cmake index 85460bbab..47f8ef16b 100644 --- a/ports/catch-classic/portfile.cmake +++ b/ports/catch-classic/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v1.12.1) +set(CATCH_VERSION v1.12.2) vcpkg_download_distfile(HEADER URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" FILENAME "catch-classic-${CATCH_VERSION}.hpp" - SHA512 2029065d979690a6b76318e1527fc770e062a3d3411f9354f03063263f01bd3a249c8e86a57eb0e07d66cd068f7cded7d369a53997c2b762eb5fdc2668e30152 + SHA512 d2cf8b2fe95aae061a7771a0e1b7135583595d1f36dfc8d5e4d10e101ab58f6fac9d260f77c5760906c24aa402d7433aa82b5d6a0ca6b3ad91092dc5cc2d9c22 ) vcpkg_download_distfile(LICENSE diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 7267be402..98621116b 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -1,9 +1,9 @@ set(MSVC_USE_STATIC_CRT_VALUE OFF) if(VCPKG_CRT_LINKAGE STREQUAL "static") - if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage") - endif() - set(MSVC_USE_STATIC_CRT_VALUE ON) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage") + endif() + set(MSVC_USE_STATIC_CRT_VALUE ON) endif() include(vcpkg_common_functions) @@ -16,9 +16,6 @@ vcpkg_from_github( HEAD_REF master ) -# Ninja crash compiler with error: -# "fatal error C1001: An internal error has occurred in the compiler. (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 255)" - set(SUITESPARSE OFF) if("suitesparse" IN_LIST FEATURES) set(SUITESPARSE ON) @@ -62,7 +59,13 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") + +if(WIN32) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib${LIB_SUFFIX}/cmake/Ceres") +endif() + vcpkg_copy_pdbs() # Changes target search path diff --git a/ports/cgal/CONTROL b/ports/cgal/CONTROL index 753e30a20..b81d27c96 100644 --- a/ports/cgal/CONTROL +++ b/ports/cgal/CONTROL @@ -1,4 +1,4 @@ Source: cgal -Version: 4.11.1 +Version: 4.12 Build-Depends: mpfr, mpir, zlib, qt5, boost-format, boost-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake index 4dbe9fd53..3eb0a9de7 100644 --- a/ports/cgal/portfile.cmake +++ b/ports/cgal/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CGAL/cgal - REF 27859944b4d96797030fc018892d5123b7cba0b2 - SHA512 020d4398fcae0607cd3fe1bd22a190fbe1d45cba0c7e3c95d6d3dfb6d23c43949a1608069972e511f5d47fc787c350c0a0a0085faa2f4b9fd26ce101376752c6 + REF f7c3c8212b56c0d6dae63787efc99093f4383415 + SHA512 fc40483b5f0e2071c3458cbd67ee7e503f68b7f6a1bbb525b6003d1a440e662cb85c257167ce6d55a73e0cc49b27a7d2b56dcf6b5eeddc78772567fdc48ba160 HEAD_REF master ) diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index 6c7db9e54..2b8dc8a5a 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.8.3 +Version: 1.8.4 Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index 0f3874119..5492d5039 100644 --- a/ports/chakracore/portfile.cmake +++ b/ports/chakracore/portfile.cmake @@ -15,8 +15,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/ChakraCore - REF v1.8.3 - SHA512 4a5d6372cab51bb70911519fb9639d0cb6c456a966e2c90992f924ba36dcf741e32dbf18aea4419dc855f286da7e3edbfcc796bc90347858192c976298315785 + REF v1.8.4 + SHA512 54f0ec00656d26c3cb3c034c0d1f0c927b67ce083cca6d2ced1f936e31a0987d0e4000dfb2419ffa6a21a15fa87b03a9214e92e8694158fc1e3715a095f08e19 HEAD_REF master ) diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL index 694db4b5d..1aee8a425 100644 --- a/ports/cimg/CONTROL +++ b/ports/cimg/CONTROL @@ -1,3 +1,3 @@ Source: cimg -Version: 2.2.2 +Version: 2.2.3 Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/ports/cimg/portfile.cmake b/ports/cimg/portfile.cmake index b7607bff2..1023eec26 100644 --- a/ports/cimg/portfile.cmake +++ b/ports/cimg/portfile.cmake @@ -2,9 +2,9 @@ include(vcpkg_common_functions) vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH REPO "dtschump/CImg" - REF v.2.2.2 + REF v.2.2.3 HEAD_REF master - SHA512 b3090e594accc31222e24e787381af315b5168dad4ea9669cc543ad6807c175dd60b9eddceda1c74a7bb716912650219763077b3eaee6fae79cfec1099c65836) + SHA512 0c92b4162e9259e447f9d1e777cc18b9df57cde77159681cdc8e15843f3c149fbf9ac7a420d63642d2a3aefb36bdb1740ef53d587a0983c32748f317605c16e0) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/clblas/portfile.cmake b/ports/clblas/portfile.cmake index b18377cdf..9088fc2e9 100644 --- a/ports/clblas/portfile.cmake +++ b/ports/clblas/portfile.cmake @@ -9,7 +9,7 @@ vcpkg_from_github( ) # v2.12 has a very old FindOpenCL.cmake using OPENCL_ vs. OpenCL_ var names -# conflicting with the built-in, more modern FindOpenCL.cmake +# conflicting with the built-in, more modern FindOpenCL.cmake file( REMOVE ${SOURCE_PATH}/src/FindOpenCL.cmake ) @@ -32,7 +32,9 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() - +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL @@ -43,6 +45,7 @@ file(INSTALL ) file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/clBLAS-tune.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/clBLAS-tune.exe ${CURRENT_PACKAGES_DIR}/bin/clBLAS-tune.exe ${CURRENT_PACKAGES_DIR}/debug/bin/concrt140d.dll diff --git a/ports/cmark/CONTROL b/ports/cmark/CONTROL new file mode 100644 index 000000000..4211c9bbc --- /dev/null +++ b/ports/cmark/CONTROL @@ -0,0 +1,3 @@ +Source: cmark +Version: 0.28.3-1 +Description: CommonMark parsing and rendering library diff --git a/ports/cmark/portfile.cmake b/ports/cmark/portfile.cmake new file mode 100644 index 000000000..b452a4488 --- /dev/null +++ b/ports/cmark/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Note: fails due to missing cmark_export.h -- fix should be to always generate the correct export header. + message(FATAL_ERROR "cmark does not currently support static library linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO commonmark/cmark + REF 0.28.3 + SHA512 409105a3228a8ae22ba6acf95cd99bc9a2c20f8603aa0e803a33172eb6ef53f80f8f0262d2258b77f9fd6e1f2e9017a6c906b88f761e053c09ef88c9ffab7d29 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CMARK_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CMARK_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMARK_TESTS=OFF + -DCMARK_SHARED=${CMARK_SHARED} + -DCMARK_STATIC=${CMARK_STATIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmark RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/cmark.exe ${CURRENT_PACKAGES_DIR}/debug/bin/cmark.exe) +endif() diff --git a/ports/coolprop/CONTROL b/ports/coolprop/CONTROL index 72ccae87b..01e67e0df 100644 --- a/ports/coolprop/CONTROL +++ b/ports/coolprop/CONTROL @@ -1,4 +1,4 @@ Source: coolprop -Version: 6.1.0-3 +Version: 6.1.0-4 Description: Thermophysical properties for the masses Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers diff --git a/ports/coolprop/fmt-fix.patch b/ports/coolprop/fmt-fix.patch new file mode 100644 index 000000000..bf2d11deb --- /dev/null +++ b/ports/coolprop/fmt-fix.patch @@ -0,0 +1,39 @@ +diff --git a/include/CPstrings.h b/include/CPstrings.h
+index 2e5a5af..87f6b7c 100644
+--- a/include/CPstrings.h
++++ b/include/CPstrings.h
+@@ -5,6 +5,8 @@
+ #include <iterator>
+ #include <algorithm>
+ #include <functional>
++ #include <vector>
++ #include <string>
+
+ #if !defined(NO_CPPFORMAT)
+ #ifndef FMT_HEADER_ONLY
+@@ -13,9 +15,6 @@
+ #include "fmt/format.h" // For addition of the string formatting functions and macros from cppformat
+ #include "fmt/printf.h" // For sprintf
+ #undef FMT_HEADER_ONLY
+-#else
+- #include <vector>
+- #include <string>
+ #endif
+
+ #include "Exceptions.h"
+@@ -57,11 +56,11 @@
+ // Missing string formatting function, this old guy is needed for ancient gcc compilers on PowerPC for VxWorks
+ inline std::string format(const char* fmt, ...);
+ #else
+- // Missing std::string formatting function - provided by the cppformat library
+- inline std::string format(const char *format, fmt::ArgList args) {
+- return fmt::sprintf(format, args);
++ template<class...Args>
++ std::string format(const Args & ... args)
++ {
++ return fmt::sprintf(args...);
+ }
+- FMT_VARIADIC(std::string, format, const char *)
+ #endif
+
+ // Missing string split - like in Python
diff --git a/ports/coolprop/portfile.cmake b/ports/coolprop/portfile.cmake index c5b3a8cee..2406ea819 100644 --- a/ports/coolprop/portfile.cmake +++ b/ports/coolprop/portfile.cmake @@ -7,6 +7,8 @@ vcpkg_from_github( REF 0e934e842e9ce83eea64fda1d4ab8e59adf9d8cd SHA512 a44eafc84f2b88259d7bcf6cfa81daeb81ea9d55bd356e59b3ef77b6f68ea405961c7cb54ba899e3896bb2a02d3e01119a4a51f72899126c8da6081fa2ece948 HEAD_REF master + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fmt-fix.patch ) vcpkg_find_acquire_program(PYTHON2) @@ -16,8 +18,8 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON2_DIR}") file(REMOVE_RECURSE ${SOURCE_PATH}/externals) # Patch up the file locations -file(COPY - ${CURRENT_INSTALLED_DIR}/include/catch.hpp +file(COPY + ${CURRENT_INSTALLED_DIR}/include/catch.hpp DESTINATION ${SOURCE_PATH}/externals/Catch/single_include ) @@ -30,12 +32,12 @@ file(COPY DESTINATION ${SOURCE_PATH}/externals/Eigen/unsupported ) -file(COPY +file(COPY ${CURRENT_INSTALLED_DIR}/include/rapidjson DESTINATION ${SOURCE_PATH}/externals/rapidjson/include ) -file(COPY +file(COPY ${CURRENT_INSTALLED_DIR}/include/IF97.h DESTINATION ${SOURCE_PATH}/externals/IF97 ) diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index a886c8639..e719d90e4 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,5 +1,5 @@ Source: corrade -Version: 2018.02-1 +Version: 2018.04-1 Description: C++11/C++14 multiplatform utility library http://magnum.graphics/corrade/ Default-Features: interconnect, pluginmanager, testsuite, utility diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 85ad3e4b0..9c407a753 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/corrade - REF v2018.02 - SHA512 8fe4998dc32586386b8fa2030941f3ace6d5e76aadcf7e20a620d276cc9247324e10eb58f2c2c9e84a1a9d9b336e6bdc788f9947c9e507a053d6fd2ffcd3d58e + REF v2018.04 + SHA512 be14f0cb76c904a37f962af16b331407ec6a1f7a31245c7221f41fcbce2749a1ad67057d451736814e357eaa59e015f16996bdba819f69a1dd0f3d5a3cad34a4 HEAD_REF master ) diff --git a/ports/curl/0004_nghttp2_staticlib.patch b/ports/curl/0004_nghttp2_staticlib.patch new file mode 100644 index 000000000..c5cba9c5f --- /dev/null +++ b/ports/curl/0004_nghttp2_staticlib.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 490cc19..51c0a92 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -388,6 +388,9 @@ if(USE_NGHTTP2) + find_package(NGHTTP2 REQUIRED) + include_directories(${NGHTTP2_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES}) ++ if(CURL_STATICLIB) ++ add_definitions(-DNGHTTP2_STATICLIB) ++ endif() + endif() + + if(NOT CURL_DISABLE_LDAP) diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index 18518e1ea..61456a99b 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7_59_0-2 +Version: 7.60.0-1 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 852fcf9d0..329ead341 100644 --- a/ports/curl/portfile.cmake +++ b/ports/curl/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO curl/curl - REF curl-7_59_0 - SHA512 eac51b986db7eafb836bc4fa00def88054304110990bf99a4387a5ff85a8375616c2ee5bee91bf608737faffe9f228dfd62be69a4b0622a4afe3deb1098b6bd3 + REF curl-7_60_0 + SHA512 876ca211d40887f36f77661235d3875bdd3fe210f131c8bd1025bd8c9ca3144a9ac23247067675a3e30385427748c51d0d54250cc2bb4a2ae0c3a9b9428b0e66 HEAD_REF master ) @@ -13,6 +13,7 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch ${CMAKE_CURRENT_LIST_DIR}/0002_fix_uwp.patch ${CMAKE_CURRENT_LIST_DIR}/0003_fix_libraries.patch + ${CMAKE_CURRENT_LIST_DIR}/0004_nghttp2_staticlib.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) diff --git a/ports/directxmesh/CONTROL b/ports/directxmesh/CONTROL index 41b26ef1a..443917882 100644 --- a/ports/directxmesh/CONTROL +++ b/ports/directxmesh/CONTROL @@ -1,3 +1,3 @@ Source: directxmesh -Version: feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 +Version: may2018 Description: DirectXMesh geometry processing library
\ No newline at end of file diff --git a/ports/directxmesh/portfile.cmake b/ports/directxmesh/portfile.cmake index 6d64d3658..89a83c272 100644 --- a/ports/directxmesh/portfile.cmake +++ b/ports/directxmesh/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/DirectXMesh
- REF eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9
- SHA512 35a6be07fbdf5d9a39e7f5a3716057d09643d0c4bb43d39beae4233ca6941d2e2318b826dcc4a385dfa512675c7e28f320067b88bb325943b6532c8e65ebcd1b
+ REF may2018 + SHA512 33fe4a680f274b1e7a643cc1a49762d7c9528e1fefab8ec41010c8b3b094cad56731c23e4d098b0684689050a62a89186557cf448075e73b9f592bad22cb0ca0
HEAD_REF master
)
diff --git a/ports/directxtex/CONTROL b/ports/directxtex/CONTROL index 8d47b6302..42efa2233 100644 --- a/ports/directxtex/CONTROL +++ b/ports/directxtex/CONTROL @@ -1,3 +1,3 @@ Source: directxtex
-Version: feb2018b +Version: may2018 Description: DirectXTex texture processing library
\ No newline at end of file diff --git a/ports/directxtex/portfile.cmake b/ports/directxtex/portfile.cmake index ec466e0d6..d80a831c1 100644 --- a/ports/directxtex/portfile.cmake +++ b/ports/directxtex/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Microsoft/DirectXTex
- REF feb2018b
- SHA512 7ab88ea863947ec279c9c83bd6dd48e15345430c750c7215c22998661fad1a711f207c57227bc5cc3cddfb5e0a89a8971d7ef3319057636e2b6f3e2e607ea0cb
+ REF may2018 + SHA512 208186f9efe045b6219ac19748896e3630494f75bec33030248b0d7b37d6d6c2433d3fce7141157f85ce068a27a170d0af153dfc4465a9d280aef181ebe3a51f
HEAD_REF master
)
diff --git a/ports/directxtk/CONTROL b/ports/directxtk/CONTROL index 1861befc1..e52f8dc14 100644 --- a/ports/directxtk/CONTROL +++ b/ports/directxtk/CONTROL @@ -1,3 +1,3 @@ Source: directxtk -Version: feb2018 +Version: may2018 Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/ports/directxtk/portfile.cmake b/ports/directxtk/portfile.cmake index 18ff47218..cd290e142 100644 --- a/ports/directxtk/portfile.cmake +++ b/ports/directxtk/portfile.cmake @@ -12,8 +12,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/DirectXTK - REF feb2018 - SHA512 0f123f6fa26bf5aebd0d0b3139f655369726581c25eec24d804eebf5dc34b3e45476e8a1679bf1a294b011bf32e19c5e2a63a385ecb8774dfacee3e8833c5b9e + REF may2018 + SHA512 0d492fcd72882aa91270b8fbaf9caa897bf4499931921fdded052129ecbb5476a373fa32ac0870897bc5ead9dae749f9b52e86fc617654f64b263041001cdfb5 HEAD_REF master ) diff --git a/ports/discord-rpc/CONTROL b/ports/discord-rpc/CONTROL index 2e6f44688..82e7515ed 100644 --- a/ports/discord-rpc/CONTROL +++ b/ports/discord-rpc/CONTROL @@ -1,3 +1,3 @@ Source: discord-rpc -Version: 3.2.0 +Version: 3.3.0 Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. diff --git a/ports/discord-rpc/portfile.cmake b/ports/discord-rpc/portfile.cmake index 8e4e090b1..5a2f04c85 100644 --- a/ports/discord-rpc/portfile.cmake +++ b/ports/discord-rpc/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO discordapp/discord-rpc - REF v3.2.0 - SHA512 83a32db240f30f4429c145dd400eba5b9985ea779e492ffa2be2ba2664d97e4dec1f4416ad0f3e6fc908c3c9b30aebe4a8e293e0ef3c60e01fc6f16b5f9a7c16 + REF v3.3.0 + SHA512 8bb2674edefabf75670ceca29364d69e2002152bff9fe55757f4cda03544b4d827ff33595d98e6d8acdc73ca61cef8ab8054ad0a1ffc905cb26496068b15025f HEAD_REF master ) diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL index c4d5fe905..1a152168d 100644 --- a/ports/dlib/CONTROL +++ b/ports/dlib/CONTROL @@ -1,5 +1,5 @@ Source: dlib -Version: 19.10-1 +Version: 19.13 Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake index da77c9374..4629cd9c2 100644 --- a/ports/dlib/portfile.cmake +++ b/ports/dlib/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO davisking/dlib - REF v19.10 - SHA512 88c5b41c12219e6166c6621b654b3869ca4a2af777a8fa55429b833b90b048e3e74ea7ad752d7440809b8171bbd38090cb24a29770391fc3a9d53f9a5fba3341 + REF v19.13 + SHA512 3b6869cb9b08d98152bc0d474714f5d342e3d35e6226e5eeb54216ad64d0d0a48a5bf0e78a7db68540b5f593c74f2b3cefac2f545e4038130283c127a16cd00f HEAD_REF master ) @@ -62,6 +62,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_ne file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cudnn) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cuda) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cpp11) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_avx) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm) # Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead. diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index b83f7b1af..3de9dedb3 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,3 +1,3 @@ Source: doctest -Version: 1.2.8 +Version: 1.2.9 Description: The fastest feature-rich C++ single-header testing framework for unit tests and TDD diff --git a/ports/doctest/portfile.cmake b/ports/doctest/portfile.cmake index 22e867a6d..433a52f53 100644 --- a/ports/doctest/portfile.cmake +++ b/ports/doctest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO onqtam/doctest - REF 1.2.8 - SHA512 4558909c6a846fa8679539a9d44e442d9ce6aae37c807ef34d95648abfabe0a16e4593aef83293e3d03bcf80e0269742ff0b95d54eb434c7a18be136608cd24d + REF 1.2.9 + SHA512 9500570fb0ef7b06799fbe92b8f96eacf16eba630abe4f67a235901995192e31fafb812704f327f0a2582c8fe61c3bb458d2eaf3c4287f24c1ffbc04c46a2471 HEAD_REF master ) diff --git a/ports/entt/CONTROL b/ports/entt/CONTROL index 4e4c44334..6887500b9 100644 --- a/ports/entt/CONTROL +++ b/ports/entt/CONTROL @@ -1,3 +1,3 @@ Source: entt -Version: 2.4.2-1 +Version: 2.5.0 Description: Gaming meets modern C++ - a fast and reliable entity-component system and much more. <https://github.com/skypjack/entt> diff --git a/ports/entt/portfile.cmake b/ports/entt/portfile.cmake index e67824162..4df78448c 100644 --- a/ports/entt/portfile.cmake +++ b/ports/entt/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO skypjack/entt - REF v2.4.2 - SHA512 fd532f2c180c328d396f557386b70e961c122af11e379ce57db3709d20345280ada200dadde136ae3557ad25daa944d8a86f7868cd0bedea78427d42c27d6e6d + REF v2.5.0 + SHA512 a56d17c4ac832b50349293eb40c32efb079d90c9a7010589979eac5f13b97e82c032f94b87d0d7885099ee6f1857e68e064e3248c7f4d52ccca02620fd80ea25 ) file(INSTALL diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index 2e7eaef26..085efe481 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-04-12 +Version: 2018-05-17 Build-Depends: zlib, expat, libiconv Description: Image metadata library and tools http://www.exiv2.org diff --git a/ports/exiv2/portfile.cmake b/ports/exiv2/portfile.cmake index 3e645a91e..c4c3173d2 100644 --- a/ports/exiv2/portfile.cmake +++ b/ports/exiv2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Exiv2/exiv2 - REF c80b1b9d51689692bc865f1a1d16bf7fd2a532c4 - SHA512 72c3801678424cd738423ea28e03c44f4d2bfd6a7e3c2cea53806b3705eebc5e86a293d3aa2bea51f6f426b9e280a3f7b8883bb4e4c627cc413159d9565033a0 + REF 4b24e011dc485102a68a8809621e718fc77830a2 + SHA512 acd192c585a074fae3308cce9355e735165142dc19c4a1ab6040fe4e686aa199f30d664eb2b450fe297c9ce0b027952bf784e8aea18c893d80b28e331bf48839 HEAD_REF master ) diff --git a/ports/exprtk/CONTROL b/ports/exprtk/CONTROL index 2ebcfab28..4df1a2e2b 100644 --- a/ports/exprtk/CONTROL +++ b/ports/exprtk/CONTROL @@ -1,3 +1,3 @@ Source: exprtk -Version: 2018.01.01-f32d2b4 +Version: 2018.04.30-46877b6 Description: Simple to use, easy to integrate and extremely efficient run-time C++ mathematical expression parser and evaluation engine. diff --git a/ports/exprtk/portfile.cmake b/ports/exprtk/portfile.cmake index 1178a3e12..69d9921ec 100644 --- a/ports/exprtk/portfile.cmake +++ b/ports/exprtk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/exprtk - REF f32d2b4bbb640ea4732b8a7fce1bd9717e9c998b - SHA512 22c977dc2514bd525856ed26b8895687601e79784486efe9d4f27466e1e1932c4a947297d83e9b98a6c82df9eaf5b0f82990741bbb699d565ca11e5755a55dd6 + REF 46877b604cfcc0a0e592fc7a8a874cf2a9f90cf4 + SHA512 1043b5b6aa64bc3f8d989d2aac3e3a125188b1526ab92e245ad526ab1fe37e10cb275f2b77d311b4d91bd4ea32e1d81dfcd8abf8373b723a8b664842690ee1ae ) file(COPY ${SOURCE_PATH}/exprtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/fdk-aac/CONTROL b/ports/fdk-aac/CONTROL index edef0f16d..970062761 100644 --- a/ports/fdk-aac/CONTROL +++ b/ports/fdk-aac/CONTROL @@ -1,3 +1,3 @@ Source: fdk-aac -Version: 2018-03-07 +Version: 2018-05-17 Description: A standalone library of the Fraunhofer FDK AAC code diff --git a/ports/fdk-aac/portfile.cmake b/ports/fdk-aac/portfile.cmake index 134885b25..16c1b700f 100644 --- a/ports/fdk-aac/portfile.cmake +++ b/ports/fdk-aac/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mstorsjo/fdk-aac - REF a30bfced6b6d6d976c728552d247cb30dd86e238 - SHA512 07371b78998b2330022ca5f4b6c605a30d279faef28b3fb53d03bbf7163c87bed9432fcd3efbee70906453e7599bc7191e6aeb0bc88b35dcfb79c2a935eb327d + REF a50eecf65b5ce5d4f03768c5c2cb4b492d2badad + SHA512 1cb42e99d9d3112a42497f85c8ddbfb919a1c33bc8094408a828468762fe6d07c97940effa69d043c2d9923f3fa1805fd8c723154631609a6b0883eb4d3c6b27 HEAD_REF master ) diff --git a/ports/fmt/CONTROL b/ports/fmt/CONTROL index 7cd59ab27..7d1690878 100644 --- a/ports/fmt/CONTROL +++ b/ports/fmt/CONTROL @@ -1,3 +1,3 @@ Source: fmt -Version: 4.1.0 +Version: 5.0.0 Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/ports/fmt/portfile.cmake b/ports/fmt/portfile.cmake index 36ab2ac3b..668482aa8 100644 --- a/ports/fmt/portfile.cmake +++ b/ports/fmt/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO fmtlib/fmt - REF 4.1.0 - SHA512 8daaa4a61bfe63345a12df0a9bca0b1cd6a162d0f4e97d2d2978ae19a1a1357ec4d4cce948ce726cdbe9403e51ad995950a2a99de28f9b9085c02ce845540b22 + REF 5.0.0 + SHA512 1ce93648ab7aca6082767ff009d5836e226fa42f183852ca15230f371ef0a34878110ca63d8669a68de7f115c137fdaa11de998986a9440f08d50f0f214ebb90 HEAD_REF master ) @@ -22,19 +22,19 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/bin/fmt.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmt.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmtd.dll) # Force FMT_SHARED to 1 - file(READ ${CURRENT_PACKAGES_DIR}/include/fmt/format.h FMT_FORMAT_H) - string(REPLACE "defined(FMT_SHARED)" "1" FMT_FORMAT_H "${FMT_FORMAT_H}") - file(WRITE ${CURRENT_PACKAGES_DIR}/include/fmt/format.h "${FMT_FORMAT_H}") + file(READ ${CURRENT_PACKAGES_DIR}/include/fmt/core.h FMT_CORE_H) + string(REPLACE "defined(FMT_SHARED)" "1" FMT_CORE_H "${FMT_CORE_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/fmt/core.h "${FMT_CORE_H}") endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) vcpkg_fixup_cmake_targets() file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake FMT_DEBUG_MODULE) -string(REPLACE "lib/fmt.dll" "bin/fmt.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE}) +string(REPLACE "lib/fmtd.dll" "bin/fmtd.dll" FMT_DEBUG_MODULE ${FMT_DEBUG_MODULE}) file(WRITE ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake "${FMT_DEBUG_MODULE}") file(READ ${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake FMT_RELEASE_MODULE) string(REPLACE "lib/fmt.dll" "bin/fmt.dll" FMT_RELEASE_MODULE ${FMT_RELEASE_MODULE}) diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 13f732525..658468f55 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2018.04.16.00 +Version: 2018.05.14.00 Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread Default-Features: zlib diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index fabfd0085..9dce4f14e 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -17,13 +17,9 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/folly - REF v2018.04.16.00 - SHA512 1f14da6eece3a490bd134a40550c2a3f78356789090e19933b8f10bc356837ee774a21e6f0b88c45831a968587049092b9d0d77617f040ab8e177de224400408 + REF v2018.05.14.00 + SHA512 ea03bdd239a637729aa863034f2ff679fcb5b982d0ebb015d45b84317afa0faec31595a2069b6553e1cc265272783926e370888f046b8d0bbd7833af2b985cb1 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/find-gflags.patch ) diff --git a/ports/forest/CONTROL b/ports/forest/CONTROL index 76dbbf47e..ba9d0f53b 100644 --- a/ports/forest/CONTROL +++ b/ports/forest/CONTROL @@ -1,3 +1,3 @@ Source: forest -Version: 7.0.6 +Version: 7.0.7 Description: Template library of tree data structures diff --git a/ports/forest/portfile.cmake b/ports/forest/portfile.cmake index 48ab6c9dd..c9975bbb0 100644 --- a/ports/forest/portfile.cmake +++ b/ports/forest/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xorz57/forest - REF 7.0.6 - SHA512 a1e5d27f2b8b9e6758a67a9124fc25517074c633644651b26f6683bab09189569e75ccf4ae7d9cfeddae234435b073fc00e0f5385c4e9370062c3e8b222c1c59 + REF 7.0.7 + SHA512 23488008d92736b4d1460cca95216918085071bf107356989158752faac14248a81a35e0acfd7e119895006304c0e3dda86174e551e87f588c62c1f264168d63 HEAD_REF master ) diff --git a/ports/freeglut/CONTROL b/ports/freeglut/CONTROL index d7c3801f7..8baaba1dc 100644 --- a/ports/freeglut/CONTROL +++ b/ports/freeglut/CONTROL @@ -1,3 +1,3 @@ Source: freeglut -Version: 3.0.0-3 +Version: 3.0.0-4 Description: Open source implementation of GLUT with source and binary backwards compatibility. diff --git a/ports/freeglut/portfile.cmake b/ports/freeglut/portfile.cmake index 3e6248126..913fc90ff 100644 --- a/ports/freeglut/portfile.cmake +++ b/ports/freeglut/portfile.cmake @@ -7,6 +7,10 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message("Freeglut currently requires the following libraries from the system package manager:\n opengl\n glu\n libx11\n\nThese can be installed on Ubuntu systems via apt-get install libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev") +endif() + # disable debug suffix, because FindGLUT.cmake from CMake 3.8 doesn't support it file(READ ${SOURCE_PATH}/CMakeLists.txt FREEGLUT_CMAKELISTS) string(REPLACE "SET( CMAKE_DEBUG_POSTFIX \"d\" )" @@ -41,9 +45,11 @@ string(REPLACE "pragma comment (lib, \"freeglutd.lib\")" file(WRITE ${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") # Rename static lib (otherwise it's incompatible with FindGLUT.cmake) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut.lib) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut.lib) + endif() endif() # Clean diff --git a/ports/gainput/CONTROL b/ports/gainput/CONTROL index 45b7b6afb..29ac472c5 100644 --- a/ports/gainput/CONTROL +++ b/ports/gainput/CONTROL @@ -1,3 +1,3 @@ Source: gainput -Version: 1.0.0 +Version: 1.0.0-1 Description: Gainput is a multiplatform C++ input library, supporting mouse, keyboard and controllers diff --git a/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch b/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch deleted file mode 100644 index 7817c4a38..000000000 --- a/ports/gdal/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/nmake.opt b/nmake.opt -index bd5719c2d1..f6101ccd59 100644 ---- a/nmake.opt -+++ b/nmake.opt -@@ -127,18 +127,28 @@ CXX_PDB_FLAGS=/Zi /Fd$(GDAL_ROOT)\gdal$(VERSION).pdb - CXX_PDB_FLAGS= - !ENDIF - -+# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) -+# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well -+!IFNDEF CXX_CRT_FLAGS -+!IFNDEF DEBUG -+CXX_CRT_FLAGS=/MD -+!ELSE -+CXX_CRT_FLAGS=/MDd -+!ENDIF -+!ENDIF -+ - !IFNDEF OPTFLAGS - !IF $(MSVC_VER) >= 1400 - !IFNDEF DEBUG --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG - !ELSE --OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG -+OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG - !ENDIF - !ELSE - !IFNDEF DEBUG --OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /Ox /FC /DNDEBUG -+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /Ox /DNDEBUG - !ELSE --OPTFLAGS= $(CXX_PDB_FLAGS) /nologo /MD /EHsc /GR /FC /DDEBUG -+OPTFLAGS= $(CXX_PDB_FLAGS) /nologo $(CXX_CRT_FLAGS) /EHsc /GR /DDEBUG - !ENDIF - !ENDIF #MSVC_VER - !ENDIF # OPTFLAGS diff --git a/ports/gdal/0001-Fix-debug-crt-flags.patch b/ports/gdal/0001-Fix-debug-crt-flags.patch new file mode 100644 index 000000000..753d53131 --- /dev/null +++ b/ports/gdal/0001-Fix-debug-crt-flags.patch @@ -0,0 +1,27 @@ +diff -Nuar a/nmake.opt b/nmake.opt +--- a/nmake.opt 2018-05-04 09:05:46.000000000 +0200 ++++ b/nmake.opt 2018-05-11 22:58:39.387603800 +0200 +@@ -120,11 +120,21 @@ + CXX_PDB_FLAGS= + !ENDIF + ++# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) ++# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well ++!IFNDEF CXX_CRT_FLAGS ++!IFNDEF DEBUG ++CXX_CRT_FLAGS=/MD ++!ELSE ++CXX_CRT_FLAGS=/MDd ++!ENDIF ++!ENDIF ++ + !IFNDEF OPTFLAGS + !IFNDEF DEBUG +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG + !ELSE +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG + !ENDIF + !ENDIF # OPTFLAGS + diff --git a/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch b/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch deleted file mode 100644 index 57030b99b..000000000 --- a/ports/gdal/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/nmake.opt b/nmake.opt -index bd5719c2d1..c0ca442cbe 100644 ---- a/nmake.opt -+++ b/nmake.opt -@@ -195,6 +205,9 @@ SOFTWARNFLAGS= /wd4244 /wd4702 /wd4701 /wd4013 /wd4706 /wd4057 /wd4210 /wd4305 - # Linker debug options - !IFDEF DEBUG - LDEBUG= /debug -+!ELSEIFDEF WITH_PDB -+# Ensures that PDB is included in release DLL if so requested -+LDEBUG= /debug /opt:ref /opt:icf - !ENDIF - - # Uncomment the following if you are building for 64-bit windows diff --git a/ports/gdal/0003-Fix-openjpeg-include.patch b/ports/gdal/0003-Fix-openjpeg-include.patch deleted file mode 100644 index 4ea72690c..000000000 --- a/ports/gdal/0003-Fix-openjpeg-include.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/frmts/openjpeg/openjpegdataset.cpp b/frmts/openjpeg/openjpegdataset.cpp -index 5978882bc9..72cc7b9559 100644 ---- a/frmts/openjpeg/openjpegdataset.cpp -+++ b/frmts/openjpeg/openjpegdataset.cpp -@@ -34,14 +34,8 @@ - #pragma clang diagnostic ignored "-Wdocumentation" - #endif - --#if defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20200 --#include <openjpeg-2.2/openjpeg.h> --#elif defined(OPENJPEG_VERSION) && OPENJPEG_VERSION >= 20100 --#include <openjpeg-2.1/openjpeg.h> --#else - #include <stdio.h> /* openjpeg.h needs FILE* */ --#include <openjpeg-2.0/openjpeg.h> --#endif -+#include <openjpeg.h> - - #ifdef __clang__ - #pragma clang diagnostic pop diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index c958ac671..be75e6693 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,4 @@ Source: gdal -Version: 2.2.2-1 +Version: 2.3.0-1 Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. -Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma +Build-Depends: proj, libpng, geos, sqlite3, curl, expat, libpq, libmysql, openjpeg, libwebp, libxml2, liblzma diff --git a/ports/gdal/no-my-bool.patch b/ports/gdal/no-my-bool.patch index 1ed0279ee..2589ff044 100644 --- a/ports/gdal/no-my-bool.patch +++ b/ports/gdal/no-my-bool.patch @@ -1,13 +1,12 @@ -diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
-index 8733af9..f49d862 100644
---- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
-+++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
-@@ -259,7 +259,7 @@ int OGRMySQLDataSource::Open( const char * pszNewName, char** papszOpenOptionsIn
- // Enable automatic reconnection
- // Must be called after mysql_real_connect() on MySQL < 5.0.19
- // and at any point on more recent versions.
-- my_bool reconnect = 1;
-+ bool reconnect = 1;
- mysql_options(hConn, MYSQL_OPT_RECONNECT, &reconnect);
- }
-
+diff -Nuar a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp +--- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp 2018-05-04 09:09:26.000000000 +0200 ++++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp 2018-05-11 23:07:44.284558300 +0200 +@@ -235,7 +235,7 @@ + // Enable automatic reconnection + // Must be called after mysql_real_connect() on MySQL < 5.0.19 + // and at any point on more recent versions. +- my_bool reconnect = 1; ++ bool reconnect = 1; + mysql_options(hConn, MYSQL_OPT_RECONNECT, &reconnect); + } + diff --git a/ports/gdal/no-mysql-global-h.patch b/ports/gdal/no-mysql-global-h.patch deleted file mode 100644 index 57ff89ce3..000000000 --- a/ports/gdal/no-mysql-global-h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ogr/ogrsf_frmts/mysql/ogr_mysql.h b/ogr/ogrsf_frmts/mysql/ogr_mysql.h
-index 76a6762..b2f0fcb 100644
---- a/ogr/ogrsf_frmts/mysql/ogr_mysql.h
-+++ b/ogr/ogrsf_frmts/mysql/ogr_mysql.h
-@@ -43,7 +43,7 @@
- #pragma warning( disable : 4211 ) /* nonstandard extension used : redefined extern to static */
- #endif
-
--#include <my_global.h>
-+/* #include <my_global.h> */ /* Mysql 8+ no longer ships with my_global.h */
- #include <mysql.h>
-
- #ifdef _MSC_VER
diff --git a/ports/gdal/no-mysql-sys-h.patch b/ports/gdal/no-mysql-sys-h.patch deleted file mode 100644 index 951425386..000000000 --- a/ports/gdal/no-mysql-sys-h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
-index e694bbd..8733af9 100644
---- a/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
-+++ b/ogr/ogrsf_frmts/mysql/ogrmysqldatasource.cpp
-@@ -44,7 +44,7 @@
- #pragma clang diagnostic ignored "-Wunknown-pragmas"
- #pragma clang diagnostic ignored "-Wdocumentation"
- #endif
--#include <my_sys.h>
-+/*#include <my_sys.h> mysql 8.1 no longer ships with my_sys.h*/
- #ifdef __clang__
- #pragma clang diagnostic pop
- #endif
diff --git a/ports/gdal/portfile.cmake b/ports/gdal/portfile.cmake index 10e2ceab8..70eea8583 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -1,3 +1,11 @@ +# vcpkg portfile.cmake for GDAL +# +# NOTE: update the version and checksum for new GDAL release +set(GDAL_VERSION_STR "2.3.0") +set(GDAL_VERSION_PKG "230") +set(GDAL_VERSION_LIB "203") +set(GDAL_PACKAGE_SUM "f3f790b7ecb28916d6d0628b15ddc6b396a25a8f1f374589ea5e95b5a50addc99e05e363113f907b6c96faa69870b5dc9fdf3d771f9c8937b4aa8819bd78b190") + if (TRIPLET_SYSTEM_ARCH MATCHES "arm") message(FATAL_ERROR "ARM is currently not supported.") endif() @@ -11,27 +19,23 @@ endif() include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "http://download.osgeo.org/gdal/2.2.2/gdal222.zip" - FILENAME "gdal222.zip" - SHA512 b886238a7915c97f4acec5920dabe959d1ab15a8be0bc31ba0d05ad69d1d7d96f864faf0aa82921fa1a1b40b733744202b86f2f45ff63d6518cd18a53f3544a8 + URLS "http://download.osgeo.org/gdal/${GDAL_VERSION_STR}/gdal${GDAL_VERSION_PKG}.zip" + FILENAME "gdal${GDAL_VERSION_PKG}.zip" + SHA512 ${GDAL_PACKAGE_SUM} ) # Extract source into architecture specific directory, because GDALs' nmake based build currently does not # support out of source builds. -set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-2.2.2) -set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-2.2.2) +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-${GDAL_VERSION_STR}) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-${GDAL_VERSION_STR}) foreach(BUILD_TYPE debug release) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) vcpkg_apply_patches( - SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-2.2.2 + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/0001-Add-variable-CXX_CRT_FLAGS-to-allow-for-selection-of.patch - ${CMAKE_CURRENT_LIST_DIR}/0002-Ensures-inclusion-of-PDB-in-release-dll-if-so-reques.patch - ${CMAKE_CURRENT_LIST_DIR}/0003-Fix-openjpeg-include.patch - ${CMAKE_CURRENT_LIST_DIR}/no-mysql-global-h.patch - ${CMAKE_CURRENT_LIST_DIR}/no-mysql-sys-h.patch + ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-debug-crt-flags.patch ${CMAKE_CURRENT_LIST_DIR}/no-my-bool.patch ) endforeach() @@ -55,7 +59,7 @@ file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.lib" PNG_LIBRA # Setup geos libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" GEOS_INCLUDE_DIR) file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" GEOS_LIBRARY_REL) -file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_c.lib" GEOS_LIBRARY_DBG) +file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" GEOS_LIBRARY_DBG) # Setup expat libraries + include path file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" EXPAT_INCLUDE_DIR) @@ -220,7 +224,7 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) else() file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(REMOVE ${EXE_FILES} ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) - file(COPY ${SOURCE_PATH_DEBUG}/gdal202.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH_DEBUG}/gdal${GDAL_VERSION_LIB}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL index 2b192d088..1a32a8103 100644 --- a/ports/geos/CONTROL +++ b/ports/geos/CONTROL @@ -1,3 +1,3 @@ Source: geos -Version: 3.6.2-2 +Version: 3.6.2-3 Description: Geometry Engine Open Source diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake index 68b4ab9f7..e5a404254 100644 --- a/ports/geos/portfile.cmake +++ b/ports/geos/portfile.cmake @@ -31,7 +31,10 @@ file(DOWNLOAD http://svn.osgeo.org/geos/branches/3.6/cmake/modules/GenerateSourc vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DGEOS_ENABLE_TESTS=False + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d + -DGEOS_ENABLE_TESTS=False ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -39,11 +42,11 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/geos) file(RENAME ${CURRENT_PACKAGES_DIR}/share/geos/COPYING ${CURRENT_PACKAGES_DIR}/share/geos/copyright) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libgeos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libgeos.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libgeos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libgeosd.lib) else() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos.lib) - file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos_c.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos_c.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geosd.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/geos_c.lib ${CURRENT_PACKAGES_DIR}/debug/lib/geos_cd.lib) endif() diff --git a/ports/glm/CONTROL b/ports/glm/CONTROL index 10a6e5f88..7dbcec7d4 100644 --- a/ports/glm/CONTROL +++ b/ports/glm/CONTROL @@ -1,3 +1,3 @@ Source: glm -Version: 0.9.8.5-1 +Version: 0.9.9.0 Description: OpenGL Mathematics (GLM) https://glm.g-truc.net diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index 1fb4fe073..b975cc370 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO g-truc/glm - REF 0.9.8.5 - SHA512 5a7e84ecc5a54320c74776c133bfdbeaf0d4496a7a7fdf2f4ccf89e66b3665a577a370a662ac97a350a2b1f717ce769cb0826057ebb3b13c9c2fee65f20ac7b4 + REF 0.9.9.0 + SHA512 b7a6996cb98bc334130c33a339275b50ea28d8dfce300f3d14ac52edf0b5c38bf216d318f411e898edef428876c0b2d1f6a6e951f160f31425fe0852ad150421 HEAD_REF master ) @@ -27,5 +27,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Put the license file where vcpkg expects it -file(COPY ${SOURCE_PATH}/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/copying.txt ${CURRENT_PACKAGES_DIR}/share/glm/copyright) +file(COPY ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/glm/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/glm/manual.md ${CURRENT_PACKAGES_DIR}/share/glm/copyright) diff --git a/ports/grpc/CONTROL b/ports/grpc/CONTROL index 6f8f18467..71c9f9d29 100644 --- a/ports/grpc/CONTROL +++ b/ports/grpc/CONTROL @@ -1,4 +1,4 @@ Source: grpc -Version: 1.10.1-1 -Build-Depends: zlib, openssl, protobuf, c-ares +Version: 1.10.1-2 +Build-Depends: zlib, openssl, protobuf, c-ares (!uwp) Description: An RPC library and framework diff --git a/ports/grpc/fix-uwp.patch b/ports/grpc/fix-uwp.patch new file mode 100644 index 000000000..2ab2ae652 --- /dev/null +++ b/ports/grpc/fix-uwp.patch @@ -0,0 +1,554 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0dc0bd3..2407e4a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -84,6 +84,9 @@ if(UNIX)
+ endif()
+ if(WIN32)
+ set(_gRPC_PLATFORM_WINDOWS ON)
++ if(${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore")
++ set(_gRPC_PLATFORM_UWP ON)
++ endif()
+ endif()
+
+ set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
+@@ -144,6 +147,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
+ # ``.proto`` files
+ #
+ function(protobuf_generate_grpc_cpp)
++ if(_gRPC_PLATFORM_UWP)
++ return()
++ endif()
++
+ if(NOT ARGN)
+ message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
+ return()
+@@ -178,27 +185,29 @@ function(protobuf_generate_grpc_cpp)
+ endforeach()
+ endfunction()
+
+-add_custom_target(plugins
+- DEPENDS
+- grpc_cpp_plugin
+- grpc_csharp_plugin
+- grpc_node_plugin
+- grpc_objective_c_plugin
+- grpc_php_plugin
+- grpc_python_plugin
+- grpc_ruby_plugin
+-)
++if(NOT _gRPC_PLATFORM_UWP)
++ add_custom_target(plugins
++ DEPENDS
++ grpc_cpp_plugin
++ grpc_csharp_plugin
++ grpc_node_plugin
++ grpc_objective_c_plugin
++ grpc_php_plugin
++ grpc_python_plugin
++ grpc_ruby_plugin
++ )
+
+-add_custom_target(tools_c
+- DEPENDS
+- check_epollexclusive
+- grpc_create_jwt
+- grpc_print_google_default_creds_token
+- grpc_verify_jwt
+- gen_hpack_tables
+- gen_legal_metadata_characters
+- gen_percent_encoding_tables
+-)
++ add_custom_target(tools_c
++ DEPENDS
++ check_epollexclusive
++ grpc_create_jwt
++ grpc_print_google_default_creds_token
++ grpc_verify_jwt
++ gen_hpack_tables
++ gen_legal_metadata_characters
++ gen_percent_encoding_tables
++ )
++endif()
+
+ add_custom_target(tools_cxx
+ DEPENDS
+@@ -3223,7 +3232,7 @@ if (gRPC_INSTALL)
+ )
+ endif()
+
+-
++if(NOT _gRPC_PLATFORM_UWP)
+ add_library(grpc++_error_details
+ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.pb.cc
+ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/status/status.grpc.pb.cc
+@@ -3285,6 +3294,7 @@ if (gRPC_INSTALL)
+ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
+ )
+ endif()
++endif()
+
+ if (gRPC_BUILD_TESTS)
+
+@@ -3347,67 +3357,69 @@ endforeach()
+
+ endif (gRPC_BUILD_TESTS)
+
+-add_library(grpc++_reflection
+- src/cpp/ext/proto_server_reflection.cc
+- src/cpp/ext/proto_server_reflection_plugin.cc
+- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.cc
+- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
+- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.h
+- ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h
+-)
+-
+-if(WIN32 AND MSVC)
+- set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection"
+- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
++if(NOT _gRPC_PLATFORM_UWP)
++ add_library(grpc++_reflection
++ src/cpp/ext/proto_server_reflection.cc
++ src/cpp/ext/proto_server_reflection_plugin.cc
++ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.cc
++ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.cc
++ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.pb.h
++ ${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h
+ )
+- if (gRPC_INSTALL)
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_reflection.pdb
+- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
++
++ if(WIN32 AND MSVC)
++ set_target_properties(grpc++_reflection PROPERTIES COMPILE_PDB_NAME "grpc++_reflection"
++ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
+ )
++ if (gRPC_INSTALL)
++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc++_reflection.pdb
++ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
++ )
++ endif()
+ endif()
+-endif()
+
+-protobuf_generate_grpc_cpp(
+- src/proto/grpc/reflection/v1alpha/reflection.proto
+-)
++ protobuf_generate_grpc_cpp(
++ src/proto/grpc/reflection/v1alpha/reflection.proto
++ )
+
+-target_include_directories(grpc++_reflection
+- PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+- PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTO_GENS_DIR}
+-)
++ target_include_directories(grpc++_reflection
++ PUBLIC $<INSTALL_INTERFACE:${gRPC_INSTALL_INCLUDEDIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTO_GENS_DIR}
++ )
+
+-target_link_libraries(grpc++_reflection
+- ${_gRPC_PROTOBUF_LIBRARIES}
+- ${_gRPC_ALLTARGETS_LIBRARIES}
+- grpc++
+- grpc
+-)
++ target_link_libraries(grpc++_reflection
++ ${_gRPC_PROTOBUF_LIBRARIES}
++ ${_gRPC_ALLTARGETS_LIBRARIES}
++ grpc++
++ grpc
++ )
+
+-foreach(_hdr
+- include/grpc++/ext/proto_server_reflection_plugin.h
+- include/grpcpp/ext/proto_server_reflection_plugin.h
+-)
+- string(REPLACE "include/" "" _path ${_hdr})
+- get_filename_component(_path ${_path} PATH)
+- install(FILES ${_hdr}
+- DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
++ foreach(_hdr
++ include/grpc++/ext/proto_server_reflection_plugin.h
++ include/grpcpp/ext/proto_server_reflection_plugin.h
+ )
+-endforeach()
++ string(REPLACE "include/" "" _path ${_hdr})
++ get_filename_component(_path ${_path} PATH)
++ install(FILES ${_hdr}
++ DESTINATION "${gRPC_INSTALL_INCLUDEDIR}/${_path}"
++ )
++ endforeach()
+
+
+-if (gRPC_INSTALL)
+- install(TARGETS grpc++_reflection EXPORT gRPCTargets
+- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
+- )
++ if (gRPC_INSTALL)
++ install(TARGETS grpc++_reflection EXPORT gRPCTargets
++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ )
++ endif()
+ endif()
+
+ if (gRPC_BUILD_TESTS)
+@@ -4197,26 +4209,28 @@ endforeach()
+
+ endif (gRPC_BUILD_TESTS)
+
+-add_library(grpc_plugin_support
+- src/compiler/cpp_generator.cc
+- src/compiler/csharp_generator.cc
+- src/compiler/node_generator.cc
+- src/compiler/objective_c_generator.cc
+- src/compiler/php_generator.cc
+- src/compiler/python_generator.cc
+- src/compiler/ruby_generator.cc
+-)
+-
+-if(WIN32 AND MSVC)
+- set_target_properties(grpc_plugin_support PROPERTIES COMPILE_PDB_NAME "grpc_plugin_support"
+- COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
++if(NOT _gRPC_PLATFORM_UWP)
++ add_library(grpc_plugin_support
++ src/compiler/cpp_generator.cc
++ src/compiler/csharp_generator.cc
++ src/compiler/node_generator.cc
++ src/compiler/objective_c_generator.cc
++ src/compiler/php_generator.cc
++ src/compiler/python_generator.cc
++ src/compiler/ruby_generator.cc
+ )
+- if (gRPC_INSTALL)
+- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_plugin_support.pdb
+- DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
++
++ if(WIN32 AND MSVC)
++ set_target_properties(grpc_plugin_support PROPERTIES COMPILE_PDB_NAME "grpc_plugin_support"
++ COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
+ )
++ if (gRPC_INSTALL)
++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_plugin_support.pdb
++ DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL
++ )
++ endif()
+ endif()
+-endif()
++
+
+
+ target_include_directories(grpc_plugin_support
+@@ -4236,6 +4250,8 @@ target_link_libraries(grpc_plugin_support
+ ${_gRPC_PROTOBUF_LIBRARIES}
+ ${_gRPC_ALLTARGETS_LIBRARIES}
+ )
++endif()
++
+
+ foreach(_hdr
+ include/grpc++/impl/codegen/config_protobuf.h
+@@ -4248,13 +4264,14 @@ foreach(_hdr
+ )
+ endforeach()
+
+-
+-if (gRPC_INSTALL)
+- install(TARGETS grpc_plugin_support EXPORT gRPCTargets
+- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
+- )
++if(NOT _gRPC_PLATFORM_UWP)
++ if (gRPC_INSTALL)
++ install(TARGETS grpc_plugin_support EXPORT gRPCTargets
++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ )
++ endif()
+ endif()
+
+ if (gRPC_BUILD_TESTS)
+@@ -10250,11 +10267,11 @@ target_link_libraries(grpc_cli
+
+ endif (gRPC_BUILD_TESTS)
+
+-add_executable(grpc_cpp_plugin
+- src/compiler/cpp_plugin.cc
++if(NOT _gRPC_PLATFORM_UWP)
++ add_executable(grpc_cpp_plugin
++ src/compiler/cpp_plugin.cc
+ )
+
+-
+ target_include_directories(grpc_cpp_plugin
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+@@ -10351,142 +10368,141 @@ if (gRPC_INSTALL)
+ )
+ endif()
+
++ add_executable(grpc_objective_c_plugin
++ src/compiler/objective_c_plugin.cc
++ )
+
+-add_executable(grpc_objective_c_plugin
+- src/compiler/objective_c_plugin.cc
+-)
+-
+-
+-target_include_directories(grpc_objective_c_plugin
+- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+- PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTO_GENS_DIR}
+-)
+-
+-target_link_libraries(grpc_objective_c_plugin
+- ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
+- ${_gRPC_PROTOBUF_LIBRARIES}
+- ${_gRPC_ALLTARGETS_LIBRARIES}
+- grpc_plugin_support
+-)
+
++ target_include_directories(grpc_objective_c_plugin
++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTO_GENS_DIR}
++ )
+
+-if (gRPC_INSTALL)
+- install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets
+- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ target_link_libraries(grpc_objective_c_plugin
++ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
++ ${_gRPC_PROTOBUF_LIBRARIES}
++ ${_gRPC_ALLTARGETS_LIBRARIES}
++ grpc_plugin_support
+ )
+-endif()
+
+
+-add_executable(grpc_php_plugin
+- src/compiler/php_plugin.cc
+-)
++ if (gRPC_INSTALL)
++ install(TARGETS grpc_objective_c_plugin EXPORT gRPCTargets
++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ )
++ endif()
+
+
+-target_include_directories(grpc_php_plugin
+- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+- PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTO_GENS_DIR}
+-)
++ add_executable(grpc_php_plugin
++ src/compiler/php_plugin.cc
++ )
+
+-target_link_libraries(grpc_php_plugin
+- ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
+- ${_gRPC_PROTOBUF_LIBRARIES}
+- ${_gRPC_ALLTARGETS_LIBRARIES}
+- grpc_plugin_support
+-)
+
++ target_include_directories(grpc_php_plugin
++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTO_GENS_DIR}
++ )
+
+-if (gRPC_INSTALL)
+- install(TARGETS grpc_php_plugin EXPORT gRPCTargets
+- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ target_link_libraries(grpc_php_plugin
++ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
++ ${_gRPC_PROTOBUF_LIBRARIES}
++ ${_gRPC_ALLTARGETS_LIBRARIES}
++ grpc_plugin_support
+ )
+-endif()
+
+
+-add_executable(grpc_python_plugin
+- src/compiler/python_plugin.cc
+-)
++ if (gRPC_INSTALL)
++ install(TARGETS grpc_php_plugin EXPORT gRPCTargets
++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ )
++ endif()
+
+
+-target_include_directories(grpc_python_plugin
+- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+- PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTO_GENS_DIR}
+-)
++ add_executable(grpc_python_plugin
++ src/compiler/python_plugin.cc
++ )
+
+-target_link_libraries(grpc_python_plugin
+- ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
+- ${_gRPC_PROTOBUF_LIBRARIES}
+- ${_gRPC_ALLTARGETS_LIBRARIES}
+- grpc_plugin_support
+-)
+
++ target_include_directories(grpc_python_plugin
++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTO_GENS_DIR}
++ )
+
+-if (gRPC_INSTALL)
+- install(TARGETS grpc_python_plugin EXPORT gRPCTargets
+- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ target_link_libraries(grpc_python_plugin
++ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
++ ${_gRPC_PROTOBUF_LIBRARIES}
++ ${_gRPC_ALLTARGETS_LIBRARIES}
++ grpc_plugin_support
+ )
+-endif()
+
+
+-add_executable(grpc_ruby_plugin
+- src/compiler/ruby_plugin.cc
+-)
++ if (gRPC_INSTALL)
++ install(TARGETS grpc_python_plugin EXPORT gRPCTargets
++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ )
++ endif()
+
+
+-target_include_directories(grpc_ruby_plugin
+- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
+- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
+- PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
+- PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
+- PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
+- PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
+- PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
+- PRIVATE ${_gRPC_PROTO_GENS_DIR}
+-)
++ add_executable(grpc_ruby_plugin
++ src/compiler/ruby_plugin.cc
++ )
+
+-target_link_libraries(grpc_ruby_plugin
+- ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
+- ${_gRPC_PROTOBUF_LIBRARIES}
+- ${_gRPC_ALLTARGETS_LIBRARIES}
+- grpc_plugin_support
+-)
+
++ target_include_directories(grpc_ruby_plugin
++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
++ PRIVATE ${_gRPC_SSL_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTOBUF_INCLUDE_DIR}
++ PRIVATE ${_gRPC_ZLIB_INCLUDE_DIR}
++ PRIVATE ${_gRPC_BENCHMARK_INCLUDE_DIR}
++ PRIVATE ${_gRPC_CARES_INCLUDE_DIR}
++ PRIVATE ${_gRPC_GFLAGS_INCLUDE_DIR}
++ PRIVATE ${_gRPC_PROTO_GENS_DIR}
++ )
+
+-if (gRPC_INSTALL)
+- install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets
+- RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
+- LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
+- ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ target_link_libraries(grpc_ruby_plugin
++ ${_gRPC_PROTOBUF_PROTOC_LIBRARIES}
++ ${_gRPC_PROTOBUF_LIBRARIES}
++ ${_gRPC_ALLTARGETS_LIBRARIES}
++ grpc_plugin_support
+ )
+-endif()
+
++
++ if (gRPC_INSTALL)
++ install(TARGETS grpc_ruby_plugin EXPORT gRPCTargets
++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR}
++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
++ )
++ endif()
++endif()
+ if (gRPC_BUILD_TESTS)
+
+ add_executable(grpc_tool_test
diff --git a/ports/grpc/portfile.cmake b/ports/grpc/portfile.cmake index 54f294896..259fd222e 100644 --- a/ports/grpc/portfile.cmake +++ b/ports/grpc/portfile.cmake @@ -15,14 +15,10 @@ vcpkg_from_github( REF v1.10.1 SHA512 2221d902c60eada6dd1547a63d26bd3b30cb6710247b5e48523bacde498a3691cc177f1dbe9db8a007b8ae341a5b0c8ec999539e26a9bcff480a8d0b02140997 HEAD_REF master -) - -# Issue: https://github.com/grpc/grpc/issues/10759 -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext.patch ${CMAKE_CURRENT_LIST_DIR}/disable-csharp-ext-2.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch ) if(VCPKG_CRT_LINKAGE STREQUAL static) @@ -31,6 +27,14 @@ else() set(gRPC_MSVC_STATIC_RUNTIME OFF) endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(cares_CARES_PROVIDER OFF) +else() + set(cares_CARES_PROVIDER "package") +endif() + + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -41,7 +45,7 @@ vcpkg_configure_cmake( -DgRPC_ZLIB_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package - -DgRPC_CARES_PROVIDER=package + -DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER} -DgRPC_GFLAGS_PROVIDER=none -DgRPC_BENCHMARK_PROVIDER=none -DgRPC_INSTALL_CSHARP_EXT=OFF diff --git a/ports/http-parser/CMakeLists.txt b/ports/http-parser/CMakeLists.txt index d959fff79..284c8e903 100644 --- a/ports/http-parser/CMakeLists.txt +++ b/ports/http-parser/CMakeLists.txt @@ -1,8 +1,8 @@ -cmake_minimum_required (VERSION 3.4) -project (http-parser) +cmake_minimum_required(VERSION 3.4) +project(http-parser C) -if (BUILD_SHARED_LIBS) - SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() if(CMAKE_BUILD_TYPE MATCHES "Release") @@ -11,11 +11,21 @@ endif() add_library(http_parser http_parser.c http_parser.h) -install(TARGETS http_parser - RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" - ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" +target_include_directories(http_parser PUBLIC $<INSTALL_INTERFACE:include>) + +install( + TARGETS http_parser + EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin +) + +install( + EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS + NAMESPACE unofficial::http_parser:: + FILE unofficial-http-parser-config.cmake + DESTINATION share/unofficial-http-parser ) -if (NOT SKIP_INSTALL_HEADERS) - install(FILES http_parser.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include") -endif()
\ No newline at end of file +install(FILES http_parser.h DESTINATION include) diff --git a/ports/http-parser/CONTROL b/ports/http-parser/CONTROL index a9edf4071..26b9f8d34 100644 --- a/ports/http-parser/CONTROL +++ b/ports/http-parser/CONTROL @@ -1,3 +1,3 @@ Source: http-parser -Version: 2.7.1-2 +Version: 2.7.1-3 Description: HTTP Parser. diff --git a/ports/http-parser/portfile.cmake b/ports/http-parser/portfile.cmake index 728293eed..49f829a53 100644 --- a/ports/http-parser/portfile.cmake +++ b/ports/http-parser/portfile.cmake @@ -1,29 +1,25 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/http-parser-2.7.1) -vcpkg_download_distfile(ARCHIVE_FILE - URLS "https://github.com/nodejs/http-parser/archive/v2.7.1.zip" - FILENAME "http-parser-2.7.1.zip" - SHA512 9fb8b855ba7edb47628c91ac062d7ffce9c4bb8d6b8237d861d7926af989fb3e354c113821bdab1b8ac910f5f1064ca1339947aa20d56f6806b919b0cd6b6eae +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nodejs/http-parser + REF v2.7.1 + SHA512 c0fe86455db1a563a5c668f118dfa9a27b9a637ee1c0e2f2f18a5b816352436ed90435ea978e3f3d85b037d3c630234e47d609dc3b7086b898286c4e54d9f031 + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE_FILE}) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON + PREFER_NINJA ) vcpkg_install_cmake() vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/unofficial-http-parser" TARGET_PATH "share/unofficial-http-parser") + # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/http-parser) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/http-parser/LICENSE-MIT ${CURRENT_PACKAGES_DIR}/share/http-parser/copyright)
\ No newline at end of file +file(RENAME ${CURRENT_PACKAGES_DIR}/share/http-parser/LICENSE-MIT ${CURRENT_PACKAGES_DIR}/share/http-parser/copyright) diff --git a/ports/imgui/CONTROL b/ports/imgui/CONTROL index 6b6a82476..640dece87 100644 --- a/ports/imgui/CONTROL +++ b/ports/imgui/CONTROL @@ -1,3 +1,3 @@ Source: imgui -Version: 1.53 +Version: 1.60 Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. diff --git a/ports/imgui/portfile.cmake b/ports/imgui/portfile.cmake index 1ca99841d..7b18fc9ed 100644 --- a/ports/imgui/portfile.cmake +++ b/ports/imgui/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ocornut/imgui - REF v1.53 - SHA512 3e1ebf3844eaca3471064fa3d5792525c696b39f502c75235fae469038b73ae0eff198f13d5e1a35f86c011903cd379066afe1e22b6df769b9b16dc390f8b0c3 + REF v1.60 + SHA512 405b79ced59b4e4e45eebdbf278435f325a553e04338702dbdd3f30c7a39cb52a4dad91443bd99d19f61e60cd78d544fc1436ae2d10fef7c3a8a46cbb62685d9 HEAD_REF master ) diff --git a/ports/inja/CONTROL b/ports/inja/CONTROL new file mode 100644 index 000000000..a905ab796 --- /dev/null +++ b/ports/inja/CONTROL @@ -0,0 +1,4 @@ +Source: inja +Version: 1.0.0 +Build-Depends: nlohmann-json +Description: Inja - A Template Engine for Modern C++ diff --git a/ports/inja/portfile.cmake b/ports/inja/portfile.cmake new file mode 100644 index 000000000..dc9dc1a6b --- /dev/null +++ b/ports/inja/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pantor/inja + REF v1.0.0 + SHA512 39598df84766a0d2a28dc92e083e27b7072600372e0313727cd5dd1fe6ad1efc055dc98055247f5cb1fc4096ffb37b59995107f3456a4495bd01381ac6c74a2b + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/src/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/src/inja.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/inja RENAME copyright) +vcpkg_copy_pdbs() diff --git a/ports/ismrmrd/CONTROL b/ports/ismrmrd/CONTROL index 7aaa5a42b..3fe989da9 100644 --- a/ports/ismrmrd/CONTROL +++ b/ports/ismrmrd/CONTROL @@ -1,4 +1,4 @@ Source: ismrmrd
-Version: 1.3.2-1
+Version: 1.3.2-2
Description: ISMRM Raw Data Format
Build-Depends: pugixml
diff --git a/ports/ismrmrd/portfile.cmake b/ports/ismrmrd/portfile.cmake index a3557f0d2..1fda781b2 100644 --- a/ports/ismrmrd/portfile.cmake +++ b/ports/ismrmrd/portfile.cmake @@ -41,7 +41,7 @@ file(COPY ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe DESTINATION ${CURRENT_PAC file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ismrmrd_info.exe)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ismrmrd_info.exe)
-file(COPY ${CURRENT_BUILDTREES_DIR}/src/ismrmrd-1.3.2/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd)
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/ismrmrd/LICENSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/copyright)
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd)
diff --git a/ports/json-dto/CONTROL b/ports/json-dto/CONTROL new file mode 100644 index 000000000..2f8c57b00 --- /dev/null +++ b/ports/json-dto/CONTROL @@ -0,0 +1,4 @@ +Source: json-dto +Version: 0.2.5 +Description: A small header-only library for converting data between json representation and c++ structs. +Build-Depends: rapidjson diff --git a/ports/json-dto/portfile.cmake b/ports/json-dto/portfile.cmake new file mode 100644 index 000000000..037ce7f96 --- /dev/null +++ b/ports/json-dto/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +set(JSON_DTO_VERSION 0.2.5) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/json_dto-${JSON_DTO_VERSION}-vcpkg) + +vcpkg_download_distfile(ARCHIVE + URLS "https://bitbucket.org/sobjectizerteam/json_dto-0.2/downloads/json_dto-${JSON_DTO_VERSION}-vcpkg.zip" + FILENAME "json_dto-${JSON_DTO_VERSION}-vcpkg.zip" + SHA512 cc21f2abc2799cb9f1c95ae3ae3512869e33d7d0b79c3e05e71d6f0a4376dcf948d89a4d71fe4266efa9d84c19c8a4b8ca2bc8d3d8c217df9ba4e6b87e50c33e +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/dev + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DJSON_DTO_INSTALL=ON + -DJSON_DTO_TEST=OFF + -DJSON_DTO_SAMPLE=OFF + -DJSON_DTO_INSTALL_SAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/json-dto") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/json-dto) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/json-dto/LICENSE ${CURRENT_PACKAGES_DIR}/share/json-dto/copyright) diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 3cd30746a..ff23cda3e 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-04-17 +Version: 2018-05-17 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 3f4edbf38..51a7118c2 100644 --- a/ports/jsonnet/portfile.cmake +++ b/ports/jsonnet/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/jsonnet - REF 125012dd904a7d111adf1082b3dca5642dbfd418 - SHA512 1d03d92aee54862d7ae03227be290f24b283dc89d60e77ffa42bfa9485e9ff0e39a93c27cfb1049cee7015c25f6d62b27362bb0836973d2ac1f919276c33ab3c + REF d0ef48c976d9b72992001507ed3055baf56c2ba9 + SHA512 ffa1a0da01dd770e3de37ffc78cc623efecd4e667de184116b8d9fdcc28ebb1fd2b09425d7f20c3f4dc2f3e4c8a637a1057eb7de0c41d042dce9941fcd593b0a HEAD_REF master ) diff --git a/ports/keystone/CONTROL b/ports/keystone/CONTROL new file mode 100644 index 000000000..70443a202 --- /dev/null +++ b/ports/keystone/CONTROL @@ -0,0 +1,3 @@ +Source: keystone +Version: 0.9.1 +Description: Lightweight multi-platform, multi-architecture assembler framework diff --git a/ports/keystone/portfile.cmake b/ports/keystone/portfile.cmake new file mode 100644 index 000000000..6f740aeda --- /dev/null +++ b/ports/keystone/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO keystone-engine/keystone + REF 0.9.1 + SHA512 3bd9c3793d5862a0a8628b52da381625e62445f661dbd5ed715723e7d9db01ce3f9586e5ca0a5cc71e8ceb6c912050f5c28e3ccd540e72c8abcfd2f0d1bbae17 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON2) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DKEYSTONE_BUILD_STATIC=${KEYSTONE_BUILD_STATIC} + -DKEYSTONE_BUILD_SHARED=${KEYSTONE_BUILD_SHARED} + -DPYTHON_EXECUTABLE=${PYTHON2} + + # Add support for only a subset of architectures + #-DLLVM_TARGETS_TO_BUILD="AArch64;X86" +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXES) + file(REMOVE ${EXES}) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + # Move DLLs + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DLLS}) + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DLLS}) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/keystone + RENAME copyright +) diff --git a/ports/leveldb/CONTROL b/ports/leveldb/CONTROL index 5953bc35d..515d7dfea 100644 --- a/ports/leveldb/CONTROL +++ b/ports/leveldb/CONTROL @@ -1,3 +1,3 @@ Source: leveldb
-Version: 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-1
+Version: 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-2
Description: LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
diff --git a/ports/leveldb/portfile.cmake b/ports/leveldb/portfile.cmake index 387cfd96e..9d6892977 100644 --- a/ports/leveldb/portfile.cmake +++ b/ports/leveldb/portfile.cmake @@ -1,23 +1,20 @@ include(vcpkg_common_functions)
-set(VCPKG_LIBRARY_LINKAGE static)
-
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/leveldb-8b1cd3753b184341e837b30383832645135d3d73)
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported yet. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
vcpkg_from_github(
- OUT_SOURCE_PATH "leveldb"
- BRANCH "bitcoin-fork"
- REPO "bitcoin-core/leveldb"
- REF "8b1cd3753b184341e837b30383832645135d3d73"
+ OUT_SOURCE_PATH SOURCE_PATH
+ BRANCH "bitcoin-fork"
+ REPO "bitcoin-core/leveldb"
+ REF "8b1cd3753b184341e837b30383832645135d3d73"
SHA512 f5ad5fd21fb28ee052a4f3873abd58dab508c71621bcd482ab9e6ef4b57eca182c81502ddfe59736f5b2a54f2d05b397dd15982b3bd5d9039cd481eae3c7b958
)
-message(STATUS "Patching")
-
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/msvc_code_fix.diff)
-
-message(STATUS "Building")
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
diff --git a/ports/libarchive/CONTROL b/ports/libarchive/CONTROL index c17693807..dfcfa66b3 100644 --- a/ports/libarchive/CONTROL +++ b/ports/libarchive/CONTROL @@ -1,4 +1,4 @@ Source: libarchive
-Version: 3.3.2-1
+Version: 3.3.2-2
Description: Library for reading and writing streaming archives
Build-Depends: zlib, bzip2, libxml2, lz4, liblzma, openssl
diff --git a/ports/libarchive/fix-lz4.patch b/ports/libarchive/fix-lz4.patch new file mode 100644 index 000000000..6a3d974fc --- /dev/null +++ b/ports/libarchive/fix-lz4.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 73bf07b3..76a1d61d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -515,7 +515,10 @@ IF (LZ4_INCLUDE_DIR) + ENDIF (LZ4_INCLUDE_DIR) + + FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +-FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) ++FIND_LIBRARY(LZ4_LIBRARY_DEBUG NAMES lz4d liblz4d) ++FIND_LIBRARY(LZ4_LIBRARY_RELEASE NAMES lz4 liblz4) ++INCLUDE(SelectLibraryConfigurations) ++SELECT_LIBRARY_CONFIGURATIONS(LZ4) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) + IF(LZ4_FOUND) + +
\ No newline at end of file diff --git a/ports/libarchive/portfile.cmake b/ports/libarchive/portfile.cmake index a5bed4143..d361b7da8 100644 --- a/ports/libarchive/portfile.cmake +++ b/ports/libarchive/portfile.cmake @@ -15,7 +15,8 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fix-buildsystem.patch
- ${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch)
+ ${CMAKE_CURRENT_LIST_DIR}/fix-dependencies.patch
+ ${CMAKE_CURRENT_LIST_DIR}/fix-lz4.patch)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index 6a1755c3e..251624e3f 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -21,6 +21,7 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS + -DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent -DEVENT__DISABLE_BENCHMARK=ON -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_REGRESS=ON @@ -31,7 +32,7 @@ vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_fixup_cmake_targets() vcpkg_copy_pdbs() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) diff --git a/ports/libflac/CMakeLists.txt b/ports/libflac/CMakeLists.txt index 518419c4f..d6f01399a 100644 --- a/ports/libflac/CMakeLists.txt +++ b/ports/libflac/CMakeLists.txt @@ -7,15 +7,22 @@ if(NOT DEFINED LIBFLAC_ARCHITECTURE) message(FATAL_ERROR "Target architecture not specified") endif() -file(GLOB LIBFLAC_SOURCES - ${PROJECT_SOURCE_DIR}/src/libFLAC/*.c - ${PROJECT_SOURCE_DIR}/src/share/win_utf8_io/win_utf8_io.c) +file(GLOB LIBFLAC_SOURCES src/libFLAC/*.c) -file(GLOB LIBFLACXX_SOURCES - ${PROJECT_SOURCE_DIR}/src/libFLAC++/*.cpp) +if(WIN32) + list(APPEND LIBFLAC_SOURCES src/share/win_utf8_io/win_utf8_io.c) +else() + list(FILTER LIBFLAC_SOURCES EXCLUDE REGEX "windows[^/]*$") + + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h "#include <inttypes.h>") + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + add_definitions(-DHAVE_CONFIG_H) +endif() + +file(GLOB LIBFLACXX_SOURCES src/libFLAC++/*.cpp) -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(${PROJECT_SOURCE_DIR}/src/libFLAC/include) +include_directories(include) +include_directories(src/libFLAC/include) if(NOT LIBFLAC_ARCHITECTURE MATCHES arm) add_definitions(-DFLAC__SSE_OS) @@ -44,14 +51,15 @@ endif() add_definitions(-DPACKAGE_VERSION="1.3.2") add_definitions(-DFLAC__HAS_OGG) add_definitions(-DFLAC__ALIGN_MALLOC_DATA) # 32 byte boundary +add_definitions(-DHAVE_LROUND) add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_NONSTDC_NO_WARNINGS) add_library(libFLAC ${LIBFLAC_SOURCES}) add_library(libFLACXX ${LIBFLACXX_SOURCES}) -set_target_properties(libFLAC PROPERTIES OUTPUT_NAME flac) -set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME flac++) +set_target_properties(libFLAC PROPERTIES OUTPUT_NAME FLAC) +set_target_properties(libFLACXX PROPERTIES OUTPUT_NAME FLAC++) find_library(OGG_LIBRARY ogg) find_path(OGG_INCLUDE_DIR ogg/ogg.h) @@ -73,10 +81,10 @@ install(TARGETS libFLAC libFLACXX LIBRARY DESTINATION lib) if(NOT DEFINED LIBFLAC_SKIP_HEADERS) - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC/ + install(DIRECTORY include/FLAC/ DESTINATION include/FLAC FILES_MATCHING PATTERN "*.h") - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/FLAC++/ + install(DIRECTORY include/FLAC++/ DESTINATION include/FLAC++ FILES_MATCHING PATTERN "*.h") endif() diff --git a/ports/libflac/CONTROL b/ports/libflac/CONTROL index ca2995d68..1a16c7a6a 100644 --- a/ports/libflac/CONTROL +++ b/ports/libflac/CONTROL @@ -1,4 +1,4 @@ Source: libflac
-Version: 1.3.2-4
+Version: 1.3.2-5
Description: Library for manipulating FLAC files
Build-Depends: libogg
diff --git a/ports/libgo/CONTROL b/ports/libgo/CONTROL new file mode 100644 index 000000000..c5c06fd8b --- /dev/null +++ b/ports/libgo/CONTROL @@ -0,0 +1,4 @@ +Source: libgo +Version: 2.8-1 +Build-Depends: boost-context +Description: The best stackful coroutine by c++11. diff --git a/ports/libgo/cmake.patch b/ports/libgo/cmake.patch new file mode 100644 index 000000000..bed9cddaa --- /dev/null +++ b/ports/libgo/cmake.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dbbdd7d..29396a5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -137,7 +137,7 @@ if (UNIX)
+ set(CMAKE_CXX_FLAGS "-std=c++11 -fPIC -Wall -pthread ${CMAKE_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS_DEBUG "-g -pg ${CMAKE_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS_RELEASE "-g -O3 ${CMAKE_CXX_FLAGS}")
+-else ()
++elseif (NOT DISABLE_ADJUST_COMMAND_LINE_FLAGS)
+ if (NOT DISABLE_DYNAMIC_LIB)
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")
+@@ -159,7 +159,7 @@ set(STATIC_T "libgo_static")
+ add_library("${STATIC_T}" STATIC ${CO_SRC_LIST})
+ set_target_properties("${STATIC_T}" PROPERTIES OUTPUT_NAME "${TARGET}")
+
+-if (UNIX)
++if (UNIX OR FORCE_UNIX_TARGETS)
+ add_subdirectory(${PROJECT_SOURCE_DIR}/libgo/main)
+
+ if (NOT DISABLE_DYNAMIC_LIB)
+@@ -180,7 +180,11 @@ if (UNIX)
+ PATTERN "ctx_boost_coroutine" EXCLUDE
+ PATTERN "ctx_ucontext" EXCLUDE
+ PATTERN "*.h")
++ if(UNIX)
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/linux/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h")
++ else()
++ install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/windows/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h")
++ endif()
+ #file(WRITE ${PROJECT_SOURCE_DIR}/tools/libgo.conf "${CMAKE_INSTALL_PREFIX}/lib")
+ #install(FILES ${PROJECT_SOURCE_DIR}/tools/libgo.conf DESTINATION "/etc/ld.so.conf.d")
+ if (DEPEND_BOOST)
diff --git a/ports/libgo/libgo-config.cmake b/ports/libgo/libgo-config.cmake new file mode 100644 index 000000000..fd52f8dd3 --- /dev/null +++ b/ports/libgo/libgo-config.cmake @@ -0,0 +1,25 @@ +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +if(NOT LIBGO_FIND_COMPONENTS) + set(LIBGO_FIND_COMPONENTS libgo libgo) + if(LIBGO_FIND_REQUIRED) + set(LIBGO_FIND_REQUIRED_libgo TRUE) + endif() + + set(LIBGO_FOUND TRUE) +endif() + +set(LIBGO_INCLUDE_DIRS ${_DIR}/../../include) +set(LIBGO_LIBRARIES) +if (EXISTS ${_DIR}/../../lib/liblibgo.a) + list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/liblibgo.a) +endif() +if (EXISTS ${_DIR}/../../debug/lib/liblibgo.a) + list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/liblibgo.a) +endif() +if (EXISTS ${_DIR}/../../lib/libgo.lib) + list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/libgo.lib) +endif() +if (EXISTS ${_DIR}/../../debug/lib/libgo.lib) + list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/libgo.lib) +endif() diff --git a/ports/libgo/portfile.cmake b/ports/libgo/portfile.cmake new file mode 100644 index 000000000..01dabcb81 --- /dev/null +++ b/ports/libgo/portfile.cmake @@ -0,0 +1,63 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("libgo currently only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yyzybb537/libgo + REF v2.8 + SHA512 44784de4aec36ea321195c11c99a73de4f6f51285febdf6980e8aaced1fdfc0a34c6b1a8acc8c6b424e747310a1d7fb1604f722084c28ab91f8ebee15667d59b + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch +) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/XBased/xhook/archive/e18c450541892212ca4f11dc91fa269fabf9646f.tar.gz" + FILENAME "xhook-e18c450541892212ca4f11dc91fa269fabf9646f.tar.gz" + SHA512 1bcf320f50cff13d92013a9f0ab5c818c2b6b63e9c1ac18c5dd69189e448d7a848f1678389d8b2c08c65f907afb3909e743f6c593d9cfb21e2bb67d5c294a166 +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/third_party) + +vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}/third_party) +file(RENAME ${SOURCE_PATH}/third_party/xhook-e18c450541892212ca4f11dc91fa269fabf9646f ${SOURCE_PATH}/third_party/xhook) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDISABLE_ADJUST_COMMAND_LINE_FLAGS=ON + -DDISABLE_DYNAMIC_LIB=ON + -DENABLE_BOOST_CONTEXT=ON + -DFORCE_UNIX_TARGETS=ON + -DDISABLE_SYSTEMWIDE=ON +) + +vcpkg_install_cmake() + +# remove duplicated include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libgo/disable_hook) + +file(GLOB REL_MAIN ${CURRENT_PACKAGES_DIR}/lib/libgo_main.lib ${CURRENT_PACKAGES_DIR}/lib/liblibgo_main.a) +if(REL_MAIN) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(COPY ${REL_MAIN} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${REL_MAIN}) +endif() + +file(GLOB DBG_MAIN ${CURRENT_PACKAGES_DIR}/debug/lib/libgo_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/liblibgo_main.a) +if(DBG_MAIN) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(COPY ${DBG_MAIN} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${DBG_MAIN}) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgo RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/libgo-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgo) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/libgo/usage b/ports/libgo/usage new file mode 100644 index 000000000..a8f072947 --- /dev/null +++ b/ports/libgo/usage @@ -0,0 +1,5 @@ +The package libgo provides CMake integration:
+
+ find_package(libgo REQUIRED)
+ target_include_directories(main PRIVATE ${LIBGO_INCLUDE_DIRS})
+ target_link_libraries(main PRIVATE ${LIBGO_LIBRARIES})
diff --git a/ports/libqrencode/CONTROL b/ports/libqrencode/CONTROL index 0e96c99a9..056d6a92b 100644 --- a/ports/libqrencode/CONTROL +++ b/ports/libqrencode/CONTROL @@ -1,4 +1,4 @@ Source: libqrencode -Version: 4.0.0-1 +Version: 4.0.0-2 Build-Depends: libpng, libiconv Description: libqrencode - a fast and compact QR Code encoding library diff --git a/ports/libqrencode/portfile.cmake b/ports/libqrencode/portfile.cmake index ff0c2302b..72af0103e 100644 --- a/ports/libqrencode/portfile.cmake +++ b/ports/libqrencode/portfile.cmake @@ -39,7 +39,7 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll) endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/libqrencode-4.0.0/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqrencode) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqrencode) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libqrencode/COPYING ${CURRENT_PACKAGES_DIR}/share/libqrencode/copyright) vcpkg_copy_pdbs() diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake index 1c5cfed19..59a1499f4 100644 --- a/ports/libspatialite/portfile.cmake +++ b/ports/libspatialite/portfile.cmake @@ -24,14 +24,14 @@ if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(CL_FLAGS_DBG "/MDd /Zi") set(CL_FLAGS_REL "/MD /Ox") set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib") - set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib") set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib") set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib") else() set(CL_FLAGS_DBG "/MTd /Zi") set(CL_FLAGS_REL "/MT /Ox") set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/lib/libgeos.lib") - set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeos.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeosd.lib") set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib") set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzma.lib ws2_32.lib") endif() diff --git a/ports/libuv/CMakeLists.txt b/ports/libuv/CMakeLists.txt index 87c0a6c95..538169e09 100644 --- a/ports/libuv/CMakeLists.txt +++ b/ports/libuv/CMakeLists.txt @@ -2,24 +2,70 @@ cmake_minimum_required(VERSION 3.5) project(libuv C) file(GLOB UV_SOURCES_COMMON src/*.c) + +file(GLOB UV_SOURCES_UNIX + src/unix/async.c + src/unix/core.c + src/unix/dl.c + src/unix/fs.c + src/unix/getaddrinfo.c + src/unix/getnameinfo.c + src/unix/loop.c + src/unix/loop-watcher.c + src/unix/pipe.c + src/unix/poll.c + src/unix/process.c + src/unix/signal.c + src/unix/stream.c + src/unix/tcp.c + src/unix/thread.c + src/unix/timer.c + src/unix/tty.c + src/unix/udp.c + src/unix/proctitle.c +) +file(GLOB UV_SOURCES_LINUX + src/unix/linux-core.c + src/unix/linux-inotify.c + src/unix/linux-syscalls.c +) +file(GLOB UV_SOURCES_DARWIN + src/unix/kqueue.c + src/unix/darwin.c + src/unix/fsevents.c + src/unix/pthread-barrier.c + src/unix/darwin-proctitle.c +) file(GLOB UV_SOURCES_WIN src/win/*.c) -add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) -target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") -target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32) +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) + target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") + target_link_libraries(libuv iphlpapi psapi shell32 userenv ws2_32) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_DARWIN}) +else() # Assume some Linux variant + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_LINUX}) +endif() + target_include_directories(libuv PUBLIC ./include PRIVATE ./src) set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED) if(NOT UV_SKIP_HEADERS) install(FILES - include/tree.h - include/uv.h - include/uv-version.h - include/uv-errno.h - include/uv-threadpool.h - include/uv-win.h - DESTINATION include) + include/tree.h + include/uv.h + include/uv-version.h + include/uv-errno.h + include/uv-threadpool.h + include/uv-win.h + include/uv-unix.h + include/uv-darwin.h + include/pthread-barrier.h + DESTINATION include +) endif() + install(TARGETS libuv RUNTIME DESTINATION bin ARCHIVE DESTINATION lib diff --git a/ports/libuv/CONTROL b/ports/libuv/CONTROL index e861df239..6affcb3c2 100644 --- a/ports/libuv/CONTROL +++ b/ports/libuv/CONTROL @@ -1,3 +1,3 @@ Source: libuv -Version: 1.20.0 +Version: 1.20.3-2 Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/ports/libuv/portfile.cmake b/ports/libuv/portfile.cmake index 46ce33d8d..4f3d3f738 100644 --- a/ports/libuv/portfile.cmake +++ b/ports/libuv/portfile.cmake @@ -1,10 +1,12 @@ include(vcpkg_common_functions) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libuv/libuv - REF v1.20.0 - SHA512 382309cb6e54765b956b03357cb754f49d93505ba0e0122a77f33efca07d7b87966c993a5fd9f9503edd1bcd0f49ca42bd9cd9264cce94c847aebca77d237ba0 - HEAD_REF v1.x) + REF v1.20.3 + SHA512 60ebc0059ec9fdd022aa9d60b2a0340f29e037bf79fa08707f6f2ecca9ec263c7a6466bdc1f94e0875a6a627ee749efa86117dedb22119676a7bafed8b5d77a0 + HEAD_REF v1.x +) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -12,7 +14,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS_DEBUG - -DUV_SKIP_HEADERS=ON) + -DUV_SKIP_HEADERS=ON +) vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/libvorbis/CONTROL b/ports/libvorbis/CONTROL index 20f8c6e29..96b9ed8df 100644 --- a/ports/libvorbis/CONTROL +++ b/ports/libvorbis/CONTROL @@ -1,4 +1,4 @@ Source: libvorbis -Version: 1.3.5-143caf4-3 +Version: 1.3.6-112d3bd Description: Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format. Build-Depends: libogg diff --git a/ports/libvorbis/portfile.cmake b/ports/libvorbis/portfile.cmake index 26eb1dceb..6a862c84b 100644 --- a/ports/libvorbis/portfile.cmake +++ b/ports/libvorbis/portfile.cmake @@ -7,11 +7,11 @@ # include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/vorbis-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/vorbis-112d3bd0aaacad51305e1464d4b381dabad0e88b) vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/xiph/vorbis/archive/143caf4023a90c09a5eb685fdd46fb9b9c36b1ee.zip" - FILENAME "vorbis-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee.zip" - SHA512 9eeb64b1664ba8a1d118cdc5efc0090fe5f542eff33a16f4676fde8e59031fd0f9017857a7c45ca549899cab34efefd81dd54a57fab97f91f776fd9426f4e37a + URLS "https://github.com/xiph/vorbis/archive/112d3bd0aaacad51305e1464d4b381dabad0e88b.zip" + FILENAME "vorbis-112d3bd0aaacad51305e1464d4b381dabad0e88b.zip" + SHA512 94e773a34f3e8d1c8ed0422f0eab345b35f76a96760141af83d69d007ebf076fca2d083a77d36bfa4ea10dfefa03a8fa35201aced963655ab8a524aaa7580b11 ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index e6b595e0d..bf33021a2 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 2.4.2 +Version: 3.0.0 Build-Depends: zlib, openssl Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server. diff --git a/ports/libwebsockets/portfile.cmake b/ports/libwebsockets/portfile.cmake index 79a96007e..79903c3a4 100644 --- a/ports/libwebsockets/portfile.cmake +++ b/ports/libwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO warmcat/libwebsockets - REF v2.4.2 - SHA512 7bee49f6763ff3ab7861fcda25af8d80f6757c56e197ea42be53e0b2480969eee73de3aee5198f5ff06fd1cb8ab2be4c6495243e83cd0acc235b0da83b2353d1 + REF v3.0.0 + SHA512 626edd00cc4f7559c67fc1663cbc4679a3c4e7a1b60944a7cf6968c6676073bbc15f9b90f4f2ea629394ebbcf84856663ae032a3557bae383bd0db54838d30e8 HEAD_REF master ) diff --git a/ports/libxmlpp/CONTROL b/ports/libxmlpp/CONTROL index 46ec26ea1..890d1471d 100644 --- a/ports/libxmlpp/CONTROL +++ b/ports/libxmlpp/CONTROL @@ -1,4 +1,4 @@ Source: libxmlpp -Version: 2.40.1-1 +Version: 2.40.1-2 Description: a C++ wrapper for the libxml XML parser library. Build-Depends: libxml2, glibmm diff --git a/ports/libxmlpp/fixAutoPtrExpired.patch b/ports/libxmlpp/fixAutoPtrExpired.patch new file mode 100644 index 000000000..98d4df6bc --- /dev/null +++ b/ports/libxmlpp/fixAutoPtrExpired.patch @@ -0,0 +1,114 @@ +diff --git a/libxml++/parsers/saxparser.h b/libxml++/parsers/saxparser.h
+index 1362ca3..0bd36d2 100644
+--- a/libxml++/parsers/saxparser.h
++++ b/libxml++/parsers/saxparser.h
+@@ -221,7 +221,7 @@ private:
+ //TODO: Remove the virtual when we can break ABI?
+ virtual void parse();
+
+- std::auto_ptr<_xmlSAXHandler> sax_handler_;
++ std::unique_ptr<_xmlSAXHandler> sax_handler_;
+
+ // A separate xmlpp::Document that is just used for entity resolution,
+ // and never seen in the API:
+diff --git a/libxml++/parsers/textreader.h b/libxml++/parsers/textreader.h
+index 48901b2..17f0737 100644
+--- a/libxml++/parsers/textreader.h
++++ b/libxml++/parsers/textreader.h
+@@ -257,7 +257,7 @@ class TextReader: NonCopyable
+ void * locator);
+ void check_for_exceptions() const;
+
+- std::auto_ptr<PropertyReader> propertyreader;
++ std::unique_ptr<PropertyReader> propertyreader;
+ _xmlTextReader* impl_;
+ int severity_;
+ Glib::ustring error_;
+diff --git a/libxml++/relaxngschema.h b/libxml++/relaxngschema.h
+index 8df7089..ffe2eaa 100644
+--- a/libxml++/relaxngschema.h
++++ b/libxml++/relaxngschema.h
+@@ -23,7 +23,7 @@
+
+ #include <libxml++/schemabase.h>
+ #include <libxml++/document.h>
+-#include <memory> // std::auto_ptr
++#include <memory> // std::unique_ptr
+
+ #ifndef DOXYGEN_SHOULD_SKIP_THIS
+ extern "C" {
+@@ -105,7 +105,7 @@ protected:
+
+ private:
+ struct Impl;
+- std::auto_ptr<Impl> pimpl_;
++ std::unique_ptr<Impl> pimpl_;
+ };
+
+ } // namespace xmlpp
+diff --git a/libxml++/validators/relaxngvalidator.h b/libxml++/validators/relaxngvalidator.h
+index 5cd5ad7..cd29393 100644
+--- a/libxml++/validators/relaxngvalidator.h
++++ b/libxml++/validators/relaxngvalidator.h
+@@ -22,7 +22,7 @@
+ #define __LIBXMLPP_VALIDATOR_RELAXNGVALIDATOR_H
+
+ #include <libxml++/validators/schemavalidatorbase.h>
+-#include <memory> // std::auto_ptr
++#include <memory> // std::unique_ptr
+
+ namespace Glib
+ {
+@@ -156,7 +156,7 @@ protected:
+
+ private:
+ struct Impl;
+- std::auto_ptr<Impl> pimpl_;
++ std::unique_ptr<Impl> pimpl_;
+ };
+
+ } // namespace xmlpp
+diff --git a/libxml++/validators/xsdvalidator.h b/libxml++/validators/xsdvalidator.h
+index 941d7f1..d64b971 100644
+--- a/libxml++/validators/xsdvalidator.h
++++ b/libxml++/validators/xsdvalidator.h
+@@ -20,7 +20,7 @@
+ #define __LIBXMLPP_VALIDATOR_XSDVALIDATOR_H
+
+ #include <libxml++/validators/schemavalidatorbase.h>
+-#include <memory> // std::auto_ptr
++#include <memory> // std::unique_ptr
+
+ namespace Glib
+ {
+@@ -146,7 +146,7 @@ protected:
+
+ private:
+ struct Impl;
+- std::auto_ptr<Impl> pimpl_;
++ std::unique_ptr<Impl> pimpl_;
+ };
+
+ } // namespace xmlpp
+diff --git a/libxml++/xsdschema.h b/libxml++/xsdschema.h
+index 1333025..8220e4e 100644
+--- a/libxml++/xsdschema.h
++++ b/libxml++/xsdschema.h
+@@ -21,7 +21,7 @@
+
+ #include <libxml++/schemabase.h>
+ #include <libxml++/document.h>
+-#include <memory> // std::auto_ptr
++#include <memory> // std::unique_ptr
+
+ #ifndef DOXYGEN_SHOULD_SKIP_THIS
+ extern "C" {
+@@ -96,7 +96,7 @@ protected:
+
+ private:
+ struct Impl;
+- std::auto_ptr<Impl> pimpl_;
++ std::unique_ptr<Impl> pimpl_;
+ };
+
+ } // namespace xmlpp
diff --git a/ports/libxmlpp/portfile.cmake b/ports/libxmlpp/portfile.cmake index 8b6c758ac..9c39d6397 100644 --- a/ports/libxmlpp/portfile.cmake +++ b/ports/libxmlpp/portfile.cmake @@ -10,6 +10,11 @@ vcpkg_extract_source_archive(${ARCHIVE}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml++-${LIBXMLPP_VERSION} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/fixAutoPtrExpired.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 27604d397..37368dbc7 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,4 +1,4 @@ Source: llvm
-Version: 6.0.0
+Version: 6.0.0-1
Description: The LLVM Compiler Infrastructure
Build-Depends: atlmfc
diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index 795d72d31..650e2ae92 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -70,6 +70,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin
${CURRENT_PACKAGES_DIR}/msbuild-bin
${CURRENT_PACKAGES_DIR}/tools/msbuild-bin
+ ${CURRENT_PACKAGES_DIR}/include/llvm/BinaryFormat/WasmRelocs
)
# Remove one empty include subdirectory if it is indeed empty
diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL index 12a944ab5..0f31c87fb 100644 --- a/ports/lodepng/CONTROL +++ b/ports/lodepng/CONTROL @@ -1,3 +1,3 @@ Source: lodepng -Version: 2018-02-25 +Version: 2018-05-17 Description: PNG encoder and decoder in C and C++ diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake index 4fa423a0a..9b390b4ff 100644 --- a/ports/lodepng/portfile.cmake +++ b/ports/lodepng/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lvandeve/lodepng - REF 116f5b2ed7c4a9c6779ae291b79770727cbb11ad - SHA512 746528e4cb4c8678a91f607ff7c2d61f651a19ef1efcd4694deb0d2191970674de7e13331004f7702b31a335474cf71364c8da0fdc7c75852db3cb896f00a375 + REF d03d7df9888aafb9c7f615895c34b05acf033908 + SHA512 a7139f839ad161075909611527645c75758959626fbb5d892dc1bfba8df2d4c3cfa86328de5534386e6053843727d2bc453fd439a2e329fd3be5d36d77903a0f HEAD_REF master ) diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index 4a0f53689..bf2dd6c08 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4
-Version: 1.8.1.2-1
+Version: 1.8.2
Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core.
diff --git a/ports/lz4/portfile.cmake b/ports/lz4/portfile.cmake index 6150a35e6..bbeee708f 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lz4/lz4
- REF v1.8.1.2
- SHA512 f4ed450bc05477cc6c2b42e6fe1fbb1fb0907f1d05b68b1d69d975b555ddb385550f204258e6d91642e14ce373815141dc218cda03b711793935d5458bc45c7f
+ REF v1.8.2
+ SHA512 5fadc79334d37739c947d6dfc24f48ce82989fc5ee4f2bb8201ccf7ee3230b9e6e7c8488beb64050a035369f4247161d258bdb539578bec224ccebfef1b8a763
HEAD_REF dev)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
diff --git a/ports/magnum-extras/CONTROL b/ports/magnum-extras/CONTROL index d0f9f32d0..752f7333b 100644 --- a/ports/magnum-extras/CONTROL +++ b/ports/magnum-extras/CONTROL @@ -1,9 +1,9 @@ -Source: magnum-extras -Version: 2018.02-2 -Build-Depends: magnum -Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ -Default-Features: - -Feature: ui -Description: Ui library -Build-Depends: corrade[interconnect], magnum[text] +Source: magnum-extras
+Version: 2018.04-1
+Build-Depends: magnum
+Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/
+Default-Features:
+
+Feature: ui
+Description: Ui library
+Build-Depends: corrade[interconnect], magnum[text]
diff --git a/ports/magnum-extras/portfile.cmake b/ports/magnum-extras/portfile.cmake index d97508497..61aa619cd 100644 --- a/ports/magnum-extras/portfile.cmake +++ b/ports/magnum-extras/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-extras - REF v2018.02 - SHA512 62c0832d19a36e0f89ffcd958356130c81f577b1091a9232d43307868caf51a1fd186c4aa196bd456d3c37cb887c9802d80eb0b332893bafa812298dbc39d7b7 + REF v2018.04 + SHA512 2c933d0cad6f0b6580a84dba22bfdadf120a302246cab404a99749e0ba7bb0d799ee606ca43cc1c39f85ae37a00dcc7374b9fd05eb2bb07945c9371a9c8a8492 HEAD_REF master ) diff --git a/ports/magnum-integration/CONTROL b/ports/magnum-integration/CONTROL index a791e5718..a7fbebb5b 100644 --- a/ports/magnum-integration/CONTROL +++ b/ports/magnum-integration/CONTROL @@ -1,5 +1,5 @@ Source: magnum-integration -Version: 2018.02-1 +Version: 2018.04-1 Build-Depends: magnum Description: Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ Default-Features: diff --git a/ports/magnum-integration/portfile.cmake b/ports/magnum-integration/portfile.cmake index da9c393b7..4790d07d5 100644 --- a/ports/magnum-integration/portfile.cmake +++ b/ports/magnum-integration/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-integration - REF v2018.02 - SHA512 b2db442d5e29c117ee30ee2c37f5087c3d360158a52eb6bc19e5c1a0388a0ec1338c53e3fdad618bb6f4aba5d88fe10d20bb1539e5f21a309b8f06f2e195279c + REF v2018.04 + SHA512 ef22309dea452de8cf63d62f4b99f3e7b5b12b3580455e8fc1d53eabd921e24ec3824ce238a2b74cf0b6fd137e238b67c6b4653e750072b1105c6571e352d9fe HEAD_REF master ) diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 98e7e606d..9722245f6 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,28 +1,15 @@ Source: magnum-plugins -Version: 2018.02-2 +Version: 2018.04-1 Build-Depends: magnum Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ -Default-Features: anyimageimporter, anysceneimporter, anyimageconverter, ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter - -Feature: anyimageimporter -Description: AnyImageImporter plugin -Build-Depends: magnum[trade] - -Feature: anyaudioimporter -Description: AnyAudioImporter plugin -Build-Depends: magnum[audio] - -Feature: anyimageconverter -Description: AnyImageConverter plugin -Build-Depends: magnum[trade] - -Feature: anysceneimporter -Description: AnySceneImporter plugin -Build-Depends: magnum[trade] +Default-Features: ddsimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stbimageconverter, stbimageimporter Feature: assimpimporter Description: AssimpImporter plugin -Build-Depends: assimp, magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum[trade] +Build-Depends: assimp, magnum[anyimageimporter], magnum[trade] + +Feature: openddl +Description: OpenDdl library Feature: ddsimporter Description: DdsImporter plugin @@ -58,7 +45,7 @@ Build-Depends: magnum[trade] Feature: opengeximporter Description: OpenGexImporter plugin -Build-Depends: magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum[trade] +Build-Depends: magnum[anyimageimporter], magnum[trade], magnum-plugins[openddl] Feature: pngimageconverter Description: PngImageConverter plugin @@ -89,5 +76,5 @@ Description: StbVorbisAudioImporter plugin Build-Depends: magnum[audio] Feature: tinygltfimporter -Description: (Upcoming) TinyGltfImporter plugin -Build-Depends: magnum-plugins[anyimageimporter], magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade] +Description: TinyGltfImporter plugin +Build-Depends: magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade] diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index bedf9e395..54ea7659c 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum-plugins - REF v2018.02 - SHA512 650d3ec26b3c72aa98ffa242b072e382445de49d4849042faf5dac800d5e4cce223cac3fa1cc079fcb230632730af1d90ac7d347d152a1f31d224732499e96b4 + REF v2018.04 + SHA512 0b8ae1488e210d111826532299d1e29c5eba32c75f7c210caff088a9a57459b6354474c7a53fccd0c78553d67d79bf041d471b5822c59cb2c9612126cf3e49ef HEAD_REF master ) @@ -53,8 +53,9 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) -# Clean up empty directories -if(NOT FEATURES) +# Clean up empty directories, if not building anything. +# FEATURES may only contain "core", but that does not build anything. +if(NOT FEATURES OR FEATURES STREQUAL "core") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/lib @@ -63,26 +64,19 @@ if(NOT FEATURES) endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) - # move plugin libs to conventional place - file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) - file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) - file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + # move plugin libs to conventional place + file(GLOB_RECURSE LIB_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/magnum/*) + file(COPY ${LIB_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(GLOB_RECURSE LIB_TO_MOVE_DBG ${CURRENT_PACKAGES_DIR}/debug/lib/magnum/*) + file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) else() - # remove headers and libs for plugins - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) - # hint vcpkg - set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) - set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) endif() # Handle copyright diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 6f3aebadc..c34339938 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,5 +1,5 @@ Source: magnum -Version: 2018.02-2 +Version: 2018.04-1 Build-Depends: corrade[pluginmanager], corrade[utility] Description: C++11/C++14 graphics middleware for games and data visualization http://magnum.graphics/ Default-Features: anyimageimporter, anyaudioimporter, anyimageconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, shapes, text, texturetools, trade, sdl2application, windowlesswglapplication @@ -9,19 +9,19 @@ Description: magnum-al-info utility Build-Depends: magnum[audio] Feature: anyimageimporter -Description: (Upcoming) AnyImageImporter plugin +Description: AnyImageImporter plugin Build-Depends: magnum[trade] Feature: anyaudioimporter -Description: (Upcoming) AnyAudioImporter plugin +Description: AnyAudioImporter plugin Build-Depends: magnum[audio] Feature: anyimageconverter -Description: (Upcoming) AnyImageConverter plugin +Description: AnyImageConverter plugin Build-Depends: magnum[trade] Feature: anysceneimporter -Description: (Upcoming) AnySceneImporter plugin +Description: AnySceneImporter plugin Build-Depends: magnum[trade] Feature: audio @@ -40,10 +40,10 @@ Description: magnum-fontconverter utility Build-Depends: magnum[text], magnum[gl] Feature: gl -Description: (Upcoming) GL library +Description: GL library Feature: gl-info -Description: (Upcoming) gl-info utility +Description: gl-info utility Build-Depends: magnum[gl] Feature: glfwapplication @@ -58,9 +58,6 @@ Feature: imageconverter Description: magnum-imageconverter utility Build-Depends: magnum[trade] -Feature: magnuminfo -Description: magnum-info utility - Feature: magnumfont Description: MagnumFont plugin Build-Depends: magnum[text] @@ -101,10 +98,11 @@ Description: SceneGraph library Feature: shaders Description: Shaders library +Build-Depends: magnum[gl] Feature: text Description: Text library -Build-Depends: magnum[texturetools] +Build-Depends: magnum[texturetools], magnum[gl] Feature: texturetools Description: TextureTools library @@ -114,7 +112,7 @@ Description: TgaImporter plugin Build-Depends: magnum[trade] Feature: trade -Description: (Upcoming) Trade library +Description: Trade library Feature: wavaudioimporter Description: WavAudioImporter plugin diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index af22fbb60..e6b501e5a 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum - REF v2018.02 - SHA512 aeb0cab91ae0a7cca79c15ce98d9b2f8d46f5bc11bb90718e59188bf233154fb51668e0241112b65103f40e675736d74c86a2e5ccffcb698780ccedb1b3fb8bd + REF v2018.04 + SHA512 6ad50e782c8cb10157cf969a571f8c0c0c91161de60ac25cf86eda09106f4de73168618a1a5fe0931c3fd293c718911e14d610bd4f86fe3e073620bd7619a9eb HEAD_REF master ) @@ -90,11 +90,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(COPY ${LIB_TO_MOVE_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum) else() - # remove headers and libs for plugins - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/MagnumPlugins) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) - file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/magnum) file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/magnum-d) endif() diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index 488ca7a90..ca4f01835 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.25.8-4 -Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3).
\ No newline at end of file +Version: 1.25.8-5 +Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). diff --git a/ports/mpg123/portfile.cmake b/ports/mpg123/portfile.cmake index 891542f00..ff7645390 100644 --- a/ports/mpg123/portfile.cmake +++ b/ports/mpg123/portfile.cmake @@ -29,55 +29,128 @@ vcpkg_find_acquire_program(YASM) get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch" - "${CURRENT_PORT_DIR}/0002-fix-x86-build.patch") - -vcpkg_build_msbuild( - PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj - RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX} - DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX} -) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + "${CURRENT_PORT_DIR}/0001-fix-crt-linking.patch" + "${CURRENT_PORT_DIR}/0002-fix-x86-build.patch") -message(STATUS "Installing") -if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin - ) - file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj + RELEASE_CONFIGURATION Release_x86${MPG123_CONFIGURATION_SUFFIX} + DEBUG_CONFIGURATION Debug_x86${MPG123_CONFIGURATION_SUFFIX} ) -else() + + message(STATUS "Installing") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + else() + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + endif() + file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib ) file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib ) -endif() + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/mpg123.h + ${SOURCE_PATH}/src/libmpg123/fmt123.h + ${SOURCE_PATH}/src/libmpg123/mpg123.h.in + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + file(REMOVE_RECURSE ${SOURCE_PATH}/build/debug) + file(REMOVE_RECURSE ${SOURCE_PATH}/build/release) -file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file(INSTALL - ${SOURCE_PATH}/ports/MSVC++/mpg123.h - ${SOURCE_PATH}/src/libmpg123/fmt123.h - ${SOURCE_PATH}/src/libmpg123/mpg123.h.in - DESTINATION ${CURRENT_PACKAGES_DIR}/include -) + ################ + # Debug build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH}/configure" --prefix=${SOURCE_PATH}/build/debug --enable-debug=yes --enable-static=yes --disable-dependency-tracking --with-default-audio=coreaudio --with-module-suffix=.so + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done.") + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Installing ${TARGET_TRIPLET}-dbg done.") + + ################ + # Release build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make distclean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH}/configure" --prefix=${SOURCE_PATH}/build/release --enable-static=yes --disable-dependency-tracking --with-default-audio=coreaudio --with-module-suffix=.so + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done.") + + message(STATUS "Installing ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + message(STATUS "Installing ${TARGET_TRIPLET}-rel done.") + + file( + INSTALL + "${SOURCE_PATH}/build/debug/include/fmt123.h" + "${SOURCE_PATH}/build/debug/include/mpg123.h" + "${SOURCE_PATH}/build/debug/include/out123.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include + ) + + file( + INSTALL + "${SOURCE_PATH}/build/debug/lib/libmpg123.a" + "${SOURCE_PATH}/build/debug/lib/libout123.a" + DESTINATION + ${CURRENT_INSTALLED_DIR}/debug/lib + ) + + file( + INSTALL + "${SOURCE_PATH}/build/release/lib/libmpg123.a" + "${SOURCE_PATH}/build/release/lib/libout123.a" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib + ) +endif() file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpg123 RENAME copyright) diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index bc4ac2d1d..68398fb19 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-03-17 +Version: 2018-05-17 Description: Microsoft implementation of the Guidelines Support Library
\ No newline at end of file diff --git a/ports/ms-gsl/portfile.cmake b/ports/ms-gsl/portfile.cmake index c2ce611df..0a3518a8a 100644 --- a/ports/ms-gsl/portfile.cmake +++ b/ports/ms-gsl/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Microsoft/GSL - REF d846fe50a3f0bb7767c7e087a05f4be95f4da0ec - SHA512 83560cb0c39b6a4781e916c6081ad2728296e1b19760ca1b6426a8431fb6d7093760a882c539dd77152f5892fe081b1795af6366ea91385bb10aba6adf27170f + REF d6a2242d97827449f3f1c1c2e54214ceb9e80d62 + SHA512 d98d294e6560bc47f6b30fddf046be2a97bf9091c6e096c2c699db582d0322260c825c2357df2d2e55d017973c17798dd1d994931403534570789883f1d00321 HEAD_REF master ) diff --git a/ports/mujs/CONTROL b/ports/mujs/CONTROL index 10b776ab0..bb9ab194f 100644 --- a/ports/mujs/CONTROL +++ b/ports/mujs/CONTROL @@ -1,3 +1,3 @@ Source: mujs -Version: 25821e6d74fab5fcc200fe5e818362e03e114428 +Version: 2018-05-17 Description: An embeddable Javascript interpreter in C diff --git a/ports/mujs/portfile.cmake b/ports/mujs/portfile.cmake index 9af5984e8..5724f4593 100644 --- a/ports/mujs/portfile.cmake +++ b/ports/mujs/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ccxvii/mujs - REF 25821e6d74fab5fcc200fe5e818362e03e114428 - SHA512 8f4ae9151ce6b7ef4b1951d23f95167d16a2acb0eba4ee656ad56c92cd19af3e049c6903533d93caf0206f776374f3203b6a3f3e1748c4e720dc11ed8ac26342 + REF cbdf814ee25841ce2130e6d58b0ac607b508f045 + SHA512 7477d539c409985ca5849b7b7ef5f0dfd974f850b763bdbb1024faeda82a01eefdeb94ca6f7505f234e1670017d9e68b8d5de68f34124a83528b99301c02f03f HEAD_REF master ) diff --git a/ports/nghttp2/CONTROL b/ports/nghttp2/CONTROL index f4ff49ae0..0214aa9a3 100644 --- a/ports/nghttp2/CONTROL +++ b/ports/nghttp2/CONTROL @@ -1,3 +1,3 @@ Source: nghttp2 -Version: 1.30.0-1 +Version: 1.32.0 Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/ports/nghttp2/enable-static.patch b/ports/nghttp2/enable-static.patch index 3b58979cf..18e58daeb 100644 --- a/ports/nghttp2/enable-static.patch +++ b/ports/nghttp2/enable-static.patch @@ -1,23 +1,27 @@ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt -index 0846d06..290679f 100644 +index 17e422b..b2e7a6e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt -@@ -38,7 +38,7 @@ if(WIN32) +@@ -37,8 +37,8 @@ if(WIN32) + set(NGHTTP2_RES ${CMAKE_CURRENT_BINARY_DIR}/version.rc) endif() - # Public shared library +-# Public shared library -add_library(nghttp2 SHARED ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) ++# Public library +add_library(nghttp2 ${NGHTTP2_SOURCES} ${NGHTTP2_RES}) set_target_properties(nghttp2 PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION} -@@ -48,6 +48,9 @@ target_include_directories(nghttp2 INTERFACE - "${CMAKE_CURRENT_BINARY_DIR}/includes" +@@ -49,6 +49,10 @@ target_include_directories(nghttp2 INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/includes" ) + +if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(nghttp2 PUBLIC "-DNGHTTP2_STATICLIB") +endif() - - if(HAVE_CUNIT) ++ + if(HAVE_CUNIT OR ENABLE_STATIC_LIB) # Static library (for unittests because of symbol visibility) + add_library(nghttp2_static STATIC ${NGHTTP2_SOURCES}) + diff --git a/ports/nghttp2/portfile.cmake b/ports/nghttp2/portfile.cmake index 3c082c191..c2caa520c 100644 --- a/ports/nghttp2/portfile.cmake +++ b/ports/nghttp2/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) set(LIB_NAME nghttp2) -set(LIB_VERSION 1.30.0) +set(LIB_VERSION 1.32.0) set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) @@ -9,7 +9,7 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIB_NAME}-${LIB_VERSION}) vcpkg_download_distfile(ARCHIVE URLS "https://github.com/nghttp2/nghttp2/releases/download/v${LIB_VERSION}/${LIB_FILENAME}" FILENAME "${LIB_FILENAME}" - SHA512 26ce717a085e9fbdf8e644d4c8ab6961ca60029c4dfa112c9932523d1c4cc3f40fda4283afddf78a649e7f6fb7d3f3bfce3197186a4f70819b5996e8158089da + SHA512 f5bd36230cd42bd544d75b71af44f2fa2798363ddc1efb05499f6c8e86d54acfe6fde20f3d544ed560324a30141408dba6bc7e03e5f03ee7f7df532fb21aecbd ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 82fba8753..ffc589cb1 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-04-17 +Version: 2018-05-17 Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/ports/nuklear/portfile.cmake b/ports/nuklear/portfile.cmake index 99b60f8e6..9ad603d7b 100644 --- a/ports/nuklear/portfile.cmake +++ b/ports/nuklear/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vurtun/nuklear - REF b91a815c826619bfcacacad090e31b2dd3e1a20c - SHA512 d1966cd01a3d6e75608426f2813ec038dff1291674d481899c031248f0469b47b78f3e35b86a78090e3f019cc478c606d2b78bcc80117fb54de9ed5df22883a0 + REF b1209dbb2e087dacb1d5224c3f85675cabbe2330 + SHA512 940730caf6f3732c7846feaf48d3a91538985bc9f0c3b2fea66e395c99c1ca0c6252829152cac3d58dc04d39da19a9aa9b4d9134a6cd1a4ed2594931e22e0461 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/openal-soft/CONTROL b/ports/openal-soft/CONTROL index f7af2c687..cd7078c08 100644 --- a/ports/openal-soft/CONTROL +++ b/ports/openal-soft/CONTROL @@ -1,3 +1,3 @@ Source: openal-soft -Version: 1.18.2-1 +Version: 1.18.2-2 Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. diff --git a/ports/openal-soft/portfile.cmake b/ports/openal-soft/portfile.cmake index 527b4ba60..f35e81b4e 100644 --- a/ports/openal-soft/portfile.cmake +++ b/ports/openal-soft/portfile.cmake @@ -24,6 +24,14 @@ else() set(OPENAL_LIBTYPE "STATIC") endif() +if(VCPKG_CMAKE_SYSTEM_NAME) + set(ALSOFT_REQUIRE_WINDOWS OFF) + set(ALSOFT_REQUIRE_LINUX ON) +else() + set(ALSOFT_REQUIRE_WINDOWS ON) + set(ALSOFT_REQUIRE_LINUX OFF) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -36,7 +44,7 @@ vcpkg_configure_cmake( -DALSOFT_CONFIG=OFF -DALSOFT_HRTF_DEFS=OFF -DALSOFT_AMBDEC_PRESETS=OFF - -DALSOFT_BACKEND_ALSA=OFF + -DALSOFT_BACKEND_ALSA=${ALSOFT_REQUIRE_LINUX} -DALSOFT_BACKEND_OSS=OFF -DALSOFT_BACKEND_SOLARIS=OFF -DALSOFT_BACKEND_SNDIO=OFF @@ -47,9 +55,9 @@ vcpkg_configure_cmake( -DALSOFT_BACKEND_JACK=OFF -DALSOFT_BACKEND_OPENSL=OFF -DALSOFT_BACKEND_WAVE=ON - -DALSOFT_REQUIRE_WINMM=ON - -DALSOFT_REQUIRE_DSOUND=ON - -DALSOFT_REQUIRE_MMDEVAPI=ON + -DALSOFT_REQUIRE_WINMM=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_REQUIRE_DSOUND=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_REQUIRE_MMDEVAPI=${ALSOFT_REQUIRE_WINDOWS} ) vcpkg_install_cmake() diff --git a/ports/openexr/fix-static-linking.patch b/ports/openexr/fix-static-linking.patch new file mode 100644 index 000000000..af2f067f1 --- /dev/null +++ b/ports/openexr/fix-static-linking.patch @@ -0,0 +1,14 @@ +diff --git a/IlmImf/CMakeLists.txt b/IlmImf/CMakeLists.txt +index 18d90edc..21bbaa27 100644 +--- a/IlmImf/CMakeLists.txt ++++ b/IlmImf/CMakeLists.txt +@@ -25,8 +25,8 @@ ADD_EXECUTABLE ( dwaLookups + + TARGET_LINK_LIBRARIES ( dwaLookups + Half +- Iex${ILMBASE_LIBSUFFIX} + IlmThread${ILMBASE_LIBSUFFIX} ++ Iex${ILMBASE_LIBSUFFIX} + ${PTHREAD_LIB} + ) + diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index 7e3b6603f..b02a487a9 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -13,6 +13,7 @@ vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-missing-export.patch" "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-static-linking.patch" ) # Ensure helper executables can run during build @@ -20,7 +21,7 @@ set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin") # In debug build buildsystem cannot locate IlmBase headers set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}") -set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -I\"${CURRENT_INSTALLED_DIR}/include/OpenExr\"") +set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -I\"${CURRENT_INSTALLED_DIR}/include/OpenEXR\"") vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 7da61fcb7..2639d87e9 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,4 +1,4 @@ Source: openimageio -Version: 1.8.10 +Version: Release-1.9.2dev Description: A library for reading and writing images, and a bunch of related classes, utilities, and application -Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random +Build-Depends: libjpeg-turbo, tiff, libpng, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index a9bc35608..83d139f03 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -3,11 +3,14 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenImageIO/oiio - REF Release-1.8.10 - SHA512 8b80019feb6bffd63bdd64e4ddad5a85b42f0ed7c27f7d82475b60b0b4db3945bd70d8d75921dd9ae8830b941d7eef6b89364ee1ab418558b75397a784314949 + REF Release-1.9.2dev + SHA512 11293f09189f26a68e2e899e15081644c17f6ad1be070d090d9df133b98f7f30a09344a2b599c8b82dc8daba64847a9dfa278f9857bc110e975e9e06c3a2fa6f HEAD_REF master ) +file(REMOVE_RECURSE "${SOURCE_PATH}/ext") +file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl") + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) set(BUILDSTATIC ON) set(LINKSTATIC ON) @@ -37,6 +40,9 @@ vcpkg_configure_cmake( -DUSE_QT=OFF -DBUILDSTATIC=${BUILDSTATIC} -DLINKSTATIC=${LINKSTATIC} + -DBUILD_MISSING_PYBIND11=OFF + -DBUILD_MISSING_DEPS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON ) vcpkg_install_cmake() diff --git a/ports/openssl/vcpkg-cmake-wrapper.cmake b/ports/openssl/vcpkg-cmake-wrapper.cmake index 1e0500055..82313bdab 100644 --- a/ports/openssl/vcpkg-cmake-wrapper.cmake +++ b/ports/openssl/vcpkg-cmake-wrapper.cmake @@ -1,7 +1,10 @@ _find_package(${ARGS})
if(OPENSSL_FOUND)
- list(APPEND OPENSSL_LIBRARIES "dl")
- if(TARGET OpenSSL::Crypto)
- set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl")
+ find_library(OPENSSL_DL_LIBRARY NAMES dl)
+ if(OPENSSL_DL_LIBRARY)
+ list(APPEND OPENSSL_LIBRARIES "dl")
+ if(TARGET OpenSSL::Crypto)
+ set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl")
+ endif()
endif()
endif()
diff --git a/ports/openvr/CONTROL b/ports/openvr/CONTROL index 816a8751f..fe619c8af 100644 --- a/ports/openvr/CONTROL +++ b/ports/openvr/CONTROL @@ -1,3 +1,3 @@ Source: openvr -Version: 1.0.14 +Version: 1.0.15 Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. diff --git a/ports/openvr/portfile.cmake b/ports/openvr/portfile.cmake index 31e1658b1..02fa29e58 100644 --- a/ports/openvr/portfile.cmake +++ b/ports/openvr/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ValveSoftware/openvr - REF v1.0.14 - SHA512 2f38622121911ad4d59971fe88313f839fcb3bddae07af266b3b9f804a8c3855b4eb67d9153f0979db3465279dfcce9cb0bfe83451bf8639be5cdc9acafa2eda + REF v1.0.15 + SHA512 22ad52a659e1d2e4b52832400ac5c6766d1657cb81dfb9868bdc253120c661d41eeea68991eac44af9179d2bf6a346f038f1c444278a98b55b6b738af90ba1b5 HEAD_REF master ) diff --git a/ports/opus/CONTROL b/ports/opus/CONTROL index 6f794c986..e5c715bba 100644 --- a/ports/opus/CONTROL +++ b/ports/opus/CONTROL @@ -1,3 +1,3 @@ Source: opus -Version: 1.2.1 +Version: 1.2.1-1 Description: Totally open, royalty-free, highly versatile audio codec diff --git a/ports/opus/no-main.patch b/ports/opus/no-main.patch new file mode 100644 index 000000000..6c373de7b --- /dev/null +++ b/ports/opus/no-main.patch @@ -0,0 +1,14 @@ +diff --git a/win32/VS2015/opus.vcxproj b/win32/VS2015/opus.vcxproj
+index 33bf706..296bc79 100644
+--- a/win32/VS2015/opus.vcxproj
++++ b/win32/VS2015/opus.vcxproj
+@@ -350,9 +350,6 @@
+ <ClCompile Include="..\..\src\mlp.c" />
+ <ClCompile Include="..\..\src\mlp_data.c" />
+ <ClCompile Include="..\..\src\opus.c" />
+- <ClCompile Include="..\..\src\opus_compare.c">
+- <DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+- </ClCompile>
+ <ClCompile Include="..\..\src\opus_decoder.c" />
+ <ClCompile Include="..\..\src\opus_encoder.c" />
+ <ClCompile Include="..\..\src\opus_multistream.c" />
diff --git a/ports/opus/portfile.cmake b/ports/opus/portfile.cmake index 5bc9b6b60..ed2ed092e 100644 --- a/ports/opus/portfile.cmake +++ b/ports/opus/portfile.cmake @@ -9,6 +9,7 @@ vcpkg_from_github( REF v1.2.1 SHA512 fdc64b43875dd07dc9eb1c37e9a61d1c10e3095de62ed9597d51b93445136958c9f5fee78c33ae7f90c72a20200083cdc727d8e79f2f9e580ad4e2f8c50cccb4 HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-main.patch" ) # Ensure proper crt linkage diff --git a/ports/osgearth/CONTROL b/ports/osgearth/CONTROL new file mode 100644 index 000000000..34c5bad24 --- /dev/null +++ b/ports/osgearth/CONTROL @@ -0,0 +1,4 @@ +Source: osgearth +Version: 2.9 +Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping. +Build-Depends: osg diff --git a/ports/osgearth/portfile.cmake b/ports/osgearth/portfile.cmake new file mode 100644 index 000000000..501c38d08 --- /dev/null +++ b/ports/osgearth/portfile.cmake @@ -0,0 +1,64 @@ +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "Warning: Static building will not support load data through plugins.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL static) + message(FATAL_ERROR "osgearth does not support static CRT linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gwaldron/osgearth + REF d06e47995620674900d96eb694ff4866a29a9d4f + SHA512 d4b790dc2be4b6ffcd3ab5b4c1062bb56dd4503511ea3f4033a2546ce553dbd45535bfb70ba646416acebf67eba2e5d2740a05477387acad87956bf99fc4038a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +#Release +set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/osgearth) +set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/osgPlugins-3.5.6) + +file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PATH}) +file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH}) + +file(GLOB OSGEARTH_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/osgdb*.dll) + +file(COPY ${OSGEARTH_TOOLS} DESTINATION ${OSGEARTH_TOOL_PATH}) +file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) + +file(REMOVE_RECURSE ${OSGEARTH_TOOLS}) +file(REMOVE_RECURSE ${OSGDB_PLUGINS}) + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/osgearth) +set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/osgPlugins-3.5.6) + +file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PATH}) +file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + +file(GLOB OSGEARTH_DEBUG_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/osgdb*.dll) + +file(COPY ${OSGEARTH_DEBUG_TOOLS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PATH}) +file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + +file(REMOVE_RECURSE ${OSGEARTH_DEBUG_TOOLS}) +file(REMOVE_RECURSE ${OSGDB_DEBUG_PLUGINS}) + + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/osgearth) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/osgearth/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/osgearth/copyright)
\ No newline at end of file diff --git a/ports/parson/CONTROL b/ports/parson/CONTROL index 7c82a9eba..5a6d27896 100644 --- a/ports/parson/CONTROL +++ b/ports/parson/CONTROL @@ -1,3 +1,3 @@ Source: parson -Version: 2018-04-17 +Version: 2018-05-17 Description: a lighweight json library written in C diff --git a/ports/parson/portfile.cmake b/ports/parson/portfile.cmake index 87fda6451..134520fbd 100644 --- a/ports/parson/portfile.cmake +++ b/ports/parson/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kgabis/parson - REF 921da6f5d7b82ac3c8c809341028daafe47e3210 - SHA512 fac1989d03148c1efec5e483704e76110c6575258c7ad0585f4598c1666b22804b8bd672fa31869227b5334fb1ba0b70eb380a971950df1a8f52e56e646956d9 + REF 4f3eaa6849ba62404fc5756650168bb2056d0b46 + SHA512 dd98ebdb7f39387e600d529b8c92986f20781e7ec6b2baffcdc553e834be826ada4724247750300a897cacdee8f942d3c7d540e6bb410c2854a9291a80df847f HEAD_REF master ) diff --git a/ports/pcl/boost_uuid_random_generator_compat.patch b/ports/pcl/boost_uuid_random_generator_compat.patch new file mode 100644 index 000000000..891890b46 --- /dev/null +++ b/ports/pcl/boost_uuid_random_generator_compat.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0405dca2..00e5238e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -168,6 +168,8 @@ if(CMAKE_COMPILER_IS_MSVC) + endif() + endif() + ++add_definitions(-DBOOST_UUID_RANDOM_GENERATOR_COMPAT) ++ + if(CMAKE_COMPILER_IS_PATHSCALE) + if("${CMAKE_CXX_FLAGS}" STREQUAL "") + SET(CMAKE_CXX_FLAGS "-Wno-uninitialized -zerouv -pthread -mp") diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index 812e05674..12c9ec398 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/find_openni2.patch" "${CMAKE_CURRENT_LIST_DIR}/find_cuda.patch" "${CMAKE_CURRENT_LIST_DIR}/vs2017-15.4-workaround.patch" + "${CMAKE_CURRENT_LIST_DIR}/boost_uuid_random_generator_compat.patch" ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) diff --git a/ports/pdal/0001-win32_compiler_options.cmake.patch b/ports/pdal/0001-win32_compiler_options.cmake.patch new file mode 100644 index 000000000..8486cc1cd --- /dev/null +++ b/ports/pdal/0001-win32_compiler_options.cmake.patch @@ -0,0 +1,14 @@ +diff -Nuar a/cmake/win32_compiler_options.cmake b/cmake/win32_compiler_options.cmake
+--- a/cmake/win32_compiler_options.cmake 2018-04-06 20:24:17.000000000 +0200
++++ b/cmake/win32_compiler_options.cmake 2018-04-28 19:40:54.534593200 +0200
+@@ -67,10 +67,6 @@
+ endif()
+ endif()
+
+-set(CMAKE_INCLUDE_PATH "c:/OSGeo4W64/include;$ENV{CMAKE_INCLUDE_PATH}")
+-set(CMAKE_LIBRARY_PATH "c:/OSGeo4W64/lib;$ENV{CMAKE_LIBRARY_PATH}")
+-set(CMAKE_PREFIX_PATH "c:/OSGeo4W64/cmake;$ENV{CMAKE_LIBRARY_PATH}")
+-
+ #ABELL (& gadomski) - WHY?
+ set(PDAL_PLATFORM_WIN32 1)
+ set(WINSOCK_LIBRARY ws2_32)
diff --git a/ports/pdal/CONTROL b/ports/pdal/CONTROL new file mode 100644 index 000000000..1065a5c2d --- /dev/null +++ b/ports/pdal/CONTROL @@ -0,0 +1,4 @@ +Source: pdal
+Version: 1.7.1-2
+Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data.
+Build-Depends: gdal, geos, jsoncpp, libgeotiff
diff --git a/ports/pdal/FindGDAL.cmake b/ports/pdal/FindGDAL.cmake new file mode 100644 index 000000000..9683cb0e5 --- /dev/null +++ b/ports/pdal/FindGDAL.cmake @@ -0,0 +1,13 @@ +find_path(GDAL_INCLUDE_DIR gdal.h)
+
+find_library(GDAL_LIBRARY_DEBUG NAMES gdald)
+find_library(GDAL_LIBRARY_RELEASE NAMES gdal)
+
+include(SelectLibraryConfigurations)
+select_library_configurations(GDAL)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+ GDAL DEFAULT_MSG
+ GDAL_LIBRARY GDAL_INCLUDE_DIR
+)
diff --git a/ports/pdal/FindGEOS.cmake b/ports/pdal/FindGEOS.cmake new file mode 100644 index 000000000..88d17b073 --- /dev/null +++ b/ports/pdal/FindGEOS.cmake @@ -0,0 +1,13 @@ +find_path(GEOS_INCLUDE_DIR geos_c.h)
+
+find_library(GEOS_LIBRARY_DEBUG NAMES geos_cd)
+find_library(GEOS_LIBRARY_RELEASE NAMES geos_c)
+
+include(SelectLibraryConfigurations)
+select_library_configurations(GEOS)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+ GEOS DEFAULT_MSG
+ GEOS_LIBRARY GEOS_INCLUDE_DIR
+)
diff --git a/ports/pdal/FindGeoTIFF.cmake b/ports/pdal/FindGeoTIFF.cmake new file mode 100644 index 000000000..51a5fb2d8 --- /dev/null +++ b/ports/pdal/FindGeoTIFF.cmake @@ -0,0 +1,13 @@ +find_path(GEOTIFF_INCLUDE_DIR geotiff.h)
+
+find_library(GEOTIFF_LIBRARY_DEBUG NAMES geotiff_d)
+find_library(GEOTIFF_LIBRARY_RELEASE NAMES geotiff)
+
+include(SelectLibraryConfigurations)
+select_library_configurations(GEOTIFF)
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(
+ GEOTIFF DEFAULT_MSG
+ GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR
+)
diff --git a/ports/pdal/no-source-dir-writes.patch b/ports/pdal/no-source-dir-writes.patch new file mode 100644 index 000000000..f7ec12f6b --- /dev/null +++ b/ports/pdal/no-source-dir-writes.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index dc146d1..9b82544 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -140,7 +140,7 @@ get_git_head_revision(GIT_REFSPEC GIT_SHA1)
+
+ configure_file(
+ "${PROJECT_SOURCE_DIR}/gitsha.cpp.in"
+- "${PROJECT_SOURCE_DIR}/pdal/gitsha.cpp")
++ "${PROJECT_BINARY_DIR}/pdal/gitsha.cpp")
+
+ # needs to come before configuration of pdal_features
+ if(APPLE)
+@@ -201,6 +201,7 @@ file(GLOB BASE_SRCS
+ ${PDAL_IO_DIR}/*.cpp
+ ${PDAL_KERNELS_DIR}/*.cpp
+ ${PDAL_SRC_DIR}/*.cpp
++ ${PROJECT_BINARY_DIR}/pdal/gitsha.cpp
+ ${PDAL_SRC_DIR}/compression/*.cpp)
+ file(GLOB_RECURSE PRIVATE_SRCS
+ ${PDAL_FILTERS_DIR}/private/*.cpp
+diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
+index b02aa4a..d60b041 100644
+--- a/apps/CMakeLists.txt
++++ b/apps/CMakeLists.txt
+@@ -66,9 +66,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pdal.pc
+ if(UNIX OR APPLE)
+ # Autoconf compatibility variables to use the same script source.
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.in"
+- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config" @ONLY)
++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config" @ONLY)
+
+- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config"
++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config"
+ DESTINATION
+ "${PDAL_OUTPUT_BIN_DIR}/"
+ FILE_PERMISSIONS
+@@ -85,9 +85,9 @@ if(UNIX OR APPLE)
+ elseif(WIN32)
+ # Autoconf compatibility variables to use the same script source.
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config-bat.in"
+- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat" @ONLY)
++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat" @ONLY)
+
+- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat"
++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat"
+ DESTINATION
+ "${PDAL_OUTPUT_BIN_DIR}/"
+ FILE_PERMISSIONS
diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake new file mode 100644 index 000000000..cbcb97ced --- /dev/null +++ b/ports/pdal/portfile.cmake @@ -0,0 +1,82 @@ +# vcpkg portfile.cmake for PDAL +# +# NOTE: update the version string for new PDAL release +set(PDAL_VERSION_STR "1.7.1") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/PDAL-${PDAL_VERSION_STR}-src) + +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/pdal/PDAL-${PDAL_VERSION_STR}-src.tar.gz" + FILENAME "PDAL-${PDAL_VERSION_STR}-src.tar.gz" + SHA512 e3e63bb05930c1a28c4f46c7edfaa8e9ea20484f1888d845b660a29a76f1dd1daea3db30a98607be0c2eeb86930ec8bfd0965d5d7d84b07a4fe4cb4512da9b09 +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001-win32_compiler_options.cmake.patch + ${CMAKE_CURRENT_LIST_DIR}/no-source-dir-writes.patch +) + +file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") + +# Deploy custom CMake modules to enforce expected dependencies look-up +foreach(_module IN ITEMS FindGDAL FindGEOS FindGeoTIFF) + file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/${_module}.cmake + DESTINATION ${SOURCE_PATH}/cmake/modules/ + ) +endforeach() + +# NOTE: CMake native BUILD_SHARED_LIBS option will be set by vcpkg_configure_cmake +# TODO: Remove this as soon as PDAL switches to use BUILD_SHARED_LIBS +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(PDAL_BUILD_STATIC OFF) +else() + set(PDAL_BUILD_STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPDAL_BUILD_STATIC:BOOL=${PDAL_BUILD_STATIC} + -DWITH_TESTS:BOOL=OFF + -DWITH_COMPLETION:BOOL=OFF +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pdal/cmake) +vcpkg_copy_pdbs() + +# Install copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdal RENAME copyright +) + +# Install PDAL executable +file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(COPY ${_pdal_apps} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pdal) +file(REMOVE ${_pdal_apps}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +# Post-install clean-up +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib/pdal + ${CURRENT_PACKAGES_DIR}/debug/lib/pdal + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +else() + file(GLOB _pdal_bats ${CURRENT_PACKAGES_DIR}/bin/*.bat) + file(REMOVE ${_pdal_bats}) + file(GLOB _pdal_bats ${CURRENT_PACKAGES_DIR}/debug/bin/*.bat) + file(REMOVE ${_pdal_bats}) + file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${_pdal_apps}) +endif() diff --git a/ports/physfs/CONTROL b/ports/physfs/CONTROL index 20d973f18..a937d38bf 100644 --- a/ports/physfs/CONTROL +++ b/ports/physfs/CONTROL @@ -1,4 +1,4 @@ Source: physfs -Version: 2.0.3-2 +Version: 3.0.1 Description: a library to provide abstract access to various archives Build-Depends: zlib diff --git a/ports/plibsys/CONTROL b/ports/plibsys/CONTROL index 92d57ca47..3bb95f45b 100644 --- a/ports/plibsys/CONTROL +++ b/ports/plibsys/CONTROL @@ -1,3 +1,3 @@ Source: plibsys
-Version: 0.0.3-1
+Version: 0.0.4-1
Description: Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more.
diff --git a/ports/plibsys/portfile.cmake b/ports/plibsys/portfile.cmake index b70fe771d..210fddd37 100644 --- a/ports/plibsys/portfile.cmake +++ b/ports/plibsys/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO saprykin/plibsys
- REF 0.0.3
- SHA512 e2393fecb3e5feae81a4d60cd03e2ca17bc58453efaa5598beacdc5acedbc7c90374f9f851301fee08ace8dace843a2dff8c1c449cd457302363c98dd24e0415
+ REF 0.0.4
+ SHA512 61957666fb454469e1ff68435463eaf426e960caed33540dbb495e1aa7c446c9803d100f33f1a6ea70d5f2ee2d0d19ec315f3a8c651747f65a186ad061c05e51
HEAD_REF master
)
diff --git a/ports/pmdk/CONTROL b/ports/pmdk/CONTROL index f440b68bc..c8346d105 100644 --- a/ports/pmdk/CONTROL +++ b/ports/pmdk/CONTROL @@ -1,3 +1,3 @@ Source: pmdk -Version: 1.4-1 +Version: 1.4-2 Description: Persistent Memory Development Kit
\ No newline at end of file diff --git a/ports/pmdk/addPowerShellExecutionPolicy.patch b/ports/pmdk/addPowerShellExecutionPolicy.patch new file mode 100644 index 000000000..692ff176a --- /dev/null +++ b/ports/pmdk/addPowerShellExecutionPolicy.patch @@ -0,0 +1,22 @@ +diff --git a/src/windows/srcversion/srcversion.vcxproj b/src/windows/srcversion/srcversion.vcxproj
+index 8761197..795d1a7 100644
+--- a/src/windows/srcversion/srcversion.vcxproj
++++ b/src/windows/srcversion/srcversion.vcxproj
+@@ -72,7 +72,7 @@
+ </Command>
+ </PreBuildEvent>
+ <CustomBuildStep>
+- <Command>powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION)</Command>
++ <Command>powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION)</Command>
+ <Outputs>__NON_EXISTENT_FILE__</Outputs>
+ <Message>generate srcversion.h</Message>
+ </CustomBuildStep>
+@@ -99,7 +99,7 @@
+ </Command>
+ </PreBuildEvent>
+ <CustomBuildStep>
+- <Command>powershell.exe -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION)</Command>
++ <Command>powershell.exe -ExecutionPolicy Bypass -file "$(SolutionDir)..\utils\SRCVERSION.ps1" $(SRCVERSION)</Command>
+ <Outputs>__NON_EXISTENT_FILE__</Outputs>
+ <Message>generate srcversion.h</Message>
+ </CustomBuildStep>
diff --git a/ports/pmdk/portfile.cmake b/ports/pmdk/portfile.cmake index 89c48a8fb..215de2963 100644 --- a/ports/pmdk/portfile.cmake +++ b/ports/pmdk/portfile.cmake @@ -21,6 +21,9 @@ vcpkg_from_github( REF 1.4 SHA512 95dbea9acfea4a6cb433a25f56f7484946a93fbce1c5e0e1d6ff36e0824e3e0e9f28f37024918998358f8ff12e69d0902fcf88357b9ad12695f32e06e86ffac8 HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/addPowerShellExecutionPolicy.patch" + "${CMAKE_CURRENT_LIST_DIR}/v141.patch" ) get_filename_component(PMDK_VERSION "${SOURCE_PATH}" NAME) @@ -29,9 +32,6 @@ string(REPLACE "pmdk-" "" PMDK_VERSION "${PMDK_VERSION}") # Build only the selected projects vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln - PLATFORM x64 - PLATFORM_TOOLSET v140 - TARGET_PLATFORM_VERSION 10.0.16299.0 TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmemcto,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool" OPTIONS /p:SRCVERSION=${PMDK_VERSION} ) diff --git a/ports/pmdk/v141.patch b/ports/pmdk/v141.patch new file mode 100644 index 000000000..f77abe93f --- /dev/null +++ b/ports/pmdk/v141.patch @@ -0,0 +1,13 @@ +diff --git a/src/common/util.h b/src/common/util.h
+index 04b098f..33a64c2 100644
+--- a/src/common/util.h
++++ b/src/common/util.h
+@@ -284,7 +284,7 @@ typedef enum {
+ #error MSVC ports of util_atomic_ only work on X86_64
+ #endif
+
+-#if _MSC_VER > 1911
++#if _MSC_VER >= 2000
+ #error util_atomic_ utility functions not tested with this version of VC++
+ #error These utility functions are not future proof, as they are not
+ #error based on publicly available documentation.
diff --git a/ports/poco/CONTROL b/ports/poco/CONTROL index e979e2247..9656723bb 100644 --- a/ports/poco/CONTROL +++ b/ports/poco/CONTROL @@ -1,5 +1,5 @@ Source: poco -Version: 1.8.1-1 +Version: 1.9.0 Build-Depends: zlib, pcre, sqlite3, expat Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index 399f1a064..271e223f8 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO pocoproject/poco - REF poco-1.8.1-release - SHA512 ca57b30c10fc4e611dbdd90c7e36db34b8cb9a7dae675dc8aed37457a26d3433080caf26eaace85adf8d6a6ad7945c49f7c66f274b26fe9cc0c7d5107be3828e + REF poco-1.9.0-release + SHA512 de2346d62b2e89ba04abe62a83f6ede7a496e80bcbe53a880a1aa8e87a8ebd9a430dd70fdc6aada836bb1021c6df21375fd0cbcf62dbb6e29a2f65d6d90cf2b9 HEAD_REF master ) @@ -18,6 +18,7 @@ vcpkg_apply_patches( ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT) if("mysql" IN_LIST FEATURES) # enabling MySQL support @@ -31,6 +32,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DPOCO_STATIC=${POCO_STATIC} + -DPOCO_MT=${POCO_MT} -DENABLE_SEVENZIP=ON -DENABLE_TESTS=OFF -DPOCO_UNBUNDLED=ON # OFF means: using internal copy of sqlite, libz, pcre, expat, ... diff --git a/ports/podofo/CONTROL b/ports/podofo/CONTROL index 55fa20a28..2e36ace2f 100644 --- a/ports/podofo/CONTROL +++ b/ports/podofo/CONTROL @@ -1,4 +1,8 @@ Source: podofo -Version: 0.9.5-1 +Version: 0.9.5-2 Description: PoDoFo is a library to work with the PDF file format -Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype, fontconfig +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl (!windows&!uwp), freetype + +Feature: fontconfig +Description: Enable font manager support on Unix platforms. +Build-Depends: fontconfig diff --git a/ports/podofo/portfile.cmake b/ports/podofo/portfile.cmake index 7c62ea07a..c49534329 100644 --- a/ports/podofo/portfile.cmake +++ b/ports/podofo/portfile.cmake @@ -1,15 +1,3 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# - include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/podofo-0.9.5) vcpkg_download_distfile(ARCHIVE @@ -19,18 +7,31 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPODOFO_BUILD_LIB_ONLY=1 -DPODOFO_BUILD_SHARED=1 - ) -elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) - vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DPODOFO_BUILD_LIB_ONLY=1 -DPODOFO_BUILD_STATIC=1 - ) +set(PODOFO_NO_FONTMANAGER ON) +if("fontconfig" IN_LIST FEATURES) + set(PODOFO_NO_FONTMANAGER OFF) +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PODOFO_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PODOFO_BUILD_STATIC) + +set(IS_WIN32 OFF) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + set(IS_WIN32 ON) endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DPODOFO_BUILD_LIB_ONLY=1 + -DPODOFO_BUILD_SHARED=${PODOFO_BUILD_SHARED} + -DPODOFO_BUILD_STATIC=${PODOFO_BUILD_STATIC} + -DPODOFO_NO_FONTMANAGER=${PODOFO_NO_FONTMANAGER} + -DCMAKE_DISABLE_FIND_PACKAGE_FONTCONFIG=${PODOFO_NO_FONTMANAGER} + -DCMAKE_DISABLE_FIND_PACKAGE_LIBCRYPTO=${IS_WIN32} + -DCMAKE_DISABLE_FIND_PACKAGE_LIBIDN=ON +) + vcpkg_install_cmake() # Handle copyright diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index bc4e66fcd..f7532a967 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -59,11 +59,13 @@ string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" ) file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}") -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) -endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) + endif() endif() # Remove duplicate headers installed from debug build diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index ba20ec0c9..8b149b051 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.5.1-3 +Version: 3.5.1-4 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/fix-uwp.patch b/ports/protobuf/fix-uwp.patch new file mode 100644 index 000000000..ba09d5913 --- /dev/null +++ b/ports/protobuf/fix-uwp.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
+index 3afe376..1a0b6a7 100644
+--- a/cmake/CMakeLists.txt
++++ b/cmake/CMakeLists.txt
+@@ -151,6 +151,7 @@ if (MSVC)
+ /wd4506 # no definition for inline function 'function'
+ /wd4800 # 'type' : forcing value to bool 'true' or 'false' (performance warning)
+ /wd4996 # The compiler encountered a deprecated declaration.
++ /wd4703 # Potentially uninitialized local pointer variable 'name' used.
+ )
+ # Allow big object
+ add_definitions(/bigobj)
diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index a6875edb9..f96b5240b 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -19,6 +19,7 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" "${CMAKE_CURRENT_LIST_DIR}/export-ParseGeneratorParameter.patch" "${CMAKE_CURRENT_LIST_DIR}/js-embed.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-uwp.patch" ) if(CMAKE_HOST_WIN32) @@ -85,22 +86,16 @@ endfunction() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/include) -if(CMAKE_HOST_WIN32) - set(EXECUTABLE_SUFFIX ".exe") -else() - set(EXECUTABLE_SUFFIX "") -endif() - if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${CMAKE_EXECUTABLE_SUFFIX}" RELEASE_MODULE "${RELEASE_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") file(READ ${CURRENT_PACKAGES_DIR}/debug/share/protobuf/protobuf-targets-debug.cmake DEBUG_MODULE) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") - string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${EXECUTABLE_SUFFIX}" DEBUG_MODULE "${DEBUG_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc${CMAKE_EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protoc${CMAKE_EXECUTABLE_SUFFIX}" DEBUG_MODULE "${DEBUG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}") endif() diff --git a/ports/python3/CONTROL b/ports/python3/CONTROL index 0a730e517..c8331f8cf 100644 --- a/ports/python3/CONTROL +++ b/ports/python3/CONTROL @@ -1,3 +1,3 @@ Source: python3 -Version: 3.6.4 +Version: 3.6.4-1 Description: The Python programming language as an embeddable library
\ No newline at end of file diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 6285f9a9b..16b3a3db3 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -9,12 +9,12 @@ set(PYTHON_VERSION_PATCH 4) set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) + vcpkg_from_github( OUT_SOURCE_PATH TEMP_SOURCE_PATH REPO python/cpython REF v${PYTHON_VERSION} - SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637 + SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637 HEAD_REF master ) @@ -26,8 +26,9 @@ vcpkg_apply_patches( # We need per-triplet directories because we need to patch the project files differently based on the linkage # Because the patches patch the same file, they have to be applied in the correct order -file(COPY ${TEMP_SOURCE_PATH} DESTINATION ${SOURCE_PATH}) -set(SOURCE_PATH ${SOURCE_PATH}/cpython-${PYTHON_VERSION}) +set(SOURCE_PATH "${TEMP_SOURCE_PATH}-Lib-${VCPKG_LIBRARY_LINKAGE}-crt-${VCPKG_CRT_LINKAGE}") +file(REMOVE_RECURSE ${SOURCE_PATH}) +file(RENAME "${TEMP_SOURCE_PATH}" ${SOURCE_PATH}) if (VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_apply_patches( @@ -57,7 +58,7 @@ endif() vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj PLATFORM ${BUILD_ARCH}) - + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index e5bdba8a5..569540213 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -69,6 +69,8 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore set(PLATFORM "win32-msvc2015") elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") set(PLATFORM "win32-msvc2017") + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(PLATFORM "win32-msvc2013") endif() configure_qt( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/quirc/CONTROL b/ports/quirc/CONTROL index 1ba02d889..d86ea00ae 100644 --- a/ports/quirc/CONTROL +++ b/ports/quirc/CONTROL @@ -1,3 +1,3 @@ Source: quirc
-Version: 1.0-1
+Version: 1.0-2
Description: quirc is one of the C library available for scanning QR Codes
diff --git a/ports/quirc/portfile.cmake b/ports/quirc/portfile.cmake index 976c7bc92..fd05c3db4 100644 --- a/ports/quirc/portfile.cmake +++ b/ports/quirc/portfile.cmake @@ -11,7 +11,7 @@ vcpkg_from_github( file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_apply_patches(
- SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/quirc-1.0
+ SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/patch-for-msvc.patch
)
diff --git a/ports/range-v3-vs2015/CONTROL b/ports/range-v3-vs2015/CONTROL new file mode 100644 index 000000000..62c9f63ce --- /dev/null +++ b/ports/range-v3-vs2015/CONTROL @@ -0,0 +1,3 @@ +Source: range-v3-vs2015 +Version: 20151130-vcpkg5 +Description: Range library for C++11/14/17. diff --git a/ports/range-v3-vs2015/portfile.cmake b/ports/range-v3-vs2015/portfile.cmake new file mode 100644 index 000000000..bc7153a53 --- /dev/null +++ b/ports/range-v3-vs2015/portfile.cmake @@ -0,0 +1,14 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/Range-V3-VS2015 + REF 423bcae5cf18948591361329784d3b12ef41711b + SHA512 c6756bc6b5131c4c0ffb96550fb40decf734fc8c30e3d51c5c2bf03aae4d7426de36e896a1abf0a200a49a3906d4b60c1cf52f43504554b64d89c91de3e92746 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015/copyright) +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") +vcpkg_copy_pdbs() diff --git a/ports/range-v3/CONTROL b/ports/range-v3/CONTROL index 6325b3a55..ee21c16c9 100644 --- a/ports/range-v3/CONTROL +++ b/ports/range-v3/CONTROL @@ -1,3 +1,4 @@ Source: range-v3 -Version: 20151130-vcpkg5 +Version: 0.3.5 +Build-Depends: range-v3-vs2015 (windows), range-v3-vs2015 (uwp) Description: Range library for C++11/14/17. diff --git a/ports/range-v3/portfile.cmake b/ports/range-v3/portfile.cmake index b4c0c1403..cbeb38bf0 100644 --- a/ports/range-v3/portfile.cmake +++ b/ports/range-v3/portfile.cmake @@ -1,28 +1,36 @@ -#header-only library include(vcpkg_common_functions) -# set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d) -# vcpkg_download_distfile(ARCHIVE -# URLS "https://github.com/ericniebler/range-v3/archive/6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" -# FILENAME "range-v3-6eb5c831ffe12cd5cb96390dbe917ca1b248772d.zip" -# SHA512 2605af46c2c049f66dc982b1c4e506a8f115d47cc6c61a80f08921c667e52ad3097c485280ee43711c84b84a1490929e085b89cf9ad4c83b93222315210e92aa -# ) -# vcpkg_download_distfile(DIFF -# URLS "https://github.com/Microsoft/Range-V3-VS2015/compare/fork_base...00ed689bac7a9dcd8601dbde382758675516799d.diff" -# FILENAME "range-v3-fork_base_to_00ed689bac7a9dcd8601dbde382758675516799d.diff" -# SHA512 6158cd9ee1f5957294a26dc780c881839e0bae8610688a618cd11d47df34d5e543fa09ac9a3b33d4a65af8eceae0a6a3055621206c291ef75f982e7915daf91a -# ) -# vcpkg_extract_source_archive(${ARCHIVE}) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + message("The current range-v3 releases are not compatible with the current MSVC releases.") + message("The latest available range-v3 fork compatible with MSVC will be used instead.") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ericniebler/range-v3 + REF 0.3.5 + SHA512 0b8b97c32760f19e7a3f35b0f28b0c15c7735fbd1aa54f685c58faf50bf2cf112aed4ac7cfa9154b9caf7047400a6c7fd5c33d978f2e3cec6bc392a758aeabad + HEAD_REF master + ) -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/Range-V3-VS2015 - REF 423bcae5cf18948591361329784d3b12ef41711b - SHA512 c6756bc6b5131c4c0ffb96550fb40decf734fc8c30e3d51c5c2bf03aae4d7426de36e896a1abf0a200a49a3906d4b60c1cf52f43504554b64d89c91de3e92746 - HEAD_REF master -) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRANGE_V3_NO_TESTING=ON + -DRANGE_V3_NO_EXAMPLE=ON + -DRANGE_V3_NO_PERF=ON + -DRANGE_V3_NO_HEADER_CHECK=ON + ) -file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3/copyright) -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") -vcpkg_copy_pdbs() + vcpkg_install_cmake() + + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/range-v3) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + + vcpkg_copy_pdbs() + + file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3/copyright) +endif() diff --git a/ports/rapidjson/CONTROL b/ports/rapidjson/CONTROL index 0dd6333cf..7646755a5 100644 --- a/ports/rapidjson/CONTROL +++ b/ports/rapidjson/CONTROL @@ -1,3 +1,3 @@ Source: rapidjson -Version: 1.1.0 +Version: 1.1.0-1 Description: A fast JSON parser/generator for C++ with both SAX/DOM style API <http://rapidjson.org/> diff --git a/ports/rapidjson/portfile.cmake b/ports/rapidjson/portfile.cmake index 54f1c8eea..4f87ed6f4 100644 --- a/ports/rapidjson/portfile.cmake +++ b/ports/rapidjson/portfile.cmake @@ -9,10 +9,23 @@ vcpkg_from_github( HEAD_REF master ) +# Use RapidJSON's own build process, skipping examples and tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DRAPIDJSON_BUILD_DOC:BOOL=OFF + -DRAPIDJSON_BUILD_EXAMPLES:BOOL=OFF + -DRAPIDJSON_BUILD_TESTS:BOOL=OFF + -DCMAKE_INSTALL_DIR:STRING=cmake +) +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +# Delete redundant directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc) + # Put the licence file where vcpkg expects it -file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson) +file(COPY ${SOURCE_PATH}/license.txt ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidjson) file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidjson/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidjson/copyright) - -# Copy the rapidjson header files -file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") -vcpkg_copy_pdbs() diff --git a/ports/rapidjson/usage b/ports/rapidjson/usage new file mode 100644 index 000000000..81e541e17 --- /dev/null +++ b/ports/rapidjson/usage @@ -0,0 +1,4 @@ +The package rapidjson provides CMake integration:
+
+ find_package(RapidJSON REQUIRED)
+ target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS})
diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 0a1a4fb1d..9da837955 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ Source: re2
-Version: 2018-03-17 +Version: 2018-05-17 Description: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.
\ No newline at end of file diff --git a/ports/re2/portfile.cmake b/ports/re2/portfile.cmake index cec69eb6a..f92a24bf2 100644 --- a/ports/re2/portfile.cmake +++ b/ports/re2/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/re2
- REF f2cc1aeb5de463c45d020c446cbcb028385b49f3 - SHA512 68df93cac6916cf5d944b57de505f7c592dcc66bbe003dbaffdf88cfd6648787a272740a861d8c8440ff2888434776141a7710b326907687285f8e9340be127c
+ REF 6cf8ccd82dbaab2668e9b13596c68183c9ecd13f + SHA512 3a088cd94516ff4410de63d6fcaff999161e75be8014713177cbd030c95a8802712219b032ad651ac4781011db5e385b6d6e8b4a665196637edc4033b41a2c3c
HEAD_REF master
)
diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 2465fd1a4..ffceb5722 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,10 +1,7 @@ Source: realsense2 -Version: 2.10.1-1 +Version: 2.11.1 Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). -Feature: avx2 -Description: rgb image decode using avx2 - Feature: tools Build-Depends: opengl Description: Build Intel® RealSense™ examples and tools diff --git a/ports/realsense2/build_with_static_crt.patch b/ports/realsense2/build_with_static_crt.patch deleted file mode 100644 index ab8ec426d..000000000 --- a/ports/realsense2/build_with_static_crt.patch +++ /dev/null @@ -1,67 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9425b92d..21232504 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -299,6 +299,8 @@ if(BUILD_EASYLOGGINGPP)
- list(APPEND REALSENSE_HPP third-party/easyloggingpp/src/easylogging++.h)
- endif()
-
-+option(BUILD_WITH_STATIC_CRT "Build with static link CRT" ON)
-+
- if(WIN32)
- source_group("Source Files\\Backend" FILES
- src/win/win-helpers.cpp
-@@ -484,15 +486,17 @@ if(WIN32)
- src/proc/disparity-transform.h
- )
-
-- foreach(flag_var
-- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
-- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
-- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
-- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
-- if(${flag_var} MATCHES "/MD")
-- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
-- endif(${flag_var} MATCHES "/MD")
-- endforeach(flag_var)
-+ if(BUILD_WITH_STATIC_CRT)
-+ foreach(flag_var
-+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
-+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
-+ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
-+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
-+ if(${flag_var} MATCHES "/MD")
-+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
-+ endif(${flag_var} MATCHES "/MD")
-+ endforeach(flag_var)
-+ endif()
- else()
-
- endif()
-@@ -652,15 +656,17 @@ if (BUILD_WITH_TM2)
- list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake)
- find_package(libtm REQUIRED)
-
-- foreach(flag_var
-- CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
-- CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
-- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
-- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
-- if(${flag_var} MATCHES "/MD")
-- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
-- endif(${flag_var} MATCHES "/MD")
-- endforeach(flag_var)
-+ if(BUILD_WITH_STATIC_CRT)
-+ foreach(flag_var
-+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
-+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
-+ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
-+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
-+ if(${flag_var} MATCHES "/MD")
-+ string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
-+ endif(${flag_var} MATCHES "/MD")
-+ endforeach(flag_var)
-+ endif()
-
- list(APPEND REALSENSE_HPP
- src/tm2/tm-context.h
diff --git a/ports/realsense2/fix_rgb_using_avx2.patch b/ports/realsense2/fix_rgb_using_avx2.patch deleted file mode 100644 index 38ae33a7c..000000000 --- a/ports/realsense2/fix_rgb_using_avx2.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/src/image.cpp b/src/image.cpp
-index 47cc68d8..04a8afd3 100644
---- a/src/image.cpp
-+++ b/src/image.cpp
-@@ -8,6 +8,7 @@
-
- #ifdef __SSSE3__
- #include <tmmintrin.h> // For SSE3 intrinsic used in unpack_yuy2_sse
-+#include <immintrin.h>
- #endif
-
- #pragma pack(push, 1) // All structs in this file are assumed to be byte-packed
diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index 8e6b57392..8c80de5d6 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -3,51 +3,38 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF v2.10.1 - SHA512 fb00a424a5bd7335cc661261e76cf623e27a89af1033692d4cb6ed523af1295359929c235e82253911e61323cb7b82551a9223862174cb0e2363ac944b2db923 + REF v2.11.1 + SHA512 fa7d2e6262f0c90783a937a88aa32d89f4f36e96ead7356bde455f8eabbd09e798ce1736bccb07ecfa2f2d32c43cad2fff7f441d246856869c09ae3e06ad43f1 HEAD_REF development ) -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - ${CMAKE_CURRENT_LIST_DIR}/build_with_static_crt.patch # https://github.com/IntelRealSense/librealsense/pull/1262 - ${CMAKE_CURRENT_LIST_DIR}/fix_rgb_using_avx2.patch # https://github.com/IntelRealSense/librealsense/pull/1245 -) - string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LIBRARY_LINKAGE) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE) -# This option will be deprecated in the later versions. -# Please see Pull Request #1245. https://github.com/IntelRealSense/librealsense/pull/1245 -set(RGB_USING_AVX2 OFF) -if("avx2" IN_LIST FEATURES) - set(RGB_USING_AVX2 ON) -endif() - set(BUILD_EXAMPLES OFF) set(BUILD_GRAPHICAL_EXAMPLES OFF) if("tools" IN_LIST FEATURES) set(BUILD_EXAMPLES ON) set(BUILD_GRAPHICAL_EXAMPLES ON) - set(BUILD_TOOLS ON) endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS + #Ungrouped Entries -DENFORCE_METADATA=ON + # BUILD -DBUILD_EXAMPLES=${BUILD_EXAMPLES} -DBUILD_GRAPHICAL_EXAMPLES=${BUILD_GRAPHICAL_EXAMPLES} - -DBUILD_CV_EXAMPLES=OFF - -DBUILD_PCL_EXAMPLES=OFF - -DBUILD_PYTHON_BINDINGS=OFF + -DBUILD_SHARED_LIBS=${BUILD_LIBRARY_LINKAGE} -DBUILD_UNIT_TESTS=OFF -DBUILD_WITH_OPENMP=OFF - -DBUILD_SHARED_LIBS=${BUILD_LIBRARY_LINKAGE} -DBUILD_WITH_STATIC_CRT=${BUILD_CRT_LINKAGE} - -DRGB_USING_AVX2=${RGB_USING_AVX2} OPTIONS_DEBUG + # BUILD + -DBUILD_EXAMPLES=OFF + -DBUILD_GRAPHICAL_EXAMPLES=OFF + # CMAKE "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" -DCMAKE_DEBUG_POSTFIX="_d" ) @@ -59,7 +46,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(BUILD_TOOLS) +if(BUILD_EXAMPLES) file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) file(GLOB EXEFILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/realsense2) diff --git a/ports/restinio/CONTROL b/ports/restinio/CONTROL new file mode 100644 index 000000000..eed60e4c3 --- /dev/null +++ b/ports/restinio/CONTROL @@ -0,0 +1,4 @@ +Source: restinio
+Version: 0.4.5.1
+Description: A header-only C++14 library that gives you an embedded HTTP/Websocket server targeted primarily for asynchronous processing of HTTP-requests.
+Build-Depends: asio, fmt, http-parser
diff --git a/ports/restinio/portfile.cmake b/ports/restinio/portfile.cmake new file mode 100644 index 000000000..b2c496dfb --- /dev/null +++ b/ports/restinio/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions)
+
+set(RESTINIO_VERSION 0.4.5.1)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/restinio-${RESTINIO_VERSION}-vcpkg)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://bitbucket.org/sobjectizerteam/restinio-0.4/downloads/restinio-${RESTINIO_VERSION}-vcpkg.zip"
+ FILENAME "restinio-${RESTINIO_VERSION}-vcpkg.zip"
+ SHA512 198153f9b8d866c2aa57932720b31ff1f8e523d9640ad0c8becb911afed1fa12caa636847234cfc83d584a15bdc4b05fb98cbc4730af2520b453c5de468eb7fa
+)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}/vcpkg
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/restinio")
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/restinio)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/restinio/LICENSE ${CURRENT_PACKAGES_DIR}/share/restinio/copyright)
diff --git a/ports/rhash/CONTROL b/ports/rhash/CONTROL index 16b50c945..14b8768d4 100644 --- a/ports/rhash/CONTROL +++ b/ports/rhash/CONTROL @@ -1,3 +1,3 @@ Source: rhash -Version: 1.3.5-1 +Version: 1.3.6 Description: C library for computing a wide variety of hash sums diff --git a/ports/rhash/portfile.cmake b/ports/rhash/portfile.cmake index 749501375..cc1188c38 100644 --- a/ports/rhash/portfile.cmake +++ b/ports/rhash/portfile.cmake @@ -6,8 +6,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO rhash/RHash - REF v1.3.5 - SHA512 e8450aab0c16bfb975bf4aeee218740fb4d86d5514e426b70c3edb84e4d63865cd4051939aa95c24a87a78baaedc49e40bb509b2610e89ca3745930808b3ef6c + REF v1.3.6 + SHA512 54f7f238ed1fdc01c29cc1338fa86be90b69beff0df8f20d24ce9cb3c48c7f4668b84a3fe0d4d8b04b54bc8145485d493435edf3219de3a637af0f9c007c85c6 HEAD_REF master) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/librhash) diff --git a/ports/robin-map/CONTROL b/ports/robin-map/CONTROL new file mode 100644 index 000000000..f24dc8337 --- /dev/null +++ b/ports/robin-map/CONTROL @@ -0,0 +1,3 @@ +Source: robin-map +Version: 0.2.0 +Description: A C++ implementation of a fast hash map and hash set using robin hood hashing diff --git a/ports/robin-map/portfile.cmake b/ports/robin-map/portfile.cmake new file mode 100644 index 000000000..6436f6194 --- /dev/null +++ b/ports/robin-map/portfile.cmake @@ -0,0 +1,17 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tessil/robin-map + REF v0.2.0 + SHA512 6d16c612a0d646fd08857f2f6ee2909fb607ff05fa9c7733a2b618d662f63bba2f99677b75a09870a1582b7b37f255c4ff1f9171c897c3cfa73dd8879de1ec18 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/tsl DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/robin-map + RENAME copyright +) diff --git a/ports/rocksdb/0004-zlib-findpackage.patch b/ports/rocksdb/0004-zlib-findpackage.patch new file mode 100644 index 000000000..25182760d --- /dev/null +++ b/ports/rocksdb/0004-zlib-findpackage.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fb3b126..45ca7b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,7 +86,7 @@ else() + endif() + + if(WITH_ZLIB) +- find_package(zlib REQUIRED) ++ find_package(ZLIB REQUIRED) + add_definitions(-DZLIB) + include_directories(${ZLIB_INCLUDE_DIR}) + list(APPEND THIRDPARTY_LIBS ${ZLIB_LIBRARIES}) diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 852281924..a2747e3f5 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,5 +1,5 @@ Source: rocksdb -Version: 5.12.2 +Version: 5.13.1 Description: A library that provides an embeddable, persistent key-value store for fast storage Default-Features: zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 92ca0c2fa..1e2720b51 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb - REF v5.12.2 - SHA512 53e81e87e84f0500cd09d754c39e86265a16a52d4b84f9044f8d9759c224881eb7ef4bf89f9b01fdff25f123ed4dfa7b5cb272d2311f27b322c15fe2e893bbe3 + REF v5.13.1 + SHA512 70942aecb4decbe79a92cf3122c4d5d3232572084e2b018a911ce7149783c8047dbd338911644b7f3b6fc795fdd5f2971f75a8c5e4502f0765d6de0045bc970c HEAD_REF master ) @@ -13,6 +13,7 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/0002-disable-gtest.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-only-build-one-flavor.patch" + "${CMAKE_CURRENT_LIST_DIR}/0004-zlib-findpackage.patch" "${CMAKE_CURRENT_LIST_DIR}/use-find-package.patch" "${CMAKE_CURRENT_LIST_DIR}/pass-major-version.patch" ) diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index d7e583054..c20b05efb 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-04-12 +Version: 2018-05-17 Description: Minimal common utilities by Ross Smith diff --git a/ports/rs-core-lib/portfile.cmake b/ports/rs-core-lib/portfile.cmake index 0994afa4d..0fc091504 100644 --- a/ports/rs-core-lib/portfile.cmake +++ b/ports/rs-core-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/rs-core-lib - REF 529b74de173a77ba057ebc54d1f91629e7b643bd - SHA512 d836ee1c022522618f37fdeba941986977317fa68a909d8255e6abfd39564f72f47f8c78c2fa9e4ccc52da75987b56a02f8f2d5aad2890ef7b93ea843c85940c + REF eb5c851f4e82d31692d7c45225b41fdc374134aa + SHA512 e1a3a8cd16f069c8c58858dfe516df0aa2dd07f4e415a2ef7539104024910383217f75c16481347ef0a92a17faad98aa051320ec9e4693426ad9cd297983d923 HEAD_REF master ) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index b2f19fdf0..9bce21511 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.5 +Version: 4.1.8 Description: Sciter is an embeddable HTML/CSS/scripting engine. Maintainer: andrew.fedoniouk@gmail.com, ehysta@gmail.com diff --git a/ports/sciter/portfile.cmake b/ports/sciter/portfile.cmake index 7aeb87eee..b2f0f8f37 100644 --- a/ports/sciter/portfile.cmake +++ b/ports/sciter/portfile.cmake @@ -12,8 +12,8 @@ include(vcpkg_common_functions) # header-only library set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) -set(SCITER_REVISION 331bf886a39c1a003f61bb0c1a75037ec4c1e9e4) -set(SCITER_SHA b05b7c694fb75a3308a2684ad78587453d70d41dc0609dfec0a40b465bb8982c79867a63a898a09ed54f6fc516d0b014942824da7a642682b86710ffb23c7366) +set(SCITER_REVISION e7f7663ad85ec41223c4888e679df72e1d7c4835) +set(SCITER_SHA d76cd7e59d0768fa3ab61c04d1a73c0ea893ad420f672aa974e8038c6e2ca713cae625e3c0ea5d866ee229408bd5707deb5226ee4d7b93a270866c8a79de64ec) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) @@ -21,6 +21,7 @@ elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) set(SCITER_ARCH 32) endif() + # check out the `https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.tar.gz` # hash checksum can be obtained with `curl -L -o tmp.tgz ${URL} && vcpkg hash tmp.tgz` vcpkg_from_github( @@ -39,15 +40,15 @@ vcpkg_apply_patches( # install include directory file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter FILES_MATCHING - PATTERN "sciter-gtk-main.cpp" EXCLUDE - PATTERN "sciter-osx-main.mm" EXCLUDE PATTERN "*.cpp" + PATTERN "*.mm" PATTERN "*.h" PATTERN "*.hpp" ) set(SCITER_SHARE ${CURRENT_PACKAGES_DIR}/share/sciter) set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter) +set(TOOL_PERMS FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) # license file(COPY ${SOURCE_PATH}/logfile.htm DESTINATION ${SCITER_SHARE}) @@ -59,16 +60,42 @@ file(COPY ${SOURCE_PATH}/samples DESTINATION ${SCITER_SHARE}) file(COPY ${SOURCE_PATH}/widgets DESTINATION ${SCITER_SHARE}) # tools -file(INSTALL ${SOURCE_PATH}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS}) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux AND VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(SCITER_BIN ${SOURCE_PATH}/bin.gtk/x64) + + file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/usciter DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/inspector DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) + set(SCITER_BIN ${SOURCE_PATH}/bin.osx) + + file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/inspector.app DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter.app DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/inspector.exe DESTINATION ${SCITER_TOOLS}) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) -file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + set(SCITER_BIN ${SOURCE_PATH}/bin/${SCITER_ARCH}) + + file(INSTALL ${SOURCE_PATH}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SOURCE_PATH}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/sciter.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/inspector.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() message(STATUS "Warning: Sciter requires manual deployment of the correct DLL files.") diff --git a/ports/sdl2-mixer/CMakeLists.txt b/ports/sdl2-mixer/CMakeLists.txt index 1df35c44a..6992521b1 100644 --- a/ports/sdl2-mixer/CMakeLists.txt +++ b/ports/sdl2-mixer/CMakeLists.txt @@ -7,14 +7,14 @@ set(SDL_MIXER_INCLUDES ${SDL_INCLUDE_DIR}) set(SDL_MIXER_LIBRARIES ${SDL_LIBRARY}) # builtin formats -set(SDL_MIXER_DEFINES +set(SDL_MIXER_DEFINES MUSIC_WAV MUSIC_MID_NATIVE) # MP3 support if(SDL_MIXER_ENABLE_MP3) find_path(MPG123_INCLUDE_DIR mpg123.h) - find_library(MPG123_LIBRARY libmpg123) + find_library(MPG123_LIBRARY NAMES libmpg123 mpg123) list(APPEND SDL_MIXER_INCLUDES ${MPG123_INCLUDE_DIR}) list(APPEND SDL_MIXER_LIBRARIES ${MPG123_LIBRARY}) list(APPEND SDL_MIXER_DEFINES MUSIC_MP3_MPG123) @@ -47,7 +47,7 @@ if(SDL_MIXER_ENABLE_OGGVORBIS) list(APPEND SDL_MIXER_DEFINES MUSIC_OGG) endif() -add_library(SDL2_mixer +add_library(SDL2_mixer effect_position.c effect_stereoreverse.c effects_internal.c diff --git a/ports/sdl2-mixer/CONTROL b/ports/sdl2-mixer/CONTROL index e66081fc7..7f953a2f9 100644 --- a/ports/sdl2-mixer/CONTROL +++ b/ports/sdl2-mixer/CONTROL @@ -1,4 +1,4 @@ Source: sdl2-mixer -Version: 2.0.2-2 +Version: 2.0.2-4 Description: Multi-channel audio mixer library for SDL. Build-Depends: sdl2, libflac, mpg123, libmodplug, libvorbis diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index aea5f005e..5ee86e9bd 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_NET C) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +if (MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +endif() find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_library(SDL_LIBRARY NAMES SDL2d SDL2) diff --git a/ports/sdl2pp/CONTROL b/ports/sdl2pp/CONTROL new file mode 100644 index 000000000..19fecb092 --- /dev/null +++ b/ports/sdl2pp/CONTROL @@ -0,0 +1,4 @@ +Source: sdl2pp +Version: 0.16.0-1 +Description: C++11 bindings/wrapper for SDL2 https://sdl2pp.amdmi3.ru +Build-Depends: sdl2, sdl2-mixer, sdl2-image, sdl2-ttf diff --git a/ports/sdl2pp/find-debug-libs.patch b/ports/sdl2pp/find-debug-libs.patch new file mode 100644 index 000000000..282324345 --- /dev/null +++ b/ports/sdl2pp/find-debug-libs.patch @@ -0,0 +1,54 @@ +diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake
+index 8b2addb..4def5f3 100644
+--- a/cmake/FindSDL2.cmake
++++ b/cmake/FindSDL2.cmake
+@@ -8,8 +8,8 @@
+
+ FIND_PATH(SDL2_INCLUDE_DIR NAMES SDL.h PATH_SUFFIXES SDL2)
+
+-FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2)
+-FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2main)
++FIND_LIBRARY(SDL2_LIBRARY NAMES SDL2d SDL2)
++FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2maind SDL2main)
+
+ INCLUDE(FindPackageHandleStandardArgs)
+
+diff --git a/cmake/FindSDL2_image.cmake b/cmake/FindSDL2_image.cmake
+index 88adb3f..d6e829d 100644
+--- a/cmake/FindSDL2_image.cmake
++++ b/cmake/FindSDL2_image.cmake
+@@ -8,7 +8,7 @@
+
+ FIND_PATH(SDL2_IMAGE_INCLUDE_DIR NAMES SDL_image.h PATH_SUFFIXES SDL2)
+
+-FIND_LIBRARY(SDL2_IMAGE_LIBRARY NAMES SDL2_image)
++FIND_LIBRARY(SDL2_IMAGE_LIBRARY NAMES SDL2_imaged SDL2_image)
+
+ INCLUDE(FindPackageHandleStandardArgs)
+
+diff --git a/cmake/FindSDL2_mixer.cmake b/cmake/FindSDL2_mixer.cmake
+index ef5748b..c2dbbde 100644
+--- a/cmake/FindSDL2_mixer.cmake
++++ b/cmake/FindSDL2_mixer.cmake
+@@ -8,7 +8,7 @@
+
+ FIND_PATH(SDL2_MIXER_INCLUDE_DIR NAMES SDL_mixer.h PATH_SUFFIXES SDL2)
+
+-FIND_LIBRARY(SDL2_MIXER_LIBRARY NAMES SDL2_mixer)
++FIND_LIBRARY(SDL2_MIXER_LIBRARY NAMES SDL2_mixerd SDL2_mixer)
+
+ INCLUDE(FindPackageHandleStandardArgs)
+
+diff --git a/cmake/FindSDL2_ttf.cmake b/cmake/FindSDL2_ttf.cmake
+index b480d55..9fb65b9 100644
+--- a/cmake/FindSDL2_ttf.cmake
++++ b/cmake/FindSDL2_ttf.cmake
+@@ -8,7 +8,7 @@
+
+ FIND_PATH(SDL2_TTF_INCLUDE_DIR NAMES SDL_ttf.h PATH_SUFFIXES SDL2)
+
+-FIND_LIBRARY(SDL2_TTF_LIBRARY NAMES SDL2_ttf)
++FIND_LIBRARY(SDL2_TTF_LIBRARY NAMES SDL2_ttfd SDL2_ttf)
+
+ INCLUDE(FindPackageHandleStandardArgs)
+
diff --git a/ports/sdl2pp/portfile.cmake b/ports/sdl2pp/portfile.cmake new file mode 100644 index 000000000..7fbaf9c69 --- /dev/null +++ b/ports/sdl2pp/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libSDL2pp/libSDL2pp + REF 0.16.0 + SHA512 36603a0b1c3ba9294fffa5368357866e5689ceed9743352ff52c096d8b0070cc3f8708a5e837c10c871b410b6bda3ed7e8e3b95cb9afc136d91afb035cde6361 + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/find-debug-libs.patch" +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL2PP_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSDL2PP_WITH_EXAMPLES=OFF + -DSDL2PP_WITH_TESTS=OFF + -DSDL2PP_STATIC=${SDL2PP_STATIC} +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2pp RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/selene/CONTROL b/ports/selene/CONTROL new file mode 100644 index 000000000..ddf9e22ea --- /dev/null +++ b/ports/selene/CONTROL @@ -0,0 +1,4 @@ +Source: selene
+Version: 0.1.1
+Description: A C++14 image representation, processing and I/O library.
+Build-Depends: zlib, libpng, libjpeg-turbo
diff --git a/ports/selene/portfile.cmake b/ports/selene/portfile.cmake new file mode 100644 index 000000000..c292a64d1 --- /dev/null +++ b/ports/selene/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions)
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/selene-0.1.1)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ set(SELENE_EXPORT_SYMBOLS TRUE)
+else()
+ set(SELENE_EXPORT_SYMBOLS FALSE)
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO kmhofmann/selene
+ REF v0.1.1
+ SHA512 7738c7b803ae6178f0099b2db2148d20edeff01c524e108e724896201800d82d3852a1ab7d0bd697907673d7030c55c81411f77bb957a0ee3811c46d07104c3e
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=${SELENE_EXPORT_SYMBOLS}
+)
+
+vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${PORT}")
+vcpkg_copy_pdbs()
+
+# Include files should not be duplicated into the /debug/include directory.
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/selene RENAME copyright)
\ No newline at end of file diff --git a/ports/sfml/CMakeLists.txt b/ports/sfml/CMakeLists.txt deleted file mode 100644 index e8e16edec..000000000 --- a/ports/sfml/CMakeLists.txt +++ /dev/null @@ -1,122 +0,0 @@ -cmake_minimum_required(VERSION 2.6) -project(SFML) - -include_directories(${PROJECT_SOURCE_DIR}/include) -include_directories(${PROJECT_SOURCE_DIR}/src) - -if(NOT BUILD_SHARED_LIBS) - add_definitions(-DSFML_STATIC) -endif() -add_definitions(-DUNICODE -D_UNICODE) -add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) - -# import SFML's 'sfml_add_library' macro and find_package utils - -set(VERSION_MAJOR 2) -set(SFML_OS_WINDOWS ON) -set(SFML_GENERATE_PDB ON) -include(cmake/macros.cmake) -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules/) - -# system module - -file(GLOB SFML_SYSTEM_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/System/*.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/System/Win32/*cpp) - -sfml_add_library(sfml-system - SOURCES ${SFML_SYSTEM_SOURCES} - EXTERNAL_LIBS winmm) - -# window module - -file(GLOB SFML_WINDOW_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Window/*.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/Window/Win32/*cpp) - -list(REMOVE_ITEM SFML_WINDOW_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Window/EGLCheck.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/Window/EglContext.cpp) - -sfml_add_library(sfml-window - SOURCES ${SFML_WINDOW_SOURCES} - DEPENDS sfml-system - EXTERNAL_LIBS winmm gdi32 opengl32) - -# network module - -file(GLOB SFML_NETWORK_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Network/*.cpp - ${PROJECT_SOURCE_DIR}/src/SFML/Network/Win32/*cpp) - -sfml_add_library(sfml-network - SOURCES ${SFML_NETWORK_SOURCES} - DEPENDS sfml-system - EXTERNAL_LIBS ws2_32) - -# audio module - -file(GLOB SFML_AUDIO_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Audio/*.cpp) - -find_package(OpenAL REQUIRED) -find_package(Vorbis REQUIRED) -find_package(FLAC REQUIRED) - -sfml_add_library(sfml-audio - SOURCES ${SFML_AUDIO_SOURCES} - DEPENDS sfml-system - EXTERNAL_LIBS ${OPENAL_LIBRARY} ${VORBIS_LIBRARIES} ${FLAC_LIBRARY}) - -target_include_directories(sfml-audio SYSTEM PRIVATE ${OPENAL_INCLUDE_DIR}) -target_include_directories(sfml-audio SYSTEM PRIVATE ${VORBIS_INCLUDE_DIRS}) -target_include_directories(sfml-audio SYSTEM PRIVATE ${FLAC_INCLUDE_DIR}) - -# graphics module - -file(GLOB SFML_GRAPHICS_SOURCES - ${PROJECT_SOURCE_DIR}/src/SFML/Graphics/*.cpp) - -find_package(JPEG REQUIRED) -find_package(Freetype REQUIRED) # fails to find debug lib -if(CMAKE_BUILD_TYPE MATCHES Debug) - find_library(FREETYPE_DEBUG_LIBRARY freetyped) - set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_DEBUG_LIBRARY}) -else() - set(FREETYPE_ACTUAL_LIBRARY ${FREETYPE_LIBRARY}) -endif() -find_path(STB_HEADERS stb_image.h) - -sfml_add_library(sfml-graphics - SOURCES ${SFML_GRAPHICS_SOURCES} - DEPENDS sfml-system sfml-window - EXTERNAL_LIBS ${FREETYPE_ACTUAL_LIBRARY} ${JPEG_LIBRARY} opengl32) - -target_include_directories(sfml-graphics SYSTEM PRIVATE ${STB_HEADERS}) -target_include_directories(sfml-graphics SYSTEM PRIVATE ${FREETYPE_INCLUDE_DIRS}) -target_include_directories(sfml-graphics SYSTEM PRIVATE ${JPEG_INCLUDE_DIR}) -set_target_properties(sfml-graphics PROPERTIES COMPILE_FLAGS -DSTBI_FAILURE_USERMSG) - -# main module - -add_library(sfml-main STATIC ${PROJECT_SOURCE_DIR}/src/SFML/Main/MainWin32.cpp) -set_target_properties(sfml-main PROPERTIES DEBUG_POSTFIX -d) -install(TARGETS sfml-main ARCHIVE DESTINATION lib) - -# headers - -if(NOT DEFINED SFML_SKIP_HEADERS) - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include) -endif() - -# log linked libraries - -message(STATUS "Link-time dependencies:") -message(STATUS " " ${VORBIS_LIBRARY}) -message(STATUS " " ${VORBISFILE_LIBRARY}) -message(STATUS " " ${VORBISENC_LIBRARY}) -message(STATUS " " ${OGG_LIBRARY}) -message(STATUS " " ${OPENAL_LIBRARY}) -message(STATUS " " ${FLAC_LIBRARY}) -message(STATUS " " ${FREETYPE_ACTUAL_LIBRARY}) -message(STATUS " " ${JPEG_LIBRARY}) diff --git a/ports/sfml/CONTROL b/ports/sfml/CONTROL index 778638482..dbc86b29b 100644 --- a/ports/sfml/CONTROL +++ b/ports/sfml/CONTROL @@ -1,4 +1,4 @@ Source: sfml
-Version: 2.4.2-2
+Version: 2.5.0
Description: Simple and fast multimedia library
-Build-Depends: freetype, libflac, libjpeg-turbo, libogg, libvorbis, openal-soft, stb
+Build-Depends: freetype, libflac, libogg, libvorbis, openal-soft, stb, freeglut (!uwp&&!windows)
diff --git a/ports/sfml/portfile.cmake b/ports/sfml/portfile.cmake index ea4cfd138..f07a199e6 100644 --- a/ports/sfml/portfile.cmake +++ b/ports/sfml/portfile.cmake @@ -1,21 +1,33 @@ include(vcpkg_common_functions)
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
- REPO "sfml/sfml"
- REF "2.4.2"
+ REPO SFML/SFML
+ REF 2.5.0
HEAD_REF master
- SHA512 8acfdf320939c953a9a3413398f82d02d68a56a337f1366c2677c14ce032baa8ba059113ac3c91bb6e6fc22eef119369a265be7ef6894526e6a97a01f37e1972)
-
+ SHA512 94306dcbed7d68bb7e226cd91e25950a07bcf393988c4bb79f9de3555c18c78cae4573e911235f712e711a7c02a614bf370df32b8d85240d2f08142327e05076
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/portfile.cmake"
+)
file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs)
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+# Without this, we get error: list sub-command REMOVE_DUPLICATES requires list to be present.
+file(MAKE_DIRECTORY ${SOURCE_PATH}/extlibs/libs)
+file(WRITE ${SOURCE_PATH}/extlibs/libs/x "")
+
+if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ message("SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev mesa-common-dev")
+endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS_DEBUG
- -DSFML_SKIP_HEADERS=ON)
+ OPTIONS
+ -DSFML_BUILD_FRAMEWORKS=OFF
+ -DSFML_USE_SYSTEM_DEPS=ON
+ -DSFML_MISC_INSTALL_PREFIX=share/sfml
+ -DSFML_GENERATE_PDB=OFF
+)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SFML)
vcpkg_copy_pdbs()
# don't force users to define SFML_STATIC while using static library
@@ -24,14 +36,19 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) endif()
# move sfml-main to manual link dir
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
-file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib)
-file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
-file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib)
-
-# At the time of writing, HEAD has license.md instead of license.txt
-if (VCPKG_HEAD_VERSION)
- file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright)
-else()
- file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright)
-endif()
\ No newline at end of file +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib)
+ file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib)
+ file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+ file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib)
+ file(GLOB FILES "${CURRENT_PACKAGES_DIR}/share/sfml/SFML*Targets-*.cmake")
+ foreach(FILE ${FILES})
+ file(READ "${FILE}" _contents)
+ string(REPLACE "/lib/sfml-main" "/lib/manual-link/sfml-main" _contents "${_contents}")
+ file(WRITE "${FILE}" "${_contents}")
+ endforeach()
+endif()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
+
+file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfml RENAME copyright)
diff --git a/ports/soci/CONTROL b/ports/soci/CONTROL index 1d1708a64..41b3d4190 100644 --- a/ports/soci/CONTROL +++ b/ports/soci/CONTROL @@ -1,3 +1,4 @@ Source: soci -Version: 2016.10.22-1 +Version: 3.2.3-1 +Build-Depends: sqlite3 Description: SOCI database access library diff --git a/ports/soci/no-define-snprintf.patch b/ports/soci/no-define-snprintf.patch new file mode 100644 index 000000000..ab6db0d1a --- /dev/null +++ b/ports/soci/no-define-snprintf.patch @@ -0,0 +1,14 @@ +diff --git a/src/core/soci-platform.h b/src/core/soci-platform.h
+index aa5e4b1..2d8c5c7 100644
+--- a/src/core/soci-platform.h
++++ b/src/core/soci-platform.h
+@@ -24,7 +24,9 @@
+ #endif
+
+ // Define if you have the snprintf variants.
++#if _MSC_VER < 1900
+ #define snprintf _snprintf
++#endif
+
+ // Define if you have the strtoll and strtoull variants.
+ #if _MSC_VER < 1300
diff --git a/ports/soci/portfile.cmake b/ports/soci/portfile.cmake index 0358297c5..b26355293 100644 --- a/ports/soci/portfile.cmake +++ b/ports/soci/portfile.cmake @@ -1,53 +1,44 @@ -# Common Ambient Variables: -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# TARGET_TRIPLET is the current triplet (x86-windows, etc) -# PORT is the current port name (zlib, etc) -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# - include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/soci-6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/SOCI/soci/archive/6eb1a3e9775ab7cdbf0f7f5aa5891792313cd8d9.zip" - FILENAME "soci-master-2016.10.22.zip" - SHA512 6bb0f7d3442de627089760485d3e663f12873b4871c4b4b4dfac5d380bad014865ac8382f7356e02514e9140f187dea8dcf8d6c25ac9c3e827e9fa69e9ed13b5 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SOCI/soci + REF 3.2.3 + SHA512 8c597b37efe82c85e6d951f66cb0f818d2c12cb673914bc7b322bc0a9da676e6c02f221c9104fb06d1b4b02fed4e5a4fb872dd3370b9117f248c3b948faf4fb3 + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/no-define-snprintf.patch" ) -vcpkg_extract_source_archive(${ARCHIVE}) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - set(SOCI_STATIC OFF) - set(SOCI_DYNAMIC ON) -elseif(VCPKG_LIBRARY_LINKAGE STREQUAL static) - set(SOCI_STATIC ON) - set(SOCI_DYNAMIC OFF) -endif() +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SOCI_STATIC) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA OPTIONS -DSOCI_TESTS=OFF -DSOCI_CXX_C11=ON - -DSOCI_LIBDIR=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds + -DSOCI_LIBDIR:STRING=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds + -DLIBDIR:STRING=lib -DSOCI_STATIC=${SOCI_STATIC} -DSOCI_SHARED=${SOCI_DYNAMIC} + + -DWITH_SQLITE3=ON + + -DWITH_BOOST=OFF + -DWITH_MYSQL=OFF + -DWITH_ODBC=OFF + -DWITH_ORACLE=OFF + -DWITH_POSTGRESQL=OFF + -DWITH_FIREBIRD=OFF + -DWITH_DB2=OFF ) vcpkg_install_cmake() -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/soci) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/SOCI-release.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCI-release.cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/cmake/SOCI-debug.cmake ${CURRENT_PACKAGES_DIR}/share/soci/SOCI-debug.cmake) -file(READ ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake CONFIG_FILE) -set(pattern "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n") -string(REPLACE "${pattern}" "${pattern}${pattern}" CONFIG_FILE ${CONFIG_FILE}) -file(WRITE ${CURRENT_PACKAGES_DIR}/share/soci/SOCIConfig.cmake ${CONFIG_FILE}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) +file(COPY ${SOURCE_PATH}/src/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/soci) file(RENAME ${CURRENT_PACKAGES_DIR}/share/soci/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/soci/copyright) vcpkg_copy_pdbs()
\ No newline at end of file diff --git a/ports/soil/CMakeLists.txt b/ports/soil/CMakeLists.txt new file mode 100644 index 000000000..5cee52a60 --- /dev/null +++ b/ports/soil/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 3.8) + +project(SOIL C) + +option(INSTALL_HEADERS "Install header files" ON) + +set(INSTALL_CMAKE_DIR share/soil) + +add_library(SOIL STATIC + src/image_helper.c + src/stb_image_aug.c + src/image_DXT.c + src/SOIL.c) + +target_include_directories(SOIL INTERFACE $<INSTALL_INTERFACE:include>) + +if(INSTALL_HEADERS) + install(TARGETS SOIL + EXPORT SOILTargets + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + + install(FILES src/SOIL.h + DESTINATION include/SOIL/) + + # Prepare and install package files + set(SOIL_VERSION "2018.7.7") + + export(TARGETS SOIL FILE "${PROJECT_BINARY_DIR}/SOILTargets.cmake") + + export(PACKAGE SOIL) + + # Create the SOILConfig.cmake and SOILConfigVersion files + configure_file(SOILConfig.cmake.in "${PROJECT_BINARY_DIR}/SOILConfig.cmake" @ONLY) + configure_file(SOILConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" @ONLY) + + # Install the SOILConfig.cmake and SOILConfigVersion.cmake + install(FILES + "${PROJECT_BINARY_DIR}/SOILConfig.cmake" + "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" + DESTINATION "${INSTALL_CMAKE_DIR}") + + # Install the export set for use with the install-tree + install(EXPORT SOILTargets DESTINATION + "${INSTALL_CMAKE_DIR}") +else() + install(TARGETS SOIL + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) +endif() diff --git a/ports/soil/CONTROL b/ports/soil/CONTROL new file mode 100644 index 000000000..412857025 --- /dev/null +++ b/ports/soil/CONTROL @@ -0,0 +1,3 @@ +Source: soil +Version: 2008.07.07-1 +Description: Simple OpenGL Image Library diff --git a/ports/soil/LICENSE b/ports/soil/LICENSE new file mode 100644 index 000000000..22f05fdf9 --- /dev/null +++ b/ports/soil/LICENSE @@ -0,0 +1,6 @@ +https://www.lonesock.net/soil.html + +Simple OpenGL Image Library + +License: +Public Domain diff --git a/ports/soil/SOILConfig.cmake.in b/ports/soil/SOILConfig.cmake.in new file mode 100644 index 000000000..730e8879f --- /dev/null +++ b/ports/soil/SOILConfig.cmake.in @@ -0,0 +1,13 @@ +# - Config file for the SOIL package +# It defines the following variables +# SOIL_INCLUDE_DIRS - include directories for SOIL +# SOIL_LIBRARIES - libraries to link against + +# Load targets +get_filename_component(SOIL_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +include("${SOIL_CMAKE_DIR}/SOILTargets.cmake") + +# Set properties +get_target_property(SOIL_INCLUDE_DIRS SOIL INTERFACE_INCLUDE_DIRECTORIES) +set(SOIL_LIBRARIES SOIL) +mark_as_advanced(SOIL_INCLUDE_DIRS SOIL_LIBRARIES) diff --git a/ports/soil/SOILConfigVersion.cmake.in b/ports/soil/SOILConfigVersion.cmake.in new file mode 100644 index 000000000..1e3e04965 --- /dev/null +++ b/ports/soil/SOILConfigVersion.cmake.in @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "@SOIL_VERSION@") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/ports/soil/portfile.cmake b/ports/soil/portfile.cmake new file mode 100644 index 000000000..69073e22d --- /dev/null +++ b/ports/soil/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/Simple OpenGL Image Library") +vcpkg_download_distfile(ARCHIVE + URLS "http://www.lonesock.net/files/soil.zip" + FILENAME "soil-2008.07.07.zip" + SHA512 a575a84aa65b7556320779d635561341f5cf156418d0462473e5d1eb082829be3bcb30600b4887af75aeddd3715de16bdb3ca1668ebaa93eea62bacf22b79548 +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/SOILConfig.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/SOILConfigVersion.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/LICENSE + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soil RENAME copyright) diff --git a/ports/sol/CONTROL b/ports/sol/CONTROL index 42b1be455..aa276b1f2 100644 --- a/ports/sol/CONTROL +++ b/ports/sol/CONTROL @@ -1,3 +1,3 @@ Source: sol -Version: 2.19.5 +Version: 2.20.0-1 Description: Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great diff --git a/ports/sol/portfile.cmake b/ports/sol/portfile.cmake index c65202380..8e6516d9a 100644 --- a/ports/sol/portfile.cmake +++ b/ports/sol/portfile.cmake @@ -1,21 +1,10 @@ -# Common Ambient Variables: -# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} -# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} -# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT} -# PORT = current port name (zlib, etc) -# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc) -# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic) -# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic) -# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg> -# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) -# include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ThePhD/sol2 - REF v2.19.5 - SHA512 c004c2331e2eb0aae4467c10609f73879246c3ab5b7421e5b6fcb91b0c6595d999e5fd4c70b1859af1febb374631640d6727bf236a0cd176e40f631813e243a9 + REF f8ee7abe527a9e8414fc4965e5cbd0f8395fbeae + SHA512 6bf090deb3b664e9585672b8f85275b76c53eddc7fe206ceec943522195bb726e976c946b59cc23863bc7e0feab36f4fe1a6a7a5dae3f9c2ec5c64060014afbf HEAD_REF develop ) diff --git a/ports/spaceland/CONTROL b/ports/spaceland/CONTROL new file mode 100644 index 000000000..2baf34633 --- /dev/null +++ b/ports/spaceland/CONTROL @@ -0,0 +1,4 @@ +Source: spaceland
+Version: 7.8.2-0
+Description: Spaceland Lib (sl) is a suite for geometric computation, specifically adapted to OpenGL.
+Build-Depends: zlib
diff --git a/ports/spaceland/portfile.cmake b/ports/spaceland/portfile.cmake new file mode 100644 index 000000000..d22276d60 --- /dev/null +++ b/ports/spaceland/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
+ message(STATUS "WARNING: Dynamic building not supported. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sl-7.8.2-Source)
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://vic.crs4.it/vic/download/pkgs/sl-7.8.2-Source.tar.gz"
+ FILENAME "sl-7.8.2-Source.tar.gz"
+ SHA512 1391dac1474ddb47d0cf0eb7baeb7db68d6356c2116f732dd57b8a050739523282ded0643cc466640f2b22f25dd6bfced00ede4e041b7ff83754a99ae6725d7d
+)
+
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DSL_TEST=OFF
+ -DSL_INSTALL_SLFIND_MODULE=OFF
+ OPTIONS_DEBUG
+ -DSL_TEST=OFF
+ -DSL_INSTALL_SLFIND_MODULE=OFF
+)
+
+vcpkg_install_cmake()
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle license
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/spaceland)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/spaceland/COPYING ${CURRENT_PACKAGES_DIR}/share/spaceland/license)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/spaceland)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/spaceland/copyright.txt ${CURRENT_PACKAGES_DIR}/share/spaceland/copyright)
diff --git a/ports/spatialite-tools/portfile.cmake b/ports/spatialite-tools/portfile.cmake index 6bfd19966..25de070ee 100644 --- a/ports/spatialite-tools/portfile.cmake +++ b/ports/spatialite-tools/portfile.cmake @@ -23,7 +23,7 @@ if(VCPKG_CRT_LINKAGE STREQUAL dynamic) set(CL_FLAGS_DBG "/MDd /Zi") set(CL_FLAGS_REL "/MD /Ox") set(GEOS_LIBS_REL "${LDIR}/lib/geos_c.lib") - set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_cd.lib") set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib") set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib") set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib") diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index 7d6e20dee..b4b105a65 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -9,7 +9,7 @@ else() endif() add_library(sqlite3 sqlite3.c) -target_compile_definitions(sqlite3 PRIVATE +target_compile_definitions(sqlite3 PRIVATE $<$<CONFIG:Debug>:SQLITE_DEBUG> ${API} -DSQLITE_ENABLE_RTREE @@ -25,7 +25,11 @@ if(NOT SQLITE3_SKIP_TOOLS) add_executable(sqlite3-bin shell.c) set_target_properties(sqlite3-bin PROPERTIES OUTPUT_NAME sqlite3) target_link_libraries(sqlite3-bin PRIVATE sqlite3) - install(TARGETS sqlite3-bin sqlite3 RUNTIME DESTINATION tools) + install(TARGETS sqlite3-bin sqlite3 + RUNTIME DESTINATION tools + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) endif() install(TARGETS sqlite3 EXPORT sqlite3Config diff --git a/ports/sqlite3/CONTROL b/ports/sqlite3/CONTROL index a5d76d43b..74d70909b 100644 --- a/ports/sqlite3/CONTROL +++ b/ports/sqlite3/CONTROL @@ -1,5 +1,5 @@ Source: sqlite3 -Version: 3.23.0 +Version: 3.23.1-1 Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. Feature: tool diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index d016660ab..bd7bcc15c 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions)
-set(SQLITE_VERSION 3230000)
-set(SQLITE_HASH bfca2ec16d926c11c9ec052eae41549f1de392582227ca08eb8a01cc36e58ac528c7677fdab253250ba3e0cf6e5cd9d3d0012e5b558be7db91740ac901dae0fe)
+set(SQLITE_VERSION 3230100)
+set(SQLITE_HASH 5784f4dea7f14d7dcf5dd07f0e111c8f0b64ff55c68b32a23fba7a36baf1f095c7a35573fc3b57b84822878218b78f9b0187c4e3f0439d4215471ee5f556eee1)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/sqlite-amalgamation-${SQLITE_VERSION})
vcpkg_download_distfile(ARCHIVE
diff --git a/ports/strtk/CONTROL b/ports/strtk/CONTROL index 2fbac5743..0c9cf1720 100644 --- a/ports/strtk/CONTROL +++ b/ports/strtk/CONTROL @@ -1,4 +1,4 @@ Source: strtk -Version: 2018.01.01-5579ed1 +Version: 2018.05.07-48c9554 Description: robust, optimized and portable string processing algorithms for the C++ language Build-Depends: boost diff --git a/ports/strtk/portfile.cmake b/ports/strtk/portfile.cmake index c5998a538..f98f06930 100644 --- a/ports/strtk/portfile.cmake +++ b/ports/strtk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/strtk - REF 5579ed1fa9766a5f9b67ed4773a3f59e7b107093 - SHA512 552ada7aa36fd057003a0fcaeabd3b457bb7b4dbc05ae595b905503d254c95334569c63b7c9f014a174489e56902a38744417b14eaa08f86558e3c66063863b3 + REF 48c9554b3f079e34205c0af661c81c6f75f1da05 + SHA512 92a1b34808f20489d9b8c94aed384b08fcf2586967185c23a0027ee6d7170d5998e255d6aedc1fbb68327f48c0b106b8efd39f476e4041d6bcc5685c73fc1015 ) file(COPY ${SOURCE_PATH}/strtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/tesseract/leptonica.patch b/ports/tesseract/leptonica.patch new file mode 100644 index 000000000..507721d9d --- /dev/null +++ b/ports/tesseract/leptonica.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/templates/TesseractConfig.cmake.in b/cmake/templates/TesseractConfig.cmake.in +index 13838361..245ca2bc 100644 +--- a/cmake/templates/TesseractConfig.cmake.in ++++ b/cmake/templates/TesseractConfig.cmake.in +@@ -21,6 +21,8 @@ + + include(${CMAKE_CURRENT_LIST_DIR}/TesseractTargets.cmake) + ++find_package(Leptonica REQUIRED) ++ + # ====================================================== + # Version variables: + # ====================================================== diff --git a/ports/tesseract/portfile.cmake b/ports/tesseract/portfile.cmake index cebf4316b..59c76e3e6 100644 --- a/ports/tesseract/portfile.cmake +++ b/ports/tesseract/portfile.cmake @@ -18,6 +18,7 @@ vcpkg_apply_patches( PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-icu.patch ${CMAKE_CURRENT_LIST_DIR}/ws2-32.patch + ${CMAKE_CURRENT_LIST_DIR}/leptonica.patch ) # The built-in cmake FindICU is better diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index 449a6a4ca..87cb4fa05 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-04-17 +Version: 2018-05-17 Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. Originally developed at Facebook, Thrift was open sourced in April 2007 and entered the Apache Incubator in May, 2008. Thrift became an Apache TLP in October, 2010. diff --git a/ports/thrift/portfile.cmake b/ports/thrift/portfile.cmake index 81b65cea0..f951c2bd5 100644 --- a/ports/thrift/portfile.cmake +++ b/ports/thrift/portfile.cmake @@ -15,8 +15,8 @@ vcpkg_find_acquire_program(BISON) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO apache/thrift - REF 4a00fc658a1dc90be33a223a2c7ee336679e8745 - SHA512 b5f380b195498103d0ab4612c1754b29a8dce8e9360e46f5d6dd6daead477c6d2b9b0092ef83a081d937973e21a77fa8b55d5cb7c1d2d5abe71c6b0caa4dae30 + REF 88591e32e710a0524327153c8b629d5b461e35e0 + SHA512 372e323c4b2163247353a63d127ec69e3448269bb465b7fdf4e14c06a152602ac412649d04da4e191ec79bada467cb4b217e70f4874f9059e2ae984334f54ff8 HEAD_REF master ) diff --git a/ports/treehopper/CONTROL b/ports/treehopper/CONTROL new file mode 100644 index 000000000..336a42250 --- /dev/null +++ b/ports/treehopper/CONTROL @@ -0,0 +1,3 @@ +Source: treehopper +Version: 1.11.3-1 +Description: Treehopper connects the physical world to your computer, tablet, or smartphone. For more information, visit https://treehopper.io. diff --git a/ports/treehopper/portfile.cmake b/ports/treehopper/portfile.cmake new file mode 100644 index 000000000..fd90f0392 --- /dev/null +++ b/ports/treehopper/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message("treehopper only supports dynamic library linkage") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() +if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "treehopper does not support static crt linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO treehopper-electronics/treehopper-sdk + REF 1.11.3 + SHA512 65b748375b798787c8b59f9657151f340920c939c3f079105b9b78f4e3b775125598106c6dfa4feba111a64d30f007003a70110ac767802a7dd1127a25c9fb14 + HEAD_REF master) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/C++/API/ + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/treehopper) + +file(INSTALL ${SOURCE_PATH}/C++/API/inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/Treehopper/) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/treehopper RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
\ No newline at end of file diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL index 4a46f6343..194e24eb8 100644 --- a/ports/unicorn-lib/CONTROL +++ b/ports/unicorn-lib/CONTROL @@ -1,4 +1,4 @@ Source: unicorn-lib -Version: 2018-04-09 +Version: 2018-05-17 Description: Unicode library for C++ by Ross Smith Build-Depends: rs-core-lib, pcre, zlib, libiconv diff --git a/ports/unicorn-lib/portfile.cmake b/ports/unicorn-lib/portfile.cmake index c215e7ccd..ec28ec237 100644 --- a/ports/unicorn-lib/portfile.cmake +++ b/ports/unicorn-lib/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO CaptainCrowbar/unicorn-lib - REF 38b8bfe7b22978d42923a55ed3303a0aadd86abd - SHA512 423dc648476cc957273a7a81770ce5b25452bd685aaa36688cecb1e7cc83495ede6a441fb33e010e80782986c32a8cc87fe42844b0ccd597ce9a4e5286dc6791 + REF 2c8e7f8948aaf51654685e2f6fa3ea1da3fa8d24 + SHA512 1eb3f8d8a6cbe383c4dd01c5a9883d57a024d47b2adc94c437ca815be7532d7b26a4883061ee31c16194336d095d59bce2ca3a538f100f0d05dc1ff8e0b3f7ad HEAD_REF master ) diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index 6d907bd94..82b42ba9c 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ Source: unicorn -Version: 2018-03-20 +Version: 2018-05-17 Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework diff --git a/ports/unicorn/portfile.cmake b/ports/unicorn/portfile.cmake index bec0088ed..0340a0e3b 100644 --- a/ports/unicorn/portfile.cmake +++ b/ports/unicorn/portfile.cmake @@ -14,8 +14,8 @@ set(VCPKG_CRT_LINKAGE "static") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO unicorn-engine/unicorn - REF 9a01ae8379b0a4bc37cf50f7aeba63fddeb523c4 - SHA512 04d5e850bc1ba36856052be5a4e2a433db8d229ae90b2fbf6a5bf32c9dc86829518a8882d331d0bc7d42a23e9f5c43d6609a20dcca388c717940c081ff21b3a4 + REF 19ffa83d4353af8834c4c55590ca2ecd357a6bbe + SHA512 db09f91da1f0611663200ca1add7f878e677d3df4faebdb38e68e96a795c1d2bb7bf5b4af44d9b92fc91a1c1f18a89862a0aa3f12ef8a1277d8bfdf94b0b5020 HEAD_REF master ) diff --git a/ports/uwebsockets/CMakeLists.txt b/ports/uwebsockets/CMakeLists.txt index 43ccd039c..c3c4f97d8 100644 --- a/ports/uwebsockets/CMakeLists.txt +++ b/ports/uwebsockets/CMakeLists.txt @@ -11,6 +11,7 @@ file(GLOB SOURCES src/*.cpp) add_library(uWS ${SOURCES}) target_include_directories(uWS PUBLIC ${OPENSSL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIRS}) target_link_libraries(uWS PUBLIC ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBUV_LIBRARY}) +target_compile_features(uWS PRIVATE cxx_range_for) install(TARGETS uWS RUNTIME DESTINATION bin diff --git a/ports/uwebsockets/CONTROL b/ports/uwebsockets/CONTROL index 7e636ba9c..c212611de 100644 --- a/ports/uwebsockets/CONTROL +++ b/ports/uwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: uwebsockets -Version: 0.14.7-1 +Version: 0.14.8-2 Build-Depends: libuv, openssl, zlib Description: Highly scalable cross-platform WebSocket & HTTP library for C++11 and Node.js diff --git a/ports/uwebsockets/portfile.cmake b/ports/uwebsockets/portfile.cmake index a24f49631..f9d6c43a1 100644 --- a/ports/uwebsockets/portfile.cmake +++ b/ports/uwebsockets/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO uWebSockets/uWebSockets - REF v0.14.7 - SHA512 1049497f7b63770dcfdc44bef562ce43b87fa553e8ec778c8ee2506f406a23f5fdcf67904f0458e38fc0843899b43b92ccef5f36cae40228cfe47b6f38fa0e15 + REF v0.14.8 + SHA512 5e78e2f10e95648ad1e7f26612f69da3bbdcdb3f17c99e3bb9775e3eb440a2741f05375dcc043b43f0f2d4de6da54e7534431c5c10c1350103a4379b55cf9081 HEAD_REF master ) diff --git a/ports/vlpp/CMakeLists.txt b/ports/vlpp/CMakeLists.txt index 238600f6e..d5fec60c4 100644 --- a/ports/vlpp/CMakeLists.txt +++ b/ports/vlpp/CMakeLists.txt @@ -7,7 +7,10 @@ set(SRCS Import/Vlpp.cpp Import/VlppWorkflow.cpp Import/VlppWorkflowCompiler.cpp) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") + +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") +endif() # Create and configure the target add_library(Vlpp ${SRCS}) diff --git a/ports/vlpp/CONTROL b/ports/vlpp/CONTROL index aa8381cae..392beec5e 100644 --- a/ports/vlpp/CONTROL +++ b/ports/vlpp/CONTROL @@ -1,3 +1,3 @@ Source: vlpp
-Version: 0.9.3.1
+Version: 0.9.3.1-1
Description: Common C++ construction, including string operation / generic container / linq / General-LR parser generator / multithreading / reflection for C++ / etc
diff --git a/ports/vtk-dicom/CONTROL b/ports/vtk-dicom/CONTROL new file mode 100644 index 000000000..fdd8e04d3 --- /dev/null +++ b/ports/vtk-dicom/CONTROL @@ -0,0 +1,8 @@ +Source: vtk-dicom
+Version: 0.8.8-alpha-1
+Description: DICOM for VTK
+Build-Depends: vtk, zlib
+
+Feature: gdcm
+Description: Use gdcm for decompressing DICOM files.
+Build-Depends: gdcm2
diff --git a/ports/vtk-dicom/portfile.cmake b/ports/vtk-dicom/portfile.cmake new file mode 100644 index 000000000..e7f5c65aa --- /dev/null +++ b/ports/vtk-dicom/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO dgobbi/vtk-dicom
+ REF ca27801fad6356c98ba19e760b9b4b8e9128f60e
+ SHA512 d4916fa385e6f26da0a5d7eb981497c9121ff4f67b4b03e518aa4974d2b0ef207168e939e5063e705c15f627ace56e39aca5f5891d333924cbc80c9277aa7dd2
+ HEAD_REF master
+)
+
+if ("gdcm" IN_LIST FEATURES)
+ set(USE_GDCM ON )
+else()
+ set(USE_GDCM OFF )
+endif()
+
+
+if(USE_GDCM)
+ list(APPEND ADDITIONAL_OPTIONS
+ -DUSE_GDCM=ON
+ -DUSE_DCMTK=OFF
+ )
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DBUILD_PROGRAMS=OFF
+ -DBUILD_EXAMPLES=OFF
+ ${ADDITIONAL_OPTIONS}
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk-dicom)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/copyright)
diff --git a/ports/wtl/CONTROL b/ports/wtl/CONTROL index bab8da1f2..5fbab5c61 100644 --- a/ports/wtl/CONTROL +++ b/ports/wtl/CONTROL @@ -1,5 +1,5 @@ Source: wtl Maintainer: jfrederich@gmail.com -Version: 10.0 +Version: 10.0-1 Description: Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. Build-Depends: diff --git a/ports/wtl/portfile.cmake b/ports/wtl/portfile.cmake index d992b276a..6ee21e895 100644 --- a/ports/wtl/portfile.cmake +++ b/ports/wtl/portfile.cmake @@ -1,16 +1,16 @@ #header-only library include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/wtl/WTL%2010/WTL%2010.0.7336/WTL10_7336.zip" + URLS "https://downloads.sourceforge.net/project/wtl/WTL%2010/WTL%2010.0.7336/WTL10_7336.zip" FILENAME "WTL10_7336.zip" SHA512 68368be0b35fba97ed63fd684e98c077ab94ea2ce928693da7f1f48e2547486109e045e026218a7c8652aec46930b79572679c0b79afaa75a3dbf98572e4d9b5 ) vcpkg_extract_source_archive(${ARCHIVE}) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/wtl FILES_MATCHING PATTERN "*.h") +file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/Include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/wtl FILES_MATCHING PATTERN "*.h") file(COPY ${CURRENT_BUILDTREES_DIR}/src/MS-PL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) file(RENAME ${CURRENT_PACKAGES_DIR}/share/wtl/MS-PL.txt ${CURRENT_PACKAGES_DIR}/share/wtl/copyright) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/samples DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) -file(COPY ${CURRENT_BUILDTREES_DIR}/src/appwizard DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/Samples DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) +file(COPY ${CURRENT_BUILDTREES_DIR}/src/AppWizard DESTINATION ${CURRENT_PACKAGES_DIR}/share/wtl) diff --git a/ports/yajl/CONTROL b/ports/yajl/CONTROL new file mode 100644 index 000000000..6811dc84a --- /dev/null +++ b/ports/yajl/CONTROL @@ -0,0 +1,3 @@ +Source: yajl +Version: 2.1.0-1 +Description: Yet Another JSON Library diff --git a/ports/yajl/cmake.patch b/ports/yajl/cmake.patch new file mode 100644 index 000000000..c631ead21 --- /dev/null +++ b/ports/yajl/cmake.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4c0a9be..cbec22f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,7 +28,7 @@ ENDIF (NOT CMAKE_BUILD_TYPE)
+
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+
+-IF (WIN32)
++IF (WIN32 AND FALSE)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
+ ADD_DEFINITIONS(-DWIN32)
+ SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF")
+@@ -46,7 +46,8 @@ IF (WIN32)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4255 /wd4130 /wd4100 /wd4711")
+ SET(CMAKE_C_FLAGS_DEBUG "/D DEBUG /Od /Z7")
+ SET(CMAKE_C_FLAGS_RELEASE "/D NDEBUG /O2")
+-ELSE (WIN32)
++endif()
++if (NOT WIN32)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+ IF(CMAKE_COMPILER_IS_GNUCC)
+ INCLUDE(CheckCCompilerFlag)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 99cf9e9..454482a 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -78,7 +78,7 @@ INCLUDE_DIRECTORIES(${incDir}/..)
+ # at build time you may specify the cmake variable LIB_SUFFIX to handle
+ # 64-bit systems which use 'lib64'
+ INSTALL(TARGETS yajl
+- RUNTIME DESTINATION lib${LIB_SUFFIX}
++ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ ARCHIVE DESTINATION lib${LIB_SUFFIX})
+ INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX})
diff --git a/ports/yajl/portfile.cmake b/ports/yajl/portfile.cmake new file mode 100644 index 000000000..92742e0a7 --- /dev/null +++ b/ports/yajl/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lloyd/yajl + REF 2.1.0 + SHA512 9e786d080803df80ec03a9c2f447501e6e8e433a6baf636824bc1d50ecf4f5f80d7dfb1d47958aeb0a30fe459bd0ef033d41bc6a79e1dc6e6b5eade930b19b02 + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/yajl RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/pkgconfig) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(GLOB SHAREDOBJECTS ${CURRENT_PACKAGES_DIR}/lib/libyajl.so* ${CURRENT_PACKAGES_DIR}/debug/lib/libyajl.so*) + file(REMOVE_RECURSE ${SHAREDOBJECTS} ${CURRENT_PACKAGES_DIR}/lib/yajl.lib ${CURRENT_PACKAGES_DIR}/debug/lib/yajl.lib) +else() + file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE_RECURSE + ${EXES} + ${CURRENT_PACKAGES_DIR}/lib/yajl_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/yajl_s.lib + ${CURRENT_PACKAGES_DIR}/lib/libyajl_s.a ${CURRENT_PACKAGES_DIR}/debug/lib/libyajl_s.a + ) +endif() diff --git a/ports/yato/CONTROL b/ports/yato/CONTROL new file mode 100644 index 000000000..f19519315 --- /dev/null +++ b/ports/yato/CONTROL @@ -0,0 +1,3 @@ +Source: yato
+Version: 1.0-1
+Description: Modern C++14 containers and utilities, actors system, typesafe config
diff --git a/ports/yato/portfile.cmake b/ports/yato/portfile.cmake new file mode 100644 index 000000000..44ee93782 --- /dev/null +++ b/ports/yato/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_bitbucket(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO alexey_gruzdev/yato
+ REF v1.0
+ SHA512 631b870fd2704a03d9d66ef244f4e50968ae63da4fda0c7cd1f6ce2cea2b1e8b4506b0148cd1af1e133a70fd5d9cdc9d8c054edac6141118ee3c9427e186b270
+ HEAD_REF master
+)
+
+# Copy all header files
+file(COPY "${SOURCE_PATH}/include/yato"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/include"
+)
+file(COPY "${SOURCE_PATH}/modules/actors/yato"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/include"
+)
+file(COPY "${SOURCE_PATH}/modules/config/yato"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/include"
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DYATO_BUILD_TESTS:BOOL=OFF
+ -DYATO_BUILD_ACTORS:BOOL=ON
+ -DYATO_BUILD_CONFIG:BOOL=ON
+ -DYATO_CONFIG_MANUAL:BOOL=ON
+ -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/
+ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/
+ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/
+ -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/
+ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/
+ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/
+)
+
+vcpkg_build_cmake()
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/yato)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/yato/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/yato/copyright)
diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index b74483695..fc3b8da7b 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 2018-04-17 +Version: 2018-05-17 Description: The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products diff --git a/ports/zeromq/portfile.cmake b/ports/zeromq/portfile.cmake index a907be9af..4ea6df988 100644 --- a/ports/zeromq/portfile.cmake +++ b/ports/zeromq/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO zeromq/libzmq - REF c971445025535b9f989ab0b78f5ddd1c026f1878 - SHA512 4eb85e207f53de73cf5369c4c3e79d858ee380e1374ebe807dfc6f99782efc2b98984f48a2cce11b9bf22c7934ef3d1a075cb98fb9e90d5f216a4e128d6df212 + REF 6a5051fac3bb09db7e7772dcbdd591ee7ded1400 + SHA512 e05e1d293be513836e3afa117f6acb6f75ecd1b772c7be1c2850b0f165205fec8f0a91bb9b0aaffa9477aae5cc6aae401b9d5d5aa5986c28c3d76e3d4fa4f3e9 HEAD_REF master ) diff --git a/ports/zstd/CONTROL b/ports/zstd/CONTROL index fa139d868..406d67176 100644 --- a/ports/zstd/CONTROL +++ b/ports/zstd/CONTROL @@ -1,3 +1,3 @@ Source: zstd -Version: 1.3.3 +Version: 1.3.4 Description: Zstandard - Fast real-time compression algorithm http://www.zstd.net diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index c69ee0cd0..c691a989c 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/zstd - REF v1.3.3 - SHA512 72b63f96f65ca987cdc82c24354f7665c7dc3b2563cb0646f355c34bf8f090d8a0759729f8beaba8317272bdab34749f934055707b25cfd69c98a9fdcfbc59ae + REF v1.3.4 + SHA512 d3c8c1dfabd251b03205b64eff97898c1e2ca457191b1f6257450e6d2675451a68aa0bc2220b2c65baa69a6997d98490612779d95b3325320c0a3202810ae554 HEAD_REF dev) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) @@ -28,7 +28,9 @@ vcpkg_configure_cmake( -DZSTD_LEGACY_SUPPORT=1 -DZSTD_BUILD_PROGRAMS=0 -DZSTD_BUILD_TESTS=0 - -DZSTD_BUILD_CONTRIB=0) + -DZSTD_BUILD_CONTRIB=0 + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d) vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 deleted file mode 100644 index fdd89e7b9..000000000 --- a/scripts/VcpkgPowershellUtils.ps1 +++ /dev/null @@ -1,318 +0,0 @@ -function vcpkgHasModule([Parameter(Mandatory=$true)][string]$moduleName) -{ - return [bool](Get-Module -ListAvailable -Name $moduleName) -} - -function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) -{ - if ($object -eq $null) - { - return $false - } - - return [bool]($object.psobject.Properties | where { $_.Name -eq "$propertyName"}) -} - -function vcpkgCreateDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$dirPath) -{ - if (!(Test-Path $dirPath)) - { - New-Item -ItemType Directory -Path $dirPath | Out-Null - } -} - -function vcpkgCreateParentDirectoryIfNotExists([Parameter(Mandatory=$true)][string]$path) -{ - $parentDir = split-path -parent $path - if ([string]::IsNullOrEmpty($parentDir)) - { - return - } - - if (!(Test-Path $parentDir)) - { - New-Item -ItemType Directory -Path $parentDir | Out-Null - } -} - -function vcpkgIsDirectory([Parameter(Mandatory=$true)][string]$path) -{ - return (Get-Item $path) -is [System.IO.DirectoryInfo] -} - -function vcpkgRemoveItem([Parameter(Mandatory=$true)][string]$path) -{ - if ([string]::IsNullOrEmpty($path)) - { - return - } - - if (Test-Path $path) - { - # Remove-Item -Recurse occasionally fails. This is a workaround - if (vcpkgIsDirectory $path) - { - & cmd.exe /c rd /s /q $path - } - else - { - Remove-Item $path -Force - } - } -} - -function vcpkgHasCommand([Parameter(Mandatory=$true)][string]$commandName) -{ - return [bool](Get-Command -Name $commandName -ErrorAction SilentlyContinue) -} - -function vcpkgHasCommandParameter([Parameter(Mandatory=$true)][string]$commandName, [Parameter(Mandatory=$true)][string]$parameterName) -{ - return (Get-Command $commandName).Parameters.Keys -contains $parameterName -} - -function vcpkgGetCredentials() -{ - if (vcpkgHasCommandParameter -commandName 'Get-Credential' -parameterName 'Message') - { - return Get-Credential -Message "Enter credentials for Proxy Authentication" - } - else - { - Write-Host "Enter credentials for Proxy Authentication" - return Get-Credential - } -} - -function vcpkgGetSHA512([Parameter(Mandatory=$true)][string]$filePath) -{ - if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Utility\Get-FileHash') - { - Write-Verbose("Hashing with Microsoft.PowerShell.Utility\Get-FileHash") - $hash = (Microsoft.PowerShell.Utility\Get-FileHash -Path $filePath -Algorithm SHA512).Hash - } - elseif(vcpkgHasCommand -commandName 'Pscx\Get-Hash') - { - Write-Verbose("Hashing with Pscx\Get-Hash") - $hash = (Pscx\Get-Hash -Path $filePath -Algorithm SHA512).HashString - } - else - { - Write-Verbose("Hashing with .NET") - $hashAlgorithm = [Security.Cryptography.HashAlgorithm]::Create("SHA512") - $fileAsByteArray = [io.File]::ReadAllBytes($filePath) - $hashByteArray = $hashAlgorithm.ComputeHash($fileAsByteArray) - $hash = -Join ($hashByteArray | ForEach-Object {"{0:x2}" -f $_}) - } - - return $hash.ToLower() -} - -function vcpkgCheckEqualFileHash( [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$filePath, - [Parameter(Mandatory=$true)][string]$expectedHash) -{ - $actualHash = vcpkgGetSHA512 $filePath - if ($expectedHash -ne $actualHash) - { - Write-Host ("`nFile does not have expected hash:`n" + - " url: [ $url ]`n" + - " File path: [ $filePath ]`n" + - " Expected hash: [ $expectedHash ]`n" + - " Actual hash: [ $actualHash ]`n") - throw - } -} - -function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$downloadPath, - [Parameter(Mandatory=$true)][string]$sha512) -{ - if ($url -match "github") - { - if ([System.Enum]::IsDefined([Net.SecurityProtocolType], "Tls12")) - { - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - } - else - { - Write-Warning "Github has dropped support for TLS versions prior to 1.2, which is not available on your system" - Write-Warning "Please manually download $url to $downloadPath" - Write-Warning "To solve this issue for future downloads, you can also install Windows Management Framework 5.1+" - throw "Download failed" - } - } - - vcpkgCreateParentDirectoryIfNotExists $downloadPath - - $downloadPartPath = "$downloadPath.part" - vcpkgRemoveItem $downloadPartPath - - $wc = New-Object System.Net.WebClient - if (!$wc.Proxy.IsBypassed($url)) - { - $wc.Proxy.Credentials = vcpkgGetCredentials - } - - $wc.DownloadFile($url, $downloadPartPath) - vcpkgCheckEqualFileHash -url $url -filePath $downloadPartPath -expectedHash $sha512 - Move-Item -Path $downloadPartPath -Destination $downloadPath -} - -function vcpkgDownloadFileWithAria2( [Parameter(Mandatory=$true)][string]$aria2exe, - [Parameter(Mandatory=$true)][string]$url, - [Parameter(Mandatory=$true)][string]$downloadPath, - [Parameter(Mandatory=$true)][string]$sha512) -{ - vcpkgCreateParentDirectoryIfNotExists $downloadPath - $downloadPartPath = "$downloadPath.part" - vcpkgRemoveItem $downloadPartPath - - $parentDir = split-path -parent $downloadPath - $filename = split-path -leaf $downloadPath - - if ((Test-Path $url) -or ($url.StartsWith("file://"))) # if is local file - { - vcpkgDownloadFile $url $downloadPath $sha512 - return - } - - $ec = vcpkgInvokeCommand "$aria2exe" "--dir `"$parentDir`" --out `"$filename.part`" $url" - if ($ec -ne 0) - { - Write-Host "Could not download $url" - throw - } - - vcpkgCheckEqualFileHash -url $url -filePath $downloadPartPath -expectedHash $sha512 - Move-Item -Path $downloadPartPath -Destination $downloadPath -} - -function vcpkgExtractFileWith7z([Parameter(Mandatory=$true)][string]$sevenZipExe, - [Parameter(Mandatory=$true)][string]$archivePath, - [Parameter(Mandatory=$true)][string]$destinationDir) -{ - vcpkgRemoveItem $destinationDir - $destinationPartial = "$destinationDir.partial" - vcpkgRemoveItem $destinationPartial - vcpkgCreateDirectoryIfNotExists $destinationPartial - $ec = vcpkgInvokeCommand "$sevenZipExe" "x `"$archivePath`" -o`"$destinationPartial`" -y" - if ($ec -ne 0) - { - Write-Host "Could not extract $archivePath" - throw - } - Rename-Item -Path "$destinationPartial" -NewName $destinationDir -} - -function vcpkgExtractZipFile( [Parameter(Mandatory=$true)][string]$archivePath, - [Parameter(Mandatory=$true)][string]$destinationDir) -{ - vcpkgRemoveItem $destinationDir - $destinationPartial = "$destinationDir.partial" - vcpkgRemoveItem $destinationPartial - vcpkgCreateDirectoryIfNotExists $destinationPartial - - - if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') - { - Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") - Microsoft.PowerShell.Archive\Expand-Archive -path $archivePath -destinationpath $destinationPartial - } - elseif (vcpkgHasCommand -commandName 'Pscx\Expand-Archive') - { - Write-Verbose("Extracting with Pscx\Expand-Archive") - Pscx\Expand-Archive -path $archivePath -OutputPath $destinationPartial - } - else - { - Write-Verbose("Extracting via shell") - $shell = new-object -com shell.application - $zip = $shell.NameSpace($(Get-Item $archivePath).fullname) - foreach($item in $zip.items()) - { - # Piping to Out-Null is used to block until finished - $shell.Namespace($destinationPartial).copyhere($item) | Out-Null - } - } - - Rename-Item -Path "$destinationPartial" -NewName $destinationDir -} - -function vcpkgInvokeCommand() -{ - param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "") - - Write-Verbose "Executing: ${executable} ${arguments}" - $process = Start-Process -FilePath "`"$executable`"" -ArgumentList $arguments -PassThru -NoNewWindow - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - return $ec -} - -function vcpkgInvokeCommandClean() -{ - param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "") - - Write-Verbose "Clean-Executing: ${executable} ${arguments}" - $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition - $cleanEnvScript = "$scriptsDir\VcpkgPowershellUtils-ClearEnvironment.ps1" - $tripleQuotes = "`"`"`"" - $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes - $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" - $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" - - $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - return $ec -} - -function vcpkgFormatElapsedTime([TimeSpan]$ts) -{ - if ($ts.TotalHours -ge 1) - { - return [string]::Format( "{0:N2} h", $ts.TotalHours); - } - - if ($ts.TotalMinutes -ge 1) - { - return [string]::Format( "{0:N2} min", $ts.TotalMinutes); - } - - if ($ts.TotalSeconds -ge 1) - { - return [string]::Format( "{0:N2} s", $ts.TotalSeconds); - } - - if ($ts.TotalMilliseconds -ge 1) - { - return [string]::Format( "{0:N2} ms", $ts.TotalMilliseconds); - } - - throw $ts -} - -function vcpkgFindFileRecursivelyUp() -{ - param( - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory=$true)][string]$startingDir, - [ValidateNotNullOrEmpty()] - [Parameter(Mandatory=$true)][string]$filename - ) - - $currentDir = $startingDir - - while (!($currentDir -eq "") -and !(Test-Path "$currentDir\$filename")) - { - Write-Verbose "Examining $currentDir for $filename" - $currentDir = Split-path $currentDir -Parent - } - Write-Verbose "Examining $currentDir for $filename - Found" - return $currentDir -} diff --git a/scripts/addPoshVcpkgToPowershellProfile.ps1 b/scripts/addPoshVcpkgToPowershellProfile.ps1 index dcbd2e0be..1dd27aacf 100644 --- a/scripts/addPoshVcpkgToPowershellProfile.ps1 +++ b/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -14,14 +14,13 @@ function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string] } $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" $profileEntry = "Import-Module '$scriptsDir\posh-vcpkg'" $profilePath = $PROFILE # Implicit powershell variable -if (!(Test-Path $profilePath)) +$profileDir = Split-Path $profilePath -Parent +if (!(Test-Path $profileDir)) { - $profileDir = Split-Path $profilePath -Parent - vcpkgCreateDirectoryIfNotExists $profileDir + New-Item -ItemType Directory -Path $profileDir | Out-Null } Write-Host "`nAdding the following line to ${profilePath}:" @@ -38,6 +37,7 @@ if ($existingImports.Count -gt 0) return } +# Modifying the profile will invalidate any signatures. # Posh-git does the following check, so we should too. # https://github.com/dahlbyk/posh-git/blob/master/src/Utils.ps1 # If the profile script exists and is signed, then we should not modify it diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index c8ba503d8..149134dff 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -5,34 +5,41 @@ param( ) Set-StrictMode -Version Latest $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" -$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root -Write-Verbose("vcpkg Path " + $vcpkgRootDir) +$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash -$gitHash = "unknownhash" -$oldpath = $env:path -try +function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) { - [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" - $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"git`"]") - $gitFromDownload = "$vcpkgRootDir\downloads\$($toolData.exeRelativePath)" - $gitDir = split-path -parent $gitFromDownload + if ($object -eq $null) + { + return $false + } + + return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"}) +} - $env:path += ";$gitDir" - if (Get-Command "git" -ErrorAction SilentlyContinue) +function getProgramFiles32bit() +{ + $out = ${env:PROGRAMFILES(X86)} + if ($out -eq $null) { - $gitHash = git log HEAD -n 1 --format="%cd-%H" --date=short - if ($LASTEXITCODE -ne 0) - { - $gitHash = "unknownhash" - } + $out = ${env:PROGRAMFILES} } + + if ($out -eq $null) + { + throw "Could not find [Program Files 32-bit]" + } + + return $out } -finally + +$vcpkgRootDir = $scriptsDir +while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) { - $env:path = $oldpath + Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root" + $vcpkgRootDir = Split-path $vcpkgRootDir -Parent } -Write-Verbose("Git repo version string is " + $gitHash) +Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" $vcpkgSourcesPath = "$vcpkgRootDir\toolsrc" @@ -42,22 +49,282 @@ if (!(Test-Path $vcpkgSourcesPath)) return } -$msbuildExeWithPlatformToolset = & $scriptsDir\findAnyMSBuildWithCppPlatformToolset.ps1 $withVSPath +function getVisualStudioInstances() +{ + $programFiles = getProgramFiles32bit + $results = New-Object System.Collections.ArrayList + $vswhereExe = "$programFiles\Microsoft Visual Studio\Installer\vswhere.exe" + if (Test-Path $vswhereExe) + { + $output = & $vswhereExe -prerelease -legacy -products * -format xml + [xml]$asXml = $output + + foreach ($instance in $asXml.instances.instance) + { + $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash + $installationVersion = $instance.InstallationVersion + + $isPrerelease = -7 + if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") + { + $isPrerelease = $instance.isPrerelease + } + + if ($isPrerelease -eq 0) + { + $releaseType = "PreferenceWeight3::StableRelease" + } + elseif ($isPrerelease -eq 1) + { + $releaseType = "PreferenceWeight2::PreRelease" + } + else + { + $releaseType = "PreferenceWeight1::Legacy" + } + + # Placed like that for easy sorting according to preference + $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null + } + } + else + { + Write-Verbose "Could not locate vswhere at $vswhereExe" + } + + if ("$env:vs140comntools" -ne "") + { + $installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null + } + } + + $installationPath = "$programFiles\Microsoft Visual Studio 14.0" + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null + } + + $results.Sort() + $results.Reverse() + + return $results +} + +function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) +{ + $VisualStudioInstances = getVisualStudioInstances + if ($VisualStudioInstances -eq $null) + { + throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." + } + + Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstances))" + foreach ($instanceCandidate in $VisualStudioInstances) + { + Write-Verbose "Inspecting: $instanceCandidate" + $split = $instanceCandidate -split "::" + # $preferenceWeight = $split[0] + # $releaseType = $split[1] + $version = $split[2] + $path = $split[3] + + if ($withVSPath -ne "" -and $withVSPath -ne $path) + { + Write-Verbose "Skipping: $instanceCandidate" + continue + } + + $majorVersion = $version.Substring(0,2); + if ($majorVersion -eq "15") + { + $VCFolder= "$path\VC\Tools\MSVC\" + if (Test-Path $VCFolder) + { + Write-Verbose "Picking: $instanceCandidate" + return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" + } + } + + if ($majorVersion -eq "14") + { + $clExe= "$path\VC\bin\cl.exe" + if (Test-Path $clExe) + { + Write-Verbose "Picking: $instanceCandidate" + $programFilesPath = getProgramFiles32bit + return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" + } + } + } + + throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed." +} +function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = $False, + [Parameter(Mandatory=$False)][switch]$DisableWin81SDK = $False) +{ + if ($DisableWin10SDK -and $DisableWin81SDK) + { + throw "Both Win10SDK and Win81SDK were disabled." + } + + Write-Verbose "Finding WinSDK" + + $validInstances = New-Object System.Collections.ArrayList + + # Windows 10 SDK + function CheckWindows10SDK($path) + { + if ($path -eq $null) + { + return + } + + $folder = (Join-Path $path "Include") + if (!(Test-Path $folder)) + { + Write-Verbose "$folder - Not Found" + return + } + + Write-Verbose "$folder - Found" + $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) + [array]::Reverse($win10sdkVersions) # Newest SDK first + + foreach ($win10sdkV in $win10sdkVersions) + { + $windowsheader = "$folder\$win10sdkV\um\windows.h" + if (!(Test-Path $windowsheader)) + { + Write-Verbose "$windowsheader - Not Found" + continue + } + Write-Verbose "$windowsheader - Found" + + $ddkheader = "$folder\$win10sdkV\shared\sdkddkver.h" + if (!(Test-Path $ddkheader)) + { + Write-Verbose "$ddkheader - Not Found" + continue + } + + Write-Verbose "$ddkheader - Found" + $win10sdkVersionString = $win10sdkV.ToString() + Write-Verbose "Found $win10sdkVersionString" + $validInstances.Add($win10sdkVersionString) > $null + } + } + + Write-Verbose "`n" + Write-Verbose "Looking for Windows 10 SDK" + $regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue + $regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue + if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } + if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } + CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") + CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") + + # Windows 8.1 SDK + function CheckWindows81SDK($path) + { + if ($path -eq $null) + { + return + } + + $folder = "$path\Include" + if (!(Test-Path $folder)) + { + Write-Verbose "$folder - Not Found" + return + } + + Write-Verbose "$folder - Found" + $win81sdkVersionString = "8.1" + Write-Verbose "Found $win81sdkVersionString" + $validInstances.Add($win81sdkVersionString) > $null + } + + Write-Verbose "`n" + Write-Verbose "Looking for Windows 8.1 SDK" + $regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue + $regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue + if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } + if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } + CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") + CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") + + Write-Verbose "`n`n`n" + Write-Verbose "The following Windows SDKs were found:" + foreach ($instance in $validInstances) + { + Write-Verbose $instance + } + + # Selecting + foreach ($instance in $validInstances) + { + if (!$DisableWin10SDK -and $instance -match "10.") + { + return $instance + } + + if (!$DisableWin81SDK -and $instance -match "8.1") + { + return $instance + } + } + + throw "Could not detect a Windows SDK / TargetPlatformVersion" +} + +$msbuildExeWithPlatformToolset = findAnyMSBuildWithCppPlatformToolset $withVSPath $msbuildExe = $msbuildExeWithPlatformToolset[0] $platformToolset = $msbuildExeWithPlatformToolset[1] -$windowsSDK = & $scriptsDir\getWindowsSDK.ps1 +$windowsSDK = getWindowsSDK $arguments = ( -"`"/p:VCPKG_VERSION=-$gitHash`"", +"`"/p:VCPKG_VERSION=-nohash`"", "`"/p:DISABLE_METRICS=$disableMetrics`"", "/p:Configuration=Release", "/p:Platform=x86", "/p:PlatformToolset=$platformToolset", "/p:TargetPlatformVersion=$windowsSDK", +"/verbosity:minimal", "/m", +"/nologo", "`"$vcpkgSourcesPath\dirs.proj`"") -join " " +function vcpkgInvokeCommandClean() +{ + param ( [Parameter(Mandatory=$true)][string]$executable, + [string]$arguments = "") + + Write-Verbose "Clean-Executing: ${executable} ${arguments}" + $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition + $cleanEnvScript = "$scriptsDir\cleanEnvironmentHelper.ps1" + $tripleQuotes = "`"`"`"" + $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes + $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" + $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" + + $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." + return $ec +} + # vcpkgInvokeCommandClean cmd "/c echo %PATH%" +Write-Host "`nBuilding vcpkg.exe ...`n" $ec = vcpkgInvokeCommandClean $msbuildExe $arguments if ($ec -ne 0) @@ -65,6 +332,7 @@ if ($ec -ne 0) Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." return } +Write-Host "`nBuilding vcpkg.exe... done.`n" Write-Verbose("Placing vcpkg.exe in the correct location") diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 66efb1d62..e999fa55e 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -30,7 +30,14 @@ vcpkgCheckEqualFileHash() { url=$1; filePath=$2; expectedHash=$3 - actualHash=$(shasum -a 512 "$filePath") # sha512sum not available on osx + if command -v "sha512sum" >/dev/null 2>&1 ; then + actualHash=$(sha512sum "$filePath") + else + # sha512sum is not available by default on osx + # shasum is not available by default on Fedora + actualHash=$(shasum -a 512 "$filePath") + fi + actualHash="${actualHash%% *}" # shasum returns [hash filename], so get the first word if ! [ "$expectedHash" = "$actualHash" ]; then @@ -90,7 +97,7 @@ fetchTool() return 1 fi - xmlFileAsString=`cat $vcpkgRootDir/scripts/vcpkgTools.xml` + xmlFileAsString=`cat "$vcpkgRootDir/scripts/vcpkgTools.xml"` toolRegexStart="<tool name=\"$tool\" os=\"$os\">" toolData="$(extractStringBetweenDelimiters "$xmlFileAsString" "$toolRegexStart" "</tool>")" if [ "$toolData" = "" ]; then @@ -150,7 +157,9 @@ selectCXX() if [ "x$CXX" = "x" ]; then CXX=g++ - if which g++-7 >/dev/null 2>&1; then + if which g++-8 >/dev/null 2>&1; then + CXX=g++-8 + elif which g++-7 >/dev/null 2>&1; then CXX=g++-7 elif which g++-6 >/dev/null 2>&1; then CXX=g++-6 @@ -159,7 +168,7 @@ selectCXX() gccversion="$("$CXX" -v 2>&1)" gccversion="$(extractStringBetweenDelimiters "$gccversion" "gcc version " ".")" - if [ "$gccversion" = "5" ]; then + if [ "$gccversion" -lt "6" ]; then echo "CXX ($CXX) is too old; please install a newer compiler such as g++-7." echo "sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y" echo "sudo apt-get update -y" @@ -185,4 +194,4 @@ mkdir -p "$buildDir" (cd "$buildDir" && "$cmakeExe" --build .) rm -rf "$vcpkgRootDir/vcpkg" -cp "$buildDir/vcpkg" "$vcpkgRootDir/"
\ No newline at end of file +cp "$buildDir/vcpkg" "$vcpkgRootDir/" diff --git a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 b/scripts/cleanEnvironmentHelper.ps1 index 0a133f5f8..0a133f5f8 100644 --- a/scripts/VcpkgPowershellUtils-ClearEnvironment.ps1 +++ b/scripts/cleanEnvironmentHelper.ps1 diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 30ecb0573..39a722d93 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -115,6 +115,8 @@ function(vcpkg_find_acquire_program VAR) set(SUBDIR "ninja-1.8.2") if(CMAKE_HOST_WIN32) set(PATHS "${DOWNLOADS}/tools/ninja/${SUBDIR}") + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-osx") else() set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-linux") endif() diff --git a/scripts/cmake/vcpkg_from_github.cmake b/scripts/cmake/vcpkg_from_github.cmake index c6a23cff6..28ada0631 100644 --- a/scripts/cmake/vcpkg_from_github.cmake +++ b/scripts/cmake/vcpkg_from_github.cmake @@ -51,7 +51,7 @@ ## * [beast](https://github.com/Microsoft/vcpkg/blob/master/ports/beast/portfile.cmake) function(vcpkg_from_github) set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF) - set(multipleValuesArgs) + set(multipleValuesArgs PATCHES) cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) if(NOT DEFINED _vdud_OUT_SOURCE_PATH) @@ -73,21 +73,17 @@ function(vcpkg_from_github) string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO}) string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) - macro(set_SOURCE_PATH BASE BASEREF) - set(SOURCE_PATH "${BASE}/${REPO_NAME}-${BASEREF}") - if(EXISTS ${SOURCE_PATH}) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - else() - # Sometimes GitHub strips a leading 'v' off the REF. - string(REGEX REPLACE "^v" "" REF ${BASEREF}) - string(REPLACE "/" "-" REF ${REF}) - set(SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") - if(EXISTS ${SOURCE_PATH}) - set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) - else() - message(FATAL_ERROR "Could not determine source path: '${BASE}/${REPO_NAME}-${BASEREF}' does not exist") - endif() + macro(set_TEMP_SOURCE_PATH BASE BASEREF) + set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${BASEREF}") + if(NOT EXISTS ${TEMP_SOURCE_PATH}) + # Sometimes GitHub strips a leading 'v' off the REF. + string(REGEX REPLACE "^v" "" REF ${BASEREF}) + string(REPLACE "/" "-" REF ${REF}) + set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") + if(NOT EXISTS ${TEMP_SOURCE_PATH}) + message(FATAL_ERROR "Could not determine source path: '${BASE}/${REPO_NAME}-${BASEREF}' does not exist") endif() + endif() endmacro() if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF) @@ -108,8 +104,44 @@ function(vcpkg_from_github) SHA512 "${_vdud_SHA512}" FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" ) - vcpkg_extract_source_archive_ex(ARCHIVE "${ARCHIVE}") - set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src ${SANITIZED_REF}) + + # Take the last 10 chars of the REF + set(REF_MAX_LENGTH 10) + string(LENGTH ${SANITIZED_REF} REF_LENGTH) + math(EXPR FROM_REF ${REF_LENGTH}-${REF_MAX_LENGTH}) + if(FROM_REF LESS 0) + set(FROM_REF 0) + endif() + string(SUBSTRING ${SANITIZED_REF} ${FROM_REF} ${REF_LENGTH} SHORTENED_SANITIZED_REF) + + # Hash the archive hash along with the patches. Take the first 10 chars of the hash + set(PATCHSET_HASH "${_vdud_SHA512}") + foreach(PATCH IN LISTS _vdud_PATCHES) + file(SHA512 ${PATCH} CURRENT_HASH) + string(APPEND PATCHSET_HASH ${CURRENT_HASH}) + endforeach() + + string(SHA512 PATCHSET_HASH ${PATCHSET_HASH}) + string(SUBSTRING ${PATCHSET_HASH} 0 10 PATCHSET_HASH) + set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${SHORTENED_SANITIZED_REF}-${PATCHSET_HASH}") + + if(NOT EXISTS ${SOURCE_PATH}) + set(TEMP_DIR "${CURRENT_BUILDTREES_DIR}/src/TEMP") + file(REMOVE_RECURSE ${TEMP_DIR}) + vcpkg_extract_source_archive_ex(ARCHIVE "${ARCHIVE}" WORKING_DIRECTORY ${TEMP_DIR}) + set_TEMP_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/TEMP ${SANITIZED_REF}) + + vcpkg_apply_patches( + SOURCE_PATH ${TEMP_SOURCE_PATH} + PATCHES ${_vdud_PATCHES} + ) + + file(RENAME ${TEMP_SOURCE_PATH} ${SOURCE_PATH}) + file(REMOVE_RECURSE ${TEMP_DIR}) + endif() + + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + return() endif() @@ -167,5 +199,10 @@ function(vcpkg_from_github) set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) endif() - set_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${SANITIZED_HEAD_REF}) + set_TEMP_SOURCE_PATH(${CURRENT_BUILDTREES_DIR}/src/head ${SANITIZED_HEAD_REF}) + vcpkg_apply_patches( + SOURCE_PATH ${TEMP_SOURCE_PATH} + PATCHES ${_vdud_PATCHES} + ) + set(${_vdud_OUT_SOURCE_PATH} "${TEMP_SOURCE_PATH}" PARENT_SCOPE) endfunction() diff --git a/scripts/cmake/vcpkg_get_windows_sdk.cmake b/scripts/cmake/vcpkg_get_windows_sdk.cmake index a8aad64a9..e7d72a125 100644 --- a/scripts/cmake/vcpkg_get_windows_sdk.cmake +++ b/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -1,16 +1,6 @@ # Returns Windows SDK number via out variable "ret" function(vcpkg_get_windows_sdk ret) - execute_process( - COMMAND powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "& {& '${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1'}" 2>&1 - INPUT_FILE NUL - OUTPUT_VARIABLE WINDOWS_SDK - RESULT_VARIABLE error_code) - - if (error_code) - message(FATAL_ERROR "Could not find Windows SDK") - endif() - - # Remove trailing newline and non-numeric characters - string(REGEX REPLACE "[^0-9.]" "" WINDOWS_SDK "${WINDOWS_SDK}") + set(WINDOWS_SDK $ENV{WindowsSDKVersion}) + string(REPLACE "\\" "" WINDOWS_SDK "${WINDOWS_SDK}") set(${ret} ${WINDOWS_SDK} PARENT_SCOPE) endfunction()
\ No newline at end of file diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 deleted file mode 100644 index dd3f0f9f4..000000000 --- a/scripts/fetchTool.ps1 +++ /dev/null @@ -1,107 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$true)][string]$tool -) - -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -Write-Verbose "Fetching tool: $tool" -$vcpkgRootDir = vcpkgFindFileRecursivelyUp $scriptsDir .vcpkg-root - -$downloadsDir = "$vcpkgRootDir\downloads" -vcpkgCreateDirectoryIfNotExists $downloadsDir - -function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) -{ - $tool = $tool.toLower() - - [xml]$asXml = Get-Content "$scriptsDir\vcpkgTools.xml" - $toolData = $asXml.SelectSingleNode("//tools/tool[@name=`"$tool`"]") # Case-sensitive! - - if ($toolData -eq $null) - { - throw "Unknown tool $tool" - } - - $toolPath="$downloadsDir\tools\$tool-$($toolData.version)-windows" - $exePath = "$toolPath\$($toolData.exeRelativePath)" - - if (Test-Path $exePath) - { - return $exePath - } - - $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveName" - if ($isArchive) - { - $downloadPath = "$downloadsDir\$($toolData.archiveName)" - } - else - { - $downloadPath = "$toolPath\$($toolData.exeRelativePath)" - } - - [String]$url = $toolData.url - if (!(Test-Path $downloadPath)) - { - Write-Host "Downloading $tool..." - - # Download aria2 with .NET. aria2 will be used to download everything else. - if ($tool -eq "aria2") - { - vcpkgDownloadFile $url $downloadPath $toolData.sha512 - } - else - { - $aria2exe = fetchToolInternal "aria2" - vcpkgDownloadFileWithAria2 $aria2exe $url $downloadPath $toolData.sha512 - } - - Write-Host "Downloading $tool... done." - } - else - { - vcpkgCheckEqualFileHash -url $url -filePath $downloadPath -expectedHash $toolData.sha512 - } - - if ($isArchive) - { - Write-Host "Extracting $tool..." - # Extract 7zip920 with shell because we need it to extract 7zip - # Extract aria2 with shell because we need it to download 7zip - if ($tool -eq "7zip920" -or $tool -eq "aria2") - { - vcpkgExtractZipFile -ArchivePath $downloadPath -DestinationDir $toolPath - } - elseif ($tool -eq "7zip") - { - $sevenZip920 = fetchToolInternal "7zip920" - $ec = vcpkgInvokeCommand "$sevenZip920" "x `"$downloadPath`" -o`"$toolPath`" -y" - if ($ec -ne 0) - { - Write-Host "Could not extract $downloadPath" - throw - } - } - else - { - $sevenZipExe = fetchToolInternal "7zip" - vcpkgExtractFileWith7z -sevenZipExe "$sevenZipExe" -ArchivePath $downloadPath -DestinationDir $toolPath - } - Write-Host "Extracting $tool... done." - } - - if (-not (Test-Path $exePath)) - { - Write-Error "Could not detect or download $tool" - throw - } - - return $exePath -} - -$path = fetchToolInternal $tool -Write-Verbose "Fetching tool: $tool. Done." -return "<sol>::$path::<eol>" diff --git a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 b/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 deleted file mode 100644 index d7fd24e24..000000000 --- a/scripts/findAnyMSBuildWithCppPlatformToolset.ps1 +++ /dev/null @@ -1,58 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$False)] - [string]$withVSPath = "" -) - -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition - -$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash - -$VisualStudioInstallationInstances = & $scriptsDir\findVisualStudioInstallationInstances.ps1 -if ($VisualStudioInstallationInstances -eq $null) -{ - throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed." -} - -Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstallationInstances))" -foreach ($instanceCandidateWithEOL in $VisualStudioInstallationInstances) -{ - $instanceCandidate = $instanceCandidateWithEOL -replace "<sol>::" -replace "::<eol>" - Write-Verbose "Inspecting: $instanceCandidate" - $split = $instanceCandidate -split "::" - # $preferenceWeight = $split[0] - # $releaseType = $split[1] - $version = $split[2] - $path = $split[3] - - if ($withVSPath -ne "" -and $withVSPath -ne $path) - { - Write-Verbose "Skipping: $instanceCandidate" - continue - } - - $majorVersion = $version.Substring(0,2); - if ($majorVersion -eq "15") - { - $VCFolder= "$path\VC\Tools\MSVC\" - if (Test-Path $VCFolder) - { - Write-Verbose "Picking: $instanceCandidate" - return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" - } - } - - if ($majorVersion -eq "14") - { - $clExe= "$path\VC\bin\cl.exe" - if (Test-Path $clExe) - { - Write-Verbose "Picking: $instanceCandidate" - $programFilesPath = & $scriptsDir\getProgramFiles32bit.ps1 - return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" - } - } -} - -throw "Could not find MSBuild version with C++ support. VS2015 or VS2017 (with C++) needs to be installed."
\ No newline at end of file diff --git a/scripts/findVisualStudioInstallationInstances.ps1 b/scripts/findVisualStudioInstallationInstances.ps1 deleted file mode 100644 index cb51c345d..000000000 --- a/scripts/findVisualStudioInstallationInstances.ps1 +++ /dev/null @@ -1,61 +0,0 @@ -[CmdletBinding()] -param( - -) -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -$vswhereExe = (& $scriptsDir\fetchTool.ps1 "vswhere") -replace "<sol>::" -replace "::<eol>" - -$output = & $vswhereExe -prerelease -legacy -products * -format xml -[xml]$asXml = $output - -$results = New-Object System.Collections.ArrayList -foreach ($instance in $asXml.instances.instance) -{ - $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash - $installationVersion = $instance.InstallationVersion - - $isPrerelease = -7 - if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") - { - $isPrerelease = $instance.isPrerelease - } - - if ($isPrerelease -eq 0) - { - $releaseType = "PreferenceWeight3::StableRelease" - } - elseif ($isPrerelease -eq 1) - { - $releaseType = "PreferenceWeight2::PreRelease" - } - else - { - $releaseType = "PreferenceWeight1::Legacy" - } - - # Placed like that for easy sorting according to preference - $results.Add("<sol>::${releaseType}::${installationVersion}::${installationPath}::<eol>") > $null -} - -# If nothing is found, attempt to find VS2015 Build Tools (not detected by vswhere.exe) -if ($results.Count -eq 0) -{ - $programFiles = & $scriptsDir\getProgramFiles32bit.ps1 - $installationPath = "$programFiles\Microsoft Visual Studio 14.0" - $clExe = "$installationPath\VC\bin\cl.exe" - $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - - if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) - { - return "<sol>::PreferenceWeight1::Legacy::14.0::$installationPath::<eol>" - } -} - - -$results.Sort() -$results.Reverse() - -return $results
\ No newline at end of file diff --git a/scripts/getProgramFiles32bit.ps1 b/scripts/getProgramFiles32bit.ps1 deleted file mode 100644 index 6b71915b1..000000000 --- a/scripts/getProgramFiles32bit.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdletBinding()] -param( - -) - -$out = ${env:PROGRAMFILES(X86)} -if ($out -eq $null) -{ - $out = ${env:PROGRAMFILES} -} - -if ($out -eq $null) -{ - throw "Could not find [Program Files 32-bit]" -} - -return $out
\ No newline at end of file diff --git a/scripts/getProgramFilesPlatformBitness.ps1 b/scripts/getProgramFilesPlatformBitness.ps1 deleted file mode 100644 index 2be4c1137..000000000 --- a/scripts/getProgramFilesPlatformBitness.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -[CmdletBinding()] -param( - -) - -$out = ${env:ProgramW6432} -if ($out -eq $null) -{ - $out = ${env:PROGRAMFILES} -} - -if ($out -eq $null) -{ - throw "Could not find [Program Files Platform Bitness]" -} - -return $out
\ No newline at end of file diff --git a/scripts/getWindowsSDK.ps1 b/scripts/getWindowsSDK.ps1 deleted file mode 100644 index d5e2f59a2..000000000 --- a/scripts/getWindowsSDK.ps1 +++ /dev/null @@ -1,126 +0,0 @@ -[CmdletBinding()] -param( - [Parameter(Mandatory=$False)] - [switch]$DisableWin10SDK = $False, - - [Parameter(Mandatory=$False)] - [switch]$DisableWin81SDK = $False -) - -Set-StrictMode -Version Latest -$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -. "$scriptsDir\VcpkgPowershellUtils.ps1" - -if ($DisableWin10SDK -and $DisableWin81SDK) -{ - throw "Both Win10SDK and Win81SDK were disabled." -} - -Write-Verbose "Executing $($MyInvocation.MyCommand.Name)" - -$validInstances = New-Object System.Collections.ArrayList - -# Windows 10 SDK -function CheckWindows10SDK($path) -{ - if ($path -eq $null) - { - return - } - - $folder = (Join-Path $path "Include") - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) - [array]::Reverse($win10sdkVersions) # Newest SDK first - - foreach ($win10sdkV in $win10sdkVersions) - { - $windowsheader = "$folder\$win10sdkV\um\windows.h" - if (!(Test-Path $windowsheader)) - { - Write-Verbose "$windowsheader - Not Found" - continue - } - Write-Verbose "$windowsheader - Found" - - $ddkheader = "$folder\$win10sdkV\shared\sdkddkver.h" - if (!(Test-Path $ddkheader)) - { - Write-Verbose "$ddkheader - Not Found" - continue - } - - Write-Verbose "$ddkheader - Found" - $win10sdkVersionString = $win10sdkV.ToString() - Write-Verbose "Found $win10sdkVersionString" - $validInstances.Add($win10sdkVersionString) > $null - } -} - -Write-Verbose "`n" -Write-Verbose "Looking for Windows 10 SDK" -$regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue -$regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue -if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } -if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } -CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") -CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") - -# Windows 8.1 SDK -function CheckWindows81SDK($path) -{ - if ($path -eq $null) - { - return - } - - $folder = "$path\Include" - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win81sdkVersionString = "8.1" - Write-Verbose "Found $win81sdkVersionString" - $validInstances.Add($win81sdkVersionString) > $null -} - -Write-Verbose "`n" -Write-Verbose "Looking for Windows 8.1 SDK" -$regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue -$regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue -if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } -if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } -CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") -CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") - -Write-Verbose "`n`n`n" -Write-Verbose "The following Windows SDKs were found:" -foreach ($instance in $validInstances) -{ - Write-Verbose $instance -} - -# Selecting -foreach ($instance in $validInstances) -{ - if (!$DisableWin10SDK -and $instance -match "10.") - { - return $instance - } - - if (!$DisableWin81SDK -and $instance -match "8.1") - { - return $instance - } -} - -throw "Could not detect a Windows SDK / TargetPlatformVersion" diff --git a/scripts/internalCI.ps1 b/scripts/internalCI.ps1 deleted file mode 100644 index 9529c3766..000000000 --- a/scripts/internalCI.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -$ErrorActionPreference = "Stop" - -rm TEST-internal-ci.xml -errorAction SilentlyContinue - -New-Item -type directory downloads -errorAction SilentlyContinue | Out-Null -./scripts/bootstrap.ps1 -if (-not $?) { throw $? } - -# Clear out any intermediate files from the previous build -if (Test-Path buildtrees) -{ - Get-ChildItem buildtrees/*/* | ? { $_.Name -ne "src" } | Remove-Item -Recurse -Force -} - -# Purge any outdated packages -./vcpkg remove --outdated --recurse -if (-not $?) { throw $? } - -./vcpkg.exe install azure-storage-cpp cpprestsdk:x64-windows-static cpprestsdk:x86-uwp ` -bond cryptopp zlib expat sdl2 curl sqlite3 libuv protobuf:x64-windows sfml opencv:x64-windows uwebsockets uwebsockets:x64-windows-static ` -opencv:x86-uwp boost:x86-uwp --keep-going "--x-xunit=TEST-internal-ci.xml" --recurse -if (-not $?) { throw $? } diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake index ea4f15d60..1ad180b4b 100644 --- a/scripts/toolchains/linux.cmake +++ b/scripts/toolchains/linux.cmake @@ -2,3 +2,17 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "")
endif()
set(CMAKE_SYSTEM_NAME Linux CACHE STRING "")
+
+get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
+if(NOT _CMAKE_IN_TRY_COMPILE)
+ set(CMAKE_CXX_FLAGS " ${VCPKG_CXX_FLAGS}" CACHE STRING "")
+ set(CMAKE_C_FLAGS " ${VCPKG_C_FLAGS}" CACHE STRING "")
+
+ set(CMAKE_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "")
+ set(CMAKE_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
+ set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
+ set(CMAKE_C_FLAGS_RELEASE "${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
+
+ set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${VCPKG_LINKER_FLAGS}" CACHE STRING "")
+endif()
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index daaf29214..9d5487577 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -22,11 +22,23 @@ <archiveName>cmake-3.10.2-Linux-x86_64.tar.gz</archiveName> </tool> <tool name="git" os="windows"> - <version>2.16.2</version> + <version>2.17.0</version> <exeRelativePath>cmd\git.exe</exeRelativePath> - <url>https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/MinGit-2.16.2-32-bit.zip</url> - <sha512>004e1dc1904f2e2d5c3534d0a56f58bf030b1146f5b263d6d191e60f72cd35455977c588604708125a1e93268ee8f7a5ab32ed6115adc028257b12d5926f350a</sha512> - <archiveName>MinGit-2.16.2-32-bit.zip</archiveName> + <url>https://github.com/git-for-windows/git/releases/download/v2.17.0.windows.1/MinGit-2.17.0-32-bit.zip</url> + <sha512>a34575ab1b4f553e62535e38492904b512df4d6a837cf4abf205dbcdd05edf1eef450cc5b15a4f63f901424d5f3cd1f78b6b22437d0d4f8cd9ce4e42e82617b9</sha512> + <archiveName>MinGit-2.17.0-32-bit.zip</archiveName> + </tool> + <tool name="git" os="linux"> + <version>2.7.4</version> + <exeRelativePath></exeRelativePath> + <url></url> + <sha512></sha512> + </tool> + <tool name="git" os="osx"> + <version>2.7.4</version> + <exeRelativePath></exeRelativePath> + <url></url> + <sha512></sha512> </tool> <tool name="vswhere" os="windows"> <version>2.4.1</version> @@ -49,17 +61,10 @@ </tool> <tool name="7zip" os="windows"> <version>18.01.0</version> - <exeRelativePath>7za.exe</exeRelativePath> - <url>https://www.7-zip.org/a/7z1801-extra.7z</url> - <sha512>9133fc551d76515e37fdd4dd8c1e28d464aea493548246b44565a42bba46715764f41f9cfa14d470d298c3a6e9829d200f8be5168cb67cf8f23d8042fca833bc</sha512> - <archiveName>7z1801-extra.7z</archiveName> - </tool> - <tool name="7zip920" os="windows"> - <version>9.20.0</version> - <exeRelativePath>7za.exe</exeRelativePath> - <url>https://www.7-zip.org/a/7za920.zip</url> - <sha512>84e830c91a0e8ae499cc4814080da6569d8a6acbddc585c8b62abc86c809793aeb669b0a741063a379fd281ade85f120bc27efeb67d63bf961be893eec8bc3b3</sha512> - <archiveName>7za920.zip</archiveName> + <exeRelativePath>7-Zip.CommandLine.18.1.0\tools\7za.exe</exeRelativePath> + <url>https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0</url> + <sha512>8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b2571305b3ae3f4e2b85fc4a290aeda63d1a13b8</sha512> + <archiveName>7-zip.commandline.18.1.0.nupkg</archiveName> </tool> <tool name="aria2" os="windows"> <version>18.01.0</version> diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index f8e183aed..6833d4427 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.109"
\ No newline at end of file +"0.0.113"
\ No newline at end of file diff --git a/toolsrc/include/tests.utils.h b/toolsrc/include/tests.utils.h index 970506663..7f7ec9e88 100644 --- a/toolsrc/include/tests.utils.h +++ b/toolsrc/include/tests.utils.h @@ -12,10 +12,42 @@ namespace Microsoft::VisualStudio::CppUnitTestFramework { - std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t); - std::wstring ToString(const vcpkg::Dependencies::RequestType& t); - std::wstring ToString(const vcpkg::PackageSpecParseResult& t); - std::wstring ToString(const vcpkg::PackageSpec& t); + template<> + std::wstring ToString<vcpkg::Dependencies::InstallPlanType>(const vcpkg::Dependencies::InstallPlanType& t) + { + switch (t) + { + case vcpkg::Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; + case vcpkg::Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; + case vcpkg::Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; + case vcpkg::Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; + default: return ToString(static_cast<int>(t)); + } + } + + template<> + std::wstring ToString<vcpkg::Dependencies::RequestType>(const vcpkg::Dependencies::RequestType& t) + { + switch (t) + { + case vcpkg::Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; + case vcpkg::Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; + case vcpkg::Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; + default: return ToString(static_cast<int>(t)); + } + } + + template<> + std::wstring ToString<vcpkg::PackageSpecParseResult>(const vcpkg::PackageSpecParseResult& t) + { + return ToString(static_cast<uint32_t>(t)); + } + + template<> + std::wstring ToString<vcpkg::PackageSpec>(const vcpkg::PackageSpec& t) + { + return ToString(t.to_string()); + } } std::unique_ptr<vcpkg::StatusParagraph> make_status_pgh(const char* name, diff --git a/toolsrc/include/vcpkg/base/stringliteral.h b/toolsrc/include/vcpkg/base/stringliteral.h index c07f04cec..9970adc2a 100644 --- a/toolsrc/include/vcpkg/base/stringliteral.h +++ b/toolsrc/include/vcpkg/base/stringliteral.h @@ -7,7 +7,8 @@ namespace vcpkg struct StringLiteral { template<int N> - constexpr StringLiteral(const char (&str)[N]) : m_size(N), m_cstr(str) + constexpr StringLiteral(const char (&str)[N]) + : m_size(N - 1) /* -1 here accounts for the null byte at the end*/, m_cstr(str) { } diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 4cc17bcf4..4b39b0a28 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -1,6 +1,7 @@ #pragma once #include <vcpkg/base/cstringview.h> +#include <vcpkg/base/stringliteral.h> #include <vector> @@ -34,9 +35,11 @@ namespace vcpkg::Strings return details::format_internal(fmtstr, to_printf_arg(to_printf_arg(args))...); } +#if defined(_WIN32) std::wstring to_utf16(const CStringView& s); std::string to_utf8(const wchar_t* w); +#endif std::string escape_string(const CStringView& s, char char_to_escape, char escape_char); @@ -51,6 +54,7 @@ namespace vcpkg::Strings std::string ascii_to_uppercase(std::string s); bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); + bool ends_with(const std::string& s, StringLiteral pattern); template<class Container, class Transformer> std::string join(const char* delimiter, const Container& v, Transformer transformer) diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index 0d089276f..813d600cd 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -25,15 +25,6 @@ namespace vcpkg::System const fs::path& cmake_script, const std::vector<CMakeVariable>& pass_variables); - struct PowershellParameter - { - PowershellParameter(const CStringView varname, const char* varvalue); - PowershellParameter(const CStringView varname, const std::string& varvalue); - PowershellParameter(const CStringView varname, const fs::path& path); - - std::string s; - }; - struct ExitCodeAndOutput { int exit_code; @@ -47,14 +38,6 @@ namespace vcpkg::System ExitCodeAndOutput cmd_execute_and_capture_output(const CStringView cmd_line); - void powershell_execute(const std::string& title, - const fs::path& script_path, - const std::vector<PowershellParameter>& parameters = {}); - - std::string powershell_execute_and_capture_output(const std::string& title, - const fs::path& script_path, - const std::vector<PowershellParameter>& parameters = {}); - enum class Color { success = 10, diff --git a/toolsrc/include/vcpkg/binaryparagraph.h b/toolsrc/include/vcpkg/binaryparagraph.h index 5ba2fbde3..3315151c6 100644 --- a/toolsrc/include/vcpkg/binaryparagraph.h +++ b/toolsrc/include/vcpkg/binaryparagraph.h @@ -12,7 +12,7 @@ namespace vcpkg /// </summary> struct BinaryParagraph { - BinaryParagraph() noexcept; + BinaryParagraph(); explicit BinaryParagraph(std::unordered_map<std::string, std::string> fields); BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet, const std::string& abi_tag); BinaryParagraph(const SourceParagraph& spgh, const FeatureParagraph& fpgh, const Triplet& triplet); diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 6d29b7960..21e77aa52 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -132,14 +132,14 @@ namespace vcpkg::Commands namespace Hash { std::string get_string_hash(const std::string& s, const std::string& hash_type); - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type); + std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } namespace Fetch { - std::vector<Toolset> find_toolset_instances(const VcpkgPaths& paths); + std::vector<Toolset> find_toolset_instances_preferred_first(const VcpkgPaths& paths); fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); } diff --git a/toolsrc/include/vcpkg/userconfig.h b/toolsrc/include/vcpkg/userconfig.h index 63b8e5481..d044f43ef 100644 --- a/toolsrc/include/vcpkg/userconfig.h +++ b/toolsrc/include/vcpkg/userconfig.h @@ -17,4 +17,6 @@ namespace vcpkg void try_write_data(Files::Filesystem& fs) const; }; + + fs::path get_user_dir(); } diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 9c8f2911a..a3c90fd33 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -66,6 +66,7 @@ namespace vcpkg fs::path triplets; fs::path scripts; + fs::path tools; fs::path buildsystems; fs::path buildsystems_msbuild_targets; diff --git a/toolsrc/src/tests.paragraph.cpp b/toolsrc/src/tests.paragraph.cpp index dca89bc59..9a56ad9ee 100644 --- a/toolsrc/src/tests.paragraph.cpp +++ b/toolsrc/src/tests.paragraph.cpp @@ -5,15 +5,6 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework; -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - template<> - inline std::wstring ToString<vcpkg::PackageSpecParseResult>(const vcpkg::PackageSpecParseResult& t) - { - return ToString(static_cast<uint32_t>(t)); - } -} - namespace Strings = vcpkg::Strings; namespace UnitTest1 diff --git a/toolsrc/src/tests.utils.cpp b/toolsrc/src/tests.utils.cpp index a3d8ffc7d..ac391f559 100644 --- a/toolsrc/src/tests.utils.cpp +++ b/toolsrc/src/tests.utils.cpp @@ -5,36 +5,6 @@ using namespace Microsoft::VisualStudio::CppUnitTestFramework; using namespace vcpkg; -namespace Microsoft::VisualStudio::CppUnitTestFramework -{ - std::wstring ToString(const vcpkg::Dependencies::InstallPlanType& t) - { - switch (t) - { - case Dependencies::InstallPlanType::ALREADY_INSTALLED: return L"ALREADY_INSTALLED"; - case Dependencies::InstallPlanType::BUILD_AND_INSTALL: return L"BUILD_AND_INSTALL"; - case Dependencies::InstallPlanType::EXCLUDED: return L"EXCLUDED"; - case Dependencies::InstallPlanType::UNKNOWN: return L"UNKNOWN"; - default: return ToString(static_cast<int>(t)); - } - } - - std::wstring ToString(const vcpkg::Dependencies::RequestType& t) - { - switch (t) - { - case Dependencies::RequestType::AUTO_SELECTED: return L"AUTO_SELECTED"; - case Dependencies::RequestType::USER_REQUESTED: return L"USER_REQUESTED"; - case Dependencies::RequestType::UNKNOWN: return L"UNKNOWN"; - default: return ToString(static_cast<int>(t)); - } - } - - std::wstring ToString(const vcpkg::PackageSpecParseResult& t) { return ToString(static_cast<uint32_t>(t)); } - - std::wstring ToString(const vcpkg::PackageSpec& t) { return ToString(t.to_string()); } -} - std::unique_ptr<StatusParagraph> make_status_pgh(const char* name, const char* depends, const char* default_features, diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 06c99e9a8..ac2eec876 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -70,7 +70,7 @@ static void inner(const VcpkgCmdArguments& args) fs::path vcpkg_root_dir; if (args.vcpkg_root_dir != nullptr) { - vcpkg_root_dir = fs::stdfs::absolute(Strings::to_utf16(*args.vcpkg_root_dir)); + vcpkg_root_dir = fs::stdfs::absolute(fs::u8path(*args.vcpkg_root_dir)); } else { @@ -94,6 +94,8 @@ static void inner(const VcpkgCmdArguments& args) Checks::check_exit(VCPKG_LINE_INFO, !vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root."); + Debug::println("Using vcpkg-root: %s", vcpkg_root_dir.u8string()); + auto default_vs_path = System::get_environment_variable("VCPKG_DEFAULT_VS_PATH").value_or(""); const Expected<VcpkgPaths> expected_paths = VcpkgPaths::create(vcpkg_root_dir, default_vs_path); diff --git a/toolsrc/src/vcpkg/base/checks.cpp b/toolsrc/src/vcpkg/base/checks.cpp index d96cb98ff..2ac5f9a15 100644 --- a/toolsrc/src/vcpkg/base/checks.cpp +++ b/toolsrc/src/vcpkg/base/checks.cpp @@ -16,6 +16,8 @@ namespace vcpkg::Checks const auto elapsed_us = GlobalState::timer.lock()->microseconds(); + Debug::println("Exiting after %d us", static_cast<int>(elapsed_us)); + auto metrics = Metrics::g_metrics.lock(); metrics->track_metric("elapsed_us", elapsed_us); GlobalState::debugging = false; diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index 1723b467e..3d96e834b 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -55,17 +55,18 @@ namespace vcpkg::Files virtual fs::path find_file_recursively_up(const fs::path& starting_dir, const std::string& filename) const override { + static const fs::path UNIX_ROOT = "/"; fs::path current_dir = starting_dir; - for (; !current_dir.empty(); current_dir = current_dir.parent_path()) + for (; !current_dir.empty() && current_dir != UNIX_ROOT; current_dir = current_dir.parent_path()) { const fs::path candidate = current_dir / filename; if (exists(candidate)) { - break; + return current_dir; } } - return current_dir; + return fs::path(); } virtual std::vector<fs::path> get_files_recursive(const fs::path& dir) const override diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index fbc33ca42..8d43e7af7 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -49,33 +49,29 @@ namespace vcpkg::Strings::details namespace vcpkg::Strings { +#if defined(_WIN32) std::wstring to_utf16(const CStringView& s) { -#if defined(_WIN32) std::wstring output; const size_t size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, nullptr, 0); if (size == 0) return output; output.resize(size - 1); MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, output.data(), static_cast<int>(size) - 1); return output; -#else - Checks::unreachable(VCPKG_LINE_INFO); -#endif } +#endif +#if defined(_WIN32) std::string to_utf8(const wchar_t* w) { -#if defined(_WIN32) std::string output; const size_t size = WideCharToMultiByte(CP_UTF8, 0, w, -1, nullptr, 0, nullptr, nullptr); if (size == 0) return output; output.resize(size - 1); WideCharToMultiByte(CP_UTF8, 0, w, -1, output.data(), static_cast<int>(size) - 1, nullptr, nullptr); return output; -#else - Checks::unreachable(VCPKG_LINE_INFO); -#endif } +#endif std::string escape_string(const CStringView& s, char char_to_escape, char escape_char) { @@ -132,6 +128,12 @@ namespace vcpkg::Strings #endif } + bool ends_with(const std::string& s, StringLiteral pattern) + { + if (s.size() < pattern.size()) return false; + return std::equal(s.end() - pattern.size(), s.end(), pattern.c_str(), pattern.c_str() + pattern.size()); + } + std::string replace_all(std::string&& s, const std::string& search, const std::string& rep) { size_t pos = 0; diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index d4210fe6d..1aa12d0a4 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -40,8 +40,9 @@ namespace vcpkg::System if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); #elif defined(__APPLE__) - uint32_t size = 1024 * 32; - char buf[size] = {}; + static constexpr const uint32_t buff_size = 1024 * 32; + uint32_t size = buff_size; + char buf[buff_size] = {}; bool result = _NSGetExecutablePath(buf, &size); Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path."); std::unique_ptr<char> canonicalPath(realpath(buf, NULL)); @@ -128,33 +129,9 @@ namespace vcpkg::System R"("%s" %s -P "%s")", cmake_exe.u8string(), cmd_cmake_pass_variables, cmake_script.generic_u8string()); } - PowershellParameter::PowershellParameter(const CStringView varname, const char* varvalue) - : s(Strings::format(R"(-%s '%s')", varname, varvalue)) - { - } - - PowershellParameter::PowershellParameter(const CStringView varname, const std::string& varvalue) - : PowershellParameter(varname, varvalue.c_str()) - { - } - - PowershellParameter::PowershellParameter(const CStringView varname, const fs::path& path) - : PowershellParameter(varname, path.generic_u8string()) - { - } - - static std::string make_powershell_cmd(const fs::path& script_path, - const std::vector<PowershellParameter>& parameters) - { - const std::string args = Strings::join(" ", parameters, [](auto&& v) { return v.s; }); - - // TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned - return Strings::format( - R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); - } - int cmd_execute_clean(const CStringView cmd_line, const std::unordered_map<std::string, std::string>& extra_env) { + auto timer = Chrono::ElapsedTimer::create_started(); #if defined(_WIN32) static const std::string SYSTEM_ROOT = get_environment_variable("SystemRoot").value_or_exit(VCPKG_LINE_INFO); static const std::string SYSTEM_32 = SYSTEM_ROOT + R"(\system32)"; @@ -271,11 +248,14 @@ namespace vcpkg::System DWORD exit_code = 0; GetExitCodeProcess(process_info.hProcess, &exit_code); - Debug::println("CreateProcessW() returned %lu", exit_code); + Debug::println("CreateProcessW() returned %lu after %d us", exit_code, static_cast<int>(timer.microseconds())); return static_cast<int>(exit_code); #else + Debug::println("system(%s)", cmd_line.c_str()); fflush(nullptr); - return system(cmd_line.c_str()); + int rc = system(cmd_line.c_str()); + Debug::println("system() returned %d", rc); + return rc; #endif } @@ -366,71 +346,6 @@ namespace vcpkg::System #endif } - void powershell_execute(const std::string& title, - const fs::path& script_path, - const std::vector<PowershellParameter>& parameters) - { - const std::string cmd = make_powershell_cmd(script_path, parameters); - const int rc = System::cmd_execute(cmd); - - if (rc) - { - System::println(Color::error, - "%s\n" - "Could not run:\n" - " '%s'", - title, - script_path.generic_string()); - - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("error", "powershell script failed"); - locked_metrics->track_property("title", title); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, rc); - } - } - - std::string powershell_execute_and_capture_output(const std::string& title, - const fs::path& script_path, - const std::vector<PowershellParameter>& parameters) - { - const std::string cmd = make_powershell_cmd(script_path, parameters); - auto rc = System::cmd_execute_and_capture_output(cmd); - - if (rc.exit_code) - { - System::println(Color::error, - "%s\n" - "Could not run:\n" - " '%s'\n" - "Error message was:\n" - " %s", - title, - script_path.generic_string(), - rc.output); - - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_property("error", "powershell script failed"); - locked_metrics->track_property("title", title); - } - - Checks::exit_with_code(VCPKG_LINE_INFO, rc.exit_code); - } - - // Remove newline from all output. - // Powershell returns newlines when it hits the column count of the console. - // For example, this is 80 in cmd on Windows 7. If the expected output is longer than 80 lines, we get - // newlines in-between the data. - // To solve this, we design our interaction with powershell to not depend on newlines, - // and then strip all newlines here. - rc.output = Strings::replace_all(std::move(rc.output), "\n", ""); - - return rc.output; - } - void println() { putchar('\n'); } void print(const CStringView message) { fputs(message.c_str(), stdout); } diff --git a/toolsrc/src/vcpkg/binaryparagraph.cpp b/toolsrc/src/vcpkg/binaryparagraph.cpp index 126c7df97..73ca23df1 100644 --- a/toolsrc/src/vcpkg/binaryparagraph.cpp +++ b/toolsrc/src/vcpkg/binaryparagraph.cpp @@ -24,7 +24,7 @@ namespace vcpkg static const std::string DEFAULTFEATURES = "Default-Features"; } - BinaryParagraph::BinaryParagraph() noexcept = default; + BinaryParagraph::BinaryParagraph() = default; BinaryParagraph::BinaryParagraph(std::unordered_map<std::string, std::string> fields) { diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 7a9d35667..b8ccb15bf 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -217,7 +217,12 @@ namespace vcpkg::Build if (it != toolset.supported_architectures.end()) return it->name; } - Checks::exit_with_message(VCPKG_LINE_INFO, "Unsupported toolchain combination %s", target_architecture); + Checks::exit_with_message(VCPKG_LINE_INFO, + "Unsupported toolchain combination. Target was: %s but supported ones were:\n%s", + target_architecture, + Strings::join(",", toolset.supported_architectures, [](const ToolsetArchOption& t) { + return t.name.c_str(); + })); } std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) @@ -357,7 +362,7 @@ namespace vcpkg::Build { {"CMD", "BUILD"}, {"PORT", config.scf.core_paragraph->name}, - {"CURRENT_PORT_DIR", config.port_dir / "/."}, + {"CURRENT_PORT_DIR", config.port_dir}, {"TARGET_TRIPLET", spec.triplet().canonical_name()}, {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, {"VCPKG_USE_HEAD_VERSION", @@ -456,9 +461,9 @@ namespace vcpkg::Build abi_tag_entries.insert(abi_tag_entries.end(), dependency_abis.begin(), dependency_abis.end()); abi_tag_entries.emplace_back( - AbiEntry{"portfile", Commands::Hash::get_file_hash(paths, config.port_dir / "portfile.cmake", "SHA1")}); + AbiEntry{"portfile", Commands::Hash::get_file_hash(fs, config.port_dir / "portfile.cmake", "SHA1")}); abi_tag_entries.emplace_back( - AbiEntry{"control", Commands::Hash::get_file_hash(paths, config.port_dir / "CONTROL", "SHA1")}); + AbiEntry{"control", Commands::Hash::get_file_hash(fs, config.port_dir / "CONTROL", "SHA1")}); abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); @@ -493,7 +498,7 @@ namespace vcpkg::Build const auto abi_file_path = paths.buildtrees / name / (triplet.canonical_name() + ".vcpkg_abi_info.txt"); fs.write_contents(abi_file_path, full_abi_info); - return AbiTagAndFile{Commands::Hash::get_file_hash(paths, abi_file_path, "SHA1"), abi_file_path}; + return AbiTagAndFile{Commands::Hash::get_file_hash(fs, abi_file_path, "SHA1"), abi_file_path}; } System::println( @@ -520,8 +525,8 @@ namespace vcpkg::Build System::cmd_execute_clean(Strings::format( R"("%s" x "%s" -o"%s" -y >nul)", seven_zip_exe.u8string(), archive_path.u8string(), pkg_path.u8string())); #else - System::cmd_execute_clean(Strings::format( - R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); + System::cmd_execute_clean( + Strings::format(R"(unzip -qq "%s" "-d%s")", archive_path.u8string(), pkg_path.u8string())); #endif } @@ -537,11 +542,10 @@ namespace vcpkg::Build #if defined(_WIN32) auto&& seven_zip_exe = paths.get_tool_exe(Tools::SEVEN_ZIP); - System::cmd_execute_clean(Strings::format( - R"("%s" a "%s" "%s\*" >nul)", - seven_zip_exe.u8string(), - tmp_archive_path.u8string(), - paths.package_dir(spec).u8string())); + System::cmd_execute_clean(Strings::format(R"("%s" a "%s" "%s\*" >nul)", + seven_zip_exe.u8string(), + tmp_archive_path.u8string(), + paths.package_dir(spec).u8string())); #else System::cmd_execute_clean(Strings::format( R"(cd '%s' && zip --quiet -r '%s' *)", paths.package_dir(spec).u8string(), tmp_archive_path.u8string())); @@ -779,14 +783,12 @@ namespace vcpkg::Build { return it_hash->second; } - auto hash = Commands::Hash::get_file_hash(paths, triplet_file_path, "SHA1"); + auto hash = Commands::Hash::get_file_hash(paths.get_filesystem(), triplet_file_path, "SHA1"); s_hash_cache.emplace(triplet_file_path, hash); return hash; } - else - { - return std::string(); - } + + return std::string(); }(); const auto cmd_launch_cmake = System::make_cmake_cmd(cmake_exe_path, diff --git a/toolsrc/src/vcpkg/commands.cache.cpp b/toolsrc/src/vcpkg/commands.cache.cpp index a9d8ba03c..464f4f9ee 100644 --- a/toolsrc/src/vcpkg/commands.cache.cpp +++ b/toolsrc/src/vcpkg/commands.cache.cpp @@ -61,7 +61,7 @@ namespace vcpkg::Commands::Cache for (const BinaryParagraph& binary_paragraph : binary_paragraphs) { const std::string displayname = binary_paragraph.displayname(); - if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) + if (!Strings::case_insensitive_ascii_contains(displayname, args.command_arguments[0])) { continue; } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index 04b42ea00..e2b93dc7e 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -154,8 +154,10 @@ namespace vcpkg::Commands::CI void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) { - Checks::check_exit( - VCPKG_LINE_INFO, GlobalState::g_binary_caching, "The ci command requires binary caching to be enabled."); + if (!GlobalState::g_binary_caching) + { + System::println(System::Color::warning, "Warning: Running ci without binary caching!"); + } const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); diff --git a/toolsrc/src/vcpkg/commands.cpp b/toolsrc/src/vcpkg/commands.cpp index 8b6ffb3d7..09da57705 100644 --- a/toolsrc/src/vcpkg/commands.cpp +++ b/toolsrc/src/vcpkg/commands.cpp @@ -43,7 +43,7 @@ namespace vcpkg::Commands {"portsdiff", &PortsDiff::perform_and_exit}, {"autocomplete", &Autocomplete::perform_and_exit}, {"hash", &Hash::perform_and_exit}, - // {"fetch", &Fetch::perform_and_exit}, + {"fetch", &Fetch::perform_and_exit}, }; return t; } diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index b6324565c..2569c2cea 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -78,7 +78,8 @@ namespace vcpkg::Commands::Edit if (Util::Sets::contains(options.switches, OPTION_BUILDTREES)) { return Util::fmap(ports, [&](const std::string& port_name) -> std::string { - return (paths.buildtrees / port_name).u8string(); + const auto buildtrees_current_dir = paths.buildtrees / port_name; + return Strings::format(R"###("%s")###", buildtrees_current_dir.u8string()); }); } diff --git a/toolsrc/src/vcpkg/commands.fetch.cpp b/toolsrc/src/vcpkg/commands.fetch.cpp index 1e31e6bc4..33c5c1dcc 100644 --- a/toolsrc/src/vcpkg/commands.fetch.cpp +++ b/toolsrc/src/vcpkg/commands.fetch.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include <vcpkg/base/checks.h> +#include <vcpkg/base/sortedvector.h> #include <vcpkg/base/strings.h> #include <vcpkg/base/system.h> #include <vcpkg/base/util.h> @@ -19,6 +20,7 @@ namespace vcpkg::Commands::Fetch fs::path exe_path; std::string url; fs::path download_path; + bool is_archive; fs::path tool_dir_path; std::string sha512; }; @@ -41,20 +43,85 @@ namespace vcpkg::Commands::Fetch return result; } - static Optional<std::string> extract_string_between_delimiters(const std::string& input, - const std::string& left_delim, - const std::string& right_delim, - const size_t& starting_offset = 0) + struct VcpkgStringRange { - const size_t from = input.find(left_delim, starting_offset); - if (from == std::string::npos) return nullopt; + VcpkgStringRange() = default; - const size_t substring_start = from + left_delim.length(); + // Implicit by design + VcpkgStringRange(const std::string& s) : begin(s.cbegin()), end(s.cend()) {} - const size_t to = input.find(right_delim, substring_start); - if (from == std::string::npos) return nullopt; + VcpkgStringRange(const std::string::const_iterator begin, const std::string::const_iterator end) + : begin(begin), end(end) + { + } + + std::string::const_iterator begin; + std::string::const_iterator end; + + std::string to_string() const { return std::string(this->begin, this->end); } + }; - return input.substr(substring_start, to - substring_start); + static std::vector<VcpkgStringRange> find_all_enclosed(const VcpkgStringRange& input, + const std::string& left_delim, + const std::string& right_delim) + { + std::string::const_iterator it_left = input.begin; + std::string::const_iterator it_right = input.begin; + + std::vector<VcpkgStringRange> output; + + while (true) + { + it_left = std::search(it_right, input.end, left_delim.cbegin(), left_delim.cend()); + if (it_left == input.end) break; + + it_left += left_delim.length(); + + it_right = std::search(it_left, input.end, right_delim.cbegin(), right_delim.cend()); + if (it_right == input.end) break; + + output.emplace_back(it_left, it_right); + + ++it_right; + } + + return output; + } + + static VcpkgStringRange find_exactly_one_enclosed(const VcpkgStringRange& input, + const std::string& left_tag, + const std::string& right_tag) + { + std::vector<VcpkgStringRange> result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() == 1, + "Found %d sets of %s.*%s but expected exactly 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + return std::move(result.front()); + } + + static Optional<VcpkgStringRange> find_at_most_one_enclosed(const VcpkgStringRange& input, + const std::string& left_tag, + const std::string& right_tag) + { + std::vector<VcpkgStringRange> result = find_all_enclosed(input, left_tag, right_tag); + Checks::check_exit(VCPKG_LINE_INFO, + result.size() <= 1, + "Found %d sets of %s.*%s but expected at most 1, in block:\n%s", + result.size(), + left_tag, + right_tag, + input); + + if (result.empty()) + { + return nullopt; + } + + return result.front(); } static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) @@ -72,20 +139,6 @@ namespace vcpkg::Commands::Fetch #if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) static const std::string XML_VERSION = "2"; static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; - - const auto get_string_inside_tags = - [](const std::string& input, const std::string& left_delim, const std::string& right_delim) -> std::string { - Optional<std::string> result = extract_string_between_delimiters(input, left_delim, right_delim); - Checks::check_exit(VCPKG_LINE_INFO, - result.has_value(), - "Could not find tag <%s>.*<%s> in %s", - left_delim, - right_delim, - XML_PATH.generic_string()); - - return *result.get(); - }; - static const std::regex XML_VERSION_REGEX{R"###(<tools[\s]+version="([^"]+)">)###"}; static const std::string XML = paths.get_filesystem().read_contents(XML_PATH).value_or_exit(VCPKG_LINE_INFO); std::smatch match_xml_version; @@ -111,14 +164,14 @@ namespace vcpkg::Commands::Fetch tool, XML_PATH.generic_string()); - const std::string tool_data = get_string_inside_tags(XML, match_tool_entry[0], R"(</tool>)"); - - const std::string version_as_string = get_string_inside_tags(tool_data, "<version>", R"(</version>)"); + const std::string tool_data = find_exactly_one_enclosed(XML, match_tool_entry[0], "</tool>").to_string(); + const std::string version_as_string = + find_exactly_one_enclosed(tool_data, "<version>", "</version>").to_string(); const std::string exe_relative_path = - get_string_inside_tags(tool_data, "<exeRelativePath>", R"(</exeRelativePath>)"); - const std::string url = get_string_inside_tags(tool_data, "<url>", R"(</url>)"); - const std::string sha512 = get_string_inside_tags(tool_data, "<sha512>", R"(</sha512>)"); - auto archive_name = extract_string_between_delimiters(tool_data, "<archiveName>", R"(</archiveName>)"); + find_exactly_one_enclosed(tool_data, "<exeRelativePath>", "</exeRelativePath>").to_string(); + const std::string url = find_exactly_one_enclosed(tool_data, "<url>", "</url>").to_string(); + const std::string sha512 = find_exactly_one_enclosed(tool_data, "<sha512>", "</sha512>").to_string(); + auto archive_name = find_at_most_one_enclosed(tool_data, "<archiveName>", "</archiveName>"); const Optional<std::array<int, 3>> version = parse_version_string(version_as_string); Checks::check_exit(VCPKG_LINE_INFO, @@ -128,13 +181,14 @@ namespace vcpkg::Commands::Fetch version_as_string); const std::string tool_dir_name = Strings::format("%s-%s-%s", tool, version_as_string, OS_STRING); - const fs::path tool_dir_path = paths.downloads / "tools" / tool_dir_name; + const fs::path tool_dir_path = paths.tools / tool_dir_name; const fs::path exe_path = tool_dir_path / exe_relative_path; return ToolData{*version.get(), exe_path, url, - paths.downloads / archive_name.value_or(exe_relative_path), + paths.downloads / archive_name.value_or(exe_relative_path).to_string(), + archive_name.has_value(), tool_dir_path, sha512}; #endif @@ -162,51 +216,87 @@ namespace vcpkg::Commands::Fetch actual_version[2] >= expected_version[2])); } - static Optional<fs::path> find_if_has_equal_or_greater_version(const std::vector<fs::path>& candidate_paths, + static Optional<fs::path> find_if_has_equal_or_greater_version(Files::Filesystem& fs, + const std::vector<fs::path>& candidate_paths, const std::string& version_check_arguments, const std::array<int, 3>& expected_version) { - auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { + const auto it = Util::find_if(candidate_paths, [&](const fs::path& p) { + if (!fs.exists(p)) return false; const std::string cmd = Strings::format(R"("%s" %s)", p.u8string(), version_check_arguments); return exists_and_has_equal_or_greater_version(cmd, expected_version); }); if (it != candidate_paths.cend()) { - return std::move(*it); + return *it; } return nullopt; } - static std::vector<std::string> keep_data_lines(const std::string& data_blob) - { - static const std::regex DATA_LINE_REGEX(R"(<sol>::(.+?)(?=::<eol>))"); - - std::vector<std::string> data_lines; - - const std::sregex_iterator it(data_blob.cbegin(), data_blob.cend(), DATA_LINE_REGEX); - const std::sregex_iterator end; - for (std::sregex_iterator i = it; i != end; ++i) - { - const std::smatch match = *i; - data_lines.push_back(match[1].str()); - } - - return data_lines; - } - -#if !defined(_WIN32) static void extract_archive(const VcpkgPaths& paths, const fs::path& archive, const fs::path& to_path) { Files::Filesystem& fs = paths.get_filesystem(); const fs::path to_path_partial = to_path.u8string() + ".partial"; 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) + if (ext == ".nupkg") + { + static bool recursion_limiter_sevenzip_old = false; + Checks::check_exit(VCPKG_LINE_INFO, !recursion_limiter_sevenzip_old); + recursion_limiter_sevenzip_old = true; + const auto nuget_exe = get_tool_path(paths, Tools::NUGET); + + const std::string stem = archive.stem().u8string(); + // assuming format of [name].[version in the form d.d.d] + // This assumption may not always hold + std::smatch match; + const bool has_match = std::regex_match(stem, match, std::regex{R"###(^(.+)\.(\d+\.\d+\.\d+)$)###"}); + Checks::check_exit(VCPKG_LINE_INFO, + has_match, + "Could not deduce nuget id and version from filename: %s", + archive.u8string()); + + const std::string nugetid = match[1]; + const std::string version = match[2]; + + const auto code_and_output = System::cmd_execute_and_capture_output(Strings::format( + R"("%s" install %s -Version %s -OutputDirectory "%s" -Source "%s" -nocache -DirectDownload -NonInteractive -ForceEnglishOutput -PackageSaveMode nuspec)", + nuget_exe.u8string(), + nugetid, + version, + to_path_partial.u8string(), + paths.downloads.u8string())); + + Checks::check_exit(VCPKG_LINE_INFO, + code_and_output.exit_code == 0, + "Failed to extract '%s' with message:\n%s", + archive.u8string(), + code_and_output.output); + recursion_limiter_sevenzip_old = false; + } + else + { + static bool recursion_limiter_sevenzip = false; + Checks::check_exit(VCPKG_LINE_INFO, !recursion_limiter_sevenzip); + recursion_limiter_sevenzip = true; + const auto seven_zip = get_tool_path(paths, Tools::SEVEN_ZIP); + const auto code_and_output = System::cmd_execute_and_capture_output(Strings::format( + R"("%s" x "%s" -o"%s" -y)", seven_zip.u8string(), archive.u8string(), to_path_partial.u8string())); + Checks::check_exit(VCPKG_LINE_INFO, + code_and_output.exit_code == 0, + "7zip failed while extracting '%s' with message:\n%s", + archive.u8string(), + code_and_output.output); + recursion_limiter_sevenzip = false; + } +#else if (ext == ".gz" && ext.extension() != ".tar") { const auto code = System::cmd_execute( @@ -223,16 +313,23 @@ namespace vcpkg::Commands::Fetch { Checks::exit_with_message(VCPKG_LINE_INFO, "Unexpected archive extension: %s", ext.u8string()); } +#endif - fs.rename(to_path_partial, to_path); + fs.rename(to_path_partial, to_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Failed to do post-extract rename-in-place.\nfs.rename(%s, %s, %s)", + to_path_partial.u8string(), + to_path.u8string(), + ec.message()); } - static void verify_hash(const VcpkgPaths& paths, + static void verify_hash(const Files::Filesystem& fs, const std::string& url, const fs::path& path, const std::string& sha512) { - const std::string actual_hash = Hash::get_file_hash(paths, path, "SHA512"); + const std::string actual_hash = Hash::get_file_hash(fs, path, "SHA512"); Checks::check_exit(VCPKG_LINE_INFO, sha512 == actual_hash, "File does not have the expected hash:\n" @@ -246,78 +343,165 @@ namespace vcpkg::Commands::Fetch actual_hash); } - static void download_file(const VcpkgPaths& paths, +#if defined(_WIN32) + static void winhttp_download_file(Files::Filesystem& fs, + CStringView target_file_path, + CStringView hostname, + CStringView url_path) + { + // Make sure the directories are present, otherwise fopen_s fails + const auto dir = fs::path(target_file_path.c_str()).parent_path(); + std::error_code ec; + fs.create_directories(dir, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not create directories %s", dir.u8string()); + + FILE* f = nullptr; + const errno_t err = fopen_s(&f, target_file_path.c_str(), "wb"); + Checks::check_exit(VCPKG_LINE_INFO, + !err, + "Could not download https://%s%s. Failed to open file %s. Error code was %s", + hostname, + url_path, + target_file_path, + std::to_string(err)); + + auto hSession = WinHttpOpen( + L"vcpkg/1.0", WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0); + Checks::check_exit(VCPKG_LINE_INFO, hSession, "WinHttpOpen() failed: %d", GetLastError()); + + // Use Windows 10 defaults on Windows 7 + DWORD secure_protocols(WINHTTP_FLAG_SECURE_PROTOCOL_SSL3 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 | + WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2); + WinHttpSetOption(hSession, WINHTTP_OPTION_SECURE_PROTOCOLS, &secure_protocols, sizeof(secure_protocols)); + + // Specify an HTTP server. + auto hConnect = WinHttpConnect(hSession, Strings::to_utf16(hostname).c_str(), INTERNET_DEFAULT_HTTPS_PORT, 0); + Checks::check_exit(VCPKG_LINE_INFO, hConnect, "WinHttpConnect() failed: %d", GetLastError()); + + // Create an HTTP request handle. + auto hRequest = WinHttpOpenRequest(hConnect, + L"GET", + Strings::to_utf16(url_path).c_str(), + nullptr, + WINHTTP_NO_REFERER, + WINHTTP_DEFAULT_ACCEPT_TYPES, + WINHTTP_FLAG_SECURE); + Checks::check_exit(VCPKG_LINE_INFO, hRequest, "WinHttpOpenRequest() failed: %d", GetLastError()); + + // Send a request. + auto bResults = + WinHttpSendRequest(hRequest, WINHTTP_NO_ADDITIONAL_HEADERS, 0, WINHTTP_NO_REQUEST_DATA, 0, 0, 0); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpSendRequest() failed: %d", GetLastError()); + + // End the request. + bResults = WinHttpReceiveResponse(hRequest, NULL); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpReceiveResponse() failed: %d", GetLastError()); + + std::vector<char> buf; + + size_t total_downloaded_size = 0; + DWORD dwSize = 0; + do + { + DWORD downloaded_size = 0; + bResults = WinHttpQueryDataAvailable(hRequest, &dwSize); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpQueryDataAvailable() failed: %d", GetLastError()); + + if (buf.size() < dwSize) buf.resize(dwSize * 2); + + bResults = WinHttpReadData(hRequest, (LPVOID)buf.data(), dwSize, &downloaded_size); + Checks::check_exit(VCPKG_LINE_INFO, bResults, "WinHttpReadData() failed: %d", GetLastError()); + fwrite(buf.data(), 1, downloaded_size, f); + + total_downloaded_size += downloaded_size; + } while (dwSize > 0); + + WinHttpCloseHandle(hSession); + WinHttpCloseHandle(hConnect); + WinHttpCloseHandle(hRequest); + fflush(f); + fclose(f); + } +#endif + + static void download_file(Files::Filesystem& fs, const std::string& url, const fs::path& download_path, const std::string& sha512) { - Files::Filesystem& fs = paths.get_filesystem(); const std::string download_path_part = download_path.u8string() + ".part"; std::error_code ec; + fs.remove(download_path, ec); fs.remove(download_path_part, ec); - const auto code = System::cmd_execute(Strings::format( - R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); +#if defined(_WIN32) + auto url_no_proto = url.substr(8); // drop https:// + auto path_begin = Util::find(url_no_proto, '/'); + std::string hostname(url_no_proto.begin(), path_begin); + std::string path(path_begin, url_no_proto.end()); + + winhttp_download_file(fs, download_path_part.c_str(), hostname, path); +#else + const auto code = System::cmd_execute( + Strings::format(R"(curl -L '%s' --create-dirs --output '%s')", url, download_path_part)); Checks::check_exit(VCPKG_LINE_INFO, code == 0, "Could not download %s", url); +#endif - verify_hash(paths, url, download_path_part, sha512); - fs.rename(download_path_part, download_path); + verify_hash(fs, url, download_path_part, sha512); + fs.rename(download_path_part, download_path, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Failed to do post-download rename-in-place.\nfs.rename(%s, %s, %s)", + download_path_part, + download_path.u8string(), + ec.message()); } -#endif static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) { const std::array<int, 3>& version = tool_data.version; - const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); + Checks::check_exit(VCPKG_LINE_INFO, + !tool_data.url.empty(), + "A suitable version of %s was not found (required v%s) and unable to automatically " + "download a portable one. Please install a newer version of git.", + tool_name, + version_as_string); System::println("A suitable version of %s was not found (required v%s). Downloading portable %s v%s...", tool_name, version_as_string, tool_name, version_as_string); -#if defined(_WIN32) - const fs::path script = paths.scripts / "fetchtool.ps1"; - const std::string title = Strings::format( - "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); - const System::PowershellParameter tool_param("tool", tool_name); - const std::string output = System::powershell_execute_and_capture_output(title, script, {tool_param}); - - const std::vector<std::string> tool_path = keep_data_lines(output); - Checks::check_exit(VCPKG_LINE_INFO, tool_path.size() == 1, "Expected tool path, but got %s", output); - - const fs::path actual_downloaded_path = Strings::trim(std::string{tool_path.at(0)}); - const fs::path& expected_downloaded_path = tool_data.exe_path; - std::error_code ec; - const auto eq = fs::stdfs::equivalent(expected_downloaded_path, actual_downloaded_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - eq && !ec, - "Expected tool downloaded path to be %s, but was %s", - expected_downloaded_path.u8string(), - actual_downloaded_path.u8string()); - return actual_downloaded_path; -#else - const auto& fs = paths.get_filesystem(); + auto& fs = paths.get_filesystem(); if (!fs.exists(tool_data.download_path)) { System::println("Downloading %s...", tool_name); - download_file(paths, tool_data.url, tool_data.download_path, tool_data.sha512); + download_file(fs, tool_data.url, tool_data.download_path, tool_data.sha512); System::println("Downloading %s... done.", tool_name); } else { - verify_hash(paths, tool_data.url, tool_data.download_path, tool_data.sha512); + verify_hash(fs, tool_data.url, tool_data.download_path, tool_data.sha512); } - System::println("Extracting %s...", tool_name); - extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path); - System::println("Extracting %s... done.", tool_name); + if (tool_data.is_archive) + { + System::println("Extracting %s...", tool_name); + extract_archive(paths, tool_data.download_path, tool_data.tool_dir_path); + System::println("Extracting %s... done.", tool_name); + } + else + { + std::error_code ec; + fs.create_directories(tool_data.exe_path.parent_path(), ec); + fs.rename(tool_data.download_path, tool_data.exe_path, ec); + } Checks::check_exit(VCPKG_LINE_INFO, fs.exists(tool_data.exe_path), - "Expected %s to exist after extracting", - tool_data.exe_path); + "Expected %s to exist after fetching", + tool_data.exe_path.u8string()); return tool_data.exe_path; -#endif } static fs::path get_cmake_path(const VcpkgPaths& paths) @@ -339,8 +523,8 @@ namespace vcpkg::Commands::Fetch const auto& program_files_32_bit = System::get_program_files_32_bit(); if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); - const Optional<fs::path> path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); + const Optional<fs::path> path = find_if_has_equal_or_greater_version( + paths.get_filesystem(), candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -372,7 +556,8 @@ namespace vcpkg::Commands::Fetch const std::vector<fs::path> from_path = Files::find_from_PATH("ninja"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, "--version", TOOL_DATA.version); + auto path = find_if_has_equal_or_greater_version( + paths.get_filesystem(), candidate_paths, "--version", TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -390,7 +575,8 @@ namespace vcpkg::Commands::Fetch const std::vector<fs::path> from_path = Files::find_from_PATH("nuget"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); - auto path = find_if_has_equal_or_greater_version(candidate_paths, "", TOOL_DATA.version); + auto path = + find_if_has_equal_or_greater_version(paths.get_filesystem(), candidate_paths, "", TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -401,11 +587,7 @@ namespace vcpkg::Commands::Fetch static fs::path get_git_path(const VcpkgPaths& paths) { -#if defined(_WIN32) static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "git"); -#else - static const ToolData TOOL_DATA = ToolData{{2, 7, 4}, ""}; -#endif static const std::string VERSION_CHECK_ARGUMENTS = "--version"; std::vector<fs::path> candidate_paths; @@ -420,8 +602,8 @@ namespace vcpkg::Commands::Fetch const auto& program_files_32_bit = System::get_program_files_32_bit(); if (const auto pf = program_files_32_bit.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); - const Optional<fs::path> path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); + const Optional<fs::path> path = find_if_has_equal_or_greater_version( + paths.get_filesystem(), candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -446,8 +628,8 @@ namespace vcpkg::Commands::Fetch // candidate_paths.push_back(fs::path(System::get_environment_variable("HOMEDRIVE").value_or("C:")) / "Qt" / // "QtIFW-3.1.0" / "bin" / "installerbase.exe"); - const Optional<fs::path> path = - find_if_has_equal_or_greater_version(candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); + const Optional<fs::path> path = find_if_has_equal_or_greater_version( + paths.get_filesystem(), candidate_paths, VERSION_CHECK_ARGUMENTS, TOOL_DATA.version); if (const auto p = path.get()) { return *p; @@ -458,48 +640,114 @@ namespace vcpkg::Commands::Fetch struct VisualStudioInstance { + enum class ReleaseType + { + STABLE, + PRERELEASE, + LEGACY + }; + + static bool preferred_first_comparator(const VisualStudioInstance& left, const VisualStudioInstance& right) + { + const auto get_preference_weight = [](const ReleaseType& type) -> int { + switch (type) + { + case ReleaseType::STABLE: return 3; + case ReleaseType::PRERELEASE: return 2; + case ReleaseType::LEGACY: return 1; + default: Checks::unreachable(VCPKG_LINE_INFO); + } + }; + + if (left.release_type != right.release_type) + { + return get_preference_weight(left.release_type) > get_preference_weight(right.release_type); + } + + return left.version > right.version; + } + + VisualStudioInstance(fs::path&& root_path, std::string&& version, const ReleaseType& release_type) + : root_path(std::move(root_path)), version(std::move(version)), release_type(release_type) + { + } + fs::path root_path; std::string version; - std::string release_type; - std::string preference_weight; // Mostly unused, just for verification that order is as intended + ReleaseType release_type; std::string major_version() const { return version.substr(0, 2); } }; static std::vector<VisualStudioInstance> get_visual_studio_instances(const VcpkgPaths& paths) { - const fs::path script = paths.scripts / "findVisualStudioInstallationInstances.ps1"; - const std::string output = - System::powershell_execute_and_capture_output("Detecting Visual Studio instances", script); + const auto& fs = paths.get_filesystem(); + std::vector<VisualStudioInstance> instances; - const std::vector<std::string> instances_as_strings = keep_data_lines(output); - Checks::check_exit(VCPKG_LINE_INFO, - !instances_as_strings.empty(), - "Could not detect any Visual Studio instances.\n" - "Powershell script:\n" - " %s\n" - "returned:\n" - "%s", - script.generic_string(), - output); + const auto& program_files_32_bit = System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO); - std::vector<VisualStudioInstance> instances; - for (const std::string& instance_as_string : instances_as_strings) + // Instances from vswhere + const fs::path vswhere_exe = program_files_32_bit / "Microsoft Visual Studio" / "Installer" / "vswhere.exe"; + if (fs.exists(vswhere_exe)) { - const std::vector<std::string> split = Strings::split(instance_as_string, "::"); + const auto code_and_output = System::cmd_execute_and_capture_output( + Strings::format(R"("%s" -prerelease -legacy -products * -format xml)", vswhere_exe.u8string())); Checks::check_exit(VCPKG_LINE_INFO, - split.size() == 4, - "Invalid Visual Studio instance format.\n" - "Expected: PreferenceWeight::ReleaseType::Version::PathToVisualStudio\n" - "Actual : %s\n", - instance_as_string); - instances.push_back({split.at(3), split.at(2), split.at(1), split.at(0)}); + code_and_output.exit_code == 0, + "Running vswhere.exe failed with message:\n%s", + code_and_output.output); + + const auto instance_entries = find_all_enclosed(code_and_output.output, "<instance>", "</instance>"); + for (const VcpkgStringRange& instance : instance_entries) + { + auto maybe_is_prerelease = find_at_most_one_enclosed(instance, "<isPrerelease>", "</isPrerelease>"); + + VisualStudioInstance::ReleaseType release_type = VisualStudioInstance::ReleaseType::LEGACY; + if (const auto p = maybe_is_prerelease.get()) + { + const auto s = p->to_string(); + if (s == "0") + release_type = VisualStudioInstance::ReleaseType::STABLE; + else if (s == "1") + release_type = VisualStudioInstance::ReleaseType::PRERELEASE; + else + Checks::unreachable(VCPKG_LINE_INFO); + } + + instances.emplace_back( + find_exactly_one_enclosed(instance, "<installationPath>", "</installationPath>").to_string(), + find_exactly_one_enclosed(instance, "<installationVersion>", "</installationVersion>").to_string(), + release_type); + } + } + + const auto append_if_has_cl = [&](fs::path&& path_root) { + const auto cl_exe = path_root / "VC" / "bin" / "cl.exe"; + const auto vcvarsall_bat = path_root / "VC" / "vcvarsall.bat"; + + if (fs.exists(cl_exe) && fs.exists(vcvarsall_bat)) + instances.emplace_back(std::move(path_root), "14.0", VisualStudioInstance::ReleaseType::LEGACY); + }; + + // VS2015 instance from environment variable + auto maybe_vs140_comntools = System::get_environment_variable("vs140comntools"); + if (const auto path_as_string = maybe_vs140_comntools.get()) + { + // We want lexically_normal(), but it is not available + // Correct root path might be 2 or 3 levels up, depending on if the path has trailing backslash. Try both. + auto common7_tools = fs::path{*path_as_string}; + append_if_has_cl(fs::path{*path_as_string}.parent_path().parent_path()); + append_if_has_cl(fs::path{*path_as_string}.parent_path().parent_path().parent_path()); } + // VS2015 instance from Program Files + append_if_has_cl(program_files_32_bit / "Microsoft Visual Studio 14.0"); + return instances; } - std::vector<Toolset> find_toolset_instances(const VcpkgPaths& paths) +#if defined(_WIN32) + std::vector<Toolset> find_toolset_instances_preferred_first(const VcpkgPaths& paths) { using CPU = System::CPUArchitecture; @@ -511,12 +759,14 @@ namespace vcpkg::Commands::Fetch std::vector<Toolset> found_toolsets; std::vector<Toolset> excluded_toolsets; - const std::vector<VisualStudioInstance> vs_instances = get_visual_studio_instances(paths); - const bool v140_is_available = Util::find_if(vs_instances, [&](const VisualStudioInstance& vs_instance) { + const SortedVector<VisualStudioInstance> sorted{get_visual_studio_instances(paths), + VisualStudioInstance::preferred_first_comparator}; + + const bool v140_is_available = Util::find_if(sorted, [&](const VisualStudioInstance& vs_instance) { return vs_instance.major_version() == "14"; - }) != vs_instances.cend(); + }) != sorted.end(); - for (const VisualStudioInstance& vs_instance : vs_instances) + for (const VisualStudioInstance& vs_instance : sorted) { const std::string major_version = vs_instance.major_version(); if (major_version == "15") @@ -566,7 +816,7 @@ namespace vcpkg::Commands::Fetch paths_examined.push_back(dumpbin_path); if (fs.exists(dumpbin_path)) { - const Toolset v141toolset = Toolset{ + const Toolset v141toolset{ vs_instance.root_path, dumpbin_path, vcvarsall_bat, {}, V_141, supported_architectures}; auto english_language_pack = dumpbin_path.parent_path() / "1033"; @@ -581,12 +831,12 @@ namespace vcpkg::Commands::Fetch if (v140_is_available) { - const Toolset v140toolset = Toolset{vs_instance.root_path, - dumpbin_path, - vcvarsall_bat, - {"-vcvars_ver=14.0"}, - V_140, - supported_architectures}; + const Toolset v140toolset{vs_instance.root_path, + dumpbin_path, + vcvarsall_bat, + {"-vcvars_ver=14.0"}, + V_140, + supported_architectures}; found_toolsets.push_back(v140toolset); } @@ -670,6 +920,7 @@ namespace vcpkg::Commands::Fetch return found_toolsets; } +#endif fs::path get_tool_path(const VcpkgPaths& paths, const std::string& tool) { diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index 1f709f87b..0c7aa72c4 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -154,10 +154,9 @@ namespace vcpkg::Commands::Hash }; } - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type) { - Checks::check_exit( - VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); + Checks::check_exit(VCPKG_LINE_INFO, fs.exists(path), "File %s does not exist", path.u8string()); return BCryptHasher{hash_type}.hash_file(path); } @@ -202,11 +201,10 @@ namespace vcpkg::Commands::Hash return split[0]; } - std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) + std::string get_file_hash(const Files::Filesystem& fs, const fs::path& path, const std::string& hash_type) { const std::string digest_size = get_digest_size(hash_type); - Checks::check_exit( - VCPKG_LINE_INFO, paths.get_filesystem().exists(path), "File %s does not exist", path.u8string()); + Checks::check_exit(VCPKG_LINE_INFO, fs.exists(path), "File %s does not exist", path.u8string()); const std::string cmd_line = Strings::format(R"(shasum -a %s "%s")", digest_size, path.u8string()); return run_shasum_and_post_process(cmd_line); } @@ -239,7 +237,7 @@ namespace vcpkg::Commands::Hash const fs::path file_to_hash = args.command_arguments[0]; const std::string algorithm = args.command_arguments.size() == 2 ? args.command_arguments[1] : "SHA512"; - const std::string hash = get_file_hash(paths, file_to_hash, algorithm); + const std::string hash = get_file_hash(paths.get_filesystem(), file_to_hash, algorithm); System::println(hash); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/commands.integrate.cpp b/toolsrc/src/vcpkg/commands.integrate.cpp index 7061a3984..82172e363 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -5,6 +5,8 @@ #include <vcpkg/base/system.h> #include <vcpkg/base/util.h> #include <vcpkg/commands.h> +#include <vcpkg/metrics.h> +#include <vcpkg/userconfig.h> namespace vcpkg::Commands::Integrate { @@ -156,8 +158,10 @@ namespace vcpkg::Commands::Integrate } #endif + static fs::path get_path_txt_path() { return get_user_dir() / "vcpkg.path.txt"; } + #if defined(_WIN32) - static void integrate_install(const VcpkgPaths& paths) + static void integrate_install_msbuild14(Files::Filesystem& fs, const fs::path& tmp_dir) { static const std::array<fs::path, 2> OLD_SYSTEM_TARGET_FILES = { System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO) / @@ -168,8 +172,6 @@ namespace vcpkg::Commands::Integrate System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO) / "MSBuild/Microsoft.Cpp/v4.0/V140/ImportBefore/Default/vcpkg.system.props"; - auto& fs = paths.get_filesystem(); - // TODO: This block of code should eventually be removed for (auto&& old_system_wide_targets_file : OLD_SYSTEM_TARGET_FILES) { @@ -188,12 +190,6 @@ namespace vcpkg::Commands::Integrate } } } - - std::error_code ec; - const fs::path tmp_dir = paths.buildsystems / "tmp"; - fs.create_directory(paths.buildsystems, ec); - fs.create_directory(tmp_dir, ec); - bool should_install_system = true; const Expected<std::string> system_wide_file_contents = fs.read_contents(SYSTEM_WIDE_TARGETS_FILE); static const std::regex RE(R"###(<!-- version (\d+) -->)###"); @@ -232,24 +228,52 @@ namespace vcpkg::Commands::Integrate "Error: failed to copy targets file to %s", SYSTEM_WIDE_TARGETS_FILE.string()); } + } +#endif - const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets"; - fs.write_contents(appdata_src_path, - create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string())); - auto appdata_dst_path = get_appdata_targets_path(); + static void integrate_install(const VcpkgPaths& paths) + { + auto& fs = paths.get_filesystem(); - const auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); +#if defined(_WIN32) + { + std::error_code ec; + const fs::path tmp_dir = paths.buildsystems / "tmp"; + fs.create_directory(paths.buildsystems, ec); + fs.create_directory(tmp_dir, ec); - if (!rc || ec) + integrate_install_msbuild14(fs, tmp_dir); + + const fs::path appdata_src_path = tmp_dir / "vcpkg.user.targets"; + fs.write_contents(appdata_src_path, + create_appdata_targets_shortcut(paths.buildsystems_msbuild_targets.string())); + auto appdata_dst_path = get_appdata_targets_path(); + + const auto rc = fs.copy_file(appdata_src_path, appdata_dst_path, fs::copy_options::overwrite_existing, ec); + + if (!rc || ec) + { + System::println(System::Color::error, + "Error: Failed to copy file: %s -> %s", + appdata_src_path.string(), + appdata_dst_path.string()); + Checks::exit_fail(VCPKG_LINE_INFO); + } + } +#endif + + const auto pathtxt = get_path_txt_path(); + std::error_code ec; + fs.write_contents(pathtxt, paths.root.generic_u8string(), ec); + if (ec) { - System::println(System::Color::error, - "Error: Failed to copy file: %s -> %s", - appdata_src_path.string(), - appdata_dst_path.string()); + System::println(System::Color::error, "Error: Failed to write file: %s", pathtxt.string()); Checks::exit_fail(VCPKG_LINE_INFO); } + System::println(System::Color::success, "Applied user-wide integration for this vcpkg root."); const fs::path cmake_toolchain = paths.buildsystems / "vcpkg.cmake"; +#if defined(_WIN32) System::println( R"( All MSBuild C++ projects can now #include any installed libraries. @@ -258,17 +282,29 @@ Installing new libraries will make them instantly available. CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", cmake_toolchain.generic_string()); +#else + System::println( + R"( +CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", + cmake_toolchain.generic_string()); +#endif Checks::exit_success(VCPKG_LINE_INFO); } static void integrate_remove(Files::Filesystem& fs) { + std::error_code ec; + bool was_deleted = false; + +#if defined(_WIN32) const fs::path path = get_appdata_targets_path(); - std::error_code ec; - const bool was_deleted = fs.remove(path, ec); + was_deleted |= fs.remove(path, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %s", ec.message()); +#endif + was_deleted |= fs.remove(get_path_txt_path(), ec); Checks::check_exit(VCPKG_LINE_INFO, !ec, "Error: Unable to remove user-wide integration: %s", ec.message()); if (was_deleted) @@ -282,7 +318,6 @@ CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=%s")", Checks::exit_success(VCPKG_LINE_INFO); } -#endif #if defined(WIN32) static void integrate_project(const VcpkgPaths& paths) @@ -335,6 +370,43 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console #endif #if defined(_WIN32) + static void integrate_powershell(const VcpkgPaths& paths) + { + static constexpr StringLiteral TITLE = "PowerShell Tab-Completion"; + const fs::path script_path = paths.scripts / "addPoshVcpkgToPowershellProfile.ps1"; + + // Console font corruption workaround + SetConsoleCP(437); + SetConsoleOutputCP(437); + + const std::string cmd = Strings::format( + R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), ""); + const int rc = System::cmd_execute(cmd); + + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); + + if (rc) + { + System::println(System::Color::error, + "%s\n" + "Could not run:\n" + " '%s'", + TITLE, + script_path.generic_string()); + + { + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_property("error", "powershell script failed"); + locked_metrics->track_property("title", TITLE); + } + } + + Checks::exit_with_code(VCPKG_LINE_INFO, rc); + } +#endif + +#if defined(_WIN32) const char* const INTEGRATE_COMMAND_HELPSTRING = " vcpkg integrate install Make installed packages available user-wide. Requires admin privileges on " "first use\n" @@ -343,7 +415,8 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console " vcpkg integrate powershell Enable PowerShell Tab-Completion\n"; #else const char* const INTEGRATE_COMMAND_HELPSTRING = - "No user-wide integration methods are available on this platform\n"; + " vcpkg integrate install Make installed packages available user-wide.\n" + " vcpkg integrate remove Remove user-wide integration\n"; #endif namespace Subcommand @@ -373,7 +446,6 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); -#if defined(_WIN32) if (args.command_arguments[0] == Subcommand::INSTALL) { return integrate_install(paths); @@ -382,15 +454,14 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console { return integrate_remove(paths.get_filesystem()); } +#if defined(_WIN32) if (args.command_arguments[0] == Subcommand::PROJECT) { return integrate_project(paths); } if (args.command_arguments[0] == Subcommand::POWERSHELL) { - System::powershell_execute("PowerShell Tab-Completion", - paths.scripts / "addPoshVcpkgToPowershellProfile.ps1"); - Checks::exit_success(VCPKG_LINE_INFO); + return integrate_powershell(paths); } #endif diff --git a/toolsrc/src/vcpkg/commands.list.cpp b/toolsrc/src/vcpkg/commands.list.cpp index 1bfbc4247..cadc06ad3 100644 --- a/toolsrc/src/vcpkg/commands.list.cpp +++ b/toolsrc/src/vcpkg/commands.list.cpp @@ -76,7 +76,7 @@ namespace vcpkg::Commands::List for (const StatusParagraph* status_paragraph : installed_packages) { const std::string displayname = status_paragraph->package.displayname(); - if (Strings::case_insensitive_ascii_find(displayname, args.command_arguments[0]) == displayname.end()) + if (!Strings::case_insensitive_ascii_contains(displayname, args.command_arguments[0])) { continue; } diff --git a/toolsrc/src/vcpkg/export.cpp b/toolsrc/src/vcpkg/export.cpp index 152252018..c444cf3d0 100644 --- a/toolsrc/src/vcpkg/export.cpp +++ b/toolsrc/src/vcpkg/export.cpp @@ -226,10 +226,6 @@ namespace vcpkg::Export {fs::path{"scripts"} / "buildsystems" / "msbuild" / "vcpkg.targets"}, {fs::path{"scripts"} / "buildsystems" / "vcpkg.cmake"}, {fs::path{"scripts"} / "cmake" / "vcpkg_get_windows_sdk.cmake"}, - {fs::path{"scripts"} / "getWindowsSDK.ps1"}, - {fs::path{"scripts"} / "getProgramFilesPlatformBitness.ps1"}, - {fs::path{"scripts"} / "getProgramFiles32bit.ps1"}, - {fs::path{"scripts"} / "VcpkgPowershellUtils.ps1"}, }; for (const fs::path& file : integration_files_relative_to_root) diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index fc336d6c7..40e696fa0 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -462,14 +462,14 @@ namespace vcpkg::Install auto files = fs.read_lines(paths.listfile_path(bpgh)); if (auto p_lines = files.get()) { + std::map<std::string, std::string> config_files; std::map<std::string, std::vector<std::string>> library_targets; for (auto&& suffix : *p_lines) { - if (Strings::case_insensitive_ascii_find(suffix, "/share/") != suffix.end() && - suffix.substr(suffix.size() - 6) == ".cmake") + if (Strings::case_insensitive_ascii_contains(suffix, "/share/") && Strings::ends_with(suffix, ".cmake")) { - // File is inside the share folder + // CMake file is inside the share folder auto path = paths.installed / suffix; auto maybe_contents = fs.read_contents(path); auto find_package_name = path.parent_path().filename().u8string(); @@ -485,6 +485,21 @@ namespace vcpkg::Install ++next; } } + + auto filename = fs::u8path(suffix).filename().u8string(); + + if (Strings::ends_with(filename, "Config.cmake")) + { + auto root = filename.substr(0, filename.size() - 12); + if (Strings::case_insensitive_ascii_equals(root, find_package_name)) + config_files[find_package_name] = root; + } + else if (Strings::ends_with(filename, "-config.cmake")) + { + auto root = filename.substr(0, filename.size() - 13); + if (Strings::case_insensitive_ascii_equals(root, find_package_name)) + config_files[find_package_name] = root; + } } } @@ -497,11 +512,23 @@ namespace vcpkg::Install for (auto&& library_target_pair : library_targets) { + auto config_it = config_files.find(library_target_pair.first); + if (config_it != config_files.end()) + System::println(" find_package(%s CONFIG REQUIRED)", config_it->second); + else + System::println(" find_package(%s CONFIG REQUIRED)", library_target_pair.first); + + std::sort(library_target_pair.second.begin(), + library_target_pair.second.end(), + [](const std::string& l, const std::string& r) { + if (l.size() < r.size()) return true; + if (l.size() > r.size()) return false; + return l < r; + }); + if (library_target_pair.second.size() <= 4) { - System::println(" find_package(%s REQUIRED)\n" - " target_link_libraries(main PRIVATE %s)\n", - library_target_pair.first, + System::println(" target_link_libraries(main PRIVATE %s)\n", Strings::join(" ", library_target_pair.second)); } else @@ -509,10 +536,8 @@ namespace vcpkg::Install auto omitted = library_target_pair.second.size() - 4; library_target_pair.second.erase(library_target_pair.second.begin() + 4, library_target_pair.second.end()); - System::println(" find_package(%s REQUIRED)\n" - " # Note: %zd targets were omitted\n" + System::println(" # Note: %zd target(s) were omitted.\n" " target_link_libraries(main PRIVATE %s)\n", - library_target_pair.first, omitted, Strings::join(" ", library_target_pair.second)); } diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index 41ffceec7..77c028937 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -253,6 +253,10 @@ namespace vcpkg::Paragraphs LoadResults ret; auto port_dirs = fs.get_files_non_recursive(ports_dir); Util::sort(port_dirs); + Util::erase_remove_if(port_dirs, [&](auto&& port_dir_entry) { + return fs.is_regular_file(port_dir_entry) && port_dir_entry.filename() == ".DS_Store"; + }); + for (auto&& path : port_dirs) { auto maybe_spgh = try_load_port(fs, path); diff --git a/toolsrc/src/vcpkg/userconfig.cpp b/toolsrc/src/vcpkg/userconfig.cpp index 574a97b64..4945fdaaa 100644 --- a/toolsrc/src/vcpkg/userconfig.cpp +++ b/toolsrc/src/vcpkg/userconfig.cpp @@ -29,16 +29,21 @@ namespace namespace vcpkg { - static fs::path get_config_path() + fs::path get_user_dir() { #if defined(_WIN32) - return get_localappdata() / "vcpkg" / "config"; + return get_localappdata() / "vcpkg"; #else auto maybe_home = System::get_environment_variable("HOME"); - return fs::path(maybe_home.value_or("/var")) / ".vcpkg" / "config"; + return fs::path(maybe_home.value_or("/var")) / ".vcpkg"; #endif } + static fs::path get_config_path() + { + return get_user_dir() / "config"; + } + UserConfig UserConfig::try_read_data(const Files::Filesystem& fs) { UserConfig ret; diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 0903c2d76..9b74bea74 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -39,6 +39,7 @@ namespace vcpkg paths.triplets = paths.root / "triplets"; paths.scripts = paths.root / "scripts"; + paths.tools = paths.downloads / "tools"; paths.buildsystems = paths.scripts / "buildsystems"; paths.buildsystems_msbuild_targets = paths.buildsystems / "msbuild" / "vcpkg.targets"; @@ -113,9 +114,11 @@ namespace vcpkg return external_toolset; } - // Invariant: toolsets are non-empty and sorted with newest at back() - const std::vector<Toolset>& vs_toolsets = - this->toolsets.get_lazy([this]() { return Commands::Fetch::find_toolset_instances(*this); }); +#if !defined(_WIN32) + Checks::exit_with_message(VCPKG_LINE_INFO, "Cannot build windows triplets from non-windows."); +#else + const std::vector<Toolset>& vs_toolsets = this->toolsets.get_lazy( + [this]() { return Commands::Fetch::find_toolset_instances_preferred_first(*this); }); std::vector<const Toolset*> candidates = Util::element_pointers(vs_toolsets); const auto tsv = prebuildinfo.platform_toolset.get(); @@ -159,6 +162,8 @@ namespace vcpkg Checks::check_exit(VCPKG_LINE_INFO, !candidates.empty(), "No suitable Visual Studio instances were found"); return *candidates.front(); + +#endif } Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); } diff --git a/toolsrc/vcpkg.sln b/toolsrc/vcpkg.sln index eae73a760..9a998e214 100644 --- a/toolsrc/vcpkg.sln +++ b/toolsrc/vcpkg.sln @@ -14,17 +14,9 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{F5893B21-EA71-4432-84D6-5FB0E0461A2A}"
ProjectSection(SolutionItems) = preProject
..\scripts\bootstrap.ps1 = ..\scripts\bootstrap.ps1
- ..\scripts\fetchDependency.ps1 = ..\scripts\fetchDependency.ps1
- ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1 = ..\scripts\findAnyMSBuildWithCppPlatformToolset.ps1
- ..\scripts\findVisualStudioInstallationInstances.ps1 = ..\scripts\findVisualStudioInstallationInstances.ps1
..\scripts\get_triplet_environment.cmake = ..\scripts\get_triplet_environment.cmake
- ..\scripts\getProgramFiles32bit.ps1 = ..\scripts\getProgramFiles32bit.ps1
- ..\scripts\getProgramFilesPlatformBitness.ps1 = ..\scripts\getProgramFilesPlatformBitness.ps1
- ..\scripts\getWindowsSDK.ps1 = ..\scripts\getWindowsSDK.ps1
..\scripts\internalCI.ps1 = ..\scripts\internalCI.ps1
..\scripts\ports.cmake = ..\scripts\ports.cmake
- ..\scripts\SHA256Hash.ps1 = ..\scripts\SHA256Hash.ps1
- ..\scripts\VcpkgPowershellUtils.ps1 = ..\scripts\VcpkgPowershellUtils.ps1
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "cmake", "cmake", "{A0122231-04D5-420B-81CA-7960946E5E65}"
|
