[trieste] Add new port (1.0.0) (#50903)

This commit is contained in:
Matthew A Johnson 2026-04-02 20:39:29 +01:00 committed by GitHub
parent b08425aa65
commit befe8a1bf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 96 additions and 0 deletions

View File

@ -0,0 +1,49 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO microsoft/Trieste
REF "v${VERSION}"
SHA512 cd92ef15181c7adc4e777342b9e5ae60ec1b12356d3742044d98e54d3f9a44012c377eafbc02f92afc7f80e963b32a22e5230f765a2f63345139050512bc3af0
HEAD_REF main
)
# NOTE: The CI overlay port (see .github/workflows/buildtest.yml,
# vcpkg-integration) uses sed to extract from the "if" line below onwards to
# build a portfile that points at the local checkout. If you reorder code above
# this line, update the sed pattern there.
if("parsers" IN_LIST FEATURES)
set(BUILD_PARSERS ON)
# The parser libraries lack __declspec(dllexport) annotations,
# so they must be built as static libraries on Windows.
if(VCPKG_TARGET_IS_WINDOWS)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
else()
set(BUILD_PARSERS OFF)
# Without parsers, this is a header-only library.
set(VCPKG_BUILD_TYPE release)
endif()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DTRIESTE_USE_FETCH_CONTENT=OFF
-DTRIESTE_BUILD_SAMPLES=OFF
-DTRIESTE_BUILD_PARSERS=${BUILD_PARSERS}
-DTRIESTE_ENABLE_TESTING=OFF
-DTRIESTE_USE_SNMALLOC=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME trieste CONFIG_PATH share/trieste/cmake)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
if(NOT "parsers" IN_LIST FEATURES)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
endif()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

9
ports/trieste/usage Normal file
View File

@ -0,0 +1,9 @@
trieste provides CMake targets:
find_package(trieste CONFIG REQUIRED)
target_link_libraries(<your-target> PRIVATE trieste::trieste)
When installed with the "parsers" feature (vcpkg install trieste[parsers]):
target_link_libraries(<your-target> PRIVATE trieste::json)
target_link_libraries(<your-target> PRIVATE trieste::yaml)

25
ports/trieste/vcpkg.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "trieste",
"version": "1.0.0",
"description": "A header-only C++20 term rewriting system for rapidly prototyping programming languages",
"homepage": "https://github.com/microsoft/Trieste",
"license": "MIT",
"supports": "!x86",
"dependencies": [
"cli11",
"snmalloc",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"parsers": {
"description": "Build the JSON and YAML parser libraries (trieste::json, trieste::yaml)"
}
}
}

View File

@ -10168,6 +10168,10 @@
"baseline": "1.1.0",
"port-version": 0
},
"trieste": {
"baseline": "1.0.0",
"port-version": 0
},
"triton": {
"baseline": "2025-02-15",
"port-version": 0

9
versions/t-/trieste.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "0adfdb1fb82a3c09110728d531d3abdc0cd81222",
"version": "1.0.0",
"port-version": 0
}
]
}