[boost-modular-headers] download the license file only once (#22462)

* [boost-modular-headers] download license file only once for every header-only library

* update version
This commit is contained in:
Yury Bura 2022-01-12 22:39:19 +03:00 committed by GitHub
parent e16a8ac6dc
commit 9e0e9762e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 16 deletions

View File

@ -1,26 +1,20 @@
function(boost_modular_headers) function(boost_modular_headers)
cmake_parse_arguments(_bm "" "SOURCE_PATH" "" ${ARGN}) cmake_parse_arguments(_bm "" "SOURCE_PATH" "" ${ARGN})
set(BOOST_VERSION 1.78.0)
if(NOT DEFINED _bm_SOURCE_PATH) if(NOT DEFINED _bm_SOURCE_PATH)
message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_headers.") message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_headers.")
endif() endif()
message(STATUS "Packaging headers") message(STATUS "Copying headers")
file( file(
COPY ${_bm_SOURCE_PATH}/include/boost COPY ${_bm_SOURCE_PATH}/include/boost
DESTINATION ${CURRENT_PACKAGES_DIR}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include
) )
message(STATUS "Copying headers done")
message(STATUS "Packaging headers done") file(INSTALL
${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/usage
vcpkg_download_distfile(ARCHIVE ${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/copyright
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/LICENSE_1_0.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
FILENAME "boost_LICENSE_1_0.txt"
SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
) )
file(INSTALL ${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
endfunction() endfunction()

View File

@ -1,8 +1,17 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
file(COPY set(BOOST_VERSION 1.78.0)
file(INSTALL
${CMAKE_CURRENT_LIST_DIR}/boost-modular-headers.cmake ${CMAKE_CURRENT_LIST_DIR}/boost-modular-headers.cmake
${CMAKE_CURRENT_LIST_DIR}/usage ${CMAKE_CURRENT_LIST_DIR}/usage
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
) )
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) vcpkg_download_distfile(LICENSE
URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/LICENSE_1_0.txt"
FILENAME "boost_LICENSE_1_0.txt"
SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8
)
file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,6 +1,7 @@
{ {
"name": "boost-vcpkg-helpers", "name": "boost-vcpkg-helpers",
"version": "1.78.0", "version": "1.78.0",
"port-version": 1,
"description": "Internal vcpkg port used to modularize Boost", "description": "Internal vcpkg port used to modularize Boost",
"dependencies": [ "dependencies": [
"boost-uninstall" "boost-uninstall"

View File

@ -24,6 +24,7 @@ else {
# Clear this array when moving to a new boost version # Clear this array when moving to a new boost version
$portVersions = @{ $portVersions = @{
#e.g. "boost-asio" = 1; #e.g. "boost-asio" = 1;
"boost-vcpkg-helpers" = 1;
} }
$portData = @{ $portData = @{
@ -598,7 +599,7 @@ if ($updateServicePorts) {
$files_with_boost_version = @( $files_with_boost_version = @(
"$portsDir/boost-build/portfile.cmake", "$portsDir/boost-build/portfile.cmake",
"$portsDir/boost-modular-build-helper/boost-modular-build.cmake", "$portsDir/boost-modular-build-helper/boost-modular-build.cmake",
"$portsDir/boost-vcpkg-helpers/boost-modular-headers.cmake" "$portsDir/boost-vcpkg-helpers/portfile.cmake"
) )
$files_with_boost_version | % { $files_with_boost_version | % {
$content = Get-Content -LiteralPath $_ ` $content = Get-Content -LiteralPath $_ `

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "2b601d13ad505473bac3d555d9e543d981c46565",
"version": "1.78.0",
"port-version": 1
},
{ {
"git-tree": "b8003935ceb891a870f1bbef0ffd18ef4266c6f7", "git-tree": "b8003935ceb891a870f1bbef0ffd18ef4266c6f7",
"version": "1.78.0", "version": "1.78.0",

View File

@ -1102,7 +1102,7 @@
}, },
"boost-vcpkg-helpers": { "boost-vcpkg-helpers": {
"baseline": "1.78.0", "baseline": "1.78.0",
"port-version": 0 "port-version": 1
}, },
"boost-vmd": { "boost-vmd": {
"baseline": "1.78.0", "baseline": "1.78.0",