Skip to content

Commit a9a9446

Browse files
author
wellwei
authored
feat(pkg): compat.boost-{config,assert,throw-exception,type-traits,uuid} 1.92.0 + compat.jwt-cpp 0.7.2 (#244)
modular-boost 拆包路线(vcpkg 同构):每个 boostorg/<lib> 从自己的 boost-1.92.0 tag 打独立小包,不引单体 tarball。头文件包含闭包经逐文件 grep 核实:uuid 仅依 赖 config/assert/throw_exception/type_traits 四个头库,五包交付集两两不相交, 升级时整列车一起动版本。 - 传统 #include 消费(Shape B 头文件+锚点),不做模块包装;language=c++20 - jwt-cpp(Thalhammer/jwt-cpp,v0.7.2)无条件依赖 compat.openssl 3.5.1, 链接标志由 openssl 包自带并传递;JSON 后端用捆绑 picojson 默认 - 六个消费者测试成员(mcpp.toml 注册),真断言:版本列车/BOOST_VERIFY 语义/ 异常传播/trait 答案/UUID RFC4122 形状与 SHA1 名字生成器/JWT HS256 实签实验签 - 本地 macOS 冷缓存全绿:lint 五连 + pinned mcpp 2026.8.10.3 xpkg parse + 六成员 mcpp test;linux gcc 腿的 -latomic 预案已记录在 uuid 描述符注释 - CN 镜像暂缺,纯上游 URL(boost-ext.ut 先例)
1 parent 01d4254 commit a9a9446

19 files changed

Lines changed: 633 additions & 0 deletions

File tree

‎mcpp.toml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ members = [
1111
"tests/examples/archive",
1212
"tests/examples/asio-module",
1313
"tests/examples/asio-ssl",
14+
"tests/examples/boost-assert",
15+
"tests/examples/boost-config",
1416
"tests/examples/boost-ext.ut",
17+
"tests/examples/boost-throw-exception",
18+
"tests/examples/boost-type-traits",
19+
"tests/examples/boost-uuid",
1520
"tests/examples/build-mcpp",
1621
"tests/examples/c-ares",
1722
"tests/examples/catch2",
@@ -46,6 +51,7 @@ members = [
4651
"tests/examples/imgui",
4752
"tests/examples/imgui-module",
4853
"tests/examples/imgui-window",
54+
"tests/examples/jwt-cpp",
4955
"tests/examples/marzer.tomlplusplus",
5056
"tests/examples/libmysqlclient",
5157
"tests/examples/mysql-connector-cpp",

‎pkgs/c/compat.boost-assert.lua‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
-- Form B inline descriptor for Boost.Assert 1.92.0 — BOOST_ASSERT /
2+
-- BOOST_VERIFY / BOOST_CURRENT_LOCATION / boost::source_location.
3+
-- Part of the modular-boost header family; see compat.boost-config for the
4+
-- family wiring and version-train policy (all five packages move together).
5+
--
6+
-- Header references: assert's own tree includes boost/config.hpp and
7+
-- boost/cstdint.hpp, both shipped by compat.boost-config — hence the single
8+
-- dep. Nothing else crosses the family boundary (verified by grep, matching
9+
-- upstream CMakeLists' INTERFACE line: Boost::config only).
10+
--
11+
-- Header-only, traditional `#include` consumption; no CN mirror yet (plain
12+
-- upstream URL, like boost-ext.ut); BSL-1.0.
13+
package = {
14+
spec = "1",
15+
namespace = "compat",
16+
name = "boost-assert",
17+
description = "Boost.Assert 1.92.0 — configurable assert macros with source-location support",
18+
licenses = {"BSL-1.0"},
19+
repo = "https://github.com/boostorg/assert",
20+
type = "package",
21+
22+
xpm = {
23+
linux = {
24+
["1.92.0"] = {
25+
url = "https://github.com/boostorg/assert/archive/refs/tags/boost-1.92.0.tar.gz",
26+
sha256 = "8d49fc69df12e8fbc0e7fe3c4ede45044747199ccdeaf66c2aebb146becc54aa",
27+
},
28+
},
29+
macosx = {
30+
["1.92.0"] = {
31+
url = "https://github.com/boostorg/assert/archive/refs/tags/boost-1.92.0.tar.gz",
32+
sha256 = "8d49fc69df12e8fbc0e7fe3c4ede45044747199ccdeaf66c2aebb146becc54aa",
33+
},
34+
},
35+
windows = {
36+
["1.92.0"] = {
37+
url = "https://github.com/boostorg/assert/archive/refs/tags/boost-1.92.0.tar.gz",
38+
sha256 = "8d49fc69df12e8fbc0e7fe3c4ede45044747199ccdeaf66c2aebb146becc54aa",
39+
},
40+
},
41+
},
42+
43+
mcpp = {
44+
language = "c++20",
45+
import_std = false,
46+
include_dirs = { "*/include" }, -- exposes boost/assert.hpp + friends
47+
generated_files = {
48+
["mcpp_generated/boost_assert_anchor.cpp"] = [==[
49+
int mcpp_compat_boost_assert_anchor(void) { return 0; }
50+
]==],
51+
},
52+
sources = { "mcpp_generated/boost_assert_anchor.cpp" },
53+
targets = { ["boost_assert"] = { kind = "lib" } },
54+
deps = { ["compat.boost-config"] = "1.92.0" },
55+
},
56+
}

‎pkgs/c/compat.boost-config.lua‎

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
-- Form B inline descriptor for Boost.Config 1.92.0 — the root of this index's
2+
-- modular-boost header family. Each boostorg/<lib> repository is packaged from
3+
-- its OWN release-train tag (`boost-1.92.0`) instead of the ~224 MiB monolith,
4+
-- mirroring how vcpkg splits Boost into per-library ports: consumers download
5+
-- exactly the closure they use (Config alone is ~300 KiB of archives).
6+
--
7+
-- Family wiring (verified by grepping every `<boost/...>` include across each
8+
-- package's include tree AND cross-checked against each repo's CMakeLists
9+
-- INTERFACE link line):
10+
-- config -> (nothing)
11+
-- assert -> config
12+
-- type-traits -> config
13+
-- throw-exception -> assert, config
14+
-- uuid -> all four above
15+
-- The five shipped header sets are pairwise disjoint, so five `*/include`
16+
-- include roots union into one coherent `boost/` tree with no collisions.
17+
-- Upgrades move the WHOLE train together (every boostorg repo tags the same
18+
-- release); partial trains are untested territory.
19+
--
20+
-- Header-only, traditional `#include` consumption only — no module unit here.
21+
-- Upstream ships none for Config, and this family deliberately stays on the
22+
-- textual path (see compat.jwt-cpp / tests/examples/boost-*).
23+
--
24+
-- No CN mirror yet: plain-string upstream URL, like boost-ext.ut. Consumers in
25+
-- CN fall back to the GLOBAL source until a maintainer backfills gitcode.
26+
--
27+
-- License: Boost Software License 1.0 (BSL-1.0), file LICENSE_1_0.txt.
28+
package = {
29+
spec = "1",
30+
namespace = "compat",
31+
name = "boost-config",
32+
description = "Boost.Config 1.92.0 — platform/compiler/stdlib detection macros; root of the modular-boost header family",
33+
licenses = {"BSL-1.0"},
34+
repo = "https://github.com/boostorg/config",
35+
type = "package",
36+
37+
xpm = {
38+
linux = {
39+
["1.92.0"] = {
40+
url = "https://github.com/boostorg/config/archive/refs/tags/boost-1.92.0.tar.gz",
41+
sha256 = "b4171037f13373203ba79cbc141d612982052283e696a315185ab5bea46102a0",
42+
},
43+
},
44+
macosx = {
45+
["1.92.0"] = {
46+
url = "https://github.com/boostorg/config/archive/refs/tags/boost-1.92.0.tar.gz",
47+
sha256 = "b4171037f13373203ba79cbc141d612982052283e696a315185ab5bea46102a0",
48+
},
49+
},
50+
windows = {
51+
["1.92.0"] = {
52+
url = "https://github.com/boostorg/config/archive/refs/tags/boost-1.92.0.tar.gz",
53+
sha256 = "b4171037f13373203ba79cbc141d612982052283e696a315185ab5bea46102a0",
54+
},
55+
},
56+
},
57+
58+
mcpp = {
59+
language = "c++20",
60+
import_std = false,
61+
-- Exposes `boost/` (config.hpp, version.hpp, detail/, no_tr1/, ...) so
62+
-- consumers write `#include <boost/config.hpp>`. This package also owns
63+
-- the family's shared oddments that live outside boost/config/: the
64+
-- historical boost/cstdint.hpp, boost/limits.hpp, boost/static_assert.hpp,
65+
-- boost/detail/workaround.hpp — and boost/version.hpp, which downstream
66+
-- members assert against.
67+
include_dirs = { "*/include" },
68+
-- Header-only: a trivial anchor TU gives mcpp a buildable lib target.
69+
generated_files = {
70+
["mcpp_generated/boost_config_anchor.cpp"] = [==[
71+
int mcpp_compat_boost_config_anchor(void) { return 0; }
72+
]==],
73+
},
74+
sources = { "mcpp_generated/boost_config_anchor.cpp" },
75+
targets = { ["boost_config"] = { kind = "lib" } },
76+
deps = { },
77+
},
78+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
-- Form B inline descriptor for Boost.ThrowException 1.92.0 —
2+
-- BOOST_THROW_EXCEPTION and boost::throw_exception, the family's uniform
3+
-- "raise a std::exception-derived error" path.
4+
-- Part of the modular-boost header family; see compat.boost-config for the
5+
-- family wiring and version-train policy.
6+
--
7+
-- Header references: throw_exception includes boost/assert/ (compat.boost-assert)
8+
-- and boost/config/ (compat.boost-config); boost/exception/exception.hpp is its
9+
-- own. Matches upstream CMakeLists' INTERFACE line: Boost::assert + Boost::config.
10+
--
11+
-- Header-only, traditional `#include` consumption; no CN mirror yet; BSL-1.0.
12+
package = {
13+
spec = "1",
14+
namespace = "compat",
15+
name = "boost-throw-exception",
16+
description = "Boost.ThrowException 1.92.0 — common exception-raising infrastructure for Boost libraries",
17+
licenses = {"BSL-1.0"},
18+
repo = "https://github.com/boostorg/throw_exception",
19+
type = "package",
20+
21+
xpm = {
22+
linux = {
23+
["1.92.0"] = {
24+
url = "https://github.com/boostorg/throw_exception/archive/refs/tags/boost-1.92.0.tar.gz",
25+
sha256 = "1ddbb967a43504e28bbe2a35a010df9f7ff5d1a49d3678c9fdfc035fd32ce005",
26+
},
27+
},
28+
macosx = {
29+
["1.92.0"] = {
30+
url = "https://github.com/boostorg/throw_exception/archive/refs/tags/boost-1.92.0.tar.gz",
31+
sha256 = "1ddbb967a43504e28bbe2a35a010df9f7ff5d1a49d3678c9fdfc035fd32ce005",
32+
},
33+
},
34+
windows = {
35+
["1.92.0"] = {
36+
url = "https://github.com/boostorg/throw_exception/archive/refs/tags/boost-1.92.0.tar.gz",
37+
sha256 = "1ddbb967a43504e28bbe2a35a010df9f7ff5d1a49d3678c9fdfc035fd32ce005",
38+
},
39+
},
40+
},
41+
42+
mcpp = {
43+
language = "c++20",
44+
import_std = false,
45+
include_dirs = { "*/include" }, -- exposes boost/throw_exception.hpp
46+
generated_files = {
47+
["mcpp_generated/boost_throw_exception_anchor.cpp"] = [==[
48+
int mcpp_compat_boost_throw_exception_anchor(void) { return 0; }
49+
]==],
50+
},
51+
sources = { "mcpp_generated/boost_throw_exception_anchor.cpp" },
52+
targets = { ["boost_throw_exception"] = { kind = "lib" } },
53+
deps = {
54+
["compat.boost-assert"] = "1.92.0",
55+
["compat.boost-config"] = "1.92.0",
56+
},
57+
},
58+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
-- Form B inline descriptor for Boost.TypeTraits 1.92.0 — the is_same /
2+
-- add_pointer / remove_cv / integral_constant family (the C++03-era trait
3+
-- toolkit; modern code usually reaches for std:: traits, but Boost headers
4+
-- still lean on these).
5+
-- Part of the modular-boost header family; see compat.boost-config for the
6+
-- family wiring and version-train policy.
7+
--
8+
-- Header references: type_traits includes boost/config/, boost/detail/
9+
-- workarounds, boost/static_assert.hpp and boost/version.hpp — all shipped by
10+
-- compat.boost-config. Matches upstream CMakeLists' INTERFACE line:
11+
-- Boost::config + Boost::type_traits's own tree.
12+
--
13+
-- Header-only, traditional `#include` consumption; no CN mirror yet; BSL-1.0.
14+
package = {
15+
spec = "1",
16+
namespace = "compat",
17+
name = "boost-type-traits",
18+
description = "Boost.TypeTraits 1.92.0 — compile-time type introspection traits",
19+
licenses = {"BSL-1.0"},
20+
repo = "https://github.com/boostorg/type_traits",
21+
type = "package",
22+
23+
xpm = {
24+
linux = {
25+
["1.92.0"] = {
26+
url = "https://github.com/boostorg/type_traits/archive/refs/tags/boost-1.92.0.tar.gz",
27+
sha256 = "ee6c4d3d993f9138d9a77c57c3d91111aafed79add4f09f4e0a7effcfcdc0cae",
28+
},
29+
},
30+
macosx = {
31+
["1.92.0"] = {
32+
url = "https://github.com/boostorg/type_traits/archive/refs/tags/boost-1.92.0.tar.gz",
33+
sha256 = "ee6c4d3d993f9138d9a77c57c3d91111aafed79add4f09f4e0a7effcfcdc0cae",
34+
},
35+
},
36+
windows = {
37+
["1.92.0"] = {
38+
url = "https://github.com/boostorg/type_traits/archive/refs/tags/boost-1.92.0.tar.gz",
39+
sha256 = "ee6c4d3d993f9138d9a77c57c3d91111aafed79add4f09f4e0a7effcfcdc0cae",
40+
},
41+
},
42+
},
43+
44+
mcpp = {
45+
language = "c++20",
46+
import_std = false,
47+
include_dirs = { "*/include" }, -- exposes boost/type_traits/*
48+
generated_files = {
49+
["mcpp_generated/boost_type_traits_anchor.cpp"] = [==[
50+
int mcpp_compat_boost_type_traits_anchor(void) { return 0; }
51+
]==],
52+
},
53+
sources = { "mcpp_generated/boost_type_traits_anchor.cpp" },
54+
targets = { ["boost_type_traits"] = { kind = "lib" } },
55+
deps = { ["compat.boost-config"] = "1.92.0" },
56+
},
57+
}

‎pkgs/c/compat.boost-uuid.lua‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
-- Form B inline descriptor for Boost.UUID 1.92.0 — RFC 4122/9562 UUIDs:
2+
-- random (v4), name (SHA1/MD5 v5), time (v1/v6/v7) generators, string
3+
-- round-trip, std::hash. Header-only since forever — the historical
4+
-- src/sha1.cpp is long gone; sha1/md5/chacha20 live inline under detail/.
5+
-- Part of the modular-boost header family; see compat.boost-config for the
6+
-- family wiring and version-train policy.
7+
--
8+
-- Header references (verified by grep across the include tree, matching
9+
-- upstream CMakeLists' INTERFACE line): boost/assert, boost/config,
10+
-- boost/throw_exception, boost/type_traits — all packaged in this index as
11+
-- compat.boost-{assert,config,throw-exception,type-traits}; everything else
12+
-- stays inside boost/uuid/. The closure is exactly these four deps.
13+
--
14+
-- One upstream CMake wrinkle deliberately NOT carried over:
15+
-- BOOST_UUID_LINK_LIBATOMIC adds -latomic as an INTERFACE link requirement on
16+
-- GCC / non-Windows non-Apple Clang for the uint128 paths. Our consumer test
17+
-- exercises the standard v4/name/string surface without it; add a linux
18+
-- ldflags entry here only if a future member actually links 128-bit paths.
19+
--
20+
-- SIMD dispatch (SSE2..AVX10 via uuid_x86/generic .ipp) is auto-detected from
21+
-- compiler/arch macros — no flags needed; BOOST_UUID_NO_SIMD is the escape
22+
-- hatch if a toolchain ever misreports.
23+
--
24+
-- Header-only, traditional `#include` consumption; no CN mirror yet; BSL-1.0.
25+
package = {
26+
spec = "1",
27+
namespace = "compat",
28+
name = "boost-uuid",
29+
description = "Boost.UUID 1.92.0 — RFC 4122/9562 UUID generation and parsing",
30+
licenses = {"BSL-1.0"},
31+
repo = "https://github.com/boostorg/uuid",
32+
type = "package",
33+
34+
xpm = {
35+
linux = {
36+
["1.92.0"] = {
37+
url = "https://github.com/boostorg/uuid/archive/refs/tags/boost-1.92.0.tar.gz",
38+
sha256 = "a5fca6d0499b7e47e7bbdf59afb1aaf6876d7788b27c3c6b2bbacfc795234e35",
39+
},
40+
},
41+
macosx = {
42+
["1.92.0"] = {
43+
url = "https://github.com/boostorg/uuid/archive/refs/tags/boost-1.92.0.tar.gz",
44+
sha256 = "a5fca6d0499b7e47e7bbdf59afb1aaf6876d7788b27c3c6b2bbacfc795234e35",
45+
},
46+
},
47+
windows = {
48+
["1.92.0"] = {
49+
url = "https://github.com/boostorg/uuid/archive/refs/tags/boost-1.92.0.tar.gz",
50+
sha256 = "a5fca6d0499b7e47e7bbdf59afb1aaf6876d7788b27c3c6b2bbacfc795234e35",
51+
},
52+
},
53+
},
54+
55+
mcpp = {
56+
language = "c++20",
57+
import_std = false,
58+
include_dirs = { "*/include" }, -- exposes boost/uuid/* (+ boost/uuid.hpp shim)
59+
generated_files = {
60+
["mcpp_generated/boost_uuid_anchor.cpp"] = [==[
61+
int mcpp_compat_boost_uuid_anchor(void) { return 0; }
62+
]==],
63+
},
64+
sources = { "mcpp_generated/boost_uuid_anchor.cpp" },
65+
targets = { ["boost_uuid"] = { kind = "lib" } },
66+
deps = {
67+
["compat.boost-assert"] = "1.92.0",
68+
["compat.boost-config"] = "1.92.0",
69+
["compat.boost-throw-exception"] = "1.92.0",
70+
["compat.boost-type-traits"] = "1.92.0",
71+
},
72+
},
73+
}

0 commit comments

Comments
 (0)