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

[draft/RFC] Make tool ports first class citizens #31748

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
19e95f0
Extract z_vcpkg_extract_archive from vcpkg_find_acquire_program.
BillyONeal May 25, 2023
9ffaf6f
Remove 'supported_on_unix' and use whether a download location is kno…
BillyONeal May 25, 2023
2576e24
Remove extra_search_args and add exact_version_match.
BillyONeal May 23, 2023
db1aaba
Fix z_vcpkg_fixup_rpath_in_dir to run when run rather than include.
BillyONeal May 25, 2023
fe39cc9
Extract vcpkg_download_sourceforge from vcpkg_from_sourceforge and us…
BillyONeal May 25, 2023
e8a6334
Introduce vcpkg-find-acquire-tool and vcpkg-tool-python3-interpreter.
BillyONeal May 31, 2023
89d8dfe
Reduce vcpkg-python3-interpreter version to reflect that on Linux bef…
BillyONeal Jun 1, 2023
683895b
Merge remote-tracking branch 'origin/master' into tool-ports
BillyONeal Jun 9, 2023
b7c8dd9
Revert FATAL_ERROR in folly.
BillyONeal Jun 9, 2023
eb5d1b5
Merge remote-tracking branch 'origin/master' into tool-ports
BillyONeal Jun 12, 2023
217df19
Remove needless cache variable dance as suggested by @Neumann-A: http…
BillyONeal Jun 12, 2023
f4dc124
Remove needless include from vcpkg-tool-meson, since the reference wa…
BillyONeal Jun 12, 2023
e2f5c1d
Change vcpkg-tool-python3-interpreter to 3 instead of 3.0.0 as sugges…
BillyONeal Jun 12, 2023
347dc6f
Change bail to fail as suggested by @Thomas1664 : https://github.com/…
BillyONeal Jun 12, 2023
f05e856
Fix inverted 64 bit branch pointed out by @BurningEnlightenment: http…
BillyONeal Jun 12, 2023
700fbde
Fix min-version typo.
BillyONeal Jun 13, 2023
15adbca
Improve the formatting of the version check messages.
BillyONeal Jun 13, 2023
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
2 changes: 1 addition & 1 deletion ports/angle/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ vcpkg_download_distfile(GNI_TO_CMAKE_PY
)

# Generate CMake files from GN / GNI files
vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)
Copy link
Contributor

@Neumann-A Neumann-A Jun 1, 2023

Choose a reason for hiding this comment

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

vcpkg_find_acquire_python3_interpreter(PYTHON3)

Is kind of annoying and long. can we get something like:
vcpkg_get(<X>) and make that call vcpkg_find_acquire_<X>(X)

Having:

vcpkg_find_acquire_python3_interpreter(PYTHON3) # may need to be added to path
vcpkg_find_acquire_meson(MESON)
vcpkg_find_acquire_flex(FLEX) # may need to be added to path

is kind of verbose compared to something like

vcpkg_get(INTERPRETER python3 ADD_TO_PATH)
vcpkg_get(PYSCRIPT meson)
vcpkg_get(TOOL flex ADD_TO_PATH)

(the explicit dep in the manifest will still be verbose.)


set(_root_gni_files_to_convert
"compiler.gni Compiler.cmake"
Expand Down
6 changes: 5 additions & 1 deletion ports/angle/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angle",
"version-string": "chromium_5414",
"port-version": 2,
"port-version": 3,
"description": [
"A conformant OpenGL ES implementation for Windows, Mac and Linux.",
"The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support."
Expand Down Expand Up @@ -31,6 +31,10 @@
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
},
"zlib"
]
}
2 changes: 1 addition & 1 deletion ports/azure-kinect-sensor-sdk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ vcpkg_from_github(
fix-build-imgui.patch
)

vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")

Expand Down
6 changes: 5 additions & 1 deletion ports/azure-kinect-sensor-sdk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "azure-kinect-sensor-sdk",
"version": "1.4.1",
"port-version": 5,
"port-version": 6,
"description": "Azure Kinect SDK is a cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.",
"homepage": "https://github.com/microsoft/Azure-Kinect-Sensor-SDK",
"supports": "linux | windows",
Expand Down Expand Up @@ -29,6 +29,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
],
"features": {
Expand Down
2 changes: 1 addition & 1 deletion ports/botan/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if(VCPKG_TARGET_IS_MINGW)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)

vcpkg_cmake_get_vars(cmake_vars_file)
include("${cmake_vars_file}")
Expand Down
6 changes: 5 additions & 1 deletion ports/botan/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "botan",
"version": "2.19.3",
"port-version": 1,
"port-version": 2,
"description": "A cryptography library written in C++11",
"homepage": "https://botan.randombit.net",
"license": "BSD-2-Clause",
Expand All @@ -10,6 +10,10 @@
{
"name": "vcpkg-cmake-get-vars",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
],
"features": {
Expand Down
2 changes: 1 addition & 1 deletion ports/clblas/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vcpkg_from_github(
# conflicting with the built-in, more modern FindOpenCL.cmake
file(REMOVE "${SOURCE_PATH}/src/FindOpenCL.cmake")

vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/src"
Expand Down
6 changes: 5 additions & 1 deletion ports/clblas/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "clblas",
"version": "2.12",
"port-version": 7,
"port-version": 8,
"description": "clBLAS is an OpenCL 1.2 accelerated BLAS (Basic Linear Algebra Subsystem) library.",
"license": "Apache-2.0",
"supports": "!(windows & arm)",
Expand All @@ -14,6 +14,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion ports/coolprop/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" COOLPROP_STATIC_LIBRARY
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" COOLPROP_MSVC_DYNAMIC)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" COOLPROP_MSVC_STATIC)

vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
Expand Down
6 changes: 5 additions & 1 deletion ports/coolprop/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "coolprop",
"version-semver": "6.4.3",
"port-version": 3,
"port-version": 4,
"description": "Thermophysical properties for the masses",
"homepage": "https://github.com/CoolProp/CoolProp",
"license": "MIT",
Expand All @@ -15,6 +15,10 @@
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion ports/crashpad/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ vcpkg_from_git(
REF 261679b3d2f3336d8531ed38e110254c3e2d1c10
)

vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)
vcpkg_replace_string("${SOURCE_PATH}/.gn" "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"")

function(checkout_in_path PATH URL REF)
Expand Down
6 changes: 5 additions & 1 deletion ports/crashpad/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "crashpad",
"version-date": "2022-09-05",
"port-version": 4,
"port-version": 5,
"description": [
"Crashpad is a crash-reporting system.",
"Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss."
Expand All @@ -22,6 +22,10 @@
"name": "vcpkg-tool-gn",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
},
"zlib"
]
}
2 changes: 1 addition & 1 deletion ports/ctemplate/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vcpkg_from_github(

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
Expand Down
6 changes: 5 additions & 1 deletion ports/ctemplate/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ctemplate",
"version-date": "2020-09-14",
"port-version": 5,
"port-version": 6,
"description": "C++ CTemplate system",
"homepage": "https://github.com/OlafvdSpek/ctemplate",
"supports": "windows & !arm",
Expand All @@ -13,6 +13,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion ports/fbgemm/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The project's CMakeLists.txt uses Python to select source files. Check if it is available in advance.
vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
Expand Down
5 changes: 5 additions & 0 deletions ports/fbgemm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "fbgemm",
"version": "0.4.1",
"port-version": 1,
"description": "FB (Facebook) + GEMM (General Matrix-Matrix Multiplication)",
"homepage": "https://code.fb.com/ml-applications/fbgemm/",
"license": "BSD-3-Clause",
Expand All @@ -15,6 +16,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion ports/flint/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vcpkg_download_distfile(ARCHIVE
SHA512 ${FLINT_HASH}
)

vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)

vcpkg_extract_source_archive(
SOURCE_PATH
Expand Down
6 changes: 5 additions & 1 deletion ports/flint/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flint",
"version-semver": "2.8.0",
"port-version": 2,
"port-version": 3,
"description": "Fast Library for Number Theory",
"homepage": "https://www.flintlib.org/",
"supports": "!uwp",
Expand All @@ -16,6 +16,10 @@
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion ports/folly/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

# Required to run build/generate_escape_tables.py et al.
vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")

Expand Down
5 changes: 5 additions & 0 deletions ports/folly/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "folly",
"version-string": "2023.05.15.00",
"port-version": 1,
"description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
"homepage": "https://github.com/facebook/folly",
"license": "Apache-2.0",
Expand Down Expand Up @@ -32,6 +33,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
],
"default-features": [
Expand Down
2 changes: 1 addition & 1 deletion ports/gl3w/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}
file(COPY "${CURRENT_INSTALLED_DIR}/include/GL/glcorearb.h" DESTINATION "${SOURCE_PATH}/include/GL")
file(COPY "${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h" DESTINATION "${SOURCE_PATH}/include/KHR")

vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)

vcpkg_execute_required_process(
COMMAND "${PYTHON3}" "${SOURCE_PATH}/gl3w_gen.py"
Expand Down
6 changes: 5 additions & 1 deletion ports/gl3w/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gl3w",
"version-date": "2018-05-31",
"port-version": 4,
"port-version": 5,
"description": "Simple OpenGL core profile loading",
"homepage": "https://github.com/skaslev/gl3w",
"dependencies": [
Expand All @@ -14,6 +14,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
]
}
2 changes: 1 addition & 1 deletion ports/glad/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ endif()

string(REPLACE ";" "," GLAD_API "${GLAD_API}")

vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)

file(COPY
"${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h"
Expand Down
5 changes: 5 additions & 0 deletions ports/glad/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "glad",
"version": "0.1.36",
"port-version": 1,
"description": "Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.",
"homepage": "https://github.com/Dav1dde/glad",
"documentation": "https://github.com/Dav1dde/glad/wiki",
Expand All @@ -15,6 +16,10 @@
{
"name": "vcpkg-cmake-config",
"host": true
},
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
],
"default-features": [
Expand Down
2 changes: 1 addition & 1 deletion ports/glslang/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
)

if (ENABLE_GLSLANG_BINARIES)
vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)
get_filename_component(PYTHON_PATH ${PYTHON3} DIRECTORY)
vcpkg_add_to_path("${PYTHON_PATH}")
endif ()
Expand Down
9 changes: 8 additions & 1 deletion ports/glslang/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "glslang",
"version": "12.2.0",
"port-version": 1,
"description": "Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.",
"homepage": "https://github.com/KhronosGroup/glslang",
"license": "Apache-2.0 AND BSD-3-Clause AND MIT AND GPL-3.0-or-later",
Expand All @@ -17,7 +18,13 @@
"features": {
"tools": {
"description": "Build the glslangValidator and spirv-remap binaries",
"supports": "!ios"
"supports": "!ios",
"dependencies": [
{
"name": "vcpkg-tool-python3-interpreter",
"host": true
}
]
}
}
}
2 changes: 1 addition & 1 deletion ports/graphviz/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ endif()
vcpkg_find_acquire_program(BISON)
vcpkg_find_acquire_program(FLEX)
vcpkg_find_acquire_program(GIT)
vcpkg_find_acquire_program(PYTHON3)
vcpkg_find_acquire_python3_interpreter(PYTHON3)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
Expand Down
Loading