Skip to content

Commit

Permalink
[boost] update generator script for boost 1.76
Browse files Browse the repository at this point in the history
  • Loading branch information
autoantwort committed May 31, 2021
1 parent 7bc5b8c commit ffa76bf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
4 changes: 2 additions & 2 deletions ports/boost-modular-build-helper/Jamroot.jam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
constant BOOST_VERSION : 1.75.0 ;
constant BOOST_VERSION_ABI_TAG : 1_75 ;
constant BOOST_VERSION : 1.76.0 ;
constant BOOST_VERSION_ABI_TAG : 1_76 ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;

import boostcpp ;
Expand Down
3 changes: 1 addition & 2 deletions ports/boost-modular-build-helper/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "boost-modular-build-helper",
"version-string": "1.75.0",
"port-version": 9,
"version-string": "1.76.0",
"dependencies": [
"boost-build",
"boost-uninstall"
Expand Down
27 changes: 9 additions & 18 deletions scripts/boost/generate-ports.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[CmdletBinding()]
param (
$libraries = @(),
$version = "1.75.0",
$version = "1.76.0",
$portsDir = $null
)

Expand All @@ -27,12 +27,6 @@ else
# Clear this array when moving to a new boost version
$port_versions = @{
#e.g. "asio" = 1;
"asio" = 1;
"python" = 3;
"context" = 3;
"concept-check" = 2;
"regex" = 2;
"json" = 1;
}

$per_port_data = @{
Expand Down Expand Up @@ -107,7 +101,7 @@ function Generate()
New-Item -ItemType "Directory" "$portsDir/boost-$PortName" -erroraction SilentlyContinue | out-null
$controlLines = @{
name="boost-$PortName"; `
"version-string"=$version; `
"version"=$version; `
dependencies=$Depends; `
homepage="https://github.com/boostorg/$Name"; `
description="Boost $Name module" `
Expand All @@ -116,11 +110,6 @@ function Generate()
{
$controlLines["port-version"] = $port_versions[$PortName]
}
elseif ($NeedsBuild)
{
# This can be removed on next update; this is used to track the host dependencies change
$controlLines["port-version"] = 1
}

if ($per_port_data[$PortName])
{
Expand Down Expand Up @@ -323,12 +312,15 @@ foreach ($library in $libraries)
$groups = $(
findstr /si /C:"include <boost/" include/*
findstr /si /C:"include <boost/" src/*
findstr /si /C:"include \`"boost/" include/*
findstr /si /C:"include \`"boost/" src/*
) | % { $_ -replace "^[^:]*:","" }
}
else
{
$groups = $(
grep -irhs "include <boost/" include src
grep -irhs "include \`"boost/" include src
)
}

Expand All @@ -337,7 +329,7 @@ foreach ($library in $libraries)
-replace "boost/numeric/conversion/","boost/numeric_conversion/" `
-replace "boost/functional/hash.hpp","boost/container_hash/hash.hpp" `
-replace "boost/detail/([^/]+)/","boost/`$1/" `
-replace " *# *include *<boost/([a-zA-Z0-9\._]*)(/|>).*", "`$1" `
-replace " *# *include *(<|`")boost/([a-zA-Z0-9\._]*)(/|>).*", "`$2" `
-replace "/|\.hp?p?| ","" } | group | % name | % {
# mappings
Write-Verbose "${library}: $_"
Expand All @@ -346,9 +338,9 @@ foreach ($library in $libraries)
elseif ($_ -eq "type") { "core" }
elseif ($_ -match "concept|concept_archetype") { "concept_check" }
elseif ($_ -match "unordered_") { "unordered" }
elseif ($_ -match "cstdint|integer_fwd|integer_traits") { "integer" }
elseif ($_ -match "integer_fwd|integer_traits") { "integer" }
elseif ($_ -match "call_traits|operators|current_function|cstdlib|next_prior|compressed_pair") { "utility" }
elseif ($_ -match "^version|^workaround") { "config" }
elseif ($_ -match "^version|^workaround|^config|cstdint|cxx11_char_types|limits") { "config" }
elseif ($_ -match "enable_shared_from_this|shared_ptr|make_shared|make_unique|intrusive_ptr|scoped_ptr|pointer_cast|pointer_to_other|weak_ptr|shared_array|scoped_array") { "smart_ptr" }
elseif ($_ -match "iterator_adaptors|generator_iterator|pointee") { "iterator" }
elseif ($_ -eq "regex_fwd") { "regex" }
Expand All @@ -358,7 +350,6 @@ foreach ($library in $libraries)
elseif ($_ -eq "circular_buffer_fwd") { "circular_buffer" }
elseif ($_ -eq "archive") { "serialization" }
elseif ($_ -match "none|none_t") { "optional" }
elseif ($_ -eq "limits") { "compatibility" }
elseif ($_ -match "cstdfloat|math_fwd") { "math" }
elseif ($_ -eq "cast") { "conversion"; "numeric_conversion" } # DEPRECATED header file, includes <boost/polymorphic_cast.hpp> and <boost/numeric/conversion/cast.hpp>
elseif ($_ -match "polymorphic_cast|implicit_cast") { "conversion" }
Expand Down Expand Up @@ -468,7 +459,7 @@ if ($libraries_in_boost_port.length -gt 1) {

@{
name="boost";
"version-string"=$version;
"version"=$version;
"port-version"= $port_versions.boost ? $port_versions.boost : 0;
homepage="https://boost.org";
description="Peer-reviewed portable C++ source libraries";
Expand Down

0 comments on commit ffa76bf

Please sign in to comment.