[vcpkg-tool-ninja] Add only the ninja port (#23911)

* [vcpkg-tool-ninja] add ninja tool as a port

* version stuff

* add Unix Makefiles to list of valid generators for bootstraping ninja

* nicole CRs

* update version db

* revert vcpkg_build_cmake changes

* retrigger ci

* download patch

* version stuff

* Remove checked in diff copy.

Co-authored-by: Alexander Neumann <you@example.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Alexander Neumann 2022-05-09 23:00:29 +02:00 committed by GitHub
parent 0c5bb650f8
commit 83fc3b74c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,28 @@
set(VCPKG_POLICY_CMAKE_HELPER_PORT enabled)
vcpkg_download_distfile(
LONG_PATH_PATCH
URLS "https://patch-diff.githubusercontent.com/raw/ninja-build/ninja/pull/2056.diff" # stable?
FILENAME 2056.diff
SHA512 90f17c2cbb5e0c5b41de748f75a3fc3e0c9da8837a0507c8570a49affe15ae7258661dc1f1bc201574847d93ea8b7fe4cbecfffd868395d50ca821033c5f295d
)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ninja-build/ninja
REF 170c387a7461d476523ae29c115a58f16e4d3430
SHA512 75c0f263ad325d14c99c9a1d85e571832407b481271a2733e78183a478f7ecd22d84451fc8d7ce16ab20d641ce040761d7ab266695d66bbac5b2b9a3a29aa521
HEAD_REF master
PATCHES "${LONG_PATH_PATCH}" # Long path support windows
)
set(VCPKG_BUILD_TYPE release) #we only need release here!
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}")
vcpkg_cmake_install()
vcpkg_copy_tools(
TOOL_NAMES ninja
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/ninja"
AUTO_CLEAN
)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" @ONLY)

View File

@ -0,0 +1 @@
set(NINJA "${CMAKE_CURRENT_LIST_DIR}/../../tools/ninja/ninja@VCPKG_TARGET_EXECUTABLE_SUFFIX@")

View File

@ -0,0 +1,12 @@
{
"name": "vcpkg-tool-ninja",
"version-date": "2022-03-31",
"description": "Ninja is a small build system with a focus on speed.",
"homepage": "https://ninja-build.org/",
"license": "Apache-2.0",
"supports": "native",
"dependencies": [
"vcpkg-cmake",
"vcpkg-cmake-config"
]
}

View File

@ -35,6 +35,9 @@ endif()
if (DEFINED VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK)
file(APPEND ${BUILD_INFO_FILE_PATH} "PolicySkipArchitectureCheck: ${VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK}\n")
endif()
if (DEFINED VCPKG_POLICY_CMAKE_HELPER_PORT)
file(APPEND ${BUILD_INFO_FILE_PATH} "PolicyCmakeHelperPort: ${VCPKG_POLICY_CMAKE_HELPER_PORT}\n")
endif()
if (DEFINED VCPKG_HEAD_VERSION)
file(APPEND ${BUILD_INFO_FILE_PATH} "Version: ${VCPKG_HEAD_VERSION}\n")
endif()

View File

@ -7368,6 +7368,10 @@
"baseline": "3.3",
"port-version": 0
},
"vcpkg-tool-ninja": {
"baseline": "2022-03-31",
"port-version": 0
},
"vcpkg-tool-nodejs": {
"baseline": "14.17.4",
"port-version": 0

View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "0d55ba6e9ede00479127566b8f39fce7034e1b05",
"version-date": "2022-03-31",
"port-version": 0
}
]
}