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

[vcpkg script] ninja 1.12 #41980

Merged
merged 12 commits into from
Jan 15, 2025
1 change: 1 addition & 0 deletions ports/libdatachannel/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE # version.h configuration
OPTIONS
${FEATURE_OPTIONS}
-DPREFER_SYSTEM_LIB=ON
Expand Down
2 changes: 1 addition & 1 deletion ports/libdatachannel/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "libdatachannel",
"version-semver": "0.21.2",
"port-version": 1,
"port-version": 2,
"description": "libdatachannel is a standalone implementation of WebRTC Data Channels, WebRTC Media Transport, and WebSockets in C++17 with C bindings for POSIX platforms (including GNU/Linux, Android, and Apple macOS) and Microsoft Windows.",
"homepage": "https://github.com/paullouisageneau/libdatachannel",
"license": "MPL-2.0",
Expand Down
13 changes: 13 additions & 0 deletions ports/qt5-webengine/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ vcpkg_add_to_path(PREPEND "${GPERF_DIR}")
vcpkg_add_to_path(PREPEND "${NINJA_DIR}")
vcpkg_add_to_path(PREPEND "${NODEJS_DIR}")

vcpkg_execute_in_download_mode(
COMMAND "${NINJA}" --version
OUTPUT_VARIABLE ninja_version
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}"
)
if(ninja_version VERSION_GREATER_EQUAL "1.12.1")
message(WARNING
"Found ninja version ${ninja_version} which may fail to build ${PORT}."
"You can supply a different filepath using per-port customization of CMake variable NINJA."
)
endif()

set(PATCHES common.pri.patch
gl.patch
build_1.patch
Expand Down
1 change: 1 addition & 0 deletions ports/qt5-webengine/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "qt5-webengine",
"version": "5.15.16",
"port-version": 1,
"description": "Qt WebEngine provides functionality for rendering regions of dynamic web content.",
"license": null,
"supports": "!static",
Expand Down
7 changes: 4 additions & 3 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -917,12 +917,13 @@ qt5-canvas3d:x64-windows=skip
qt5-canvas3d:x64-windows-static=skip
qt5-canvas3d:x64-windows-static-md=skip
qt5-canvas3d:x86-windows=skip
# Skipped to avoid exceeding the 48 hour time limit in CI
# May also need an older ninja version
qt5-webengine:x64-windows=skip
qt5-webengine:x86-windows=skip
# Missing system libraries
qt5-x11extras:x64-osx=skip
qt5-x11extras:arm64-osx=skip
# Skipped to avoid exceeding the 48 hour time limit in CI
qt5-webengine:x86-windows=skip
qt5-webengine:x64-windows=skip
# Missing system libraries
qtwayland:x64-osx=skip
qtwayland:arm64-osx=skip
Expand Down
32 changes: 25 additions & 7 deletions scripts/cmake/vcpkg_find_acquire_program(NINJA).cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
set(program_name ninja)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should use vcpkg fetch ninja somehow so that the ninja in the executable and the ninja provided by the script are defined to be the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are different before this PR and the same with this PR ;-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still for using $ENV{VCPKG_COMMAND} fetch ninja somehow instead of duplicating the download info.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too, but I am not able to implement this change soon, and there is no example.
This PR should be merged in the next windows of no-baseline-regressions, instead of being delayed.

Copy link
Contributor

@Neumann-A Neumann-A Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set(program_name ninja) # Required by vcpkg_find_acquire_program logic
vcpkg_execute_in_download_mode(
    COMMAND "$ENV{VCPKG_COMMAND}" fetch ninja
    RESULT_VARIABLE error_code
    OUTPUT_VARIABLE NINJA
    WORKING_DIRECTORY "${DOWNLOADS}"
)
string(STRIP "${NINJA}" NINJA) # vcpkg output has a strange line endings and whitespaces in there?
#set(NINJA "${NINJA}" CACHE STRING "") # does not seem required. 

you can replace the complete code with this.

set(program_version 1.10.2)
set(program_version 1.12.1)
set(version_command --version)
if(CMAKE_HOST_WIN32)
set(download_filename "ninja-win-${program_version}.zip")
set(tool_subdirectory "${program_version}-windows")
set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-win.zip")
set(download_sha512 6004140d92e86afbb17b49c49037ccd0786ce238f340f7d0e62b4b0c29ed0d6ad0bab11feda2094ae849c387d70d63504393714ed0a1f4d3a1f155af7a4f1ba3)
if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
set(build_arch $ENV{PROCESSOR_ARCHITEW6432})
else()
set(build_arch $ENV{PROCESSOR_ARCHITECTURE})
endif()
if(build_arch MATCHES "^(ARM|arm)64$")
set(download_filename "ninja-winarm64-${program_version}.zip")
set(tool_subdirectory "${program_version}-windows-arm64")
set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-winarm64.zip")
set(download_sha512 b1826c422a677f47f9f7e001672ce831791b092e4f1cd84ddf2ea067781c31aa8246f26e91dd66300c23ffa77a8ea29910c48ccf7e4235ff20bccc2d2b6e247b)
else()
set(download_filename "ninja-win-${program_version}.zip")
set(tool_subdirectory "${program_version}-windows")
set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-win.zip")
set(download_sha512 d6715c6458d798bcb809f410c0364dabd937b5b7a3ddb4cd5aba42f9fca45139b2a8a3e7fd9fbd88fd75d298ed99123220b33c7bdc8966a9d5f2a1c9c230955f)
endif()
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(download_filename "ninja-mac-${program_version}.zip")
set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-mac.zip")
set(tool_subdirectory "${program_version}-osx")
set(paths_to_search "${DOWNLOADS}/tools/ninja-${program_version}-osx")
set(download_sha512 bcd12f6a3337591306d1b99a7a25a6933779ba68db79f17c1d3087d7b6308d245daac08df99087ff6be8dc7dd0dcdbb3a50839a144745fa719502b3a7a07260b)
set(download_sha512 4c11f477359c9d1dcda72529a503a59948ec20b368992132e545d6d4f6e3aabfd1d6b1d0f32cf932626037959b24a7bb375ef901e2d002eabadc83a265cbc351)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
set(paths_to_search "${DOWNLOADS}/tools/${tool_subdirectory}-freebsd")
else()
Expand All @@ -21,7 +33,13 @@ else()
set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-linux.zip")
set(tool_subdirectory "${program_version}-linux")
set(paths_to_search "${DOWNLOADS}/tools/ninja-${program_version}-linux")
set(download_sha512 93e802e9c17fb59636cddde4bad1ddaadad624f4ecfee00d5c78790330a4e9d433180e795718cda27da57215ce643c3929cf72c85337ee019d868c56f2deeef3)
set(download_sha512 9c2ad534e7e72e67c608de7784cfbae601095bfca96713731a3f1eca268d66a6302f40c138a4ad97f7e8c902cd3fb05994a175e46fe922295dcc2d1334bf9014)
elseif(HOST_ARCH MATCHES "arm64|aarch64|ARM64|AARCH64")
set(download_filename "ninja-linux-aarch64-${program_version}.zip")
set(download_urls "https://github.com/ninja-build/ninja/releases/download/v${program_version}/ninja-linux-aarch64.zip")
set(tool_subdirectory "${program_version}-linux-aarch64")
set(paths_to_search "${DOWNLOADS}/tools/ninja-${program_version}-linux-aarch64")
set(download_sha512 22c46abb7e6d916e11713705f78d093e9b30029cb49cadc65755908ad9f44b3f2548105174cc615a5ef86c4672b366173f18bd04c2d71710a303d952c06db334)
else()
set(version_command "") # somewhat hacky way to skip version check and use system binary
endif()
Expand Down
44 changes: 32 additions & 12 deletions scripts/vcpkg-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,34 +230,54 @@
"sha512": "3bb32b7d55347d1af37c6f4ebf0e20b38ce51c37a1baf92f7ad1762000539a03413dd679a6d902fdb1805fa71917300c9692aceee012eb06ecdff10491137aec",
"archive": "aria2-1.35.0-osx-darwin.tar.bz2"
},
{
"name": "ninja",
"os": "windows",
"arch": "arm64",
"version": "1.12.1",
"executable": "ninja.exe",
"url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-winarm64.zip",
"sha512": "b1826c422a677f47f9f7e001672ce831791b092e4f1cd84ddf2ea067781c31aa8246f26e91dd66300c23ffa77a8ea29910c48ccf7e4235ff20bccc2d2b6e247b",
"archive": "ninja-winarm64-1.12.1.zip"
},
{
"name": "ninja",
"os": "windows",
"arch": "x64",
"version": "1.11.1",
"version": "1.12.1",
"executable": "ninja.exe",
"url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip",
"sha512": "a700e794c32eb67b9f87040db7f1ba3a8e891636696fc54d416b01661c2421ff46fa517c97fd904adacdf8e621df3e68ea380105b909ae8b6651a78ae7eb3199",
"archive": "ninja-win-1.11.1.zip"
"url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip",
"sha512": "d6715c6458d798bcb809f410c0364dabd937b5b7a3ddb4cd5aba42f9fca45139b2a8a3e7fd9fbd88fd75d298ed99123220b33c7bdc8966a9d5f2a1c9c230955f",
"archive": "ninja-win-1.12.1.zip"
},
{
"name": "ninja",
"os": "linux",
"arch": "arm64",
"version": "1.12.1",
"executable": "ninja",
"url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux-aarch64.zip",
"sha512": "22c46abb7e6d916e11713705f78d093e9b30029cb49cadc65755908ad9f44b3f2548105174cc615a5ef86c4672b366173f18bd04c2d71710a303d952c06db334",
"archive": "ninja-linux-aarch64-1.12.1.zip"
},
{
"name": "ninja",
"os": "linux",
"arch": "x64",
"version": "1.11.1",
"version": "1.12.1",
"executable": "ninja",
"url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip",
"sha512": "6403dac9196baffcff614fa73ea530752997c8db6bbfbaa0446b4b09d7327e2aa6e8615d1283c961d3bf0df497e85ba86604149f1505ee75f89d600245a45dde",
"archive": "ninja-linux-1.11.1.zip"
"url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip",
"sha512": "9c2ad534e7e72e67c608de7784cfbae601095bfca96713731a3f1eca268d66a6302f40c138a4ad97f7e8c902cd3fb05994a175e46fe922295dcc2d1334bf9014",
"archive": "ninja-linux-1.12.1.zip"
},
{
"name": "ninja",
"os": "osx",
"version": "1.11.1",
"version": "1.12.1",
"executable": "ninja",
"url": "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-mac.zip",
"sha512": "dad33b0918c60bbf5107951a936175b1610b4894a408f4ba4b47a2f5b328fc982a52a2aed6a0cb75028ee4765af5083bea66611c37516826eb0c851366bb4427",
"archive": "ninja-mac-1.11.1.zip"
"url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-mac.zip",
"sha512": "4c11f477359c9d1dcda72529a503a59948ec20b368992132e545d6d4f6e3aabfd1d6b1d0f32cf932626037959b24a7bb375ef901e2d002eabadc83a265cbc351",
"archive": "ninja-mac-1.12.1.zip"
},
{
"name": "powershell-core",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4438,7 +4438,7 @@
},
"libdatachannel": {
"baseline": "0.21.2",
"port-version": 1
"port-version": 2
},
"libdatrie": {
"baseline": "0.2.13",
Expand Down Expand Up @@ -7538,7 +7538,7 @@
},
"qt5-webengine": {
"baseline": "5.15.16",
"port-version": 0
"port-version": 1
},
"qt5-webglplugin": {
"baseline": "5.15.16",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libdatachannel.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bdae5c743dedd26494c0c49587b1eef0bdffe042",
"version-semver": "0.21.2",
"port-version": 2
},
{
"git-tree": "df0663ab881ed7a331bf51b6bf652e80fc55dbf4",
"version-semver": "0.21.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/q-/qt5-webengine.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "92f56035f25cfc039d74c70b6905c1b78e480e2e",
"version": "5.15.16",
"port-version": 1
},
{
"git-tree": "b49c1e293ead06cecbbc431801688483b0473f3e",
"version": "5.15.16",
Expand Down
Loading