Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch Tuesday for July 2024 #39896

Merged
merged 16 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions ports/arg-router/always-depend-on-boost.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2828e64..7b84de3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,8 @@ endif()
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/build_types/documentation.cmake")

set(BOOST_VERSION 1.74)
+find_package(Boost ${BOOST_VERSION} REQUIRED)
+
if(NOT INSTALLATION_ONLY)
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/versioning/version.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/copyright_checker.cmake")
@@ -48,8 +50,6 @@ if(NOT INSTALLATION_ONLY)
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizers.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/ccache.cmake")

- find_package(Boost ${BOOST_VERSION} REQUIRED)
-
find_package(span-lite QUIET)
if (NOT span-lite_FOUND)
message(WARNING "span-lite package not found, you will need to compile against C++20 or higher")
2 changes: 2 additions & 0 deletions ports/arg-router/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ vcpkg_from_github(
REF v${VERSION}
HEAD_REF main
SHA512 0348a39c0e091b1b0d6887528f6d48372162ed2526fb81935761cf93ff006fc685bbf834d44cea60cdaf4d8b2e947b6cb1a81c901c02aaba68a0dfd16a12ca20
PATCHES
always-depend-on-boost.patch # https://github.com/cmannett85/arg_router/pull/398
)

set(VCPKG_BUILD_TYPE release) # header-only port
Expand Down
1 change: 1 addition & 0 deletions ports/arg-router/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "arg-router",
"version": "1.4.0",
"port-version": 1,
"description": "C++ command line argument parsing and routing.",
"homepage": "https://github.com/cmannett85/arg_router",
"documentation": "https://cmannett85.github.io/arg_router/",
Expand Down
1 change: 1 addition & 0 deletions ports/qtwebchannel/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ FEATURES
"qml" CMAKE_REQUIRE_FIND_PACKAGE_Qt6Quick
INVERTED_FEATURES
"qml" CMAKE_DISABLE_FIND_PACKAGE_Qt6Quick
"qml" CMAKE_DISABLE_FIND_PACKAGE_Qt6Qml
)

qt_install_submodule(PATCHES ${${PORT}_PATCHES}
Expand Down
1 change: 1 addition & 0 deletions ports/qtwebchannel/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qtwebchannel",
"version": "6.7.2",
"port-version": 1,
"description": "Qt WebChannel enables peer-to-peer communication between a server (QML/C++ application) and a client (HTML/JavaScript or QML application).",
"homepage": "https://www.qt.io/",
"license": null,
Expand Down
5 changes: 3 additions & 2 deletions ports/wg21-linear-algebra/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO BobSteagall/wg21
REF "v${VERSION}"
SHA512 ab1db0cff476d2f63a5d1fcc1d3b40acbceeacae61a99d7ad0b8d8abe21413da97b71c088a331b70c0d0c3dc4615953485c68af46698ec7f0013e14bea5f9452
PATCHES
use-external-mdspan.patch # https://github.com/BobSteagall/wg21/pull/80
)

vcpkg_cmake_configure(
Expand All @@ -13,6 +13,7 @@ vcpkg_cmake_configure(
-DLA_INSTALL=ON
-DLA_BUILD_PACKAGE=OFF
-DLA_ENABLE_TESTS=OFF
-DUSE_EXTERNAL_MDSPAN=ON
)

vcpkg_cmake_install()
Expand Down
17 changes: 17 additions & 0 deletions ports/wg21-linear-algebra/use-external-mdspan.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7821b27..723a1a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,11 @@ include(GNUInstallDirs)
include(CMakeDependentOption)
include(CMakePackageConfigHelpers)

-if(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake)
+option(USE_EXTERNAL_MDSPAN "Use external copy of mdspan" OFF)
+
+if(${USE_EXTERNAL_MDSPAN})
+ find_package(mdspan CONFIG REQUIRED)
+elseif(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake)
include(${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake)
conan_basic_setup()
find_package(mdspan CONFIG REQUIRED)
1 change: 1 addition & 0 deletions ports/wg21-linear-algebra/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "wg21-linear-algebra",
"version": "0.7.3",
"port-version": 1,
"description": "A linear algebra proposal for the C++ standard library",
"license": "NCSA",
"dependencies": [
Expand Down
9 changes: 6 additions & 3 deletions ports/ztd-cuneicode/fix-cmake-install.patch
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ index 00aa8b6..d49889b 100644
add_subdirectory(single)
endif()
diff --git a/cmake/ztd.cuneicode-config.cmake.in b/cmake/ztd.cuneicode-config.cmake.in
index 4bfb041..823d50b 100644
index 4bfb041..1b28918 100644
--- a/cmake/ztd.cuneicode-config.cmake.in
+++ b/cmake/ztd.cuneicode-config.cmake.in
@@ -1,6 +1,11 @@
@@ -1,8 +1,13 @@
@PACKAGE_INIT@
+include(CMakeFindDependencyMacro)
+find_dependency(ztd.encoding_tables CONFIG)
Expand All @@ -91,5 +91,8 @@ index 4bfb041..823d50b 100644
+if (TARGET ztd.cuneicode)
+ add_library(ztd::cuneicode ALIAS ztd.cuneicode)
get_target_property(ZTD_CUNEICODE_INCLUDE_DIRS
ztd.cuneicode.single INTERFACE_INCLUDE_DIRECTORIES)
- ztd.cuneicode.single INTERFACE_INCLUDE_DIRECTORIES)
+ ztd.cuneicode INTERFACE_INCLUDE_DIRECTORIES)
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved
set_and_check(ZTD_CUNEICODE_INCLUDE_DIRS "${ZTD_CUNEICODE_INCLUDE_DIRS}")
endif()

4 changes: 3 additions & 1 deletion ports/ztd-cuneicode/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO soasis/cuneicode
REF 093041aa934b7b09e7ee7300abdc3f54bb57e389
SHA512 0066fee5cf75fa07dc97934153e4206e4add69f15602526c1953b0302d5a6f8b56256e837a73acee187b0e02e676fba1350ad39b162c4901c624b12fa4e0fb03
HEAD_REF main
PATCHES fix-cmake-install.patch
PATCHES
fix-cmake-install.patch # Also contains https://github.com/soasis/cuneicode/pull/12
)

vcpkg_cmake_configure(
Expand Down
1 change: 1 addition & 0 deletions ports/ztd-cuneicode/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "ztd-cuneicode",
"version-date": "2023-11-03",
"port-version": 1,
"description": "Shared tables between C and C++ for encoding infrastructure",
"homepage": "http://ztdcuneicode.rtfd.io/",
"license": "Apache-2.0",
Expand Down
24 changes: 19 additions & 5 deletions ports/ztd-text/fix-cmake-install.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd8e1c8..c92aaa5 100644
index 607394b..d80fb23 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -51,6 +51,8 @@ project(ztd.text
@@ -34,12 +34,6 @@ cmake_policy(VERSION 3.21)
# # Project kickstart
# Includes a bunch of basic flags and utilities shared across projects
# See more at the github repository link below
-include(FetchContent)
-FetchContent_Declare(ztd.cmake
- GIT_REPOSITORY https://github.com/soasis/cmake
- GIT_SHALLOW ON
- GIT_TAG main)
-FetchContent_MakeAvailable(ztd.cmake)
set(CMAKE_PROJECT_INCLUDE ${ZTD_CMAKE_PROJECT_PRELUDE})

# # Project declaration
@@ -51,6 +45,8 @@ project(ztd.text
HOMEPAGE_URL "https://ztdtext.readthedocs.io/en/latest/"
LANGUAGES C CXX)

Expand All @@ -11,7 +24,7 @@ index fd8e1c8..c92aaa5 100644
if(ZTD_TEXT_READTHEDOCS)
# ReadTheDocs seems unable to handle the include at the project level: something must be going wrong?
include(CheckCXXCompilerFlag)
@@ -139,40 +141,17 @@ option(ZTD_TEXT_BOOST.TEXT "Enable usage of Boost.Text benchmarks and examples"
@@ -139,40 +135,18 @@ option(ZTD_TEXT_BOOST.TEXT "Enable usage of Boost.Text benchmarks and examples"

# # Dependencies
# ztd.idk
Expand All @@ -37,6 +50,7 @@ index fd8e1c8..c92aaa5 100644
-FetchContent_MakeAvailable(ztd.encoding_tables)

# ztd.cuneicode
+find_package(ztd.cuneicode CONFIG REQUIRED)
set(ZTD_CUNEICODE_SIMDUTF_SHARED ${ZTD_TEXT_BENCHMARKS})
-FetchContent_Declare(ztd.cuneicode
- GIT_REPOSITORY https://github.com/soasis/cuneicode.git
Expand All @@ -54,7 +68,7 @@ index fd8e1c8..c92aaa5 100644

if (ZTD_TEXT_BENCHAMRKS OR ZTD_TEXT_GENERATE_SINGLE OR ZTD_TEXT_DOCUMENTATION)
find_package(Python3 REQUIRED COMPONENTS Interpreter)
@@ -187,16 +166,17 @@ target_include_directories(ztd.text
@@ -187,16 +161,17 @@ target_include_directories(ztd.text
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
Expand All @@ -74,7 +88,7 @@ index fd8e1c8..c92aaa5 100644
# # Config / Version packaging
# Version configurations
configure_package_config_file(
@@ -213,6 +193,15 @@ export(TARGETS ztd.text
@@ -213,6 +188,15 @@ export(TARGETS ztd.text
FILE
"${CMAKE_CURRENT_BINARY_DIR}/cmake/ztd.text/ztd.text-targets.cmake")

Expand Down
17 changes: 15 additions & 2 deletions ports/ztd-text/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
vcpkg_from_github(
OUT_SOURCE_PATH ZTD_CMAKE_SOURCE_PATH
REPO soasis/cmake
REF c29df2f0b006f8b24214ccea0a7e2f8fbbe135ce
SHA512 5dda06c1ba6422eb0d4392dee962e731505ec93ac90de0129a8b8519e376cc53e24177791e7fed373ca1b3f4377b450a65922ad37b612f29330e6f81d65ff463
)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO soasis/text
REF c07fba735ee8389d328103c10ce9a8d49f345060
SHA512 ca9ecacf3260f3915b7d2d90fb1d84f4083775043d592ac5d869a15debf5512d42488d43bd0d3d981180519359a423314e563f2065fa3effe2749904706f483a
HEAD_REF main
PATCHES fix-cmake-install.patch
PATCHES
fix-cmake-install.patch
)

set(VCPKG_BUILD_TYPE release) # header-only

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
# See https://github.com/soasis/cmake/blob/c29df2f0b006f8b24214ccea0a7e2f8fbbe135ce/CMakeLists.txt#L43
"-DZTD_CMAKE_PACKAGES=${ZTD_CMAKE_SOURCE_PATH}/Packages"
"-DZTD_CMAKE_MODULES=${ZTD_CMAKE_SOURCE_PATH}/Modules"
"-DZTD_CMAKE_PROJECT_PRELUDE=${ZTD_CMAKE_SOURCE_PATH}/Includes/Project.cmake"
BillyONeal marked this conversation as resolved.
Show resolved Hide resolved
)

vcpkg_cmake_install()
Expand Down
2 changes: 2 additions & 0 deletions ports/ztd-text/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "ztd-text",
"version-date": "2023-11-03",
"port-version": 1,
"description": "A spicy text library.",
"homepage": "https://github.com/soasis/text",
"license": "Apache-2.0",
Expand All @@ -10,6 +11,7 @@
"name": "vcpkg-cmake",
"host": true
},
"ztd-cuneicode",
"ztd-platform",
"ztd-static-containers"
]
Expand Down
5 changes: 1 addition & 4 deletions scripts/azure-pipelines/android/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
FROM ubuntu:focal-20240530

ADD https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb /packages-microsoft-prod.deb
ADD https://dl.google.com/android/repository/android-ndk-r25c-linux.zip /android-ndk-r25c-linux.zip
ADD https://dl.google.com/android/repository/android-ndk-r26d-linux.zip /android-ndk-r26d-linux.zip

# Add apt packages
Expand Down Expand Up @@ -61,12 +60,10 @@ apt-get -y dist-upgrade
apt-get -y --no-install-recommends install $APT_PACKAGES

# Android NDK
unzip /android-ndk-r25c-linux.zip
rm -f android-ndk-r25c-linux.zip
unzip /android-ndk-r26d-linux.zip
rm -f android-ndk-r26d-linux.zip
END_OF_SCRIPT

ENV ANDROID_NDK_HOME /android-ndk-r25c
ENV ANDROID_NDK_HOME /android-ndk-r26d

WORKDIR /vcpkg
42 changes: 22 additions & 20 deletions scripts/azure-pipelines/android/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,19 @@ jobs:
condition: and(succeeded(), contains('^${{ replace(parameters.jobName, '_', '-') }}$', '${{ parameters.tripletPattern }}'))
pool:
name: 'PrAnd-1ES-Pool'
demands:
- ImageOverride -equals vcpkg-mariner-docker-gen1
workspace:
clean: resources
timeoutInMinutes: 1440 # 1 day
cancelTimeoutInMinutes: 1
dependsOn: mintsas
variables:
- name: WORKING_ROOT
value: /mnt/vcpkg-ci
- name: VCPKG_DOWNLOADS
value: /mnt/vcpkg-ci/downloads
- name: X_VCPKG_ASSET_SOURCES
value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_ASSET_SOURCES'] ]
- name: X_VCPKG_BINARY_SOURCE_STUB
value: $[ dependencies.mintsas.outputs['mintsasstep.X_VCPKG_BINARY_SOURCE_STUB'] ]
- name: ANDROID_NDK_HOME
value: /android-ndk-r26d
steps:
# Note: /mnt is the Azure machines' temporary disk.
- bash: |
az login --identity
az acr login --name vcpkgandroidwus3
displayName: 'Set up managed identity'
- bash: |
sudo mkdir /home/agent -m=777
sudo chown `id -u` /home/agent
Expand All @@ -60,9 +49,16 @@ jobs:
docker rm -f $CONTAINERS
fi
displayName: 'Stop and remove all docker containers'
- bash: |
docker pull ${{ parameters.dockerImage }}
- task: AzureCLI@2
displayName: 'Pull Docker Container'
inputs:
azureSubscription: 'VcpkgPrFleet'
scriptType: bash
failOnStandardError: true
scriptLocation: 'inlineScript'
inlineScript: |
az acr login --name vcpkgandroidwus3
docker pull ${{ parameters.dockerImage }}
- bash: |
docker run --rm \
--mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \
Expand All @@ -77,10 +73,18 @@ jobs:
./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }}
displayName: "Build vcpkg with CMake"
condition: ne('use default', '${{ parameters.vcpkgToolSha }}')
- task: Bash@3
- task: AzureCLI@2
displayName: '*** Test Modified Ports'
inputs:
targetType: inline
script: |
azureSubscription: 'VcpkgPrFleet'
scriptType: bash
failOnStandardError: true
scriptLocation: 'inlineScript'
inlineScript: |
end=`date -u -d "2 days" '+%Y-%m-%dT%H:%MZ'`
assetSas=`az storage container generate-sas --name cache --account-name vcpkgassetcachewus3 --as-user --auth-mode login --https-only --permissions rcl --expiry $end -o tsv`
binarySas=`az storage container generate-sas --name cache --account-name vcpkgbinarycachewus3 --as-user --auth-mode login --https-only --permissions rclw --expiry $end -o tsv`
echo Minting SAS tokens valid through $end
USER=$(id --user)
docker run --init -i \
-a stderr \
Expand All @@ -89,17 +93,15 @@ jobs:
--mount type=bind,source=$(Build.Repository.LocalPath),target=/vcpkg \
--mount type=bind,source=$(WORKING_ROOT)/failure-logs,target=/vcpkg/failure-logs \
--mount type=bind,source=/mnt/vcpkg-ci,target=/mnt/vcpkg-ci \
--env X_VCPKG_ASSET_SOURCES="$(X_VCPKG_ASSET_SOURCES)" \
--env X_VCPKG_ASSET_SOURCES="x-azurl,https://vcpkgassetcachewus3.blob.core.windows.net/cache,$assetSas,readwrite" \
--env ANDROID_NDK_HOME="${{ variables.ANDROID_NDK_HOME }}" \
${{ parameters.dockerImage }} \
pwsh \
-File /vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 \
-Triplet ${{ replace(parameters.jobName, '_', '-') }} \
-BuildReason $(Build.Reason) \
-BinarySourceStub "$(X_VCPKG_BINARY_SOURCE_STUB)" \
-BinarySourceStub "x-azblob,https://vcpkgbinarycachewus3.blob.core.windows.net/cache,$binarySas" \
-WorkingRoot ${{ variables.WORKING_ROOT }}
failOnStderr: true
displayName: '*** Test Modified Ports'
- bash: |
CONTAINERS=$(docker ps -a -q)
if [ -n "$CONTAINERS" ]; then
Expand Down
Loading
Loading