diff options
| author | Wimok Nupphiboon <wimok.mok@gmail.com> | 2018-03-24 11:53:55 +0700 |
|---|---|---|
| committer | Wimok Nupphiboon <wimok.mok@gmail.com> | 2018-03-24 11:53:55 +0700 |
| commit | 663be4bbffd435cf5e5fc62a0774c784c10ddc68 (patch) | |
| tree | d214f24405fa75d4dad9dfb938a04846d2ca6102 | |
| parent | 1e380dde21317e73d1859dad1c64c06eb88cc502 (diff) | |
| parent | aa57df6d6ed6d17000522492b66fc93d3f32ab86 (diff) | |
| download | vcpkg-663be4bbffd435cf5e5fc62a0774c784c10ddc68.tar.gz vcpkg-663be4bbffd435cf5e5fc62a0774c784c10ddc68.zip | |
Merge remote-tracking branch 'origin/master'
362 files changed, 4602 insertions, 1666 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 134fcd63a..f41efaf10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,168 @@ +vcpkg (0.0.106) +-------------- + * Add ports: + - armadillo 8.400.0-1 + - boost-modular-build-helper 2 + - clblas 2.12-1 + - clfft 2.12.2 + - entt 2.4.2-1 + - fastcdr 1.0.6-1 + - gamma gamma-2018-01-27 + - gl3w 8f7f459d + - graphite2 1.3.10 + - ismrmrd 1.3.2-1 + - kealib 1.4.7-1 + - lcm 1.3.95 + - libcds 2.3.2 + - monkeys-audio 4.3.3 + - msix 1.0 + - nmslib 1.7.2 + - opencl 2.2 (2017.07.18) + - openmesh 6.3 + - quirc 1.0-1 + - shogun 6.1.3 + - x264 152-e9a5903edf8ca59 + - x265 2.7-1 + * Update ports: + - abseil 2018-2-5 -> 2018-03-17 + - ace 6.4.6 -> 6.4.7 + - alembic 1.7.5 -> 1.7.6 + - args d8905de -> 2018-02-23 + - asio 1.10.8-1 -> 1.12.0 + - atk 2.24.0-1 -> 2.24.0-2 + - avro-c 1.8.2 -> 1.8.2-1 + - azure-storage-cpp 3.0.0-4 -> 3.2.1 + - benchmark 1.3.0 -> 1.3.0-1 + - boost-build 1.66.0-5 -> 1.66.0-8 + - breakpad 2018-2-19 -> 2018-03-13 + - butteraugli 2017-09-02-8c60a2aefa19adb-1 -> 2018-02-25 + - c-ares 1.13.0-1 -> cares-1_14_0 + - catch-classic 1.12.0 -> 1.12.1 + - catch2 2.1.2 -> 2.2.1 + - cctz 2.1 -> 2.2 + - cgal 4.11-3 -> 4.11.1 + - chakracore 1.7.4 -> 1.8.2 + - chmlib 0.40-1 -> 0.40-2 + - cimg 2.1.8 -> 221 + - clara 2017-07-20-9661f2b4a50895d52ebb4c59382785a2b416c310 -> 2018-03-11 + - console-bridge 0.3.2-2 -> 0.3.2-3 + - coolprop 6.1.0-2 -> 6.1.0-3 + - cpp-redis 4.3.0 -> 4.3.1 + - cpr 1.3.0-1 -> 1.3.0-3 + - curl 7.58.0-1 -> 7_59_0-2 + - devil 1.8.0-1 -> 1.8.0-2 + - directxmesh dec2017 -> feb2018 + - directxtex dec2017 -> feb2018b + - directxtk dec2017 -> feb2018 + - dirent 2017-06-23-5c7194c2fe2c68c1a8212712c0b4b6195382d27d -> 1.23.1 + - discord-rpc 2.1.0 -> 3.0.0 + - doctest 1.2.6 -> 1.2.8 + - eastl 3.05.08 -> 3.07.02 + - evpp 0.6.1-1 -> 0.7.0 + - exiv2 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99 -> 2018-03-17 + - fdk-aac 2017-11-02-1e351 -> 2018-03-07 + - ffmpeg 3.3.3-2 -> 3.3.3-4 + - freetype 2.8.1-1 -> 2.8.1-3 + - freetype-gl 2017-10-9-82fb152a74f01b1483ac80d15935fbdfaf3ed836 -> 2018-02-25 + - freexl 1.0.4 -> 1.0.4-1 + - g2o 20170730_git-2 -> 20170730_git-3 + - gdal 2.2.2 -> 2.2.2-1 + - gdcm2 2.8.3 -> 2.8.4 + - geogram 1.4.9-1 -> 1.6.0-1 + - gflags 2.2.1-1 -> 2.2.1-3 + - glib 2.52.3-1 -> 2.52.3-2 + - glslang 3a21c880500eac21cdf79bef5b80f970a55ac6af-1 -> 2018-03-02 + - grpc 1.8.3 -> 1.10.0 + - gsl 2.4-2 -> 2.4-3 + - gsl-lite 0.26.0 -> 0.28.0 + - gtest 1.8.0-6 -> 1.8.0-7 + - halide release_2017_10_30 -> release_2018_02_15 + - harfbuzz 1.7.4 -> 1.7.6 + - ilmbase 2.2.0-1 -> 2.2.1-1 + - jansson 2.11 -> 2.11-2 + - jsoncpp 1.8.1-1 -> 1.8.4 + - jsonnet 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580 -> 2018-03-17 + - leptonica 1.74.4-2 -> 1.74.4-3 + - libgeotiff 1.4.2-2 -> 1.4.2-3 + - libiconv 1.15-1 -> 1.15-2 + - libjpeg-turbo 1.5.3 -> 1.5.3-1 + - libmysql 5.7.17-3 -> 8.0.4-2 + - libpng 1.6.34-2 -> 1.6.34-3 + - librtmp 2.4 -> 2.4-1 + - libsndfile 1.0.29-6830c42-2 -> 1.0.29-6830c42-3 + - libsodium 1.0.15-1 -> 1.0.16-1 + - libspatialite 4.3.0a-1 -> 4.3.0a-2 + - libssh 0.7.5-1 -> 0.7.5-4 + - libuv 1.18.0 -> 1.19.2 + - libwebp 0.6.1-1 -> 0.6.1-2 + - libwebsockets 2.4.1 -> 2.4.2 + - libxml2 2.9.4-2 -> 2.9.4-4 + - libzip 1.4.0 -> rel-1-5-0 + - live555 2018.01.29 -> 2018.02.28 + - lodepng 2017-09-01-8a0f16afe74a6a-1 -> 2018-02-25 + - luasocket 2017.05.25.5a17f79b0301f0a1b4c7f1c73388757a7e2ed309 -> 2018-02-25 + - lz4 1.8.1.2 -> 1.8.1.2-1 + - magnum-extras 2018.02-1 -> 2018.02-2 + - matio 1.5.10-2 -> 1.5.12 + - mman git-f5ff813 -> git-f5ff813-2 + - ms-gsl 20171204-9d65e74400976b3509833f49b16d401600c7317d -> 2018-03-17 + - msinttypes 2017-06-26-f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 -> 2018-02-25 + - msmpi 8.1 -> 9.0 + - nlohmann-json 3.1.0 -> 3.1.2 + - nuklear 2017-06-15-5c7194c2fe2c68c1a8212712c0b4b6195382d27d -> 2018-03-17 + - ogre 1.10.9-2 -> 1.10.11 + - opencv 3.4.0-3 -> 3.4.1 + - openexr 2.2.0-1 -> 2.2.1-1 + - openimageio 1.7.15-2 -> 1.8.9 + - openjpeg 2.2.0-1 -> 2.3.0 + - pcl 1.8.1-9 -> 1.8.1-10 + - picosha2 2017-09-01-c5ff159b6 -> 2018-02-25 + - piex 2017-09-01-473434f2dd974978b-1 -> 2018-03-13 + - protobuf 3.5.1 -> 3.5.1-1 + - qt5-modularscripts 1 -> 2 + - re2 2017-12-01-1 -> 2018-03-17 + - readosm 1.1.0 -> 1.1.0-1 + - realsense2 2.10.0 -> 2.10.1 + - rocksdb 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c-1 -> 5.11.3 + - rs-core-lib commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5 -> 2018-03-17 + - rttr 0.9.5-1 -> 0.9.5-2 + - scintilla 3.7.6 -> 4.0.3 + - sdl2 2.0.7-4 -> 2.0.8-1 + - snappy 1.1.7-1 -> 1.1.7-2 + - spatialite-tools 4.3.0 -> 4.3.0-1 + - spdlog 0.14.0-1 -> 0.16.3 + - spirv-tools 2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 -> 2018.1-1 + - sqlite3 3.21.0 -> 3.21.0-1 + - stb 20170724-9d9f75e -> 2018-03-02 + - thrift 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-2 -> 2018-03-17 + - tiny-dnn 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e -> 2018-03-13 + - tinyxml2 6.0.0 -> 6.0.0-2 + - torch-th 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-1 -> 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-2 + - unicorn 2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4-1 -> 2018-03-13 + - unicorn-lib commit-3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa -> 2018-03-13 + - uwebsockets 0.14.4-1 -> 0.14.6-1 + - wt 3.3.7-4 -> 4.0.2 + - wtl 9.1 -> 10.0 + - wxwidgets 3.1.0-1 -> 3.1.1 + - yaml-cpp 0.5.4-rc-2 -> 0.6.2 + - zeromq 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-2 -> 2018-03-17 + - zziplib 0.13.62-1 -> 0.13.69 + * Use TLS 1.2 for downloads. + * Tools used by `vcpkg` (`git`, `cmake` etc) are now specified in `scripts\vcpkgTools.xml`. + - Add `7zip` + * Fix various bugs regarding feature packages. Affects `install`, `upgrade` and `export`. + * `vcpkg hash`: Fix bug with whitespace in path. + * Visual Studio detection now properly identifies legacy versions (VS2015). + * Windows SDK detection no longer fails if certain registry keys are not in their expected places. + * Dependency qualifiers now support `!` for inversion. + * Add `VCPKG_DEFAULT_VS_PATH` environment variable. + - `vcpkg` automatically chooses the latest stable version of Visual Studio to use. + - You can now select the desired VS with the `VCPKG_DEFAULT_VS_PATH` environment variable + - You can also select the behavior by specifiying `VCPKG_VISUAL_STUDIO_PATH` in the triplet file (and this takes precedence over the new environment variable) + +-- vcpkg team <vcpkg@microsoft.com> MON, 19 Mar 2018 19:00:00 -0800 + + vcpkg (0.0.105) -------------- * Add ports: @@ -1,4 +1,4 @@ -# Vcpkg <a href="#"></a> +# 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. diff --git a/docs/about/faq.md b/docs/about/faq.md index cb711e384..b345b4fd0 100644 --- a/docs/about/faq.md +++ b/docs/about/faq.md @@ -72,6 +72,10 @@ A lower level mechanism to achieve the same as the `vcpkg integrate project` NuG <Import Project="<vcpkg_root>\scripts\buildsystems\msbuild\vcpkg.targets" /> ``` +## How can I remove temporary files? + +You can save some disk space by completely removing the `packages\`, `buildtrees\`, and `downloads\` folders. + ## How is CMake used internally by Vcpkg? Vcpkg uses CMake internally as a build scripting language. This is because CMake is already an extremely common build system for cross-platform open source libraries and is becoming very popular for C++ projects in general. It is easy to acquire on Windows, does not require system-wide installation, and legible for unfamiliar users. diff --git a/docs/maintainers/vcpkg_build_msbuild.md b/docs/maintainers/vcpkg_build_msbuild.md index 889b07bdc..37f8d8df2 100644 --- a/docs/maintainers/vcpkg_build_msbuild.md +++ b/docs/maintainers/vcpkg_build_msbuild.md @@ -19,6 +19,11 @@ vcpkg_build_msbuild( ``` ## Parameters +### USE_VCPKG_INTEGRATION +Apply the normal `integrate install` integration for building the project. + +By default, projects built with this command will not automatically link libraries or have header paths set. + ### PROJECT_PATH The path to the solution (`.sln`) or project (`.vcxproj`) file. diff --git a/ports/abseil/CMakeLists.txt b/ports/abseil/CMakeLists.txt index c30f75e32..ced5b14ca 100644 --- a/ports/abseil/CMakeLists.txt +++ b/ports/abseil/CMakeLists.txt @@ -3,6 +3,8 @@ project(abseil CXX) add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN) +set(CMAKE_CXX_STANDARD 14) + set(CMAKE_DEBUG_POSTFIX d) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) @@ -90,4 +92,4 @@ install( FILE unofficial-abseil-config.cmake NAMESPACE unofficial::abseil:: DESTINATION share/unofficial-abseil -)
\ No newline at end of file +) diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index cd4a6723f..b337b7262 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,5 +1,5 @@ Source: abseil
-Version: 2018-03-07 +Version: 2018-03-20 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 598f76c2f..7f8f28798 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 94f0f79ecd2d9e5271a21bc4ededea9b58c60674
- SHA512 b1309a371b886e4d5d8e963407ddfcd005c041b35880e0af45f07c778875fb69c76f0a1ef7802af3f1eab3497fb40020d8d503c5eb2788fff50dd74b557bf182
+ REF 506fb4b56a339314fde23802bd749dbc3b3c1c79
+ SHA512 a67d51afcf4446d2c5f27258174dd012e4c15ee1f69eb074770d4f5af335e661b1cafa6b46f6b61b9f7ff0379e7822a03c6d55096dc78a13e554688a8872ebf8
HEAD_REF master
)
@@ -21,8 +21,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/abseil ${CURRENT_PACKAGES_DIR}/share/unofficial-abseil)
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-abseil TARGET_PATH share/unofficial-abseil)
file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/*)
foreach(FILE ${HEADERS})
diff --git a/ports/ace/CONTROL b/ports/ace/CONTROL index 596d5a7a7..9baa763dc 100644 --- a/ports/ace/CONTROL +++ b/ports/ace/CONTROL @@ -1,3 +1,3 @@ Source: ace -Version: 6.4.6 +Version: 6.4.7 Description: The ADAPTIVE Communication Environment diff --git a/ports/ace/portfile.cmake b/ports/ace/portfile.cmake index 63239138b..25eeabb0b 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.6.zip" - FILENAME "ACE-6.4.6.zip" - SHA512 3b1ced19bb42bd753e0a43990f1d8f84dc57f5650c7c972f2e849d4ce3aa1db08673cf14fbc0607d7dbc9b9f95f33f72a5d7f0f11cd993beba528f80eb525e69 + URLS "http://download.dre.vanderbilt.edu/previous_versions/ACE-6.4.7.zip" + FILENAME "ACE-6.4.7.zip" + SHA512 931c7e5902f3999ed05c13f9d2c53a605e9b59b4ce78f33b42238ac25286aa13fb510e2f780b6aea9505d03edf834109ab4481870327fec1b5bb11d29cfbafdc ) vcpkg_extract_source_archive(${ARCHIVE}) diff --git a/ports/asio/CONTROL b/ports/asio/CONTROL index 021e20592..cd9914052 100644 --- a/ports/asio/CONTROL +++ b/ports/asio/CONTROL @@ -1,3 +1,4 @@ Source: asio
-Version: 1.10.8-1
+Version: 1.12.0-1
+Build-Depends: boost-config, boost-throw-exception, boost-utility, boost-date-time
Description: Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.
diff --git a/ports/asio/portfile.cmake b/ports/asio/portfile.cmake index 88cddfbbc..f6980f14e 100644 --- a/ports/asio/portfile.cmake +++ b/ports/asio/portfile.cmake @@ -4,8 +4,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO chriskohlhoff/asio - REF asio-1-10-8 - SHA512 55c26a6daf893f6e91ec7e8b5d70f1e27f2c1886552b2c9cb5c47b7c3bb08f78c9d6cec0a3bc6edbfb657a5094a001f742db0f18f81f51d79661b01fafea293e + REF asio-1-12-0 + SHA512 a0e341fd6a848784e1533df84d1e6b361c8468f59d4fbde68c1500c1f8a2124ad78db0169098dbbc594ce26717eb9760f37af13cb288a549e2bda563eecf2be3 HEAD_REF master ) diff --git a/ports/atkmm/portfile.cmake b/ports/atkmm/portfile.cmake index 4cbaee7ad..74cf021c8 100644 --- a/ports/atkmm/portfile.cmake +++ b/ports/atkmm/portfile.cmake @@ -28,8 +28,7 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/atkmm.sln TARGET atkmm PLATFORM ${VS_PLATFORM} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + USE_VCPKG_INTEGRATION ) # Handle headers diff --git a/ports/avro-c/CONTROL b/ports/avro-c/CONTROL index 3a7334c41..5bcf16fe5 100644 --- a/ports/avro-c/CONTROL +++ b/ports/avro-c/CONTROL @@ -1,4 +1,4 @@ Source: avro-c -Version: 1.8.2 +Version: 1.8.2-1 Description: Apache Avro is a data serialization system Build-Depends: jansson, liblzma, zlib diff --git a/ports/avro-c/portfile.cmake b/ports/avro-c/portfile.cmake index 94fcf25ba..087d3b3af 100644 --- a/ports/avro-c/portfile.cmake +++ b/ports/avro-c/portfile.cmake @@ -16,9 +16,12 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/lang/c + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Snappy=ON ) -vcpkg_install_cmake(DISABLE_PARALLEL) +vcpkg_install_cmake() vcpkg_copy_pdbs() diff --git a/ports/azmq/CONTROL b/ports/azmq/CONTROL new file mode 100644 index 000000000..350bee266 --- /dev/null +++ b/ports/azmq/CONTROL @@ -0,0 +1,6 @@ +Source: azmq +Version: 1.0.2 +Build-Depends: boost-asio, boost-assert, boost-config, boost-container, boost-format, boost-intrusive, boost-iterator, boost-lexical-cast, boost-logic, boost-optional, boost-random, boost-range, boost-regex, boost-system, boost-thread, boost-utility, zeromq +Description: Boost Asio style bindings for ZeroMQ + This library is built on top of ZeroMQ's standard C interface and is intended to work well with C++ applications which use the Boost libraries in general, and Asio in particular. + The main abstraction exposed by the library is azmq::socket which provides an Asio style socket interface to the underlying zeromq socket and interfaces with Asio's io_service(). The socket implementation participates in the io_service's reactor for asynchronous IO and may be freely mixed with other Asio socket types (raw TCP/UDP/Serial/etc.). diff --git a/ports/azmq/portfile.cmake b/ports/azmq/portfile.cmake new file mode 100644 index 000000000..867b688ee --- /dev/null +++ b/ports/azmq/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/azmq + REF v1.0.2 + SHA512 6e60a670d070ddf84dbd406e88225ff12f84ce39e0e64e9aff4314e174506c286d72cfebb5e2e51eab221f6e163a17cce539d052cea3c18954ec495b096f087b + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/azmq DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL + ${SOURCE_PATH}/LICENSE-BOOST_1_0 + DESTINATION ${CURRENT_PACKAGES_DIR}/share/azmq RENAME copyright) diff --git a/ports/azure-storage-cpp/CONTROL b/ports/azure-storage-cpp/CONTROL index 837aa8ae0..0da717ba7 100644 --- a/ports/azure-storage-cpp/CONTROL +++ b/ports/azure-storage-cpp/CONTROL @@ -1,5 +1,5 @@ Source: azure-storage-cpp -Version: 3.2.0 +Version: 3.2.1 Build-Depends: cpprestsdk, atlmfc 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/portfile.cmake b/ports/azure-storage-cpp/portfile.cmake index b5a4791c3..edac1e2a2 100644 --- a/ports/azure-storage-cpp/portfile.cmake +++ b/ports/azure-storage-cpp/portfile.cmake @@ -7,8 +7,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO Azure/azure-storage-cpp - REF v3.2.0 - SHA512 841c548986de743b508edd149441727e76f66ba09a99454006d2742547267046833062501e79ff2138d6bcad37740f7009cce4590bbdf40b48b935b989959267 + REF v3.2.1 + SHA512 8d1e8de439e52f53eb28b77e8adf394468f4861c2c4c1f79ec1437c72e3fc0bc871e4e2662ee58090748915b0f12ce6736a7cc6ede619d332686b9fb6a026c9f HEAD_REF master ) diff --git a/ports/benchmark/CONTROL b/ports/benchmark/CONTROL index 9e6262e1b..5b56de372 100644 --- a/ports/benchmark/CONTROL +++ b/ports/benchmark/CONTROL @@ -1,3 +1,3 @@ Source: benchmark -Version: 1.3.0 +Version: 1.3.0-1 Description: A library to support the benchmarking of functions, similar to unit-tests. diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake index 1832174fe..e76bce6ff 100644 --- a/ports/benchmark/portfile.cmake +++ b/ports/benchmark/portfile.cmake @@ -26,6 +26,7 @@ vcpkg_configure_cmake( PREFER_NINJA OPTIONS -DBENCHMARK_ENABLE_TESTING=OFF + -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() diff --git a/ports/bitserializer/CONTROL b/ports/bitserializer/CONTROL new file mode 100644 index 000000000..95e36f5b9 --- /dev/null +++ b/ports/bitserializer/CONTROL @@ -0,0 +1,4 @@ +Source: bitserializer
+Version: 0.7
+Build-Depends: cpprestsdk
+Description: The library for simple serialization of arbitrary C++ types to various output formats (currently just supported JSON based on CppRestSDK).
diff --git a/ports/bitserializer/portfile.cmake b/ports/bitserializer/portfile.cmake new file mode 100644 index 000000000..5e59f0c71 --- /dev/null +++ b/ports/bitserializer/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions)
+vcpkg_from_bitbucket(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO Pavel_Kisliak/BitSerializer
+ REF 0.7
+ SHA512 3a50b1b3077115f60d298f4257ae6a5a350c1d8b3d575af83b4f0746757ab3393da7c81ac9c7db4e30540fe94f1742b1d39de724b2dec080faf727b885bb19a4
+ HEAD_REF master
+)
+
+file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR})
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/bitserializer RENAME copyright)
diff --git a/ports/boost-atomic/CONTROL b/ports/boost-atomic/CONTROL index 9c84408eb..4a625b6df 100644 --- a/ports/boost-atomic/CONTROL +++ b/ports/boost-atomic/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-atomic
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-integer, boost-type-traits, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-integer, boost-type-traits, boost-vcpkg-helpers
Description: Boost atomic module
diff --git a/ports/boost-build/CONTROL b/ports/boost-build/CONTROL index cf93bfa1e..ef59d386c 100644 --- a/ports/boost-build/CONTROL +++ b/ports/boost-build/CONTROL @@ -1,3 +1,3 @@ Source: boost-build
-Version: 1.66.0-5
+Version: 1.66.0-8
Description: Boost.Build
diff --git a/ports/boost-build/portfile.cmake b/ports/boost-build/portfile.cmake index ea2b57261..fdd559ebe 100644 --- a/ports/boost-build/portfile.cmake +++ b/ports/boost-build/portfile.cmake @@ -4,12 +4,10 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled) if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
return()
+elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ return()
endif()
-# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation
-string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}")
-set(ENV{LIB} "${LIB}")
-
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO boostorg/build
@@ -30,6 +28,13 @@ vcpkg_download_distfile(BOOSTCPP_ARCHIVE SHA512 ef2ae1d6a53a7f93654950e2e8e679da6b0359f02baafc03db970801634c1f5d4229633b5b6d74ad96a306e6efe3429d436669dc165b1fa655917e0ec74714e4
)
+file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright)
+file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam)
+
+# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation
+string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}")
+set(ENV{LIB} "${LIB}")
+
file(COPY
${SOURCE_PATH}/
DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build
@@ -44,22 +49,16 @@ string(REPLACE "<define>_WIN32_WINNT=0x0602" "" _contents "${_contents}") file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_contents}")
message(STATUS "Bootstrapping...")
-vcpkg_execute_required_process(
- COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" msvc
- WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
- LOGNAME bootstrap-${TARGET_TRIPLET}
-)
-
-file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright)
-file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam)
-
-
-
-file(
- COPY
- ${CMAKE_CURRENT_LIST_DIR}/boost-modular-build.cmake
- ${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam
- ${CMAKE_CURRENT_LIST_DIR}/nothing.bat
- ${CMAKE_CURRENT_LIST_DIR}/user-config.jam
- DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build
-)
+if(CMAKE_HOST_WIN32)
+ vcpkg_execute_required_process(
+ COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" msvc
+ WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
+ LOGNAME bootstrap-${TARGET_TRIPLET}
+ )
+else()
+ vcpkg_execute_required_process(
+ COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.sh"
+ WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build
+ LOGNAME bootstrap-${TARGET_TRIPLET}
+ )
+endif()
diff --git a/ports/boost-chrono/CONTROL b/ports/boost-chrono/CONTROL index 00ee98871..b5fb892cd 100644 --- a/ports/boost-chrono/CONTROL +++ b/ports/boost-chrono/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-chrono
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-integer, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi
Description: Boost chrono module
diff --git a/ports/boost-container/CONTROL b/ports/boost-container/CONTROL index df2cfe44e..69e641d36 100644 --- a/ports/boost-container/CONTROL +++ b/ports/boost-container/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-container
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-functional, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-functional, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers
Description: Boost container module
diff --git a/ports/boost-context/CONTROL b/ports/boost-context/CONTROL index 37568a50d..22295dddc 100644 --- a/ports/boost-context/CONTROL +++ b/ports/boost-context/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-context
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-pool, boost-predef, boost-smart-ptr, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-integer, boost-pool, boost-predef, boost-smart-ptr, boost-vcpkg-helpers
Description: Boost context module
diff --git a/ports/boost-coroutine/CONTROL b/ports/boost-coroutine/CONTROL index 227ffe8ef..77683890a 100644 --- a/ports/boost-coroutine/CONTROL +++ b/ports/boost-coroutine/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-coroutine
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-context (windows), boost-detail, boost-exception, boost-integer, boost-move, boost-range, boost-system, boost-thread (windows), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-context (windows), boost-detail, boost-exception, boost-integer, boost-move, boost-range, boost-system, boost-thread (windows), boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers
Description: Boost coroutine module
diff --git a/ports/boost-date-time/CONTROL b/ports/boost-date-time/CONTROL index 73f8d07ce..8e8738e8d 100644 --- a/ports/boost-date-time/CONTROL +++ b/ports/boost-date-time/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-date-time
Version: 1.66.0
-Build-Depends: boost-algorithm, boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-mpl, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi
+Build-Depends: boost-algorithm, boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-mpl, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi
Description: Boost date_time module
diff --git a/ports/boost-exception/CONTROL b/ports/boost-exception/CONTROL index 52d316c34..476c53cf4 100644 --- a/ports/boost-exception/CONTROL +++ b/ports/boost-exception/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-exception
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-smart-ptr, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-smart-ptr, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers
Description: Boost exception module
diff --git a/ports/boost-fiber/CONTROL b/ports/boost-fiber/CONTROL index 776d929a3..b02c94a3b 100644 --- a/ports/boost-fiber/CONTROL +++ b/ports/boost-fiber/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-fiber
Version: 1.66.0
-Build-Depends: boost-algorithm, boost-assert, boost-build, boost-config, boost-context (windows), boost-core, boost-detail, boost-filesystem (windows), boost-format, boost-intrusive, boost-predef, boost-smart-ptr, boost-vcpkg-helpers
+Build-Depends: boost-algorithm, boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-context (windows), boost-core, boost-detail, boost-filesystem (windows), boost-format, boost-intrusive, boost-predef, boost-smart-ptr, boost-vcpkg-helpers
Description: Boost fiber module
diff --git a/ports/boost-filesystem/CONTROL b/ports/boost-filesystem/CONTROL index afa6d0e45..4717d608b 100644 --- a/ports/boost-filesystem/CONTROL +++ b/ports/boost-filesystem/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-filesystem
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-range, boost-smart-ptr, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-range, boost-smart-ptr, boost-static-assert, boost-system, boost-type-traits, boost-utility, boost-vcpkg-helpers
Description: Boost filesystem module
diff --git a/ports/boost-graph-parallel/CONTROL b/ports/boost-graph-parallel/CONTROL index ba7cf38d2..3f1e8e1ed 100644 --- a/ports/boost-graph-parallel/CONTROL +++ b/ports/boost-graph-parallel/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-graph-parallel
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-detail, boost-dynamic-bitset, boost-function, boost-functional, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers
Description: Boost graph_parallel module
diff --git a/ports/boost-graph/CONTROL b/ports/boost-graph/CONTROL index dc81d1a85..12d74bc1e 100644 --- a/ports/boost-graph/CONTROL +++ b/ports/boost-graph/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-graph
Version: 1.66.0
-Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-functional, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (windows), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive
+Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-functional, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (windows), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive
Description: Boost graph module
diff --git a/ports/boost-iostreams/CONTROL b/ports/boost-iostreams/CONTROL index 57301cb18..d48fdfd24 100644 --- a/ports/boost-iostreams/CONTROL +++ b/ports/boost-iostreams/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-iostreams
Version: 1.66.0
-Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib
+Build-Depends: boost-assert, boost-bind, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-mpl, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, zlib
Description: Boost iostreams module
diff --git a/ports/boost-locale/CONTROL b/ports/boost-locale/CONTROL index 884c737b4..0a37505b1 100644 --- a/ports/boost-locale/CONTROL +++ b/ports/boost-locale/CONTROL @@ -1,7 +1,7 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-locale
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-smart-ptr, boost-static-assert, boost-thread (windows), boost-type-traits, boost-unordered, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-function, boost-integer, boost-iterator, boost-smart-ptr, boost-static-assert, boost-thread (windows), boost-type-traits, boost-unordered, boost-vcpkg-helpers
Description: Boost locale module
Feature: icu
diff --git a/ports/boost-log/CONTROL b/ports/boost-log/CONTROL index 912f771d0..e8ac68f44 100644 --- a/ports/boost-log/CONTROL +++ b/ports/boost-log/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-log
Version: 1.66.0
-Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (windows), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (windows), boost-math, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (windows), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive
+Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (windows), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (windows), boost-math, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread (windows), boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive
Description: Boost log module
diff --git a/ports/boost-math/CONTROL b/ports/boost-math/CONTROL index 8343ab985..33b230a22 100644 --- a/ports/boost-math/CONTROL +++ b/ports/boost-math/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-math
Version: 1.66.0
-Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-mpl, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers
+Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-modular-build-helper, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-mpl, boost-predef, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers
Description: Boost math module
diff --git a/ports/boost-modular-build-helper/CMakeLists.txt b/ports/boost-modular-build-helper/CMakeLists.txt new file mode 100644 index 000000000..20306e7ed --- /dev/null +++ b/ports/boost-modular-build-helper/CMakeLists.txt @@ -0,0 +1,120 @@ +cmake_minimum_required(VERSION 3.9)
+project(boost CXX)
+
+find_path(ZLIB_INCLUDE zlib.h)
+find_path(BZIP2_INCLUDE bzlib.h)
+find_path(ICU_PATH include/unicode/utf.h)
+
+set(VCPKG_PLATFORM_TOOLSET external)
+
+set(B2_OPTIONS)
+
+# Add build type specific options
+if(BUILD_SHARED_LIBS)
+ list(APPEND B2_OPTIONS runtime-link=shared)
+ set(LIB_RUNTIME_LINK "shared")
+else()
+ list(APPEND B2_OPTIONS runtime-link=static)
+ set(LIB_RUNTIME_LINK "static")
+endif()
+
+if(BUILD_SHARED_LIBS)
+ list(APPEND B2_OPTIONS link=shared)
+else()
+ list(APPEND B2_OPTIONS link=static)
+endif()
+
+if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
+ list(APPEND B2_OPTIONS address-model=64)
+endif()
+
+list(APPEND B2_OPTIONS target-os=linux toolset=gcc)
+
+string(REPLACE " " " <compileflags>" CXXFLAGS "${CMAKE_CXX_FLAGS}")
+#set(CXXFLAGS "${CXXFLAGS} <compileflags>-Wno-error=unused-command-line-argument")
+if(CMAKE_CXX_COMPILER_TARGET)
+ set(CXXFLAGS "${CXXFLAGS} <compileflags>${CMAKE_CXX_COMPILE_OPTIONS_TARGET} <compileflags>${CMAKE_CXX_COMPILER_TARGET}")
+endif()
+if(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN)
+ set(CXXFLAGS "${CXXFLAGS} <compileflags>${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} <compileflags>${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}")
+endif()
+if(CMAKE_SYSROOT AND CMAKE_CXX_COMPILE_OPTIONS_SYSROOT)
+ set(CXXFLAGS "${CXXFLAGS} <compileflags>${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}")
+endif()
+foreach(INCDIR ${CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES})
+ set(CXXFLAGS "${CXXFLAGS} <compileflags>${CMAKE_INCLUDE_FLAG_C}${CMAKE_INCLUDE_FLAG_C_SEP}${INCDIR}")
+endforeach()
+
+find_library(ZLIB_LIBPATH z)
+list(APPEND B2_OPTIONS
+ -sZLIB_BINARY=z
+ -sZLIB_LIBPATH="${ZLIB_LIBPATH}"
+)
+if(CMAKE_BUILD_TYPE STREQUAL "Release")
+ find_library(BZIP2_LIBPATH bz2)
+ list(APPEND B2_OPTIONS
+ -sBZIP2_BINARY=bz2
+ -sBZIP2_LIBPATH="${BZIP2_LIBPATH}"
+ variant=release
+ )
+elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ find_library(BZIP2_LIBPATH bz2d)
+ list(APPEND B2_OPTIONS
+ -sBZIP2_BINARY=bz2d
+ -sBZIP2_LIBPATH="${BZIP2_LIBPATH}"
+ variant=debug
+ )
+endif()
+
+configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY)
+
+set(NUMBER_OF_PROCESSORS 1)
+if(DEFINED ENV{NUMBER_OF_PROCESSORS})
+ set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS})
+elseif(CMAKE_HOST_LINUX)
+ execute_process(
+ COMMAND nproc
+ OUTPUT_VARIABLE NUMBER_OF_PROCESSORS
+ )
+ string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
+ string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
+endif()
+if(NOT NUMBER_OF_PROCESSORS)
+ set(NUMBER_OF_PROCESSORS 1)
+endif()
+
+add_custom_target(boost ALL
+ COMMAND "${B2_EXE}"
+ --user-config=${CMAKE_CURRENT_BINARY_DIR}/user-config.jam
+ --stagedir=${CMAKE_CURRENT_BINARY_DIR}/stage
+ --build-dir=${CMAKE_CURRENT_BINARY_DIR}
+ ${B2_OPTIONS}
+ --layout=system
+ --with-atomic
+ --with-random
+ --with-date_time
+ --with-filesystem
+ --with-system
+ --with-thread
+ --with-chrono
+ -sZLIB_INCLUDE="${ZLIB_INCLUDE}"
+ -sBZIP2_INCLUDE="${BZIP2_INCLUDE}"
+ -sICU_PATH="${ICU_PATH}"
+ -j${NUMBER_OF_PROCESSORS}
+ -sBOOST_ROOT=${BOOST_BUILD_PATH}
+ -sBOOST_BUILD_PATH=${BOOST_BUILD_PATH}
+ --debug-configuration
+ --ignore-site-config
+ --hash
+ -q
+
+ architecture=x86
+ threading=multi
+ threadapi=pthread
+ debug-symbols=on
+ WORKING_DIRECTORY ${SOURCE_PATH}
+)
+
+install(
+ CODE "file(GLOB LIBS ${CMAKE_CURRENT_BINARY_DIR}/boost/build/*/*.a)\nif(LIBS)\nfile(INSTALL \${LIBS} DESTINATION \"\${CMAKE_INSTALL_PREFIX}/lib\")\nendif()"
+)
diff --git a/ports/boost-modular-build-helper/CONTROL b/ports/boost-modular-build-helper/CONTROL new file mode 100644 index 000000000..d57815738 --- /dev/null +++ b/ports/boost-modular-build-helper/CONTROL @@ -0,0 +1,2 @@ +Source: boost-modular-build-helper
+Version: 2
diff --git a/ports/boost-build/Jamroot.jam b/ports/boost-modular-build-helper/Jamroot.jam index 6669b446e..1e3dce89c 100644 --- a/ports/boost-build/Jamroot.jam +++ b/ports/boost-modular-build-helper/Jamroot.jam @@ -36,8 +36,8 @@ if "@PORT@" != "boost-system" {
use-project /boost/system : . ;
- lib boost_system : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_system-vc140-mt.lib" <variant>release ;
- lib boost_system : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_system-vc140-mt-gd.lib" <variant>debug ;
+ lib boost_system : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_RELEASE_SUFFIX@" <variant>release ;
+ lib boost_system : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug ;
explicit boost_system ;
}
@@ -45,8 +45,8 @@ if "@PORT@" != "boost-chrono" {
use-project /boost/chrono : . ;
- lib boost_chrono : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_chrono-vc140-mt.lib" <variant>release ;
- lib boost_chrono : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_chrono-vc140-mt-gd.lib" <variant>debug ;
+ lib boost_chrono : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_chrono@BOOST_LIB_RELEASE_SUFFIX@" <variant>release ;
+ lib boost_chrono : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_chrono@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug ;
explicit boost_chrono ;
}
@@ -54,8 +54,8 @@ if "@PORT@" != "boost-regex" {
use-project /boost/regex : . ;
- lib boost_regex : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_regex-vc140-mt.lib" <variant>release ;
- lib boost_regex : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_regex-vc140-mt-gd.lib" <variant>debug ;
+ lib boost_regex : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_regex@BOOST_LIB_RELEASE_SUFFIX@" <variant>release ;
+ lib boost_regex : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_regex@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug ;
explicit boost_regex ;
}
@@ -63,8 +63,8 @@ if "@PORT@" != "boost-date-time" {
use-project /boost/date_time : . ;
- lib boost_date_time : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_date_time-vc140-mt.lib" <variant>release -<library>/boost/date_time//boost_date_time ;
- lib boost_date_time : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_date_time-vc140-mt-gd.lib" <variant>debug -<library>/boost/date_time//boost_date_time ;
+ lib boost_date_time : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_date_time@BOOST_LIB_RELEASE_SUFFIX@" <variant>release -<library>/boost/date_time//boost_date_time ;
+ lib boost_date_time : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_date_time@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug -<library>/boost/date_time//boost_date_time ;
explicit boost_date_time ;
}
@@ -72,8 +72,8 @@ if "@PORT@" != "boost-thread" {
use-project /boost/thread : . ;
- lib boost_thread : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_thread-vc140-mt.lib" <variant>release : : <library>/boost/date_time//boost_date_time ;
- lib boost_thread : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_thread-vc140-mt-gd.lib" <variant>debug : : <library>/boost/date_time//boost_date_time ;
+ lib boost_thread : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_thread@BOOST_LIB_RELEASE_SUFFIX@" <variant>release : : <library>/boost/date_time//boost_date_time ;
+ lib boost_thread : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_thread@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug : : <library>/boost/date_time//boost_date_time ;
explicit boost_thread ;
}
@@ -81,8 +81,8 @@ if "@PORT@" != "boost-timer" {
use-project /boost/timer : . ;
- lib boost_timer : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_timer-vc140-mt.lib" <variant>release ;
- lib boost_timer : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_timer-vc140-mt-gd.lib" <variant>debug ;
+ lib boost_timer : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_timer@BOOST_LIB_RELEASE_SUFFIX@" <variant>release ;
+ lib boost_timer : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_timer@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug ;
explicit boost_timer ;
}
@@ -90,8 +90,8 @@ if "@PORT@" != "boost-filesystem" {
use-project /boost/filesystem : . ;
- lib boost_filesystem : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_filesystem-vc140-mt.lib" <variant>release : : <library>/boost/system//boost_system ;
- lib boost_filesystem : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_filesystem-vc140-mt-gd.lib" <variant>debug : : <library>/boost/system//boost_system ;
+ lib boost_filesystem : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_filesystem@BOOST_LIB_RELEASE_SUFFIX@" <variant>release : : <library>/boost/system//boost_system ;
+ lib boost_filesystem : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_filesystem@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug : : <library>/boost/system//boost_system ;
explicit boost_filesystem ;
}
@@ -99,8 +99,8 @@ if "@PORT@" != "boost-atomic" {
use-project /boost/atomic : . ;
- lib boost_atomic : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_atomic-vc140-mt.lib" <variant>release ;
- lib boost_atomic : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_atomic-vc140-mt-gd.lib" <variant>debug ;
+ lib boost_atomic : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_RELEASE_SUFFIX@" <variant>release ;
+ lib boost_atomic : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug ;
explicit boost_atomic ;
}
@@ -111,8 +111,8 @@ if "@PORT@" != "boost-context" use-project /boost/context : . ;
- lib boost_context : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_context-vc140-mt.lib" <variant>release ;
- lib boost_context : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_context-vc140-mt-gd.lib" <variant>debug ;
+ lib boost_context : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_context@BOOST_LIB_RELEASE_SUFFIX@" <variant>release ;
+ lib boost_context : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_context@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug ;
explicit boost_context ;
}
@@ -120,8 +120,8 @@ if "@PORT@" != "boost-test" {
use-project /boost/test : . ;
- lib boost_unit_test_framework : : <file>"@CURRENT_INSTALLED_DIR@/lib/boost_unit_test_framework-vc140-mt.lib" <variant>release ;
- lib boost_unit_test_framework : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/boost_unit_test_framework-vc140-mt-gd.lib" <variant>debug ;
+ lib boost_unit_test_framework : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_unit_test_framework@BOOST_LIB_RELEASE_SUFFIX@" <variant>release ;
+ lib boost_unit_test_framework : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_unit_test_framework@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug ;
explicit boost_unit_test_framework ;
}
@@ -129,8 +129,8 @@ if "@PORT@" != "boost-serialization" {
use-project /boost/serialization : . ;
- lib boost_serialization : : <file>@CURRENT_INSTALLED_DIR@/lib/boost_serialization-vc140-mt.lib <variant>release ;
- lib boost_serialization : : <file>@CURRENT_INSTALLED_DIR@/debug/lib/boost_serialization-vc140-mt-gd.lib <variant>debug ;
+ lib boost_serialization : : <file>"@CURRENT_INSTALLED_DIR@/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_RELEASE_SUFFIX@" <variant>release ;
+ lib boost_serialization : : <file>"@CURRENT_INSTALLED_DIR@/debug/lib/@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_DEBUG_SUFFIX@" <variant>debug ;
explicit boost_serialization ;
}
diff --git a/ports/boost-build/boost-modular-build.cmake b/ports/boost-modular-build-helper/boost-modular-build.cmake index 57505dbea..222fc7fe9 100644 --- a/ports/boost-build/boost-modular-build.cmake +++ b/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -6,16 +6,26 @@ function(boost_modular_build) endif()
# Todo: this serves too similar a purpose as vcpkg_find_acquire_program()
- if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
- set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build")
- else()
+ if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE)
+ elseif(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
+ get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE)
+ else()
+ set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build")
endif()
if(NOT EXISTS "${BOOST_BUILD_PATH}")
message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.")
endif()
+ if(EXISTS "${BOOST_BUILD_PATH}/b2.exe")
+ set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe")
+ elseif(EXISTS "${BOOST_BUILD_PATH}/b2")
+ set(B2_EXE "${BOOST_BUILD_PATH}/b2")
+ else()
+ message(FATAL_ERROR "Could not find b2 in ${BOOST_BUILD_PATH}")
+ endif()
+
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
list(APPEND _bm_OPTIONS windows-api=store)
endif()
@@ -28,7 +38,15 @@ function(boost_modular_build) set(REQUIREMENTS ${_bm_REQUIREMENTS})
- configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY)
+ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ set(BOOST_LIB_PREFIX)
+ set(BOOST_LIB_RELEASE_SUFFIX -vc140-mt.lib)
+ set(BOOST_LIB_DEBUG_SUFFIX -vc140-mt-gd.lib)
+ else()
+ set(BOOST_LIB_PREFIX lib)
+ set(BOOST_LIB_RELEASE_SUFFIX .a)
+ set(BOOST_LIB_DEBUG_SUFFIX .a)
+ endif()
# boost thread superfluously builds has_atomic_flag_lockfree on windows.
if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2")
@@ -59,6 +77,21 @@ function(boost_modular_build) file(WRITE ${_bm_SOURCE_PATH}/build/log-architecture.jam "${_contents}")
endif()
+ configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY)
+
+ if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ vcpkg_configure_cmake(
+ SOURCE_PATH ${CURRENT_INSTALLED_DIR}/share/boost-build
+ PREFER_NINJA
+ OPTIONS
+ "-DB2_EXE=${B2_EXE}"
+ "-DSOURCE_PATH=${_bm_SOURCE_PATH}"
+ "-DBOOST_BUILD_PATH=${BOOST_BUILD_PATH}"
+ )
+ vcpkg_install_cmake()
+ return()
+ endif()
+
#####################
# Cleanup previous builds
######################
@@ -90,11 +123,22 @@ function(boost_modular_build) ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
)
+ if(DEFINED ENV{NUMBER_OF_PROCESSORS})
+ set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS})
+ else()
+ execute_process(
+ COMMAND nproc
+ OUTPUT_VARIABLE NUMBER_OF_PROCESSORS
+ )
+ string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
+ string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
+ endif()
+
######################
# Generate configuration
######################
list(APPEND _bm_OPTIONS
- -j$ENV{NUMBER_OF_PROCESSORS}
+ -j${NUMBER_OF_PROCESSORS}
--debug-configuration
--debug-building
--debug-generators
@@ -102,23 +146,27 @@ function(boost_modular_build) --ignore-site-config
--hash
-q
- -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}\\include"
- -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}\\include"
- threadapi=win32
+ -sZLIB_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
+ -sBZIP2_INCLUDE="${CURRENT_INSTALLED_DIR}/include"
threading=multi
)
+ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ list(APPEND _bm_OPTIONS threadapi=win32)
+ else()
+ list(APPEND _bm_OPTIONS threadapi=pthread)
+ endif()
set(_bm_OPTIONS_DBG
-sZLIB_BINARY=zlibd
- -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib"
+ -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}/debug/lib"
-sBZIP2_BINARY=bz2d
- -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\debug\\lib"
+ -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}/debug/lib"
)
set(_bm_OPTIONS_REL
-sZLIB_BINARY=zlib
- -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib"
+ -sZLIB_LIBPATH="${CURRENT_INSTALLED_DIR}/lib"
-sBZIP2_BINARY=bz2
- -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}\\lib"
+ -sBZIP2_LIBPATH="${CURRENT_INSTALLED_DIR}/lib"
)
@@ -173,6 +221,8 @@ function(boost_modular_build) list(APPEND _bm_OPTIONS toolset=msvc-14.1)
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v140")
list(APPEND _bm_OPTIONS toolset=msvc-14.0)
+ elseif(VCPKG_PLATFORM_TOOLSET MATCHES "external")
+ list(APPEND _bm_OPTIONS toolset=gcc)
else()
message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'")
endif()
@@ -180,8 +230,6 @@ function(boost_modular_build) ######################
# Perform build + Package
######################
- set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe")
-
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
message(STATUS "Building ${TARGET_TRIPLET}-rel")
set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}")
@@ -219,10 +267,13 @@ function(boost_modular_build) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
message(STATUS "Packaging ${TARGET_TRIPLET}-rel")
- file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib)
+ file(GLOB REL_LIBS
+ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib
+ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.a
+ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.so
+ )
file(COPY ${REL_LIBS}
- DESTINATION ${CURRENT_PACKAGES_DIR}/lib
- FILES_MATCHING PATTERN "*.lib")
+ DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.dll)
file(COPY ${REL_DLLS}
@@ -234,10 +285,13 @@ function(boost_modular_build) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
message(STATUS "Packaging ${TARGET_TRIPLET}-dbg")
- file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib)
+ file(GLOB DBG_LIBS
+ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib
+ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.a
+ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.so
+ )
file(COPY ${DBG_LIBS}
- DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
- FILES_MATCHING PATTERN "*.lib")
+ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.dll)
file(COPY ${DBG_DLLS}
diff --git a/ports/boost-build/nothing.bat b/ports/boost-modular-build-helper/nothing.bat index e69de29bb..e69de29bb 100644 --- a/ports/boost-build/nothing.bat +++ b/ports/boost-modular-build-helper/nothing.bat diff --git a/ports/boost-modular-build-helper/portfile.cmake b/ports/boost-modular-build-helper/portfile.cmake new file mode 100644 index 000000000..6ed367434 --- /dev/null +++ b/ports/boost-modular-build-helper/portfile.cmake @@ -0,0 +1,12 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+
+file(
+ COPY
+ ${CMAKE_CURRENT_LIST_DIR}/boost-modular-build.cmake
+ ${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam
+ ${CMAKE_CURRENT_LIST_DIR}/nothing.bat
+ ${CMAKE_CURRENT_LIST_DIR}/user-config.jam
+ ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt
+ DESTINATION
+ ${CURRENT_PACKAGES_DIR}/share/boost-build
+)
diff --git a/ports/boost-build/user-config.jam b/ports/boost-modular-build-helper/user-config.jam index 59cc160cc..bd3797283 100644 --- a/ports/boost-build/user-config.jam +++ b/ports/boost-modular-build-helper/user-config.jam @@ -1,9 +1,23 @@ import toolset ;
-using msvc : : cl.exe :
-<setup>"@NOTHING_BAT@"
-@TOOLSET_OPTIONS@
-;
+if "@VCPKG_PLATFORM_TOOLSET@" != "external"
+{
+ using msvc : : cl.exe :
+ <setup>"@NOTHING_BAT@"
+ @TOOLSET_OPTIONS@
+ ;
+}
+else
+{
+ using gcc : 5.4.1 : @CMAKE_CXX_COMPILER@
+ :
+ <ranlib>@CMAKE_RANLIB@
+ <archiver>@CMAKE_AR@
+ @CXXFLAGS@
+ # MINGW here causes b2 to not run cygpath
+ <flavor>mingw
+ ;
+}
if "@PORT@" = "boost-python"
{
@@ -14,8 +28,8 @@ if "@PORT@" = "boost-python" if "@PORT@" = "boost-mpi"
{
using mpi : :
- <library-path>@CURRENT_INSTALLED_DIR@/lib
- <include>@CURRENT_INSTALLED_DIR@/include
+ <library-path>"@CURRENT_INSTALLED_DIR@/lib"
+ <include>"@CURRENT_INSTALLED_DIR@/include"
<find-shared-library>msmpi ;
}
diff --git a/ports/boost-mpi/CONTROL b/ports/boost-mpi/CONTROL index 7d17fedec..30ce81a1d 100644 --- a/ports/boost-mpi/CONTROL +++ b/ports/boost-mpi/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-mpi
Version: 1.66.0-1
-Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-python (windows), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, msmpi
Description: Boost mpi module
diff --git a/ports/boost-program-options/CONTROL b/ports/boost-program-options/CONTROL index 3a1ff727e..b43937e55 100644 --- a/ports/boost-program-options/CONTROL +++ b/ports/boost-program-options/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-program-options
Version: 1.66.0
-Build-Depends: boost-any, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers
+Build-Depends: boost-any, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers
Description: Boost program_options module
diff --git a/ports/boost-random/CONTROL b/ports/boost-random/CONTROL index fee15c891..1efeeaafa 100644 --- a/ports/boost-random/CONTROL +++ b/ports/boost-random/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-random
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-math, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-math, boost-mpl, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers
Description: Boost random module
diff --git a/ports/boost-regex/CONTROL b/ports/boost-regex/CONTROL index 24e5014d4..efd3e7f7e 100644 --- a/ports/boost-regex/CONTROL +++ b/ports/boost-regex/CONTROL @@ -1,7 +1,7 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-regex
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-iterator, boost-mpl, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers
Description: Boost regex module
Feature: icu
diff --git a/ports/boost-serialization/CONTROL b/ports/boost-serialization/CONTROL index 146c618bd..ae97a8c30 100644 --- a/ports/boost-serialization/CONTROL +++ b/ports/boost-serialization/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-serialization
Version: 1.66.0
-Build-Depends: boost-array, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers
+Build-Depends: boost-array, boost-assert, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-move, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers
Description: Boost serialization module
diff --git a/ports/boost-signals/CONTROL b/ports/boost-signals/CONTROL index e612f3415..160f73c51 100644 --- a/ports/boost-signals/CONTROL +++ b/ports/boost-signals/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-signals
Version: 1.66.0
-Build-Depends: boost-any, boost-build, boost-config, boost-core, boost-function, boost-iterator, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers
+Build-Depends: boost-any, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-function, boost-iterator, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers
Description: Boost signals module
diff --git a/ports/boost-stacktrace/CONTROL b/ports/boost-stacktrace/CONTROL index b6c11e8f3..9979ef4e1 100644 --- a/ports/boost-stacktrace/CONTROL +++ b/ports/boost-stacktrace/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-stacktrace
Version: 1.66.0
-Build-Depends: boost-array, boost-build, boost-config, boost-core, boost-lexical-cast, boost-math, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi
+Build-Depends: boost-array, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-lexical-cast, boost-math, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi
Description: Boost stacktrace module
diff --git a/ports/boost-system/CONTROL b/ports/boost-system/CONTROL index 92d43608f..953782bfb 100644 --- a/ports/boost-system/CONTROL +++ b/ports/boost-system/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-system
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-integer, boost-predef, boost-utility, boost-vcpkg-helpers, boost-winapi
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-core, boost-integer, boost-predef, boost-utility, boost-vcpkg-helpers, boost-winapi
Description: Boost system module
diff --git a/ports/boost-test/CONTROL b/ports/boost-test/CONTROL index 52dac99e2..95b0d8fe9 100644 --- a/ports/boost-test/CONTROL +++ b/ports/boost-test/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-test
Version: 1.66.0-2
-Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers
+Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-modular-build-helper, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-io, boost-iterator, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-range, boost-smart-ptr, boost-static-assert, boost-timer, boost-type-traits, boost-utility, boost-vcpkg-helpers
Description: Boost test module
diff --git a/ports/boost-thread/CONTROL b/ports/boost-thread/CONTROL index 772f1a450..33bc787a1 100644 --- a/ports/boost-thread/CONTROL +++ b/ports/boost-thread/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-thread
Version: 1.66.0
-Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-functional, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi
+Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-modular-build-helper, boost-chrono, boost-concept-check, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-functional, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi
Description: Boost thread module
diff --git a/ports/boost-timer/CONTROL b/ports/boost-timer/CONTROL index be8b0c18a..b24137fbb 100644 --- a/ports/boost-timer/CONTROL +++ b/ports/boost-timer/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-timer
Version: 1.66.0
-Build-Depends: boost-build, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-system, boost-throw-exception, boost-vcpkg-helpers
+Build-Depends: boost-build, boost-modular-build-helper, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-system, boost-throw-exception, boost-vcpkg-helpers
Description: Boost timer module
diff --git a/ports/boost-type-erasure/CONTROL b/ports/boost-type-erasure/CONTROL index 79a8697a3..786acf596 100644 --- a/ports/boost-type-erasure/CONTROL +++ b/ports/boost-type-erasure/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-type-erasure
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (windows), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-config, boost-detail, boost-fusion, boost-iterator, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread (windows), boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers
Description: Boost type_erasure module
diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 8b79826e2..55fa476f4 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -322,7 +322,7 @@ foreach ($library in $libraries) $needsBuild = $false
if ((Test-Path $unpacked/build/Jamfile.v2) -and $library -ne "metaparse")
{
- $deps += @("boost-build")
+ $deps += @("boost-build", "boost-modular-build-helper")
$needsBuild = $true
}
diff --git a/ports/boost-wave/CONTROL b/ports/boost-wave/CONTROL index 99aa3d8be..4fffc2e71 100644 --- a/ports/boost-wave/CONTROL +++ b/ports/boost-wave/CONTROL @@ -1,5 +1,5 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1
Source: boost-wave
Version: 1.66.0
-Build-Depends: boost-assert, boost-build, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (windows), boost-integer, boost-iterator, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers
+Build-Depends: boost-assert, boost-build, boost-modular-build-helper, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (windows), boost-integer, boost-iterator, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers
Description: Boost wave module
diff --git a/ports/box2d/portfile.cmake b/ports/box2d/portfile.cmake index b07dbc663..87aaefc74 100644 --- a/ports/box2d/portfile.cmake +++ b/ports/box2d/portfile.cmake @@ -42,23 +42,27 @@ set(OUTPUTS_PATH "${SOURCE_PATH}/Box2D/Build/vs2015/bin/${PROJECT_ARCH_BITS}") vcpkg_build_msbuild(PROJECT_PATH ${SOURCE_PATH}/Box2D/Build/vs2015/Box2D.vcxproj) -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") +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() -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") +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() message(STATUS "Packaging headers") file( diff --git a/ports/breakpad/CONTROL b/ports/breakpad/CONTROL index 9d3e4959c..6b016d29a 100644 --- a/ports/breakpad/CONTROL +++ b/ports/breakpad/CONTROL @@ -1,4 +1,4 @@ Source: breakpad
-Version: 2018-02-25 +Version: 2018-03-13 Build-Depends: libdisasm
Description: a set of client and server components which implement a crash-reporting system.
diff --git a/ports/breakpad/portfile.cmake b/ports/breakpad/portfile.cmake index a7b28e863..b8bac3f6a 100644 --- a/ports/breakpad/portfile.cmake +++ b/ports/breakpad/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/breakpad
- REF 88e9a460dec52d11ce4520c54246cf5cf29f87bf
- SHA512 31750e6db23c30b884af7049dc67cd30198e49a638d3e226c5ba31f562145bdfbc42f0679173cefc93df75b11af734ecf164c0d4030408e6f0ab315d60fdb30f
+ REF 2d80611fedf1e6bce4459f179dafaac844e9fc7f + SHA512 8c4eabb1e2d071ed67d178c1ee8c3679a24bff39439ee360a079fa926e276247ee18d0d88e420407e08c99cac0d1e9a8b4c7f554bf2d07f125eaa1df2f973e38
HEAD_REF master
)
diff --git a/ports/butteraugli/CMakeLists.txt b/ports/butteraugli/CMakeLists.txt index 0b5373c5a..6a2e5ca02 100644 --- a/ports/butteraugli/CMakeLists.txt +++ b/ports/butteraugli/CMakeLists.txt @@ -5,12 +5,14 @@ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) add_compile_options(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) if(MSVC) add_compile_options(/W3 /wd4005 /wd4996 /wd4018) +else() + add_compile_options(-std=c++11) endif() find_package(JPEG REQUIRED) find_package(PNG REQUIRED) -include_directories(".") +include_directories("." ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) add_library(butteraugli_lib butteraugli/butteraugli.cc) @@ -23,8 +25,8 @@ install( if(NOT DISABLE_INSTALL_TOOLS) add_executable(butteraugli butteraugli/butteraugli_main.cc) - target_include_directories(butteraugli PRIVATE ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) - target_link_libraries(butteraugli PRIVATE butteraugli_lib ${JPEG_LIBRARIES} ${PNG_LIBRARIES}) + find_library(TURBO turbojpeg) + target_link_libraries(butteraugli butteraugli_lib ${JPEG_LIBRARIES} ${TURBO} ${PNG_LIBRARIES}) install ( TARGETS butteraugli diff --git a/ports/caf/CONTROL b/ports/caf/CONTROL new file mode 100644 index 000000000..e9b8cd0bf --- /dev/null +++ b/ports/caf/CONTROL @@ -0,0 +1,4 @@ +Source: caf +Version: 0.15.7 +Build-Depends: openssl +Description: an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more. diff --git a/ports/caf/openssl-version-override.patch b/ports/caf/openssl-version-override.patch new file mode 100644 index 000000000..bccbd6ca4 --- /dev/null +++ b/ports/caf/openssl-version-override.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a7b75f7..794af1d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -545,6 +545,9 @@ if(NOT CAF_NO_OPENSSL)
+ message(STATUS
+ "Disable OpenSSL. Required >= 1.0.1 due to TLSv1.2 support.")
+ set(CAF_NO_OPENSSL yes)
++ elseif(CAF_OPENSSL_VERSION_OVERRIDE)
++ include_directories(BEFORE ${OPENSSL_INCLUDE_DIR})
++ add_optional_caf_lib(openssl)
+ else()
+ # Check if openssl headers and library versions match
+ set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
diff --git a/ports/caf/portfile.cmake b/ports/caf/portfile.cmake new file mode 100644 index 000000000..aecd84116 --- /dev/null +++ b/ports/caf/portfile.cmake @@ -0,0 +1,48 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_LIBRARY_LINKAGE "static") + message("CAF only supports static library linkage") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO actor-framework/actor-framework + REF 0.15.7 + SHA512 ff0fa205ad71677b84fa09a2e6ce6bb6d1bc9b790bbbc3ac51505467402ff61a218528004212efa2063c798cc512972d318a2c9423067ee51cef719de2b6b186 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/openssl-version-override.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON + -DCAF_BUILD_STATIC=ON + -DCAF_BUILD_STATIC_ONLY=ON + -DCAF_NO_TOOLS=ON + -DCAF_NO_EXAMPLES=ON + -DCAF_NO_BENCHMARKS=ON + -DCAF_NO_UNIT_TESTS=ON + -DCAF_NO_PROTOBUF_EXAMPLES=ON + -DCAF_NO_QT_EXAMPLES=ON + -DCAF_NO_OPENCL=ON + -DCAF_NO_OPENSSL=OFF + -DCAF_NO_CURL_EXAMPLES=ON + -DCAF_OPENSSL_VERSION_OVERRIDE=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/caf RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/capstone/portfile.cmake b/ports/capstone/portfile.cmake index 430638322..77dea256e 100644 --- a/ports/capstone/portfile.cmake +++ b/ports/capstone/portfile.cmake @@ -46,6 +46,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") endif() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE.txt +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/capstone RENAME copyright) diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index 3f87c3130..faa5f0574 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.2.0 +Version: 2.2.1-1 Description: A modern, header-only test framework for unit testing. Issues, PRs and changelogs can be found at https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index e614304a6..65a38d8f0 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -1,18 +1,30 @@ include(vcpkg_common_functions) -set(CATCH_VERSION v2.2.0) - -vcpkg_download_distfile(HEADER - URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" - FILENAME "catchorg-catch2-${CATCH_VERSION}.hpp" - SHA512 363a051d6dc67475f6832b2a1e0f7367bdef45a316c5222112842919808227bd9e9ccfe97d0439b79f86377fbb5017eed98f2dc58fe66b14f9804741dcd83036 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO catchorg/Catch2 + REF v2.2.1 + SHA512 48d3a0384dcd19fe622c4fda51639be36c904aaff77f5857615010c57e69d8e9f1deb2156e3e4882a592fe260d2bae0efa3cd02c2a2cabe07d9f9db09051a6b0 + HEAD_REF master ) -vcpkg_download_distfile(LICENSE - URLS "https://raw.githubusercontent.com/catchorg/Catch2/${CATCH_VERSION}/LICENSE.txt" - FILENAME "catchorg-catch2-LICENSE-${CATCH_VERSION}.txt" - SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DCATCH_BUILD_EXAMPLES=OFF ) -file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) -file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Catch2 TARGET_PATH share/catch2) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/catch/catch.hpp) + message(FATAL_ERROR "Main includes have moved. Please update the forwarder.") +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include <catch/catch.hpp>") +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch2 RENAME copyright) diff --git a/ports/ccfits/CONTROL b/ports/ccfits/CONTROL index 16b36bc8a..5cd10f63d 100644 --- a/ports/ccfits/CONTROL +++ b/ports/ccfits/CONTROL @@ -1,4 +1,4 @@ Source: ccfits -Version: 2.5-1 +Version: 2.5-2 Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++. Build-Depends: cfitsio diff --git a/ports/ccfits/portfile.cmake b/ports/ccfits/portfile.cmake index 6bd9bd170..6aeecfd62 100644 --- a/ports/ccfits/portfile.cmake +++ b/ports/ccfits/portfile.cmake @@ -1,19 +1,6 @@ -# 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) #removes current source to prevent static builds from using patched source code -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/CCfits-2.5.tar.gz.extracted) +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/CCfits) @@ -31,18 +18,16 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) ) endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA # Disable this option if project cannot be built with Ninja - # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 - # OPTIONS_RELEASE -DOPTIMIZE=1 - # OPTIONS_DEBUG -DDEBUGGABLE=1 + PREFER_NINJA + OPTIONS + -DCFITSIO_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/cfitsio ) vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +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/CCfits.dll ${CURRENT_PACKAGES_DIR}/bin/CCfits.dll) @@ -52,5 +37,13 @@ endif() # Remove duplicate include files file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Patch installed headers to look in the correct subdirectory +file(GLOB HEADERS ${CURRENT_PACKAGES_DIR}/include/CCfits/*) +foreach(HEADER IN LISTS HEADERS) + file(READ "${HEADER}" _contents) + string(REPLACE "\"fitsio.h\"" "\"cfitsio/fitsio.h\"" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + # Handle copyright file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/ccfits RENAME copyright) diff --git a/ports/cctz/CMakeLists.txt b/ports/cctz/CMakeLists.txt index 99322d05e..af557830c 100644 --- a/ports/cctz/CMakeLists.txt +++ b/ports/cctz/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.8)
project(cctz CXX)
+set(CMAKE_CXX_STANDARD 14)
+
set(CMAKE_DEBUG_POSTFIX d)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
diff --git a/ports/cctz/portfile.cmake b/ports/cctz/portfile.cmake index 5760e7672..d243e1e65 100644 --- a/ports/cctz/portfile.cmake +++ b/ports/cctz/portfile.cmake @@ -20,8 +20,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cctz)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/cctz ${CURRENT_PACKAGES_DIR}/share/unofficial-cctz)
+vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cctz TARGET_PATH share/unofficial-cctz)
vcpkg_copy_pdbs()
diff --git a/ports/cfitsio/CONTROL b/ports/cfitsio/CONTROL index b25eb8026..7c50b295d 100644 --- a/ports/cfitsio/CONTROL +++ b/ports/cfitsio/CONTROL @@ -1,3 +1,3 @@ Source: cfitsio -Version: 3.410-1 +Version: 3.410-2 Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format diff --git a/ports/cfitsio/portfile.cmake b/ports/cfitsio/portfile.cmake index 2490beb80..e9caf61d1 100644 --- a/ports/cfitsio/portfile.cmake +++ b/ports/cfitsio/portfile.cmake @@ -15,14 +15,19 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Remove duplicate include files -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/unistd.h) + +# cfitsio uses very common names for its headers, so they must be moved to a subdirectory +file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/cfitsio) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/cfitsio ${CURRENT_PACKAGES_DIR}/include/cfitsio) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) - # move DLLs to bin directories for dynamic builds - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll) + # move DLLs to bin directories for dynamic builds + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll) endif() # Handle copyright diff --git a/ports/chakracore/CONTROL b/ports/chakracore/CONTROL index 4ae901a2f..edd7eb1a1 100644 --- a/ports/chakracore/CONTROL +++ b/ports/chakracore/CONTROL @@ -1,3 +1,3 @@ Source: chakracore -Version: 1.8.1 +Version: 1.8.2 Description: Core part of the Chakra Javascript engine diff --git a/ports/chakracore/portfile.cmake b/ports/chakracore/portfile.cmake index 7e8d8ec6e..daea20444 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.1 - SHA512 203eaad21130fca9ac043952327f758947d41288ce9eb771bc469e768079a39cc517f86746d85ae270b04c5b7640d18d02f497a18cda05190dfaa68fdc16cbb9 + REF v1.8.2 + SHA512 6d4408311f0c3ff2c9895f59f34f12fb84797d130a562db7c2af27eb26edd3d46bf935dab4cd40c2ffc0dc853ad9bdf432a721cfded7836639858965b7eb67e9 HEAD_REF master ) @@ -42,29 +42,33 @@ file(INSTALL ${BUILDTREE_PATH}/lib/jsrt/ChakraDebug.h DESTINATION ${CURRENT_PACKAGES_DIR}/include ) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin -) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib -) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb - DESTINATION ${CURRENT_PACKAGES_DIR}/bin -) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib - DESTINATION ${CURRENT_PACKAGES_DIR}/lib -) -file(INSTALL - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe - ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe - DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore) +endif() vcpkg_copy_pdbs() file(INSTALL diff --git a/ports/cimg/CONTROL b/ports/cimg/CONTROL index 74f184270..a4b1438e7 100644 --- a/ports/cimg/CONTROL +++ b/ports/cimg/CONTROL @@ -1,3 +1,3 @@ Source: cimg -Version: 2.1.8 +Version: 221 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 6e5a86ad9..5a130433f 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.218" + REF v.221 HEAD_REF master - SHA512 aa6267c9b425cb82aa3aeadea9f7c1ffdd975d01b4f64b8cd905ce11cf062ae22eea9b519c681f0fef239615a621dd3cae2a67e04e6cac96425776a4ac176a23) + SHA512 d1aea69f4662e85c5b56c723cadcc69282f2f1c4e3a968efc312a826a15000c11d61756d3ed87e37ae349cebbd62b67503996c45ed1fe038a91a9f0c8dbec43c) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/ports/clara/CONTROL b/ports/clara/CONTROL index 37c630037..0825f74e0 100644 --- a/ports/clara/CONTROL +++ b/ports/clara/CONTROL @@ -1,3 +1,3 @@ Source: clara -Version: 2018-03-07 +Version: 2018-03-11 Description: A simple to use command line parser for C++
\ No newline at end of file diff --git a/ports/clara/portfile.cmake b/ports/clara/portfile.cmake index ed4113f3f..377eb932a 100644 --- a/ports/clara/portfile.cmake +++ b/ports/clara/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO philsquared/Clara - REF adb5ec3a5c20defc80286fd6e8c14aeef10fdcd7 - SHA512 93977d8e2024220f37645812dfe1f8a6ab79568c3dc09fa63894d00f440094944a96878178e43b5508aefb7214a6921dad86f9e92b2833f7a1f8c6f53c35860c + REF 008c2ae0a52aaa485d6cb830ad54bc6466733298 + SHA512 270c5d8cdc9c833d1a95f1a2737b3db0f537ab92569b5cc1007184b9f7e59f66bbf9ba95313332826814c0b670919b31e27fe797bb3083ac5e55bad6a6051d51 HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/console-bridge/CONTROL b/ports/console-bridge/CONTROL index ea6ebf3ba..533c63944 100644 --- a/ports/console-bridge/CONTROL +++ b/ports/console-bridge/CONTROL @@ -1,3 +1,3 @@ Source: console-bridge -Version: 0.3.2-2 +Version: 0.3.2-3 Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages. diff --git a/ports/console-bridge/License.txt b/ports/console-bridge/License.txt deleted file mode 100644 index affcb8568..000000000 --- a/ports/console-bridge/License.txt +++ /dev/null @@ -1,31 +0,0 @@ -Software License Agreement (BSD License) - -Copyright (c) 2008, Willow Garage, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. -* Neither the name of the Willow Garage nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file diff --git a/ports/console-bridge/portfile.cmake b/ports/console-bridge/portfile.cmake index d88308e5c..74d76923f 100644 --- a/ports/console-bridge/portfile.cmake +++ b/ports/console-bridge/portfile.cmake @@ -6,7 +6,12 @@ vcpkg_from_github( REF 0.3.2 SHA512 41fa5340d7ba79c887ef73eb4fda7b438ed91febd224934ae4658697e4c9e43357207e1b3e191ecce3c97cb9a87b0556372832735a268261bc798cc7683aa207 HEAD_REF master - ) +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/static-macro.patch +) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -16,9 +21,23 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake") -file(RENAME ${CURRENT_PACKAGES_DIR}/share/console-bridge ${CURRENT_PACKAGES_DIR}/share/console_bridge) +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake" TARGET_PATH share/console_bridge) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/console_bridge/cmake" TARGET_PATH share/console_bridge) +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/console-bridge RENAME copyright) +file(READ ${SOURCE_PATH}/src/console.cpp _contents) +string(SUBSTRING "${_contents}" 0 2000 license) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/console-bridge) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/console-bridge/copyright "${license}") + +file(READ ${CURRENT_PACKAGES_DIR}/include/console_bridge/exportdecl.h _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC" "if 1" _contents "${_contents}") +else() + string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC" "if 0" _contents "${_contents}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/console_bridge/exportdecl.h "${_contents}") diff --git a/ports/console-bridge/static-macro.patch b/ports/console-bridge/static-macro.patch new file mode 100644 index 000000000..31e4053aa --- /dev/null +++ b/ports/console-bridge/static-macro.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 604b2ab..e98b51c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -37,6 +37,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
+ option(BUILD_SHARED_LIBS "Build dynamically-linked binaries" ON)
+ endif()
+
++if(NOT BUILD_SHARED_LIBS)
++ add_definitions(-DCONSOLE_BRIDGE_STATIC)
++endif()
++
+ add_library(${PROJECT_NAME} src/console.cpp)
+ set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION
+ ${CONSOLE_BRIDGE_MAJOR_VERSION}.${CONSOLE_BRIDGE_MINOR_VERSION})
diff --git a/ports/cpprestsdk/CONTROL b/ports/cpprestsdk/CONTROL index 663781d40..7e6dbc0d1 100644 --- a/ports/cpprestsdk/CONTROL +++ b/ports/cpprestsdk/CONTROL @@ -1,5 +1,5 @@ Source: cpprestsdk -Version: 2.10.2 -Build-Depends: zlib, openssl (windows), boost-system (windows), boost-date-time (windows), boost-regex (windows), websocketpp (windows) +Version: 2.10.2-1 +Build-Depends: zlib, openssl (!uwp), boost-system (!uwp), boost-date-time (!uwp), boost-regex (!uwp), websocketpp (!uwp), boost-thread (!uwp&!windows), boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows) Description: C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. diff --git a/ports/cppunit/portfile.cmake b/ports/cppunit/portfile.cmake index a56f7849a..7a936d655 100644 --- a/ports/cppunit/portfile.cmake +++ b/ports/cppunit/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(VERSION 1.14.0) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}/cppunit-${VERSION}) diff --git a/ports/curl/0002_fix_uwp.patch b/ports/curl/0002_fix_uwp.patch index 8408177e8..111ca98e8 100644 --- a/ports/curl/0002_fix_uwp.patch +++ b/ports/curl/0002_fix_uwp.patch @@ -60,14 +60,14 @@ diff --git a/lib/ftp.c b/lib/ftp.c index 8042edf..3442df7 100644 --- a/lib/ftp.c +++ b/lib/ftp.c -@@ -4297,7 +4297,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) +@@ -4260,7 +4260,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn) /* prevpath is "raw" so we convert the input path before we compare the strings */ size_t dlen; - char *path; + char *path = NULL; CURLcode result = - Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, FALSE); + Curl_urldecode(conn->data, data->state.path, 0, &path, &dlen, TRUE); if(result) { diff --git a/lib/rand.c b/lib/rand.c index 2670af9..0d18d37 100644 diff --git a/ports/curl/CONTROL b/ports/curl/CONTROL index e7f13888d..18518e1ea 100644 --- a/ports/curl/CONTROL +++ b/ports/curl/CONTROL @@ -1,5 +1,5 @@ Source: curl -Version: 7.58.0-4 +Version: 7_59_0-2 Build-Depends: zlib Description: A library for transferring data with URLs Default-Features: ssl @@ -12,7 +12,7 @@ Feature: non-http Description: Enables protocols beyond HTTP/HTTPS/HTTP2 Feature: http2 -Build-Depends: nghttp2, ssl +Build-Depends: nghttp2, curl[ssl] Description: HTTP2 support Feature: ssl diff --git a/ports/curl/portfile.cmake b/ports/curl/portfile.cmake index 94587649d..852fcf9d0 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_58_0 - SHA512 148c25152732dd5ad2626bc70c7725577e25033a73eecefa4dd820927ec552f9c2d0235cc3f597404d3893eced7d5d2bd9522f6302b7f930e9f65912ac2c91f6 + REF curl-7_59_0 + SHA512 eac51b986db7eafb836bc4fa00def88054304110990bf99a4387a5ff85a8375616c2ee5bee91bf608737faffe9f228dfd62be69a4b0622a4afe3deb1098b6bd3 HEAD_REF master ) @@ -95,6 +95,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/curl) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/curl) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/curl) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/curl) +endif() + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/curl RENAME copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/dirent/portfile.cmake b/ports/dirent/portfile.cmake index c9645948e..70ed405cc 100644 --- a/ports/dirent/portfile.cmake +++ b/ports/dirent/portfile.cmake @@ -1,3 +1,8 @@ +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/ports/doctest/CONTROL b/ports/doctest/CONTROL index ee03969dc..b83f7b1af 100644 --- a/ports/doctest/CONTROL +++ b/ports/doctest/CONTROL @@ -1,3 +1,3 @@ Source: doctest -Version: 1.2.7 +Version: 1.2.8 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 e70d58d3d..22e867a6d 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.7 - SHA512 aa6671eb0ac0a7336ad81dea4d696ce61849ab7eb97d6f0f549446b2ac7538a8cdb0a87b8500b3af41cd3f10672ae13591633b368cbcb901f361f7715f22e4e9 + REF 1.2.8 + SHA512 4558909c6a846fa8679539a9d44e442d9ce6aae37c807ef34d95648abfabe0a16e4593aef83293e3d03bcf80e0269742ff0b95d54eb434c7a18be136608cd24d HEAD_REF master ) diff --git a/ports/double-conversion/portfile.cmake b/ports/double-conversion/portfile.cmake index ee4881e88..47f3fba4e 100644 --- a/ports/double-conversion/portfile.cmake +++ b/ports/double-conversion/portfile.cmake @@ -23,30 +23,37 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Rename exported target files into something vcpkg_fixup_cmake_targets expects +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) +endif() if(NOT VCPKG_USE_HEAD_VERSION) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake - ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) - file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) - file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake - ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) - - file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) - string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") - - # Remove hardcoded paths from config file - file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) - string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" - "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") - string(REPLACE "${CURRENT_PACKAGES_DIR}" - "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") - - vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) + if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionLibraryDepends-debug.cmake + ${CURRENT_PACKAGES_DIR}/debug/CMake/double-conversionTargets-debug.cmake) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends-release.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets-release.cmake) + endif() + file(RENAME ${CURRENT_PACKAGES_DIR}/CMake/double-conversionLibraryDepends.cmake + ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake) + + file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake TARGETS_FILE) + string(REPLACE "double-conversionLibraryDepends" "double-conversionTargets" TARGETS_FILE "${TARGETS_FILE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionTargets.cmake "${TARGETS_FILE}") + + # Remove hardcoded paths from config file + file(READ ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake CONFIG_FILE) + string(REPLACE "${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion/double-conversionLibraryDepends.cmake" + "\${double-conversion_CMAKE_DIR}/double-conversionTargets.cmake" CONFIG_FILE "${CONFIG_FILE}") + string(REPLACE "${CURRENT_PACKAGES_DIR}" + "\${double-conversion_CMAKE_DIR}/../.." CONFIG_FILE "${CONFIG_FILE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/CMake/double-conversionConfig.cmake "${CONFIG_FILE}") + + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) + endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -else() - vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) endif() vcpkg_copy_pdbs() diff --git a/ports/eastl/CONTROL b/ports/eastl/CONTROL index 2e7d0c433..47a111ea1 100644 --- a/ports/eastl/CONTROL +++ b/ports/eastl/CONTROL @@ -1,4 +1,4 @@ Source: eastl
-Version: 3.07.02
+Version: 3.08.00 Description: Electronic Arts Standard Template Library.
It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.
diff --git a/ports/eastl/portfile.cmake b/ports/eastl/portfile.cmake index f5b877b8c..1e3831913 100644 --- a/ports/eastl/portfile.cmake +++ b/ports/eastl/portfile.cmake @@ -8,8 +8,8 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/eastl) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO electronicarts/EASTL
- REF 3.07.02
- SHA512 332db00b69a5493158daf1b0b89717646f0a31aeb0bfc9bf3415caee928102c3253c47c21eda0789350095811db45f5eae82ca24fb3fe1e9d67072f9fcd21235
+ REF 3.08.00 + SHA512 dc9510d1b6021fb275049a45d52d25002ac2e9859047c0ba4881aa478b700645e17b4fdbc7cdb43cee86df9155c545d2a29a6c1c5b06df3b8b6b4e150f010ade
HEAD_REF master
)
diff --git a/ports/evpp/CONTROL b/ports/evpp/CONTROL index 163052ae0..741a94a22 100644 --- a/ports/evpp/CONTROL +++ b/ports/evpp/CONTROL @@ -1,4 +1,4 @@ Source: evpp -Version: 0.6.1-1 +Version: 0.7.0 Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. -Build-Depends: glog, libevent +Build-Depends: glog, libevent, rapidjson diff --git a/ports/evpp/fix-rapidjson-1-1.patch b/ports/evpp/fix-rapidjson-1-1.patch new file mode 100644 index 000000000..1dda0b895 --- /dev/null +++ b/ports/evpp/fix-rapidjson-1-1.patch @@ -0,0 +1,159 @@ +diff --git a/3rdparty/libhashkit/crc32.c b/3rdparty/libhashkit/crc32.c
+index 6db0478..ff34194 100644
+--- a/3rdparty/libhashkit/crc32.c
++++ b/3rdparty/libhashkit/crc32.c
+@@ -73,7 +73,7 @@ static const uint32_t crc32tab[256] = {
+ 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
+ };
+
+-uint32_t hashkit_crc32(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_crc32(const char *key, size_t key_length, void * context)
+ {
+ uint64_t x;
+ uint32_t crc= UINT32_MAX;
+diff --git a/3rdparty/libhashkit/fnv.c b/3rdparty/libhashkit/fnv.c
+index ee3754d..d79fe39 100644
+--- a/3rdparty/libhashkit/fnv.c
++++ b/3rdparty/libhashkit/fnv.c
+@@ -14,7 +14,7 @@ static uint64_t FNV_64_PRIME= UINT64_C(0x100000001b3);
+ static uint32_t FNV_32_INIT= 2166136261UL;
+ static uint32_t FNV_32_PRIME= 16777619;
+
+-uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void * context)
+ {
+ /* Thanks to pierre@demartines.com for the pointer */
+ uint64_t hash= FNV_64_INIT;
+@@ -28,7 +28,7 @@ uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __att
+ return (uint32_t)hash;
+ }
+
+-uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void * context)
+ {
+ uint32_t hash= (uint32_t) FNV_64_INIT;
+
+@@ -42,7 +42,7 @@ uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context __at
+ return hash;
+ }
+
+-uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void * context)
+ {
+ uint32_t hash= FNV_32_INIT;
+
+@@ -56,7 +56,7 @@ uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __att
+ return hash;
+ }
+
+-uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void * context)
+ {
+ uint32_t hash= FNV_32_INIT;
+
+diff --git a/3rdparty/libhashkit/hsieh.c b/3rdparty/libhashkit/hsieh.c
+index ba46ed2..c3e9a38 100644
+--- a/3rdparty/libhashkit/hsieh.c
++++ b/3rdparty/libhashkit/hsieh.c
+@@ -17,7 +17,7 @@
+ +(uint32_t)(((const uint8_t *)(d))[0]) )
+ #endif
+
+-uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_hsieh(const char *key, size_t key_length, void * context)
+ {
+ uint32_t hash = 0, tmp;
+ int rem;
+diff --git a/3rdparty/libhashkit/jenkins.c b/3rdparty/libhashkit/jenkins.c
+index b684d7a..2b59714 100644
+--- a/3rdparty/libhashkit/jenkins.c
++++ b/3rdparty/libhashkit/jenkins.c
+@@ -56,7 +56,7 @@ use a bitmask. For example, if you need only 10 bits, do
+ In which case, the hash table should have hashsize(10) elements.
+ */
+
+-uint32_t hashkit_jenkins(const char *key, size_t length, void *context __attribute__((unused)))
++uint32_t hashkit_jenkins(const char *key, size_t length, void * context)
+ {
+ uint32_t a,b,c; /* internal state */
+ union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
+diff --git a/3rdparty/libhashkit/md5.c b/3rdparty/libhashkit/md5.c
+index 7371c6d..0e3181b 100644
+--- a/3rdparty/libhashkit/md5.c
++++ b/3rdparty/libhashkit/md5.c
+@@ -352,7 +352,7 @@ unsigned int len)
+ (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
+ }
+
+-uint32_t hashkit_md5(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_md5(const char *key, size_t key_length, void * context)
+ {
+ unsigned char results[16];
+
+diff --git a/3rdparty/libhashkit/murmur.c b/3rdparty/libhashkit/murmur.c
+index a18ac40..9e55eec 100644
+--- a/3rdparty/libhashkit/murmur.c
++++ b/3rdparty/libhashkit/murmur.c
+@@ -17,7 +17,7 @@
+
+ #include "common.h"
+
+-uint32_t hashkit_murmur(const char *key, size_t length, void *context __attribute__((unused)))
++uint32_t hashkit_murmur(const char *key, size_t length, void * context)
+ {
+ /*
+ 'm' and 'r' are mixing constants generated offline. They're not
+diff --git a/3rdparty/libhashkit/one_at_a_time.c b/3rdparty/libhashkit/one_at_a_time.c
+index 579d044..539861c 100644
+--- a/3rdparty/libhashkit/one_at_a_time.c
++++ b/3rdparty/libhashkit/one_at_a_time.c
+@@ -13,7 +13,7 @@ http://en.wikipedia.org/wiki/Jenkins_hash_function
+
+ #include "common.h"
+
+-uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context __attribute__((unused)))
++uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void * context)
+ {
+ const char *ptr= key;
+ uint32_t value= 0;
+diff --git a/3rdparty/libhashkit/strerror.c b/3rdparty/libhashkit/strerror.c
+index 270fa21..7446782 100644
+--- a/3rdparty/libhashkit/strerror.c
++++ b/3rdparty/libhashkit/strerror.c
+@@ -8,7 +8,7 @@
+
+ #include "common.h"
+
+-const char *hashkit_strerror(hashkit_st *ptr __attribute__((unused)), hashkit_return_t rc)
++const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc)
+ {
+ switch (rc)
+ {
+diff --git a/apps/evnsq/option.cc b/apps/evnsq/option.cc
+index e2128f5..0248ace 100644
+--- a/apps/evnsq/option.cc
++++ b/apps/evnsq/option.cc
+@@ -21,14 +21,14 @@ std::string Option::ToJSON() const {
+ doc.AddMember("write_timeout", rapidjson::Value(int64_t(write_timeout.Milliseconds())), doc.GetAllocator());
+ doc.AddMember("msg_timeout", rapidjson::Value(int64_t(msg_timeout.Milliseconds())), doc.GetAllocator());
+
+- doc.AddMember("client_id", rapidjson::Value(client_id, doc.GetAllocator()), doc.GetAllocator());
+- doc.AddMember("hostname", rapidjson::Value(hostname, doc.GetAllocator()), doc.GetAllocator());
+- doc.AddMember("user_agent", rapidjson::Value(user_agent, doc.GetAllocator()), doc.GetAllocator());
++ doc.AddMember("client_id", rapidjson::Value(client_id.data(), client_id.size(), doc.GetAllocator()), doc.GetAllocator());
++ doc.AddMember("hostname", rapidjson::Value(hostname.data(), hostname.size(), doc.GetAllocator()), doc.GetAllocator());
++ doc.AddMember("user_agent", rapidjson::Value(user_agent.data(), user_agent.size(), doc.GetAllocator()), doc.GetAllocator());
+
+ doc.AddMember("heartbeat_interval", rapidjson::Value(int64_t(heartbeat_interval.Milliseconds())), doc.GetAllocator());
+
+ doc.AddMember("deflate", rapidjson::Value(false), doc.GetAllocator());
+- doc.AddMember("long_id", rapidjson::Value(hostname, doc.GetAllocator()), doc.GetAllocator());
++ doc.AddMember("long_id", rapidjson::Value(hostname.data(), hostname.size(), doc.GetAllocator()), doc.GetAllocator());
+ doc.AddMember("output_buffer_size", rapidjson::Value(int64_t(16384)), doc.GetAllocator());
+ doc.AddMember("output_buffer_timeout", rapidjson::Value(int64_t(250)), doc.GetAllocator());
+ doc.AddMember("feature_negotiation", rapidjson::Value(feature_negotiation), doc.GetAllocator());
+@@ -40,3 +40,4 @@ std::string Option::ToJSON() const {
+ return std::string(buffer.GetString(), buffer.GetSize());
+ }
+ }
++
diff --git a/ports/evpp/portfile.cmake b/ports/evpp/portfile.cmake index db27b4d63..b20642bdd 100644 --- a/ports/evpp/portfile.cmake +++ b/ports/evpp/portfile.cmake @@ -2,7 +2,7 @@ include(vcpkg_common_functions) set(EVPP_LOCAL_TEST OFF) -set(EVPP_VERSION 0.6.1) +set(EVPP_VERSION 0.7.0) if (EVPP_LOCAL_TEST) set(EVPP_HASH bfefb3f7c1f620fbca2c3d94e2e7c39aa963156a084caf39bcc348a9380f97c73c9ee965126434d71c8b14836e669d554ed98632b3bb38eb65b421fd8eff49b2) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/evpp) @@ -17,13 +17,20 @@ else () OUT_SOURCE_PATH SOURCE_PATH REPO Qihoo360/evpp REF v${EVPP_VERSION} - SHA512 08226fe9853c1984f6554ede8f79a5767eec1d12ff2ff7172eef6f715ac7ea3f495b2336876823842408bd92b0ad99c9a3d506c07fc0add369f5cfa777f0406a + SHA512 ddcef8d2af6b3c46473d755c0f0994d63d56240ea85d6b44ceb6b77724c3c56bbf1156f7188e270fb5f9f36f25bfc2f96669d7249a34c921922671e3fe267e88 HEAD_REF master ) + file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue) + + vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-rapidjson-1-1.patch + ) endif () vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DEVPP_VCPKG_BUILD=ON ) diff --git a/ports/exiv2/CONTROL b/ports/exiv2/CONTROL index fbcb220c7..5fd6dae7f 100644 --- a/ports/exiv2/CONTROL +++ b/ports/exiv2/CONTROL @@ -1,4 +1,4 @@ Source: exiv2 -Version: 2018-02-25 +Version: 2018-03-20 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 d193897f4..3f2440356 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 28fa146d9758230ea65e2b89574095514aa50429 - SHA512 710020dd404d43edd268a9229f240222b185576d8c277884c57479d291d0f3145b6076d0225849c38ab2e618d113dbc61cd6a60d4545e2a44797a63a2f01a603 + REF 59b148aee9402426e4d4cd7db5be6fa5966a68b5 + SHA512 6e7444d26594cd28d0a421b94ce8dc24b8b65cff3112014931a528235578f5cbbb9b945dff61af1d39fed97ab091aa6c5ebab6c662aada93ca5a9b0316f714f0 HEAD_REF master ) @@ -25,12 +25,8 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "share/exiv2/cmake") vcpkg_copy_pdbs() # Clean -file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) -file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -file(REMOVE ${EXE}) -file(REMOVE ${DEBUG_EXE}) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${EXE} ${DEBUG_EXE}) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/expat/portfile.cmake b/ports/expat/portfile.cmake index a8f320ab3..485320a8b 100644 --- a/ports/expat/portfile.cmake +++ b/ports/expat/portfile.cmake @@ -34,7 +34,9 @@ file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/sh vcpkg_copy_pdbs() # CMake's FindExpat currently doesn't look for expatd.lib -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/expatd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/expat.lib) +endif() file(READ ${CURRENT_PACKAGES_DIR}/include/expat_external.h EXPAT_EXTERNAL_H) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") diff --git a/ports/fastcdr/CONTROL b/ports/fastcdr/CONTROL new file mode 100644 index 000000000..dfd04bf06 --- /dev/null +++ b/ports/fastcdr/CONTROL @@ -0,0 +1,3 @@ +Source: fastcdr
+Version: 1.0.6-1
+Description: eProsima FastCDR is a C++ library that provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard.
diff --git a/ports/fastcdr/install-cmake.patch b/ports/fastcdr/install-cmake.patch new file mode 100644 index 000000000..0eff05063 --- /dev/null +++ b/ports/fastcdr/install-cmake.patch @@ -0,0 +1,26 @@ +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
+index 46d6f20..5d73ec5 100644
+--- a/src/cpp/CMakeLists.txt
++++ b/src/cpp/CMakeLists.txt
+@@ -139,7 +139,12 @@ if(MSVC OR MSVC_IDE)
+ set(DIR_EXTENSION "/${MSVC_ARCH}")
+ endif()
+
+- install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static
++ if(BUILD_SHARED_LIBS)
++ set(PROJECT_TARGETS ${PROJECT_NAME})
++ else()
++ set(PROJECT_TARGETS ${PROJECT_NAME}_static)
++ endif()
++ install(TARGETS ${PROJECT_TARGETS}
+ EXPORT ${PROJECT_NAME}Targets
+ RUNTIME DESTINATION ${BIN_INSTALL_DIR}${DIR_EXTENSION}
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}${DIR_EXTENSION}
+@@ -147,7 +152,6 @@ if(MSVC OR MSVC_IDE)
+ COMPONENT libraries_${MSVC_ARCH}
+ )
+
+- export(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static FILE ${PROJECT_BINARY_DIR}/cmake/config/${PROJECT_NAME}Targets.cmake)
+ install(EXPORT ${PROJECT_NAME}Targets
+ DESTINATION ${LIB_INSTALL_DIR}${DIR_EXTENSION}/${PROJECT_NAME}/cmake
+ COMPONENT cmake
diff --git a/ports/fastcdr/portfile.cmake b/ports/fastcdr/portfile.cmake new file mode 100644 index 000000000..91362f3b2 --- /dev/null +++ b/ports/fastcdr/portfile.cmake @@ -0,0 +1,45 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO eProsima/Fast-CDR
+ REF v1.0.6
+ SHA512 80861ff6a0283e1398306e081fe70d7d185f980e5714ae51864cae012b8f79719efa24e7f41025b2bfb2052cb2a3098436c75a38407f8f5a331593cb91868fb2
+ HEAD_REF master
+)
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES ${CMAKE_CURRENT_LIST_DIR}/install-cmake.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DLICENSE_INSTALL_DIR=share/fastcdr
+ -DCMAKE_DISABLE_FIND_PACKAGE_GTest=ON
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/fastcdr/cmake)
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/lib/fastcdr ${CURRENT_PACKAGES_DIR}/debug/lib/fastcdr)
+
+# always build static and share library default
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(READ ${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h EPROSIMA_AUTO_LINK_H)
+ string(REPLACE "#define EPROSIMA_LIB_PREFIX \"lib\"" "#define EPROSIMA_LIB_PREFIX" EPROSIMA_AUTO_LINK_H "${EPROSIMA_AUTO_LINK_H}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h "${EPROSIMA_AUTO_LINK_H}")
+else()
+ file(READ ${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h FASTCDR_H)
+ string(REPLACE "#define _FASTCDR_CONFIG_H_" "#define _FASTCDR_CONFIG_H_\r\n#define FASTCDR_DYN_LINK" FASTCDR_H "${FASTCDR_H}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h "${FASTCDR_H}")
+endif()
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/fastcdr)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/fastcdr/license ${CURRENT_PACKAGES_DIR}/share/fastcdr/copyright)
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 3ed4c4bac..2f635cc10 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,8 +1,35 @@ Source: ffmpeg -Version: 3.3.3-3 +Version: 3.3.3-4 Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. +Feature: ffserver +Description: ffserver appplication support in ffmpeg + +Feature: ffplay +Description: ffplay appplication support in ffmpeg + +Feature: ffprobe +Description: ffprobe appplication support in ffmpeg + Feature: openssl -Build-Depends: openssl +Build-Depends: openssl, ffmpeg[nonfree] Description: openssl support in ffmpeg + +Feature: lzma +Build-Depends: liblzma +Description: lzma support in ffmpeg + +Feature: x264 +Build-Depends: x264, ffmpeg[gpl] +Description: x264 support in ffmpeg + +Feature: opencl +Build-Depends: opencl +Description: opencl support in ffmpeg + +Feature: nonfree +Description: allow nonfree and unredistributable libraries + +Feature: gpl +Description: allow GPL licensed libraries diff --git a/ports/ffmpeg/FindFFMPEG.cmake b/ports/ffmpeg/FindFFMPEG.cmake index ce6e7e600..bd373bfae 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake +++ b/ports/ffmpeg/FindFFMPEG.cmake @@ -8,4 +8,4 @@ foreach(FFMPEG_SUBLIBRARY avformat avdevice avcodec avutil swscale) endforeach() list(APPEND FFMPEG_LIBRARIES wsock32 ws2_32 Secur32) -find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR) +find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIRS) diff --git a/ports/ffmpeg/configure_opencv.patch b/ports/ffmpeg/configure_opencv.patch new file mode 100644 index 000000000..66678661e --- /dev/null +++ b/ports/ffmpeg/configure_opencv.patch @@ -0,0 +1,11 @@ +--- a/configure
++++ b/configure
+@@ -5804,7 +5804,7 @@
+ enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
+ enabled libopencv && { check_header opencv2/core/core_c.h &&
+ { use_pkg_config opencv opencv2/core/core_c.h cvCreateImageHeader ||
+- require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
++ require opencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core341 -lopencv_imgproc341; } ||
+ require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader; }
+ enabled libopenh264 && require_pkg_config openh264 wels/codec_api.h WelsGetCodecVersion
+ enabled libopenjpeg && { { check_lib openjpeg-2.1/openjpeg.h opj_version -lopenjp2 -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } ||
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index 56b467685..994e057b3 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -3,14 +3,20 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-3.3.3) vcpkg_download_distfile(ARCHIVE URLS "http://ffmpeg.org/releases/ffmpeg-3.3.3.tar.bz2" FILENAME "ffmpeg-3.3.3.tar.bz2" - SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab + SHA512 1cc63bf73356f4e618c0d3572a216bdf5689f10deff56b4262f6d740b0bee5a4b3eac234f45fca3d4d2da77903a507b4fba725b76d2d2070f31b6dae9e7a2dab ) + +if (${SOURCE_PATH} MATCHES " ") + message(FATAL_ERROR "Error: ffmpeg will not build with spaces in the path. Please use a directory with no spaces") +endif() + vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/create-lib-libraries.patch ${CMAKE_CURRENT_LIST_DIR}/detect-openssl.patch + ${CMAKE_CURRENT_LIST_DIR}/configure_opencv.patch ) vcpkg_find_acquire_program(YASM) @@ -30,14 +36,66 @@ set(_csc_PROJECT_PATH ffmpeg) file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) -set(OPTIONS "--disable-ffmpeg --disable-ffprobe --disable-doc --enable-debug") +set(OPTIONS "--enable-asm --enable-yasm --disable-doc --enable-debug --disable-ffmpeg") set(OPTIONS "${OPTIONS} --enable-runtime-cpudetect") + +if("nonfree" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-nonfree") +endif() + +if("gpl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-gpl") +endif() + if("openssl" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-openssl") else() set(OPTIONS "${OPTIONS} --disable-openssl") endif() +if("ffplay" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-ffplay") +else() + set(OPTIONS "${OPTIONS} --disable-ffplay") +endif() + +if("ffserver" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-ffserver") +else() + set(OPTIONS "${OPTIONS} --disable-ffserver") +endif() + +if("ffprobe" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-ffprobe") +else() + set(OPTIONS "${OPTIONS} --disable-ffprobe") +endif() + +if("x264" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libx264") +else() + set(OPTIONS "${OPTIONS} --disable-libx264") +endif() + +if("opencl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-opencl") +else() + set(OPTIONS "${OPTIONS} --disable-opencl") +endif() + +if("lzma" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-lzma") +else() + set(OPTIONS "${OPTIONS} --disable-lzma") +endif() + +# bzip2's debug library is named "bz2d", which isn't found by ffmpeg +# if("bzip2" IN_LIST FEATURES) +# set(OPTIONS "${OPTIONS} --enable-bzip2") +# else() +# set(OPTIONS "${OPTIONS} --disable-bzip2") +# endif() + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") set(OPTIONS "${OPTIONS} --disable-programs --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") @@ -68,6 +126,8 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") endif() endif() +message(STATUS "Building Options: ${OPTIONS}") + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd") set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MD --extra-cxxflags=-MD") diff --git a/ports/fmem/CONTROL b/ports/fmem/CONTROL new file mode 100644 index 000000000..25f24652a --- /dev/null +++ b/ports/fmem/CONTROL @@ -0,0 +1,3 @@ +Source: fmem +Version: c-libs-2ccee3d2fb +Description: A cross-platform library for opening memory-backed libc streams. diff --git a/ports/fmem/portfile.cmake b/ports/fmem/portfile.cmake new file mode 100644 index 000000000..b3b5faa83 --- /dev/null +++ b/ports/fmem/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO c-libs/fmem + REF 2ccee3d2fb2fc72370a9bb2131bfc9167e0d9022 + SHA512 4a63332eb5df7f30bdad9e4233171b5c21dd2b092e525e9dcc4f602295ffff50c555c80fd74d964bc3daeffd8001a9b852f1769ef3161259dd8a3cae3ca3a4df + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmem RENAME copyright) diff --git a/ports/freetype/CONTROL b/ports/freetype/CONTROL index c6fcc4243..567cf9020 100644 --- a/ports/freetype/CONTROL +++ b/ports/freetype/CONTROL @@ -1,4 +1,4 @@ Source: freetype -Version: 2.8.1-1 +Version: 2.8.1-3 Build-Depends: zlib, bzip2, libpng Description: A library to render fonts. diff --git a/ports/freetype/portfile.cmake b/ports/freetype/portfile.cmake index 7b98fa477..15e8aceab 100644 --- a/ports/freetype/portfile.cmake +++ b/ports/freetype/portfile.cmake @@ -33,17 +33,25 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/ft2build.h ${CURRENT_PACKA file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/freetype2) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config-debug.cmake DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") -string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" DEBUG_MODULE "${DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-debug.cmake "${DEBUG_MODULE}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config-debug.cmake DEBUG_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" DEBUG_MODULE "${DEBUG_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-debug.cmake "${DEBUG_MODULE}") +endif() -file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake RELEASE_MODULE) -string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" RELEASE_MODULE "${RELEASE_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake "${RELEASE_MODULE}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake RELEASE_MODULE) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" RELEASE_MODULE "${RELEASE_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config-release.cmake "${RELEASE_MODULE}") +endif() # Fix the include dir [freetype2 -> freetype] -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config.cmake CONFIG_MODULE) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/debug/share/freetype/freetype-config.cmake CONFIG_MODULE) +else() #if(VCPKG_BUILD_TYPE STREQUAL "release") + file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake CONFIG_MODULE) +endif() string(REPLACE "\${_IMPORT_PREFIX}/include/freetype2" "\${_IMPORT_PREFIX}/include/freetype" CONFIG_MODULE "${CONFIG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake "${CONFIG_MODULE}") @@ -53,9 +61,12 @@ file(COPY ${SOURCE_PATH}/docs/LICENSE.TXT ${SOURCE_PATH}/docs/FTL.TXT ${SOURCE_PATH}/docs/GPLv2.TXT + ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype ) file(RENAME ${CURRENT_PACKAGES_DIR}/share/freetype/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/freetype/copyright) vcpkg_copy_pdbs() -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype) +endif() diff --git a/ports/freetype/vcpkg-cmake-wrapper.cmake b/ports/freetype/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..c08499f2d --- /dev/null +++ b/ports/freetype/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +_find_package(${ARGS})
+find_package(ZLIB)
+find_package(PNG)
+find_package(BZip2)
+if(TARGET Freetype::Freetype)
+ set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2 PNG::PNG ZLIB::ZLIB)
+endif()
+if(FREETYPE_LIBRARIES)
+ list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES})
+endif()
diff --git a/ports/freexl/portfile.cmake b/ports/freexl/portfile.cmake index 098a1dbec..ff8879fba 100644 --- a/ports/freexl/portfile.cmake +++ b/ports/freexl/portfile.cmake @@ -37,31 +37,35 @@ endif() ################ # Debug build ################ -message(STATUS "Building ${TARGET_TRIPLET}-dbg") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") -file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) -vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug -) -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") -vcpkg_copy_pdbs() + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + vcpkg_copy_pdbs() +endif() ################ # Release build ################ -message(STATUS "Building ${TARGET_TRIPLET}-rel") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") -file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) -vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-release -) -message(STATUS "Building ${TARGET_TRIPLET}-rel done") + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-release + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl RENAME copyright) @@ -74,8 +78,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) else() file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) + endif() endif() diff --git a/ports/gdal/CONTROL b/ports/gdal/CONTROL index b84dc29e1..c958ac671 100644 --- a/ports/gdal/CONTROL +++ b/ports/gdal/CONTROL @@ -1,4 +1,4 @@ Source: gdal -Version: 2.2.2 +Version: 2.2.2-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 diff --git a/ports/gdal/no-my-bool.patch b/ports/gdal/no-my-bool.patch new file mode 100644 index 000000000..1ed0279ee --- /dev/null +++ b/ports/gdal/no-my-bool.patch @@ -0,0 +1,13 @@ +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 --git a/ports/gdal/no-mysql-global-h.patch b/ports/gdal/no-mysql-global-h.patch new file mode 100644 index 000000000..57ff89ce3 --- /dev/null +++ b/ports/gdal/no-mysql-global-h.patch @@ -0,0 +1,13 @@ +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 new file mode 100644 index 000000000..951425386 --- /dev/null +++ b/ports/gdal/no-mysql-sys-h.patch @@ -0,0 +1,13 @@ +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 5ee981d6c..10e2ceab8 100644 --- a/ports/gdal/portfile.cmake +++ b/ports/gdal/portfile.cmake @@ -1,5 +1,5 @@ if (TRIPLET_SYSTEM_ARCH MATCHES "arm") - message(FATAL_ERROR " ARM is currently not supported.") + message(FATAL_ERROR "ARM is currently not supported.") endif() if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -16,12 +16,13 @@ vcpkg_download_distfile(ARCHIVE SHA512 b886238a7915c97f4acec5920dabe959d1ab15a8be0bc31ba0d05ad69d1d7d96f864faf0aa82921fa1a1b40b733744202b86f2f45ff63d6518cd18a53f3544a8 ) -# Extract source into archictecture specific directory, because GDALs' nmake based build currently does not +# 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) 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 @@ -29,6 +30,9 @@ foreach(BUILD_TYPE debug release) ${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}/no-my-bool.patch ) endforeach() diff --git a/ports/gdcm2/CONTROL b/ports/gdcm2/CONTROL index 073e6cbeb..6268c788f 100644 --- a/ports/gdcm2/CONTROL +++ b/ports/gdcm2/CONTROL @@ -1,4 +1,4 @@ Source: gdcm2 -Version: 2.8.4 +Version: 2.8.5 Description: Grassroots DICOM library Build-Depends: zlib, expat diff --git a/ports/gdcm2/portfile.cmake b/ports/gdcm2/portfile.cmake index bb0782ba4..7e8c89611 100644 --- a/ports/gdcm2/portfile.cmake +++ b/ports/gdcm2/portfile.cmake @@ -14,8 +14,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO malaterre/GDCM - REF v2.8.4 - SHA512 d58854507bcc477bcf7944c82014ceac4c603bf8f0e75ddda2371052f4972f1535cb782b47d0822a8929131b804ea5c16b9236b414d70cbf96a494741391c534 + REF v2.8.5 + SHA512 644a7ad04746ffb36b7923796b967cc11fd3b71baede7722093d5785eaf869280c67a968f6b32aeb43cc7c88927fba78459e4846e058996a1634311311745510 ) vcpkg_apply_patches( diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake index ef9f52563..33a7da3f4 100644 --- a/ports/gettext/portfile.cmake +++ b/ports/gettext/portfile.cmake @@ -1,10 +1,7 @@ -# 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} -# +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() #Based on https://github.com/winlibs/gettext diff --git a/ports/gflags/CONTROL b/ports/gflags/CONTROL index 72f2937b7..0a8d83aee 100644 --- a/ports/gflags/CONTROL +++ b/ports/gflags/CONTROL @@ -1,3 +1,3 @@ Source: gflags -Version: 2.2.1-2 +Version: 2.2.1-3 Description: A C++ library that implements commandline flags processing diff --git a/ports/gflags/portfile.cmake b/ports/gflags/portfile.cmake index 7e316c83b..31ffeafa5 100644 --- a/ports/gflags/portfile.cmake +++ b/ports/gflags/portfile.cmake @@ -25,11 +25,16 @@ vcpkg_configure_cmake( -DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF -DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF -DBUILD_gflags_nothreads_LIB:BOOL=OFF + -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gflags) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/gherkin-c/CONTROL b/ports/gherkin-c/CONTROL new file mode 100644 index 000000000..171dedae0 --- /dev/null +++ b/ports/gherkin-c/CONTROL @@ -0,0 +1,3 @@ +Source: gherkin-c
+Version: c-libs-e63e83104b
+Description: Gherkin parser/compiler in C
diff --git a/ports/gherkin-c/portfile.cmake b/ports/gherkin-c/portfile.cmake new file mode 100644 index 000000000..f229ba836 --- /dev/null +++ b/ports/gherkin-c/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO c-libs/gherkin-c
+ REF e63e83104b835e217140e9dc77d9ce2bb50f234e
+ SHA512 a99b3f695257b45df8ff7b8ec46bff28991cf2b9bc51a25247550471c724bd14ee64340db684f096131f47d7f4ff278d23dda546e7dfe29134bbc1dbccaf0d1e
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ OPTIONS
+ -DBUILD_GHERKIN_TESTS=OFF
+)
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+vcpkg_copy_pdbs()
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gherkin-c RENAME copyright)
diff --git a/ports/glew/portfile.cmake b/ports/glew/portfile.cmake index 79c669640..45f711f77 100644 --- a/ports/glew/portfile.cmake +++ b/ports/glew/portfile.cmake @@ -19,7 +19,15 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/glew") -foreach(FILE ${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake ${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-release.cmake) +set(_targets_cmake_files) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-release.cmake") +endif() + +foreach(FILE ${_targets_cmake_files}) file(READ ${FILE} _contents) string(REPLACE "libglew32" "glew32" _contents "${_contents}") file(WRITE ${FILE} "${_contents}") @@ -27,6 +35,8 @@ endforeach() if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib ${CURRENT_PACKAGES_DIR}/lib/glew32.lib) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/glew32d.lib) endif() diff --git a/ports/glibmm/portfile.cmake b/ports/glibmm/portfile.cmake index fd4853f55..7586c40a3 100644 --- a/ports/glibmm/portfile.cmake +++ b/ports/glibmm/portfile.cmake @@ -34,8 +34,7 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/glibmm.sln TARGET giomm PLATFORM ${VS_PLATFORM} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + USE_VCPKG_INTEGRATION ) # Handle headers diff --git a/ports/graphite2/disable-tests-docs.patch b/ports/graphite2/disable-tests-docs.patch new file mode 100644 index 000000000..ff92caa16 --- /dev/null +++ b/ports/graphite2/disable-tests-docs.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3466c5f..6d5c6bd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -63,9 +63,13 @@ endif (GRAPHITE2_VM_TYPE STREQUAL "direct" AND NOT (CMAKE_COMPILER_IS_GNUCXX OR
+ message(STATUS "Using vm machine type: ${GRAPHITE2_VM_TYPE}")
+
+ add_subdirectory(src)
++if(NOT DISABLE_TESTS)
+ add_subdirectory(tests)
++endif()
++if(NOT DISABLE_DOCS)
+ add_subdirectory(doc)
+-if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE))
++endif()
++if (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE) AND NOT DISABLE_TESTS)
+ add_subdirectory(gr2fonttest)
+ endif (NOT (GRAPHITE2_NSEGCACHE OR GRAPHITE2_NFILEFACE))
+
diff --git a/ports/graphite2/portfile.cmake b/ports/graphite2/portfile.cmake index 000817449..eb017e9d8 100644 --- a/ports/graphite2/portfile.cmake +++ b/ports/graphite2/portfile.cmake @@ -9,16 +9,24 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable-tests-docs.patch" +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DDISABLE_TESTS=ON + -DDISABLE_DOCS=ON ) vcpkg_install_cmake() vcpkg_copy_pdbs() -# file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/gr2fonttest.exe) -# file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/gr2fonttest.exe) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/graphite2) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/ports/gtest/CONTROL b/ports/gtest/CONTROL index f41aec0b9..e76e815c4 100644 --- a/ports/gtest/CONTROL +++ b/ports/gtest/CONTROL @@ -1,3 +1,3 @@ Source: gtest -Version: 1.8.0-6 +Version: 1.8.0-7 Description: GoogleTest and GoogleMock testing frameworks. diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake index b1f9e5dce..b5f3e58c8 100644 --- a/ports/gtest/portfile.cmake +++ b/ports/gtest/portfile.cmake @@ -25,6 +25,7 @@ vcpkg_configure_cmake( OPTIONS -DBUILD_GMOCK=ON -DBUILD_GTEST=ON + -DCMAKE_DEBUG_POSTFIX=d -Dgtest_force_shared_crt=${GTEST_FORCE_SHARED_CRT} ) @@ -60,12 +61,12 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/bin/gmock.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/bin/gmock_main.dll) endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.dll) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin/) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_main.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtestd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gtest_maind.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmockd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmockd.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_maind.dll) endif() if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) @@ -74,12 +75,12 @@ if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) endif() -if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.lib) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtestd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtestd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmockd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmockd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) endif() vcpkg_copy_pdbs() diff --git a/ports/gtkmm/portfile.cmake b/ports/gtkmm/portfile.cmake index c82bc597d..707e64a9b 100644 --- a/ports/gtkmm/portfile.cmake +++ b/ports/gtkmm/portfile.cmake @@ -34,8 +34,7 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/gtkmm.sln TARGET gtkmm PLATFORM ${VS_PLATFORM} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + USE_VCPKG_INTEGRATION ) # Handle headers diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index ff26bba07..f03f52187 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -1,4 +1,4 @@ Source: harfbuzz -Version: 1.7.5 +Version: 1.7.6 Description: HarfBuzz OpenType text shaping engine Build-Depends: freetype, ragel, glib (windows) diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 17d201bc1..b1c91aa91 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO behdad/harfbuzz - REF 1.7.5 - SHA512 c6e0e91203fdf3cbc8e4fd3c5d5cdb8fd8d0c87609b2c35433a42c92721a7f707612cad339eb4871cae8f7e129245e93f1509f21ca45a0a81d44225e2207cbdc + REF 1.7.6 + SHA512 90b51475d532377fe1686264a40f4a5555fc024f6984c1e3c114d8f4662e0c7f4a13e6a95e35fd5b3c54d1bb1b3cb97840b23f5ec2c6a799da61db1614b0fce3 HEAD_REF master ) diff --git a/ports/ilmbase/CONTROL b/ports/ilmbase/CONTROL index 2060d94d5..9e405df31 100644 --- a/ports/ilmbase/CONTROL +++ b/ports/ilmbase/CONTROL @@ -1,3 +1,3 @@ Source: ilmbase -Version: 2.2.0-1 +Version: 2.2.1-1 Description: Base libraries from ILM for OpenEXR diff --git a/ports/ilmbase/portfile.cmake b/ports/ilmbase/portfile.cmake index f81423afc..1752beb2c 100644 --- a/ports/ilmbase/portfile.cmake +++ b/ports/ilmbase/portfile.cmake @@ -2,8 +2,8 @@ if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "UWP build not supported") endif() -set(ILM_VERSION 2.2.0) -set(ILM_HASH 0bbad14ed2bd286dff3987b16ef8631470211da54f822cb3e29b7931807216845ded81c9bf41fd2d22a8b362e8b9904a5450f61f5a242e460083e86b846513f1) +set(ILM_VERSION 2.2.1) +set(ILM_HASH a08ddd9069b34a93612445a445a2ddf80c0e22349bcf221a3cc6e9f5575180b08a8b597009dacabf072360e7162e15964988bc79e8ec82cf3da6507148a75320) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ilmbase-${ILM_VERSION}) diff --git a/ports/jansson/CONTROL b/ports/jansson/CONTROL index d5fa4f546..6050b464d 100644 --- a/ports/jansson/CONTROL +++ b/ports/jansson/CONTROL @@ -1,3 +1,3 @@ Source: jansson -Version: 2.11 +Version: 2.11-2 Description: Jansson is a C library for encoding, decoding and manipulating JSON data diff --git a/ports/jansson/portfile.cmake b/ports/jansson/portfile.cmake index 034b4eb01..e243422fb 100644 --- a/ports/jansson/portfile.cmake +++ b/ports/jansson/portfile.cmake @@ -33,15 +33,17 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} - -DJANSSON_EXAMPLES=OFF - -DJANSSON_WITHOUT_TESTS=ON - -DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS} - -DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI} + -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} + -DJANSSON_EXAMPLES=OFF + -DJANSSON_WITHOUT_TESTS=ON + -DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS} + -DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI} + -DJANSSON_INSTALL_CMAKE_DIR:STRING=share/jansson ) -vcpkg_install_cmake(DISABLE_PARALLEL) -vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/jansson) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright) diff --git a/ports/jasper/opengl-not-required.patch b/ports/jasper/opengl-not-required.patch new file mode 100644 index 000000000..5c40a6b67 --- /dev/null +++ b/ports/jasper/opengl-not-required.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c432ba2..c67598f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -267,7 +267,9 @@ message("JAS_HAVE_LIBJPEG: ${JAS_HAVE_LIBJPEG}")
+ # Check for the OpenGL and GLUT libraries.
+ ################################################################################
+
++if(JAS_ENABLE_OPENGL)
+ find_package(OpenGL ${JAS_REQUIRED})
++endif()
+ message("JAS_ENABLE_OPENGL: ${JAS_ENABLE_OPENGL}")
+ message("OpenGL library found: ${OPENGL_FOUND}")
+ if (JAS_ENABLE_OPENGL AND OPENGL_FOUND)
diff --git a/ports/jasper/portfile.cmake b/ports/jasper/portfile.cmake index ee73c8cbd..6e753ed74 100644 --- a/ports/jasper/portfile.cmake +++ b/ports/jasper/portfile.cmake @@ -11,6 +11,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/jasper-fix-uwp.patch + ${CMAKE_CURRENT_LIST_DIR}/opengl-not-required.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) diff --git a/ports/jemalloc/fix-cmakelists.patch b/ports/jemalloc/fix-cmakelists.patch index a19cb4050..3ba70544c 100644 --- a/ports/jemalloc/fix-cmakelists.patch +++ b/ports/jemalloc/fix-cmakelists.patch @@ -35,7 +35,7 @@ index 06e83ef..229e17a 100644 ${PROJECT_BINARY_DIR}/Debug CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE @@ -754,6 +752,9 @@ if(WIN32) - COMPILE_PDB_NAME + COMPILE_PDB_NAME ${LIBJEMALLOCLIB} ) + if(NOT BUILD_SHARED_LIBS) diff --git a/ports/jemalloc/portfile.cmake b/ports/jemalloc/portfile.cmake index 3fe6fdbb7..527891666 100644 --- a/ports/jemalloc/portfile.cmake +++ b/ports/jemalloc/portfile.cmake @@ -20,6 +20,7 @@ vcpkg_apply_patches( ) vcpkg_configure_cmake( + DISABLE_PARALLEL_CONFIGURE SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS -DGIT_FOUND=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON diff --git a/ports/jsonnet/CONTROL b/ports/jsonnet/CONTROL index 5f92d26b6..f32796ca3 100644 --- a/ports/jsonnet/CONTROL +++ b/ports/jsonnet/CONTROL @@ -1,3 +1,3 @@ Source: jsonnet -Version: 2018-03-07 +Version: 2018-03-17 Description: Jsonnet - The data templating language diff --git a/ports/jsonnet/portfile.cmake b/ports/jsonnet/portfile.cmake index 5206bae7d..0041d7f2c 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 0759409780eec8cb3a7a8ced52f104c0d895ac38 - SHA512 725ac0f9c28e08ac9c694da305da87910fa672328bf77e799635c154f80031ff86c80901608ca379626f6810c590f5700fc1d6904cf3f3c1fde914c2b221f7f6 + REF 9829acf280a64b58ad0b14c9f5c28fe8564ed13e + SHA512 5ddcc3d6bc91467da766ba0ed81251066e348db14d1fdf681bdd6c08189249d1c221dab73cc6bdf85465217aeda186f2f5c0eee11bb179435a52ff57be12d20e HEAD_REF master ) diff --git a/ports/leptonica/CONTROL b/ports/leptonica/CONTROL index 6ca0bea56..2be42f327 100644 --- a/ports/leptonica/CONTROL +++ b/ports/leptonica/CONTROL @@ -1,4 +1,4 @@ Source: leptonica -Version: 1.74.4-2 +Version: 1.74.4-3 Description: An open source library containing software that is broadly useful for image processing and image analysis applications Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib diff --git a/ports/libcds/lib-suffix-option.patch b/ports/libcds/lib-suffix-option.patch new file mode 100644 index 000000000..eeb2f3e2e --- /dev/null +++ b/ports/libcds/lib-suffix-option.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e891aee..9f12295 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -125,7 +125,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+
+ if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64")
+ list(APPEND LIBCDS_PUBLIC_CXX_FLAGS "-mcx16")
+- set(LIB_SUFFIX "64")
++ set(LIB_SUFFIX "64" CACHE STRING "")
+
+ # GCC-7: 128-bit atomics support is implemented via libatomic on amd64
+ # see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html
diff --git a/ports/libcds/portfile.cmake b/ports/libcds/portfile.cmake index f13759c05..c3ba2ec65 100644 --- a/ports/libcds/portfile.cmake +++ b/ports/libcds/portfile.cmake @@ -10,7 +10,9 @@ vcpkg_from_github( vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/cmake-install.patch + ${CMAKE_CURRENT_LIST_DIR}/lib-suffix-option.patch ) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_INSTALL_STATIC) @@ -24,6 +26,7 @@ vcpkg_configure_cmake( -DENABLE_STRESS_TEST=OFF -DDISABLE_INSTALL_STATIC=${DISABLE_INSTALL_STATIC} -DDISABLE_INSTALL_SHARED=${DISABLE_INSTALL_SHARED} + "-DLIB_SUFFIX=" ) vcpkg_install_cmake() diff --git a/ports/libiconv/CMakeLists.txt b/ports/libiconv/CMakeLists.txt index be42843e3..95071be9d 100644 --- a/ports/libiconv/CMakeLists.txt +++ b/ports/libiconv/CMakeLists.txt @@ -30,18 +30,29 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) add_definitions(-DLIBDIR -D_CRT_SECURE_NO_WARNINGS) add_library(libcharset libcharset/lib/localcharset.c) +target_include_directories(libcharset PUBLIC $<INSTALL_INTERFACE:include>) add_library(libiconv lib/iconv.c) -target_link_libraries(libiconv libcharset) +target_link_libraries(libiconv PRIVATE libcharset) +target_include_directories(libiconv PUBLIC $<INSTALL_INTERFACE:include>) -install(TARGETS libcharset libiconv +install(TARGETS libcharset libiconv EXPORT unofficial-iconv-targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) -install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/iconv.h - ${CMAKE_CURRENT_BINARY_DIR}/localcharset.h - DESTINATION include -) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/iconv.h + ${CMAKE_CURRENT_BINARY_DIR}/localcharset.h + DESTINATION include + ) +endif() + +install( + EXPORT unofficial-iconv-targets + FILE unofficial-iconv-config.cmake + NAMESPACE unofficial::iconv:: + DESTINATION share/unofficial-iconv +)
\ No newline at end of file diff --git a/ports/libiconv/CONTROL b/ports/libiconv/CONTROL index aabc4a953..8bb9625b9 100644 --- a/ports/libiconv/CONTROL +++ b/ports/libiconv/CONTROL @@ -1,3 +1,3 @@ Source: libiconv -Version: 1.15-1 +Version: 1.15-2 Description: GNU Unicode text conversion diff --git a/ports/libiconv/portfile.cmake b/ports/libiconv/portfile.cmake index 79c30987c..bded180db 100644 --- a/ports/libiconv/portfile.cmake +++ b/ports/libiconv/portfile.cmake @@ -1,3 +1,10 @@ +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/libiconv) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv) + return() +endif() + include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libiconv-1.15) vcpkg_download_distfile(ARCHIVE @@ -20,14 +27,15 @@ vcpkg_apply_patches( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-iconv TARGET_PATH share/unofficial-iconv) + vcpkg_copy_pdbs() # Handle copyright file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libiconv) file(RENAME ${CURRENT_PACKAGES_DIR}/share/libiconv/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libiconv/copyright) - -# clean out the debug include -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
\ No newline at end of file diff --git a/ports/libiconv/vcpkg-iconv-config.cmake b/ports/libiconv/vcpkg-iconv-config.cmake new file mode 100644 index 000000000..4befd4d15 --- /dev/null +++ b/ports/libiconv/vcpkg-iconv-config.cmake @@ -0,0 +1,2 @@ +add_library(unofficial::vcpkg::libcharset UNKNOWN IMPORTED)
+add_library(unofficial::vcpkg::libiconv UNKNOWN IMPORTED)
diff --git a/ports/libidn2/CMakeLists.txt b/ports/libidn2/CMakeLists.txt index 9fbe1bcdd..a1eb9f9ce 100644 --- a/ports/libidn2/CMakeLists.txt +++ b/ports/libidn2/CMakeLists.txt @@ -2,9 +2,7 @@ cmake_minimum_required(VERSION 3.8) project(libidn2 C) -find_path(ICONV_INCLUDE_DIR iconv.h) -find_library(ICONV NAMES libiconv) -find_library(ICONV_CHARSET NAMES libcharset) +find_package(unofficial-iconv REQUIRED) set(CMAKE_DEBUG_POSTFIX "d") @@ -94,8 +92,8 @@ set(GL_SRC gl/rawmemchr.c add_library(libidn2 ${LIB_SRC} ${UNISTR_SRC} ${GL_SRC}) -target_include_directories(libidn2 PRIVATE . ./unistring ./gl ${ICONV_INCLUDE_DIR}) -target_link_libraries(libidn2 PRIVATE ${ICONV} ${ICONV_CHARSET}) +target_include_directories(libidn2 PRIVATE . ./unistring ./gl) +target_link_libraries(libidn2 PRIVATE unofficial::iconv::libiconv unofficial::iconv::libcharset) install(TARGETS libidn2 RUNTIME DESTINATION bin diff --git a/ports/libidn2/portfile.cmake b/ports/libidn2/portfile.cmake index bbe8f7bbe..98892e2c0 100644 --- a/ports/libidn2/portfile.cmake +++ b/ports/libidn2/portfile.cmake @@ -35,6 +35,7 @@ simple_copy_template_header(${SOURCE_PATH}/unistring alloca) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA ) vcpkg_install_cmake() diff --git a/ports/libjpeg-turbo/CONTROL b/ports/libjpeg-turbo/CONTROL index 2bb119dbc..fa72d68b0 100644 --- a/ports/libjpeg-turbo/CONTROL +++ b/ports/libjpeg-turbo/CONTROL @@ -1,3 +1,3 @@ Source: libjpeg-turbo -Version: 1.5.3 +Version: 1.5.3-1 Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/ports/libjpeg-turbo/linux-cmake.patch b/ports/libjpeg-turbo/linux-cmake.patch new file mode 100644 index 000000000..48a04279f --- /dev/null +++ b/ports/libjpeg-turbo/linux-cmake.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c29e604..6e467be 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -29,10 +29,6 @@ pad_number(VERSION_MINOR 3) + pad_number(VERSION_REVISION 3) + set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVISION}) + +-if(NOT WIN32) +- message(FATAL_ERROR "Platform not supported by this build system. Use autotools instead.") +-endif() +- + string(TIMESTAMP BUILD "%Y%m%d") + + # This does nothing except when using MinGW. CMAKE_BUILD_TYPE has no meaning +@@ -166,8 +162,10 @@ endif() + + if(64BIT) + message(STATUS "64-bit build") ++ add_compile_options(-DSIZEOF_SIZE_T=8) + else() + message(STATUS "32-bit build") ++ add_compile_options(-DSIZEOF_SIZE_T=4) + endif() + + if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) diff --git a/ports/libjpeg-turbo/portfile.cmake b/ports/libjpeg-turbo/portfile.cmake index a3c0e65b6..7f6bc4973 100644 --- a/ports/libjpeg-turbo/portfile.cmake +++ b/ports/libjpeg-turbo/portfile.cmake @@ -7,12 +7,20 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_download_distfile(GETENV_PATCH + URLS "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/bd96b30b74fe166fc94218cfc64a097fafdcc05f.diff" + FILENAME "libjpeg-turbo-bd96b30b74fe166fc94218cfc64a097fafdcc05f.diff" + SHA512 4cd064521b5e4baba4adf972f9f574f6dd43a2cd3e3ad143ca2cdf0f165024406d4fd2ed094124d0c17c5370394140e82fdd892d3cdc49609acdf8f79db1758c +) + vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-options-for-exes-docs-headers.patch" + "${CMAKE_CURRENT_LIST_DIR}/linux-cmake.patch" + "${GETENV_PATCH}" ) -if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF) else() set(LIBJPEGTURBO_SIMD -DWITH_SIMD=ON) @@ -21,6 +29,10 @@ else() set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") endif() +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(ENV{_CL_} "-DNO_GETENV -DNO_PUTENV") +endif() + string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) @@ -41,7 +53,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() # Rename libraries for static builds -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND EXISTS "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib") file(RENAME "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/jpeg.lib") file(RENAME "${CURRENT_PACKAGES_DIR}/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/turbojpeg.lib") file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib") diff --git a/ports/liblzma/CMakeLists.txt b/ports/liblzma/CMakeLists.txt index e51b034bd..2c809a5aa 100644 --- a/ports/liblzma/CMakeLists.txt +++ b/ports/liblzma/CMakeLists.txt @@ -7,7 +7,59 @@ if(BUILD_SHARED_LIBS) add_definitions(-DDLL_EXPORT) endif() -include_directories(windows) +if(NOT MSVC) + add_definitions(-DHAVE_VISIBILITY=1) +endif() + +if(WIN32) + include_directories(windows) +else() + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h + """ +#define TUKLIB_SYMBOL_PREFIX lzma_ +#define ASSUME_RAM 128 +#define HAVE_CHECK_CRC32 1 +#define HAVE_CHECK_CRC64 1 +#define HAVE_CHECK_SHA256 1 +#define HAVE_DECODERS 1 +#define HAVE_DECODER_ARM 1 +#define HAVE_DECODER_ARMTHUMB 1 +#define HAVE_DECODER_DELTA 1 +#define HAVE_DECODER_IA64 1 +#define HAVE_DECODER_LZMA1 1 +#define HAVE_DECODER_LZMA2 1 +#define HAVE_DECODER_POWERPC 1 +#define HAVE_DECODER_SPARC 1 +#define HAVE_DECODER_X86 1 +#define HAVE_ENCODERS 1 +#define HAVE_ENCODER_ARM 1 +#define HAVE_ENCODER_ARMTHUMB 1 +#define HAVE_ENCODER_DELTA 1 +#define HAVE_ENCODER_IA64 1 +#define HAVE_ENCODER_LZMA1 1 +#define HAVE_ENCODER_LZMA2 1 +#define HAVE_ENCODER_POWERPC 1 +#define HAVE_ENCODER_SPARC 1 +#define HAVE_ENCODER_X86 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_MF_BT2 1 +#define HAVE_MF_BT3 1 +#define HAVE_MF_BT4 1 +#define HAVE_MF_HC3 1 +#define HAVE_MF_HC4 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_VISIBILITY 1 +#define MYTHREAD_POSIX 1 +#define PACKAGE_NAME \"XZ Utils\" +#define PACKAGE_URL \"http://tukaani.org/xz/\" +#define SIZEOF_SIZE_T (sizeof(size_t)) +""") +endif() include_directories(src/liblzma/common) include_directories(src/common) include_directories(src/liblzma/api) diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index 3aca7afb3..4486564f6 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -1,24 +1,24 @@ -if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h")
- message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.")
+if (EXISTS "${CURRENT_INSTALLED_DIR}/share/libmysql")
+ message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.")
endif()
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mariadb-connector-c-3.0.2)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/MariaDB/mariadb-connector-c/archive/v3.0.2.tar.gz"
- FILENAME "mariadb-connector-c-3.0.2.tar.gz"
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO MariaDB/mariadb-connector-c
+ REF v3.0.2
SHA512 a5086ff149b1ca0e1b652013475c5f3793824416a60ec35018b6dcd502bd38b50fa040271ff8d308520dadecc9601671fccf67046fcda2425f1d7c59e1c6c52f
+ HEAD_REF master
)
-vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- OPTIONS
- -DWITH_UNITTEST=OFF
- -DWITH_SSL=OFF
- -DWITH_CURL=OFF
+ OPTIONS
+ -DWITH_UNITTEST=OFF
+ -DWITH_SSL=OFF
+ -DWITH_CURL=OFF
)
vcpkg_install_cmake()
@@ -28,47 +28,47 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # fix libmariadb lib & dll directory.
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/lib/mariadb/mariadbclient.lib
- ${CURRENT_PACKAGES_DIR}/lib/mariadbclient.lib)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/mariadbclient.lib
- ${CURRENT_PACKAGES_DIR}/debug/lib/mariadbclient.lib)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/lib/mariadb/mariadbclient.lib
+ ${CURRENT_PACKAGES_DIR}/lib/mariadbclient.lib)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/mariadbclient.lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/mariadbclient.lib)
else()
- file(MAKE_DIRECTORY
- ${CURRENT_PACKAGES_DIR}/bin
- ${CURRENT_PACKAGES_DIR}/debug/bin)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.dll
- ${CURRENT_PACKAGES_DIR}/bin/libmariadb.dll)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.dll
- ${CURRENT_PACKAGES_DIR}/debug/bin/libmariadb.dll)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.lib
- ${CURRENT_PACKAGES_DIR}/lib/libmariadb.lib)
- file(RENAME
- ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.lib
- ${CURRENT_PACKAGES_DIR}/debug/lib/libmariadb.lib)
+ file(MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/bin
+ ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.dll
+ ${CURRENT_PACKAGES_DIR}/bin/libmariadb.dll)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.dll
+ ${CURRENT_PACKAGES_DIR}/debug/bin/libmariadb.dll)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.lib
+ ${CURRENT_PACKAGES_DIR}/lib/libmariadb.lib)
+ file(RENAME
+ ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib/libmariadb.lib)
endif()
# remove plugin folder
file(REMOVE_RECURSE
- ${CURRENT_PACKAGES_DIR}/lib/plugin
- ${CURRENT_PACKAGES_DIR}/debug/lib/plugin
- ${CURRENT_PACKAGES_DIR}/lib/mariadb
- ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb)
+ ${CURRENT_PACKAGES_DIR}/lib/plugin
+ ${CURRENT_PACKAGES_DIR}/debug/lib/plugin
+ ${CURRENT_PACKAGES_DIR}/lib/mariadb
+ ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb)
# copy & remove header files
file(GLOB HEADER_FILES ${CURRENT_PACKAGES_DIR}/include/mariadb/*)
file(REMOVE
- ${CURRENT_PACKAGES_DIR}/include/mariadb/my_config.h.in
- ${CURRENT_PACKAGES_DIR}/include/mariadb/mysql_version.h.in
- ${CURRENT_PACKAGES_DIR}/include/mariadb/CMakeLists.txt
- ${CURRENT_PACKAGES_DIR}/include/mariadb/Makefile.am)
+ ${CURRENT_PACKAGES_DIR}/include/mariadb/my_config.h.in
+ ${CURRENT_PACKAGES_DIR}/include/mariadb/mysql_version.h.in
+ ${CURRENT_PACKAGES_DIR}/include/mariadb/CMakeLists.txt
+ ${CURRENT_PACKAGES_DIR}/include/mariadb/Makefile.am)
file(RENAME
- ${CURRENT_PACKAGES_DIR}/include/mariadb
- ${CURRENT_PACKAGES_DIR}/include/mysql)
+ ${CURRENT_PACKAGES_DIR}/include/mariadb
+ ${CURRENT_PACKAGES_DIR}/include/mysql)
# copy license file
file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmariadb)
diff --git a/ports/libmysql/CONTROL b/ports/libmysql/CONTROL index 8350014e4..6f856c607 100644 --- a/ports/libmysql/CONTROL +++ b/ports/libmysql/CONTROL @@ -1,3 +1,4 @@ Source: libmysql -Version: 5.7.17-3 +Version: 8.0.4-2 +Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, liblzma, lz4, zlib Description: A MySQL client library for C development. diff --git a/ports/libmysql/boost_and_build.patch b/ports/libmysql/boost_and_build.patch deleted file mode 100644 index 7fce8ffc5..000000000 --- a/ports/libmysql/boost_and_build.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 44842d3..e34ab24 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -452,7 +452,7 @@ ELSE() - SET(DEFAULT_TMPDIR "\"${TMPDIR}\"") - ENDIF() - --INCLUDE(cmake/boost.cmake) -+#INCLUDE(cmake/boost.cmake) - - IF (CMAKE_SYSTEM_NAME MATCHES "Linux") - OPTION(WITH_SYSTEMD "Enable installation of systemd support files" OFF) -diff --git a/client/dump/CMakeLists.txt b/client/dump/CMakeLists.txt -index bae2ce7..4e11516 100644 ---- a/client/dump/CMakeLists.txt -+++ b/client/dump/CMakeLists.txt -@@ -21,12 +21,12 @@ INCLUDE_DIRECTORIES( - ${CMAKE_SOURCE_DIR}/dump - ) - --IF (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") -+#IF (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") - IF (WITHOUT_SERVER) - MESSAGE(STATUS "Not building mysqlpump") - RETURN() - ENDIF() --ENDIF() -+#ENDIF() - - # Prevent Boost from including external precompiled Boost libraries, use - # threading (not implemented for older Solaris Studio compilers) -diff --git a/mysys/mysys_priv.h b/mysys/mysys_priv.h -index 8b7a554..4353037 100644 ---- a/mysys/mysys_priv.h -+++ b/mysys/mysys_priv.h -@@ -18,6 +18,7 @@ - - #include "my_global.h" - #include "mysql/psi/mysql_thread.h" -+#include "my_sys.h" - - #ifdef HAVE_PSI_INTERFACE - diff --git a/ports/libmysql/ignore-boost-version.patch b/ports/libmysql/ignore-boost-version.patch new file mode 100644 index 000000000..ea7111ded --- /dev/null +++ b/ports/libmysql/ignore-boost-version.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/boost.cmake b/cmake/boost.cmake
+index 2851181..8788322 100644
+--- a/cmake/boost.cmake
++++ b/cmake/boost.cmake
+@@ -280,7 +280,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10)
+ COULD_NOT_FIND_BOOST()
+ ENDIF()
+
+-IF(NOT BOOST_MINOR_VERSION EQUAL 65)
++IF(NOT BOOST_MINOR_VERSION EQUAL 65 AND NOT IGNORE_BOOST_VERSION)
+ MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} "
+ "we need 65"
+ )
diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake index dee383a81..0e7b69edf 100644 --- a/ports/libmysql/portfile.cmake +++ b/ports/libmysql/portfile.cmake @@ -6,22 +6,29 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "libmysql cannot currently be cross-compiled for UWP") endif() +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT CMAKE_SYSTEM_NAME OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Oracle has dropped support in libmysql for 32-bit Windows.") +endif() + include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mysql/mysql-server - REF mysql-5.7.17 - SHA512 31488972e08a6b83f88e6e3f7923aca91e01eac702f4942fdae92e13f66d92ac86c24dfe7a65a001db836c900147d1c3871b36af8cbb281a0e6c555617cac12c + REF mysql-8.0.4 + SHA512 8d9129e7670e88df14238299052a5fe6d4f3e40bf27ef7a3ca8f4f91fb40507b13463e9bd24435b34e5d06c5d056dfb259fb04e77cc251b188eea734db5642be HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - ${CMAKE_CURRENT_LIST_DIR}/boost_and_build.patch + ${CMAKE_CURRENT_LIST_DIR}/ignore-boost-version.patch + ${CMAKE_CURRENT_LIST_DIR}/system-libs.patch ) +file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_65_0) + set(STACK_DIRECTION) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") set(STACK_DIRECTION -DSTACK_DIRECTION=-1) @@ -29,6 +36,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS -DWITHOUT_SERVER=ON -DWITH_UNIT_TESTS=OFF @@ -37,9 +45,16 @@ vcpkg_configure_cmake( -DHAVE_LLVM_LIBCPP_EXITCODE=1 ${STACK_DIRECTION} -DWINDOWS_RUNTIME_MD=ON # Note: this disables _replacement_ of /MD with /MT. If /MT is specified, it will be preserved. + -DIGNORE_BOOST_VERSION=ON + -DWITH_SSL=system + -DWITH_ICU=system + -DWITH_LIBEVENT=system + -DWITH_LZMA=system + -DWITH_LZ4=system + -DWITH_ZLIB=system ) -vcpkg_install_cmake() +vcpkg_install_cmake(ADD_BIN_TO_PATH) # delete debug headers file(REMOVE_RECURSE @@ -62,9 +77,9 @@ file(REMOVE_RECURSE # remove misc files file(REMOVE - ${CURRENT_PACKAGES_DIR}/COPYING + ${CURRENT_PACKAGES_DIR}/LICENSE ${CURRENT_PACKAGES_DIR}/README - ${CURRENT_PACKAGES_DIR}/debug/COPYING + ${CURRENT_PACKAGES_DIR}/debug/LICENSE ${CURRENT_PACKAGES_DIR}/debug/README) # remove not-related libs @@ -94,6 +109,10 @@ else() file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) endif() +file(READ ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h _contents) +string(REPLACE "#include <mysql/udf_registration_types.h>" "#include \"mysql/udf_registration_types.h\"" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h "${_contents}") + # copy license -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/COPYING ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright)
\ No newline at end of file +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright)
\ No newline at end of file diff --git a/ports/libmysql/system-libs.patch b/ports/libmysql/system-libs.patch new file mode 100644 index 000000000..b5c1cba0d --- /dev/null +++ b/ports/libmysql/system-libs.patch @@ -0,0 +1,150 @@ +diff --git a/cmake/icu.cmake b/cmake/icu.cmake
+index ce9cc67..64445c5 100644
+--- a/cmake/icu.cmake
++++ b/cmake/icu.cmake
+@@ -40,49 +40,10 @@ SET(DEFAULT_ICU "bundled")
+ # install_root is either 'system' or is assumed to be a path.
+ #
+ MACRO (FIND_ICU install_root)
+- IF("${install_root}" STREQUAL "system")
+- SET(EXTRA_FIND_LIB_ARGS)
+- SET(EXTRA_FIND_INC_ARGS)
+- ELSE()
+- SET(EXTRA_FIND_LIB_ARGS HINTS "${install_root}"
+- PATH_SUFFIXES "lib" "lib64" NO_DEFAULT_PATH)
+- SET(EXTRA_FIND_INC_ARGS HINTS "${install_root}"
+- PATH_SUFFIXES "include" NO_DEFAULT_PATH)
+- ENDIF()
+-
+- FIND_PATH(ICU_INCLUDE_DIR NAMES unicode/regex.h ${EXTRA_FIND_INC_ARGS})
+- IF (NOT ICU_INCLUDE_DIR)
+- MESSAGE(FATAL_ERROR "Cannot find ICU regular expression headers")
+- ENDIF()
+-
+- IF(WIN32)
+- SET(ICU_LIBS icuuc icuio icudt icuin)
+- ELSE()
+- SET(ICU_LIBS icuuc icuio icudata icui18n)
+- ENDIF()
+-
+- SET(ICU_SYSTEM_LIBRARIES)
+- FOREACH(ICU_LIB ${ICU_LIBS})
+- UNSET(ICU_LIB_PATH CACHE)
+- FIND_LIBRARY(ICU_LIB_PATH NAMES ${ICU_LIB} ${EXTRA_FIND_LIB_ARGS})
+- IF(NOT ICU_LIB_PATH)
+- MESSAGE(FATAL_ERROR "Cannot find the ICU library ${ICU_LIB}")
+- ENDIF()
+- LIST(APPEND ICU_SYSTEM_LIBRARIES ${ICU_LIB_PATH})
+- ENDFOREACH()
+-
+- # To do: If we include the path in ICU_INCLUDE_DIR, it leads to GUnit
+- # picking up the wrong regex.h header. And it looks like we don't need it;
+- # at least on Linux, the header gets installed in an OS path anyway.
+- IF(NOT "${install_root}" STREQUAL "system")
+- SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
+- ENDIF()
+-
+- SET(ICU_LIBRARIES ${ICU_SYSTEM_LIBRARIES})
+-
+- # Needed for version information.
+- SET(ICU_COMMON_DIR ${ICU_INCLUDE_DIR})
+-
++ find_package(ICU REQUIRED COMPONENTS uc io dt in)
++ set(ICU_SYSTEM_LIBRARIES ICU::uc ICU::io ICU::dt ICU::in)
++ set(ICU_COMMON_DIR ${ICU_INCLUDE_DIR})
++ SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR})
+ ENDMACRO()
+
+ MACRO (MYSQL_USE_BUNDLED_ICU)
+diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake
+index 6e576c3..60cb8ba 100644
+--- a/cmake/lz4.cmake
++++ b/cmake/lz4.cmake
+@@ -25,7 +25,7 @@
+
+ MACRO (FIND_SYSTEM_LZ4)
+ FIND_PATH(PATH_TO_LZ4 NAMES lz4frame.h)
+- FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4)
++ FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4d lz4)
+ IF (PATH_TO_LZ4 AND LZ4_SYSTEM_LIBRARY)
+ SET(SYSTEM_LZ4_FOUND 1)
+ INCLUDE_DIRECTORIES(SYSTEM ${PATH_TO_LZ4})
+diff --git a/cmake/lzma.cmake b/cmake/lzma.cmake
+index ac8aaa7..78d8e8d 100644
+--- a/cmake/lzma.cmake
++++ b/cmake/lzma.cmake
+@@ -24,15 +24,10 @@
+ # bundled is the default
+
+ MACRO (FIND_SYSTEM_LZMA)
+- FIND_PATH(PATH_TO_LZMA NAMES lzma/lzma.h)
+- FIND_LIBRARY(LZMA_SYSTEM_LIBRARY NAMES lzma)
+- IF (PATH_TO_LZMA AND LZMA_SYSTEM_LIBRARY)
+- SET(SYSTEM_LZMA_FOUND 1)
+- SET(LZMA_INCLUDE_DIR ${PATH_TO_LZMA})
+- SET(LZMA_LIBRARY ${LZMA_SYSTEM_LIBRARY})
+- MESSAGE(STATUS "LZMA_INCLUDE_DIR ${LZMA_INCLUDE_DIR}")
+- MESSAGE(STATUS "LZMA_LIBRARY ${LZMA_LIBRARY}")
+- ENDIF()
++ find_package(LibLZMA REQUIRED)
++ set(LZMA_INCLUDE_DIR ${LZMA_INCLUDE_DIRS})
++ set(LZMA_LIBRARY ${LZMA_LIBRARIES})
++ set(SYSTEM_LZMA_FOUND 1)
+ ENDMACRO()
+
+ MACRO (MYSQL_USE_BUNDLED_LZMA)
+diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake
+index 8af9699..2bdfe14 100644
+--- a/cmake/ssl.cmake
++++ b/cmake/ssl.cmake
+@@ -104,6 +104,16 @@ ENDMACRO()
+ # Provides the following configure options:
+ # WITH_SSL=[yes|bundled|system|<path/to/custom/installation>]
+ MACRO (MYSQL_CHECK_SSL)
++ find_package(OpenSSL REQUIRED)
++ set(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY} CACHE STRING "")
++ set(CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE STRING "")
++ FIND_PROGRAM(OPENSSL_EXECUTABLE openssl
++ DOC "path to the openssl executable")
++ SET(SSL_DEFINES "-DHAVE_OPENSSL")
++ set(SSL_LIBRARIES ${OPENSSL_LIBRARIES})
++ENDMACRO()
++
++MACRO (MYSQL_CHECK_SSL_OLD)
+ IF(NOT WITH_SSL)
+ IF(WIN32)
+ CHANGE_SSL_SETTINGS("bundled")
+diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake
+index e74b8c9..6695075 100644
+--- a/cmake/zlib.cmake
++++ b/cmake/zlib.cmake
+@@ -51,27 +51,7 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
+ IF(WITH_ZLIB STREQUAL "bundled")
+ MYSQL_USE_BUNDLED_ZLIB()
+ ELSE()
+- SET(ZLIB_FIND_QUIETLY TRUE)
+- INCLUDE(FindZLIB)
+- IF(ZLIB_FOUND)
+- INCLUDE(CheckFunctionExists)
+- SET(CMAKE_REQUIRED_LIBRARIES z)
+- CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32)
+- CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND)
+- CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND)
+- SET(CMAKE_REQUIRED_LIBRARIES)
+- IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND)
+- SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES} CACHE INTERNAL "System zlib library")
+- SET(WITH_ZLIB "system" CACHE STRING
+- "Which zlib to use (possible values are 'bundled' or 'system')")
+- SET(ZLIB_SOURCES "")
+- ELSE()
+- SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable")
+- MESSAGE(STATUS "system zlib found but not usable")
+- ENDIF()
+- ENDIF()
+- IF(NOT ZLIB_FOUND)
+- MYSQL_USE_BUNDLED_ZLIB()
+- ENDIF()
++ find_package(ZLIB REQUIRED)
++ SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library")
+ ENDIF()
+ ENDMACRO()
diff --git a/ports/libpng/CONTROL b/ports/libpng/CONTROL index 89ea07065..1eec4f2dc 100644 --- a/ports/libpng/CONTROL +++ b/ports/libpng/CONTROL @@ -1,4 +1,4 @@ Source: libpng -Version: 1.6.34-2 +Version: 1.6.34-3 Build-Depends: zlib Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. diff --git a/ports/libpng/portfile.cmake b/ports/libpng/portfile.cmake index 4273846e9..0c9f8ab0b 100644 --- a/ports/libpng/portfile.cmake +++ b/ports/libpng/portfile.cmake @@ -12,6 +12,7 @@ vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES ${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch + ${CMAKE_CURRENT_LIST_DIR}/skip-install-symlink.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) @@ -32,15 +33,20 @@ vcpkg_configure_cmake( -DSKIP_INSTALL_PROGRAMS=ON -DSKIP_INSTALL_EXECUTABLES=ON -DSKIP_INSTALL_FILES=ON + -DSKIP_INSTALL_SYMLINK=ON OPTIONS_DEBUG -DSKIP_INSTALL_HEADERS=ON ) vcpkg_install_cmake() -if(VCPKG_LIBRARY_LINKAGE STREQUAL static) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpng16_static.lib ${CURRENT_PACKAGES_DIR}/lib/libpng16.lib) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libpng16d.lib) + endif() endif() # Remove CMake config files as they are incorrectly generated and everyone uses built-in FindPNG anyway. diff --git a/ports/libpng/skip-install-symlink.patch b/ports/libpng/skip-install-symlink.patch new file mode 100644 index 000000000..c31177d7e --- /dev/null +++ b/ports/libpng/skip-install-symlink.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 48c6fa2..589e5f9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -868,7 +868,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+- if(PNG_SHARED)
++ if(PNG_SHARED AND NOT SKIP_INSTALL_SYMLINK)
+ # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
+ if(CYGWIN OR MINGW)
+ CREATE_SYMLINK(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
+@@ -881,7 +881,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+ endif(NOT WIN32)
+ endif(PNG_SHARED)
+
+- if(PNG_STATIC)
++ if(PNG_STATIC AND NOT SKIP_INSTALL_SYMLINK)
+ if(NOT WIN32 OR CYGWIN OR MINGW)
+ CREATE_SYMLINK( libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static)
+ install(FILES $<TARGET_LINKER_FILE_DIR:png_static>/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/ports/libpq/CMakeLists.txt b/ports/libpq/CMakeLists.txt index 54e929a5b..35a67118a 100644 --- a/ports/libpq/CMakeLists.txt +++ b/ports/libpq/CMakeLists.txt @@ -3,11 +3,13 @@ project(libpq VERSION 9.6.1 LANGUAGES C) find_package(OpenSSL REQUIRED) set(CMAKE_DEBUG_POSTFIX "d") -configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config.h.win32 ${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config.h) -configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_ext.h.win32 ${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_ext.h) -configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/port/win32.h ${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_os.h) -file(WRITE src/interfaces/libpq/pg_config_paths.h "#define SYSCONFDIR \"\"") +configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config.h) +configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/pg_config_ext.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h) +configure_file(${CMAKE_CURRENT_LIST_DIR}/src/include/port/win32.h ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_os.h) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_paths.h "#define SYSCONFDIR \"\"") + set(INSTALL_INCLUDES ON CACHE BOOL "Install include files") + set(pg_port_src src/port/getaddrinfo.c src/port/pgstrcasecmp.c @@ -53,8 +55,8 @@ set(pg_libpq_src ) set(pg_libpq_interface src/include/postgres_ext.h - src/include/pg_config_ext.h - src/include/pg_config.h + ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config_ext.h + ${CMAKE_CURRENT_BINARY_DIR}/include/pg_config.h src/interfaces/libpq/libpq-fe.h ) set(pg_libpq_catalog_interface @@ -67,14 +69,15 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) add_library(libpq ${pg_port_src} ${pg_backend_src} ${pg_libpq_src}) target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -D_CRT_SECURE_NO_WARNINGS) target_link_libraries(libpq PRIVATE OpenSSL::SSL ws2_32 secur32 advapi32 shell32) -target_include_directories(libpq PRIVATE src/include src/include/port/win32 src/include/port/win32_msvc src/port) +target_include_directories(libpq PRIVATE src/include src/include/port/win32 src/include/port/win32_msvc src/port ${CMAKE_CURRENT_BINARY_DIR}/include) set_target_properties(libpq PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) install(TARGETS libpq ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin - ) +) + if(INSTALL_INCLUDES) install(FILES ${pg_libpq_interface} DESTINATION include) install(DIRECTORY src/include/libpq DESTINATION include) diff --git a/ports/libpq/portfile.cmake b/ports/libpq/portfile.cmake index d98ce9a8a..2d14204fa 100644 --- a/ports/libpq/portfile.cmake +++ b/ports/libpq/portfile.cmake @@ -6,9 +6,12 @@ vcpkg_download_distfile(ARCHIVE SHA512 97141972e154e6b0e756ee6a4e20f26e82022a9fd4c56305314a3a5567a79ece638e4ac3d513b46138737ae6bd27a098f30013a94767db151181aac9c01290a1 ) vcpkg_extract_source_archive(${ARCHIVE}) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DINSTALL_INCLUDES=OFF ) diff --git a/ports/librsync/CONTROL b/ports/librsync/CONTROL new file mode 100644 index 000000000..b51be6105 --- /dev/null +++ b/ports/librsync/CONTROL @@ -0,0 +1,3 @@ +Source: librsync
+Version: 2.0.2
+Description: librsync is a library for calculating and applying network deltas, with an interface designed to ease integration into diverse network applications.
diff --git a/ports/librsync/portfile.cmake b/ports/librsync/portfile.cmake new file mode 100644 index 000000000..0f9cfad55 --- /dev/null +++ b/ports/librsync/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO librsync/librsync
+ REF v2.0.2
+ SHA512 5d2bc1d62b37e9ed7416203615d0a0e3c05c4c884b5da63eda10dd5c985845b500331bce226e4d45676729382c85b41528282e25d491afda31ba434ac0fefad7
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS -DBUILD_RDIFF:BOOL=OFF
+ -DENABLE_COMPRESSION:BOOL=OFF
+ -DENABLE_TRACE:BOOL=OFF
+ -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS:BOOL=ON
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/rsync.dll)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/lib/rsync.dll ${CURRENT_PACKAGES_DIR}/bin/rsync.dll)
+endif()
+if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll)
+ file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rsync.dll)
+endif()
+
+file(INSTALL
+ ${SOURCE_PATH}/COPYING
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/librsync RENAME copyright
+)
+
+vcpkg_copy_pdbs()
diff --git a/ports/librtmp/CMakeLists.txt b/ports/librtmp/CMakeLists.txt index f0f78e5f1..9751f3d73 100644 --- a/ports/librtmp/CMakeLists.txt +++ b/ports/librtmp/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.8) project(librtmp C) -find_package(zlib REQUIRED) -find_package(openssl REQUIRED) +find_package(ZLIB REQUIRED) +find_package(OpenSSL REQUIRED) include_directories(${ZLIB_INCLUDE_DIRS}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/ports/librtmp/CONTROL b/ports/librtmp/CONTROL index 9a93c8b47..957f5ee16 100644 --- a/ports/librtmp/CONTROL +++ b/ports/librtmp/CONTROL @@ -1,4 +1,4 @@ Source: librtmp -Version: 2.4 +Version: 2.4-1 Build-Depends: zlib, openssl Description: RTMPDump Real-Time Messaging Protocol API diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake index 2a2834096..1c5cfed19 100644 --- a/ports/libspatialite/portfile.cmake +++ b/ports/libspatialite/portfile.cmake @@ -60,32 +60,36 @@ set(LIBS_ALL_REL ################ # Debug build ################ -message(STATUS "Building ${TARGET_TRIPLET}-dbg") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") -file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) -vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - "INST_DIR=\"${INST_DIR_DBG}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug -) -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") -vcpkg_copy_pdbs() + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + "INST_DIR=\"${INST_DIR_DBG}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + vcpkg_copy_pdbs() +endif() ################ # Release build ################ -message(STATUS "Building ${TARGET_TRIPLET}-rel") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") -file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) -vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - "INST_DIR=\"${INST_DIR_REL}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-release -) -message(STATUS "Building ${TARGET_TRIPLET}-rel done") + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + "INST_DIR=\"${INST_DIR_REL}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-release + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -99,8 +103,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) else() file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) + endif() endif() message(STATUS "Packaging ${TARGET_TRIPLET} done") diff --git a/ports/libssh/CONTROL b/ports/libssh/CONTROL index 9ae256937..5f3c8a0db 100644 --- a/ports/libssh/CONTROL +++ b/ports/libssh/CONTROL @@ -1,4 +1,4 @@ Source: libssh -Version: 0.7.5-1 -Description:libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side +Version: 0.7.5-4 +Description: libssh is a multiplatform C library implementing the SSHv2 and SSHv1 protocol on client and server side Build-Depends: zlib, openssl diff --git a/ports/libssh/build-one-flavor.patch b/ports/libssh/build-one-flavor.patch new file mode 100644 index 000000000..96e20ba98 --- /dev/null +++ b/ports/libssh/build-one-flavor.patch @@ -0,0 +1,20 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 1012ddf..612f0ba 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -225,6 +225,7 @@ include_directories(
+ ${LIBSSH_PRIVATE_INCLUDE_DIRS}
+ )
+
++if (NOT WITH_STATIC_LIB)
+ add_library(${LIBSSH_SHARED_LIBRARY} SHARED ${libssh_SRCS})
+
+ target_link_libraries(${LIBSSH_SHARED_LIBRARY} ${LIBSSH_LINK_LIBRARIES})
+@@ -259,6 +260,7 @@ install(
+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ COMPONENT libraries
+ )
++endif()
+
+ if (WITH_STATIC_LIB)
+ add_library(${LIBSSH_STATIC_LIBRARY} STATIC ${libssh_SRCS})
diff --git a/ports/libssh/only-one-flavor-threads.patch b/ports/libssh/only-one-flavor-threads.patch new file mode 100644 index 000000000..31b3e1f36 --- /dev/null +++ b/ports/libssh/only-one-flavor-threads.patch @@ -0,0 +1,21 @@ +diff --git a/src/threads/CMakeLists.txt b/src/threads/CMakeLists.txt
+index 2ab4e1b..a47620b 100644
+--- a/src/threads/CMakeLists.txt
++++ b/src/threads/CMakeLists.txt
+@@ -59,6 +59,7 @@ include_directories(
+ if (libssh_threads_SRCS)
+ set(LIBSSH_THREADS ON CACHE "libssh threads lib" INTERNAL)
+
++ if (NOT WITH_STATIC_LIB)
+ add_library(${LIBSSH_THREADS_SHARED_LIBRARY} SHARED ${libssh_threads_SRCS})
+
+ target_link_libraries(${LIBSSH_THREADS_SHARED_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES})
+@@ -89,7 +90,7 @@ if (libssh_threads_SRCS)
+ COMPONENT libraries
+ )
+
+- if (WITH_STATIC_LIB)
++ else (WITH_STATIC_LIB)
+ add_library(${LIBSSH_THREADS_STATIC_LIBRARY} STATIC ${libssh_threads_SRCS})
+
+ if (MSVC)
diff --git a/ports/libssh/portfile.cmake b/ports/libssh/portfile.cmake index 8cac84063..49c927c22 100644 --- a/ports/libssh/portfile.cmake +++ b/ports/libssh/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "WindowsStore not supported") + message(FATAL_ERROR "WindowsStore not supported") endif() set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libssh-0.7.5) vcpkg_download_distfile(ARCHIVE @@ -11,24 +11,48 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/build-one-flavor.patch + ${CMAKE_CURRENT_LIST_DIR}/only-one-flavor-threads.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" WITH_STATIC_LIB) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DWITH_STATIC_LIB=ON - + OPTIONS + -DWITH_STATIC_LIB=${WITH_STATIC_LIB} + -DWITH_EXAMPLES=OFF + -DWITH_TESTING=OFF + -DWITH_NACL=OFF + -DWITH_GSSAPI=OFF ) vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/libssh") - if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(INSTALL ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) - file(INSTALL ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/lib/ssh.lib) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/static/ssh.lib ${CURRENT_PACKAGES_DIR}/debug/lib/ssh.lib) + endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + + file(READ ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h _contents) + string(REPLACE "#ifdef LIBSSH_STATIC" "#if 1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h "${_contents}") endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/static ${CURRENT_PACKAGES_DIR}/debug/lib/static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# The installed cmake config files are nonfunctional (0.7.5) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/lib/cmake) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh RENAME copyright) diff --git a/ports/libusb-win32/portfile.cmake b/ports/libusb-win32/portfile.cmake index bab7675a0..a93b39bca 100644 --- a/ports/libusb-win32/portfile.cmake +++ b/ports/libusb-win32/portfile.cmake @@ -1,7 +1,7 @@ include(vcpkg_common_functions) -if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) - message(FATAL_ERROR "Error: UWP builds are currently not supported.") +if (VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "Error: only Windows Desktop builds are currently supported.") endif() set(LIBUSB_VERSION 1.2.6.0) diff --git a/ports/libusb/CONTROL b/ports/libusb/CONTROL index de5fe82b4..722cf9090 100644 --- a/ports/libusb/CONTROL +++ b/ports/libusb/CONTROL @@ -1,3 +1,3 @@ Source: libusb Version: 1.0.21-fc99620 -Description: A library for USB device access from Windows userspace. +Description: a cross-platform library to access USB devices diff --git a/ports/libwebsockets/CONTROL b/ports/libwebsockets/CONTROL index 50db40c85..e6b595e0d 100644 --- a/ports/libwebsockets/CONTROL +++ b/ports/libwebsockets/CONTROL @@ -1,4 +1,4 @@ Source: libwebsockets -Version: 2.4.1 +Version: 2.4.2 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 ca6c49a73..79a96007e 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.1 - SHA512 a5f6a3388517d6f46183dfd1e625475ac1d4d509690e431a581d6ca927078fa50ac9a0787b4305fe088c694af1809335020bfc083a4d4d98585143f13ff61c75 + REF v2.4.2 + SHA512 7bee49f6763ff3ab7861fcda25af8d80f6757c56e197ea42be53e0b2480969eee73de3aee5198f5ff06fd1cb8ab2be4c6495243e83cd0acc235b0da83b2353d1 HEAD_REF master ) diff --git a/ports/libxml2/CMakeLists.txt b/ports/libxml2/CMakeLists.txt index 02cccd6c7..96ecb901d 100644 --- a/ports/libxml2/CMakeLists.txt +++ b/ports/libxml2/CMakeLists.txt @@ -5,8 +5,10 @@ option(INSTALL_HEADERS "Install public header files" ON) find_package(ZLIB REQUIRED) find_package(LibLZMA REQUIRED) -find_library(ICONV NAMES libiconv) -find_library(ICONV_CHARSET NAMES libcharset) +if(WIN32) + find_library(ICONV NAMES libiconv) + find_library(ICONV_CHARSET NAMES libcharset) +endif() set(SOURCES buf.c @@ -79,17 +81,24 @@ target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} win32/vc1 target_link_libraries(libxml2 PRIVATE ZLIB::ZLIB ${LIBLZMA_LIBRARIES} - ${ICONV} - ${ICONV_CHARSET} - wsock32.lib - ws2_32.lib ) +if(WIN32) + target_link_libraries(libxml2 PRIVATE + ${ICONV} + ${ICONV_CHARSET} + wsock32.lib + ws2_32.lib + ) + target_compile_definitions(libxml2 PRIVATE + -DHAVE_WIN32_THREADS + ) +endif() + target_compile_definitions(libxml2 PRIVATE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_REENTRANT -DNOLIBTOOL - -DHAVE_WIN32_THREADS -DHAVE_ZLIB_H -DHAVE_LZMA_H ) diff --git a/ports/libxml2/CONTROL b/ports/libxml2/CONTROL index ce430ceff..b8552e48e 100644 --- a/ports/libxml2/CONTROL +++ b/ports/libxml2/CONTROL @@ -1,4 +1,4 @@ Source: libxml2 -Version: 2.9.4-2 +Version: 2.9.4-4 Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) Build-Depends: zlib, libiconv, liblzma diff --git a/ports/libxml2/portfile.cmake b/ports/libxml2/portfile.cmake index d50183f1d..a300fcaf5 100644 --- a/ports/libxml2/portfile.cmake +++ b/ports/libxml2/portfile.cmake @@ -1,11 +1,3 @@ -# 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/libxml2-2.9.4) vcpkg_download_distfile(ARCHIVE @@ -30,3 +22,7 @@ file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxm file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxml2/COPYING ${CURRENT_PACKAGES_DIR}/share/libxml2/copyright) vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2) +endif() diff --git a/ports/libxml2/vcpkg-cmake-wrapper.cmake b/ports/libxml2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..6452af426 --- /dev/null +++ b/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS})
+if(LibXml2_FOUND AND (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))
+ find_package(LibLZMA)
+ list(APPEND LIBXML2_LIBRARIES
+ ${LIBLZMA_LIBRARIES}
+ debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libiconv.lib
+ optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libiconv.lib
+ debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/libcharset.lib
+ optimized ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/libcharset.lib
+ ws2_32)
+endif()
diff --git a/ports/libzip/CONTROL b/ports/libzip/CONTROL index f827f4d71..450687f4f 100644 --- a/ports/libzip/CONTROL +++ b/ports/libzip/CONTROL @@ -1,4 +1,4 @@ Source: libzip -Version: 1.4.0-1 +Version: rel-1-5-0 Build-Depends: zlib Description: A library for reading, creating, and modifying zip archives. diff --git a/ports/libzip/portfile.cmake b/ports/libzip/portfile.cmake index 5c1f02704..dee085f6c 100644 --- a/ports/libzip/portfile.cmake +++ b/ports/libzip/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO nih-at/libzip - REF ad1f02d3b2aac532a89cbf8fd21f55677789b82d - SHA512 b1ed427916ec555ead454d39a244502f64bbc8799c20394944797b878196f1b9a9dda64be218fe89bb1747c841d7b36e8e7fb7b0be1fbdf777f049cd823635d6 + REF rel-1-5-0 + SHA512 d8267dd86231d82e0d14fc3e47c7deed3f54bccbc734dff12a7e2522422653f64ebdb76b35b9eb4326227ae89e06bd4cad263558c8312220ff5979b3b2299460 ) # Patch cmake and configuration to allow static builds diff --git a/ports/lz4/CONTROL b/ports/lz4/CONTROL index ae7d57377..4a0f53689 100644 --- a/ports/lz4/CONTROL +++ b/ports/lz4/CONTROL @@ -1,3 +1,3 @@ Source: lz4
-Version: 1.8.1.2
+Version: 1.8.1.2-1
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 1928d7e70..6150a35e6 100644 --- a/ports/lz4/portfile.cmake +++ b/ports/lz4/portfile.cmake @@ -12,7 +12,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG
- -DLZ4_SKIP_INCLUDES=ON)
+ -DLZ4_SKIP_INCLUDES=ON
+ -DCMAKE_DEBUG_POSTFIX=d)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
diff --git a/ports/matio/CMakeLists.txt b/ports/matio/CMakeLists.txt index 31b7e1e2b..6c21bbf53 100644 --- a/ports/matio/CMakeLists.txt +++ b/ports/matio/CMakeLists.txt @@ -30,9 +30,8 @@ find_package(ZLIB REQUIRED) target_link_libraries(libmatio PRIVATE ZLIB::ZLIB) target_compile_definitions(libmatio PRIVATE -DHAVE_ZLIB=1) -find_package(HDF5 REQUIRED) -target_include_directories(libmatio PRIVATE ${HDF5_INCLUDE_DIRS} ) -target_link_libraries(libmatio PRIVATE ${HDF5_C_LIBRARIES}) +find_package(hdf5 CONFIG REQUIRED) +target_link_libraries(libmatio PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared) if(BUILD_SHARED_LIBS) target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_DYNAMIC_LIB) else() diff --git a/ports/matio/CONTROL b/ports/matio/CONTROL index e3d0082f7..7c891c035 100644 --- a/ports/matio/CONTROL +++ b/ports/matio/CONTROL @@ -1,4 +1,4 @@ Source: matio -Version: 1.5.11 +Version: 1.5.12 Description: MATLAB MAT File I/O Library Build-Depends: zlib, hdf5 diff --git a/ports/matio/portfile.cmake b/ports/matio/portfile.cmake index 5752e635c..86d5b6a1f 100644 --- a/ports/matio/portfile.cmake +++ b/ports/matio/portfile.cmake @@ -2,17 +2,16 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tbeu/matio - REF v1.5.11 - SHA512 f500475e80cdb52a4754c49e900a34c0b540a5c64f353287e6b85b0c16156b251fe8088f2ed584af5a4d0916e98fddf73a3799e7c045ab859298687038e6d513 + REF v1.5.12 + SHA512 3bf6d2bf6460531dd2a740813bca3f3da6347b9fadb39803257f11bcceeaa7cf6657921c9ca9c8db02bf2020d5adf2ecf544b2455aa0ca897c0644493b1902a4 HEAD_REF master ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) - - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON ) diff --git a/ports/mpark-variant/CONTROL b/ports/mpark-variant/CONTROL new file mode 100644 index 000000000..d6cbf380e --- /dev/null +++ b/ports/mpark-variant/CONTROL @@ -0,0 +1,3 @@ +Source: mpark-variant +Version: 1.3.0 +Description: an implementation of C++17 std::variant for C++11/14/17. diff --git a/ports/mpark-variant/portfile.cmake b/ports/mpark-variant/portfile.cmake new file mode 100644 index 000000000..b400507ee --- /dev/null +++ b/ports/mpark-variant/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mpark/variant + REF v1.3.0 + SHA512 53735d14a9b241d93191fa3b7ac8ed8fb17a8f8766318b2817c4dd1948088377190ca168027a297bae41bb2cc1f6043fe51752d43b8c33badcc9f2df9fa08ece + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mpark_variant TARGET_PATH share/mpark_variant) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpark-variant RENAME copyright) diff --git a/ports/mpg123/CONTROL b/ports/mpg123/CONTROL index f72437453..7eba5e9b8 100644 --- a/ports/mpg123/CONTROL +++ b/ports/mpg123/CONTROL @@ -1,3 +1,3 @@ Source: mpg123 -Version: 1.25.8-2 +Version: 1.25.8-3 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 diff --git a/ports/ms-gsl/CONTROL b/ports/ms-gsl/CONTROL index c30927bb4..bc4ac2d1d 100644 --- a/ports/ms-gsl/CONTROL +++ b/ports/ms-gsl/CONTROL @@ -1,3 +1,3 @@ Source: ms-gsl -Version: 2018-03-07 +Version: 2018-03-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 45c41f79c..c2ce611df 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 c9e423d7cf2afb88672e31f55e4b30c53be7aae3 - SHA512 a6ea1897b931068384c0dad768202a0314f130cfc30fc6cc8307df14ac02c1842e196d87e30e85e1e3b48295f4f47780a5b3e7123937cb3c8efa9e3e10a596ed + REF d846fe50a3f0bb7767c7e087a05f4be95f4da0ec + SHA512 83560cb0c39b6a4781e916c6081ad2728296e1b19760ca1b6426a8431fb6d7093760a882c539dd77152f5892fe081b1795af6366ea91385bb10aba6adf27170f HEAD_REF master ) diff --git a/ports/msmpi/CONTROL b/ports/msmpi/CONTROL index a7f9f38ef..27e27074a 100644 --- a/ports/msmpi/CONTROL +++ b/ports/msmpi/CONTROL @@ -1,3 +1,3 @@ Source: msmpi -Version: 8.1 +Version: 9.0 Description: Microsoft MPI diff --git a/ports/msmpi/portfile.cmake b/ports/msmpi/portfile.cmake index 0992f5f5d..7933f2361 100644 --- a/ports/msmpi/portfile.cmake +++ b/ports/msmpi/portfile.cmake @@ -2,16 +2,16 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/msmpi-8.1) vcpkg_download_distfile(SDK_ARCHIVE - URLS "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/msmpisdk.msi" - FILENAME "msmpisdk-8.1.msi" - SHA512 a0cfb713865257b812c19644286fc0d02ec57ce2a0bea066fead4e0ff18b545a0787065ab748f8dd335bb2fa486911aab54c1b842993b7b685c5832c014a63bf + URLS "https://download.microsoft.com/download/2/E/C/2EC96D7F-687B-4613-80F6-E10F670A2D97/msmpisdk.msi" + FILENAME "msmpisdk-9.0.msi" + SHA512 f80cc7619c42a5a0975224c5a0ab6d4085a97ab9a1480318cd72db2f600db52fb81d3959a2a9e0dbd9412b02d0814b8191dd4745bbde397110210e05960628b4 ) macro(download_msmpi_redistributable_package) vcpkg_download_distfile(REDIST_ARCHIVE - URLS "https://download.microsoft.com/download/D/B/B/DBB64BA1-7B51-43DB-8BF1-D1FB45EACF7A/MSMpiSetup.exe" - FILENAME "MSMpiSetup-8.1.exe" - SHA512 92ae65f3d52e786e39dffedabdf48255b4985a075993e626f5f59674e9ffaedbf33a4725e8f142b21468e24cd6d3e49f3d91da0fbda1867784cc93300c12c96b + URLS "https://download.microsoft.com/download/2/E/C/2EC96D7F-687B-4613-80F6-E10F670A2D97/msmpisetup.exe" + FILENAME "msmpisetup-9.0.exe" + SHA512 ad1cc3bc74e4c9c3c0f304395df9468e729e0acd9c77c8c6c806e88eadf4693811d29e608ffb459fcb6f4a20f61946ef4ac2e411aac49fb8f8d5aaddd10d4554 ) endmacro() @@ -20,7 +20,7 @@ endmacro() # We always want the ProgramFiles folder even on a 64-bit machine (not the ProgramFilesx86 folder) vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe") -set(MSMPI_EXPECTED_FULL_VERSION "8.1.12438") +set(MSMPI_EXPECTED_FULL_VERSION "9.0.12497") if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}") set(MPIEXEC_VERSION_LOGNAME "mpiexec-version") @@ -31,7 +31,6 @@ if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}") ) file(READ ${CURRENT_BUILDTREES_DIR}/${MPIEXEC_VERSION_LOGNAME}-out.log MPIEXEC_OUTPUT) - # Note: v8.1.1 was released with version 8.1.12438.1091. This is compatible with 8.1.12438.1084 (the version above), so ignore the fourth version number. if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+)\\.[0-9]+\\]") if(NOT CMAKE_MATCH_1 STREQUAL MSMPI_EXPECTED_FULL_VERSION) download_msmpi_redistributable_package() diff --git a/ports/nanomsg/CONTROL b/ports/nanomsg/CONTROL new file mode 100644 index 000000000..c39df5e95 --- /dev/null +++ b/ports/nanomsg/CONTROL @@ -0,0 +1,4 @@ +Source: nanomsg +Version: 1.1.2 +Description: a simple high-performance implementation of several "scalability protocols". + These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket. diff --git a/ports/nanomsg/portfile.cmake b/ports/nanomsg/portfile.cmake new file mode 100644 index 000000000..a869baea4 --- /dev/null +++ b/ports/nanomsg/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nanomsg/nanomsg + REF 1.1.2 + SHA512 f95ce24b34c25d139cf3de46585f6354e0311a9d5e7135ad71df62b8bb5df26f81a58b9773c39c320df2d0e97cd2905a8576f9f00b0a4d33774f1b610271cee5 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" NN_STATIC_LIB) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE + -DNN_STATIC_LIB=${NN_STATIC_LIB} + -DNN_TESTS=OFF + -DNN_TOOLS=OFF + -DNN_ENABLE_DOC=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h _contents) + string(REPLACE "defined(NN_STATIC_LIB)" "1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h "${_contents}") +endif() + +file(INSTALL + ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanomsg RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL index d32991c0d..b0eee2bf9 100644 --- a/ports/nlohmann-json/CONTROL +++ b/ports/nlohmann-json/CONTROL @@ -1,3 +1,3 @@ Source: nlohmann-json -Version: 3.1.0 +Version: 3.1.2 Description: JSON for Modern C++ diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake index b186db817..44f7a86dc 100644 --- a/ports/nlohmann-json/portfile.cmake +++ b/ports/nlohmann-json/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_VERSION 3.1.0) +set(SOURCE_VERSION 3.1.2) vcpkg_download_distfile(HEADER URLS "https://github.com/nlohmann/json/releases/download/v${SOURCE_VERSION}/json.hpp" FILENAME "nlohmann-json-${SOURCE_VERSION}.hpp" - SHA512 710a92f065cc7fc873db2e08158f285390b9ac38f1b0bc6bbfd9e52597574749fe1e90b114d3d750fcc9f79d7d53530242e57135d60675b35c23d1f948ad7ef2 + SHA512 05df0ad3338f0bca885c0aa9da523922b99016986a9b01426b13888c0febd83bf1f6f063886f6c75f8a656ef79abac6292fe442dc05b1897d546ba5b70be48a5 ) vcpkg_download_distfile(LICENSE diff --git a/ports/nuklear/CONTROL b/ports/nuklear/CONTROL index 8874d2787..c9a4c23a5 100644 --- a/ports/nuklear/CONTROL +++ b/ports/nuklear/CONTROL @@ -1,3 +1,3 @@ Source: nuklear -Version: 2018-03-07 +Version: 2018-03-20 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 f052ee266..833a34692 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 905b41f640d5ec901a99d343c95e97104292c2d9 - SHA512 b5d671950f411a99a4f7b0017550cc9448c2ab5743256c949895945664d914b78e35f931c4986d863563391cbee11185b94a03c86737cdbb4b3c4e63e0fdc383 + REF 94c0412a086110dc801d83c20be7cb4e89dbd5d1 + SHA512 882bce080ca15a9b789289ceda987f1154df1800fd1428cf1d14db5704caf9ed3842ec1fe345db9548fe5305aa8f8721ddd53e75294b896c8caad061d29ec95a HEAD_REF master ) file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/nvml/CONTROL b/ports/nvml/CONTROL new file mode 100644 index 000000000..8bf941bd3 --- /dev/null +++ b/ports/nvml/CONTROL @@ -0,0 +1,3 @@ +Source: nvml +Version: 1.3-0 +Description: Non-Volatile Memory Library
\ No newline at end of file diff --git a/ports/nvml/portfile.cmake b/ports/nvml/portfile.cmake new file mode 100644 index 000000000..9e51c2bda --- /dev/null +++ b/ports/nvml/portfile.cmake @@ -0,0 +1,74 @@ + +set(NVML_VERSION 1.3) +set(NVML_HASH 59fb552c693d5279ec86eff8eb1c36832c9c5beb6492a64b54b21c09d90ed52cba22d57912a304cf1ec17c4633da641200fd50dbe4a38355f43c674842f991bd) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${NVML_VERSION}) + +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(STATUS "WARNING: Static building not supported. Building dynamic.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +if (TRIPLET_SYSTEM_ARCH MATCHES "arm") + message(FATAL_ERROR "ARM is currently not supported") +elseif (TRIPLET_SYSTEM_ARCH MATCHES "x86") + message(FATAL_ERROR "x86 is not supported. Please use nvml:x64-windows or set environment variable VCPKG_DEFAULT_TRIPLET to 'x64-windows'") +else () + set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) +endif() + +# Download source +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pmem/nvml + REF ${NVML_VERSION} + SHA512 ${NVML_HASH} + HEAD_REF master +) + +# Build only the selected projects +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/src/NVML.sln + PLATFORM x64 + TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmempool,Solution Items\\libvmem,Solution Items\\Tools\\pmempool" + OPTIONS /p:SRCVERSION=${NVML_VERSION} +) + +set(DEBUG_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Debug) +set(RELEASE_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Release) + +# Install header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj) +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj++/*.hpp) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj++) +# Remove unneeded header files +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libvmmalloc.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/librpmem.h) + +# Install libraries (debug) +file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.lib ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.exp) +file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libpmemcommon.lib) +file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/lib[pv]mem*.dll) +file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Install libraries (release) +file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.lib ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.exp) +file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libpmemcommon.lib) +file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/lib[pv]mem*.dll) +file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + +# Install tools (release only) +file(INSTALL ${RELEASE_ARTIFACTS_PATH}/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/nvml) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/nvml) + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvml) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvml/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvml/copyright) diff --git a/ports/nvtt/CONTROL b/ports/nvtt/CONTROL new file mode 100644 index 000000000..31ff5ecf4 --- /dev/null +++ b/ports/nvtt/CONTROL @@ -0,0 +1,3 @@ +Source: nvtt
+Version: 2.1.0
+Description: Texture processing tools with support for Direct3D 10 and 11 formats.
\ No newline at end of file diff --git a/ports/nvtt/portfile.cmake b/ports/nvtt/portfile.cmake new file mode 100644 index 000000000..237a71b65 --- /dev/null +++ b/ports/nvtt/portfile.cmake @@ -0,0 +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}
+#
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported yet. Building static.")
+ set(VCPKG_LIBRARY_LINKAGE static)
+endif()
+
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO castano/nvidia-texture-tools
+ REF 2.1.0
+ SHA512 6c5c9588af57023fc384de080cbe5c5ccd8707d04a9533384c606efd09730d780cb21bcf2d3576102a3facd2f281cacb2625958d74575e71550fd98da92e38b6
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DNVTT_SHARED=0
+)
+
+vcpkg_install_cmake()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
+ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
+endif()
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+# Handle copyright
+file(REMOVE ${CURRENT_PACKAGES_DIR}/share/doc/nvtt/LICENSE)
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvtt)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvtt/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvtt/copyright)
diff --git a/ports/ogre/CONTROL b/ports/ogre/CONTROL index 1533b8e8d..f7d93e7b2 100644 --- a/ports/ogre/CONTROL +++ b/ports/ogre/CONTROL @@ -1,5 +1,5 @@ Source: ogre -Version: 1.10.9-2 +Version: 1.10.11 Build-Depends: freeimage, freetype, zlib, zziplib Description: 3D Object-Oriented Graphics Rendering Engine diff --git a/ports/opencv/0001-winrt-fixes.patch b/ports/opencv/0001-winrt-fixes.patch index c52c662e1..f913d92a4 100644 --- a/ports/opencv/0001-winrt-fixes.patch +++ b/ports/opencv/0001-winrt-fixes.patch @@ -1,23 +1,6 @@ -From 005963d571f95fc536f60aa77098b9ecbb17128c Mon Sep 17 00:00:00 2001 -From: Robert Schumacher <roschuma@microsoft.com> -Date: Wed, 21 Feb 2018 17:03:30 -0800 -Subject: [PATCH 1/5] winrt-fixes - ---- - CMakeLists.txt | 2 +- - cmake/OpenCVCompilerOptions.cmake | 3 +++ - cmake/OpenCVModule.cmake | 2 +- - modules/core/src/utils/filesystem.cpp | 14 ++++++++++++-- - modules/highgui/include/opencv2/highgui/highgui_winrt.hpp | 1 + - modules/highgui/src/window_winrt_bridge.hpp | 1 + - modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp | 4 ++-- - 7 files changed, 21 insertions(+), 6 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4464441..6bfbecd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -296,7 +296,7 @@ OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binar +@@ -311,7 +311,7 @@ OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binar # OpenCV build options # =================================================== OCV_OPTION(ENABLE_CCACHE "Use ccache" (UNIX AND NOT IOS AND (CMAKE_GENERATOR MATCHES "Makefile" OR CMAKE_GENERATOR MATCHES "Ninja")) ) @@ -26,104 +9,45 @@ index 4464441..6bfbecd 100644 OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs" (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) ) OCV_OPTION(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF IF CMAKE_COMPILER_IS_GNUCXX ) OCV_OPTION(ENABLE_COVERAGE "Enable coverage collection with GCov" OFF IF CMAKE_COMPILER_IS_GNUCXX ) -diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake -index 353ee12..8f4aa3b 100644 ---- a/cmake/OpenCVCompilerOptions.cmake -+++ b/cmake/OpenCVCompilerOptions.cmake -@@ -37,6 +37,9 @@ if(MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "Flags used by the compiler during all build types." FORCE) - endif() -+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /ZW") -+ endif() - endif() - - set(OPENCV_EXTRA_FLAGS "") -diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake -index a84bbff..8feb6df 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake -@@ -785,7 +785,7 @@ macro(ocv_create_module) +@@ -842,7 +842,7 @@ macro(ocv_create_module) set(the_module_target ${the_module}) endif() - + - if(WINRT) + if(WINRT AND BUILD_TESTS) # removing APPCONTAINER from modules to run from console # in case of usual starting of WinRT test apps output is missing # so starting of console version w/o APPCONTAINER is required to get test results -diff --git a/modules/core/src/utils/filesystem.cpp b/modules/core/src/utils/filesystem.cpp -index 266a92f..1d5a302 100644 ---- a/modules/core/src/utils/filesystem.cpp -+++ b/modules/core/src/utils/filesystem.cpp -@@ -186,7 +186,7 @@ bool createDirectory(const cv::String& path) - wchar_t wpath[MAX_PATH]; - size_t copied = mbstowcs(wpath, path.c_str(), MAX_PATH); - CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); -- int result = CreateDirectoryA(wpath, NULL) ? 0 : -1; -+ int result = CreateDirectoryW(wpath, NULL) ? 0 : -1; - #else - int result = _mkdir(path.c_str()); - #endif -@@ -248,8 +248,16 @@ struct FileLock::Impl - int numRetries = 5; - do - { -+#ifdef WINRT -+ wchar_t wpath[MAX_PATH]; -+ size_t copied = mbstowcs(wpath, fname, MAX_PATH); -+ CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1)); -+ handle = ::CreateFile2(wpath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, -+ OPEN_EXISTING, NULL); -+#else - handle = ::CreateFileA(fname, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); -+#endif - if (INVALID_HANDLE_VALUE == handle) - { - if (ERROR_SHARING_VIOLATION == GetLastError()) -@@ -399,7 +407,9 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu - if (cache_path.empty()) - { - cv::String default_cache_path; --#ifdef _WIN32 -+#if WINRT -+ // no defaults -+#elif defined _WIN32 - char tmp_path_buf[MAX_PATH+1] = {0}; - DWORD res = GetTempPath(MAX_PATH, tmp_path_buf); - if (res > 0 && res <= MAX_PATH) -diff --git a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp -index f4147f3..b92efdd 100644 --- a/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp +++ b/modules/highgui/include/opencv2/highgui/highgui_winrt.hpp @@ -24,6 +24,7 @@ // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. - + +#include "opencv2/core/cvdef.h" using namespace Windows::UI::Xaml::Controls; - + namespace cv diff --git a/modules/highgui/src/window_winrt_bridge.hpp b/modules/highgui/src/window_winrt_bridge.hpp index 25f4aef..5429f0b 100644 --- a/modules/highgui/src/window_winrt_bridge.hpp +++ b/modules/highgui/src/window_winrt_bridge.hpp @@ -28,6 +28,7 @@ - + #include <map> #include <opencv2\core.hpp> +#include "opencv2/highgui/highgui_c.h" - + using namespace Windows::UI::Xaml::Controls; - + diff --git a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp index 236e227..e2417dc 100644 --- a/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp +++ b/modules/videoio/src/cap_winrt/CaptureFrameGrabber.cpp @@ -94,10 +94,10 @@ Media::CaptureFrameGrabber::~CaptureFrameGrabber() - + void Media::CaptureFrameGrabber::ShowCameraSettings() { -#if WINAPI_FAMILY!=WINAPI_FAMILY_PHONE_APP @@ -135,6 +59,3 @@ index 236e227..e2417dc 100644 } #endif } --- -2.15.1.windows.2 - diff --git a/ports/opencv/0002-install-options.patch b/ports/opencv/0002-install-options.patch index 6351ceeb8..830c9f385 100644 --- a/ports/opencv/0002-install-options.patch +++ b/ports/opencv/0002-install-options.patch @@ -1,22 +1,6 @@ -From 5d4d154117b39d9e11fda709ede7aadf6b960a7d Mon Sep 17 00:00:00 2001 -From: Robert Schumacher <roschuma@microsoft.com> -Date: Wed, 21 Feb 2018 17:05:16 -0800 -Subject: [PATCH 2/5] install-options - ---- - CMakeLists.txt | 20 +++++++++++--------- - cmake/OpenCVGenConfig.cmake | 4 ++-- - cmake/OpenCVGenHeaders.cmake | 8 ++++++-- - cmake/OpenCVModule.cmake | 4 +++- - data/CMakeLists.txt | 6 ++++-- - include/CMakeLists.txt | 16 +++++++++------- - 6 files changed, 35 insertions(+), 23 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6bfbecd..0156eeb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -292,6 +292,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) +@@ -307,6 +307,10 @@ OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF ) OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID ) OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF IF (UNIX AND NOT ANDROID AND NOT APPLE_FRAMEWORK AND BUILD_SHARED_LIBS) ) OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binaries and test data" OFF) @@ -24,21 +8,21 @@ index 6bfbecd..0156eeb 100644 +OCV_OPTION(INSTALL_LICENSE "Install license file" ON) +OCV_OPTION(INSTALL_OTHER "Install other files" ON) +OCV_OPTION(INSTALL_FORCE_UNIX_PATHS "Force unix-style installation" OFF) - + # OpenCV build options # =================================================== -@@ -319,7 +323,7 @@ OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON ) +@@ -335,7 +339,7 @@ OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON ) OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF ) OCV_OPTION(CV_TRACE "Enable OpenCV code trace" ON) - + -OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (${BUILD_DOCS} OR ${BUILD_EXAMPLES}) IF (NOT CMAKE_CROSSCOMPILING AND NOT APPLE_FRAMEWORK) ) +OCV_OPTION(ENABLE_PYLINT "Add target with Pylint checks" (BUILD_DOCS OR BUILD_EXAMPLES) IF (NOT CMAKE_CROSSCOMPILING AND NOT APPLE_FRAMEWORK) ) - + if(ENABLE_IMPL_COLLECTION) add_definitions(-DCV_COLLECT_IMPL_DATA) -@@ -355,7 +359,9 @@ else() +@@ -372,7 +376,9 @@ else() endif() - + if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) + if(DEFINED OpenCV_DISABLE_ARCH_PATH) @@ -47,9 +31,9 @@ index 6bfbecd..0156eeb 100644 ocv_update(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") else() message(STATUS "Can't detect runtime and/or arch") -@@ -409,12 +415,8 @@ else() +@@ -427,12 +433,8 @@ else() ocv_update(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}") - + if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - if(OpenCV_STATIC) - ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") @@ -59,32 +43,30 @@ index 6bfbecd..0156eeb 100644 - ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") + ocv_update(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") + ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") - ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native) + ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH samples) ocv_update(OPENCV_JAR_INSTALL_PATH java) ocv_update(OPENCV_OTHER_INSTALL_PATH etc) -@@ -856,7 +858,7 @@ if(NOT OPENCV_LICENSE_FILE) +@@ -895,7 +897,7 @@ if(NOT OPENCV_LICENSE_FILE) endif() - + # for UNIX it does not make sense as LICENSE and readme will be part of the package automatically -if(ANDROID OR NOT UNIX) +if(ANDROID OR NOT UNIX AND INSTALL_LICENSE) install(FILES ${OPENCV_LICENSE_FILE} PERMISSIONS OWNER_READ GROUP_READ WORLD_READ DESTINATION ./ COMPONENT libs) -diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake -index 57c79f2..23f1012 100644 --- a/cmake/OpenCVGenConfig.cmake +++ b/cmake/OpenCVGenConfig.cmake -@@ -103,7 +103,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) +@@ -105,7 +105,7 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) endif() endfunction() - + -if((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) +if(((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) OR INSTALL_FORCE_UNIX_PATHS) ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "" "") endif() - -@@ -115,7 +115,7 @@ endif() + +@@ -117,7 +117,7 @@ endif() # -------------------------------------------------------------------------------------------- # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages # -------------------------------------------------------------------------------------------- @@ -93,8 +75,6 @@ index 57c79f2..23f1012 100644 if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows) if(BUILD_SHARED_LIBS) set(_lib_suffix "lib") -diff --git a/cmake/OpenCVGenHeaders.cmake b/cmake/OpenCVGenHeaders.cmake -index 477b910..beace28 100644 --- a/cmake/OpenCVGenHeaders.cmake +++ b/cmake/OpenCVGenHeaders.cmake @@ -1,7 +1,9 @@ @@ -105,22 +85,20 @@ index 477b910..beace28 100644 +if(INSTALL_HEADERS) + install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +endif() - + # platform-specific config file ocv_compiler_optimization_fill_cpu_config() @@ -29,4 +31,6 @@ set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE #endforeach() - + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp") -install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +if(INSTALL_HEADERS) + install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev) +endif() -diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake -index 8feb6df..1a098c4 100644 --- a/cmake/OpenCVModule.cmake +++ b/cmake/OpenCVModule.cmake -@@ -930,7 +930,9 @@ macro(_ocv_create_module) +@@ -994,7 +994,9 @@ macro(_ocv_create_module) foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS}) string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}") if(NOT hdr2 MATCHES "private" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" ) @@ -131,25 +109,21 @@ index 8feb6df..1a098c4 100644 endif() endforeach() endif() -diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt -index 1f0d720..86b9d89 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,8 +1,10 @@ file(GLOB HAAR_CASCADES haarcascades/*.xml) file(GLOB LBP_CASCADES lbpcascades/*.xml) - + -install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) -install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) +if(INSTALL_OTHER) + install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) + install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) +endif() - + if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") -diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt -index b4e48e6..5ac6f16 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,7 +1,9 @@ @@ -169,6 +143,3 @@ index b4e48e6..5ac6f16 100644 + DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 + COMPONENT dev) +endif() --- -2.15.1.windows.2 - diff --git a/ports/opencv/0003-disable-downloading.patch b/ports/opencv/0003-disable-downloading.patch index e51bab3b2..28b00251f 100644 --- a/ports/opencv/0003-disable-downloading.patch +++ b/ports/opencv/0003-disable-downloading.patch @@ -1,14 +1,3 @@ -From 692f6f4fcf9bfddaf8779ba622f190c3a8c772f9 Mon Sep 17 00:00:00 2001 -From: Robert Schumacher <roschuma@microsoft.com> -Date: Wed, 21 Feb 2018 17:20:22 -0800 -Subject: [PATCH 3/5] disable-downloading - ---- - cmake/OpenCVDownload.cmake | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake -index f660502..90785f1 100644 --- a/cmake/OpenCVDownload.cmake +++ b/cmake/OpenCVDownload.cmake @@ -151,6 +151,8 @@ function(ocv_download) @@ -20,6 +9,3 @@ index f660502..90785f1 100644 file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" INACTIVITY_TIMEOUT 60 TIMEOUT 600 --- -2.15.1.windows.2 - diff --git a/ports/opencv/0004-use-find-package-required.patch b/ports/opencv/0004-use-find-package-required.patch index 6d2fa5688..4e1daf659 100644 --- a/ports/opencv/0004-use-find-package-required.patch +++ b/ports/opencv/0004-use-find-package-required.patch @@ -1,14 +1,3 @@ -From 7e02db97d43cb9aa331da0dbfce8c372c19ad32b Mon Sep 17 00:00:00 2001 -From: Robert Schumacher <roschuma@microsoft.com> -Date: Wed, 21 Feb 2018 17:20:49 -0800 -Subject: [PATCH 4/5] use-find-package-required - ---- - cmake/OpenCVFindLibsGrfmt.cmake | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake -index 0ae58c8..5832d56 100644 --- a/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake @@ -6,7 +6,7 @@ @@ -18,18 +7,18 @@ index 0ae58c8..5832d56 100644 - find_package(ZLIB "${MIN_VER_ZLIB}") + find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) if(ZLIB_FOUND AND ANDROID) - if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so" OR - ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib64/libz.so") -@@ -31,7 +31,7 @@ if(WITH_JPEG) + if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$") + set(ZLIB_LIBRARIES z) +@@ -30,7 +30,7 @@ if(WITH_JPEG) if(BUILD_JPEG) ocv_clear_vars(JPEG_FOUND) else() - include(FindJPEG) + find_package(JPEG REQUIRED) endif() - + if(NOT JPEG_FOUND) -@@ -52,7 +52,7 @@ if(WITH_TIFF) +@@ -51,7 +51,7 @@ if(WITH_TIFF) if(BUILD_TIFF) ocv_clear_vars(TIFF_FOUND) else() @@ -38,7 +27,7 @@ index 0ae58c8..5832d56 100644 if(TIFF_FOUND) ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) endif() -@@ -95,7 +95,7 @@ if(WITH_WEBP) +@@ -94,7 +94,7 @@ if(WITH_WEBP) if(BUILD_WEBP) ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR) else() @@ -47,16 +36,16 @@ index 0ae58c8..5832d56 100644 if(WEBP_FOUND) set(HAVE_WEBP 1) endif() -@@ -136,7 +136,7 @@ if(WITH_JASPER) +@@ -135,7 +135,7 @@ if(WITH_JASPER) if(BUILD_JASPER) ocv_clear_vars(JASPER_FOUND) else() - include(FindJasper) + find_package(Jasper REQUIRED) endif() - + if(NOT JASPER_FOUND) -@@ -160,7 +160,7 @@ if(WITH_PNG) +@@ -159,7 +159,7 @@ if(WITH_PNG) if(BUILD_PNG) ocv_clear_vars(PNG_FOUND) else() @@ -65,33 +54,30 @@ index 0ae58c8..5832d56 100644 if(PNG_FOUND) include(CheckIncludeFile) check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) -@@ -192,7 +192,7 @@ if(WITH_OPENEXR) +@@ -191,7 +191,7 @@ if(WITH_OPENEXR) if(BUILD_OPENEXR) ocv_clear_vars(OPENEXR_FOUND) else() - include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") + find_package(OpenEXR REQUIRED) endif() - + if(NOT OPENEXR_FOUND) -@@ -208,7 +208,7 @@ endif() - +@@ -207,7 +207,7 @@ endif() + # --- GDAL (optional) --- if(WITH_GDAL) - find_package(GDAL QUIET) + find_package(GDAL REQUIRED) - + if(NOT GDAL_FOUND) set(HAVE_GDAL NO) -@@ -220,7 +220,7 @@ if(WITH_GDAL) +@@ -219,7 +219,7 @@ if(WITH_GDAL) endif() - + if (WITH_GDCM) - find_package(GDCM QUIET) + find_package(GDCM REQUIRED) if(NOT GDCM_FOUND) set(HAVE_GDCM NO) ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES) --- -2.15.1.windows.2 - diff --git a/ports/opencv/0005-remove-protobuf-target.patch b/ports/opencv/0005-remove-protobuf-target.patch new file mode 100644 index 000000000..b538ee040 --- /dev/null +++ b/ports/opencv/0005-remove-protobuf-target.patch @@ -0,0 +1,31 @@ +--- a/cmake/OpenCVFindProtobuf.cmake ++++ b/cmake/OpenCVFindProtobuf.cmake +@@ -44,17 +44,6 @@ else() + # end of compatibility block + + if(Protobuf_FOUND) +- if(TARGET protobuf::libprotobuf) +- add_library(libprotobuf INTERFACE) +- target_link_libraries(libprotobuf INTERFACE protobuf::libprotobuf) +- else() +- add_library(libprotobuf UNKNOWN IMPORTED) +- set_target_properties(libprotobuf PROPERTIES +- IMPORTED_LOCATION "${Protobuf_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}" +- ) +- get_protobuf_version(Protobuf_VERSION "${Protobuf_INCLUDE_DIR}") +- endif() + set(HAVE_PROTOBUF TRUE) + endif() + endif() +--- a/modules/dnn/CMakeLists.txt ++++ b/modules/dnn/CMakeLists.txt +@@ -65,7 +65,7 @@ endif() + + ocv_module_include_directories(${fw_inc} ${CMAKE_CURRENT_LIST_DIR}/src/ocl4dnn/include ${OPENCL_INCLUDE_DIRS}) + ocv_glob_module_sources(SOURCES ${fw_srcs}) +-ocv_create_module(libprotobuf ${LAPACK_LIBRARIES}) ++ocv_create_module() + ocv_add_samples() + ocv_add_accuracy_tests() + ocv_add_perf_tests() diff --git a/ports/opencv/CONTROL b/ports/opencv/CONTROL index df27dc08c..5450f3906 100644 --- a/ports/opencv/CONTROL +++ b/ports/opencv/CONTROL @@ -1,14 +1,30 @@ Source: opencv -Version: 3.4.0-3 -Build-Depends: opengl, zlib, protobuf (windows) +Version: 3.4.1 +Build-Depends: zlib Description: computer vision library -Default-Features: jpeg, png, tiff, eigen +Default-Features: opengl, jpeg, png, tiff, eigen, flann + +Feature: opengl +Build-Depends: opengl +Description: opengl support for opencv + +Feature: dnn +Build-Depends: protobuf +Description: opencv_dnn module + +Feature: ovis +Build-Depends: ogre +Description: opencv_ovis module + +Feature: flann +Description: opencv_flann module Feature: sfm Build-Depends: eigen3, glog, gflags, ceres Description: opencv_sfm module Feature: contrib +Build-Depends: opencv[flann] Description: opencv_contrib module Feature: cuda diff --git a/ports/opencv/portfile.cmake b/ports/opencv/portfile.cmake index f3efaa779..78ed5fa51 100644 --- a/ports/opencv/portfile.cmake +++ b/ports/opencv/portfile.cmake @@ -1,20 +1,12 @@ include(vcpkg_common_functions) -set(OPENCV_PORT_VERSION "3.4.0") - -# This is to ensure we are patching clean sources. These lines can be removed when the OpenCV version is next upgraded. -if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}" AND NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}/rework.stamp") - file(REMOVE_RECURSE - "${CURRENT_BUILDTREES_DIR}/src/opencv-opencv-${OPENCV_PORT_VERSION}.tar.gz.extracted" - "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}" - ) -endif() +set(OPENCV_PORT_VERSION "3.4.1") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO opencv/opencv REF ${OPENCV_PORT_VERSION} - SHA512 aa7e475f356ffdaeb2ae9f7e9380c92cae58fabde9cd3b23c388f9190b8fde31ee70d16648042d0c43c03b2ff1f15e4be950be7851133ea0aa82cf6e42ba4710 + SHA512 e1fc14285090c6fe9e26e721f2d67d7096650c523147e925567426ef76aa7f4c6f12035d6f6ce3ec7991a75a6828a810fd4f9b75f78ed5fcccecefbadd79944b HEAD_REF master ) @@ -25,19 +17,38 @@ vcpkg_apply_patches( "${CMAKE_CURRENT_LIST_DIR}/0002-install-options.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-disable-downloading.patch" "${CMAKE_CURRENT_LIST_DIR}/0004-use-find-package-required.patch" + "${CMAKE_CURRENT_LIST_DIR}/0005-remove-protobuf-target.patch" ) file(WRITE "${CURRENT_BUILDTREES_DIR}/src/opencv-${OPENCV_PORT_VERSION}/rework.stamp") -vcpkg_download_distfile(TINYDNN_ARCHIVE +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) + +set(CMAKE_MODULE_PATH) + +set(BUILD_opencv_dnn OFF) +set(WITH_PROTOBUF OFF) +if("dnn" IN_LIST FEATURES) + set(BUILD_opencv_dnn ON) + set(WITH_PROTOBUF ON) + set(PROTOBUF_UPDATE_FILES ON) + set(UPDATE_PROTO_FILES ON) + vcpkg_download_distfile(TINYDNN_ARCHIVE URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b -) + ) +endif() -string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) +set(BUILD_opencv_flann OFF) +if("flann" IN_LIST FEATURES) + set(BUILD_opencv_flann ON) +endif() -set(CMAKE_MODULE_PATH) +set(BUILD_opencv_ovis OFF) +if("ovis" IN_LIST FEATURES) + set(BUILD_opencv_ovis ON) +endif() set(BUILD_opencv_sfm OFF) if("sfm" IN_LIST FEATURES) @@ -55,6 +66,12 @@ if("contrib" IN_LIST FEATURES) SHA512 c16e60a6c4bb4de3ab39b876ae3c3f320ea56f69c93e9303bd2dff8760841dcd71be4161fff8bc71e8fe4fe8747fa8465d49d6bd8f5ebcdaea161f4bc2da7c93 ) + vcpkg_download_distfile(TINYDNN_ARCHIVE + URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" + FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" + SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b + ) + function(download_opencv_3rdparty ID COMMIT HASH) if(NOT EXISTS "${DOWNLOADS}/opencv-cache/${ID}/${COMMIT}.stamp") vcpkg_download_distfile(OCV_DOWNLOAD @@ -99,19 +116,19 @@ set(WITH_FFMPEG OFF) if("ffmpeg" IN_LIST FEATURES) set(WITH_FFMPEG ON) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/66b1fed06cf3510235f367f96aa26da5cb234a15/ffmpeg/opencv_ffmpeg.dll" - FILENAME "opencv-cache/ffmpeg/3ae76b105113d944984b2351c61e21c6-opencv_ffmpeg.dll" - SHA512 62ad0d6de7a7887a08313e20c474b4f98ae7746a2c10cce2ea5eae284250830e721b81308a401d0fadd238dda85c3ec0f347b41361fd56e473e790e3c40fa554 + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg.dll" + FILENAME "opencv-cache/ffmpeg/b8120c07962d591e2e9071a1bf566fd0-opencv_ffmpeg.dll" + SHA512 53325e3bb04de19273270475d7b7d9190c950b0d12e1179feef63c69ba66c9f8593d8ed9b030109dee8c104ab5babea69f18c7cae7366a57d48272d67c00d871 ) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/66b1fed06cf3510235f367f96aa26da5cb234a15/ffmpeg/opencv_ffmpeg_64.dll" - FILENAME "opencv-cache/ffmpeg/cf3bb5bc9d393b022ea7a42eb63e794d-opencv_ffmpeg_64.dll" - SHA512 5de95a180895aaa5186578572dd1968d2ff3ce8d24c46755c94d768ea6f463c92416c86e851b06b15fc314dd852a456282a56f5b14d6fb9130a054ac9e8230bd + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/opencv_ffmpeg_64.dll" + FILENAME "opencv-cache/ffmpeg/dc9c50e7b05482acc25d6ce0ac61bf1d-opencv_ffmpeg_64.dll" + SHA512 7d90df6f5d141f842a45e5678cf1349657612321250ece4ad5c6b5fb28a50140735d91ced0ce1a6e81962ef87236cbd1669c0b4410308f70fccee341a7a5c28b ) vcpkg_download_distfile(OCV_DOWNLOAD - URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/66b1fed06cf3510235f367f96aa26da5cb234a15/ffmpeg/ffmpeg_version.cmake" - FILENAME "opencv-cache/ffmpeg/ec59008da403fb18ab3c1ed66aed583b-ffmpeg_version.cmake" - SHA512 97784032256b104ed9bb3e3f71824985c551b3e4a86928bcf60d3beef50817f66cf276256e140e645e78e04f4463f3665bdda0574585d05af640fb43d0ba4cb9 + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/0a0e88972a7ea97708378d0488a65f83e7cc5e69/ffmpeg/ffmpeg_version.cmake" + FILENAME "opencv-cache/ffmpeg/3b90f67f4b429e77d3da36698cef700c-ffmpeg_version.cmake" + SHA512 7d0142c30ac6f6260c1bcabc22753030fd25a708477fa28053e8df847c366967d3b93a8ac14af19a2b7b73d9f8241749a431458faf21a0c8efc7d6d99eecfdcf ) endif() @@ -155,6 +172,11 @@ if("gdcm" IN_LIST FEATURES) set(WITH_GDCM ON) endif() +set(WITH_OPENGL OFF) +if("opengl" IN_LIST FEATURES) + set(WITH_OPENGL ON) +endif() + set(WITH_OPENEXR OFF) if("openexr" IN_LIST FEATURES) set(WITH_OPENEXR ON) @@ -196,12 +218,13 @@ if(BUILD_opencv_contrib) OUT_SOURCE_PATH CONTRIB_SOURCE_PATH REPO opencv/opencv_contrib REF ${OPENCV_PORT_VERSION} - SHA512 53f6127304f314d3be834f79520d4bc8a75e14cad8c9c14a66a7a6b37908ded114d24e3a2c664d4ec2275903db08ac826f29433e810c6400f3adc2714a3c5be7 + SHA512 431dfba0f413071d7faa18bc6e6f5e4f015285e2cc730c5dd69b2a4d6aa4250b7e0bcb1814ac6f06f5c76f103aea1f93f72f32aee6bc0cd7ddacdaf1f40075c1 HEAD_REF master ) set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") endif() +set(WITH_ZLIB ON) set(BUILD_opencv_line_descriptor ON) set(BUILD_opencv_saliency ON) set(BUILD_opencv_bgsegm ON) @@ -219,11 +242,10 @@ vcpkg_configure_cmake( OPTIONS # Ungrouped Entries -DOpenCV_DISABLE_ARCH_PATH=ON - -DPROTOBUF_UPDATE_FILES=ON - -DUPDATE_PROTO_FILES=ON - # BUILD + # Do not build docs/examples -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF + # Do not build integrated libraries, use external ones whenever possible -DBUILD_JASPER=OFF -DBUILD_JPEG=OFF -DBUILD_OPENEXR=OFF @@ -237,16 +259,20 @@ vcpkg_configure_cmake( -DBUILD_WITH_DEBUG_INFO=ON -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} -DBUILD_ZLIB=OFF + # Select which OpenCV modules should be built -DBUILD_opencv_apps=OFF - -DBUILD_opencv_dnn=ON - -DBUILD_opencv_flann=ON + -DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm} + -DBUILD_opencv_dnn=${BUILD_opencv_dnn} + -DBUILD_opencv_flann=${BUILD_opencv_flann} + -DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor} + -DBUILD_opencv_ovis=${BUILD_opencv_ovis} -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF - -DBUILD_opencv_sfm=${BUILD_opencv_sfm} - -DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor} -DBUILD_opencv_saliency=${BUILD_opencv_saliency} - -DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm} - + -DBUILD_opencv_sfm=${BUILD_opencv_sfm} + # PROTOBUF + -DPROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES} + -DUPDATE_PROTO_FILES=${UPDATE_PROTO_FILES} # CMAKE -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON "-DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}" @@ -264,22 +290,24 @@ vcpkg_configure_cmake( # WITH -DWITH_CUBLAS=OFF -DWITH_CUDA=${WITH_CUDA} + -DWITH_EIGEN=${WITH_EIGEN} -DWITH_FFMPEG=${WITH_FFMPEG} + -DWITH_GDCM=${WITH_GDCM} -DWITH_IPP=${WITH_IPP} + -DWITH_JASPER=${WITH_JASPER} + -DWITH_JPEG=${WITH_JPEG} -DWITH_LAPACK=OFF -DWITH_MSMF=${WITH_MSMF} -DWITH_OPENCLAMDBLAS=OFF - -DWITH_OPENGL=ON + -DWITH_OPENEXR=${WITH_OPENEXR} + -DWITH_OPENGL=${WITH_OPENGL} + -DWITH_PNG=${WITH_PNG} + -DWITH_PROTOBUF=${WITH_PROTOBUF} -DWITH_QT=${WITH_QT} + -DWITH_TIFF=${WITH_TIFF} -DWITH_VTK=${WITH_VTK} - -DWITH_GDCM=${WITH_GDCM} -DWITH_WEBP=${WITH_WEBP} - -DWITH_OPENEXR=${WITH_OPENEXR} - -DWITH_TIFF=${WITH_TIFF} - -DWITH_JPEG=${WITH_JPEG} - -DWITH_PNG=${WITH_PNG} - -DWITH_JASPER=${WITH_JASPER} - -DWITH_EIGEN=${WITH_EIGEN} + -DWITH_ZLIB=${WITH_ZLIB} OPTIONS_DEBUG -DINSTALL_HEADERS=OFF -DINSTALL_OTHER=OFF diff --git a/ports/openexr/CMakeLists.txt.patch b/ports/openexr/CMakeLists.txt.patch index bb0d003ef..0ee0110d5 100644 --- a/ports/openexr/CMakeLists.txt.patch +++ b/ports/openexr/CMakeLists.txt.patch @@ -1,27 +1,20 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index d3e3365..a20580e 100644 +index 8c0a385..887ddf5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -152,13 +152,13 @@ FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h " - IF (HAVE_GCC_INLINE_ASM_AVX) - FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX 1\n" ) - ENDIF() -- -+ - IF (HAVE_SYSCONF_NPROCESSORS_ONLN) +@@ -157,8 +157,8 @@ IF (HAVE_SYSCONF_NPROCESSORS_ONLN) FILE ( APPEND ${CMAKE_CURRENT_BINARY_DIR}/config/OpenEXRConfig.h "#define OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN 1\n" ) ENDIF() -- + -SET (OPENEXR_LIBSUFFIX "") -SET (ILMBASE_LIBSUFFIX "") -+ +SET (OPENEXR_LIBSUFFIX "" CACHE STRING "Default suffix for OpenEXR") +SET (ILMBASE_LIBSUFFIX "" CACHE STRING "Default suffix for ILMBase") IF (NAMESPACE_VERSIONING) SET ( OPENEXR_LIBSUFFIX "-${OPENEXR_VERSION_API}" ) # assume same NAMESPACE_VERSION setting for IlmBase for now @@ -188,32 +188,6 @@ SET_TARGET_PROPERTIES ( IlmImfUtil - SOVERSION 22 + SOVERSION 23 OUTPUT_NAME "IlmImfUtil${OPENEXR_LIBSUFFIX}" ) - @@ -53,10 +46,11 @@ index d3e3365..a20580e 100644 ########################## # Installation -@@ -225,36 +199,3 @@ INSTALL ( FILES +@@ -224,37 +198,3 @@ INSTALL ( FILES + DESTINATION ${CMAKE_INSTALL_PREFIX}/include/OpenEXR ) - +- -# Documentation -INSTALL ( FILES - doc/TechnicalIntroduction.pdf diff --git a/ports/openexr/CONTROL b/ports/openexr/CONTROL index 2bc513755..752dafc6d 100644 --- a/ports/openexr/CONTROL +++ b/ports/openexr/CONTROL @@ -1,4 +1,4 @@ Source: openexr -Version: 2.2.0-4 +Version: 2.2.1-1 Description: OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications Build-Depends: zlib, ilmbase diff --git a/ports/openexr/portfile.cmake b/ports/openexr/portfile.cmake index b5b9c8d97..7e3b6603f 100644 --- a/ports/openexr/portfile.cmake +++ b/ports/openexr/portfile.cmake @@ -1,5 +1,5 @@ -set(OPENEXR_VERSION 2.2.0) -set(OPENEXR_HASH 017abbeeb6b814508180721bc8e8940094965c4c55b135a198c6bcb109a04bf7f72e4aee81ee72cb2185fe818a41d892b383e8d2d59f40c673198948cb79279a) +set(OPENEXR_VERSION 2.2.1) +set(OPENEXR_HASH 192100c6ac47534f3a93c55327d2ab90b07a8265156855086b326184328c257dcde12991b3f3f1831e2df4226fe884adcfe481c2f02a157c715aee665e89a480) include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openexr-${OPENEXR_VERSION}) diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake index 6e9e1d14f..80df4ae74 100644 --- a/ports/opengl/portfile.cmake +++ b/ports/opengl/portfile.cmake @@ -1,47 +1,51 @@ include(vcpkg_common_functions) -vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) -vcpkg_get_windows_sdk(WINDOWS_SDK) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT) + vcpkg_get_windows_sdk(WINDOWS_SDK) -if (WINDOWS_SDK MATCHES "10.") - set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") - set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") -elseif(WINDOWS_SDK MATCHES "8.") - set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") - set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") - set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") -else() - message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") -endif() + if (WINDOWS_SDK MATCHES "10.") + set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um") + elseif(WINDOWS_SDK MATCHES "8.") + set(LIBGLFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBGLUFILEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") + set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\8.1\\Include\\um") + else() + message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") + endif() -if (NOT EXISTS "${LIBGLFILEPATH}") - message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") -endif() + if (NOT EXISTS "${LIBGLFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLFILEPATH}") + endif() -if (NOT EXISTS "${LIBGLUFILEPATH}") - message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLUFILEPATH}") -endif() + if (NOT EXISTS "${LIBGLUFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLUFILEPATH}") + endif() -file(MAKE_DIRECTORY - ${CURRENT_PACKAGES_DIR}/include/gl - ${CURRENT_PACKAGES_DIR}/lib - ${CURRENT_PACKAGES_DIR}/debug/lib - ${CURRENT_PACKAGES_DIR}/share/opengl -) + file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/include/gl + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug/lib + ${CURRENT_PACKAGES_DIR}/share/opengl + ) -file(COPY - "${HEADERSPATH}\\gl\\GL.h" - "${HEADERSPATH}\\gl\\GLU.h" - DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl + file(COPY + "${HEADERSPATH}\\gl\\GL.h" + "${HEADERSPATH}\\gl\\GLU.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl ) -file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -if (WINDOWS_SDK MATCHES "10.") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") -elseif(WINDOWS_SDK MATCHES "8.") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") + if (WINDOWS_SDK MATCHES "10.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") + elseif(WINDOWS_SDK MATCHES "8.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") + endif() +else() + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) endif() diff --git a/ports/openimageio/CONTROL b/ports/openimageio/CONTROL index 3e498bf56..88a66b315 100644 --- a/ports/openimageio/CONTROL +++ b/ports/openimageio/CONTROL @@ -1,4 +1,4 @@ Source: openimageio -Version: 1.7.15-2 -Description: An library for reading and writing images, and a bunch of related classes, utilities, and application +Version: 1.8.9 +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 diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index cc62bd58c..21a5899c1 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OpenImageIO/oiio - REF Release-1.7.15 - SHA512 5b83961a77de36082e0a3abeac8015f9455504680d7437777524a9ac17ac7994df2a2ad1af86a884cf17c1afcd71a36a30e24711cba8d8a30511c05e36d7fadc + REF Release-1.8.9 + SHA512 300eab0d2e7277c46550339d72af59b3ab2232d296b4d46808575015075cdbb9dd911e9b335c0d10bf6d95ebde907240af0f4828d422aca091f82491693dfef3 HEAD_REF master ) @@ -47,6 +47,7 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openimageio) diff --git a/ports/openmesh/CONTROL b/ports/openmesh/CONTROL new file mode 100644 index 000000000..b803484eb --- /dev/null +++ b/ports/openmesh/CONTROL @@ -0,0 +1,3 @@ +Source: openmesh
+Version: 6.3
+Description: A generic and efficient polygon mesh data structure
diff --git a/ports/openmesh/portfile.cmake b/ports/openmesh/portfile.cmake new file mode 100644 index 000000000..f70773ceb --- /dev/null +++ b/ports/openmesh/portfile.cmake @@ -0,0 +1,38 @@ +# 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/openmesh-6.3)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.openmesh.org/media/Releases/6.3/OpenMesh-6.3.tar.gz"
+ FILENAME "openmesh-6.3.tar.gz"
+ SHA512 2ef2dcd2e0abcb0c36a3a9abac433ef4d3430115498ff1134525b27a0f023d7e3bb0d80550f0c8b9658c87651594bce29138bdca05db57f02a5e99e2275c2c07
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ OPTIONS -DBUILD_APPS=OFF # [TODO]: add apps as feature, requires qt5 and freeglut
+ # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/OpenMesh/Tools/VDPM/xpm)
+
+# Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmesh RENAME copyright)
diff --git a/ports/openssl/CMakeLists.txt b/ports/openssl/CMakeLists.txt new file mode 100644 index 000000000..a2d863452 --- /dev/null +++ b/ports/openssl/CMakeLists.txt @@ -0,0 +1,130 @@ +cmake_minimum_required(VERSION 3.9)
+project(openssl C)
+
+if(NOT SOURCE_PATH)
+ message(FATAL_ERROR "Requires SOURCE_PATH")
+endif()
+
+if(CMAKE_SYSTEM_NAME STREQUAL "Android")
+ set(PLATFORM android)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")
+ set(PLATFORM linux-generic64)
+ else()
+ set(PLATFORM linux-generic32)
+ endif()
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ set(PLATFORM darwin64-x86_64-cc)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ set(PLATFORM BSD-generic64)
+else()
+ message(FATAL_ERROR "Unknown platform")
+endif()
+
+get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY)
+
+message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
+message("COMPILER_ROOT=${COMPILER_ROOT}")
+message("CMAKE_SYSROOT=${CMAKE_SYSROOT}")
+message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}")
+message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}")
+message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}")
+message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}")
+
+set(CFLAGS "${CMAKE_C_FLAGS}")
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}")
+endif()
+if(CMAKE_C_COMPILER_TARGET)
+ set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET} ${CMAKE_C_COMPILER_TARGET}")
+endif()
+if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN)
+ set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}")
+endif()
+if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT)
+ set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}")
+endif()
+
+file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}")
+set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr")
+set(ENV{CC} "${CMAKE_C_COMPILER}")
+
+message("ENV{ANDROID_DEV}=$ENV{ANDROID_DEV}")
+
+get_filename_component(SOURCE_PATH_NAME "${SOURCE_PATH}" NAME)
+set(BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_PATH_NAME}")
+
+if(NOT EXISTS "${BUILDDIR}")
+ file(COPY ${SOURCE_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+endif()
+
+get_filename_component(MSYS_BIN_DIR "${MAKE}" DIRECTORY)
+
+
+file(READ "${BUILDDIR}/Configure" _contents)
+string(REPLACE "-mandroid" "" _contents "${_contents}")
+file(WRITE "${BUILDDIR}/Configure" "${_contents}")
+
+if(BUILD_SHARED_LIBS)
+ set(SHARED shared)
+else()
+ set(SHARED no-shared)
+endif()
+
+if(CMAKE_HOST_WIN32)
+ set(ENV_COMMAND set)
+ set(PATH_VAR ";%PATH%")
+else()
+ set(ENV_COMMAND export)
+ set(PATH_VAR ":$ENV{PATH}")
+endif()
+
+add_custom_command(
+ OUTPUT "${BUILDDIR}/Makefile"
+ COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER}
+ COMMAND ${ENV_COMMAND} AR=${CMAKE_AR}
+ COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER}
+ COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB}
+ COMMAND ${ENV_COMMAND} MAKE=${MAKE}
+ COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER}
+ COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
+ COMMAND "${PERL}" Configure
+ ${SHARED}
+ enable-static-engine
+ no-ssl2
+ no-krb5
+ no-idea
+ no-bf
+ no-cast
+ no-seed
+ no-md2
+ ${PLATFORM}
+ "--prefix=${CMAKE_INSTALL_PREFIX}"
+ "--openssldir=${CMAKE_INSTALL_PREFIX}"
+ ${CFLAGS}
+ COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake"
+ VERBATIM
+ WORKING_DIRECTORY "${BUILDDIR}"
+)
+
+add_custom_target(depend
+ COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
+ COMMAND "${MAKE}" links # depend MAKEDEPPROG=${CMAKE_C_COMPILER}
+ VERBATIM
+ WORKING_DIRECTORY "${BUILDDIR}"
+ DEPENDS "${BUILDDIR}/Makefile"
+)
+add_custom_target(build_libs ALL
+ COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}"
+ COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h"
+ COMMAND "${MAKE}" build_libs
+ VERBATIM
+ WORKING_DIRECTORY "${BUILDDIR}"
+ DEPENDS depend
+ BYPRODUCTS "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
+)
+
+install(
+ FILES "${BUILDDIR}/libssl.a" "${BUILDDIR}/libcrypto.a"
+ DESTINATION lib
+)
diff --git a/ports/openssl/CONTROL b/ports/openssl/CONTROL index e1cea2799..43a6eb660 100644 --- a/ports/openssl/CONTROL +++ b/ports/openssl/CONTROL @@ -1,3 +1,3 @@ Source: openssl -Version: 1.0.2n-2 +Version: 1.0.2n-3 Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. diff --git a/ports/openssl/portfile-nonwindows.cmake b/ports/openssl/portfile-nonwindows.cmake new file mode 100644 index 000000000..3a4f69710 --- /dev/null +++ b/ports/openssl/portfile-nonwindows.cmake @@ -0,0 +1,33 @@ +if(CMAKE_HOST_WIN32)
+ vcpkg_acquire_msys(MSYS_ROOT PACKAGES make)
+ set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
+ set(MAKE ${MSYS_ROOT}/usr/bin/make.exe)
+else()
+ find_program(MAKE make)
+ if(NOT MAKE)
+ message(FATAL_ERROR "Could not find make. Please install it through your package manager.")
+ endif()
+endif()
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR}
+ PREFER_NINJA
+ OPTIONS
+ -DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH}
+ -DPERL=${PERL}
+ -DMAKE=${MAKE}
+ OPTIONS_RELEASE
+ -DINSTALL_HEADERS=ON
+)
+
+vcpkg_install_cmake()
+
+file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h)
+set(RESOLVED_HEADERS)
+foreach(HEADER ${HEADERS})
+ get_filename_component(X "${HEADER}" REALPATH)
+ list(APPEND RESOLVED_HEADERS "${X}")
+endforeach()
+
+file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl)
+file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl RENAME copyright)
diff --git a/ports/openssl/portfile.cmake b/ports/openssl/portfile.cmake index 65662dd86..023b3e233 100644 --- a/ports/openssl/portfile.cmake +++ b/ports/openssl/portfile.cmake @@ -8,13 +8,9 @@ set(OPENSSL_VERSION 1.0.2n) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) vcpkg_find_acquire_program(PERL) -vcpkg_find_acquire_program(NASM) -find_program(NMAKE nmake) get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) -get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) -vcpkg_find_acquire_program(JOM) -set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH};${PERL_EXE_PATH}") +set(ENV{PATH} "$ENV{PATH};${PERL_EXE_PATH}") vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.0.2/openssl-${OPENSSL_VERSION}.tar.gz" @@ -31,6 +27,17 @@ vcpkg_apply_patches( ${CMAKE_CURRENT_LIST_DIR}/RemoveNonASCIIChar.patch ) +if(VCPKG_CMAKE_SYSTEM_NAME) + include(${CMAKE_CURRENT_LIST_DIR}/portfile-nonwindows.cmake) + return() +endif() + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +set(ENV{PATH} "${NASM_EXE_PATH};$ENV{PATH}") + +vcpkg_find_acquire_program(JOM) + set(CONFIGURE_COMMAND ${PERL} Configure enable-static-engine enable-capieng @@ -85,7 +92,7 @@ execute_process( ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log ) vcpkg_execute_required_process( - COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install + COMMAND ${JOM} -j 1 -f ${OPENSSL_MAKEFILE} install WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} LOGNAME build-${TARGET_TRIPLET}-rel-1) @@ -118,7 +125,7 @@ execute_process( ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log ) vcpkg_execute_required_process( - COMMAND ${NMAKE} -f ${OPENSSL_MAKEFILE} install + COMMAND ${JOM} -j 1 -f ${OPENSSL_MAKEFILE} install WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} LOGNAME build-${TARGET_TRIPLET}-dbg-1) @@ -145,6 +152,10 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) endif() +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) +string(REPLACE "<winsock.h>" "<winsock2.h>" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") + vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/openssl/remove-deps.cmake b/ports/openssl/remove-deps.cmake new file mode 100644 index 000000000..a57c70fe9 --- /dev/null +++ b/ports/openssl/remove-deps.cmake @@ -0,0 +1,7 @@ +file(GLOB_RECURSE MAKEFILES ${DIR}/*/Makefile)
+foreach(MAKEFILE ${MAKEFILES})
+ message("removing deps from ${MAKEFILE}")
+ file(READ "${MAKEFILE}" _contents)
+ string(REGEX REPLACE "\n# DO NOT DELETE THIS LINE.*" "" _contents "${_contents}")
+ file(WRITE "${MAKEFILE}" "${_contents}")
+endforeach()
diff --git a/ports/openvpn3/CMakeLists.txt b/ports/openvpn3/CMakeLists.txt new file mode 100644 index 000000000..fcbe85794 --- /dev/null +++ b/ports/openvpn3/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.0)
+project(openvpncli CXX)
+
+find_path(ASIO_HPP asio.hpp)
+find_library(MBEDTLS_LIB mbedtls)
+find_library(MBEDCRYPTO_LIB mbedcrypto)
+find_library(MBEDX509_LIB mbedx509)
+
+include_directories(. ${ASIO_HPP})
+
+add_definitions(-DNOMINMAX -DUSE_ASIO -DUSE_MBEDTLS)
+
+add_library(ovpncli client/ovpncli.cpp)
+target_link_libraries(ovpncli PRIVATE Iphlpapi.lib ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB} ${MBEDX509_LIB})
+
+install(
+ TARGETS ovpncli
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+)
+
+if(BUILD_TOOL)
+ add_executable(cli test/ovpncli/cli.cpp)
+ target_link_libraries(cli PRIVATE ovpncli)
+endif()
diff --git a/ports/openvpn3/CONTROL b/ports/openvpn3/CONTROL new file mode 100644 index 000000000..09264a192 --- /dev/null +++ b/ports/openvpn3/CONTROL @@ -0,0 +1,4 @@ +Source: openvpn3 +Version: 2018-03-21 +Build-Depends: asio, tap-windows6 (windows), mbedtls +Description: a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch. diff --git a/ports/openvpn3/portfile.cmake b/ports/openvpn3/portfile.cmake new file mode 100644 index 000000000..aede361dd --- /dev/null +++ b/ports/openvpn3/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +set(VCPKG_LIBRARY_LINKAGE static) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenVPN/openvpn3 + REF 3d5dd9ee3b4182032044d775de5401fc6a7a63ae + SHA512 6a8ed20662efa576c57f38fb9579c5808f745d44e8cd6a84055bec10a58ede5d27e207a842f79ac6a2f7d986494fbd2415f9d59e2b23bd38e45c68546a227697 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(COPY ${SOURCE_PATH}/openvpn DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +file(COPY ${SOURCE_PATH}/client/ovpncli.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/openvpn/) + +file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/openvpn/*) +foreach(HEADER IN LISTS HEADERS) + file(READ "${HEADER}" _contents) + string(REPLACE "defined(USE_ASIO)" "1" _contents "${_contents}") + string(REPLACE "#ifdef USE_ASIO\n" "#if 1\n" _contents "${_contents}") + string(REPLACE "defined(USE_MBEDTLS)" "1" _contents "${_contents}") + string(REPLACE "#ifdef USE_MBEDTLS\n" "#if 1\n" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +file(INSTALL + ${SOURCE_PATH}/COPYRIGHT.AGPLV3 + DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvpn3 RENAME copyright) diff --git a/ports/paho-mqtt/CONTROL b/ports/paho-mqtt/CONTROL index cefd6bb87..1acf080ff 100644 --- a/ports/paho-mqtt/CONTROL +++ b/ports/paho-mqtt/CONTROL @@ -1,4 +1,4 @@ Source: paho-mqtt -Version: 1.2.0-2 -Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things +Version: 1.2.0-3 +Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things Build-Depends: openssl diff --git a/ports/paho-mqtt/portfile.cmake b/ports/paho-mqtt/portfile.cmake index 27f9c8243..19629b92c 100644 --- a/ports/paho-mqtt/portfile.cmake +++ b/ports/paho-mqtt/portfile.cmake @@ -48,16 +48,19 @@ file(GLOB DEBUG_LIBS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib" ) -file(GLOB HEADERS "${SOURCE_PATH}/*/*.h") if(DLLS) file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) endif() -file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(LIBS) + file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif() if(DEBUG_DLLS) file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) endif() -file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) -file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +if(DEBUG_LIBS) + file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() +file(COPY ${SOURCE_PATH}/src/MQTTAsync.h ${SOURCE_PATH}/src/MQTTClient.h ${SOURCE_PATH}/src/MQTTClientPersistence.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/pangomm/portfile.cmake b/ports/pangomm/portfile.cmake index ad350f638..e3409fe15 100644 --- a/ports/pangomm/portfile.cmake +++ b/ports/pangomm/portfile.cmake @@ -34,8 +34,7 @@ vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/pangomm.sln TARGET pangomm PLATFORM ${VS_PLATFORM} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets + USE_VCPKG_INTEGRATION ) # Handle headers diff --git a/ports/pcl/portfile.cmake b/ports/pcl/portfile.cmake index ac92d40db..812e05674 100644 --- a/ports/pcl/portfile.cmake +++ b/ports/pcl/portfile.cmake @@ -76,6 +76,7 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/pcl) vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) if(BUILD_TOOLS) file(GLOB EXEFILES_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) diff --git a/ports/pdcurses/portfile.cmake b/ports/pdcurses/portfile.cmake index 22268fdc0..f9db020b9 100644 --- a/ports/pdcurses/portfile.cmake +++ b/ports/pdcurses/portfile.cmake @@ -4,20 +4,25 @@ if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") endif() include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) find_program(NMAKE nmake) -vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/pdcurses/pdcurses/3.4/pdcurs34.zip" - FILENAME "pdcurs34.zip" - SHA512 0b916bfe37517abb80df7313608cc4e1ed7659a41ce82763000dfdfa5b8311ffd439193c74fc84a591f343147212bf1caf89e7db71f1f7e4fa70f534834cb039 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wmcbrine/PDCurses + REF PDCurses_3_4 + SHA512 a05065c2e43771bf769f25f229b6058c4dc6add65d993f2e304e98bded8a8af88e674638c7385383451fddc45cf3bd8c9a95febffc7abcbcce0e6384e4f397b3 + HEAD_REF master ) -if(EXISTS ${CURRENT_BUILDTREES_DIR}/src) - file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) -endif() +file(REMOVE_RECURSE + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} +) + +file(GLOB SOURCES ${SOURCE_PATH}/*) + +file(COPY ${SOURCES} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) -vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") file(READ ${SOURCE_PATH}/win32/vcwin32.mak PDC_MAK_ORIG) string(REPLACE " -pdb:none" "" PDC_MAK_ORIG ${PDC_MAK_ORIG}) diff --git a/ports/piex/CONTROL b/ports/piex/CONTROL index 946ca9418..43411e564 100644 --- a/ports/piex/CONTROL +++ b/ports/piex/CONTROL @@ -1,3 +1,3 @@ Source: piex -Version: 2018-02-25 +Version: 2018-03-13 Description: The Preview Image Extractor (PIEX) is designed to find and extract the largest diff --git a/ports/piex/portfile.cmake b/ports/piex/portfile.cmake index 94b7e9494..039c2c41d 100644 --- a/ports/piex/portfile.cmake +++ b/ports/piex/portfile.cmake @@ -8,8 +8,8 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/piex - REF 938f8b6e49ae43b062f76aad968ff76f5f33c965 - SHA512 abe145f29d210b03eb4340a506cd3e061a9ffe69217f916310308c6c8095ebe3229fb969a4403d1ca06375c8c87e78db8bceee89f7963116f80acdce463c556b + REF 2aa74c2dd295758ef4562906a5525300972821fc + SHA512 4fbea41e8f21c2f4a75d899aa28e2d2e92201d429eb8504515466187befc1eac6c9b31d91b039f2aebe2101bbde6b87adce9bae578a536f264d207fe29e4bd8f HEAD_REF master ) diff --git a/ports/pixman/CMakeLists.txt b/ports/pixman/CMakeLists.txt index aad6ec778..322c08a9c 100644 --- a/ports/pixman/CMakeLists.txt +++ b/ports/pixman/CMakeLists.txt @@ -1,4 +1,64 @@ cmake_minimum_required(VERSION 3.0) -project(pixman VERSION 0.32.0 LANGUAGES C CXX) +project(pixman VERSION 0.32.0 LANGUAGES C) -add_subdirectory(pixman)
\ No newline at end of file +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +set(CMAKE_DEBUG_POSTFIX "d") + +include_directories(".") + +file(GLOB SOURCES +"pixman.c" +"pixman-access.c" +"pixman-access-accessors.c" +"pixman-bits-image.c" +"pixman-combine32.c" +"pixman-combine-float.c" +"pixman-conical-gradient.c" +"pixman-filter.c" +"pixman-x86.c" +"pixman-mips.c" +"pixman-arm.c" +"pixman-ppc.c" +"pixman-edge.c" +"pixman-edge-accessors.c" +"pixman-fast-path.c" +"pixman-glyph.c" +"pixman-general.c" +"pixman-gradient-walker.c" +"pixman-image.c" +"pixman-implementation.c" +"pixman-linear-gradient.c" +"pixman-matrix.c" +"pixman-noop.c" +"pixman-radial-gradient.c" +"pixman-region16.c" +"pixman-region32.c" +"pixman-solid-fill.c" +"pixman-timer.c" +"pixman-trap.c" +"pixman-utils.c" +"pixman-sse2.c" +) + +add_library(pixman-1 ${SOURCES}) + +# pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days. +target_compile_definitions(pixman-1 + PUBLIC + PACKAGE="pixman-1" + PACKAGE_VERSION="0.34.0" + PACKAGE_BUGREPORT="" + PRIVATE + USE_SSE2 +) + +# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files +if(MSVC) + target_compile_options(pixman-1 PRIVATE "/wd4244" "/wd4146" "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" +endif() + +install(TARGETS pixman-1 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/ports/pixman/CMakeLists_pixman.txt b/ports/pixman/CMakeLists_pixman.txt deleted file mode 100644 index c8030bcd6..000000000 --- a/ports/pixman/CMakeLists_pixman.txt +++ /dev/null @@ -1,53 +0,0 @@ -# Add include directories -include_directories(".") - -FILE(GLOB SOURCES -"pixman.c" -"pixman-access.c" -"pixman-access-accessors.c" -"pixman-bits-image.c" -"pixman-combine32.c" -"pixman-combine-float.c" -"pixman-conical-gradient.c" -"pixman-filter.c" -"pixman-x86.c" -"pixman-mips.c" -"pixman-arm.c" -"pixman-ppc.c" -"pixman-edge.c" -"pixman-edge-accessors.c" -"pixman-fast-path.c" -"pixman-glyph.c" -"pixman-general.c" -"pixman-gradient-walker.c" -"pixman-image.c" -"pixman-implementation.c" -"pixman-linear-gradient.c" -"pixman-matrix.c" -"pixman-noop.c" -"pixman-radial-gradient.c" -"pixman-region16.c" -"pixman-region32.c" -"pixman-solid-fill.c" -"pixman-timer.c" -"pixman-trap.c" -"pixman-utils.c" -"pixman-sse2.c" -) - -set(CMAKE_DEBUG_POSTFIX "d") - -add_library(pixman-1 ${SOURCES}) - -# pixman requires the three PACKAGE* definitions in order to compile. The USE_SSE2 definition lets it use SSE2 instructions for speed. Every target machine should have SSE2 these days. -target_compile_definitions(pixman-1 PUBLIC PACKAGE="pixman-1" PUBLIC PACKAGE_VERSION="0.34.0" PUBLIC PACKAGE_BUGREPORT="" PUBLIC USE_SSE2) - -# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files -target_compile_options(pixman-1 PUBLIC "/wd4244" PUBLIC "/wd4146" PUBLIC "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" - -# The LIBRARY DESTINATION here is lib rather than bin because pixman must always be compiled as a static library since it has no exports. -install(TARGETS pixman-1 - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) diff --git a/ports/pixman/portfile.cmake b/ports/pixman/portfile.cmake index ac6de80f0..4fb37f6d9 100644 --- a/ports/pixman/portfile.cmake +++ b/ports/pixman/portfile.cmake @@ -1,11 +1,3 @@ -# 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/pixman-0.34.0) @@ -17,29 +9,26 @@ vcpkg_download_distfile(ARCHIVE ) vcpkg_extract_source_archive(${ARCHIVE}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) -file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_pixman.txt DESTINATION ${SOURCE_PATH}/pixman) -file(RENAME ${SOURCE_PATH}/pixman/CMakeLists_pixman.txt ${SOURCE_PATH}/pixman/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/pixman) vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + SOURCE_PATH ${SOURCE_PATH}/pixman + PREFER_NINJA ) vcpkg_install_cmake() # Copy the appropriate header files. file(COPY -"${SOURCE_PATH}/pixman/pixman.h" -"${SOURCE_PATH}/pixman/pixman-accessor.h" -"${SOURCE_PATH}/pixman/pixman-combine32.h" -"${SOURCE_PATH}/pixman/pixman-compiler.h" -"${SOURCE_PATH}/pixman/pixman-edge-imp.h" -"${SOURCE_PATH}/pixman/pixman-inlines.h" -"${SOURCE_PATH}/pixman/pixman-private.h" -"${SOURCE_PATH}/pixman/pixman-version.h" -DESTINATION -${CURRENT_PACKAGES_DIR}/include + "${SOURCE_PATH}/pixman/pixman.h" + "${SOURCE_PATH}/pixman/pixman-accessor.h" + "${SOURCE_PATH}/pixman/pixman-combine32.h" + "${SOURCE_PATH}/pixman/pixman-compiler.h" + "${SOURCE_PATH}/pixman/pixman-edge-imp.h" + "${SOURCE_PATH}/pixman/pixman-inlines.h" + "${SOURCE_PATH}/pixman/pixman-private.h" + "${SOURCE_PATH}/pixman/pixman-version.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include ) # Handle copyright diff --git a/ports/plplot/CONTROL b/ports/plplot/CONTROL new file mode 100644 index 000000000..c278778b0 --- /dev/null +++ b/ports/plplot/CONTROL @@ -0,0 +1,8 @@ +Source: plplot
+Version: 5.13.0-1
+Build-Depends: freetype, zlib, libpng, bzip2
+Description: PLplot is a cross-platform software package for creating scientific plots whose (UTF-8) plot symbols and text are limited in practice only by what Unicode-aware system fonts are installed on a user's computer.
+
+Feature: wxwidgets
+Build-Depends: wxwidgets
+Description: plplot wxwidgets module
\ No newline at end of file diff --git a/ports/plplot/install-interface-include-directories.patch b/ports/plplot/install-interface-include-directories.patch new file mode 100644 index 000000000..3e124b5d0 --- /dev/null +++ b/ports/plplot/install-interface-include-directories.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index d81b6a7..6b51809 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -181,6 +181,8 @@ include_directories(
+ add_library(plplot ${plplot_LIB_SRCS})
+ add_dependencies(plplot plhershey-unicode.h_built)
+
++target_include_directories(plplot INTERFACE $<INSTALL_INTERFACE:include>)
++
+ # Deal with external libraries.
+ set(LIB_INSTALL_RPATH ${LIB_DIR})
+ set(libplplot_LINK_LIBRARIES)
diff --git a/ports/plplot/portfile.cmake b/ports/plplot/portfile.cmake new file mode 100644 index 000000000..372a59bba --- /dev/null +++ b/ports/plplot/portfile.cmake @@ -0,0 +1,71 @@ +include(vcpkg_common_functions)
+
+set(PLPLOT_VERSION 5.13.0)
+set(PLPLOT_HASH 1d5cb5da17d4bde6d675585bff1f8dcb581719249a0b2687867e767703f8dab0870e7ea44b9549a497f4ac0141a3cabf6761c49520c0e2b26ffe581468512cbb)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/plplot-${PLPLOT_VERSION})
+
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://sourceforge.net/projects/plplot/files/plplot/${PLPLOT_VERSION}%20Source/plplot-${PLPLOT_VERSION}.tar.gz/download"
+ FILENAME "plplot-${PLPLOT_VERSION}.tar.gz"
+ SHA512 ${PLPLOT_HASH}
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+set(BUILD_with_wxwidgets OFF)
+if("wxwidgets" IN_LIST FEATURES)
+ set(BUILD_with_wxwidgets ON)
+endif()
+
+# Patch build scripts
+vcpkg_apply_patches(
+ SOURCE_PATH ${SOURCE_PATH}
+ PATCHES "${CMAKE_CURRENT_LIST_DIR}/install-interface-include-directories.patch"
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DENABLE_tcl=OFF
+ -DPL_HAVE_QHULL=OFF
+ -DENABLE_qt=OFF
+ -DPLPLOT_USE_QT5=OFF
+ -DENABLE_ocaml=OFF
+ -DPL_DOUBLE=ON
+ -DENABLE_wxwidgets=${ENABLE_wxwidgets}
+ -DPLD_wxpng=${ENABLE_wxwidgets}
+ -DPLD_wxwidgets=${ENABLE_wxwidgets}
+ -DENABLE_DYNDRIVERS=OFF
+ -DDATA_DIR=${CURRENT_PACKAGES_DIR}/share/plplot
+ OPTIONS_DEBUG
+ -DDRV_DIR=${CURRENT_PACKAGES_DIR}/debug/bin
+ OPTIONS_RELEASE
+ -DDRV_DIR=${CURRENT_PACKAGES_DIR}/bin
+)
+
+vcpkg_install_cmake()
+
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/plplot)
+
+# Remove unnecessary tool
+file(REMOVE
+ ${CURRENT_PACKAGES_DIR}/debug/bin/pltek.exe
+ ${CURRENT_PACKAGES_DIR}/bin/pltek.exe
+)
+
+# Remove unwanted and duplicate directories
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/include
+)
+
+file(INSTALL
+ ${SOURCE_PATH}/Copyright
+ DESTINATION ${CURRENT_PACKAGES_DIR}/share/plplot
+ RENAME copyright
+)
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE
+ ${CURRENT_PACKAGES_DIR}/debug/share
+)
diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake index 626d6b2e4..bc4e66fcd 100644 --- a/ports/proj4/portfile.cmake +++ b/ports/proj4/portfile.cmake @@ -40,13 +40,17 @@ vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH share/proj4) # Rename library and adapt cmake configuration -file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents) -string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake _contents) + string(REPLACE "proj_4_9.lib" "proj.lib" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-release.cmake "${_contents}") +endif() -file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents) -string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake _contents) + string(REPLACE "proj_4_9_d.lib" "projd.lib" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets-debug.cmake "${_contents}") +endif() file(READ ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake _contents) string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" @@ -55,8 +59,12 @@ string(REPLACE "set(_IMPORT_PREFIX \"${CURRENT_PACKAGES_DIR}\")" ) file(WRITE ${CURRENT_PACKAGES_DIR}/share/proj4/proj4-targets.cmake "${_contents}") -file(RENAME ${CURRENT_PACKAGES_DIR}/lib/proj_4_9.lib ${CURRENT_PACKAGES_DIR}/lib/proj.lib) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/proj_4_9_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/projd.lib) +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() # Remove duplicate headers installed from debug build file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/protobuf/CONTROL b/ports/protobuf/CONTROL index 0cf5b4334..86fecafc5 100644 --- a/ports/protobuf/CONTROL +++ b/ports/protobuf/CONTROL @@ -1,5 +1,5 @@ Source: protobuf -Version: 3.5.1 +Version: 3.5.1-1 Description: Protocol Buffers - Google's data interchange format Feature: zlib diff --git a/ports/protobuf/js-embed.patch b/ports/protobuf/js-embed.patch new file mode 100644 index 000000000..df20fe030 --- /dev/null +++ b/ports/protobuf/js-embed.patch @@ -0,0 +1,25 @@ +diff --git a/cmake/libprotoc.cmake b/cmake/libprotoc.cmake
+index 107c1c5..233bcf6 100644
+--- a/cmake/libprotoc.cmake
++++ b/cmake/libprotoc.cmake
+@@ -73,7 +73,7 @@ set(libprotoc_files
+ ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_message_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/javanano/javanano_primitive_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/js/js_generator.cc
+- ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
++ ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_enum_field.cc
+ ${protobuf_source_dir}/src/google/protobuf/compiler/objectivec/objectivec_extension.cc
+@@ -210,9 +210,9 @@ set(js_well_known_types_sources
+ )
+ add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc)
+ add_custom_command(
+- OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc
+ DEPENDS js_embed ${js_well_known_types_sources}
+- COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc
++ COMMAND "$<TARGET_FILE:js_embed>" ${js_well_known_types_sources} > ${CMAKE_CURRENT_BINARY_DIR}/well_known_types_embed.cc
+ )
+
+ add_library(libprotoc ${protobuf_SHARED_OR_STATIC}
diff --git a/ports/protobuf/portfile.cmake b/ports/protobuf/portfile.cmake index 197a61446..593eebe7d 100644 --- a/ports/protobuf/portfile.cmake +++ b/ports/protobuf/portfile.cmake @@ -8,14 +8,7 @@ vcpkg_download_distfile(ARCHIVE_FILE FILENAME "protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" SHA512 195ccb210229e0a1080dcdb0a1d87b2e421ad55f6b036c56db3183bd50a942c75b4cc84e6af8a10ad88022a247781a06f609a145a461dfbb8f04051b7dd714b3 ) -vcpkg_download_distfile(TOOL_ARCHIVE_FILE - URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip" - FILENAME "protoc-${PROTOC_VERSION}-win32.zip" - SHA512 27b1b82e92d82c35158362435a29f590961b91f68cda21bffe46e52271340ea4587c4e3177668809af0d053b61e6efa69f0f62156ea11393cd9e6eb4474a3049 -) - set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}) -set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32) vcpkg_extract_source_archive(${ARCHIVE_FILE}) @@ -25,19 +18,29 @@ vcpkg_apply_patches( PATCHES "${CMAKE_CURRENT_LIST_DIR}/001-add-compiler-flag.patch" "${CMAKE_CURRENT_LIST_DIR}/export-ParseGeneratorParameter.patch" + "${CMAKE_CURRENT_LIST_DIR}/js-embed.patch" ) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(TOOL_PATH ${CURRENT_BUILDTREES_DIR}/src/protobuf-${PROTOBUF_VERSION}-win32) + vcpkg_download_distfile(TOOL_ARCHIVE_FILE + URLS "https://github.com/google/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-win32.zip" + FILENAME "protoc-${PROTOC_VERSION}-win32.zip" + SHA512 27b1b82e92d82c35158362435a29f590961b91f68cda21bffe46e52271340ea4587c4e3177668809af0d053b61e6efa69f0f62156ea11393cd9e6eb4474a3049 + ) + + vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH}) +endif() -vcpkg_extract_source_archive(${TOOL_ARCHIVE_FILE} ${TOOL_PATH}) # Disable the protobuf compiler when targeting UWP -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) +if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME) set(protobuf_BUILD_COMPILER OFF) else() set(protobuf_BUILD_COMPILER ON) endif() -if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(protobuf_BUILD_SHARED_LIBS ON) else() set(protobuf_BUILD_SHARED_LIBS OFF) @@ -57,6 +60,7 @@ endif() vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH}/cmake + PREFER_NINJA OPTIONS -Dprotobuf_BUILD_SHARED_LIBS=${protobuf_BUILD_SHARED_LIBS} -Dprotobuf_MSVC_STATIC_RUNTIME=${protobuf_MSVC_STATIC_RUNTIME} @@ -81,18 +85,22 @@ endfunction() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/include) -file(READ ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake RELEASE_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}/bin/protoc.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" RELEASE_MODULE "${RELEASE_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") +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.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" RELEASE_MODULE "${RELEASE_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake "${RELEASE_MODULE}") +endif() -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.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" DEBUG_MODULE "${DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}") +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.exe" "\${_IMPORT_PREFIX}/tools/protoc.exe" DEBUG_MODULE "${DEBUG_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}") +endif() protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share) -if (VCPKG_LIBRARY_LINKAGE STREQUAL static) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) else() @@ -107,5 +115,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) endif() file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/protobuf RENAME copyright) -file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(INSTALL ${TOOL_PATH}/bin/protoc.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +endif() vcpkg_copy_pdbs() diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake index fa7d4a326..3fb715aec 100644 --- a/ports/pthreads/portfile.cmake +++ b/ports/pthreads/portfile.cmake @@ -1,6 +1,10 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") message(FATAL_ERROR "${PORT} does not currently support UWP") endif() +if(VCPKG_CMAKE_SYSTEM_NAME) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/pthreads-w32-2-9-1-release) diff --git a/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch b/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch new file mode 100644 index 000000000..a0efc8d1c --- /dev/null +++ b/ports/python3/0004-Fix-iomodule-for-RS4-SDK.patch @@ -0,0 +1,12 @@ +diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
+--- a/Modules/_io/_iomodule.c
++++ b/Modules/_io/_iomodule.c
+@@ -21,7 +21,7 @@
+ #endif /* HAVE_SYS_STAT_H */
+
+ #ifdef MS_WINDOWS
+-#include <consoleapi.h>
++#include <windows.h>
+ #endif
+
+ /* Various interned strings */
diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake index 9bb50b70c..6285f9a9b 100644 --- a/ports/python3/portfile.cmake +++ b/ports/python3/portfile.cmake @@ -1,17 +1,4 @@ -# 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) -# if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static) - # Because the patches patch the same file, they have to be applied in the correct order - # In this scenario, only the second patch needs to be applied, which doesn't work message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.") set(VCPKG_LIBRARY_LINKAGE static) endif() @@ -29,8 +16,16 @@ vcpkg_from_github( REF v${PYTHON_VERSION} SHA512 32cca5e344ee66f08712ab5533e5518f724f978ec98d985f7612d0bd8d7f5cac25625363c9eead192faf1806d4ea3393515f72ba962a2a0bed26261e56d8c637 HEAD_REF master - ) +) + +vcpkg_apply_patches( + SOURCE_PATH ${TEMP_SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0004-Fix-iomodule-for-RS4-SDK.patch +) + # 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}) @@ -87,4 +82,4 @@ endif() file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) file(RENAME ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/copyright) -vcpkg_copy_pdbs()
\ No newline at end of file +vcpkg_copy_pdbs() diff --git a/ports/qt5-declarative/portfile.cmake b/ports/qt5-declarative/portfile.cmake index 63ce79746..1075c9c72 100644 --- a/ports/qt5-declarative/portfile.cmake +++ b/ports/qt5-declarative/portfile.cmake @@ -3,3 +3,5 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) qt_modular_library(qtdeclarative 49b8b50932b73ea39da14ac3425044193dfd64eabceadba379aa01cf2fc141177f9870c387caf1cf93ce09e8b197828a54b8d9fcefc4d9cdf400a6c6dd9a9e90) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools/qt5-declarative/platforminputcontexts)
\ No newline at end of file diff --git a/ports/qt5-quickcontrols/CONTROL b/ports/qt5-quickcontrols/CONTROL index 64806cdca..1d77861b6 100644 --- a/ports/qt5-quickcontrols/CONTROL +++ b/ports/qt5-quickcontrols/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols -Version: 5.9.2-0 +Version: 5.9.2-1 Description: Qt5 QuickControls Module. -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-quickcontrols2/CONTROL b/ports/qt5-quickcontrols2/CONTROL index c600ed225..b46022a10 100644 --- a/ports/qt5-quickcontrols2/CONTROL +++ b/ports/qt5-quickcontrols2/CONTROL @@ -1,4 +1,4 @@ Source: qt5-quickcontrols2 -Version: 5.9.2-0 +Version: 5.9.2-1 Description: Qt5 QuickControls2 Module. -Build-Depends: qt5-modularscripts, qt5-base +Build-Depends: qt5-modularscripts, qt5-base, qt5-declarative diff --git a/ports/qt5-tools/portfile.cmake b/ports/qt5-tools/portfile.cmake index 10eefa959..a79a1b134 100644 --- a/ports/qt5-tools/portfile.cmake +++ b/ports/qt5-tools/portfile.cmake @@ -3,3 +3,5 @@ include(vcpkg_common_functions) include(${CURRENT_INSTALLED_DIR}/share/qt5modularscripts/qt_modular_library.cmake) qt_modular_library(qttools afce063e167de96dfa264cfd27dc8d80c23ef091a30f4f8119575cae83f39716c3b332427630b340f518b82d6396cca1893f28e00f3c667ba201d7e4fc2aefe1) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}//tools/qt5-tools/platforminputcontexts)
\ No newline at end of file diff --git a/ports/quirc/CMakeLists.txt b/ports/quirc/CMakeLists.txt new file mode 100644 index 000000000..8af398bb8 --- /dev/null +++ b/ports/quirc/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 2.8)
+
+project(quirc C)
+
+set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+
+add_library(quirc
+ lib/decode.c
+ lib/identify.c
+ lib/quirc.c
+ lib/version_db.c
+)
+
+install(TARGETS quirc
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+install(FILES ${PROJECT_SOURCE_DIR}/lib/quirc.h DESTINATION include)
diff --git a/ports/quirc/CONTROL b/ports/quirc/CONTROL new file mode 100644 index 000000000..1ba02d889 --- /dev/null +++ b/ports/quirc/CONTROL @@ -0,0 +1,3 @@ +Source: quirc
+Version: 1.0-1
+Description: quirc is one of the C library available for scanning QR Codes
diff --git a/ports/quirc/patch-for-msvc.patch b/ports/quirc/patch-for-msvc.patch new file mode 100644 index 000000000..c755d04a7 --- /dev/null +++ b/ports/quirc/patch-for-msvc.patch @@ -0,0 +1,36 @@ +From 1c1ceecb70ad76751f0b573937380525d7643a87 Mon Sep 17 00:00:00 2001 +From: reyzal <reyzal@163.com> +Date: Sun, 4 Mar 2018 12:09:34 +0800 +Subject: [PATCH] for msvc + +--- + lib/identify.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/lib/identify.c b/lib/identify.c +index bf7bd94..cd16b0a 100644 +--- a/lib/identify.c ++++ b/lib/identify.c +@@ -196,9 +196,9 @@ static void threshold(struct quirc *q) + threshold_s = THRESHOLD_S_MIN; + + for (y = 0; y < q->h; y++) { +- int row_average[q->w]; ++ int *row_average = malloc(q->w * sizeof(int)); + +- memset(row_average, 0, sizeof(row_average)); ++ memset(row_average, 0, q->w * sizeof(int)); + + for (x = 0; x < q->w; x++) { + int w, u; +@@ -229,6 +229,7 @@ static void threshold(struct quirc *q) + } + + row += q->w; ++ free(row_average); + } + } + +-- +2.7.3.windows.1 + diff --git a/ports/quirc/portfile.cmake b/ports/quirc/portfile.cmake new file mode 100644 index 000000000..976c7bc92 --- /dev/null +++ b/ports/quirc/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO dlbeer/quirc
+ REF v1.0
+ SHA512 a556b08f2e2c710648b342fd06a855aa577b2b8c047c45a1c47cf54cde9963faf612978afba80bfd60a6f4f63156566f549ea303f09ed6e5348c1c30f5d77c13
+ HEAD_REF master
+)
+
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_apply_patches(
+ SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/quirc-1.0
+ PATCHES
+ ${CMAKE_CURRENT_LIST_DIR}/patch-for-msvc.patch
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/quirc)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/quirc/license ${CURRENT_PACKAGES_DIR}/share/quirc/copyright)
diff --git a/ports/re2/CONTROL b/ports/re2/CONTROL index 4155e0c64..0a1a4fb1d 100644 --- a/ports/re2/CONTROL +++ b/ports/re2/CONTROL @@ -1,3 +1,3 @@ Source: re2
-Version: 2018-03-07 +Version: 2018-03-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 5274a4213..cec69eb6a 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 c1ed8543f1b703ce200212bb5629ba69a2f9b63a
- SHA512 399a7545d3ac678b068118271aaa710cfae2c9c38e27b07d880f04714bbb13a19c69b94d4acbdb459f199920fee4d3d1a7e23e22a364c89b3c8b7100ce9b208e
+ REF f2cc1aeb5de463c45d020c446cbcb028385b49f3 + SHA512 68df93cac6916cf5d944b57de505f7c592dcc66bbe003dbaffdf88cfd6648787a272740a861d8c8440ff2888434776141a7710b326907687285f8e9340be127c
HEAD_REF master
)
diff --git a/ports/readosm/portfile.cmake b/ports/readosm/portfile.cmake index c26934685..5bd5a134f 100644 --- a/ports/readosm/portfile.cmake +++ b/ports/readosm/portfile.cmake @@ -30,34 +30,38 @@ endif() ################ # Debug build ################ -message(STATUS "Building ${TARGET_TRIPLET}-dbg") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") -file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) -vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" - "LIBS_ALL=${LIBS_ALL_DBG}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-debug -) -vcpkg_copy_pdbs() -message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" + "LIBS_ALL=${LIBS_ALL_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug + ) + vcpkg_copy_pdbs() + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") +endif() ################ # Release build ################ -message(STATUS "Building ${TARGET_TRIPLET}-rel") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") -file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) -vcpkg_execute_required_process( - COMMAND ${NMAKE} -f makefile.vc clean install - INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" - "LIBS_ALL=${LIBS_ALL_REL}" - WORKING_DIRECTORY ${SOURCE_PATH} - LOGNAME nmake-build-${TARGET_TRIPLET}-release -) -message(STATUS "Building ${TARGET_TRIPLET}-rel done") + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" + "LIBS_ALL=${LIBS_ALL_REL}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-release + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") +endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/readosm RENAME copyright) @@ -70,8 +74,12 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static) else() file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) + endif() endif() diff --git a/ports/rocksdb/0001-third-party.patch b/ports/rocksdb/0001-third-party.patch deleted file mode 100644 index c28181623..000000000 --- a/ports/rocksdb/0001-third-party.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 533ab1b3f3f4286aa756e965e22aa88612479e01 Mon Sep 17 00:00:00 2001 -From: Robert Schumacher <roschuma@microsoft.com> -Date: Fri, 23 Feb 2018 01:44:44 -0800 -Subject: [PATCH 1/3] third-party - ---- - thirdparty.inc | 32 ++++++++++++++++---------------- - 1 file changed, 16 insertions(+), 16 deletions(-) - -diff --git a/thirdparty.inc b/thirdparty.inc -index a364d1d..1d85d50 100644 ---- a/thirdparty.inc -+++ b/thirdparty.inc -@@ -19,10 +19,10 @@ set (THIRDPARTY_LIBS "") # Initialization, don't touch - # - # Edit these 4 lines to define paths to GFLAGS - # --set(GFLAGS_HOME $ENV{THIRDPARTY_HOME}/Gflags.Library) --set(GFLAGS_INCLUDE ${GFLAGS_HOME}/inc/include) --set(GFLAGS_LIB_DEBUG ${GFLAGS_HOME}/bin/debug/amd64/gflags.lib) --set(GFLAGS_LIB_RELEASE ${GFLAGS_HOME}/bin/retail/amd64/gflags.lib) -+set(GFLAGS_HOME ${CURRENT_INSTALLED_DIR}) -+set(GFLAGS_INCLUDE ${GFLAGS_HOME}/include) -+find_library(GFLAGS_LIB_DEBUG NAMES gflags gflags_static) -+set(GFLAGS_LIB_RELEASE ${GFLAGS_LIB_DEBUG}) - - # ================================================== GFLAGS ================================================== - # -@@ -63,10 +63,10 @@ endif () - # - # Edit these 4 lines to define paths to Snappy - # --set(SNAPPY_HOME $ENV{THIRDPARTY_HOME}/Snappy.Library) --set(SNAPPY_INCLUDE ${SNAPPY_HOME}/inc/inc) --set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/bin/debug/amd64/snappy.lib) --set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/bin/retail/amd64/snappy.lib) -+set(SNAPPY_HOME ${CURRENT_INSTALLED_DIR}) -+set(SNAPPY_INCLUDE ${SNAPPY_HOME}/include) -+set(SNAPPY_LIB_DEBUG ${SNAPPY_HOME}/debug/lib/snappy.lib) -+set(SNAPPY_LIB_RELEASE ${SNAPPY_HOME}/lib/snappy.lib) - - # - # Don't touch these lines -@@ -106,10 +106,10 @@ endif () - # - # Edit these 4 lines to define paths to LZ4 - # --set(LZ4_HOME $ENV{THIRDPARTY_HOME}/LZ4.Library) --set(LZ4_INCLUDE ${LZ4_HOME}/inc/include) --set(LZ4_LIB_DEBUG ${LZ4_HOME}/bin/debug/amd64/lz4.lib) --set(LZ4_LIB_RELEASE ${LZ4_HOME}/bin/retail/amd64/lz4.lib) -+set(LZ4_HOME ${CURRENT_INSTALLED_DIR}) -+set(LZ4_INCLUDE ${LZ4_HOME}/include) -+set(LZ4_LIB_DEBUG ${LZ4_HOME}/debug/lib/lz4.lib) -+set(LZ4_LIB_RELEASE ${LZ4_HOME}/lib/lz4.lib) - - # - # Don't touch these lines -@@ -149,10 +149,10 @@ endif () - # - # Edit these 4 lines to define paths to ZLIB - # --set(ZLIB_HOME $ENV{THIRDPARTY_HOME}/ZLIB.Library) --set(ZLIB_INCLUDE ${ZLIB_HOME}/inc/include) --set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/bin/debug/amd64/zlib.lib) --set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/bin/retail/amd64/zlib.lib) -+set(ZLIB_HOME ${CURRENT_INSTALLED_DIR}) -+set(ZLIB_INCLUDE ${ZLIB_HOME}/include) -+set(ZLIB_LIB_DEBUG ${ZLIB_HOME}/debug/lib/zlibd.lib) -+set(ZLIB_LIB_RELEASE ${ZLIB_HOME}/lib/zlib.lib) - - # - # Don't touch these lines --- -2.16.2.windows.1 - diff --git a/ports/rocksdb/CONTROL b/ports/rocksdb/CONTROL index 19383f54a..90511f0b2 100644 --- a/ports/rocksdb/CONTROL +++ b/ports/rocksdb/CONTROL @@ -1,4 +1,4 @@ Source: rocksdb -Version: 5.10.4-1 +Version: 5.11.3 Description: A library that provides an embeddable, persistent key-value store for fast storage -Build-Depends: snappy, lz4, zlib, gtest +Build-Depends: zlib diff --git a/ports/rocksdb/portfile.cmake b/ports/rocksdb/portfile.cmake index 740c40114..e37b79633 100644 --- a/ports/rocksdb/portfile.cmake +++ b/ports/rocksdb/portfile.cmake @@ -1,25 +1,23 @@ include(vcpkg_common_functions) -if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") - message(FATAL_ERROR "Rocksdb only supports x64") -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO facebook/rocksdb - REF v5.10.4 - SHA512 42841f2e2ca7dee6e88b0539e997cc365a50161c234e5878e30757022114335c613f6d642a0af2bdc7fdb97d09ed79f4e12454d456f1f7fa1a6489c32540460a + REF rocksdb-5.11.3 + SHA512 a4c771e36056ee0da497202b25092d89799db43573a442568b4392b8478ac20320dabf4c904e93bd0641a32f249e9c8dcad0d67577acaee6902cd4d30f29ce57 HEAD_REF master ) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} PATCHES - "${CMAKE_CURRENT_LIST_DIR}/0001-third-party.patch" "${CMAKE_CURRENT_LIST_DIR}/0002-disable-gtest.patch" "${CMAKE_CURRENT_LIST_DIR}/0003-only-build-one-flavor.patch" + "${CMAKE_CURRENT_LIST_DIR}/use-find-package.patch" ) +file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake") + if(VCPKG_CRT_LINKAGE STREQUAL "static") set(WITH_MD_LIBRARY OFF) else() @@ -33,17 +31,19 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DGFLAGS=1 - -DSNAPPY=1 - -DLZ4=1 - -DZLIB=1 + -DWITH_GFLAGS=0 + -DWITH_SNAPPY=0 + -DWITH_LZ4=0 + -DWITH_ZLIB=1 -DWITH_TESTS=OFF -DROCKSDB_INSTALL_ON_WINDOWS=ON -DFAIL_ON_WARNINGS=OFF -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} + -DPORTABLE=ON + -DCMAKE_DEBUG_POSTFIX=d -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} - -DROCKSDB_VERSION=5.10.3 + -DROCKSDB_VERSION=5.11.3 -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} -DCMAKE_DISABLE_FIND_PACKAGE_TBB=TRUE -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE diff --git a/ports/rocksdb/use-find-package.patch b/ports/rocksdb/use-find-package.patch new file mode 100644 index 000000000..1a79c2286 --- /dev/null +++ b/ports/rocksdb/use-find-package.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f3ac9ce..931e9f2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -45,7 +45,7 @@ option(WITH_JEMALLOC "build with JeMalloc" OFF)
+ option(WITH_SNAPPY "build with SNAPPY" OFF)
+ option(WITH_LZ4 "build with lz4" OFF)
+ option(WITH_ZLIB "build with zlib" OFF)
+-if(MSVC)
++if(MSVC AND NOT VCPKG_TOOLCHAIN)
+ # Defaults currently different for GFLAGS.
+ # We will address find_package work a little later
+ option(WITH_GFLAGS "build with GFlags" OFF)
diff --git a/ports/rs-core-lib/CONTROL b/ports/rs-core-lib/CONTROL index 3e276f649..03e5f4955 100644 --- a/ports/rs-core-lib/CONTROL +++ b/ports/rs-core-lib/CONTROL @@ -1,4 +1,4 @@ Source: rs-core-lib -Version: 2018-03-07 +Version: 2018-03-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 e5a2f8c8c..47e31c9bf 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 3127d573eb15007f878a3cbab7faa8be3255df44 - SHA512 96b08485567547296dbe1d70bedc4d1e59d432b03c468eab83b0b436d2f92b6e51aa5571c039db65abe6797a88c9cf26048539f773bce58c38789384f1a495c3 + REF c5b4522c336cd2348c9b65b01802ef1c4865fca2 + SHA512 a720d2f4cf6ef9dda1ce3e6bccf1495a8d29d3765d7456a5e8b79342ddc13f68428d17ea1e2993cb181450b0c2dca4c377735eef0f2f2e8a6bd66e6f2b78fd6a HEAD_REF master ) diff --git a/ports/sciter/CONTROL b/ports/sciter/CONTROL index 23a588b37..e81549a8a 100644 --- a/ports/sciter/CONTROL +++ b/ports/sciter/CONTROL @@ -1,4 +1,4 @@ Source: sciter -Version: 4.1.3 +Version: 4.1.4 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 b6f1685a1..ca48f53c3 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 9ba9e27690e9ef4e97f415822fb738e0f36c574e) -set(SCITER_SHA d4e7d204b67e454ba753524fb1d61887fcaeae256abb81297afc0aa7795f1acb21754ef368700dfa919717f23ca1bbb16498de1ad84c94ac7c2fc295f67f91c8) +set(SCITER_REVISION eb0d385af8f426788870cc75522379f67854799c) +set(SCITER_SHA b785f370b27f759e0bec370f413c85b21d82a7cb76b3cbaa50c885b713453a325ff7ace042e263fafec7695c50370bb589597a9877816716bae9a4b4479f54fe) if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) set(SCITER_ARCH 64) diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL index ffebda760..6f39484dd 100644 --- a/ports/sdl2/CONTROL +++ b/ports/sdl2/CONTROL @@ -1,3 +1,3 @@ Source: sdl2 -Version: 2.0.8 +Version: 2.0.8-1 Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake index 572fef829..5d7ac5314 100644 --- a/ports/sdl2/portfile.cmake +++ b/ports/sdl2/portfile.cmake @@ -32,14 +32,40 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") + vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") +elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/SDL2") + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/SDL2") +elseif(EXISTS "${CURRENT_PACKAGES_DIR}/SDL2.framework/Resources") + vcpkg_fixup_cmake_targets(CONFIG_PATH "SDL2.framework/Resources") +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/bin/sdl2-config + ${CURRENT_PACKAGES_DIR}/debug/bin/sdl2-config + ${CURRENT_PACKAGES_DIR}/SDL2.framework + ${CURRENT_PACKAGES_DIR}/debug/SDL2.framework +) -vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") +file(GLOB BINS ${CURRENT_PACKAGES_DIR}/debug/bin/* ${CURRENT_PACKAGES_DIR}/bin/*) +if(NOT BINS) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() -if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib) - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib) +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib) + endif() file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake) foreach(SHARE_FILE ${SHARE_FILES}) diff --git a/ports/signalrclient/CONTROL b/ports/signalrclient/CONTROL index ae3ae47c1..fe8aa7dc5 100644 --- a/ports/signalrclient/CONTROL +++ b/ports/signalrclient/CONTROL @@ -1,4 +1,4 @@ Source: signalrclient -Version: 1.0.0-beta1-2 +Version: 1.0.0-beta1-3 Build-Depends: cpprestsdk Description: C++ client for SignalR. diff --git a/ports/signalrclient/portfile.cmake b/ports/signalrclient/portfile.cmake index bf2669569..50f6b0b89 100644 --- a/ports/signalrclient/portfile.cmake +++ b/ports/signalrclient/portfile.cmake @@ -1,12 +1,14 @@ include(vcpkg_common_functions) set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SignalR-Client-Cpp-1.0.0-beta1) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/aspnet/SignalR-Client-Cpp/archive/1.0.0-beta1.tar.gz" - FILENAME "SignalR-Client-Cpp-1.0.0-beta1.tar.gz" + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SignalR/SignalR-Client-Cpp + REF 1.0.0-beta1 SHA512 b38f6f946f1499080071949cbcf574405118f9acfb469441e5b5b0df3e5f0d277a83b30e0d613dc5e54732b9071e3273dac1ee65129f994d5a60eef0e45bdf6c + HEAD_REF master ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} diff --git a/ports/snappy/CONTROL b/ports/snappy/CONTROL index 230383955..d90f5039c 100644 --- a/ports/snappy/CONTROL +++ b/ports/snappy/CONTROL @@ -1,3 +1,3 @@ Source: snappy -Version: 1.1.7-1 +Version: 1.1.7-2 Description: A fast compressor/decompressor. diff --git a/ports/snappy/portfile.cmake b/ports/snappy/portfile.cmake index f0169c8f2..c88ff60eb 100644 --- a/ports/snappy/portfile.cmake +++ b/ports/snappy/portfile.cmake @@ -12,7 +12,8 @@ vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA OPTIONS - -DSNAPPY_BUILD_TESTS=OFF) + -DSNAPPY_BUILD_TESTS=OFF + -DCMAKE_DEBUG_POSTFIX=d) vcpkg_install_cmake() vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Snappy) diff --git a/ports/sqlite-orm/CONTROL b/ports/sqlite-orm/CONTROL new file mode 100644 index 000000000..893a0dfe9 --- /dev/null +++ b/ports/sqlite-orm/CONTROL @@ -0,0 +1,4 @@ +Source: sqlite-orm +Version: 1.1 +Build-Depends: sqlite3 +Description: SQLite ORM light header only library for modern C++ diff --git a/ports/sqlite-orm/portfile.cmake b/ports/sqlite-orm/portfile.cmake new file mode 100644 index 000000000..876bbd0e3 --- /dev/null +++ b/ports/sqlite-orm/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fnc12/sqlite_orm + REF v1.1 + SHA512 ebd3c956660b90b1ea64420374db009c68cbab1edd3694d15e953c968190c066e084934327dcf674bcea31e23b14d32c54af7e9ba54f7c6036c3e7cb7cdc6c8d + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/sqlite_orm DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlite-orm RENAME copyright) diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index f0d6df1ac..7d6e20dee 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -10,7 +10,7 @@ endif() add_library(sqlite3 sqlite3.c) target_compile_definitions(sqlite3 PRIVATE - $<$<CONFIG:Debug>:-DSQLITE_DEBUG> + $<$<CONFIG:Debug>:SQLITE_DEBUG> ${API} -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_UNLOCK_NOTIFY diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index 031eefbf2..d6596e7b2 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -28,9 +28,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake()
-file(READ ${CURRENT_PACKAGES_DIR}/debug/share/sqlite3/sqlite3Config-debug.cmake SQLITE3_DEBUG_CONFIG)
-string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SQLITE3_DEBUG_CONFIG "${SQLITE3_DEBUG_CONFIG}")
-file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3Config-debug.cmake "${SQLITE3_DEBUG_CONFIG}")
+if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ file(READ ${CURRENT_PACKAGES_DIR}/debug/share/sqlite3/sqlite3Config-debug.cmake SQLITE3_DEBUG_CONFIG)
+ string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SQLITE3_DEBUG_CONFIG "${SQLITE3_DEBUG_CONFIG}")
+ file(WRITE ${CURRENT_PACKAGES_DIR}/share/sqlite3/sqlite3Config-debug.cmake "${SQLITE3_DEBUG_CONFIG}")
+endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
diff --git a/ports/szip/portfile.cmake b/ports/szip/portfile.cmake index 9fcd22ba1..c98f0e025 100644 --- a/ports/szip/portfile.cmake +++ b/ports/szip/portfile.cmake @@ -26,11 +26,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -file(RENAME ${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING ${CURRENT_PACKAGES_DIR}/share/szip/copyright) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/szip) -file(READ ${CURRENT_PACKAGES_DIR}/debug/share/szip/szip-targets-debug.cmake SZIP_TARGETS_DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" SZIP_TARGETS_DEBUG_MODULE "${SZIP_TARGETS_DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/szip/szip-targets-debug.cmake "${SZIP_TARGETS_DEBUG_MODULE}") +file(RENAME ${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING ${CURRENT_PACKAGES_DIR}/share/szip/copyright) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/ports/tap-windows6/CONTROL b/ports/tap-windows6/CONTROL new file mode 100644 index 000000000..744247c32 --- /dev/null +++ b/ports/tap-windows6/CONTROL @@ -0,0 +1,3 @@ +Source: tap-windows6 +Version: 9.21.2-0e30f5c +Description: an NDIS 6 implementation of the TAP-Windows driver, used by OpenVPN and other apps. Note: This package only contains the headers for the driver.
\ No newline at end of file diff --git a/ports/tap-windows6/portfile.cmake b/ports/tap-windows6/portfile.cmake new file mode 100644 index 000000000..4e2725d1e --- /dev/null +++ b/ports/tap-windows6/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenVPN/tap-windows6 + REF 0e30f5c13b3c7b0bdd60da915350f653e4c14d92 + SHA512 88edecccd4818091f7d70b66f3dfa07146f010a064829dc971abdd0c180ce1f72db9d8f3a1c9f5b4fb3f31e7afe3eadbd7d6f7d711f698e723441d30beaf9e30 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/src/tap-windows.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL + ${SOURCE_PATH}/COPYRIGHT.MIT + DESTINATION ${CURRENT_PACKAGES_DIR}/share/tap-windows6 RENAME copyright) diff --git a/ports/telnetpp/portfile.cmake b/ports/telnetpp/portfile.cmake index e52d69877..1859ad4a2 100644 --- a/ports/telnetpp/portfile.cmake +++ b/ports/telnetpp/portfile.cmake @@ -44,4 +44,4 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/telnetpp/telnetpp-config-debug.cmake "$ vcpkg_copy_pdbs() # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME COPYRIGHT) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME copyright) diff --git a/ports/thrift/CONTROL b/ports/thrift/CONTROL index d63ec0011..1e0037736 100644 --- a/ports/thrift/CONTROL +++ b/ports/thrift/CONTROL @@ -1,4 +1,4 @@ Source: thrift -Version: 2018-03-07 +Version: 2018-03-20 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 b5274c6a4..968a5b109 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 b4f22ff30119ea5cadf9b16e97afdcabefe06696 - SHA512 3b63ed69a69b015ef7a2eaa94854b4ab2801c9c7af749b97d7999f4861f4df5a623da4e5b054dadaf4aa48a04c8e010b820d4382de9ef82b191a0d64ddf3181d + REF 22bd3450c6e97e348d64fb6a75171e8ced79d1e4 + SHA512 5774fd332daac80891ac25c6188e415bf5335ffecc636dc120500f03b6ae23f9317c65dbc703cc89946a894f12c6805f396fd42e763d1e0d3ccfe6398357d321 HEAD_REF master ) diff --git a/ports/tiny-dnn/CONTROL b/ports/tiny-dnn/CONTROL index 2a53311cb..6468f2473 100644 --- a/ports/tiny-dnn/CONTROL +++ b/ports/tiny-dnn/CONTROL @@ -1,3 +1,3 @@ Source: tiny-dnn -Version: 2018-03-07 +Version: 2018-03-13 Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/ports/tiny-dnn/portfile.cmake b/ports/tiny-dnn/portfile.cmake index bb4fc9fcf..151f5dbee 100644 --- a/ports/tiny-dnn/portfile.cmake +++ b/ports/tiny-dnn/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO tiny-dnn/tiny-dnn - REF 4a59e4cc8799b3a768618cb157a2edc9d0f05b91 - SHA512 408cfec895140d10c9a498ce78da3ad1e11c245a05c05c5cd82ccedd100fbadad7fb02a4e4c2cb924f8d2c35eca31176dd8270927b5d8376946a237066b10795 + REF 1c5259477b8b4eab376cc19fd1d55ae965ef5e5a + SHA512 756b8e3d5d00b44973bbae2c0bedbe15206bce479dc70ae5fc89f455772deadc05503afd7abcae2048aeabefd7a45cba0fae38555df7e0d9eb33e9feed21b099 HEAD_REF master ) diff --git a/ports/tinyxml2/CONTROL b/ports/tinyxml2/CONTROL index 70bc8c107..1df7e49f2 100644 --- a/ports/tinyxml2/CONTROL +++ b/ports/tinyxml2/CONTROL @@ -1,3 +1,3 @@ Source: tinyxml2 -Version: 6.0.0 +Version: 6.0.0-2 Description: A simple, small, efficient, C++ XML parser diff --git a/ports/tinyxml2/portfile.cmake b/ports/tinyxml2/portfile.cmake index cf8373e4f..0a7c887c5 100644 --- a/ports/tinyxml2/portfile.cmake +++ b/ports/tinyxml2/portfile.cmake @@ -29,6 +29,9 @@ 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}/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2) +file(COPY + ${SOURCE_PATH}/readme.md + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml2 +) file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyxml2/readme.md ${CURRENT_PACKAGES_DIR}/share/tinyxml2/copyright) diff --git a/ports/tinyxml2/vcpkg-cmake-wrapper.cmake b/ports/tinyxml2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..867426f1e --- /dev/null +++ b/ports/tinyxml2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,5 @@ +_find_package(${ARGS})
+if(TARGET tinyxml2_static AND NOT TARGET tinyxml2)
+ _add_library(tinyxml2 INTERFACE IMPORTED)
+ set_target_properties(tinyxml2 PROPERTIES INTERFACE_LINK_LIBRARIES "tinyxml2_static")
+endif()
diff --git a/ports/unicorn-lib/CONTROL b/ports/unicorn-lib/CONTROL index 23967af57..2c742eedc 100644 --- a/ports/unicorn-lib/CONTROL +++ b/ports/unicorn-lib/CONTROL @@ -1,4 +1,4 @@ Source: unicorn-lib -Version: 2018-02-25 +Version: 2018-03-13 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 46a7fc67c..c76da4fa3 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 1ee9ca81e62c1916a08522523ca21a46a5005ad5 - SHA512 b61f8b993d46e4750ccb14aa98dee3b9f3d9de54d2dfa60af4fabb338f04348c450089fa331e7d63342698f39168d660452fb49fb707c1a6647553ec494355bb + REF 8fc132c879e748a61c9e4b6a93a6de209b55dbe5 + SHA512 f70d9fd9c06b4bf7a771abfacd1f989f03ea51395b6819b1162a13954e680d49622e48b61b71195c598ac21861435c6c5fe8ff368880098a07eb4b86547eede0 HEAD_REF master ) diff --git a/ports/unicorn/CONTROL b/ports/unicorn/CONTROL index f1856bac6..6d907bd94 100644 --- a/ports/unicorn/CONTROL +++ b/ports/unicorn/CONTROL @@ -1,3 +1,3 @@ Source: unicorn -Version: 2018-02-25 +Version: 2018-03-20 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 66ba738c0..bec0088ed 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 dab5060005facc38ef6500496ae7f7bd90e4fdb7 - SHA512 42b656a9d6b8091aaed5729658d7dd94064a9c9c43ad33ca474917b0830b760ee81a37a6eec84848d8aa6784d01568649f036383a8953c3e1de2616b053c682e + REF 9a01ae8379b0a4bc37cf50f7aeba63fddeb523c4 + SHA512 04d5e850bc1ba36856052be5a4e2a433db8d229ae90b2fbf6a5bf32c9dc86829518a8882d331d0bc7d42a23e9f5c43d6609a20dcca388c717940c081ff21b3a4 HEAD_REF master ) diff --git a/ports/uvatlas/portfile.cmake b/ports/uvatlas/portfile.cmake index 79dc605f1..ae7e9f285 100644 --- a/ports/uvatlas/portfile.cmake +++ b/ports/uvatlas/portfile.cmake @@ -1,11 +1,3 @@ -# 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}
-#
-
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(STATUS "Warning: Dynamic building not supported yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
@@ -13,6 +5,9 @@ endif() if (VCPKG_CRT_LINKAGE STREQUAL static)
message(FATAL_ERROR "UVAtlas does not currently support static crt linkage")
endif()
+if(VCPKG_CMAKE_SYSTEM_NAME)
+ message(FATAL_ERROR "UVAtlas only supports Windows Desktop")
+endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/UVAtlas-sept2016)
@@ -23,7 +18,7 @@ vcpkg_download_distfile(ARCHIVE )
vcpkg_extract_source_archive(${ARCHIVE})
-IF (TRIPLET_SYSTEM_ARCH MATCHES "x86")
+IF(TRIPLET_SYSTEM_ARCH MATCHES "x86")
SET(BUILD_ARCH "Win32")
ELSE()
SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH})
diff --git a/ports/wtl/CONTROL b/ports/wtl/CONTROL index 6f8b6208e..bab8da1f2 100644 --- a/ports/wtl/CONTROL +++ b/ports/wtl/CONTROL @@ -1,5 +1,5 @@ Source: wtl Maintainer: jfrederich@gmail.com -Version: 9.1 +Version: 10.0 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 c8d8c6c34..d992b276a 100644 --- a/ports/wtl/portfile.cmake +++ b/ports/wtl/portfile.cmake @@ -1,9 +1,9 @@ #header-only library include(vcpkg_common_functions) vcpkg_download_distfile(ARCHIVE - URLS "http://downloads.sourceforge.net/project/wtl/WTL%209.1/WTL%209.1.5321%20Final/WTL91_5321_Final.zip?r=&ts=1477467616&use_mirror=netix" - FILENAME "WTL91_5321_Final.zip" - SHA512 52c583f6773839f7ad7fccf0ecba44ad00f41af4ae97d217619cc380ea9b71b90638ae35a5995f9eb08854db423896fec5f06b5cbd853f118eeddd05238a460a + URLS "http://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}) @@ -13,3 +13,4 @@ file(COPY ${CURRENT_BUILDTREES_DIR}/src/MS-PL.txt DESTINATION ${CURRENT_PACKAGES 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) diff --git a/ports/xalan-c/portfile.cmake b/ports/xalan-c/portfile.cmake index 55dd9f143..4f4da9143 100644 --- a/ports/xalan-c/portfile.cmake +++ b/ports/xalan-c/portfile.cmake @@ -45,15 +45,15 @@ endif() vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/c/projects/Win32/VC10/AllInOne/AllInOne.vcxproj PLATFORM ${BUILD_ARCH} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets) + USE_VCPKG_INTEGRATION +) # This is needed to generate the required LocalMsgIndex.hpp header vcpkg_build_msbuild( PROJECT_PATH ${SOURCE_PATH}/c/projects/Win32/VC10/Utils/XalanMsgLib/XalanMsgLib.vcxproj PLATFORM ${BUILD_ARCH} - # Need this for it to pick up xerces-c port: https://github.com/Microsoft/vcpkg/issues/891 - OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets) + USE_VCPKG_INTEGRATION +) file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/XalanMessages_1_11D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) file(COPY ${SOURCE_PATH}/c/Build/${OUTPUT_DIR}/VC10/Debug/Xalan-C_1_11D.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake index 0fc4f05b6..071931f64 100644 --- a/ports/yaml-cpp/portfile.cmake +++ b/ports/yaml-cpp/portfile.cmake @@ -17,7 +17,12 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/yaml-cpp) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/yaml-cpp) +endif() # Adjust paths and remove hardcoded ones from the config files file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-config.cmake YAML_CONFIG) @@ -32,7 +37,14 @@ get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH) get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" YAML_CONFIG "${YAML_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets.cmake "${YAML_CONFIG}") -foreach(CONF debug release) +set(_targets_cmake_conf) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND _targets_cmake_conf "debug") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + list(APPEND _targets_cmake_conf "release") +endif() +foreach(CONF ${_targets_cmake_conf}) file(READ ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake YAML_CONFIG) string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" YAML_CONFIG "${YAML_CONFIG}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/yaml-cpp-targets-${CONF}.cmake "${YAML_CONFIG}") diff --git a/ports/yoga/portfile.cmake b/ports/yoga/portfile.cmake index ba13192c8..e6dc1c709 100644 --- a/ports/yoga/portfile.cmake +++ b/ports/yoga/portfile.cmake @@ -33,8 +33,12 @@ vcpkg_build_cmake() vcpkg_copy_pdbs() file(INSTALL ${SOURCE_PATH}/yoga DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) -file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/yogacore.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() vcpkg_copy_pdbs() diff --git a/ports/zeromq/CONTROL b/ports/zeromq/CONTROL index 2e876f6e1..4ea44046b 100644 --- a/ports/zeromq/CONTROL +++ b/ports/zeromq/CONTROL @@ -1,3 +1,3 @@ Source: zeromq -Version: 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-2 +Version: 2018-03-20 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 e5a5d567b..062ed6b48 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 18498f620f0f6d4076981ea16eb5760fe4d28dc2 - SHA512 0c4a5c72455411f47283da3cad381600101be19a62437ad8e2c38e5f18fb6d621a3136e402c6eb9ba153f3d6333da9902335c2dacd8405094d4d1269df28d4af + REF 15b3dccf47179a88311c84d6ef250565abd05182 + SHA512 568d315f48c194f7db3df59ecf70a6625e916a4c258a3f5ad1d7b9e5899afd6a7d825f4fb8811cb49dcd752142952a9bd6e4c31af6572373462a4821d6a1a2bd HEAD_REF master ) @@ -31,7 +31,12 @@ vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/ZeroMQ) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) +endif() file(READ ${CURRENT_PACKAGES_DIR}/share/zeromq/ZeroMQConfig.cmake _contents) if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") diff --git a/ports/zlib/portfile.cmake b/ports/zlib/portfile.cmake index 291180a29..d924e2135 100644 --- a/ports/zlib/portfile.cmake +++ b/ports/zlib/portfile.cmake @@ -32,6 +32,8 @@ vcpkg_install_cmake() if(VCPKG_LIBRARY_LINKAGE STREQUAL static) if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/zlibstatic.lib ${CURRENT_PACKAGES_DIR}/lib/zlib.lib) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/zlibstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/zlibd.lib) endif() endif() diff --git a/ports/zstd/portfile.cmake b/ports/zstd/portfile.cmake index 874b5ec93..c69ee0cd0 100644 --- a/ports/zstd/portfile.cmake +++ b/ports/zstd/portfile.cmake @@ -32,7 +32,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) foreach(HEADER zdict.h zstd.h zstd_errors.h) diff --git a/ports/zziplib/CONTROL b/ports/zziplib/CONTROL index 2b7447609..4d4f7ea58 100644 --- a/ports/zziplib/CONTROL +++ b/ports/zziplib/CONTROL @@ -1,4 +1,4 @@ Source: zziplib -Version: 0.13.62-1 +Version: 0.13.69 Build-Depends: zlib Description: library providing read access on ZIP-archives diff --git a/ports/zziplib/portfile.cmake b/ports/zziplib/portfile.cmake index 68419be3b..2ff90af94 100644 --- a/ports/zziplib/portfile.cmake +++ b/ports/zziplib/portfile.cmake @@ -2,8 +2,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO gdraheim/zziplib - REF v0.13.68 - SHA512 e8a9976242acc04064ec239b9b929228370a946e5bd37092adcc1bda14605710a3850d39795d1937b609d1ab9a9a1998152f8c88b2dccc387ac6ec774d9cfce9 + REF v0.13.69 + SHA512 ade026289737f43ca92a8746818d87dd7618d473dbce159546ce9071c9e4cbe164a6b1c9efff16efb7aa0327b2ec6b34f3256c6bda19cd6e325703fffc810ef0 ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index 2dbf04085..d9c9e3760 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -140,6 +140,7 @@ function vcpkgDownloadFile( [Parameter(Mandatory=$true)][string]$url, { 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" } } @@ -172,10 +173,6 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, vcpkgRemoveItem $destinationPartial vcpkgCreateDirectoryIfNotExists $destinationPartial - $shell = new-object -com shell.application - $zip = $shell.NameSpace($(Get-Item $file).fullname) - $itemCount = $zip.Items().Count - if (vcpkgHasCommand -commandName 'Microsoft.PowerShell.Archive\Expand-Archive') { Write-Verbose("Extracting with Microsoft.PowerShell.Archive\Expand-Archive") @@ -189,6 +186,8 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, else { Write-Verbose("Extracting via shell") + $shell = new-object -com shell.application + $zip = $shell.NameSpace($(Get-Item $file).fullname) foreach($item in $zip.items()) { # Piping to Out-Null is used to block until finished @@ -196,6 +195,8 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, } } + $itemCount = @(Get-ChildItem "$destinationPartial").Count + if ($itemCount -eq 1) { Move-Item -Path "$destinationPartial\*" -Destination $output diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index ce5efc1de..10e3c3f13 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -57,12 +57,14 @@ endif() if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") set(_VCPKG_TARGET_TRIPLET_PLAT uwp) -elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")) set(_VCPKG_TARGET_TRIPLET_PLAT linux) -elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")) set(_VCPKG_TARGET_TRIPLET_PLAT osx) -else() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")) set(_VCPKG_TARGET_TRIPLET_PLAT windows) +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")) + set(_VCPKG_TARGET_TRIPLET_PLAT freebsd) endif() set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") @@ -184,23 +186,17 @@ function(add_library name) endfunction() macro(find_package name) - if("${name}" STREQUAL "Boost") - set(_Boost_USE_STATIC_LIBS ${Boost_USE_STATIC_LIBS}) - set(_Boost_USE_MULTITHREADED ${Boost_USE_MULTITHREADED}) - set(_Boost_USE_STATIC_RUNTIME ${Boost_USE_STATIC_RUNTIME}) - set(_Boost_COMPILER ${Boost_COMPILER}) + string(TOLOWER "${name}" _vcpkg_lowercase_name) + if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake") + set(ARGS "${ARGV}") + include(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake) + elseif("${name}" STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost") + # Checking for the boost headers disables this wrapper unless the user has installed at least one boost library unset(Boost_USE_STATIC_LIBS) unset(Boost_USE_MULTITHREADED) unset(Boost_USE_STATIC_RUNTIME) set(Boost_COMPILER "-vc140") _find_package(${ARGV}) - if(NOT Boost_FOUND) - set(Boost_USE_STATIC_LIBS ${_Boost_USE_STATIC_LIBS}) - set(Boost_USE_MULTITHREADED ${_Boost_USE_MULTITHREADED}) - set(Boost_USE_STATIC_RUNTIME ${_Boost_USE_STATIC_RUNTIME}) - set(Boost_COMPILER ${_Boost_COMPILER}) - _find_package(${ARGV}) - endif() elseif("${name}" STREQUAL "ICU") function(_vcpkg_find_in_list) list(FIND ARGV "COMPONENTS" COMPONENTS_IDX) diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index bdf192792..630662588 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -15,6 +15,9 @@ ## 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 @@ -27,7 +30,7 @@ ## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) ## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) function(vcpkg_build_cmake) - cmake_parse_arguments(_bc "DISABLE_PARALLEL" "TARGET;LOGFILE_ROOT" "" ${ARGN}) + cmake_parse_arguments(_bc "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_ROOT" "" ${ARGN}) if(NOT _bc_LOGFILE_ROOT) set(_bc_LOGFILE_ROOT "build") @@ -65,20 +68,24 @@ function(vcpkg_build_cmake) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) if(BUILDTYPE STREQUAL "debug") set(SHORT_BUILDTYPE "dbg") + set(CONFIG "Debug") else() set(SHORT_BUILDTYPE "rel") + set(CONFIG "Release") endif() message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") set(LOGPREFIX "${CURRENT_BUILDTREES_DIR}/${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") set(LOGS) - if(BUILDTYPE STREQUAL "release") - set(CONFIG "Release") - else() - set(CONFIG "Debug") + if(_bc_ADD_BIN_TO_PATH) + set(_BACKUP_ENV_PATH "$ENV{PATH}") + if(BUILDTYPE STREQUAL "debug") + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin;$ENV{PATH}") + else() + set(ENV{PATH} "${CURRENT_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin;$ENV{PATH}") + endif() endif() - execute_process( COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} OUTPUT_FILE "${LOGPREFIX}-out.log" @@ -134,6 +141,9 @@ function(vcpkg_build_cmake) endif() endif() message(STATUS "Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} done") + if(_bc_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") + endif() endif() endforeach() endfunction() diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index b8403d277..db04530ef 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -19,6 +19,11 @@ ## ``` ## ## ## Parameters +## ### USE_VCPKG_INTEGRATION +## Apply the normal `integrate install` integration for building the project. +## +## By default, projects built with this command will not automatically link libraries or have header paths set. +## ## ### PROJECT_PATH ## The path to the solution (`.sln`) or project (`.vcxproj`) file. ## @@ -56,7 +61,13 @@ ## * [cppunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cppunit/portfile.cmake) function(vcpkg_build_msbuild) - cmake_parse_arguments(_csc "" "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" ${ARGN}) + cmake_parse_arguments( + _csc + "USE_VCPKG_INTEGRATION" + "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" + "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" + ${ARGN} + ) if(NOT DEFINED _csc_RELEASE_CONFIGURATION) set(_csc_RELEASE_CONFIGURATION Release) @@ -87,6 +98,16 @@ function(vcpkg_build_msbuild) /m ) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Disable LTCG for static libraries because this setting introduces ABI incompatibility between minor compiler versions + # TODO: Add a way for the user to override this if they want to opt-in to incompatibility + list(APPEND _csc_OPTIONS /p:WholeProgramOptimization=false) + endif() + + if(_csc_USE_VCPKG_INTEGRATION) + list(APPEND _csc_OPTIONS /p:ForceImportBeforeCppTargets=${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/vcpkg.targets) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") message(STATUS "Building ${_csc_PROJECT_PATH} for Release") file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index e590fb8e7..4ab02f710 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -80,7 +80,7 @@ function(vcpkg_configure_cmake) set(GENERATOR ${_csc_GENERATOR}) elseif(_csc_PREFER_NINJA AND NINJA_CAN_BE_USED) set(GENERATOR "Ninja") - elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) set(GENERATOR "Ninja") elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v120") @@ -152,39 +152,14 @@ function(vcpkg_configure_cmake) if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") - else() - set(VCPKG_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}") - set(VCPKG_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}") - if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - elseif(VCPKG_CRT_LINKAGE STREQUAL "static") - list(APPEND _csc_OPTIONS_DEBUG - "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" - "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" - ) - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" - "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" - ) - else() - message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"") - endif() - - list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" - ) - list(APPEND _csc_OPTIONS - "-DCMAKE_CXX_FLAGS=${VCPKG_CXX_FLAGS}" - "-DCMAKE_C_FLAGS=${VCPKG_C_FLAGS}" - ) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME) + list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/windows.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/linux.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") + list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/android.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + list(APPEND _csc_OPTIONS "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/toolchains/osx.cmake") endif() list(APPEND _csc_OPTIONS @@ -197,6 +172,16 @@ function(vcpkg_configure_cmake) "-DVCPKG_APPLOCAL_DEPS=OFF" "-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" + "-DVCPKG_CXX_FLAGS=${VCPKG_CXX_FLAGS}" + "-DVCPKG_CXX_FLAGS_RELEASE=${VCPKG_CXX_FLAGS_RELEASE}" + "-DVCPKG_CXX_FLAGS_DEBUG=${VCPKG_CXX_FLAGS_DEBUG}" + "-DVCPKG_C_FLAGS=${VCPKG_C_FLAGS}" + "-DVCPKG_C_FLAGS_RELEASE=${VCPKG_C_FLAGS_RELEASE}" + "-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}" + "-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}" + "-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}" + "-DCMAKE_INSTALL_LIBDIR:STRING=lib" + "-DCMAKE_INSTALL_BINDIR:STRING=bin" ) if(DEFINED ARCH) diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index b24345021..083b86fc2 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -49,12 +49,16 @@ function(vcpkg_find_acquire_program VAR) if(VAR MATCHES "PERL") set(PROGNAME perl) set(PATHS ${DOWNLOADS}/tools/perl/perl/bin) + set(BREW_PACKAGE_NAME "perl") + set(APT_PACKAGE_NAME "perl") set(URL "http://strawberryperl.com/download/5.24.1.1/strawberry-perl-5.24.1.1-32bit-portable.zip") set(ARCHIVE "strawberry-perl-5.24.1.1-32bit-portable.zip") set(HASH a6e685ea24376f50db5f06c5b46075f1d3be25168fa1f27fa9b02e2ac017826cee62a2b43562f9b6c989337a231ba914416c110075457764de2d11f99d5e0f26) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.12.02) + set(BREW_PACKAGE_NAME "nasm") + set(APT_PACKAGE_NAME "nasm") set(URL "http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win32/nasm-2.12.02-win32.zip" "http://mirrors.kodi.tv/build-deps/win32/nasm-2.12.02-win32.zip" @@ -106,6 +110,8 @@ function(vcpkg_find_acquire_program VAR) set(PROGNAME ninja) set(SUBDIR "ninja-1.8.2") set(PATHS ${DOWNLOADS}/tools/ninja/${SUBDIR}) + set(BREW_PACKAGE_NAME "ninja") + set(APT_PACKAGE_NAME "ninja-build") set(URL "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip") set(ARCHIVE "ninja-1.8.2-win.zip") set(HASH 9b9ce248240665fcd6404b989f3b3c27ed9682838225e6dc9b67b551774f251e4ff8a207504f941e7c811e7a8be1945e7bcb94472a335ef15e23a0200a32e6d5) @@ -181,6 +187,16 @@ function(vcpkg_find_acquire_program VAR) do_find() if("${${VAR}}" MATCHES "-NOTFOUND") + if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(EXAMPLE ".") + if(DEFINED BREW_PACKAGE_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(EXAMPLE ":\n brew install ${BREW_PACKAGE_NAME}") + elseif(DEFINED APT_PACKAGE_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(EXAMPLE ":\n sudo apt-get install ${APT_PACKAGE_NAME}") + endif() + message(FATAL_ERROR "Could not find ${PROGNAME}. Please install it via your package manager${EXAMPLE}") + endif() + vcpkg_download_distfile(ARCHIVE_PATH URLS ${URL} SHA512 ${HASH} diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index 4bd4d135f..7f1f827c2 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -158,4 +158,13 @@ function(vcpkg_fixup_cmake_targets) if(NOT REMAINING_FILES) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) endif() + + # Patch out any remaining absolute references + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" CMAKE_CURRENT_PACKAGES_DIR) + file(GLOB CMAKE_FILES ${RELEASE_SHARE}/*.cmake) + foreach(CMAKE_FILE IN LISTS CMAKE_FILES) + file(READ ${CMAKE_FILE} _contents) + string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR}" "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") + file(WRITE ${CMAKE_FILE} "${_contents}") + endforeach() endfunction() diff --git a/scripts/fetchTool.ps1 b/scripts/fetchTool.ps1 index 2c2f599ef..ff9b5d9bf 100644 --- a/scripts/fetchTool.ps1 +++ b/scripts/fetchTool.ps1 @@ -25,7 +25,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) throw "Unkown tool $tool" } - $exePath = "$downloadsDir\$($toolData.exeRelativePath)" + $exePath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" if (Test-Path $exePath) { @@ -35,14 +35,14 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) $isArchive = vcpkgHasProperty -object $toolData -propertyName "archiveRelativePath" if ($isArchive) { - $downloadPath = "$downloadsDir\$($toolData.archiveRelativePath)" + $downloadPath = "$downloadsDir\$(@($toolData.archiveRelativePath)[0])" } else { - $downloadPath = "$downloadsDir\$($toolData.exeRelativePath)" + $downloadPath = "$downloadsDir\$(@($toolData.exeRelativePath)[0])" } - $url = $toolData.url + [String]$url = @($toolData.url)[0] if (!(Test-Path $downloadPath)) { Write-Host "Downloading $tool..." @@ -50,7 +50,7 @@ function fetchToolInternal([Parameter(Mandatory=$true)][string]$tool) Write-Host "Downloading $tool has completed successfully." } - $expectedDownloadedFileHash = $toolData.sha256 + $expectedDownloadedFileHash = @($toolData.sha256)[0] $downloadedFileHash = vcpkgGetSHA256 $downloadPath vcpkgCheckEqualFileHash -filePath $downloadPath -expectedHash $expectedDownloadedFileHash -actualHash $downloadedFileHash diff --git a/scripts/toolchains/android.cmake b/scripts/toolchains/android.cmake new file mode 100644 index 000000000..2a37e4c39 --- /dev/null +++ b/scripts/toolchains/android.cmake @@ -0,0 +1,13 @@ +
+set(ANDROID_CPP_FEATURES "rtti exceptions" CACHE STRING "")
+set(CMAKE_SYSTEM_NAME Android CACHE STRING "")
+set(ANDROID_ABI x86_64 CACHE STRING "")
+set(ANDROID_TOOLCHAIN clang CACHE STRING "")
+set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "")
+set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "")
+
+if(NOT EXISTS "$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/build/cmake/android.toolchain.cmake")
+ message(FATAL_ERROR "Could not find android ndk. Searched at $ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b")
+endif()
+
+include("$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/build/cmake/android.toolchain.cmake")
diff --git a/scripts/toolchains/freebsd.cmake b/scripts/toolchains/freebsd.cmake new file mode 100644 index 000000000..bfeabe18b --- /dev/null +++ b/scripts/toolchains/freebsd.cmake @@ -0,0 +1,4 @@ +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
+ set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "")
+endif()
+set(CMAKE_SYSTEM_NAME FreeBSD CACHE STRING "")
diff --git a/scripts/toolchains/linux.cmake b/scripts/toolchains/linux.cmake new file mode 100644 index 000000000..ea4f15d60 --- /dev/null +++ b/scripts/toolchains/linux.cmake @@ -0,0 +1,4 @@ +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
+ set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "")
+endif()
+set(CMAKE_SYSTEM_NAME Linux CACHE STRING "")
diff --git a/scripts/toolchains/osx.cmake b/scripts/toolchains/osx.cmake new file mode 100644 index 000000000..dd21f5264 --- /dev/null +++ b/scripts/toolchains/osx.cmake @@ -0,0 +1,4 @@ +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
+ set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "")
+endif()
+set(CMAKE_SYSTEM_NAME Darwin CACHE STRING "")
diff --git a/scripts/toolchains/windows.cmake b/scripts/toolchains/windows.cmake new file mode 100644 index 000000000..7bfc2282b --- /dev/null +++ b/scripts/toolchains/windows.cmake @@ -0,0 +1,23 @@ +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
+if(NOT _CMAKE_IN_TRY_COMPILE)
+
+ if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
+ set(VCPKG_CRT_LINK_FLAG_PREFIX "/MD")
+ elseif(VCPKG_CRT_LINKAGE STREQUAL "static")
+ set(VCPKG_CRT_LINK_FLAG_PREFIX "/MT")
+ else()
+ message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"")
+ endif()
+
+ set(CMAKE_CXX_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" CACHE STRING "")
+ set(CMAKE_C_FLAGS " /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}" CACHE STRING "")
+
+ set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "")
+ set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "")
+ set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "")
+ set(CMAKE_C_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "")
+
+ set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
+ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
+
+endif()
diff --git a/scripts/vcpkgTools.xml b/scripts/vcpkgTools.xml index 02fd0b996..9c78e92d9 100644 --- a/scripts/vcpkgTools.xml +++ b/scripts/vcpkgTools.xml @@ -6,6 +6,12 @@ <url>https://cmake.org/files/v3.10/cmake-3.10.2-win32-x86.zip</url> <sha256>f5f7e41a21d0e9b655aca58498b08e17ecd27796bf82837e2c84435359169dd6</sha256> <archiveRelativePath>cmake-3.10.2-win32-x86.zip</archiveRelativePath> + <exeRelativePath os="osx">cmake-3.10.2-Darwin-x86_64/CMake.app/Contents/bin/cmake</exeRelativePath> + <url os="osx">https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz</url> + <archiveRelativePath os="osx">cmake-3.10.2-Darwin-x86_64.tar.gz</archiveRelativePath> + <exeRelativePath os="linux">cmake-3.10.2-Linux-x86_64/bin/cmake</exeRelativePath> + <url os="linux">https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz</url> + <archiveRelativePath os="linux">cmake-3.10.2-Linux-x86_64.tar.gz</archiveRelativePath> </tool> <tool name="git"> <requiredVersion>2.16.2</requiredVersion> diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt index 2a340bb8f..da0f41631 100644 --- a/toolsrc/CMakeLists.txt +++ b/toolsrc/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.3)
-project(vcpkg CXX)
+project(vcpkg C CXX)
if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(GCC 1)
@@ -19,10 +19,14 @@ file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp) add_executable(vcpkg src/vcpkg.cpp ${VCPKGLIB_SOURCES})
target_compile_definitions(vcpkg PRIVATE -DDISABLE_METRICS=0)
-target_include_directories(vcpkg PUBLIC include)
+target_include_directories(vcpkg PRIVATE include)
if(GCC)
- target_link_libraries(vcpkg PUBLIC stdc++fs)
+ target_link_libraries(vcpkg PRIVATE stdc++fs)
elseif(CLANG)
- target_link_libraries(vcpkg PUBLIC c++experimental)
+ target_link_libraries(vcpkg PRIVATE c++experimental)
endif()
+
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(Threads REQUIRED)
+target_link_libraries(vcpkg PRIVATE Threads::Threads)
diff --git a/toolsrc/VERSION.txt b/toolsrc/VERSION.txt index 157d21b7b..1305e8f43 100644 --- a/toolsrc/VERSION.txt +++ b/toolsrc/VERSION.txt @@ -1 +1 @@ -"0.0.105"
\ No newline at end of file +"0.0.106"
\ No newline at end of file diff --git a/toolsrc/include/pch.h b/toolsrc/include/pch.h index 683bef171..9c9deeb3f 100644 --- a/toolsrc/include/pch.h +++ b/toolsrc/include/pch.h @@ -46,7 +46,11 @@ #include <set> #include <stdexcept> #include <string> +#if defined(_WIN32) #include <sys/timeb.h> +#else +#include <sys/time.h> +#endif #include <sys/types.h> #include <system_error> #include <thread> diff --git a/toolsrc/include/vcpkg/base/cache.h b/toolsrc/include/vcpkg/base/cache.h new file mode 100644 index 000000000..dfc7565b8 --- /dev/null +++ b/toolsrc/include/vcpkg/base/cache.h @@ -0,0 +1,21 @@ +#pragma once
+
+#include <map>
+
+namespace vcpkg
+{
+ template<class Key, class Value>
+ struct Cache
+ {
+ template<class F>
+ Value const& get_lazy(const Key& k, const F& f) const
+ {
+ auto it = m_cache.find(k);
+ if (it != m_cache.end()) return it->second;
+ return m_cache.emplace(k, f()).first->second;
+ }
+
+ private:
+ mutable std::map<Key, Value> m_cache;
+ };
+}
diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index 09393b9ee..ac1f192ae 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -36,6 +36,7 @@ namespace vcpkg::Files virtual void write_lines(const fs::path& file_path, const std::vector<std::string>& lines) = 0; virtual void write_contents(const fs::path& file_path, const std::string& data, std::error_code& ec) = 0; virtual void rename(const fs::path& oldpath, const fs::path& newpath) = 0; + virtual void rename(const fs::path& oldpath, const fs::path& newpath, std::error_code& ec) = 0; virtual bool remove(const fs::path& path) = 0; virtual bool remove(const fs::path& path, std::error_code& ec) = 0; virtual std::uintmax_t remove_all(const fs::path& path, std::error_code& ec) = 0; diff --git a/toolsrc/include/vcpkg/base/strings.h b/toolsrc/include/vcpkg/base/strings.h index 6ef840fb3..c32e81ac2 100644 --- a/toolsrc/include/vcpkg/base/strings.h +++ b/toolsrc/include/vcpkg/base/strings.h @@ -46,7 +46,9 @@ namespace vcpkg::Strings bool case_insensitive_ascii_equals(const CStringView left, const CStringView right); - std::string ascii_to_lowercase(const std::string& input); + std::string ascii_to_lowercase(std::string s); + + std::string ascii_to_uppercase(std::string s); bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern); diff --git a/toolsrc/include/vcpkg/base/system.h b/toolsrc/include/vcpkg/base/system.h index 31034f6b4..0d089276f 100644 --- a/toolsrc/include/vcpkg/base/system.h +++ b/toolsrc/include/vcpkg/base/system.h @@ -1,5 +1,7 @@ #pragma once +#include <unordered_map> + #include <vcpkg/base/files.h> #include <vcpkg/base/optional.h> #include <vcpkg/base/strings.h> @@ -38,7 +40,8 @@ namespace vcpkg::System std::string output; }; - int cmd_execute_clean(const CStringView cmd_line); + int cmd_execute_clean(const CStringView cmd_line, + const std::unordered_map<std::string, std::string>& extra_env = {}); int cmd_execute(const CStringView cmd_line); @@ -107,9 +110,9 @@ namespace vcpkg::System std::vector<CPUArchitecture> get_supported_host_architectures(); - const fs::path& get_program_files_32_bit(); + const Optional<fs::path>& get_program_files_32_bit(); - const fs::path& get_program_files_platform_bitness(); + const Optional<fs::path>& get_program_files_platform_bitness(); } namespace vcpkg::Debug diff --git a/toolsrc/include/vcpkg/base/util.h b/toolsrc/include/vcpkg/base/util.h index 5e07b240a..c73345719 100644 --- a/toolsrc/include/vcpkg/base/util.h +++ b/toolsrc/include/vcpkg/base/util.h @@ -6,8 +6,6 @@ #include <utility> #include <vector> -#include <vcpkg/base/optional.h> - namespace vcpkg::Util { template<class Container> @@ -24,10 +22,10 @@ namespace vcpkg::Util namespace Sets { - template<class Container> - bool contains(const Container& container, const ElementT<Container>& item) + template<class Container, class Key> + bool contains(const Container& container, const Key& item) { - return container.find(item) != container.cend(); + return container.find(item) != container.end(); } } @@ -158,6 +156,8 @@ namespace vcpkg::Util MoveOnlyBase& operator=(const MoveOnlyBase&) = delete; MoveOnlyBase& operator=(MoveOnlyBase&&) = default; + + ~MoveOnlyBase() = default; }; struct ResourceBase @@ -168,6 +168,8 @@ namespace vcpkg::Util ResourceBase& operator=(const ResourceBase&) = delete; ResourceBase& operator=(ResourceBase&&) = delete; + + ~ResourceBase() = default; }; template<class T> @@ -214,4 +216,10 @@ namespace vcpkg::Util return e == E::YES; } } + + template<class T> + void unused(T&& param) + { + (void)param; + } } diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index ea81c4dbe..1c22d39d8 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -204,4 +204,26 @@ namespace vcpkg::Build }; BuildInfo read_build_info(const Files::Filesystem& fs, const fs::path& filepath); + + struct AbiEntry + { + std::string key; + std::string value; + + bool operator<(const AbiEntry& other) const + { + return key < other.key || (key == other.key && value < other.value); + } + }; + + struct AbiTagAndFile + { + std::string tag; + fs::path tag_file; + }; + + Optional<AbiTagAndFile> compute_abi_tag(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const PreBuildInfo& pre_build_info, + Span<const AbiEntry> dependency_abis); } diff --git a/toolsrc/include/vcpkg/commands.h b/toolsrc/include/vcpkg/commands.h index 4027e12f4..7369b8206 100644 --- a/toolsrc/include/vcpkg/commands.h +++ b/toolsrc/include/vcpkg/commands.h @@ -7,6 +7,8 @@ #include <vcpkg/vcpkgpaths.h> #include <array> +#include <map> +#include <vector> namespace vcpkg::Commands { @@ -23,7 +25,17 @@ namespace vcpkg::Commands namespace CI { + struct UnknownCIPortsResults + { + std::vector<PackageSpec> unknown; + std::map<PackageSpec, Build::BuildResult> known; + }; + extern const CommandStructure COMMAND_STRUCTURE; + UnknownCIPortsResults find_unknown_ports_for_ci(const VcpkgPaths& paths, + const std::set<std::string>& exclusions, + const Dependencies::PortFileProvider& provider, + const std::vector<FeatureSpec>& fspecs); void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet); } @@ -120,7 +132,7 @@ namespace vcpkg::Commands namespace Hash { void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths); - std::string get_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type); + std::string get_file_hash(const VcpkgPaths& paths, fs::path const& path, std::string const& hash_type); } template<class T> diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h index fadb8cc7e..33af6c4f5 100644 --- a/toolsrc/include/vcpkg/dependencies.h +++ b/toolsrc/include/vcpkg/dependencies.h @@ -45,7 +45,8 @@ namespace vcpkg::Dependencies InstallPlanAction(const PackageSpec& spec, const SourceControlFile& scf, const std::set<std::string>& features, - const RequestType& request_type); + const RequestType& request_type, + std::vector<PackageSpec>&& dependencies); std::string displayname() const; @@ -58,6 +59,8 @@ namespace vcpkg::Dependencies RequestType request_type; Build::BuildPackageOptions build_options; std::set<std::string> feature_list; + + std::vector<PackageSpec> computed_dependencies; }; enum class RemovePlanType diff --git a/toolsrc/include/vcpkg/install.h b/toolsrc/include/vcpkg/install.h index 2e92764dc..b7acbf15f 100644 --- a/toolsrc/include/vcpkg/install.h +++ b/toolsrc/include/vcpkg/install.h @@ -37,6 +37,7 @@ namespace vcpkg::Install std::string total_elapsed_time; void print() const; + static std::string xunit_result(const PackageSpec& spec, Chrono::ElapsedTime time, Build::BuildResult code); std::string xunit_results() const; }; diff --git a/toolsrc/include/vcpkg/paragraphs.h b/toolsrc/include/vcpkg/paragraphs.h index e2c7f2d99..fa0265b75 100644 --- a/toolsrc/include/vcpkg/paragraphs.h +++ b/toolsrc/include/vcpkg/paragraphs.h @@ -20,7 +20,7 @@ namespace vcpkg::Paragraphs Parse::ParseExpected<SourceControlFile> try_load_port(const Files::Filesystem& fs, const fs::path& control_path); - Expected<BinaryControlFile> try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec); + Expected<BinaryControlFile> try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec); struct LoadResults { diff --git a/toolsrc/include/vcpkg/sourceparagraph.h b/toolsrc/include/vcpkg/sourceparagraph.h index ea8e27a94..ae5812ea7 100644 --- a/toolsrc/include/vcpkg/sourceparagraph.h +++ b/toolsrc/include/vcpkg/sourceparagraph.h @@ -63,6 +63,8 @@ namespace vcpkg std::unique_ptr<SourceParagraph> core_paragraph; std::vector<std::unique_ptr<FeatureParagraph>> feature_paragraphs; + + Optional<const FeatureParagraph&> find_feature(const std::string& featurename) const; }; void print_error_message(Span<const std::unique_ptr<Parse::ParseControlErrorInfo>> error_info_list); diff --git a/toolsrc/include/vcpkg/vcpkgpaths.h b/toolsrc/include/vcpkg/vcpkgpaths.h index 84e8110ec..71f1bbba9 100644 --- a/toolsrc/include/vcpkg/vcpkgpaths.h +++ b/toolsrc/include/vcpkg/vcpkgpaths.h @@ -33,7 +33,7 @@ namespace vcpkg struct VcpkgPaths { - static Expected<VcpkgPaths> create(const fs::path& vcpkg_root_dir); + static Expected<VcpkgPaths> create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path); fs::path package_dir(const PackageSpec& spec) const; fs::path port_dir(const PackageSpec& spec) const; @@ -90,5 +90,7 @@ namespace vcpkg Lazy<fs::path> ifw_repogen_exe; Lazy<std::vector<Toolset>> toolsets; Lazy<std::vector<Toolset>> toolsets_vs2013; + + fs::path default_vs_path; }; } diff --git a/toolsrc/src/tests.plan.cpp b/toolsrc/src/tests.plan.cpp index 08d3c1dab..a99f1abb9 100644 --- a/toolsrc/src/tests.plan.cpp +++ b/toolsrc/src/tests.plan.cpp @@ -593,6 +593,87 @@ namespace UnitTest1 features_check(&install_plan[0], "a", {"core"}, Triplet::X64_WINDOWS); } + TEST_METHOD(install_plan_action_dependencies) + { + std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs; + + // Add a port "a" which depends on the core of "b", which was already + // installed explicitly + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_c = spec_map.emplace("c"); + auto spec_b = spec_map.emplace("b", "c"); + spec_map.emplace("a", "b"); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 3); + features_check(&install_plan[0], "c", {"core"}, Triplet::X64_WINDOWS); + + features_check(&install_plan[1], "b", {"core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[1].install_action.get()->computed_dependencies == + std::vector<PackageSpec>{spec_c}); + + features_check(&install_plan[2], "a", {"core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[2].install_action.get()->computed_dependencies == + std::vector<PackageSpec>{spec_b}); + } + + TEST_METHOD(install_plan_action_dependencies_2) + { + std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs; + + // Add a port "a" which depends on the core of "b", which was already + // installed explicitly + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + auto spec_c = spec_map.emplace("c"); + auto spec_b = spec_map.emplace("b", "c"); + spec_map.emplace("a", "c, b"); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 3); + features_check(&install_plan[0], "c", {"core"}, Triplet::X64_WINDOWS); + + features_check(&install_plan[1], "b", {"core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[1].install_action.get()->computed_dependencies == + std::vector<PackageSpec>{spec_c}); + + features_check(&install_plan[2], "a", {"core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[2].install_action.get()->computed_dependencies == + std::vector<PackageSpec>{spec_b, spec_c}); + } + + TEST_METHOD(install_plan_action_dependencies_3) + { + std::vector<std::unique_ptr<StatusParagraph>> status_paragraphs; + + // Add a port "a" which depends on the core of "b", which was already + // installed explicitly + PackageSpecMap spec_map(Triplet::X64_WINDOWS); + spec_map.emplace("a", "", {{"0", ""}, {"1", "a[0]"}}, {"1"}); + + // Install "a" (without explicit feature specification) + auto install_specs = FullPackageSpec::from_string("a", Triplet::X64_WINDOWS); + auto install_plan = Dependencies::create_feature_install_plan( + spec_map.map, + FullPackageSpec::to_feature_specs({install_specs.value_or_exit(VCPKG_LINE_INFO)}), + StatusParagraphs(std::move(status_paragraphs))); + + Assert::IsTrue(install_plan.size() == 1); + features_check(&install_plan[0], "a", {"1", "0", "core"}, Triplet::X64_WINDOWS); + Assert::IsTrue(install_plan[0].install_action.get()->computed_dependencies == std::vector<PackageSpec>{}); + } + TEST_METHOD(upgrade_with_default_features_1) { std::vector<std::unique_ptr<StatusParagraph>> pghs; @@ -619,7 +700,6 @@ namespace UnitTest1 Assert::IsTrue(plan[0].remove_action.has_value()); Assert::AreEqual("a", plan[1].spec().name().c_str()); - Assert::IsTrue(plan[1].install_action.has_value()); features_check(&plan[1], "a", {"core", "0"}, Triplet::X86_WINDOWS); } @@ -651,11 +731,9 @@ namespace UnitTest1 Assert::IsTrue(plan[0].remove_action.has_value()); Assert::AreEqual("b", plan[1].spec().name().c_str()); - Assert::IsTrue(plan[1].install_action.has_value()); features_check(&plan[1], "b", {"b0", "core"}, Triplet::X64_WINDOWS); Assert::AreEqual("a", plan[2].spec().name().c_str()); - Assert::IsTrue(plan[2].install_action.has_value()); features_check(&plan[2], "a", {"core"}, Triplet::X64_WINDOWS); } @@ -996,6 +1074,34 @@ namespace UnitTest1 features_check(&plan[1], "a", {"core", "a1"}); } + + TEST_METHOD(basic_upgrade_scheme_with_self_features) + { + std::vector<std::unique_ptr<StatusParagraph>> pghs; + pghs.push_back(make_status_pgh("a")); + pghs.push_back(make_status_feature_pgh("a", "a1", "")); + pghs.push_back(make_status_feature_pgh("a", "a2", "a[a1]")); + StatusParagraphs status_db(std::move(pghs)); + + PackageSpecMap spec_map(Triplet::X86_WINDOWS); + auto spec_a = spec_map.emplace("a", "", {{"a1", ""}, {"a2", "a[a1]"}}); + + Dependencies::MapPortFileProvider provider(spec_map.map); + Dependencies::PackageGraph graph(provider, status_db); + + graph.upgrade(spec_a); + + auto plan = graph.serialize(); + + Assert::AreEqual(size_t(2), plan.size()); + + Assert::AreEqual("a", plan[0].spec().name().c_str()); + Assert::IsTrue(plan[0].remove_action.has_value()); + + Assert::AreEqual("a", plan[1].spec().name().c_str()); + Assert::IsTrue(plan[1].install_action.has_value()); + Assert::IsTrue(plan[1].install_action.get()->feature_list == std::set<std::string>{"core", "a1", "a2"}); + } }; class ExportPlanTests : public TestClass<ExportPlanTests> @@ -1069,7 +1175,7 @@ namespace UnitTest1 Assert::IsTrue(plan[0].plan_type == Dependencies::ExportPlanType::NOT_BUILT); } - TEST_METHOD(basic_upgrade_scheme_with_features) + TEST_METHOD(basic_export_scheme_with_features) { std::vector<std::unique_ptr<StatusParagraph>> pghs; pghs.push_back(make_status_pgh("b")); diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index ef68e6f72..a65045aa8 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -94,7 +94,9 @@ static void inner(const VcpkgCmdArguments& args) Checks::check_exit(VCPKG_LINE_INFO, !vcpkg_root_dir.empty(), "Error: Could not detect vcpkg-root."); - const Expected<VcpkgPaths> expected_paths = VcpkgPaths::create(vcpkg_root_dir); + 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); Checks::check_exit(VCPKG_LINE_INFO, !expected_paths.error(), "Error: Invalid vcpkg root directory %s: %s", @@ -155,7 +157,15 @@ static void inner(const VcpkgCmdArguments& args) } else { +#if defined(_WIN32) default_triplet = Triplet::X86_WINDOWS; +#elif defined(__APPLE__) + default_triplet = Triplet::from_canonical_name("x64-osx"); +#elif defined(__FreeBSD__) + default_triplet = Triplet::from_canonical_name("x64-freebsd"); +#else + default_triplet = Triplet::from_canonical_name("x64-linux"); +#endif } } diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index b59104a59..4e61666b7 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -108,6 +108,10 @@ namespace vcpkg::Files output.close(); } + virtual void rename(const fs::path& oldpath, const fs::path& newpath, std::error_code& ec) override + { + fs::stdfs::rename(oldpath, newpath, ec); + } virtual void rename(const fs::path& oldpath, const fs::path& newpath) override { fs::stdfs::rename(oldpath, newpath); diff --git a/toolsrc/src/vcpkg/base/strings.cpp b/toolsrc/src/vcpkg/base/strings.cpp index d912734e3..5fedf3e1f 100644 --- a/toolsrc/src/vcpkg/base/strings.cpp +++ b/toolsrc/src/vcpkg/base/strings.cpp @@ -7,10 +7,11 @@ namespace vcpkg::Strings::details { // To disambiguate between two overloads - static const auto isspace = [](const char c) { return std::isspace(c); }; + static bool IS_SPACE(const char c) { return std::isspace(c) != 0; }; // Avoids C4244 warnings because of char<->int conversion that occur when using std::tolower() static char tolower_char(const char c) { return static_cast<char>(std::tolower(c)); } + static char toupper_char(const char c) { return static_cast<char>(std::toupper(c)); } #if defined(_WIN32) static _locale_t& c_locale() @@ -108,11 +109,16 @@ namespace vcpkg::Strings #endif } - std::string ascii_to_lowercase(const std::string& input) + std::string ascii_to_lowercase(std::string s) { - std::string output(input); - std::transform(output.begin(), output.end(), output.begin(), &details::tolower_char); - return output; + std::transform(s.begin(), s.end(), s.begin(), &details::tolower_char); + return s; + } + + std::string ascii_to_uppercase(std::string s) + { + std::transform(s.begin(), s.end(), s.begin(), &details::toupper_char); + return s; } bool case_insensitive_ascii_starts_with(const std::string& s, const std::string& pattern) @@ -137,8 +143,8 @@ namespace vcpkg::Strings std::string trim(std::string&& s) { - s.erase(std::find_if_not(s.rbegin(), s.rend(), details::isspace).base(), s.end()); - s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::isspace)); + s.erase(std::find_if_not(s.rbegin(), s.rend(), details::IS_SPACE).base(), s.end()); + s.erase(s.begin(), std::find_if_not(s.begin(), s.end(), details::IS_SPACE)); return std::move(s); } diff --git a/toolsrc/src/vcpkg/base/system.cpp b/toolsrc/src/vcpkg/base/system.cpp index e55db9461..171dd2bbf 100644 --- a/toolsrc/src/vcpkg/base/system.cpp +++ b/toolsrc/src/vcpkg/base/system.cpp @@ -8,7 +8,11 @@ #include <time.h> #if defined(__APPLE__) -# include <mach-o/dyld.h> +#include <mach-o/dyld.h> +#endif + +#if defined(__FreeBSD__) +#include <sys/sysctl.h> #endif #pragma comment(lib, "Advapi32") @@ -35,14 +39,22 @@ namespace vcpkg::System const int bytes = GetModuleFileNameW(nullptr, buf, _MAX_PATH); if (bytes == 0) std::abort(); return fs::path(buf, buf + bytes); -#elif __APPLE__ +#elif defined(__APPLE__) uint32_t size = 1024 * 32; char buf[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)); + std::unique_ptr<char> canonicalPath(realpath(buf, NULL)); Checks::check_exit(VCPKG_LINE_INFO, result != -1, "Could not determine current executable path."); return fs::path(std::string(canonicalPath.get())); +#elif defined(__FreeBSD__) + int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1}; + char exePath[2048]; + size_t len = sizeof(exePath); + auto rcode = sysctl(mib, 4, exePath, &len, NULL, 0); + Checks::check_exit(VCPKG_LINE_INFO, rcode == 0, "Could not determine current executable path."); + Checks::check_exit(VCPKG_LINE_INFO, len > 0, "Could not determine current executable path."); + return fs::path(exePath, exePath + len - 1); #else /* LINUX */ std::array<char, 1024 * 4> buf; auto written = readlink("/proc/self/exe", buf.data(), buf.size()); @@ -141,12 +153,12 @@ namespace vcpkg::System R"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.u8string(), args); } - int cmd_execute_clean(const CStringView cmd_line) + int cmd_execute_clean(const CStringView cmd_line, const std::unordered_map<std::string, std::string>& extra_env) { #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)"; - static const std::string NEW_PATH = Strings::format( + std::string NEW_PATH = Strings::format( R"(Path=%s;%s;%s\Wbem;%s\WindowsPowerShell\v1.0\)", SYSTEM_32, SYSTEM_ROOT, SYSTEM_32, SYSTEM_32); std::vector<std::wstring> env_wstrings = { @@ -212,11 +224,22 @@ namespace vcpkg::System env_cstr.push_back(L'\0'); } + if (extra_env.find("PATH") != extra_env.end()) + NEW_PATH += Strings::format(";%s", extra_env.find("PATH")->second); env_cstr.append(Strings::to_utf16(NEW_PATH)); env_cstr.push_back(L'\0'); env_cstr.append(L"VSLANG=1033"); env_cstr.push_back(L'\0'); + for (auto item : extra_env) + { + if (item.first == "PATH") continue; + env_cstr.append(Strings::to_utf16(item.first)); + env_cstr.push_back(L'='); + env_cstr.append(Strings::to_utf16(item.second)); + env_cstr.push_back(L'\0'); + } + STARTUPINFOW startup_info; memset(&startup_info, 0, sizeof(STARTUPINFOW)); startup_info.cb = sizeof(STARTUPINFOW); @@ -262,14 +285,14 @@ namespace vcpkg::System fflush(nullptr); // Basically we are wrapping it in quotes - const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line); #if defined(_WIN32) + const std::string& actual_cmd_line = Strings::format(R"###("%s")###", cmd_line); Debug::println("_wsystem(%s)", actual_cmd_line); const int exit_code = _wsystem(Strings::to_utf16(actual_cmd_line).c_str()); Debug::println("_wsystem() returned %d", exit_code); #else - Debug::println("_system(%s)", actual_cmd_line); - const int exit_code = system(actual_cmd_line.c_str()); + Debug::println("_system(%s)", cmd_line); + const int exit_code = system(cmd_line.c_str()); Debug::println("_system() returned %d", exit_code); #endif return exit_code; @@ -291,6 +314,8 @@ namespace vcpkg::System // Flush stdout before launching external process fflush(stdout); + auto timer = Chrono::ElapsedTimer::create_started(); + #if defined(_WIN32) const auto actual_cmd_line = Strings::format(R"###("%s 2>&1")###", cmd_line); @@ -312,8 +337,10 @@ namespace vcpkg::System } const auto ec = _pclose(pipe); - Debug::println("_pclose() returned %d", ec); remove_byte_order_marks(&output); + + Debug::println("_pclose() returned %d after %8d us", ec, (int)timer.microseconds()); + return {ec, Strings::to_utf8(output)}; #else const auto actual_cmd_line = Strings::format(R"###(%s 2>&1)###", cmd_line); @@ -336,7 +363,9 @@ namespace vcpkg::System } const auto ec = pclose(pipe); - Debug::println("pclose() returned %d", ec); + + Debug::println("_pclose() returned %d after %8d us", ec, (int)timer.microseconds()); + return {ec, output}; #endif } @@ -502,32 +531,41 @@ namespace vcpkg::System } #endif - static const fs::path& get_program_files() + static const Optional<fs::path>& get_program_files() { - static const fs::path PATH = System::get_environment_variable("PROGRAMFILES").value_or_exit(VCPKG_LINE_INFO); + static const auto PATH = []() -> Optional<fs::path> { + auto value = System::get_environment_variable("PROGRAMFILES"); + if (auto v = value.get()) + { + return *v; + } + + return nullopt; + }(); + return PATH; } - const fs::path& get_program_files_32_bit() + const Optional<fs::path>& get_program_files_32_bit() { - static const fs::path PATH = []() -> fs::path { + static const auto PATH = []() -> Optional<fs::path> { auto value = System::get_environment_variable("ProgramFiles(x86)"); if (auto v = value.get()) { - return std::move(*v); + return *v; } return get_program_files(); }(); return PATH; } - const fs::path& get_program_files_platform_bitness() + const Optional<fs::path>& get_program_files_platform_bitness() { - static const fs::path PATH = []() -> fs::path { + static const auto PATH = []() -> Optional<fs::path> { auto value = System::get_environment_variable("ProgramW6432"); if (auto v = value.get()) { - return std::move(*v); + return *v; } return get_program_files(); }(); diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 5870bd187..953e77460 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -209,6 +209,7 @@ namespace vcpkg::Build std::string make_build_env_cmd(const PreBuildInfo& pre_build_info, const Toolset& toolset) { if (pre_build_info.external_toolchain_file.has_value()) return ""; + if (!pre_build_info.cmake_system_name.empty() && pre_build_info.cmake_system_name != "WindowsStore") return ""; const char* tonull = " >nul"; if (GlobalState::debugging) @@ -272,12 +273,10 @@ namespace vcpkg::Build return filter_dependencies(config.scf.core_paragraph->depends, triplet); } - auto it = - Util::find_if(config.scf.feature_paragraphs, - [&](std::unique_ptr<FeatureParagraph> const& fpgh) { return fpgh->name == feature; }); - Checks::check_exit(VCPKG_LINE_INFO, it != config.scf.feature_paragraphs.end()); + auto maybe_feature = config.scf.find_feature(feature); + Checks::check_exit(VCPKG_LINE_INFO, maybe_feature.has_value()); - return filter_dependencies(it->get()->depends, triplet); + return filter_dependencies(maybe_feature.get()->depends, triplet); }); auto dep_fspecs = FeatureSpec::from_strings_and_triplet(dep_strings, triplet); @@ -314,63 +313,134 @@ namespace vcpkg::Build } static ExtendedBuildResult do_build_package(const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const PackageSpec& spec, + const std::string& abi_tag, const BuildPackageConfig& config, const StatusParagraphs& status_db) { auto& fs = paths.get_filesystem(); - const Triplet& triplet = config.triplet; + const Triplet& triplet = spec.triplet(); + + const fs::path& cmake_exe_path = paths.get_cmake_exe(); + const fs::path& git_exe_path = paths.get_git_exe(); - struct AbiEntry + std::string all_features; + for (auto& feature : config.scf.feature_paragraphs) { - std::string key; - std::string value; - }; + all_features.append(feature->name + ";"); + } - std::vector<AbiEntry> abi_tag_entries; + const Toolset& toolset = paths.get_toolset(pre_build_info); + const std::string cmd_launch_cmake = System::make_cmake_cmd( + cmake_exe_path, + paths.ports_cmake, + { + {"CMD", "BUILD"}, + {"PORT", config.scf.core_paragraph->name}, + {"CURRENT_PORT_DIR", config.port_dir / "/."}, + {"TARGET_TRIPLET", spec.triplet().canonical_name()}, + {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, + {"VCPKG_USE_HEAD_VERSION", + Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, + {"_VCPKG_NO_DOWNLOADS", !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, + {"GIT", git_exe_path}, + {"FEATURES", Strings::join(";", config.feature_list)}, + {"ALL_FEATURES", all_features}, + }); - const PackageSpec spec = - PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, triplet).value_or_exit(VCPKG_LINE_INFO); + auto command = make_build_env_cmd(pre_build_info, toolset); + if (!command.empty()) command.append(" && "); + command.append(cmd_launch_cmake); - std::vector<FeatureSpec> required_fspecs = compute_required_feature_specs(config, status_db); + const auto timer = Chrono::ElapsedTimer::create_started(); - // extract out the actual package ids - auto dep_pspecs = Util::fmap(required_fspecs, [](FeatureSpec const& fspec) { return fspec.spec(); }); - Util::sort_unique_erase(dep_pspecs); - - // Find all features that aren't installed. This destroys required_fspecs. - Util::unstable_keep_if(required_fspecs, [&](FeatureSpec const& fspec) { - return !status_db.is_installed(fspec) && fspec.name() != spec.name(); - }); + const int return_code = System::cmd_execute_clean(command); + const auto buildtimeus = timer.microseconds(); + const auto spec_string = spec.to_string(); - if (!required_fspecs.empty()) { - return {BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(required_fspecs)}; + auto locked_metrics = Metrics::g_metrics.lock(); + locked_metrics->track_buildtime(spec.to_string() + ":[" + Strings::join(",", config.feature_list) + "]", + buildtimeus); + if (return_code != 0) + { + locked_metrics->track_property("error", "build failed"); + locked_metrics->track_property("build_error", spec_string); + return BuildResult::BUILD_FAILED; + } } - // dep_pspecs was not destroyed - for (auto&& pspec : dep_pspecs) + const BuildInfo build_info = read_build_info(fs, paths.build_info_file_path(spec)); + const size_t error_count = PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info); + + auto bcf = create_binary_control_file(*config.scf.core_paragraph, triplet, build_info, abi_tag); + + if (error_count != 0) { - if (pspec == spec) continue; - auto status_it = status_db.find_installed(pspec); - Checks::check_exit(VCPKG_LINE_INFO, status_it != status_db.end()); - abi_tag_entries.emplace_back( - AbiEntry{status_it->get()->package.spec.name(), status_it->get()->package.abi}); + return BuildResult::POST_BUILD_CHECKS_FAILED; + } + for (auto&& feature : config.feature_list) + { + for (auto&& f_pgh : config.scf.feature_paragraphs) + { + if (f_pgh->name == feature) + bcf->features.push_back( + create_binary_feature_control_file(*config.scf.core_paragraph, *f_pgh, triplet)); + } } - const fs::path& cmake_exe_path = paths.get_cmake_exe(); - const fs::path& git_exe_path = paths.get_git_exe(); + write_binary_control_file(paths, *bcf); + return {BuildResult::SUCCEEDED, std::move(bcf)}; + } - const fs::path ports_cmake_script_path = paths.ports_cmake; + static ExtendedBuildResult do_build_package_and_clean_buildtrees(const VcpkgPaths& paths, + const PreBuildInfo& pre_build_info, + const PackageSpec& spec, + const std::string& abi_tag, + const BuildPackageConfig& config, + const StatusParagraphs& status_db) + { + auto result = do_build_package(paths, pre_build_info, spec, abi_tag, config, status_db); - if (GlobalState::g_binary_caching) + if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) { - abi_tag_entries.emplace_back(AbiEntry{ - "portfile", Commands::Hash::get_file_hash(cmake_exe_path, config.port_dir / "portfile.cmake", "SHA1")}); - abi_tag_entries.emplace_back(AbiEntry{ - "control", Commands::Hash::get_file_hash(cmake_exe_path, config.port_dir / "CONTROL", "SHA1")}); + auto& fs = paths.get_filesystem(); + const fs::path buildtrees_dir = paths.buildtrees / config.scf.core_paragraph->name; + auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); + for (auto&& file : buildtree_files) + { + if (fs.is_directory(file) && file.filename() != "src") + { + std::error_code ec; + fs.remove_all(file, ec); + } + } } - const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); + return result; + } + + Optional<AbiTagAndFile> compute_abi_tag(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const PreBuildInfo& pre_build_info, + Span<const AbiEntry> dependency_abis) + { + if (!GlobalState::g_binary_caching) return nullopt; + + auto& fs = paths.get_filesystem(); + const Triplet& triplet = config.triplet; + const std::string& name = config.scf.core_paragraph->name; + + std::vector<AbiEntry> abi_tag_entries; + + 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")}); + abi_tag_entries.emplace_back( + AbiEntry{"control", Commands::Hash::get_file_hash(paths, config.port_dir / "CONTROL", "SHA1")}); + abi_tag_entries.emplace_back(AbiEntry{"triplet", pre_build_info.triplet_abi_tag}); std::string features = Strings::join(";", config.feature_list); @@ -379,204 +449,198 @@ namespace vcpkg::Build if (config.build_package_options.use_head_version == UseHeadVersion::YES) abi_tag_entries.emplace_back(AbiEntry{"head", ""}); + Util::sort(abi_tag_entries); + std::string full_abi_info = Strings::join("", abi_tag_entries, [](const AbiEntry& p) { return p.key + " " + p.value + "\n"; }); - std::string abi_tag; - - if (GlobalState::g_binary_caching) + if (GlobalState::debugging) { - if (GlobalState::debugging) + System::println("[DEBUG] <abientries>"); + for (auto&& entry : abi_tag_entries) { - System::println("[DEBUG] <abientries>"); - for (auto&& entry : abi_tag_entries) - { - System::println("[DEBUG] %s|%s", entry.key, entry.value); - } - System::println("[DEBUG] </abientries>"); + System::println("[DEBUG] %s|%s", entry.key, entry.value); } + System::println("[DEBUG] </abientries>"); + } - auto abi_tag_entries_missing = abi_tag_entries; - Util::stable_keep_if(abi_tag_entries_missing, [](const AbiEntry& p) { return p.value.empty(); }); + auto abi_tag_entries_missing = abi_tag_entries; + Util::stable_keep_if(abi_tag_entries_missing, [](const AbiEntry& p) { return p.value.empty(); }); - if (abi_tag_entries_missing.empty()) - { - std::error_code ec; - fs.create_directories(paths.buildtrees / spec.name(), ec); - auto abi_file_path = paths.buildtrees / spec.name() / "vcpkg_abi_info"; - fs.write_contents(abi_file_path, full_abi_info); + if (abi_tag_entries_missing.empty()) + { + std::error_code ec; + fs.create_directories(paths.buildtrees / name, ec); + auto abi_file_path = paths.buildtrees / name / (triplet.canonical_name() + ".vcpkg_abi_info.txt"); + fs.write_contents(abi_file_path, full_abi_info); - abi_tag = Commands::Hash::get_file_hash(paths.get_cmake_exe(), abi_file_path, "SHA1"); - } - else - { - System::println("Warning: binary caching disabled because abi keys are missing values:\n%s", - Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { - return " " + e.key + "\n"; - })); - } + return AbiTagAndFile{Commands::Hash::get_file_hash(paths, abi_file_path, "SHA1"), abi_file_path}; } - - std::unique_ptr<BinaryControlFile> bcf; - - auto archives_dir = paths.root / "archives"; - if (!abi_tag.empty()) + else { - archives_dir /= abi_tag.substr(0, 2); + System::println( + "Warning: binary caching disabled because abi keys are missing values:\n%s", + Strings::join("", abi_tag_entries_missing, [](const AbiEntry& e) { return " " + e.key + "\n"; })); + + return nullopt; } - auto archive_path = archives_dir / (abi_tag + ".zip"); + } - if (GlobalState::g_binary_caching && !abi_tag.empty() && fs.exists(archive_path)) - { - System::println("Using cached binary package: %s", archive_path.u8string()); + static void decompress_archive(const VcpkgPaths& paths, const PackageSpec& spec, const fs::path& archive_path) + { + auto& fs = paths.get_filesystem(); - auto pkg_path = paths.package_dir(spec); - std::error_code ec; - fs.remove_all(pkg_path, ec); - fs.create_directories(pkg_path, ec); - auto files = fs.get_files_non_recursive(pkg_path); - Checks::check_exit(VCPKG_LINE_INFO, files.empty(), "unable to clear path: %s", pkg_path.u8string()); + auto pkg_path = paths.package_dir(spec); + std::error_code ec; + fs.remove_all(pkg_path, ec); + fs.create_directories(pkg_path, ec); + auto files = fs.get_files_non_recursive(pkg_path); + Checks::check_exit(VCPKG_LINE_INFO, files.empty(), "unable to clear path: %s", pkg_path.u8string()); + +#if defined(_WIN32) + auto&& _7za = paths.get_7za_exe(); + + System::cmd_execute_clean(Strings::format( + R"("%s" x "%s" -o"%s" -y >nul)", _7za.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())); +#endif + } - auto&& _7za = paths.get_7za_exe(); + static void compress_archive(const VcpkgPaths& paths, const PackageSpec& spec, const fs::path& tmp_archive_path) + { + auto& fs = paths.get_filesystem(); + + std::error_code ec; + + fs.remove(tmp_archive_path, ec); + Checks::check_exit( + VCPKG_LINE_INFO, !fs.exists(tmp_archive_path), "Could not remove file: %s", tmp_archive_path.u8string()); +#if defined(_WIN32) + auto&& _7za = paths.get_7za_exe(); + + System::cmd_execute_clean(Strings::format( + R"("%s" a "%s" "%s\*" >nul)", + _7za.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())); +#endif + } + + ExtendedBuildResult build_package(const VcpkgPaths& paths, + const BuildPackageConfig& config, + const StatusParagraphs& status_db) + { + auto& fs = paths.get_filesystem(); + const Triplet& triplet = config.triplet; + const std::string& name = config.scf.core_paragraph->name; + + std::vector<FeatureSpec> required_fspecs = compute_required_feature_specs(config, status_db); - System::cmd_execute_clean(Strings::format( - R"("%s" x "%s" -o"%s" -y >nul)", _7za.u8string(), archive_path.u8string(), pkg_path.u8string())); + // extract out the actual package ids + auto dep_pspecs = Util::fmap(required_fspecs, [](FeatureSpec const& fspec) { return fspec.spec(); }); + Util::sort_unique_erase(dep_pspecs); - auto maybe_bcf = Paragraphs::try_load_cached_control_package(paths, spec); - bcf = std::make_unique<BinaryControlFile>(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); + // Find all features that aren't installed. This destroys required_fspecs. + Util::unstable_keep_if(required_fspecs, [&](FeatureSpec const& fspec) { + return !status_db.is_installed(fspec) && fspec.name() != name; + }); + + if (!required_fspecs.empty()) + { + return {BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES, std::move(required_fspecs)}; } - else + + const PackageSpec spec = + PackageSpec::from_name_and_triplet(config.scf.core_paragraph->name, triplet).value_or_exit(VCPKG_LINE_INFO); + + std::vector<AbiEntry> dependency_abis; + + // dep_pspecs was not destroyed + for (auto&& pspec : dep_pspecs) { - if (GlobalState::g_binary_caching && !abi_tag.empty()) - { - System::println("Could not locate cached archive: %s", archive_path.u8string()); - } + if (pspec == spec) continue; + auto status_it = status_db.find_installed(pspec); + Checks::check_exit(VCPKG_LINE_INFO, status_it != status_db.end()); + dependency_abis.emplace_back( + AbiEntry{status_it->get()->package.spec.name(), status_it->get()->package.abi}); + } - std::string all_features; - for (auto& feature : config.scf.feature_paragraphs) - { - all_features.append(feature->name + ";"); - } + const auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet); - const Toolset& toolset = paths.get_toolset(pre_build_info); - const std::string cmd_launch_cmake = System::make_cmake_cmd( - cmake_exe_path, - ports_cmake_script_path, - { - {"CMD", "BUILD"}, - {"PORT", config.scf.core_paragraph->name}, - {"CURRENT_PORT_DIR", config.port_dir / "/."}, - {"TARGET_TRIPLET", triplet.canonical_name()}, - {"VCPKG_PLATFORM_TOOLSET", toolset.version.c_str()}, - {"VCPKG_USE_HEAD_VERSION", - Util::Enum::to_bool(config.build_package_options.use_head_version) ? "1" : "0"}, - {"_VCPKG_NO_DOWNLOADS", - !Util::Enum::to_bool(config.build_package_options.allow_downloads) ? "1" : "0"}, - {"GIT", git_exe_path}, - {"FEATURES", features}, - {"ALL_FEATURES", all_features}, - }); - - auto command = make_build_env_cmd(pre_build_info, toolset); - if (!command.empty()) command.append(" && "); - command.append(cmd_launch_cmake); - - const auto timer = Chrono::ElapsedTimer::create_started(); - - const int return_code = System::cmd_execute_clean(command); - const auto buildtimeus = timer.microseconds(); - const auto spec_string = spec.to_string(); + auto maybe_abi_tag_and_file = compute_abi_tag(paths, config, pre_build_info, dependency_abis); - { - auto locked_metrics = Metrics::g_metrics.lock(); - locked_metrics->track_buildtime(spec.to_string() + ":[" + Strings::join(",", config.feature_list) + "]", - buildtimeus); - if (return_code != 0) - { - locked_metrics->track_property("error", "build failed"); - locked_metrics->track_property("build_error", spec_string); - return BuildResult::BUILD_FAILED; - } - } + std::unique_ptr<BinaryControlFile> bcf; - const BuildInfo build_info = read_build_info(fs, paths.build_info_file_path(spec)); - const size_t error_count = PostBuildLint::perform_all_checks(spec, paths, pre_build_info, build_info); + auto abi_tag_and_file = maybe_abi_tag_and_file.get(); - bcf = create_binary_control_file(*config.scf.core_paragraph, triplet, build_info, abi_tag); + if (GlobalState::g_binary_caching && abi_tag_and_file) + { + auto archives_root_dir = paths.root / "archives"; + auto archive_name = abi_tag_and_file->tag + ".zip"; + auto archive_subpath = fs::u8path(abi_tag_and_file->tag.substr(0, 2)) / archive_name; + auto archive_path = archives_root_dir / archive_subpath; + auto archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; - if (error_count != 0) + if (fs.exists(archive_path)) { - return BuildResult::POST_BUILD_CHECKS_FAILED; + System::println("Using cached binary package: %s", archive_path.u8string()); + + decompress_archive(paths, spec, archive_path); + + auto maybe_bcf = Paragraphs::try_load_cached_package(paths, spec); + bcf = std::make_unique<BinaryControlFile>(std::move(maybe_bcf).value_or_exit(VCPKG_LINE_INFO)); + return {BuildResult::SUCCEEDED, std::move(bcf)}; } - for (auto&& feature : config.feature_list) + else if (fs.exists(archive_tombstone_path)) { - for (auto&& f_pgh : config.scf.feature_paragraphs) - { - if (f_pgh->name == feature) - bcf->features.push_back( - create_binary_feature_control_file(*config.scf.core_paragraph, *f_pgh, triplet)); - } + System::println("Found failure tombstone: %s", archive_tombstone_path.u8string()); + return BuildResult::BUILD_FAILED; } - if (GlobalState::g_binary_caching && !abi_tag.empty()) - { - std::error_code ec; - fs.write_contents( - paths.package_dir(spec) / "share" / spec.name() / "vcpkg_abi_info.txt", full_abi_info, ec); - } + System::println("Could not locate cached archive: %s", archive_path.u8string()); + + ExtendedBuildResult result = do_build_package_and_clean_buildtrees( + paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); - write_binary_control_file(paths, *bcf); + std::error_code ec; + fs.create_directories(paths.package_dir(spec) / "share" / spec.name(), ec); + auto abi_file_in_package = paths.package_dir(spec) / "share" / spec.name() / "vcpkg_abi_info.txt"; + fs.copy_file(abi_tag_and_file->tag_file, abi_file_in_package, fs::stdfs::copy_options::none, ec); + Checks::check_exit(VCPKG_LINE_INFO, !ec, "Could not copy into file: %s", abi_file_in_package.u8string()); - if (GlobalState::g_binary_caching && !abi_tag.empty()) + if (result.code == BuildResult::SUCCEEDED) { auto tmp_archive_path = paths.buildtrees / spec.name() / (spec.triplet().to_string() + ".zip"); - std::error_code ec; - fs.remove(tmp_archive_path, ec); - Checks::check_exit(VCPKG_LINE_INFO, - !fs.exists(tmp_archive_path), - "Could not remove file: %s", - tmp_archive_path.u8string()); - auto&& _7za = paths.get_7za_exe(); - - System::cmd_execute_clean(Strings::format( - R"("%s" a "%s" "%s\*" >nul)", - _7za.u8string(), - tmp_archive_path.u8string(), - paths.package_dir(spec).u8string())); - - fs.create_directories(archives_dir, ec); - - fs.rename(tmp_archive_path, archive_path); + compress_archive(paths, spec, tmp_archive_path); - System::println("Stored binary cache: %s", archive_path.u8string()); + fs.create_directories(archive_path.parent_path(), ec); + fs.rename(tmp_archive_path, archive_path, ec); + if (ec) + System::println( + System::Color::warning, "Failed to store binary cache: %s", archive_path.u8string()); + else + System::println("Stored binary cache: %s", archive_path.u8string()); } - } - return {BuildResult::SUCCEEDED, std::move(bcf)}; - } - - ExtendedBuildResult build_package(const VcpkgPaths& paths, - const BuildPackageConfig& config, - const StatusParagraphs& status_db) - { - ExtendedBuildResult result = do_build_package(paths, config, status_db); - - if (config.build_package_options.clean_buildtrees == CleanBuildtrees::YES) - { - auto& fs = paths.get_filesystem(); - const fs::path buildtrees_dir = paths.buildtrees / config.scf.core_paragraph->name; - auto buildtree_files = fs.get_files_non_recursive(buildtrees_dir); - for (auto&& file : buildtree_files) + else if (result.code == BuildResult::BUILD_FAILED || result.code == BuildResult::POST_BUILD_CHECKS_FAILED) { - if (fs.is_directory(file) && file.filename() != "src") - { - std::error_code ec; - fs.remove_all(file, ec); - } + // Build failed, so store tombstone archive + fs.create_directories(archive_tombstone_path.parent_path(), ec); + fs.write_contents(archive_tombstone_path, "", ec); } - } - return result; + return result; + } + else + { + return do_build_package_and_clean_buildtrees( + paths, pre_build_info, spec, maybe_abi_tag_and_file.value_or(AbiTagAndFile{}).tag, config, status_db); + } } const std::string& to_string(const BuildResult build_result) @@ -700,7 +764,7 @@ namespace vcpkg::Build { return it_hash->second; } - auto hash = Commands::Hash::get_file_hash(paths.get_cmake_exe(), triplet_file_path, "SHA1"); + auto hash = Commands::Hash::get_file_hash(paths, triplet_file_path, "SHA1"); s_hash_cache.emplace(triplet_file_path, hash); return hash; } diff --git a/toolsrc/src/vcpkg/commands.ci.cpp b/toolsrc/src/vcpkg/commands.ci.cpp index c43f25b40..45eb1c83e 100644 --- a/toolsrc/src/vcpkg/commands.ci.cpp +++ b/toolsrc/src/vcpkg/commands.ci.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include <vcpkg/base/cache.h> #include <vcpkg/base/files.h> #include <vcpkg/base/stringliteral.h> #include <vcpkg/base/system.h> @@ -7,6 +8,7 @@ #include <vcpkg/build.h> #include <vcpkg/commands.h> #include <vcpkg/dependencies.h> +#include <vcpkg/globalstate.h> #include <vcpkg/help.h> #include <vcpkg/input.h> #include <vcpkg/install.h> @@ -24,6 +26,7 @@ namespace vcpkg::Commands::CI Install::InstallSummary summary; }; + static constexpr StringLiteral OPTION_DRY_RUN = "--dry-run"; static constexpr StringLiteral OPTION_EXCLUDE = "--exclude"; static constexpr StringLiteral OPTION_XUNIT = "--x-xunit"; @@ -32,16 +35,131 @@ namespace vcpkg::Commands::CI {OPTION_XUNIT, "File to output results in XUnit format (internal)"}, }}; + static constexpr std::array<CommandSwitch, 1> CI_SWITCHES = { + {{OPTION_DRY_RUN, "Print out plan without execution"}}}; + const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("ci x64-windows"), - 0, + 1, SIZE_MAX, - {{}, CI_SETTINGS}, + {CI_SWITCHES, CI_SETTINGS}, nullptr, }; + UnknownCIPortsResults find_unknown_ports_for_ci(const VcpkgPaths& paths, + const std::set<std::string>& exclusions, + const Dependencies::PortFileProvider& provider, + const std::vector<FeatureSpec>& fspecs) + { + UnknownCIPortsResults ret; + + auto& fs = paths.get_filesystem(); + + std::map<PackageSpec, std::string> abi_tag_map; + std::set<PackageSpec> will_fail; + + const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, + Build::AllowDownloads::YES, + Build::CleanBuildtrees::YES, + Build::CleanPackages::YES}; + + vcpkg::Cache<Triplet, Build::PreBuildInfo> pre_build_info_cache; + + auto action_plan = Dependencies::create_feature_install_plan(provider, fspecs, StatusParagraphs{}); + + for (auto&& action : action_plan) + { + if (auto p = action.install_action.get()) + { + // determine abi tag + std::string abi; + if (auto scf = p->source_control_file.get()) + { + auto triplet = p->spec.triplet(); + + const Build::BuildPackageConfig build_config{p->source_control_file.value_or_exit(VCPKG_LINE_INFO), + triplet, + paths.port_dir(p->spec), + install_plan_options, + p->feature_list}; + + auto dependency_abis = + Util::fmap(p->computed_dependencies, [&](const PackageSpec& spec) -> Build::AbiEntry { + auto it = abi_tag_map.find(spec); + + if (it == abi_tag_map.end()) + return {spec.name(), ""}; + else + return {spec.name(), it->second}; + }); + const auto& pre_build_info = pre_build_info_cache.get_lazy( + triplet, [&]() { return Build::PreBuildInfo::from_triplet_file(paths, triplet); }); + + auto maybe_tag_and_file = + Build::compute_abi_tag(paths, build_config, pre_build_info, dependency_abis); + if (auto tag_and_file = maybe_tag_and_file.get()) + { + abi = tag_and_file->tag; + abi_tag_map.emplace(p->spec, abi); + } + } + else if (auto ipv = p->installed_package.get()) + { + abi = ipv->core->package.abi; + if (!abi.empty()) abi_tag_map.emplace(p->spec, abi); + } + + std::string state; + + auto archives_root_dir = paths.root / "archives"; + auto archive_name = abi + ".zip"; + auto archive_subpath = fs::u8path(abi.substr(0, 2)) / archive_name; + auto archive_path = archives_root_dir / archive_subpath; + auto archive_tombstone_path = archives_root_dir / "fail" / archive_subpath; + + bool b_will_build = false; + + if (Util::Sets::contains(exclusions, p->spec.name())) + { + ret.known.emplace(p->spec, BuildResult::EXCLUDED); + will_fail.emplace(p->spec); + } + else if (std::any_of(p->computed_dependencies.begin(), + p->computed_dependencies.end(), + [&](const PackageSpec& spec) { return Util::Sets::contains(will_fail, spec); })) + { + ret.known.emplace(p->spec, BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES); + will_fail.emplace(p->spec); + } + else if (fs.exists(archive_path)) + { + state += "pass"; + ret.known.emplace(p->spec, BuildResult::SUCCEEDED); + } + else if (fs.exists(archive_tombstone_path)) + { + state += "fail"; + ret.known.emplace(p->spec, BuildResult::BUILD_FAILED); + will_fail.emplace(p->spec); + } + else + { + ret.unknown.push_back(p->spec); + b_will_build = true; + } + + System::println("%40s: %1s %8s: %s", p->spec, (b_will_build ? "*" : " "), state, abi); + } + } + + return ret; + } + 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."); + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); std::set<std::string> exclusions_set; @@ -52,6 +170,8 @@ namespace vcpkg::Commands::CI exclusions_set.insert(exclusions.begin(), exclusions.end()); } + auto is_dry_run = Util::Sets::contains(options.switches, OPTION_DRY_RUN); + std::vector<Triplet> triplets; for (const std::string& triplet : args.command_arguments) { @@ -71,16 +191,21 @@ namespace vcpkg::Commands::CI Build::CleanBuildtrees::YES, Build::CleanPackages::YES}; - std::vector<std::string> ports = Install::get_all_port_names(paths); + std::vector<std::map<PackageSpec, BuildResult>> all_known_results; + + std::vector<std::string> all_ports = Install::get_all_port_names(paths); std::vector<TripletAndSummary> results; for (const Triplet& triplet : triplets) { Input::check_triplet(triplet, paths); - std::vector<PackageSpec> specs = PackageSpec::to_package_specs(ports, triplet); + + std::vector<PackageSpec> specs = PackageSpec::to_package_specs(all_ports, triplet); // Install the default features for every package - const auto featurespecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); + auto all_fspecs = Util::fmap(specs, [](auto& spec) { return FeatureSpec(spec, ""); }); + auto split_specs = find_unknown_ports_for_ci(paths, exclusions_set, paths_port_file, all_fspecs); + auto fspecs = Util::fmap(split_specs.unknown, [](auto& spec) { return FeatureSpec(spec, ""); }); - auto action_plan = Dependencies::create_feature_install_plan(paths_port_file, featurespecs, status_db); + auto action_plan = Dependencies::create_feature_install_plan(paths_port_file, fspecs, status_db); for (auto&& action : action_plan) { @@ -94,8 +219,18 @@ namespace vcpkg::Commands::CI } } - auto summary = Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); - results.push_back({triplet, std::move(summary)}); + if (is_dry_run) + { + Dependencies::print_plan(action_plan); + } + else + { + auto summary = Install::perform(action_plan, Install::KeepGoing::YES, paths, status_db); + for (auto&& result : summary.results) + split_specs.known.erase(result.spec); + results.push_back({triplet, std::move(summary)}); + all_known_results.emplace_back(std::move(split_specs.known)); + } } for (auto&& result : results) @@ -112,6 +247,14 @@ namespace vcpkg::Commands::CI for (auto&& result : results) xunit_doc += result.summary.xunit_results(); + for (auto&& known_result : all_known_results) + { + for (auto&& result : known_result) + { + xunit_doc += + Install::InstallSummary::xunit_result(result.first, Chrono::ElapsedTime{}, result.second); + } + } xunit_doc += "</collection></assembly></assemblies>\n"; paths.get_filesystem().write_contents(fs::u8path(it_xunit->second), xunit_doc); diff --git a/toolsrc/src/vcpkg/commands.edit.cpp b/toolsrc/src/vcpkg/commands.edit.cpp index 41f261a53..ac34a6720 100644 --- a/toolsrc/src/vcpkg/commands.edit.cpp +++ b/toolsrc/src/vcpkg/commands.edit.cpp @@ -69,14 +69,24 @@ namespace vcpkg::Commands::Edit std::vector<fs::path> candidate_paths; auto maybe_editor_path = System::get_environment_variable("EDITOR"); - if (auto editor_path = maybe_editor_path.get()) + if (const std::string* editor_path = maybe_editor_path.get()) { candidate_paths.emplace_back(*editor_path); } - candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE_INSIDERS); - candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE_INSIDERS); - candidate_paths.push_back(System::get_program_files_platform_bitness() / VS_CODE); - candidate_paths.push_back(System::get_program_files_32_bit() / VS_CODE); + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const fs::path* pf = program_files.get()) + { + candidate_paths.push_back(*pf / VS_CODE_INSIDERS); + candidate_paths.push_back(*pf / VS_CODE); + } + + const auto& program_files_32_bit = System::get_program_files_32_bit(); + if (const fs::path* pf = program_files_32_bit.get()) + { + candidate_paths.push_back(*pf / VS_CODE_INSIDERS); + candidate_paths.push_back(*pf / VS_CODE); + } const std::vector<fs::path> from_registry = find_from_registry(); candidate_paths.insert(candidate_paths.end(), from_registry.cbegin(), from_registry.cend()); diff --git a/toolsrc/src/vcpkg/commands.env.cpp b/toolsrc/src/vcpkg/commands.env.cpp index f3beef6cd..d078baedb 100644 --- a/toolsrc/src/vcpkg/commands.env.cpp +++ b/toolsrc/src/vcpkg/commands.env.cpp @@ -1,5 +1,6 @@ #include "pch.h" +#include <vcpkg/base/strings.h> #include <vcpkg/base/system.h> #include <vcpkg/build.h> #include <vcpkg/commands.h> @@ -7,25 +8,66 @@ namespace vcpkg::Commands::Env { + static constexpr StringLiteral OPTION_BIN = "--bin"; + static constexpr StringLiteral OPTION_INCLUDE = "--include"; + static constexpr StringLiteral OPTION_DEBUG_BIN = "--debug-bin"; + static constexpr StringLiteral OPTION_TOOLS = "--tools"; + static constexpr StringLiteral OPTION_PYTHON = "--python"; + + static constexpr std::array<CommandSwitch, 5> SWITCHES = {{ + {OPTION_BIN, "Add installed bin/ to PATH"}, + {OPTION_INCLUDE, "Add installed include/ to INCLUDE"}, + {OPTION_DEBUG_BIN, "Add installed debug/bin/ to PATH"}, + {OPTION_TOOLS, "Add installed tools/*/ to PATH"}, + {OPTION_PYTHON, "Add installed python/ to PYTHONPATH"}, + }}; + const CommandStructure COMMAND_STRUCTURE = { Help::create_example_string("env --triplet x64-windows"), 0, 0, - {}, + {SWITCHES, {}}, nullptr, }; - void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet) + void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& triplet) { - args.parse_arguments(COMMAND_STRUCTURE); + const auto& fs = paths.get_filesystem(); + + const ParsedArguments options = args.parse_arguments(COMMAND_STRUCTURE); - const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet); + const auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, triplet); const Toolset& toolset = paths.get_toolset(pre_build_info); auto env_cmd = Build::make_build_env_cmd(pre_build_info, toolset); + + std::unordered_map<std::string, std::string> extra_env = {}; + const bool add_bin = Util::Sets::contains(options.switches, OPTION_BIN); + const bool add_include = Util::Sets::contains(options.switches, OPTION_INCLUDE); + const bool add_debug_bin = Util::Sets::contains(options.switches, OPTION_DEBUG_BIN); + const bool add_tools = Util::Sets::contains(options.switches, OPTION_TOOLS); + const bool add_python = Util::Sets::contains(options.switches, OPTION_PYTHON); + + std::vector<std::string> path_vars; + if (add_bin) path_vars.push_back((paths.installed / triplet.to_string() / "bin").u8string()); + if (add_debug_bin) path_vars.push_back((paths.installed / triplet.to_string() / "debug" / "bin").u8string()); + if (add_include) extra_env.emplace("INCLUDE", (paths.installed / triplet.to_string() / "include").u8string()); + if (add_tools) + { + auto tools_dir = paths.installed / triplet.to_string() / "tools"; + auto tool_files = fs.get_files_non_recursive(tools_dir); + path_vars.push_back(tools_dir.u8string()); + for (auto&& tool_dir : tool_files) + { + if (fs.is_directory(tool_dir)) path_vars.push_back(tool_dir.u8string()); + } + } + if (add_python) extra_env.emplace("PYTHONPATH", (paths.installed / triplet.to_string() / "python").u8string()); + if (path_vars.size() > 0) extra_env.emplace("PATH", Strings::join(";", path_vars)); + if (env_cmd.empty()) - System::cmd_execute_clean("cmd"); + System::cmd_execute_clean("cmd", extra_env); else - System::cmd_execute_clean(env_cmd + " && cmd"); + System::cmd_execute_clean(env_cmd + " && cmd", extra_env); Checks::exit_success(VCPKG_LINE_INFO); } diff --git a/toolsrc/src/vcpkg/commands.hash.cpp b/toolsrc/src/vcpkg/commands.hash.cpp index bbbbed036..9e1b54390 100644 --- a/toolsrc/src/vcpkg/commands.hash.cpp +++ b/toolsrc/src/vcpkg/commands.hash.cpp @@ -1,17 +1,118 @@ #include "pch.h" +#include <vcpkg/base/checks.h> +#include <vcpkg/base/strings.h> #include <vcpkg/base/system.h> #include <vcpkg/base/util.h> #include <vcpkg/commands.h> #include <vcpkg/help.h> +#if defined(_WIN32) +#include <bcrypt.h> + +#ifndef NT_SUCCESS +#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0) +#endif + namespace vcpkg::Commands::Hash { - std::string get_file_hash(fs::path const& cmake_exe_path, fs::path const& path, std::string const& hash_type) + namespace + { + static std::string to_hex(const unsigned char* string, const size_t bytes) + { + static constexpr char HEX_MAP[] = "0123456789abcdef"; + + std::string output; + output.resize(2 * bytes); + + size_t current_char = 0; + for (size_t i = 0; i < bytes; i++) + { + // high + output[current_char] = HEX_MAP[(string[i] & 0xF0) >> 4]; + ++current_char; + // low + output[current_char] = HEX_MAP[(string[i] & 0x0F)]; + ++current_char; + } + + return output; + } + + struct BCryptAlgorithmHandle : Util::ResourceBase + { + BCRYPT_ALG_HANDLE handle = nullptr; + + ~BCryptAlgorithmHandle() + { + if (handle) BCryptCloseAlgorithmProvider(handle, 0); + } + }; + + struct BCryptHashHandle : Util::ResourceBase + { + BCRYPT_HASH_HANDLE handle = nullptr; + + ~BCryptHashHandle() + { + if (handle) BCryptDestroyHash(handle); + } + }; + } + + std::string get_file_hash(const VcpkgPaths&, const fs::path& path, const std::string& hash_type) + { + BCryptAlgorithmHandle algorithm_handle; + + NTSTATUS error_code = BCryptOpenAlgorithmProvider( + &algorithm_handle.handle, Strings::to_utf16(Strings::ascii_to_uppercase(hash_type)).c_str(), nullptr, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to open the algorithm provider"); + + DWORD hash_buffer_bytes; + DWORD cb_data; + error_code = BCryptGetProperty(algorithm_handle.handle, + BCRYPT_HASH_LENGTH, + reinterpret_cast<PUCHAR>(&hash_buffer_bytes), + sizeof(DWORD), + &cb_data, + 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to get hash length"); + const ULONG length_in_bytes = hash_buffer_bytes; + + BCryptHashHandle hash_handle; + + error_code = BCryptCreateHash(algorithm_handle.handle, &hash_handle.handle, nullptr, 0, nullptr, 0, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to initialize the hasher"); + + FILE* file = nullptr; + const auto ec = _wfopen_s(&file, path.c_str(), L"rb"); + Checks::check_exit(VCPKG_LINE_INFO, ec == 0, "Failed to open file: %s", path.u8string()); + unsigned char buffer[4096]; + while (const auto actual_size = fread(buffer, 1, sizeof(buffer), file)) + { + error_code = BCryptHashData(hash_handle.handle, buffer, static_cast<ULONG>(actual_size), 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to hash data"); + } + + fclose(file); + + std::unique_ptr<unsigned char[]> hash_buffer = std::make_unique<UCHAR[]>(length_in_bytes); + + error_code = BCryptFinishHash(hash_handle.handle, hash_buffer.get(), length_in_bytes, 0); + Checks::check_exit(VCPKG_LINE_INFO, NT_SUCCESS(error_code), "Failed to finalize the hash"); + + return to_hex(hash_buffer.get(), length_in_bytes); + } +} + +#else +namespace vcpkg::Commands::Hash +{ + std::string get_file_hash(const VcpkgPaths& paths, const fs::path& path, const std::string& hash_type) { const std::string cmd_line = Strings::format( R"("%s" -E %ssum "%s")", - cmake_exe_path.u8string(), + paths.get_cmake_exe().u8string(), Strings::ascii_to_lowercase(hash_type), path.u8string()); @@ -32,7 +133,11 @@ namespace vcpkg::Commands::Hash Util::erase_remove_if(hash, isspace); return hash; } +} +#endif +namespace vcpkg::Commands::Hash +{ const CommandStructure COMMAND_STRUCTURE = { Strings::format("The argument should be a file path\n%s", Help::create_example_string("hash boost_1_62_0.tar.bz2")), @@ -44,19 +149,12 @@ namespace vcpkg::Commands::Hash void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths) { - args.parse_arguments(COMMAND_STRUCTURE); - - if (args.command_arguments.size() == 1) - { - auto hash = get_file_hash(paths.get_cmake_exe(), args.command_arguments[0], "SHA512"); - System::println(hash); - } - if (args.command_arguments.size() == 2) - { - auto hash = get_file_hash(paths.get_cmake_exe(), args.command_arguments[0], args.command_arguments[1]); - System::println(hash); - } + Util::unused(args.parse_arguments(COMMAND_STRUCTURE)); + 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); + 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 460e99b88..36e4e56e7 100644 --- a/toolsrc/src/vcpkg/commands.integrate.cpp +++ b/toolsrc/src/vcpkg/commands.integrate.cpp @@ -148,12 +148,12 @@ namespace vcpkg::Commands::Integrate static void integrate_install(const VcpkgPaths& paths) { static const std::array<fs::path, 2> OLD_SYSTEM_TARGET_FILES = { - System::get_program_files_32_bit() / + System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO) / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.nuget.targets", - System::get_program_files_32_bit() / + System::get_program_files_32_bit().value_or_exit(VCPKG_LINE_INFO) / "MSBuild/14.0/Microsoft.Common.Targets/ImportBefore/vcpkg.system.targets"}; static const fs::path SYSTEM_WIDE_TARGETS_FILE = - System::get_program_files_32_bit() / + 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(); diff --git a/toolsrc/src/vcpkg/dependencies.cpp b/toolsrc/src/vcpkg/dependencies.cpp index 1f853014b..f6d81c973 100644 --- a/toolsrc/src/vcpkg/dependencies.cpp +++ b/toolsrc/src/vcpkg/dependencies.cpp @@ -144,12 +144,14 @@ namespace vcpkg::Dependencies InstallPlanAction::InstallPlanAction(const PackageSpec& spec, const SourceControlFile& scf, const std::set<std::string>& features, - const RequestType& request_type) + const RequestType& request_type, + std::vector<PackageSpec>&& dependencies) : spec(spec) , source_control_file(scf) , plan_type(InstallPlanType::BUILD_AND_INSTALL) , request_type(request_type) , feature_list(features) + , computed_dependencies(std::move(dependencies)) { } @@ -162,6 +164,7 @@ namespace vcpkg::Dependencies , plan_type(InstallPlanType::ALREADY_INSTALLED) , request_type(request_type) , feature_list(features) + , computed_dependencies(installed_package.get()->dependencies()) { } @@ -530,7 +533,7 @@ namespace vcpkg::Dependencies for (auto&& depend : remove_edges_edges) { auto& depend_cluster = graph.get(depend.spec()); - graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); + if (&depend_cluster != &cluster) graph_plan.remove_graph.add_edge({&cluster}, {&depend_cluster}); mark_minus(depend_cluster, graph, graph_plan); } } @@ -683,11 +686,17 @@ namespace vcpkg::Dependencies // If it will be transiently uninstalled, we need to issue a full installation command auto pscf = p_cluster->source_control_file.value_or_exit(VCPKG_LINE_INFO); Checks::check_exit(VCPKG_LINE_INFO, pscf != nullptr); + + auto dep_specs = Util::fmap(m_graph_plan->install_graph.adjacency_list(p_cluster), + [](ClusterPtr const& p) { return p->spec; }); + Util::sort_unique_erase(dep_specs); + plan.emplace_back(InstallPlanAction{ p_cluster->spec, *pscf, p_cluster->to_install_features, p_cluster->request_type, + std::move(dep_specs), }); } else diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index b7d355742..743619937 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -98,14 +98,10 @@ namespace vcpkg::Help " vcpkg create <pkg> <url>\n" " [archivename] Create a new package\n" " vcpkg owns <pat> Search for files in installed packages\n" - " vcpkg cache List cached compiled packages\n" + " vcpkg env Creates a clean shell environment for development or compiling.\n" " vcpkg version Display version information\n" " vcpkg contact Display contact information to send feedback\n" "\n" - //"internal commands:\n" - //" --check-build-deps <controlfile>\n" - //" --create-binary-control <controlfile>\n" - //"\n" "Options:\n" " --triplet <t> Specify the target architecture triplet.\n" " (default: %%VCPKG_DEFAULT_TRIPLET%%, see 'vcpkg help triplet')\n" diff --git a/toolsrc/src/vcpkg/install.cpp b/toolsrc/src/vcpkg/install.cpp index 46c7c53b8..e30a34c18 100644 --- a/toolsrc/src/vcpkg/install.cpp +++ b/toolsrc/src/vcpkg/install.cpp @@ -306,7 +306,7 @@ namespace vcpkg::Install System::println("Building package %s... done", display_name_with_features); auto bcf = std::make_unique<BinaryControlFile>( - Paragraphs::try_load_cached_control_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO)); + Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO)); auto code = aux_install(display_name_with_features, *bcf); if (action.build_options.clean_packages == Build::CleanPackages::YES) @@ -668,39 +668,42 @@ namespace vcpkg::Install return nullptr; } + std::string InstallSummary::xunit_result(const PackageSpec& spec, Chrono::ElapsedTime time, BuildResult code) + { + std::string inner_block; + const char* result_string = ""; + switch (code) + { + case BuildResult::POST_BUILD_CHECKS_FAILED: + case BuildResult::FILE_CONFLICTS: + case BuildResult::BUILD_FAILED: + result_string = "Fail"; + inner_block = Strings::format("<failure><message><![CDATA[%s]]></message></failure>", to_string(code)); + break; + case BuildResult::EXCLUDED: + case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: + result_string = "Skip"; + inner_block = Strings::format("<reason><![CDATA[%s]]></reason>", to_string(code)); + break; + case BuildResult::SUCCEEDED: result_string = "Pass"; break; + default: Checks::exit_fail(VCPKG_LINE_INFO); + } + + return Strings::format(R"(<test name="%s" method="%s" time="%lld" result="%s">%s</test>)" + "\n", + spec, + spec, + time.as<std::chrono::seconds>().count(), + result_string, + inner_block); + } + std::string InstallSummary::xunit_results() const { std::string xunit_doc; for (auto&& result : results) { - std::string inner_block; - const char* result_string = ""; - switch (result.build_result.code) - { - case BuildResult::POST_BUILD_CHECKS_FAILED: - case BuildResult::FILE_CONFLICTS: - case BuildResult::BUILD_FAILED: - result_string = "Fail"; - inner_block = Strings::format("<failure><message><![CDATA[%s]]></message></failure>", - to_string(result.build_result.code)); - break; - case BuildResult::EXCLUDED: - case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: - result_string = "Skip"; - inner_block = - Strings::format("<reason><![CDATA[%s]]></reason>", to_string(result.build_result.code)); - break; - case BuildResult::SUCCEEDED: result_string = "Pass"; break; - default: Checks::exit_fail(VCPKG_LINE_INFO); - } - - xunit_doc += Strings::format(R"(<test name="%s" method="%s" time="%lld" result="%s">%s</test>)" - "\n", - result.spec, - result.spec, - result.timing.as<std::chrono::seconds>().count(), - result_string, - inner_block); + xunit_doc += xunit_result(result.spec, result.timing, result.build_result.code); } return xunit_doc; } diff --git a/toolsrc/src/vcpkg/metrics.cpp b/toolsrc/src/vcpkg/metrics.cpp index d49cadbe2..9e17b237d 100644 --- a/toolsrc/src/vcpkg/metrics.cpp +++ b/toolsrc/src/vcpkg/metrics.cpp @@ -92,7 +92,7 @@ namespace vcpkg::Metrics { encoded.append("\\\""); } - else if (ch < 0x20 || ch >= 0x80) + else if (ch < 0x20 || static_cast<unsigned char>(ch) >= 0x80) { // Note: this treats incoming Strings as Latin-1 static constexpr const char HEX[16] = { diff --git a/toolsrc/src/vcpkg/paragraphs.cpp b/toolsrc/src/vcpkg/paragraphs.cpp index b66d53994..d0b0c0abf 100644 --- a/toolsrc/src/vcpkg/paragraphs.cpp +++ b/toolsrc/src/vcpkg/paragraphs.cpp @@ -228,7 +228,7 @@ namespace vcpkg::Paragraphs return error_info; } - Expected<BinaryControlFile> try_load_cached_control_package(const VcpkgPaths& paths, const PackageSpec& spec) + Expected<BinaryControlFile> try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec) { Expected<std::vector<std::unordered_map<std::string, std::string>>> pghs = get_paragraphs(paths.get_filesystem(), paths.package_dir(spec) / "CONTROL"); diff --git a/toolsrc/src/vcpkg/sourceparagraph.cpp b/toolsrc/src/vcpkg/sourceparagraph.cpp index 0b4baf189..ed61cb42a 100644 --- a/toolsrc/src/vcpkg/sourceparagraph.cpp +++ b/toolsrc/src/vcpkg/sourceparagraph.cpp @@ -158,6 +158,16 @@ namespace vcpkg return std::move(control_file); } + Optional<const FeatureParagraph&> SourceControlFile::find_feature(const std::string& featurename) const + { + auto it = Util::find_if(feature_paragraphs, + [&](const std::unique_ptr<FeatureParagraph>& p) { return p->name == featurename; }); + if (it != feature_paragraphs.end()) + return **it; + else + return nullopt; + } + Dependency Dependency::parse_dependency(std::string name, std::string qualifier) { Dependency dep; diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index e62ef8662..c36def15d 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -19,6 +19,8 @@ namespace vcpkg { std::array<int, 3> required_version; fs::path downloaded_exe_path; + std::string url; + fs::path downloaded_path; }; static Optional<std::array<int, 3>> parse_version_string(const std::string& version_as_string) @@ -41,8 +43,24 @@ namespace vcpkg static ToolData parse_tool_data_from_xml(const VcpkgPaths& paths, const std::string& tool) { +#if defined(_WIN32) + static constexpr StringLiteral OS_STRING = ""; +#elif defined(__APPLE__) + static constexpr StringLiteral OS_STRING = " os=\"osx\""; +#else // assume linux + static constexpr StringLiteral OS_STRING = " os=\"linux\""; +#endif + static const fs::path XML_PATH = paths.scripts / "vcpkgTools.xml"; + const auto maybe_get_string_inside_tags = [](const std::string& input, + const std::regex& regex) -> Optional<std::string> { + std::smatch match; + const bool has_match = std::regex_search(input.cbegin(), input.cend(), match, regex); + if (!has_match) return nullopt; + return match[1]; + }; + const auto get_string_inside_tags = [](const std::string& input, const std::regex& regex, const std::string& tag_name) -> std::string { std::smatch match; @@ -57,7 +75,10 @@ namespace vcpkg static const std::regex VERSION_REGEX{ Strings::format(R"###(<requiredVersion>([\s\S]*?)</requiredVersion>)###", tool)}; static const std::regex EXE_RELATIVE_PATH_REGEX{ - Strings::format(R"###(<exeRelativePath>([\s\S]*?)</exeRelativePath>)###", tool)}; + Strings::format(R"###(<exeRelativePath%s>([\s\S]*?)</exeRelativePath>)###", OS_STRING)}; + static const std::regex ARCHIVE_RELATIVE_PATH_REGEX{ + Strings::format(R"###(<archiveRelativePath%s>([\s\S]*?)</archiveRelativePath>)###", OS_STRING)}; + static const std::regex URL_REGEX{Strings::format(R"###(<url%s>([\s\S]*?)</url>)###", OS_STRING)}; const std::regex tool_regex{Strings::format(R"###(<tool[\s]+name="%s">([\s\S]*?)</tool>)###", tool)}; @@ -74,9 +95,13 @@ namespace vcpkg const std::string required_version_as_string = get_string_inside_tags(tool_data_as_string, VERSION_REGEX, "requiredVersion"); + const std::string url = get_string_inside_tags(tool_data_as_string, URL_REGEX, "url"); + const std::string exe_relative_path = get_string_inside_tags(tool_data_as_string, EXE_RELATIVE_PATH_REGEX, "exeRelativePath"); + auto archive_relative_path = maybe_get_string_inside_tags(tool_data_as_string, ARCHIVE_RELATIVE_PATH_REGEX); + const Optional<std::array<int, 3>> required_version = parse_version_string(required_version_as_string); Checks::check_exit(VCPKG_LINE_INFO, required_version.has_value(), @@ -85,7 +110,10 @@ namespace vcpkg required_version_as_string); const fs::path exe_path = paths.downloads / exe_relative_path; - return ToolData{*required_version.get(), exe_path}; + return ToolData{*required_version.get(), + exe_path, + url, + paths.downloads / archive_relative_path.value_or(exe_relative_path)}; } static bool exists_and_has_equal_or_greater_version(const std::string& version_cmd, @@ -144,8 +172,10 @@ namespace vcpkg return data_lines; } - static fs::path fetch_tool(const fs::path& scripts_folder, const std::string& tool_name, const ToolData& tool_data) + static fs::path fetch_tool(const VcpkgPaths& paths, const std::string& tool_name, const ToolData& tool_data) { + const auto& fs = paths.get_filesystem(); + const fs::path& scripts_folder = paths.scripts; const std::array<int, 3>& version = tool_data.required_version; const std::string version_as_string = Strings::format("%d.%d.%d", version[0], version[1], version[2]); @@ -154,6 +184,7 @@ namespace vcpkg version_as_string, tool_name, version_as_string); +#if defined(_WIN32) const fs::path script = scripts_folder / "fetchtool.ps1"; const std::string title = Strings::format( "Fetching %s version %s (No sufficient installed version was found)", tool_name, version_as_string); @@ -173,27 +204,44 @@ namespace vcpkg expected_downloaded_path.u8string(), actual_downloaded_path.u8string()); return actual_downloaded_path; +#else + if (!fs.exists(tool_data.downloaded_path)) + { + auto code = System::cmd_execute( + Strings::format(R"(curl '%s' --create-dirs --output '%s')", tool_data.url, tool_data.downloaded_path)); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "curl failed while downloading %s", tool_data.url); + } + auto code = System::cmd_execute( + Strings::format(R"(cd '%s' && tar xzf '%s')", paths.downloads, tool_data.downloaded_path)); + Checks::check_exit(VCPKG_LINE_INFO, code == 0, "tar failed while extracting %s", tool_data.downloaded_path); + + Checks::check_exit(VCPKG_LINE_INFO, + fs.exists(tool_data.downloaded_exe_path), + "Expected %s to exist after extracting", + tool_data.downloaded_exe_path); + + return tool_data.downloaded_exe_path; +#endif } static fs::path get_cmake_path(const VcpkgPaths& paths) { -#if defined(_WIN32) + std::vector<fs::path> candidate_paths; +#if defined(_WIN32) || defined(__APPLE__) || defined(__linux__) static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "cmake"); + candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); #else static const ToolData TOOL_DATA = ToolData{{3, 5, 1}, ""}; #endif static const std::string VERSION_CHECK_ARGUMENTS = "--version"; - std::vector<fs::path> candidate_paths; -#if defined(_WIN32) - candidate_paths.push_back(TOOL_DATA.downloaded_exe_path); -#endif const std::vector<fs::path> from_path = Files::find_from_PATH("cmake"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); -#if defined(_WIN32) - candidate_paths.push_back(System::get_program_files_platform_bitness() / "CMake" / "bin" / "cmake.exe"); - candidate_paths.push_back(System::get_program_files_32_bit() / "CMake" / "bin"); -#endif + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "CMake" / "bin" / "cmake.exe"); + 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.required_version); @@ -202,7 +250,7 @@ namespace vcpkg return *p; } - return fetch_tool(paths.scripts, "cmake", TOOL_DATA); + return fetch_tool(paths, "cmake", TOOL_DATA); } static fs::path get_7za_path(const VcpkgPaths& paths) @@ -211,7 +259,7 @@ namespace vcpkg static const ToolData TOOL_DATA = parse_tool_data_from_xml(paths, "7zip"); if (!paths.get_filesystem().exists(TOOL_DATA.downloaded_exe_path)) { - return fetch_tool(paths.scripts, "7zip", TOOL_DATA); + return fetch_tool(paths, "7zip", TOOL_DATA); } return TOOL_DATA.downloaded_exe_path; #else @@ -234,7 +282,7 @@ namespace vcpkg return *p; } - return fetch_tool(paths.scripts, "nuget", TOOL_DATA); + return fetch_tool(paths, "nuget", TOOL_DATA); } static fs::path get_git_path(const VcpkgPaths& paths) @@ -252,10 +300,11 @@ namespace vcpkg #endif const std::vector<fs::path> from_path = Files::find_from_PATH("git"); candidate_paths.insert(candidate_paths.end(), from_path.cbegin(), from_path.cend()); -#if defined(_WIN32) - candidate_paths.push_back(System::get_program_files_platform_bitness() / "git" / "cmd" / "git.exe"); - candidate_paths.push_back(System::get_program_files_32_bit() / "git" / "cmd" / "git.exe"); -#endif + + const auto& program_files = System::get_program_files_platform_bitness(); + if (const auto pf = program_files.get()) candidate_paths.push_back(*pf / "git" / "cmd" / "git.exe"); + 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.required_version); @@ -264,7 +313,7 @@ namespace vcpkg return *p; } - return fetch_tool(paths.scripts, "git", TOOL_DATA); + return fetch_tool(paths, "git", TOOL_DATA); } static fs::path get_ifw_installerbase_path(const VcpkgPaths& paths) @@ -290,10 +339,10 @@ namespace vcpkg return *p; } - return fetch_tool(paths.scripts, "installerbase", TOOL_DATA); + return fetch_tool(paths, "installerbase", TOOL_DATA); } - Expected<VcpkgPaths> VcpkgPaths::create(const fs::path& vcpkg_root_dir) + Expected<VcpkgPaths> VcpkgPaths::create(const fs::path& vcpkg_root_dir, const std::string& default_vs_path) { std::error_code ec; const fs::path canonical_vcpkg_root_dir = fs::stdfs::canonical(vcpkg_root_dir, ec); @@ -304,6 +353,7 @@ namespace vcpkg VcpkgPaths paths; paths.root = canonical_vcpkg_root_dir; + paths.default_vs_path = default_vs_path; if (paths.root.empty()) { @@ -621,7 +671,8 @@ namespace vcpkg const Toolset& VcpkgPaths::get_toolset(const Build::PreBuildInfo& prebuildinfo) const { - if (prebuildinfo.external_toolchain_file) + if (prebuildinfo.external_toolchain_file || + (!prebuildinfo.cmake_system_name.empty() && prebuildinfo.cmake_system_name != "WindowsStore")) { static Toolset external_toolset = []() -> Toolset { Toolset ret; @@ -643,7 +694,11 @@ namespace vcpkg std::vector<const Toolset*> candidates = Util::element_pointers(vs_toolsets); const auto tsv = prebuildinfo.platform_toolset.get(); - const auto vsp = prebuildinfo.visual_studio_path.get(); + auto vsp = prebuildinfo.visual_studio_path.get(); + if (!vsp && !default_vs_path.empty()) + { + vsp = &default_vs_path; + } if (tsv && vsp) { diff --git a/toolsrc/vcpkg/vcpkg.vcxproj b/toolsrc/vcpkg/vcpkg.vcxproj index 4def6a74b..2ab94eb0a 100644 --- a/toolsrc/vcpkg/vcpkg.vcxproj +++ b/toolsrc/vcpkg/vcpkg.vcxproj @@ -77,7 +77,7 @@ <MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
- <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -91,7 +91,7 @@ <MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
- <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -109,7 +109,7 @@ <Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -127,7 +127,7 @@ <Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj index d78e48e13..a2ceef9ce 100644 --- a/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj +++ b/toolsrc/vcpkgmetricsuploader/vcpkgmetricsuploader.vcxproj @@ -77,7 +77,7 @@ <MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
- <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -91,7 +91,7 @@ <MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
- <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -109,7 +109,7 @@ <Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -127,7 +127,7 @@ <Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
- <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>winhttp.lib;version.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
diff --git a/toolsrc/vcpkgtest/vcpkgtest.vcxproj b/toolsrc/vcpkgtest/vcpkgtest.vcxproj index d61b15a71..a0d44918d 100644 --- a/toolsrc/vcpkgtest/vcpkgtest.vcxproj +++ b/toolsrc/vcpkgtest/vcpkgtest.vcxproj @@ -120,6 +120,7 @@ <Link>
<SubSystem>Windows</SubSystem>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -138,6 +139,7 @@ <Link>
<SubSystem>Windows</SubSystem>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -159,6 +161,7 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -180,6 +183,7 @@ <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;$(VsInstallRoot)\VC\Auxiliary\VS\UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
