diff --git a/docs/maintainers/vcpkg_from_git.md b/docs/maintainers/vcpkg_from_git.md index 4b9a26c6211c36..2feed49aa361d2 100644 --- a/docs/maintainers/vcpkg_from_git.md +++ b/docs/maintainers/vcpkg_from_git.md @@ -19,7 +19,7 @@ Specifies the out-variable that will contain the extracted location. This should be set to `SOURCE_PATH` by convention. ### URL -The url of the git repository. Must start with `https`. +The url of the git repository. ### REF The git sha of the commit to download. diff --git a/docs/users/triplets.md b/docs/users/triplets.md index 21dea5c3168d47..08047565199122 100644 --- a/docs/users/triplets.md +++ b/docs/users/triplets.md @@ -125,6 +125,10 @@ Valid settings: * The Visual Studio 2017 platform toolset is `v141`. * The Visual Studio 2015 platform toolset is `v140`. +### VCPKG_LOAD_VCVARS_ENV +If `VCPKG_CHAINLOAD_TOOLCHAIN_FILE` is used, VCPKG will not setup the Visual Studio environment. +Setting `VCPKG_LOAD_VCVARS_ENV` to (true|1|on) changes this behavior so that the Visual Studio environment is setup following the same rules as if `VCPKG_CHAINLOAD_TOOLCHAIN_FILE` was not set. + ## MacOS Variables ### VCPKG_INSTALL_NAME_DIR diff --git a/ports/abseil/CONTROL b/ports/abseil/CONTROL index 2e4f9e5220852a..7e3f54a8bc038b 100644 --- a/ports/abseil/CONTROL +++ b/ports/abseil/CONTROL @@ -1,7 +1,10 @@ Source: abseil -Version: 2020-03-03 +Version: 2020-03-03-1 Homepage: https://github.com/abseil/abseil-cpp 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. - Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole. \ No newline at end of file + Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole. + +Feature: c++17 +Description: Enable compiler C++17. diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake index 4bc6e76ddc657b..c569d766aa12ec 100644 --- a/ports/abseil/portfile.cmake +++ b/ports/abseil/portfile.cmake @@ -11,9 +11,16 @@ vcpkg_from_github( fix-uwp-build.patch ) +set(CMAKE_CXX_STANDARD ) +if("c++17" IN_LIST FEATURES) + set(CMAKE_CXX_STANDARD 17) +endif() + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA + OPTIONS + -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} ) vcpkg_install_cmake() diff --git a/ports/bfgroup-lyra/CONTROL b/ports/bfgroup-lyra/CONTROL index c96f5ea08302ab..6a4d896f1fd483 100644 --- a/ports/bfgroup-lyra/CONTROL +++ b/ports/bfgroup-lyra/CONTROL @@ -1,4 +1,4 @@ Source: bfgroup-lyra -Version: 1.1 +Version: 1.3 Homepage: https://bfgroup.github.io/Lyra/ Description: A simple to use, composable, command line parser for C++ 11 and beyond diff --git a/ports/bfgroup-lyra/portfile.cmake b/ports/bfgroup-lyra/portfile.cmake index deeddbb35707e3..edcbc939f1f922 100644 --- a/ports/bfgroup-lyra/portfile.cmake +++ b/ports/bfgroup-lyra/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO bfgroup/Lyra - REF 1.1 - SHA512 afb1f97a3c72697a8739019e132758db270a9271b4be8f7e593f43155761550606d63795c657c586fb885bb61d78ad0fe1517537b8338c5e05ba74be5a8dc208 + REF 9e31b213ffd8c66414623f0b26614326a5e12853 # 1.3 + SHA512 03ff1bfa19bd4dfb00cb864fac5275b075bc0b3c817d2598338b7b957d571799e531cd851cd451d2896ed920dc3037edd22dc14826b343ff6f76bfa2a7982589 HEAD_REF master ) diff --git a/ports/blitz/CONTROL b/ports/blitz/CONTROL index 21057b38cabc6d..2df45ecfe459fc 100644 --- a/ports/blitz/CONTROL +++ b/ports/blitz/CONTROL @@ -1,4 +1,5 @@ Source: blitz -Version: 2019-09-26 +Version: 2020-03-25 Homepage: https://github.com/blitzpp/blitz -Description: Blitz++ is a C++ template class library that provides high-performance multidimensional array containers for scientific computing. \ No newline at end of file +Description: Blitz++ is a C++ template class library that provides high-performance multidimensional array containers for scientific computing. +Supports: !(arm|arm64|uwp) \ No newline at end of file diff --git a/ports/blitz/portfile.cmake b/ports/blitz/portfile.cmake index 24002fce5c3357..7e90f2a6456dcc 100644 --- a/ports/blitz/portfile.cmake +++ b/ports/blitz/portfile.cmake @@ -3,8 +3,8 @@ vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO blitzpp/blitz - REF 0e373f7c3478b10bd8ad8d699a291c57d9cb1e72 - SHA512 9ea0ba652b93fb3b159340b25bdef10c05662b2da23a3bd2e29ddd12d394b96513c0e5d9f348c0cc8fc767890f52d122a1b0fb8ac6adb77f1a8b4bc2beeac5d7 + REF 839fc5e0f35b1c38a01cfd7a94e83de81e8a6b55 + SHA512 efb6b19691e23c95cf6abd59607bce299b0c02a12ce6be105a35ad8509ab564b8dac8d6363f048e547d199e117d2bdd0e4ef3046d3c411f669c0a453a0b75627 HEAD_REF master ) @@ -14,13 +14,21 @@ vcpkg_add_to_path(${PYTHON2_DIR}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA + PREFER_NINJA + -DBUILD_DOC=OFF + -DBUILD_TESTING=OFF ) vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) # Handle copyright diff --git a/ports/boost-process/CONTROL b/ports/boost-process/CONTROL index 5431f39288de89..fd36ac08794148 100644 --- a/ports/boost-process/CONTROL +++ b/ports/boost-process/CONTROL @@ -1,6 +1,6 @@ # Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 Source: boost-process -Version: 1.72.0 +Version: 1.72.0-1 Build-Depends: boost-algorithm, boost-asio, boost-config, boost-core, boost-filesystem (!uwp), boost-fusion, boost-iterator, boost-move, boost-optional, boost-system, boost-tokenizer, boost-type-index, boost-vcpkg-helpers, boost-winapi Homepage: https://github.com/boostorg/process Description: Boost process module diff --git a/ports/boost-process/async_pipe_header.patch b/ports/boost-process/async_pipe_header.patch new file mode 100644 index 00000000000000..7308f4b9daf56a --- /dev/null +++ b/ports/boost-process/async_pipe_header.patch @@ -0,0 +1,37 @@ +diff --git a/include/boost/process/async_pipe.hpp b/include/boost/process/async_pipe.hpp +index 101fe1d59..a562432c0 100644 +--- a/include/boost/process/async_pipe.hpp ++++ b/include/boost/process/async_pipe.hpp +@@ -47,6 +47,8 @@ class async_pipe + */ + typedef platform_specific handle_type; + ++ typedef typename handle_type::executor_type executor_type; ++ + /** Construct a new async_pipe, does automatically open the pipe. + * Initializes source and sink with the same io_context. + * @note Windows creates a named pipe here, where the name is automatically generated. +diff --git a/include/boost/process/detail/posix/async_pipe.hpp b/include/boost/process/detail/posix/async_pipe.hpp +index 725a07890..a82c057b9 100644 +--- a/include/boost/process/detail/posix/async_pipe.hpp ++++ b/include/boost/process/detail/posix/async_pipe.hpp +@@ -23,6 +23,7 @@ class async_pipe + public: + typedef int native_handle_type; + typedef ::boost::asio::posix::stream_descriptor handle_type; ++ typedef typename handle_type::executor_type executor_type; + + inline async_pipe(boost::asio::io_context & ios) : async_pipe(ios, ios) {} + +diff --git a/include/boost/process/detail/windows/async_pipe.hpp b/include/boost/process/detail/windows/async_pipe.hpp +index 06d5f2d85..0b447f9b8 100644 +--- a/include/boost/process/detail/windows/async_pipe.hpp ++++ b/include/boost/process/detail/windows/async_pipe.hpp +@@ -48,6 +48,7 @@ class async_pipe + public: + typedef ::boost::winapi::HANDLE_ native_handle_type; + typedef ::boost::asio::windows::stream_handle handle_type; ++ typedef typename handle_type::executor_type executor_type; + + async_pipe(boost::asio::io_context & ios) : async_pipe(ios, ios, make_pipe_name(), true) {} + async_pipe(boost::asio::io_context & ios_source, boost::asio::io_context & ios_sink) diff --git a/ports/boost-process/portfile.cmake b/ports/boost-process/portfile.cmake index 4f89f80b6fce1d..e07c778e86a058 100644 --- a/ports/boost-process/portfile.cmake +++ b/ports/boost-process/portfile.cmake @@ -8,6 +8,7 @@ vcpkg_from_github( REF boost-1.72.0 SHA512 bc881bcfa817e848151d90a0837683b9833395a7f7b76de76c40c96615bb1da7d10c0dae84f6b70b47fdf762a62869cb1700730a74fe123901803128f9194a52 HEAD_REF master + PATCHES async_pipe_header.patch ) include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) diff --git a/ports/catch2/CONTROL b/ports/catch2/CONTROL index ac32127a6dbc0b..4a8e3ced35e9a2 100644 --- a/ports/catch2/CONTROL +++ b/ports/catch2/CONTROL @@ -1,4 +1,4 @@ Source: catch2 -Version: 2.11.1 +Version: 2.11.3 Description: A modern, header-only test framework for unit testing. Homepage: https://github.com/catchorg/Catch2 diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index 5a0923571808e9..76a5e61bb987d5 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO catchorg/Catch2 - REF d10b9bd02e098476670f5eb0527d2c7281476e8a #v2.11.1 - SHA512 c4a2f6bac4eb7abf8ad79aa1421b8b2ea623be3c946b02b9287fa2f95952b281a454eb56b80224fc1824e4d8c67317bc657eec4b4e65fb9709031602371e13b3 + REF 255aa5f2afe1a622c97422f65ace6ca915be0d8d # v2.11.3 + SHA512 e46d14105928fb43cd041bd4d797d255233d302d87f06823f7ae49f95b1e9a2fae321de4812f6e9ce3028a904cbd668cdf0ad3e6673bc5297f29d1fb1c46f130 HEAD_REF master ) diff --git a/ports/civetweb/CONTROL b/ports/civetweb/CONTROL index 07b7306f1481f0..eb9ee3ed027a94 100644 --- a/ports/civetweb/CONTROL +++ b/ports/civetweb/CONTROL @@ -1,4 +1,8 @@ Source: civetweb -Version: 2019-07-05 +Version: 2019-07-05-1 Description: Easy to use, powerful, C/C++ embeddable web server. -Supports: !uwp \ No newline at end of file +Supports: !uwp + +Feature: ssl +Build-Depends: openssl +Description: Enable SSL support \ No newline at end of file diff --git a/ports/civetweb/portfile.cmake b/ports/civetweb/portfile.cmake index 17a0d7f455a9af..39c63309b4b6b8 100644 --- a/ports/civetweb/portfile.cmake +++ b/ports/civetweb/portfile.cmake @@ -14,6 +14,10 @@ vcpkg_from_github( HEAD_REF master ) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + ssl CIVETWEB_ENABLE_SSL +) + vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA @@ -23,8 +27,9 @@ vcpkg_configure_cmake( -DCIVETWEB_ENABLE_CXX=ON -DCIVETWEB_ENABLE_IPV6=ON -DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF - -DCIVETWEB_ENABLE_SSL=OFF + -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF -DCIVETWEB_ENABLE_WEBSOCKETS=ON + ${FEATURE_OPTIONS} ) vcpkg_install_cmake() diff --git a/ports/corrade/CONTROL b/ports/corrade/CONTROL index a8217b2e891fcc..091144941de857 100644 --- a/ports/corrade/CONTROL +++ b/ports/corrade/CONTROL @@ -1,5 +1,5 @@ Source: corrade -Version: 2019.10 +Version: 2019.10-1 Description: C++11/C++14 multiplatform utility library Homepage: https://magnum.graphics/corrade/ Default-Features: interconnect, pluginmanager, testsuite, utility diff --git a/ports/corrade/portfile.cmake b/ports/corrade/portfile.cmake index 76f76959bf3f12..3c82bd94ba8616 100644 --- a/ports/corrade/portfile.cmake +++ b/ports/corrade/portfile.cmake @@ -25,16 +25,6 @@ foreach(_feature IN LISTS ALL_FEATURES) endif() endforeach() -if(NOT VCPKG_CMAKE_SYSTEM_NAME) - # building for Windows desktop - if (VCPKG_PLATFORM_TOOLSET STREQUAL "v142" AND NOT VCPKG_USE_HEAD_VERSION) - message("**********") - message("WARNING: Visual Studio 2019 is not official supported by Corrade/Magnum team. Please use --head version if you intend to have upstream support.") - message("**********") - set(_CUSTOM_BUILD_FLAGS "-DCORRADE_MSVC2017_COMPATIBILITY=ON") - endif() -endif() - vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA # Disable this option if project cannot be built with Ninja diff --git a/ports/cppgraphqlgen/CONTROL b/ports/cppgraphqlgen/CONTROL index 53a3179aee6777..e75e4407720961 100644 --- a/ports/cppgraphqlgen/CONTROL +++ b/ports/cppgraphqlgen/CONTROL @@ -1,5 +1,5 @@ Source: cppgraphqlgen -Version: 3.1.1 +Version: 3.2.0 Build-Depends: boost-filesystem (!uwp&!windows), boost-program-options, pegtl, rapidjson Description: C++ GraphQL schema service generator Homepage: https://github.com/microsoft/cppgraphqlgen diff --git a/ports/cppgraphqlgen/portfile.cmake b/ports/cppgraphqlgen/portfile.cmake index 5830c604de0a47..c89e6d4acfbe42 100644 --- a/ports/cppgraphqlgen/portfile.cmake +++ b/ports/cppgraphqlgen/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO microsoft/cppgraphqlgen - REF v3.1.1 - SHA512 c6ebffcfd6f563b2a4ba1822ca173c73fd41b6f1dfbd4f94e64bee4bff626c64d88b2a35fa4c38189ba16852945f53d1f60dd68dc0ea85eb036ec31c94e7bdf4 + REF 82763064a0551be86fa63f320206e863beef47c0 # v3.2.0 + SHA512 7c88cf95c0aa09eed18c8a807e4ee3ae7a74958e0bb95714f6e725d54bf4fadbce5438150e653d142aadcbeb2f167d5faad94b90728fd13c3fe54730fec559f0 HEAD_REF master ) @@ -22,4 +22,6 @@ vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/cppgraphqlgen) vcpkg_copy_pdbs() -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppgraphqlgen/copyright COPYONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/ports/exprtk/CONTROL b/ports/exprtk/CONTROL index f2d1c383e019af..2dc2b3a8ec2516 100644 --- a/ports/exprtk/CONTROL +++ b/ports/exprtk/CONTROL @@ -1,4 +1,4 @@ Source: exprtk -Version: 2019-07-11 -Homepage: https://github.com/ArashPartow/exprtk +Version: 2020-01-01 +Homepage: http://www.partow.net/programming/exprtk/index.html Description: Simple to use, easy to integrate and extremely efficient run-time C++ mathematical expression parser and evaluation engine. diff --git a/ports/exprtk/copyright b/ports/exprtk/copyright index ee372c989c48c7..56598bb5128dcf 100644 --- a/ports/exprtk/copyright +++ b/ports/exprtk/copyright @@ -1,4 +1,4 @@ -Copyright 1999-2018 Arash Partow +Copyright 1999-2020 Arash Partow http://www.partow.net/programming/exprtk/index.html Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/ports/exprtk/portfile.cmake b/ports/exprtk/portfile.cmake index 12aaeee1b84003..4ed9e3ffac398e 100644 --- a/ports/exprtk/portfile.cmake +++ b/ports/exprtk/portfile.cmake @@ -3,8 +3,8 @@ include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ArashPartow/exprtk - REF 7ccb123e9e79bc3df30a66c0bffe921d195702d7 - SHA512 75b6adaa254060053f56e3978be3e10847c9dae22f675eae728cb0c7fd9a5e6fee8c8278764826e0e0be3bcb2cfd2288e091d0f965ac2e331403683f15764b92 + REF 15b77a667b06d5bd82db01e0f4c773dd7cce9a97 + SHA512 14fdc2420ab8cb0c1552d91251822f873fe7485a2fbf49376261638c6b0a4d2b24ceeeff0692d2cc8e8b78efb13ab886d65f0bebe1efc2348a95c6dc19c98f73 ) file(COPY ${SOURCE_PATH}/exprtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL index 9b08398dbe5822..dce1531688537d 100644 --- a/ports/ffmpeg/CONTROL +++ b/ports/ffmpeg/CONTROL @@ -1,5 +1,5 @@ Source: ffmpeg -Version: 4.2-6 +Version: 4.2-7 Build-Depends: zlib Homepage: https://ffmpeg.org Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. @@ -53,3 +53,7 @@ Description: upgrade (L)GPL to version 3 Feature: avresample Description: Libav audio resampling library support in ffmpeg + +Feature: nvcodec +Build-Depends: ffnvcodec, cuda +Description: Hardware accelerated codecs \ No newline at end of file diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in index bb47069857eba4..cd61ffcc85604b 100644 --- a/ports/ffmpeg/FindFFMPEG.cmake.in +++ b/ports/ffmpeg/FindFFMPEG.cmake.in @@ -33,7 +33,7 @@ set(FFMPEG_VERSION "4.2") find_dependency(Threads) if(UNIX) - list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread -lvdpau -lX11) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread -lX11) endif() if(@ENABLE_BZIP2@) diff --git a/ports/ffmpeg/build.sh b/ports/ffmpeg/build.sh index 048d9ec08d250c..40f1797cdad767 100644 --- a/ports/ffmpeg/build.sh +++ b/ports/ffmpeg/build.sh @@ -1,6 +1,7 @@ #!/usr/bin/bash set -e export PATH=/usr/bin:$PATH +export PKG_CONFIG_PATH="`cygpath -p ${PKG_CONFIG_PATH}`" # Export HTTP(S)_PROXY as http(s)_proxy: if [ "$HTTP_PROXY" ]; then export http_proxy=$HTTP_PROXY diff --git a/ports/ffmpeg/build_linux.sh b/ports/ffmpeg/build_linux.sh index b24be1346d3c45..d7360ce1df0300 100644 --- a/ports/ffmpeg/build_linux.sh +++ b/ports/ffmpeg/build_linux.sh @@ -16,6 +16,7 @@ PATH_TO_PACKAGE_DIR=$3 cd "$PATH_TO_BUILD_DIR" echo "=== CONFIGURING ===" +chmod a+x "$PATH_TO_SRC_DIR/configure" "$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" $4 echo "=== BUILDING ===" make -j6 diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake index b1ddd0ddfb27fb..a87ea6a0197a97 100644 --- a/ports/ffmpeg/portfile.cmake +++ b/ports/ffmpeg/portfile.cmake @@ -131,6 +131,16 @@ if("avresample" IN_LIST FEATURES) set(OPTIONS "${OPTIONS} --enable-avresample") endif() +if (VCPKG_TARGET_IS_OSX) + set(OPTIONS "${OPTIONS} --disable-vdpau") # disable vdpau in OSX +endif() + +if("nvcodec" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-cuda --enable-nvenc --enable-cuvid --disable-libnpp") +else() + set(OPTIONS "${OPTIONS} --disable-cuda --disable-nvenc --disable-cuvid --disable-libnpp") +endif() + set(OPTIONS_CROSS "") if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") @@ -146,7 +156,7 @@ else() message(FATAL_ERROR "Unsupported architecture") endif() -if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") +if(VCPKG_TARGET_IS_UWP) 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") set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") @@ -160,7 +170,7 @@ set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}") if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") set(OPTIONS "${OPTIONS} --disable-static --enable-shared") - if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if (VCPKG_TARGET_IS_UWP) set(OPTIONS "${OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") endif() endif() @@ -177,6 +187,7 @@ if(VCPKG_TARGET_IS_WINDOWS) endif() set(ENV_LIB_PATH "$ENV{${LIB_PATH_VAR}}") +set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig") message(STATUS "Building Options: ${OPTIONS}") @@ -235,7 +246,7 @@ endif() foreach(DEF_FILE ${DEF_FILES}) get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY) get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME) - string(REGEX REPLACE "-[0-9]*\\.def" ".lib" OUT_FILE_NAME "${DEF_FILE_NAME}") + string(REGEX REPLACE "-[0-9]*\\.def" "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" OUT_FILE_NAME "${DEF_FILE_NAME}") file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE) file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE) message(STATUS "Generating ${OUT_FILE_NATIVE}") @@ -246,14 +257,25 @@ foreach(DEF_FILE ${DEF_FILES}) ) endforeach() -file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp) -file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) -file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) -set(FILES_TO_REMOVE ${EXP_FILES} ${LIB_FILES} ${DEF_FILES} ${EXE_FILES}) -list(LENGTH FILES_TO_REMOVE FILES_TO_REMOVE_LEN) -if(FILES_TO_REMOVE_LEN GREATER 0) - file(REMOVE ${FILES_TO_REMOVE}) +# Handle tools +if (VCPKG_TARGET_IS_WINDOWS) + file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp) + file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(GLOB EXE_FILES_REL ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(GLOB EXE_FILES_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + set(FILES_TO_REMOVE ${EXP_FILES} ${LIB_FILES} ${DEF_FILES} ${EXE_FILES_REL} ${EXE_FILES_DBG}) + + if(FILES_TO_REMOVE) + if (EXE_FILES_REL) + file(INSTALL ${EXE_FILES_REL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + endif() + if (EXE_FILES_DBG) + file(INSTALL ${EXE_FILES_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() + file(REMOVE ${FILES_TO_REMOVE}) + endif() endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") @@ -278,7 +300,7 @@ elseif(${LICENSE_STRING} STREQUAL "License: nonfree and unredistributable") else() message(FATAL_ERROR "Failed to identify license (${LICENSE_STRING})") endif() -file(INSTALL ${SOURCE_PATH}/${LICENSE_FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) configure_file(${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/FindFFMPEG.cmake @ONLY) file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/${LICENSE_FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/ffnvcodec/CONTROL b/ports/ffnvcodec/CONTROL index 5cc6cb19b8d34a..5779ec9e3dd385 100644 --- a/ports/ffnvcodec/CONTROL +++ b/ports/ffnvcodec/CONTROL @@ -1,4 +1,4 @@ -Source: ffnvcodec -Version: 9.1.23.0 -Homepage: https://github.com/FFmpeg/nv-codec-headers -Description: FFmpeg version of Nvidia Codec SDK headers. \ No newline at end of file +Source: ffnvcodec +Version: 9.1.23.1 +Homepage: https://github.com/FFmpeg/nv-codec-headers +Description: FFmpeg version of Nvidia Codec SDK headers. diff --git a/ports/ffnvcodec/build.sh b/ports/ffnvcodec/build.sh new file mode 100644 index 00000000000000..416c6bd8f93f29 --- /dev/null +++ b/ports/ffnvcodec/build.sh @@ -0,0 +1,18 @@ +#!/usr/bin/bash + +# Deploys the ffnvcodec.pc file to the MSYS rootfs so that pkgconfig can find it. + +set -e +export PATH=/usr/bin:$PATH + +SOURCE_PATH="$1" +CURRENT_PACKAGES_DIR="$2" + +pushd ${SOURCE_PATH} + +# Create ffnvcodec.pc +make PREFIX=${CURRENT_PACKAGES_DIR} +make install PREFIX=${CURRENT_PACKAGES_DIR} + + +popd diff --git a/ports/ffnvcodec/copyright b/ports/ffnvcodec/copyright new file mode 100644 index 00000000000000..07c1bc4d77f452 --- /dev/null +++ b/ports/ffnvcodec/copyright @@ -0,0 +1,26 @@ +/* + * This copyright notice applies to this header file only: + * + * Copyright (c) 2010-2019 NVIDIA Corporation + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the software, and to permit persons to whom the + * software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ diff --git a/ports/ffnvcodec/portfile.cmake b/ports/ffnvcodec/portfile.cmake index c6f13e711ab9e7..66d8bcb18c2c25 100644 --- a/ports/ffnvcodec/portfile.cmake +++ b/ports/ffnvcodec/portfile.cmake @@ -1,13 +1,53 @@ -# Header-only-library -vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO FFmpeg/nv-codec-headers - REF n9.1.23.0 - SHA512 d9cb1ad496d971da31165e643c6c4f433561a856050503783051604f24ea5f9997859b05695632ea94ce9659966915789e6d7f7d536764804c9f673d1c8c63e4 - HEAD_REF master -) - -file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) - -#Handle copyright -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file +# Get nvcodec +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FFmpeg/nv-codec-headers + REF 4a0bbfd58724d6d19851cd8a6f7a9098dde9ab77 # 9.1.23.1 + SHA512 39b643c6925558428f2e814fc3441878a906f324163396b8c6139ce48f62308c3dc2416b9c995eaed890338919ca0dfc9437fbb6b6d078f7a6f1b9675104c223 + HEAD_REF master +) + +# ==================================================== +# Install the pkgconfig info for the `nvcodec` package +# ==================================================== + +# Windows +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make pkg-config) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + + message(STATUS "Building ${_csc_PROJECT_PATH} for Release") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + + # Make and deploy the ffnvcodec.pc file using MSYS + # (so that FFmpeg can find it in the MSYS rootfs) + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}" + "${SOURCE_PATH}" + "${CURRENT_PACKAGES_DIR}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} + LOGNAME build-${TARGET_TRIPLET} + ) + +# Linux, etc. +else() + FIND_PROGRAM(MAKE make) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") + ENDIF () + + vcpkg_execute_required_process( + COMMAND make PREFIX=$${CURRENT_PACKAGES_DIR} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME make-${TARGET_TRIPLET} + ) + + # FFmpeg uses pkgconfig to find ffnvcodec.pc, so install it where + # FFMpeg's call to pkgconfig expects to find it. + file(INSTALL ${SOURCE_PATH}/ffnvcodec.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +endif() + +# Install the files to their default vcpkg locations +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${CURRENT_PORT_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/freerdp/CONTROL b/ports/freerdp/CONTROL index 192a19f88674f8..56e9b310a79f20 100644 --- a/ports/freerdp/CONTROL +++ b/ports/freerdp/CONTROL @@ -1,5 +1,5 @@ Source: freerdp -Version: 2.0.0-rc4-5 +Version: 2.0.0-rc4-6 Homepage: https://github.com/FreeRDP/FreeRDP Description: A free implementation of the Remote Desktop Protocol (RDP) Build-Depends: openssl, glib (!windows) diff --git a/ports/freerdp/portfile.cmake b/ports/freerdp/portfile.cmake index b41298e23df9eb..b424441bac0543 100644 --- a/ports/freerdp/portfile.cmake +++ b/ports/freerdp/portfile.cmake @@ -11,6 +11,10 @@ vcpkg_from_github( fix-include-install-path.patch ) +if (NOT VCPKG_TARGET_IS_WINDOWS) + message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libxfixes-dev\n") +endif() + if(VCPKG_CRT_LINKAGE STREQUAL "static") set(FREERDP_CRT_LINKAGE -DMSVC_RUNTIME=static) endif() @@ -69,9 +73,26 @@ foreach(PACKAGE FreeRDP-Client2 FreeRDP2 WinPR2) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE} ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE}_temp/${PACKAGE}) endforeach() -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP-Client2_temp/FreeRDP-Client2 TARGET_PATH share/freerdp-client) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2) -vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WinPR2_temp/WinPR2 TARGET_PATH share/winpr) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP-Client2_temp/FreeRDP-Client2 TARGET_PATH share/FreeRDP-Client) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2 TARGET_PATH share/FreeRDP) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WinPR2_temp/WinPR2 TARGET_PATH share/WinPR) + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-debug.cmake + "debug/lib/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-debug.cmake + "debug/lib/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-release.cmake + "lib/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-release.cmake + "lib/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share diff --git a/ports/geotrans/CONTROL b/ports/geotrans/CONTROL index 892959a9b4b907..72885e4fb7ce84 100644 --- a/ports/geotrans/CONTROL +++ b/ports/geotrans/CONTROL @@ -1,3 +1,4 @@ Source: geotrans -Version: 3.8 -Description: Geotrans is a library that allows you convert geographic coordinates among a wide variety of coordinate systems, map projections, and datums. +Version: 3.7 +Homepage: https://earth-info.nga.mil/GandG/update/index.php?action=home +Description: GEOTRANS is an application that allows you to convert geographic coordinates among a wide variety of coordinate systems, map projections, grids, and datums. GEOTRANS runs in Microsoft Windows and LINUX environments. diff --git a/ports/halide/CONTROL b/ports/halide/CONTROL index 7ad30fb6d98810..5120d819047368 100644 --- a/ports/halide/CONTROL +++ b/ports/halide/CONTROL @@ -1,8 +1,8 @@ Source: halide -Version: release_2019_08_27-1 +Version: release_2019_08_27-2 Homepage: https://github.com/halide/Halide Description: Halide is a programming language designed to make it easier to write high-performance image processing code on modern machines. -Build-Depends: llvm, openblas +Build-Depends: llvm[tools], openblas Feature: app Description: app support diff --git a/ports/hdf5/CONTROL b/ports/hdf5/CONTROL index 6a74b2da92b83e..15819912629587 100644 --- a/ports/hdf5/CONTROL +++ b/ports/hdf5/CONTROL @@ -1,5 +1,5 @@ Source: hdf5 -Version: 1.10.5-10 +Version: 1.10.5-12 Homepage: https://www.hdfgroup.org/downloads/hdf5/ Description: HDF5 is a data model, library, and file format for storing and managing data Default-Features: szip, zlib @@ -12,6 +12,9 @@ Build-Depends: mpi Feature: cpp Description: Builds cpp lib +Feature: tools +Description: Build hdf tools + Feature: szip Description: Build with szip Build-Depends: szip @@ -19,3 +22,8 @@ Build-Depends: szip Feature: zlib Description: Build with zlib Build-Depends: zlib + +Feature: fortran +Description: Build with fortran +Build-Depends: + diff --git a/ports/hdf5/export-private.patch b/ports/hdf5/export-private.patch new file mode 100644 index 00000000000000..9dd877846ab30b --- /dev/null +++ b/ports/hdf5/export-private.patch @@ -0,0 +1,15 @@ +diff --git a/hdf5-1.10.5/hl/src/H5LDprivate.h b/hdf5-1.10.5/hl/src/H5LDprivate.h +index b52928b53..5f02ea781 100644 +--- a/hdf5-1.10.5/hl/src/H5LDprivate.h ++++ b/hdf5-1.10.5/hl/src/H5LDprivate.h +@@ -40,8 +40,8 @@ typedef struct H5LD_memb_t { + * #2: these two routines are too specific to be made as public routines + * Decide to do #3 at this point of time after some discussion. + */ +-void H5LD_clean_vector(H5LD_memb_t *listv[]); +-int H5LD_construct_vector(char *fields, H5LD_memb_t *listv[], hid_t par_tid); ++H5_HLDLL void H5LD_clean_vector(H5LD_memb_t *listv[]); ++H5_HLDLL int H5LD_construct_vector(char *fields, H5LD_memb_t *listv[], hid_t par_tid); + + #endif /* end _H5LDprivate_H */ + diff --git a/ports/hdf5/hdf5_config.patch b/ports/hdf5/hdf5_config.patch index c9966b30f457e8..2b44a5320ec5ab 100644 --- a/ports/hdf5/hdf5_config.patch +++ b/ports/hdf5/hdf5_config.patch @@ -8,7 +8,7 @@ index 3bd9e1d..7f6699c 100644 if (NOT TARGET "@HDF5_PACKAGE@") - if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "zlib") - include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) -+ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND NOT TARGET "zlib") ++ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND NOT TARGET ZLIB::ZLIB) + find_package(ZLIB REQUIRED) endif () - if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS AND NOT TARGET "szip") diff --git a/ports/hdf5/portfile.cmake b/ports/hdf5/portfile.cmake index d2b3a0c15f9711..cf5270c1a70df9 100644 --- a/ports/hdf5/portfile.cmake +++ b/ports/hdf5/portfile.cmake @@ -11,24 +11,37 @@ vcpkg_extract_source_archive_ex( ARCHIVE ${ARCHIVE} REF hdf5 PATCHES - hdf5_config.patch - fix-generate.patch + hdf5_config.patch + fix-generate.patch # removes the build of static targets in shared builds + static-targets.patch # maps the internal static tagets to the shared targets if building as a dynamic library + export-private.patch # exports two additional functions in shared builds to make hl/tools/h5watch build in shared builds. ) if ("parallel" IN_LIST FEATURES AND "cpp" IN_LIST FEATURES) message(FATAL_ERROR "Feature Parallel and C++ options are mutually exclusive.") endif() +if ("fortran" IN_LIST FEATURE) + message(WARNING "Fortran is not yet official supported within VCPKG. Build will most likly fail if ninja 1.10 and a Fortran compiler are not available.") +endif() + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - FEATURES + FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used parallel HDF5_ENABLE_PARALLEL + tools HDF5_BUILD_TOOLS cpp HDF5_BUILD_CPP_LIB szip HDF5_ENABLE_SZIP_SUPPORT szip HDF5_ENABLE_SZIP_ENCODING zlib HDF5_ENABLE_Z_LIB_SUPPORT + fortran HDF5_BUILD_FORTRAN ) file(REMOVE ${SOURCE_PATH}/config/cmake_ext_mod/FindSZIP.cmake)#Outdated; does not find debug szip + +if(FEATURES MATCHES "tools" AND VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND FEATURE_OPTIONS -DBUILD_STATIC_EXECS=ON) +endif() + find_library(SZIP_RELEASE NAMES libsz libszip szip sz PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) find_library(SZIP_DEBUG NAMES libsz libszip szip sz libsz_D libszip_D szip_D sz_D szip_debug PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) @@ -40,7 +53,6 @@ vcpkg_configure_cmake( ${FEATURE_OPTIONS} -DBUILD_TESTING=OFF -DHDF5_BUILD_EXAMPLES=OFF - -DHDF5_BUILD_TOOLS=OFF -DHDF5_INSTALL_DATA_DIR=share/hdf5/data -DHDF5_INSTALL_CMAKE_DIR=share "-DSZIP_LIBRARY_DEBUG:PATH=${SZIP_DEBUG}" @@ -48,18 +60,43 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() + vcpkg_copy_pdbs() vcpkg_fixup_cmake_targets() -#Linux build create additional scripts here. I dont know what they are doing so I am deleting them and hope for the best -if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -endif() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(READ "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" contents) +string(REPLACE [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/bin"]] [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/tools/hdf5"]] contents ${contents}) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" ${contents}) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/data/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +if(FEATURES MATCHES "tools") + set(TOOLS h5cc h5hlcc h5c++ h5hlc++ h5copy h5diff h5dump h5ls h5stat gif2h5 h52gif h5clear h5debug h5format_convert h5jam h5unjam h5ls h5mkgrp h5repack h5repart h5watch ph5diff h5import) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(TOOL_SUFFIXES "-shared${VCPKG_TARGET_EXECUTABLE_SUFFIX};${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + else() + set(TOOL_SUFFIXES "-static${VCPKG_TARGET_EXECUTABLE_SUFFIX};${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + endif() + + foreach(tool IN LISTS TOOLS) + foreach(suffix IN LISTS TOOL_SUFFIXES) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + endif() + endforeach() + endforeach() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/data/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) diff --git a/ports/hdf5/static-targets.patch b/ports/hdf5/static-targets.patch new file mode 100644 index 00000000000000..3e3dfb181750c4 --- /dev/null +++ b/ports/hdf5/static-targets.patch @@ -0,0 +1,37 @@ +diff --git a/hdf5-1.10.5/CMakeLists.txt b/hdf5-1.10.5/CMakeLists.txt +index 6ca2f5c54..f7a4db9e5 100644 +--- a/hdf5-1.10.5/CMakeLists.txt ++++ b/hdf5-1.10.5/CMakeLists.txt +@@ -150,6 +150,7 @@ set (HDF5_JAVA_TEST_LIB_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_JAVA_TEST_LIB + #----------------------------------------------------------------------------- + # Set the target names of all the libraries + #----------------------------------------------------------------------------- ++if(NOT BUILD_SHARED_LIBS) + set (HDF5_LIB_TARGET "${HDF5_LIB_CORENAME}-static") + set (HDF5_TEST_LIB_TARGET "${HDF5_TEST_LIB_CORENAME}-static") + set (HDF5_CPP_LIB_TARGET "${HDF5_CPP_LIB_CORENAME}-static") +@@ -162,9 +163,24 @@ set (HDF5_F90_TEST_LIB_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-static") + set (HDF5_F90_C_TEST_LIB_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-static") + set (HDF5_HL_F90_LIB_TARGET "${HDF5_HL_F90_LIB_CORENAME}-static") + set (HDF5_HL_F90_C_LIB_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-static") ++else() ++set (HDF5_LIB_TARGET "${HDF5_LIB_CORENAME}-shared") ++set (HDF5_TEST_LIB_TARGET "${HDF5_TEST_LIB_CORENAME}-shared") ++set (HDF5_CPP_LIB_TARGET "${HDF5_CPP_LIB_CORENAME}-shared") ++set (HDF5_HL_LIB_TARGET "${HDF5_HL_LIB_CORENAME}-shared") ++set (HDF5_HL_CPP_LIB_TARGET "${HDF5_HL_CPP_LIB_CORENAME}-shared") ++set (HDF5_TOOLS_LIB_TARGET "${HDF5_TOOLS_LIB_CORENAME}-shared") ++set (HDF5_F90_LIB_TARGET "${HDF5_F90_LIB_CORENAME}-shared") ++set (HDF5_F90_C_LIB_TARGET "${HDF5_F90_C_LIB_CORENAME}-shared") ++set (HDF5_F90_TEST_LIB_TARGET "${HDF5_F90_TEST_LIB_CORENAME}-shared") ++set (HDF5_F90_C_TEST_LIB_TARGET "${HDF5_F90_C_TEST_LIB_CORENAME}-shared") ++set (HDF5_HL_F90_LIB_TARGET "${HDF5_HL_F90_LIB_CORENAME}-shared") ++set (HDF5_HL_F90_C_LIB_TARGET "${HDF5_HL_F90_C_LIB_CORENAME}-shared") ++endif() + set (HDF5_JAVA_JNI_LIB_TARGET "${HDF5_JAVA_JNI_LIB_CORENAME}") + set (HDF5_JAVA_HDF5_LIB_TARGET "${HDF5_JAVA_HDF5_LIB_CORENAME}") + set (HDF5_JAVA_TEST_LIB_TARGET "${HDF5_JAVA_TEST_LIB_CORENAME}") ++ + set (HDF5_LIBSH_TARGET "${HDF5_LIB_CORENAME}-shared") + set (HDF5_TEST_LIBSH_TARGET "${HDF5_TEST_LIB_CORENAME}-shared") + set (HDF5_CPP_LIBSH_TARGET "${HDF5_CPP_LIB_CORENAME}-shared") diff --git a/ports/intel-ipsec/CONTROL b/ports/intel-ipsec/CONTROL index 0056f00f0c19ee..c5b495a37b2172 100644 --- a/ports/intel-ipsec/CONTROL +++ b/ports/intel-ipsec/CONTROL @@ -1,4 +1,3 @@ Source: intel-ipsec -Version: 0.52 +Version: 0.52-1 Description: Intel(R) Multi-Buffer Crypto for IPsec Library - diff --git a/ports/intel-ipsec/portfile.cmake b/ports/intel-ipsec/portfile.cmake index 988e252199c3ae..501239b7038060 100644 --- a/ports/intel-ipsec/portfile.cmake +++ b/ports/intel-ipsec/portfile.cmake @@ -1,6 +1,4 @@ -INCLUDE(vcpkg_common_functions) - -IF (NOT VCPKG_CMAKE_SYSTEM_NAME) +IF (VCPKG_TARGET_IS_WINDOWS) SET(EXEC_ENV "Windows") ELSE () SET(EXEC_ENV "${VCPKG_CMAKE_SYSTEM_NAME}") @@ -59,4 +57,4 @@ FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/intel-ipsecConfig.cmake DESTINATION ${CUR FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) +#VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/ports/jsoncons/CONTROL b/ports/jsoncons/CONTROL index 945c1cb5d9dad4..8d545e9e750c86 100644 --- a/ports/jsoncons/CONTROL +++ b/ports/jsoncons/CONTROL @@ -1,4 +1,4 @@ Source: jsoncons -Version: 0.148.0 +Version: 0.149.0 Description: A C++, header-only library for constructing JSON and JSON-like text and binary data formats, with JSON Pointer, JSON Patch, JSONPath, CSV, MessagePack, CBOR, BSON, UBJSON Homepage: https://github.com/danielaparker/jsoncons diff --git a/ports/jsoncons/portfile.cmake b/ports/jsoncons/portfile.cmake index 4a456f006c6770..95a8c6fea7a640 100644 --- a/ports/jsoncons/portfile.cmake +++ b/ports/jsoncons/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO danielaparker/jsoncons - REF a7436dab2e15df2a4b57d224317e7f26cee45a64 # v0.148.0 - SHA512 3541d03d0777aaad5bb29d456d72c5275528cd13436e106848ef4068fafb857a21b9b7f4bb05e670ea3e7e4121c95b113f83a769e944e9c76ddb5e690234076c + REF ecc3ee882b0eb4f000709037a26ef4a25e313f29 # v0.149.0 + SHA512 385a1a5221afbdc050238e844a8ecd85be164a7d13fd0d4209a99ac00df6953732d9354e05efaa58001f95193dc86165cd12a0b3ef206a582a3dc9a28495b49d HEAD_REF master ) diff --git a/ports/kealib/CONTROL b/ports/kealib/CONTROL index 3c71c56b8b950d..d31490c4d5a936 100644 --- a/ports/kealib/CONTROL +++ b/ports/kealib/CONTROL @@ -1,5 +1,5 @@ Source: kealib -Version: 1.4.11-2 +Version: 1.4.11-3 Build-Depends: hdf5[cpp], zlib, szip Homepage: https://bitbucket.org/chchrsc/kealib Description: kealib is gdal model using HDF5 standard. diff --git a/ports/kealib/portfile.cmake b/ports/kealib/portfile.cmake index 3d27e296ec4bc2..24446d948e6c9a 100644 --- a/ports/kealib/portfile.cmake +++ b/ports/kealib/portfile.cmake @@ -1,16 +1,10 @@ -include(vcpkg_common_functions) - -vcpkg_download_distfile(ARCHIVE - URLS "https://bitbucket.org/chchrsc/kealib/downloads/kealib-1.4.11.tar.gz" - FILENAME "kealib-1.4.11.tar.gz" - SHA512 e080dfd51111f85ddf8ab1bd71aaf7ec6cbe814db29ed62806362ef83718f777935347d9063cf29085f21bf09d4277fd88f5269af6555304130f50d093d28f63 -) - -vcpkg_extract_source_archive_ex( - ARCHIVE ${ARCHIVE} +vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH - PATCHES - hdf5_include.patch + REPO ubarsc/kealib + REF de6dabd414039dd36a1ff01243901cec3f45256e #1.4.11 + SHA512 34032dd27aee0714cbe6b76b2f731a05408fd5ff78080343bcfbc3aa7e6eeb06a341a423cee1e7f3624f4c1f661feaf4ea3a3d2e53172933e49982df0c438a6f + HEAD_REF master + PATCHES hdf5_include.patch ) if ("parallel" IN_LIST FEATURES) @@ -36,9 +30,10 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(INSTALL ${SOURCE_PATH}/python/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/kealib RENAME copyright) - 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(INSTALL ${SOURCE_PATH}/python/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libconfig/CONTROL b/ports/libconfig/CONTROL index 3cbedcf5c4a544..b6b5eb74b6bed3 100644 --- a/ports/libconfig/CONTROL +++ b/ports/libconfig/CONTROL @@ -1,4 +1,4 @@ Source: libconfig -Version: 1.7.2-1 +Version: 1.7.2-2 Homepage: https://github.com/hyperrealm/libconfig Description: C/C++ library for processing configuration files diff --git a/ports/libconfig/portfile.cmake b/ports/libconfig/portfile.cmake index a3958d342df0cd..dd5a4482b1e71e 100644 --- a/ports/libconfig/portfile.cmake +++ b/ports/libconfig/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO hyperrealm/libconfig @@ -19,6 +17,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_copy_pdbs() + foreach(FILE ${CURRENT_PACKAGES_DIR}/include/libconfig.h++ ${CURRENT_PACKAGES_DIR}/include/libconfig.h) file(READ ${FILE} _contents) string(REPLACE "defined(LIBCONFIGXX_EXPORTS)" "0" _contents "${_contents}") @@ -34,6 +34,4 @@ foreach(FILE ${CURRENT_PACKAGES_DIR}/include/libconfig.h++ ${CURRENT_PACKAGES_DI file(WRITE ${FILE} "${_contents}") endforeach() -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libconfig RENAME copyright) - -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libodb-boost/portfile.cmake b/ports/libodb-boost/portfile.cmake index ee429c9ab1b2da..08689fb1316bb4 100644 --- a/ports/libodb-boost/portfile.cmake +++ b/ports/libodb-boost/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_download_distfile(ARCHIVE URLS "http://www.codesynthesis.com/download/odb/2.4/libodb-boost-2.4.0.tar.gz" FILENAME "libodb-boost-2.4.0.tar.gz" @@ -24,11 +22,12 @@ vcpkg_configure_cmake( ) vcpkg_install_cmake() +vcpkg_copy_pdbs() file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_boostConfig-debug.cmake LIBODB_DEBUG_TARGETS) string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_boostConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb-boost) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb-boost/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb-boost/copyright) -vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/libpq/CONTROL b/ports/libpq/CONTROL index 359481816ab02d..8517fda64f0a4b 100644 --- a/ports/libpq/CONTROL +++ b/ports/libpq/CONTROL @@ -1,5 +1,5 @@ Source: libpq -Version: 12.0 +Version: 12.0-1 Build-Depends: libpq[bonjour] (osx) Supports: !uwp Homepage: https://www.postgresql.org/ diff --git a/ports/libpq/portfile.cmake b/ports/libpq/portfile.cmake index bd012fcb1688e3..39707c185f8fa5 100644 --- a/ports/libpq/portfile.cmake +++ b/ports/libpq/portfile.cmake @@ -168,7 +168,7 @@ if(VCPKG_TARGET_IS_WINDOWS) /p:UseIntelMKL=No /p:WindowsTargetPlatformVersion=${VCPKG_TARGET_PLATFORM_VERSION} /m - /p:ForceImportBeforeCppTargets=${SCRIPTS}/buildsystems/msbuild/vcpkg.targets + /p:ForceImportBeforeCppTargets=\"${SCRIPTS}/buildsystems/msbuild/vcpkg.targets\" /p:VcpkgTriplet=${TARGET_TRIPLET}" ) if(HAS_TOOLS) diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL index 2d30612b0f01e9..64b4aebd4968a3 100644 --- a/ports/llvm/CONTROL +++ b/ports/llvm/CONTROL @@ -1,10 +1,10 @@ Source: llvm -Version: 8.0.0-4 +Version: 8.0.0-5 Homepage: https://llvm.org/ Description: The LLVM Compiler Infrastructure Build-Depends: atlmfc (windows) Supports: !uwp -Default-Features: tools, utils +Default-Features: utils Feature: tools Description: Generate build targets for the LLVM tools. diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake index d8613f728af24a..85ffb48e428ec7 100644 --- a/ports/llvm/portfile.cmake +++ b/ports/llvm/portfile.cmake @@ -63,37 +63,44 @@ vcpkg_configure_cmake( vcpkg_install_cmake() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") +if((NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") AND "tools" IN_LIST FEATURES) file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*) file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/llvm) file(REMOVE ${EXE}) endif() -if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") +if((NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") AND "tools" IN_LIST FEATURES) file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*) file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/llvm) file(REMOVE ${DEBUG_EXE}) endif() -vcpkg_fixup_cmake_targets(CONFIG_PATH share/clang TARGET_PATH share/clang) +if ("tools" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/clang TARGET_PATH share/clang) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(READ ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-release.cmake RELEASE_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/tools/llvm" RELEASE_MODULE "${RELEASE_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-release.cmake "${RELEASE_MODULE}") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-debug.cmake DEBUG_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}/debug/bin" "\${_IMPORT_PREFIX}/tools/llvm" DEBUG_MODULE "${DEBUG_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-debug.cmake "${DEBUG_MODULE}") + endif() +endif() + vcpkg_fixup_cmake_targets(CONFIG_PATH share/llvm) vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/llvm) if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") - file(READ ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-release.cmake RELEASE_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/tools/llvm" RELEASE_MODULE "${RELEASE_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-release.cmake "${RELEASE_MODULE}") - file(READ ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-release.cmake RELEASE_MODULE) string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/tools/llvm" RELEASE_MODULE "${RELEASE_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-release.cmake "${RELEASE_MODULE}") endif() if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") - file(READ ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-debug.cmake DEBUG_MODULE) - string(REPLACE "\${_IMPORT_PREFIX}/debug/bin" "\${_IMPORT_PREFIX}/tools/llvm" DEBUG_MODULE "${DEBUG_MODULE}") - file(WRITE ${CURRENT_PACKAGES_DIR}/share/clang/ClangTargets-debug.cmake "${DEBUG_MODULE}") - file(READ ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-debug.cmake DEBUG_MODULE) string(REPLACE "\${_IMPORT_PREFIX}/debug/bin" "\${_IMPORT_PREFIX}/tools/llvm" DEBUG_MODULE "${DEBUG_MODULE}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/llvm/LLVMExports-debug.cmake "${DEBUG_MODULE}") diff --git a/ports/lodepng/CMakeLists.txt b/ports/lodepng/CMakeLists.txt index 5da3aed3d6a79a..1cf1865c067b02 100644 --- a/ports/lodepng/CMakeLists.txt +++ b/ports/lodepng/CMakeLists.txt @@ -1,31 +1,17 @@ cmake_minimum_required(VERSION 3.8.0) project(lodepng) -if(MSVC) - add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) -endif() - -include_directories(".") - add_library(lodepng lodepng.cpp lodepng_util.cpp) +target_include_directories(lodepng PUBLIC + $ +) -# add_executable(pngdetail pngdetail.cpp) - -# target_link_libraries(pngdetail lodepng) +file(WRITE "${CMAKE_BINARY_DIR}/lodepng-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/lodepng-targets.cmake\")") +install(FILES "${CMAKE_BINARY_DIR}/lodepng-config.cmake" DESTINATION "share/lodepng/") -install( - TARGETS lodepng - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib -) +install(TARGETS lodepng EXPORT lodepng-targets) -# if(NOT DISABLE_INSTALL_TOOLS) -# install ( -# TARGETS pngdetail -# RUNTIME DESTINATION tools/lodepng -# ) -# endif() +install(EXPORT lodepng-targets DESTINATION share/lodepng/) if(NOT DDISABLE_INSTALL_EXAMPLES) install(DIRECTORY examples DESTINATION share/lodepng/) diff --git a/ports/lodepng/CONTROL b/ports/lodepng/CONTROL index 16d0cb794309e4..b9238548f926f8 100644 --- a/ports/lodepng/CONTROL +++ b/ports/lodepng/CONTROL @@ -1,4 +1,4 @@ Source: lodepng -Version: 2018-09-18-2 +Version: 2020-03-15 Homepage: https://github.com/lvandeve/lodepng Description: PNG encoder and decoder in C and C++ diff --git a/ports/lodepng/algorithm.patch b/ports/lodepng/algorithm.patch deleted file mode 100644 index 796bdfc66c049a..00000000000000 --- a/ports/lodepng/algorithm.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/lodepng_util.cpp b/lodepng_util.cpp -index 4b571bb..58ba81a 100644 ---- a/lodepng_util.cpp -+++ b/lodepng_util.cpp -@@ -26,6 +26,7 @@ freely, subject to the following restrictions: - #include "lodepng_util.h" - #include - #include "math.h" -+#include - - namespace lodepng - { diff --git a/ports/lodepng/portfile.cmake b/ports/lodepng/portfile.cmake index 83df5a5e01dcd0..680c04d718f50d 100644 --- a/ports/lodepng/portfile.cmake +++ b/ports/lodepng/portfile.cmake @@ -1,14 +1,12 @@ -include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO lvandeve/lodepng - REF ceb6b482b5a16d2bb3d6b3c735ca2b16322780d5 - SHA512 5293f6c629ff006410c9180cabac5f4de7643f04ec6c3d7ff46c1b09317ff9156d28ed4344a46db0b3a06937349590aa8958722ba0432178a347da58736cbf41 + REF e34ac04553e51a6982ae234d98ce6b76dd57a6a1 + SHA512 ab79fb2c6403e5d7bdf0b94a3f93f6513889eda8e6b74fb2b569fbc6f95fb79474654818cb0e71eff88214ca7c42ebd7c95f734a2faa77259fe06bfddcb6967a HEAD_REF master - PATCHES algorithm.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -25,7 +23,7 @@ vcpkg_configure_cmake( vcpkg_install_cmake() vcpkg_copy_pdbs() -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lodepng) +# Moves all .cmake files from /debug/share/lodepng/ to /share/lodepng/ +vcpkg_fixup_cmake_targets() - -file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/lodepng RENAME copyright) +file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/lzo/CONTROL b/ports/lzo/CONTROL index 10d403d6844fe4..4548ae9bb2a089 100644 --- a/ports/lzo/CONTROL +++ b/ports/lzo/CONTROL @@ -1,4 +1,4 @@ Source: lzo -Version: 2.10-4 +Version: 2.10-5 Homepage: https://www.oberhumer.com/opensource/lzo/ Description: Lossless data compression library diff --git a/ports/lzo/portfile.cmake b/ports/lzo/portfile.cmake index 1069403ddc5f84..7ccc62829812c0 100644 --- a/ports/lzo/portfile.cmake +++ b/ports/lzo/portfile.cmake @@ -36,7 +36,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/libexec) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) -if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(READ ${CURRENT_PACKAGES_DIR}/include/lzo/lzoconf.h LZO_CONFIG) string(REPLACE "# define __LZO_EXPORT1 /*empty*/" "# define __LZO_EXPORT1 __declspec(dllimport)" LZO_CONFIG "${LZO_CONFIG}") diff --git a/ports/magnum-plugins/003-use-outdated-basisu.patch b/ports/magnum-plugins/003-use-outdated-basisu.patch deleted file mode 100644 index 61e7c52ac18bb2..00000000000000 --- a/ports/magnum-plugins/003-use-outdated-basisu.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4d59a1eafc7a5828a0dedc92a713b3394d5f64fc Mon Sep 17 00:00:00 2001 -From: Squareys -Date: Wed, 6 Nov 2019 18:45:17 +0100 -Subject: [PATCH] fix vcpkg build - ---- - src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp b/src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp -index db3a39cb..d5c80b11 100644 ---- a/src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp -+++ b/src/MagnumPlugins/BasisImageConverter/BasisImageConverter.cpp -@@ -106,7 +106,9 @@ Containers::Array BasisImageConverter::doExportToData(const ImageView2D& i - - /* Hierarchical virtual selector codebook options */ - PARAM_CONFIG_FIX_NAME(global_sel_pal, bool, "global_selector_palette"); -- PARAM_CONFIG_FIX_NAME(auto_global_sel_pal, bool, "auto_global_selector_palette"); -+ /* vcpkg version is begind 54304fa01443280bbaa9854f16c9f1756b17b40b, which changes name -+ * to m_auto_global_sel_pal */ -+ params.m_no_auto_global_sel_pal = !configuration().value("auto_global_selector_palette"); - PARAM_CONFIG_FIX_NAME(no_hybrid_sel_cb, bool, "no_hybrid_selector_codebook"); - PARAM_CONFIG_FIX_NAME(global_pal_bits, int, "global_palette_bits"); - PARAM_CONFIG_FIX_NAME(global_mod_bits, int, "global_modifier_bits"); --- -2.17.0.windows.1 - diff --git a/ports/magnum-plugins/CONTROL b/ports/magnum-plugins/CONTROL index 285c120fb8ce1a..39d0d10167c9ba 100644 --- a/ports/magnum-plugins/CONTROL +++ b/ports/magnum-plugins/CONTROL @@ -1,5 +1,5 @@ Source: magnum-plugins -Version: 2019.10-1 +Version: 2019.10-2 Build-Depends: magnum[core] Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization Homepage: https://magnum.graphics/ diff --git a/ports/magnum-plugins/portfile.cmake b/ports/magnum-plugins/portfile.cmake index cf458cf1f87ad8..1fc50e20354194 100644 --- a/ports/magnum-plugins/portfile.cmake +++ b/ports/magnum-plugins/portfile.cmake @@ -17,7 +17,6 @@ vcpkg_from_github( PATCHES 001-tools-path.patch ${_RELEASE_ONLY_PATCHES} - 003-use-outdated-basisu.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) diff --git a/ports/magnum/002-tools-path.patch b/ports/magnum/001-tools-path.patch similarity index 100% rename from ports/magnum/002-tools-path.patch rename to ports/magnum/001-tools-path.patch diff --git a/ports/magnum/002-sdl-includes-head.patch b/ports/magnum/002-sdl-includes-head.patch new file mode 100644 index 00000000000000..fb2ffed8db2b4a --- /dev/null +++ b/ports/magnum/002-sdl-includes-head.patch @@ -0,0 +1,43 @@ +diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp +index 276c7ee55..90c52f3cb 100644 +--- a/src/Magnum/Platform/Sdl2Application.cpp ++++ b/src/Magnum/Platform/Sdl2Application.cpp +@@ -34,7 +34,7 @@ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpragma-pack" + #endif +-#include ++#include + #ifdef CORRADE_TARGET_CLANG_CL + #pragma clang diagnostic pop + #endif +diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h +index b2426d513..176729fdb 100644 +--- a/src/Magnum/Platform/Sdl2Application.h ++++ b/src/Magnum/Platform/Sdl2Application.h +@@ -57,11 +57,11 @@ + #pragma clang diagnostic ignored "-Wpragma-pack" + #endif + /* SDL.h includes the world, adding 50k LOC. We don't want that either. */ +-#include +-#include +-#include /* huh, why is this not pulled in implicitly?! */ +-#include +-#include ++#include ++#include ++#include /* huh, why is this not pulled in implicitly?! */ ++#include ++#include + + #ifdef CORRADE_TARGET_IOS + /* Including SDL_main.h unconditionally would mean it'd override Corrade::Main +@@ -74,7 +74,7 @@ + #endif + + #ifdef CORRADE_TARGET_WINDOWS_RT +-#include /* For SDL_WinRTRunApp */ ++#include /* For SDL_WinRTRunApp */ + #include /* For the WinMain entrypoint */ + #endif + #ifdef CORRADE_TARGET_CLANG_CL diff --git a/ports/magnum/001-sdl-includes.patch b/ports/magnum/002-sdl-includes.patch similarity index 100% rename from ports/magnum/001-sdl-includes.patch rename to ports/magnum/002-sdl-includes.patch diff --git a/ports/magnum/CONTROL b/ports/magnum/CONTROL index 0570cb4dcd3ece..2d7d69455157ab 100644 --- a/ports/magnum/CONTROL +++ b/ports/magnum/CONTROL @@ -1,5 +1,5 @@ Source: magnum -Version: 2019.10 +Version: 2019.10-1 Build-Depends: corrade[utility] Description: C++11/C++14 graphics middleware for games and data visualization Homepage: https://magnum.graphics/ diff --git a/ports/magnum/portfile.cmake b/ports/magnum/portfile.cmake index 11369870277ad2..7a13baccc919df 100644 --- a/ports/magnum/portfile.cmake +++ b/ports/magnum/portfile.cmake @@ -1,4 +1,15 @@ -include(vcpkg_common_functions) +# Patches that are independent of --head flag +set(_PATCHES 001-tools-path.patch) + +# Patches that are only applied to --head builds +if(VCPKG_USE_HEAD_VERSION) + list(APPEND _PATCHES 002-sdl-includes-head.patch) + +# Patches that are only applied to release builds +else() + list(APPEND _PATCHES 002-sdl-includes.patch) +endif() + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mosra/magnum @@ -6,8 +17,7 @@ vcpkg_from_github( SHA512 b1c991199fa9b09b780ea822de4b2251c70fcc95e7f28bb14a6184861d92fcd4c6e6fe43ad21acfbfd191cd46e79bf58b867240ad6f706b07cd1fbe145b8eaff HEAD_REF master PATCHES - 001-sdl-includes.patch - 002-tools-path.patch + ${_PATCHES} ) if(VCPKG_LIBRARY_LINKAGE STREQUAL static) diff --git a/ports/mongo-c-driver/CONTROL b/ports/mongo-c-driver/CONTROL index efc81c03a4f888..643b2ec5f5a2bf 100644 --- a/ports/mongo-c-driver/CONTROL +++ b/ports/mongo-c-driver/CONTROL @@ -7,3 +7,7 @@ Homepage: https://github.com/mongodb/mongo-c-driver Feature: snappy Description: Enables snappy compressor support Build-Depends: snappy + +Feature: icu +Description: Enable ICU support, necessary to use non-ASCII usernames or passwords +Build-Depends: icu \ No newline at end of file diff --git a/ports/mongo-c-driver/fix-arm-build.patch b/ports/mongo-c-driver/fix-arm-build.patch new file mode 100644 index 00000000000000..06d042b15318f1 --- /dev/null +++ b/ports/mongo-c-driver/fix-arm-build.patch @@ -0,0 +1,24 @@ +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index c8a4f02..78f69f2 100644 +--- a/src/libmongoc/CMakeLists.txt ++++ b/src/libmongoc/CMakeLists.txt +@@ -645,6 +645,9 @@ endif () + add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) + target_link_libraries (mongoc_shared ${LIBRARIES} ${BSON_LIBRARIES}) ++if (WIN32) ++ target_link_libraries (mongoc_shared Advapi32) ++endif() + target_include_directories (mongoc_shared BEFORE PUBLIC ${BSON_INCLUDE_DIRS} ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_compile_definitions (mongoc_shared PUBLIC MONGOC_COMPILATION ${BSON_DEFINITIONS}) + +@@ -654,6 +657,9 @@ set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "mongoc-${MONGOC_API + if (MONGOC_ENABLE_STATIC) + add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + target_link_libraries (mongoc_static ${LIBRARIES} ${BSON_STATIC_LIBRARIES}) ++ if (WIN32) ++ target_link_libraries (mongoc_static Advapi32) ++ endif() + target_include_directories (mongoc_static BEFORE PUBLIC ${BSON_STATIC_INCLUDE_DIRS} ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_compile_definitions (mongoc_static PUBLIC MONGOC_COMPILATION MONGOC_STATIC ${BSON_STATIC_DEFINITIONS}) + set_target_properties (mongoc_static PROPERTIES VERSION 0.0.0) diff --git a/ports/mongo-c-driver/portfile.cmake b/ports/mongo-c-driver/portfile.cmake index a138f7872a12fe..0c737a0f4659d0 100644 --- a/ports/mongo-c-driver/portfile.cmake +++ b/ports/mongo-c-driver/portfile.cmake @@ -4,10 +4,12 @@ vcpkg_from_github( REF 541086adcf1eecf88ac09fda47d9a8ec1598015d # debian/1.15.1-1 SHA512 a57438dfae9d0993ae04b7a76677f79331699898f21e7645db5edd2c91014f33b738a0af67b58234d1ee03aab2ae3b58c183bbd043fc2bde5cc1a4e111755b70 HEAD_REF master + PATCHES fix-arm-build.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "snappy" ENABLE_SNAPPY + "icu" ENABLE_ICU ) if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") diff --git a/ports/mongo-cxx-driver/CONTROL b/ports/mongo-cxx-driver/CONTROL index b4424e25ba78ee..72ca6d72ff85cc 100644 --- a/ports/mongo-cxx-driver/CONTROL +++ b/ports/mongo-cxx-driver/CONTROL @@ -1,5 +1,5 @@ Source: mongo-cxx-driver -Version: 3.4.0-3 +Version: 3.4.0-4 Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility Homepage: https://github.com/mongodb/mongo-cxx-driver Description: MongoDB C++ Driver. diff --git a/ports/mongo-cxx-driver/portfile.cmake b/ports/mongo-cxx-driver/portfile.cmake index 9f05fedc8e83ae..c50d2ef1721bd4 100644 --- a/ports/mongo-cxx-driver/portfile.cmake +++ b/ports/mongo-cxx-driver/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(VERSION_MAJOR 3) set(VERSION_MINOR 4) set(VERSION_PATCH 0) @@ -46,6 +44,8 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_copy_pdbs() + file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbsoncxx/libbsoncxx-config.cmake " set(LIBBSONCXX_VERSION_MAJOR ${VERSION_MAJOR}) @@ -106,7 +106,5 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ) -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver RENAME copyright) -file(COPY ${SOURCE_PATH}/THIRD-PARTY-NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/mongo-cxx-driver) - -vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${SOURCE_PATH}/THIRD-PARTY-NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/monkeys-audio/CONTROL b/ports/monkeys-audio/CONTROL index abe072f2565423..59ff09a739977d 100644 --- a/ports/monkeys-audio/CONTROL +++ b/ports/monkeys-audio/CONTROL @@ -1,5 +1,5 @@ Source: monkeys-audio -Version: 5.14-1 +Version: 5.24 Homepage: https://monkeysaudio.com Description: Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods. Audio files compressed with it ends with .ape extension. diff --git a/ports/monkeys-audio/portfile.cmake b/ports/monkeys-audio/portfile.cmake index d82c78f160bb18..984fce5991b907 100644 --- a/ports/monkeys-audio/portfile.cmake +++ b/ports/monkeys-audio/portfile.cmake @@ -2,12 +2,12 @@ vcpkg_fail_port_install(ON_TARGET "UWP" "OSX" "Linux") vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) -set(MA_VERSION 514) +set(MA_VERSION 524) vcpkg_download_distfile(ARCHIVE URLS "https://monkeysaudio.com/files/MAC_SDK_${MA_VERSION}.zip" FILENAME "MAC_SDK_${MA_VERSION}.zip" - SHA512 b0bad044bb639ddf5db6b1234ea07f878f2ed1192f7704c22ed1bc482f3ac7a1abbd318d81114d416ee1d93dccf41ef31d617d6c2b82e819fc2848e01ba4bcd4 + SHA512 799035463f16dc94439e14c6b4a3755fbcf67e924d1c4925e26bb8172ff77122cf3e347f84d7e470dbddde79430f590dbeb1f69d6419cd36633cc8c616ea04f8 ) vcpkg_extract_source_archive_ex( @@ -66,4 +66,4 @@ file(COPY ${SOURCE_PATH}/Shared/ FILES_MATCHING PATTERN "*.h") file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h) -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/morton-nd/CONTROL b/ports/morton-nd/CONTROL index 40065dbee4e7d1..e6866779ecc869 100644 --- a/ports/morton-nd/CONTROL +++ b/ports/morton-nd/CONTROL @@ -1,3 +1,4 @@ Source: morton-nd -Version: 2.0.0 -Description: (C++14) header-only library for fast Morton encoding/decoding in N dimensions. +Version: 3.0.0 +Homepage: https://github.com/kevinhartman/morton-nd +Description: header-only constexpr library for fast Morton encoding/decoding in N dimensions. diff --git a/ports/morton-nd/portfile.cmake b/ports/morton-nd/portfile.cmake index 63c8ee95fc3abe..46aa5bef5ecdbe 100644 --- a/ports/morton-nd/portfile.cmake +++ b/ports/morton-nd/portfile.cmake @@ -1,16 +1,30 @@ #header-only library -include(vcpkg_common_functions) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO kevinhartman/morton-nd - REF v2.0.0 - SHA512 f349187a9c6094ebdc8dc10a0b028e119a82721946e2f629b3f64edade9665a97824d6a52496e470da61e5b65ae46c953346b271c2db11f5f2e3c7748de03daf + REF v3.0.0 + SHA512 659c903c0c4a4ee4179d01950a952fe0c40d2c426063c10515ae5d2ad13ec8ca6b83d8de50c9eb86dd3c2c3747e1594d832f0c28cd6d414703baf9a7ab2f1f36 HEAD_REF master ) -file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/morton-nd) -file(COPY ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/morton-nd) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/morton-nd/LICENSE ${CURRENT_PACKAGES_DIR}/share/morton-nd/copyright) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/morton-nd/cmake TARGET_PATH) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/share/doc +) -file(GLOB HEADER_FILES ${SOURCE_PATH}/morton-nd/include/*.h) -file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/morton-nd) +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(COPY ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/realsense2/CONTROL b/ports/realsense2/CONTROL index 4a03ac4b3d4001..ee405e8a0ddfde 100644 --- a/ports/realsense2/CONTROL +++ b/ports/realsense2/CONTROL @@ -1,5 +1,5 @@ Source: realsense2 -Version: 2.30.0-1 +Version: 2.33.1 Homepage: https://github.com/IntelRealSense/librealsense Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). diff --git a/ports/realsense2/portfile.cmake b/ports/realsense2/portfile.cmake index c2c8850ba6d0e9..d1b1022037eb72 100644 --- a/ports/realsense2/portfile.cmake +++ b/ports/realsense2/portfile.cmake @@ -1,14 +1,15 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO IntelRealSense/librealsense - REF 9f99fa9a509555f85bffc15ce27531aaa6db6f7e#v2.30.0 - SHA512 72d9e0b48a6cd0b056b6d039487431d0097e5151930a2dbb072d09a13fccee1f166ca339fe7f0ab4aae1edc5669de5e8336f0b6d87d1c4ea01ec0c5d4032c728 + REF 842ee1e1e5c4bb96d63582a7fde061dbc1bebf69#v2.33.1 + SHA512 70f6f9c2f1c5925532b2ff22779579b3610a7f616d66ac92e8e85c6f30df334bf8fb125355a0706bacef0be8370acc62bb7623f3f200326e71fe53e07726fa6a HEAD_REF master PATCHES fix_openni2.patch fix-dependency-glfw3.patch ) +file(COPY ${SOURCE_PATH}/src/win7/drivers/IntelRealSense_D400_series_win7.inf DESTINATION ${SOURCE_PATH}) string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE) set(BUILD_TOOLS OFF) @@ -46,7 +47,6 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/realsense2) vcpkg_copy_pdbs() - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) @@ -74,7 +74,6 @@ if(BUILD_TOOLS) file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/realsense2-gl.pdb) endif() - if(BUILD_OPENNI2_BINDINGS) file(GLOB RS2DRIVER ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/_out/rs2driver*) if(RS2DRIVER) diff --git a/ports/replxx/CONTROL b/ports/replxx/CONTROL new file mode 100644 index 00000000000000..ec643802c701ac --- /dev/null +++ b/ports/replxx/CONTROL @@ -0,0 +1,6 @@ +Source: replxx +Version: 0.0.2 +Homepage: https://github.com/AmokHuginnsson/replxx +Description: A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters. +Supports: !uwp + diff --git a/ports/replxx/portfile.cmake b/ports/replxx/portfile.cmake new file mode 100644 index 00000000000000..0443f37d34f862 --- /dev/null +++ b/ports/replxx/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AmokHuginnsson/replxx + REF 45696c250ce39ab21dedeea962b94d7827007a8c + SHA512 7beec508fa3049fe5a736a487728506d646d26d7194ef7453fc07bceade1982430808fab0a10ca9b1c43a8b87bf3a973f5cfe4aa22ed06927647c9a7244167fd + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/replxxConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ports/replxx/replxxConfig.cmake b/ports/replxx/replxxConfig.cmake new file mode 100644 index 00000000000000..680ffc3eea630b --- /dev/null +++ b/ports/replxx/replxxConfig.cmake @@ -0,0 +1,20 @@ +function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + set(${NAMESPACE}_${LIB_NAME}_FOUND 1) +endfunction() + +get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) + +if (CMAKE_HOST_WIN32) + set_library_target("REPLXX" "replxx" "${ROOT}/debug/lib/replxx-d.lib" "${ROOT}/lib/replxx.lib" "${ROOT}/include/") +else () + set_library_target("REPLXX" "replxx" "${ROOT}/debug/lib/libreplxx-d.a" "${ROOT}/lib/libreplxx.a" "${ROOT}/include/") +endif () diff --git a/ports/replxx/usage b/ports/replxx/usage new file mode 100644 index 00000000000000..5be648855a9ed1 --- /dev/null +++ b/ports/replxx/usage @@ -0,0 +1,4 @@ +The package replxx is compatible with built-in CMake targets: + + FIND_PACKAGE(replxx REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE REPLXX::replxx) diff --git a/ports/ryu/CONTROL b/ports/ryu/CONTROL index 62e6e9f82e72f3..c78ca9b389f361 100644 --- a/ports/ryu/CONTROL +++ b/ports/ryu/CONTROL @@ -1,4 +1,5 @@ Source: ryu -Version: 2.0 +Version: 2.0-1 Homepage: https://github.com/ulfjack/ryu Description: Ryu generates the shortest decimal representation of a floating point number that maintains round-trip safety. +Supports: !(uwp|arm|x86) diff --git a/ports/ryu/portfile.cmake b/ports/ryu/portfile.cmake index 17d1357da6ea4c..40bb6794142d36 100644 --- a/ports/ryu/portfile.cmake +++ b/ports/ryu/portfile.cmake @@ -1,4 +1,4 @@ -vcpkg_fail_port_install(ON_TARGET "UWP") +vcpkg_fail_port_install(ON_ARCH "x86" "arm" ON_TARGET "uwp") vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -19,7 +19,7 @@ if (CMAKE_HOST_WIN32) endif () vcpkg_execute_build_process( - COMMAND ${BAZEL} build --verbose_failures //ryu + COMMAND ${BAZEL} build --verbose_failures --strategy=CppCompile=standalone //ryu WORKING_DIRECTORY ${SOURCE_PATH} LOGNAME build-${TARGET_TRIPLET}-rel ) diff --git a/ports/selene/CONTROL b/ports/selene/CONTROL index 0dcfbc29052a56..03eeb9185cf53f 100644 --- a/ports/selene/CONTROL +++ b/ports/selene/CONTROL @@ -1,5 +1,5 @@ Source: selene -Version: 0.3.1-1 +Version: 0.3.1-2 Homepage: https://github.com/kmhofmann/selene Description: A C++17 image representation, processing and I/O library. Build-Depends: zlib, libpng, libjpeg-turbo, tiff diff --git a/ports/selene/portfile.cmake b/ports/selene/portfile.cmake index 11a2e89eb7cb7b..e6a94288522abf 100644 --- a/ports/selene/portfile.cmake +++ b/ports/selene/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -25,4 +23,4 @@ vcpkg_copy_pdbs() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/selene RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/skia/CONTROL b/ports/skia/CONTROL index ed2abe47297d70..f7ccc5ac4222b4 100644 --- a/ports/skia/CONTROL +++ b/ports/skia/CONTROL @@ -1,5 +1,5 @@ Source: skia -Version: 2020-02-15 +Version: 2020-02-15-1 Homepage: https://skia.org Description: Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms. It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products. diff --git a/ports/skia/portfile.cmake b/ports/skia/portfile.cmake index 66b140d089e7a2..c7a5eb26357307 100644 --- a/ports/skia/portfile.cmake +++ b/ports/skia/portfile.cmake @@ -51,22 +51,6 @@ endif() set(OPTIONS_REL "${OPTIONS} is_official_build=true") set(OPTIONS_DBG "${OPTIONS} is_debug=true") -function(find_msvc_path PATH) - vcpkg_get_program_files_32_bit(PROGRAM_FILES) - file(TO_CMAKE_PATH "${PROGRAM_FILES}" PROGRAM_FILES) - set(VSWHERE "${PROGRAM_FILES}/Microsoft Visual Studio/Installer/vswhere.exe") - execute_process( - COMMAND "${VSWHERE}" -prerelease -legacy -products * -sort -utf8 -property installationPath - WORKING_DIRECTORY "${SOURCE_PATH}" - OUTPUT_VARIABLE OUTPUT_ - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - string(REGEX REPLACE "\n|(\r\n)" ";" OUTPUT_ "${OUTPUT_}") - list(GET OUTPUT_ 0 OUTPUT_) - - set(${PATH} "${OUTPUT_}" PARENT_SCOPE) -endfunction() - if(CMAKE_HOST_WIN32) # Load toolchains if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) @@ -95,8 +79,8 @@ if(CMAKE_HOST_WIN32) set(OPTIONS_REL "${OPTIONS_REL} extra_cflags_c=${SKIA_C_FLAGS_REL} \ extra_cflags_cc=${SKIA_CXX_FLAGS_REL}") - find_msvc_path(WIN_VC) - set(WIN_VC "${WIN_VC}\\VC") + set(WIN_VC "$ENV{VCINSTALLDIR}") + string(REPLACE "\\VC\\" "\\VC" WIN_VC "${WIN_VC}") set(OPTIONS_DBG "${OPTIONS_DBG} win_vc=\"${WIN_VC}\"") set(OPTIONS_REL "${OPTIONS_REL} win_vc=\"${WIN_VC}\"") diff --git a/ports/spirv-cross/CONTROL b/ports/spirv-cross/CONTROL index ec4531b12c062f..e7c397b5f882ad 100644 --- a/ports/spirv-cross/CONTROL +++ b/ports/spirv-cross/CONTROL @@ -1,3 +1,4 @@ Source: spirv-cross -Version: 2019-07-26 +Version: 2020-02-26 +Homepage: https://github.com/KhronosGroup/SPIRV-Cross Description: SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages. diff --git a/ports/spirv-cross/portfile.cmake b/ports/spirv-cross/portfile.cmake index fdee412332c4ca..eb0652a2aa9a93 100644 --- a/ports/spirv-cross/portfile.cmake +++ b/ports/spirv-cross/portfile.cmake @@ -1,12 +1,11 @@ -include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO KhronosGroup/SPIRV-Cross - REF 2019-07-26 - SHA512 25bc0e5e7f313d01f70a4f106b9b42bc1975473e3f2fdcd7a48bf83b7865386366ebd5994efd2ae5f8d95c9abcbdefb46725b52ddb8dfb15169d621ff258a8ba + REF 2020-02-26 + SHA512 96e4c7d8bf8603d061d1a7afac34db044842dede65f2d9328da1d99a3c8aed9f6fd64fd611e8d1618bd937b682b377d87304a4fcc9068bcffed3d275cb4dfe2c HEAD_REF master ) diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 78dab2e3d391e1..c5f8b0574a4271 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -119,4 +119,4 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}") file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) # Handle copyright -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/ports/tinyexr/CONTROL b/ports/tinyexr/CONTROL index 076322a0fbd39e..bd3f25fb65f80d 100644 --- a/ports/tinyexr/CONTROL +++ b/ports/tinyexr/CONTROL @@ -1,4 +1,4 @@ Source: tinyexr -Version: 0.9.5-d16ea6-1 +Version: 2020-03-15 Homepage: https://github.com/syoyo/tinyexr Description: Library to load and save OpenEXR(.exr) images diff --git a/ports/tinyexr/portfile.cmake b/ports/tinyexr/portfile.cmake index bc3effdc36274c..e8cfaf156cdc78 100644 --- a/ports/tinyexr/portfile.cmake +++ b/ports/tinyexr/portfile.cmake @@ -1,15 +1,12 @@ -# header-only -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO syoyo/tinyexr - REF d16ea6347ae78bcee984fb57cab1f023aeda4fb0 - SHA512 63399688d7894f9ac4b893b2142202b36108b5029b11c40c3f9ad0f0135625fb0c8e0d54cec88d92c016774648dc829a946d9575c5f19afea56542c00759546e + REF fdaeecbbc1bac1a417c6af2f4dab43d3840ed036 + SHA512 0d875e197bc82dd5addb8e08e9ba1a9a02e108cc9dd14e5ea17de032cda5ad599f6d10d6c7959d545e05ab30d6daa34f98061f23faeb1c15caf96b6cb76483a3 HEAD_REF master ) file(COPY ${SOURCE_PATH}/tinyexr.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) -# Handle copyright file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyexr) diff --git a/ports/vtk/CONTROL b/ports/vtk/CONTROL index e8693b06e764d9..bf0f64ad71de85 100644 --- a/ports/vtk/CONTROL +++ b/ports/vtk/CONTROL @@ -1,5 +1,5 @@ Source: vtk -Version: 8.2.0-11 +Version: 8.2.0-12 Description: Software system for 3D computer graphics, image processing, and visualization Homepage: https://github.com/Kitware/VTK Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, eigen3, double-conversion, pugixml, libharu, sqlite3, netcdf-c diff --git a/ports/vtk/fix-pugixml-link.patch b/ports/vtk/fix-pugixml-link.patch index 9a5edb5f5be2fe..aadd41adb89944 100644 --- a/ports/vtk/fix-pugixml-link.patch +++ b/ports/vtk/fix-pugixml-link.patch @@ -1,14 +1,28 @@ -diff --git a/IO/CityGML/CMakeLists.txt b/IO/CityGML/CMakeLists.txt -index ce979ba..322e2de 100644 ---- a/IO/CityGML/CMakeLists.txt -+++ b/IO/CityGML/CMakeLists.txt -@@ -4,8 +4,5 @@ vtk_module_library(vtkIOCityGML ${Module_SRCS}) - # pugixml does not set _INCLUDE_DIRS or _LIBRARIES - if(VTK_USE_SYSTEM_PUGIXML AND NOT pugixml_INCLUDE_DIRS) - find_package(pugixml REQUIRED) -- get_target_property(pugixml_INCLUDE_DIRS pugixml INTERFACE_INCLUDE_DIRECTORIES) -- get_target_property(pugixml_LIBRARIES pugixml LOCATION) -- include_directories(${pugixml_INCLUDE_DIRS}) -- vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE ${pugixml_LIBRARIES}) -+ vtk_module_link_libraries(vtkIOCityGML LINK_PUBLIC pugixml) - endif() +diff --git a/CMake/VTKConfig.cmake.in b/CMake/VTKConfig.cmake.in +index d28e0cc..7ed48bc 100644 +--- a/CMake/VTKConfig.cmake.in ++++ b/CMake/VTKConfig.cmake.in +@@ -88,6 +88,9 @@ if(VTK_HAS_VTKM AND NOT TARGET vtkm_cont) + ) + endif() + ++# Find dependencies ++include(CMakeFindDependencyMacro) ++find_dependency(pugixml REQUIRED) + + #----------------------------------------------------------------------------- + # Load requested modules. +diff --git a/IO/CityGML/CMakeLists.txt b/IO/CityGML/CMakeLists.txt +index ce979ba..744c6f1 100644 +--- a/IO/CityGML/CMakeLists.txt ++++ b/IO/CityGML/CMakeLists.txt +@@ -4,8 +4,5 @@ vtk_module_library(vtkIOCityGML ${Module_SRCS}) + # pugixml does not set _INCLUDE_DIRS or _LIBRARIES + if(VTK_USE_SYSTEM_PUGIXML AND NOT pugixml_INCLUDE_DIRS) + find_package(pugixml REQUIRED) +- get_target_property(pugixml_INCLUDE_DIRS pugixml INTERFACE_INCLUDE_DIRECTORIES) +- get_target_property(pugixml_LIBRARIES pugixml LOCATION) +- include_directories(${pugixml_INCLUDE_DIRS}) +- vtk_module_link_libraries(vtkIOCityGML LINK_PRIVATE ${pugixml_LIBRARIES}) ++ vtk_module_link_libraries(vtkIOCityGML LINK_PUBLIC pugixml) + endif() diff --git a/ports/vtk/portfile.cmake b/ports/vtk/portfile.cmake index 4743c65205be1a..183b4e96bbc10a 100644 --- a/ports/vtk/portfile.cmake +++ b/ports/vtk/portfile.cmake @@ -250,8 +250,8 @@ endif() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/vtk) + # ============================================================================= # Handle copyright file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/vtk) diff --git a/ports/wt/CONTROL b/ports/wt/CONTROL index 53bb0a3e3348af..6a8b959a67f9c3 100644 --- a/ports/wt/CONTROL +++ b/ports/wt/CONTROL @@ -1,5 +1,5 @@ Source: wt -Version: 4.2.1 +Version: 4.2.2 Homepage: https://github.com/emweb/wt Description: Wt is a C++ library for developing web applications Build-Depends: openssl, sqlite3, libpq, pango, glew, boost-date-time, boost-regex, boost-program-options, boost-signals, boost-system, boost-filesystem, boost-thread, boost-random, boost-multi-index, boost-signals2, boost-asio, boost-ublas, boost-conversion, boost-array, boost-smart-ptr, boost-tuple, boost-algorithm, boost-logic, boost-interprocess diff --git a/ports/wt/portfile.cmake b/ports/wt/portfile.cmake index c0a4af3368c282..4e8eed349a0786 100644 --- a/ports/wt/portfile.cmake +++ b/ports/wt/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO emweb/wt - REF 5fdfa9b373d7faf5c6e91725bfb9393e2ab6f081 # 4.2.1 - SHA512 29354e8070252778a9fb888111cbce4a810ad9993fc68996475d9ddc2131ae3ce1dcf35e393ef825db1c889f7e92e353195df6e699f761ff55cc5c19990b16a4 + REF 3ade528163850b3fd90fac2a31f5e0699342a1a5 # 4.2.2 + SHA512 44c629ca2f3cb129b02d6713814a15620d62070e9937c33e7b5f637a08c59875c721d6ac36963a84c99dab4124c3db4f52d78870f8adaab48d863c60b7dcbf05 HEAD_REF master PATCHES 0002-link-glew.patch diff --git a/scripts/boost/generate-ports.ps1 b/scripts/boost/generate-ports.ps1 index b1cf083770e9a0..e154bd38d97da5 100644 --- a/scripts/boost/generate-ports.ps1 +++ b/scripts/boost/generate-ports.ps1 @@ -50,7 +50,7 @@ function Generate() $controlDeps = ($Depends | sort) -join ", " $versionSuffix = "" - if ($PortName -eq "iostreams" -or $PortName -eq "python") + if ($PortName -eq "iostreams" -or $PortName -eq "process" -or $PortName -eq "python") { $versionSuffix = "-1" } @@ -115,6 +115,10 @@ function Generate() { $portfileLines += @(" PATCHES Removeseekpos.patch") } + if ($PortName -eq "process") + { + $portfileLines += @(" PATCHES async_pipe_header.patch") + } $portfileLines += @( ")" "" diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 3b41eb0651148e..1eebc3b8db5e83 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -26,21 +26,19 @@ if(VCPKG_TOOLCHAIN) return() endif() -if(DEFINED CMAKE_CONFIGURATION_TYPES) #Generating with a multi config generator - #If CMake does not have a mapping for MinSizeRel and RelWithDebInfo in imported targets - #it will map those configuration to the first valid configuration in CMAKE_CONFIGURATION_TYPES. - #By default this is the debug configuration which is wrong. - if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL) - set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL "MinSizeRel;Release;") - if(VCPKG_VERBOSE) - message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL set to MinSizeRel;Release;") - endif() +#If CMake does not have a mapping for MinSizeRel and RelWithDebInfo in imported targets +#it will map those configuration to the first valid configuration in CMAKE_CONFIGURATION_TYPES or the targets IMPORTED_CONFIGURATIONS. +#In most cases this is the debug configuration which is wrong. +if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL) + set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL "MinSizeRel;Release;") + if(VCPKG_VERBOSE) + message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL set to MinSizeRel;Release;") endif() - if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO) - set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO "RelWithDebInfo;Release;") - if(VCPKG_VERBOSE) - message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO set to RelWithDebInfo;Release;") - endif() +endif() +if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO) + set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO "RelWithDebInfo;Release;") + if(VCPKG_VERBOSE) + message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO set to RelWithDebInfo;Release;") endif() endif() diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index a876a6d0826feb..3fa5958d70b1a4 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1001,12 +1001,14 @@ llvm:arm64-windows=fail llvm:arm-uwp=fail llvm:x64-uwp=fail llvm:x64-linux=ignore +# disable them temporarily and wait for fix +llvm:x64-windows=fail +llvm:x64-windows-static=fail # installing iconv makes building llvm fail; needs to be fixed llvm:x64-osx=ignore lmdb:arm64-windows=fail lmdb:arm-uwp=fail lmdb:x64-uwp=fail -lodepng:x64-osx=fail log4cplus:arm-uwp=fail log4cplus:x64-uwp=fail log4cpp:arm-uwp=fail @@ -1099,7 +1101,6 @@ mmx:x64-osx=skip mmx:arm-uwp=skip mmx:x64-uwp=skip mmx:arm64-windows=skip -mongo-c-driver:arm64-windows=fail # Flaky strange linker error mongo-c-driver:x64-osx=skip mongoose:arm-uwp=fail @@ -1339,6 +1340,7 @@ osgearth:x64-osx=fail osgearth:x64-linux=fail osgearth:x64-windows-static=fail osg-qt:x64-windows-static=fail +osg-qt:x64-linux=ignore otl:x64-windows=ignore otl:x64-windows-static=ignore otl:x64-uwp=ignore @@ -1532,6 +1534,10 @@ redis-plus-plus:x86-windows=fail redis-plus-plus:x64-windows=fail redis-plus-plus:x64-windows-static=fail redis-plus-plus:arm64-windows=fail +replxx:arm-uwp=fail +replxx:x64-uwp=fail +replxx:arm64-windows=fail +replxx:x86-windows=fail reproc:arm-uwp=fail reproc:x64-uwp=fail restbed:arm-uwp=fail diff --git a/scripts/cmake/vcpkg_from_git.cmake b/scripts/cmake/vcpkg_from_git.cmake index bad5384ca4a076..f114f6fc6f23c7 100644 --- a/scripts/cmake/vcpkg_from_git.cmake +++ b/scripts/cmake/vcpkg_from_git.cmake @@ -19,7 +19,7 @@ ## This should be set to `SOURCE_PATH` by convention. ## ## ### URL -## The url of the git repository. Must start with `https`. +## The url of the git repository. ## ## ### REF ## The git sha of the commit to download. @@ -49,13 +49,6 @@ function(vcpkg_from_git) message(FATAL_ERROR "The git url must be specified") endif() - if( NOT _vdud_URL MATCHES "^https:") - # vcpkg_from_git does not support a SHA256 parameter because hashing the git archive is - # not stable across all supported platforms. The tradeoff is to require https to download - # and the ref to be the git sha (i.e. not things that can change like a label) - message(FATAL_ERROR "The git url must be https") - endif() - if(NOT DEFINED _vdud_REF) message(FATAL_ERROR "The git ref must be specified.") endif() diff --git a/scripts/vcpkg_get_tags.cmake b/scripts/vcpkg_get_tags.cmake index ccdc4fea625fe6..35e89149ba6cf0 100644 --- a/scripts/vcpkg_get_tags.cmake +++ b/scripts/vcpkg_get_tags.cmake @@ -23,6 +23,7 @@ e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f") message("c35112b6-d1ba-415b-aa5d-81de856ef8eb VCPKG_PUBLIC_ABI_OVERRIDE=${VCPKG_PUBLIC_ABI_OVERRIDE} VCPKG_ENV_PASSTHROUGH=${VCPKG_ENV_PASSTHROUGH} +VCPKG_LOAD_VCVARS_ENV=${VCPKG_LOAD_VCVARS_ENV} e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f 8c504940-be29-4cba-9f8f-6cd83e9d87b7") endfunction() diff --git a/toolsrc/include/vcpkg/base/files.h b/toolsrc/include/vcpkg/base/files.h index bb4a10d499ebc4..3b92feabebeba9 100644 --- a/toolsrc/include/vcpkg/base/files.h +++ b/toolsrc/include/vcpkg/base/files.h @@ -1,6 +1,7 @@ #pragma once #include +#include #if USE_STD_FILESYSTEM #include @@ -126,20 +127,22 @@ namespace vcpkg::Files StringLiteral temp_suffix, std::error_code& ec) = 0; bool remove(const fs::path& path, LineInfo linfo); + bool remove(const fs::path& path, ignore_errors_t); virtual bool remove(const fs::path& path, std::error_code& ec) = 0; virtual void remove_all(const fs::path& path, std::error_code& ec, fs::path& failure_point) = 0; void remove_all(const fs::path& path, LineInfo li); + void remove_all(const fs::path& path, ignore_errors_t); bool exists(const fs::path& path, std::error_code& ec) const; bool exists(LineInfo li, const fs::path& path) const; - // this should probably not exist, but would require a pass through of - // existing code to fix - bool exists(const fs::path& path) const; + bool exists(const fs::path& path, ignore_errors_t = ignore_errors) const; virtual bool is_directory(const fs::path& path) const = 0; virtual bool is_regular_file(const fs::path& path) const = 0; virtual bool is_empty(const fs::path& path) const = 0; virtual bool create_directory(const fs::path& path, std::error_code& ec) = 0; + bool create_directory(const fs::path& path, ignore_errors_t); virtual bool create_directories(const fs::path& path, std::error_code& ec) = 0; + bool create_directories(const fs::path& path, ignore_errors_t); virtual void copy(const fs::path& oldpath, const fs::path& newpath, fs::copy_options opts) = 0; virtual bool copy_file(const fs::path& oldpath, const fs::path& newpath, @@ -149,9 +152,12 @@ namespace vcpkg::Files virtual fs::file_status status(const fs::path& path, std::error_code& ec) const = 0; virtual fs::file_status symlink_status(const fs::path& path, std::error_code& ec) const = 0; fs::file_status status(LineInfo li, const fs::path& p) const noexcept; + fs::file_status status(const fs::path& p, ignore_errors_t) const noexcept; fs::file_status symlink_status(LineInfo li, const fs::path& p) const noexcept; + fs::file_status symlink_status(const fs::path& p, ignore_errors_t) const noexcept; virtual fs::path canonical(const fs::path& path, std::error_code& ec) const = 0; fs::path canonical(LineInfo li, const fs::path& path) const; + fs::path canonical(const fs::path& path, ignore_errors_t) const; virtual std::vector find_from_PATH(const std::string& name) const = 0; }; diff --git a/toolsrc/include/vcpkg/base/ignore_errors.h b/toolsrc/include/vcpkg/base/ignore_errors.h new file mode 100644 index 00000000000000..44077059abe508 --- /dev/null +++ b/toolsrc/include/vcpkg/base/ignore_errors.h @@ -0,0 +1,10 @@ +#pragma once + +namespace vcpkg +{ + struct ignore_errors_t + { + }; + + constexpr ignore_errors_t ignore_errors; +} diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h index d36b641430c6ad..892fb2370736ef 100644 --- a/toolsrc/include/vcpkg/build.h +++ b/toolsrc/include/vcpkg/build.h @@ -153,6 +153,7 @@ namespace vcpkg::Build Triplet triplet, const std::unordered_map& cmakevars); + bool load_vcvars_env; std::string triplet_abi_tag; std::string target_architecture; std::string cmake_system_name; @@ -179,6 +180,7 @@ namespace vcpkg::Build BUILD_TYPE, ENV_PASSTHROUGH, PUBLIC_ABI_OVERRIDE, + LOAD_VCVARS_ENV, }; const std::unordered_map VCPKG_OPTIONS = { @@ -191,6 +193,7 @@ namespace vcpkg::Build {"VCPKG_BUILD_TYPE", VcpkgTripletVar::BUILD_TYPE}, {"VCPKG_ENV_PASSTHROUGH", VcpkgTripletVar::ENV_PASSTHROUGH}, {"VCPKG_PUBLIC_ABI_OVERRIDE", VcpkgTripletVar::PUBLIC_ABI_OVERRIDE}, + {"VCPKG_LOAD_VCVARS_ENV", VcpkgTripletVar::LOAD_VCVARS_ENV}, }; struct ExtendedBuildResult diff --git a/toolsrc/include/vcpkg/help.h b/toolsrc/include/vcpkg/help.h index 73549efd755101..87ce60b7605e26 100644 --- a/toolsrc/include/vcpkg/help.h +++ b/toolsrc/include/vcpkg/help.h @@ -16,4 +16,16 @@ namespace vcpkg::Help void print_usage(); std::string create_example_string(const std::string& command_and_arguments); + + struct HelpTableFormatter + { + void format(StringView col1, StringView col2); + + std::string m_str; + + private: + void newline_indent(); + void indent(); + }; + } diff --git a/toolsrc/src/vcpkg/base/files.cpp b/toolsrc/src/vcpkg/base/files.cpp index cd8fba129676d8..0bd1cb893d2803 100644 --- a/toolsrc/src/vcpkg/base/files.cpp +++ b/toolsrc/src/vcpkg/base/files.cpp @@ -173,6 +173,12 @@ namespace vcpkg::Files return r; } + bool Filesystem::remove(const fs::path& path, ignore_errors_t) + { + std::error_code ec; + return this->remove(path, ec); + } + bool Filesystem::exists(const fs::path& path, std::error_code& ec) const { return fs::exists(this->symlink_status(path, ec)); @@ -185,12 +191,23 @@ namespace vcpkg::Files if (ec) Checks::exit_with_message(li, "error checking existence of file %s: %s", path.u8string(), ec.message()); return result; } - - bool Filesystem::exists(const fs::path& path) const + + bool Filesystem::exists(const fs::path& path, ignore_errors_t) const + { + std::error_code ec; + return this->exists(path, ec); + } + + bool Filesystem::create_directory(const fs::path& path, ignore_errors_t) + { + std::error_code ec; + return this->create_directory(path, ec); + } + + bool Filesystem::create_directories(const fs::path& path, ignore_errors_t) { std::error_code ec; - // drop this on the floor, for compatibility with existing code - return exists(path, ec); + return this->create_directories(path, ec); } fs::file_status Filesystem::status(vcpkg::LineInfo li, const fs::path& p) const noexcept @@ -202,6 +219,12 @@ namespace vcpkg::Files return result; } + fs::file_status Filesystem::status(const fs::path& p, ignore_errors_t) const noexcept + { + std::error_code ec; + return this->status(p, ec); + } + fs::file_status Filesystem::symlink_status(vcpkg::LineInfo li, const fs::path& p) const noexcept { std::error_code ec; @@ -211,6 +234,12 @@ namespace vcpkg::Files return result; } + fs::file_status Filesystem::symlink_status(const fs::path& p, ignore_errors_t) const noexcept + { + std::error_code ec; + return this->symlink_status(p, ec); + } + void Filesystem::write_lines(const fs::path& path, const std::vector& lines, LineInfo linfo) { std::error_code ec; @@ -235,6 +264,14 @@ namespace vcpkg::Files } } + void Filesystem::remove_all(const fs::path& path, ignore_errors_t) + { + std::error_code ec; + fs::path failure_point; + + this->remove_all(path, ec, failure_point); + } + fs::path Filesystem::canonical(LineInfo li, const fs::path& path) const { std::error_code ec; @@ -244,6 +281,11 @@ namespace vcpkg::Files if (ec) Checks::exit_with_message(li, "Error getting canonicalization of %s: %s", path.string(), ec.message()); return result; } + fs::path Filesystem::canonical(const fs::path& path, ignore_errors_t) const + { + std::error_code ec; + return this->canonical(path, ec); + } struct RealFilesystem final : Filesystem { @@ -432,7 +474,8 @@ namespace vcpkg::Files break; } auto remaining = read_bytes; - while (remaining > 0) { + while (remaining > 0) + { auto read_result = write(o_fd, buffer.get(), remaining); if (read_result == -1) { @@ -444,7 +487,7 @@ namespace vcpkg::Files } } - copy_failure: ; + copy_failure:; } #endif if (written_bytes == -1) diff --git a/toolsrc/src/vcpkg/base/system.process.cpp b/toolsrc/src/vcpkg/base/system.process.cpp index bba29a2d73825d..5f34ace2a7f526 100644 --- a/toolsrc/src/vcpkg/base/system.process.cpp +++ b/toolsrc/src/vcpkg/base/system.process.cpp @@ -241,6 +241,12 @@ namespace vcpkg // Enables proxy information to be passed to Curl, the underlying download library in cmake.exe L"http_proxy", L"https_proxy", + // Environment variables to tell git to use custom SSH executable or command + L"GIT_SSH", + L"GIT_SSH_COMMAND", + // Environment variables needed for ssh-agent based authentication + L"SSH_AUTH_SOCK", + L"SSH_AGENT_PID", // Enables find_package(CUDA) and enable_language(CUDA) in CMake L"CUDA_PATH", L"CUDA_PATH_V9_0", diff --git a/toolsrc/src/vcpkg/binarycaching.cpp b/toolsrc/src/vcpkg/binarycaching.cpp index af4a879ca6a2d1..0750366fffee9a 100644 --- a/toolsrc/src/vcpkg/binarycaching.cpp +++ b/toolsrc/src/vcpkg/binarycaching.cpp @@ -123,7 +123,6 @@ namespace const auto& abi_tag = action.package_abi.value_or_exit(VCPKG_LINE_INFO); auto& spec = action.spec; auto& fs = paths.get_filesystem(); - std::error_code ec; const fs::path archives_root_dir = paths.root / "archives"; const std::string archive_name = abi_tag + ".zip"; const fs::path archive_subpath = fs::u8path(abi_tag.substr(0, 2)) / archive_name; @@ -133,7 +132,8 @@ namespace compress_directory(paths, paths.package_dir(spec), tmp_archive_path); - fs.create_directories(archive_path.parent_path(), ec); + fs.create_directories(archive_path.parent_path(), ignore_errors); + std::error_code ec; fs.rename_or_copy(tmp_archive_path, archive_path, ".tmp", ec); if (ec) { @@ -163,7 +163,7 @@ namespace const auto tmp_log_path = paths.buildtrees / spec.name() / "tmp_failure_logs"; const auto tmp_log_path_destination = tmp_log_path / spec.name(); const auto tmp_failure_zip = paths.buildtrees / spec.name() / "failure_logs.zip"; - fs.create_directories(tmp_log_path_destination, ec); + fs.create_directories(tmp_log_path_destination, ignore_errors); for (auto& log_file : fs::stdfs::directory_iterator(paths.buildtrees / spec.name())) { @@ -178,7 +178,7 @@ namespace compress_directory(paths, tmp_log_path, paths.buildtrees / spec.name() / "failure_logs.zip"); - fs.create_directories(archive_tombstone_path.parent_path(), ec); + fs.create_directories(archive_tombstone_path.parent_path(), ignore_errors); fs.rename_or_copy(tmp_failure_zip, archive_tombstone_path, ".tmp", ec); // clean up temporary directory diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp index 81997e79c99ffc..c1e91adf95e12e 100644 --- a/toolsrc/src/vcpkg/build.cpp +++ b/toolsrc/src/vcpkg/build.cpp @@ -274,7 +274,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.external_toolchain_file.has_value() && !pre_build_info.load_vcvars_env) return ""; if (!pre_build_info.cmake_system_name.empty() && pre_build_info.cmake_system_name != "WindowsStore") return ""; const char* tonull = " >nul"; @@ -1052,6 +1052,25 @@ namespace vcpkg::Build case VcpkgTripletVar::PUBLIC_ABI_OVERRIDE: public_abi_override = variable_value.empty() ? nullopt : Optional{variable_value}; break; + case VcpkgTripletVar::LOAD_VCVARS_ENV: + if (variable_value.empty()) + { + load_vcvars_env = true; + if(external_toolchain_file) + load_vcvars_env = false; + } + else if (Strings::case_insensitive_ascii_equals(variable_value, "1") || + Strings::case_insensitive_ascii_equals(variable_value, "on") || + Strings::case_insensitive_ascii_equals(variable_value, "true")) + load_vcvars_env = true; + else if (Strings::case_insensitive_ascii_equals(variable_value, "0") || + Strings::case_insensitive_ascii_equals(variable_value, "off") || + Strings::case_insensitive_ascii_equals(variable_value, "false")) + load_vcvars_env = false; + else + Checks::exit_with_message( + VCPKG_LINE_INFO, "Unknown boolean setting for VCPKG_LOAD_VCVARS_ENV: %s", variable_value); + break; } } diff --git a/toolsrc/src/vcpkg/help.cpp b/toolsrc/src/vcpkg/help.cpp index 78bc43539aa07f..f4a8a0ab821b9f 100644 --- a/toolsrc/src/vcpkg/help.cpp +++ b/toolsrc/src/vcpkg/help.cpp @@ -7,15 +7,53 @@ #include #include -// Write environment variable names as %VARIABLE% on Windows and $VARIABLE in *nix -#ifdef _WIN32 -#define ENVVAR(VARNAME) "%%" #VARNAME "%%" -#else -#define ENVVAR(VARNAME) "$" #VARNAME -#endif - namespace vcpkg::Help { + void HelpTableFormatter::format(StringView col1, StringView col2) + { + // 1 space, 32 col1, 1 space, 85 col2 = 119 + m_str.append(1, ' '); + Strings::append(m_str, col1); + if (col1.size() > 32) + { + newline_indent(); + } + else + { + m_str.append(33 - col1.size(), ' '); + } + const char* line_start = col2.begin(); + const char* const e = col2.end(); + const char* best_break = std::find_if(line_start, e, [](char ch) { return ch == ' ' || ch == '\n'; }); + + while (best_break != e) + { + const char* next_break = std::find_if(best_break + 1, e, [](char ch) { return ch == ' ' || ch == '\n'; }); + if (next_break - line_start > 85 || *best_break == '\n') + { + m_str.append(line_start, best_break); + line_start = best_break + 1; + best_break = next_break; + if (line_start != e) + { + newline_indent(); + } + } + else + { + best_break = next_break; + } + } + m_str.append(line_start, best_break); + m_str.push_back('\n'); + } + void HelpTableFormatter::newline_indent() + { + m_str.push_back('\n'); + indent(); + } + void HelpTableFormatter::indent() { m_str.append(34, ' '); } + struct Topic { using topic_function = void (*)(const VcpkgPaths& paths); @@ -109,55 +147,55 @@ namespace vcpkg::Help void print_usage() { - System::print2("Commands:\n" - " vcpkg search [pat] Search for packages available to be built\n" - " vcpkg install ... Install a package\n" - " vcpkg remove ... Uninstall a package\n" - " vcpkg remove --outdated Uninstall all out-of-date packages\n" - " vcpkg list List installed packages\n" - " vcpkg update Display list of packages for updating\n" - " vcpkg upgrade Rebuild all outdated packages\n" - " vcpkg x-history Shows the history of CONTROL versions of a package\n" - " vcpkg hash [alg] Hash a file by specific algorithm, default SHA512\n" - " vcpkg help topics Display the list of help topics\n" - " vcpkg help Display help for a specific topic\n" - "\n", - Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING, // Integration help - "\n" - " vcpkg export ... [opt]... Exports a package\n" - " vcpkg edit Open up a port for editing (uses " ENVVAR(EDITOR) // - ", default 'code')\n" - " vcpkg import Import a pre-built library\n" - " vcpkg create \n" - " [archivename] Create a new package\n" - " vcpkg owns Search for files in installed packages\n" - " vcpkg depend-info ... Display a list of dependencies for 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" - "Options:\n" - " --triplet Specify the target architecture triplet\n" - " (default: " ENVVAR(VCPKG_DEFAULT_TRIPLET) // - ", see 'vcpkg help triplet')\n" - "\n" - " --overlay-ports= Specify directories to be used when searching for ports\n" - "\n" - " --overlay-triplets= Specify directories containing triplets files\n" - "\n" - " --vcpkg-root Specify the vcpkg root " - "directory\n" - " (default: " ENVVAR(VCPKG_ROOT) // - ")\n" - "\n" - " --x-scripts-root= (Experimental) Specify the scripts root directory\n" - "\n" - " @response_file Specify a " - "response file to provide additional parameters\n" - "\n" - "For more help (including examples) see the " - "accompanying README.md.\n"); +// Write environment variable names as %VARIABLE% on Windows and $VARIABLE in *nix +#ifdef _WIN32 +#define ENVVAR(VARNAME) "%" #VARNAME "%" +#else +#define ENVVAR(VARNAME) "$" #VARNAME +#endif + + System::print2( + "Commands:\n" + " vcpkg search [pat] Search for packages available to be built\n" + " vcpkg install ... Install a package\n" + " vcpkg remove ... Uninstall a package\n" + " vcpkg remove --outdated Uninstall all out-of-date packages\n" + " vcpkg list List installed packages\n" + " vcpkg update Display list of packages for updating\n" + " vcpkg upgrade Rebuild all outdated packages\n" + " vcpkg x-history (Experimental) Shows the history of CONTROL versions of a package\n" + " vcpkg hash [alg] Hash a file by specific algorithm, default SHA512\n" + " vcpkg help topics Display the list of help topics\n" + " vcpkg help Display help for a specific topic\n" + "\n", + Commands::Integrate::INTEGRATE_COMMAND_HELPSTRING, // Integration help + "\n" + " vcpkg export ... [opt]... Exports a package\n" + // clang-format off + " vcpkg edit Open up a port for editing (uses " ENVVAR(EDITOR) ", default 'code')\n" + " vcpkg import Import a pre-built library\n" + " vcpkg create [archivename]\n" + " Create a new package\n" + " vcpkg owns Search for files in installed packages\n" + " vcpkg depend-info ... Display a list of dependencies for 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" + "Options:\n" + " --triplet Specify the target architecture triplet. See 'vcpkg help triplet'\n" + " (default: " ENVVAR(VCPKG_DEFAULT_TRIPLET) ")\n" + " --overlay-ports= Specify directories to be used when searching for ports\n" + " --overlay-triplets= Specify directories containing triplets files\n" + " --vcpkg-root Specify the vcpkg root directory\n" + " (default: " ENVVAR(VCPKG_ROOT) ")\n" + " --x-scripts-root= (Experimental) Specify the scripts root directory\n" + "\n" + " @response_file Specify a response file to provide additional parameters\n" + "\n" + "For more help (including examples) see the accompanying README.md and docs folder.\n"); + // clang-format on +#undef ENVVAR } std::string create_example_string(const std::string& command_and_arguments) diff --git a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp index 5f99b85e541f7f..46e4c86ea9517e 100644 --- a/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp +++ b/toolsrc/src/vcpkg/vcpkgcmdarguments.cpp @@ -410,27 +410,26 @@ namespace vcpkg } System::print2("Options:\n"); + Help::HelpTableFormatter table; for (auto&& option : command_structure.options.switches) { - System::printf(" %-40s %s\n", option.name, option.short_help_text); + table.format(option.name, option.short_help_text); } for (auto&& option : command_structure.options.settings) { - System::printf(" %-40s %s\n", (option.name + "=..."), option.short_help_text); + table.format((option.name + "=..."), option.short_help_text); } for (auto&& option : command_structure.options.multisettings) { - System::printf(" %-40s %s\n", (option.name + "=..."), option.short_help_text); + table.format((option.name + "=..."), option.short_help_text); } - System::printf(" %-40s %s\n", "--triplet ", "Set the default triplet for unqualified packages"); - System::printf( - " %-40s %s\n", "--overlay-ports=", "Specify directories to be used when searching for ports"); - System::printf(" %-40s %s\n", "--overlay-triplets=", "Specify directories containing triplets files"); - System::printf(" %-40s %s\n", - "--vcpkg-root ", - "Specify the vcpkg directory to use instead of current directory or tool directory"); - System::printf(" %-40s %s\n", - "--x-scripts-root=", - "(Experimental) Specify the scripts directory to use instead of default vcpkg scripts directory"); + table.format("--triplet ", "Set the default triplet for unqualified packages"); + table.format("--overlay-ports=", "Specify directories to be used when searching for ports"); + table.format("--overlay-triplets=", "Specify directories containing triplets files"); + table.format("--vcpkg-root ", + "Specify the vcpkg directory to use instead of current directory or tool directory"); + table.format("--x-scripts-root=", + "(Experimental) Specify the scripts directory to use instead of default vcpkg scripts directory"); + System::print2(table.m_str); } } diff --git a/toolsrc/src/vcpkg/vcpkgpaths.cpp b/toolsrc/src/vcpkg/vcpkgpaths.cpp index 98be491e383888..bf16f09f3fd45d 100644 --- a/toolsrc/src/vcpkg/vcpkgpaths.cpp +++ b/toolsrc/src/vcpkg/vcpkgpaths.cpp @@ -193,7 +193,7 @@ namespace vcpkg const Toolset& VcpkgPaths::get_toolset(const Build::PreBuildInfo& prebuildinfo) const { - if (prebuildinfo.external_toolchain_file || + if ((prebuildinfo.external_toolchain_file && !prebuildinfo.load_vcvars_env) || (!prebuildinfo.cmake_system_name.empty() && prebuildinfo.cmake_system_name != "WindowsStore")) { static Toolset external_toolset = []() -> Toolset { diff --git a/toolsrc/vcpkglib/vcpkglib.vcxproj b/toolsrc/vcpkglib/vcpkglib.vcxproj index 2fb7766401d949..fc6d37de7b2932 100644 --- a/toolsrc/vcpkglib/vcpkglib.vcxproj +++ b/toolsrc/vcpkglib/vcpkglib.vcxproj @@ -152,6 +152,7 @@ +