diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index f12cc10e..fe756173 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -116,7 +116,18 @@ env: # 0.0.94 fixed feature-gated `sources` under `mcpp test` (mcpp#218); 0.0.91 # added standard = "c++fly" to the resolver grammar, so c++fly descriptors # get the lint WARN below, not a hard grammar-parse rejection. - MCPP_VERSION: "2026.8.5.4" + # 2026.8.6.1 是本次身份迁移的**前置**,不是顺手升级。 + # + # `Fetcher::install_path(ns, shortName, version)` 的 legacy 扫描此前匹配任何以 + # `-x-` 结尾的目录、不看命名空间,于是查 `ocornut:imgui@1.92.8` 会拿到 + # `compat-x-imgui/1.92.8` —— 另一个仅仅短名相同的包。它一直够不到,是因为 module + # 层用打包计数(imgui@0.0.6)而 compat 用上游版本(compat.imgui@1.92.8),版本永远 + # 不撞;本次把 module 层对齐到上游之后它们重合了。mcpp#364 修掉了它。 + # + # index.toml 的 min_mcpp **不动**。两个会撞的 compat 邻居都是 Form B,所以旧客户端 + # 撞上时是响亮报错而不是静默用错包;下限是一道让整个索引对旧客户端失效的闸门 + # (mcpp#349),只该在描述符真的读不动时抬。这里读得动,差的是解析得对。 + MCPP_VERSION: "2026.8.6.1" jobs: lint: diff --git a/.gitignore b/.gitignore index 8bf73088..9a59b728 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ tests/examples/*/mcpp.lock tests/examples/build-mcpp/src/generated.cpp imgui.ini tests/examples/*/imgui.ini + +# 本地 git worktree(逐包验证时开的),不属于索引内容 +.worktrees/ diff --git a/pkgs/f/ffmpeg.ffmpeg.lua b/pkgs/f/ffmpeg.ffmpeg.lua new file mode 100644 index 00000000..cb1f31aa --- /dev/null +++ b/pkgs/f/ffmpeg.ffmpeg.lua @@ -0,0 +1,50 @@ +-- FFmpeg 的 C++23 module 层(import ffmpeg.av;),建在 compat.ffmpeg 的源码构建之上。 +-- +-- 由 `mcpplibs:ffmpeg@0.0.3` 迁来 —— 那个版本号是打包计数,真实答案一直写在 +-- ffmpeg-m 自己的 manifest 里:compat.ffmpeg = "8.1.2"。旧条目冻结保留。 +-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。 +-- 规则与全生态迁移表:mcpp-index#163。 +-- +-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 —— +-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。 +package = { + spec = "1", + namespace = "ffmpeg", + name = "ffmpeg", + description = "FFmpeg 8.1.2 C++ modules for mcpp (import ffmpeg.av;) on top of the compat.ffmpeg source build", + licenses = {"MIT"}, + repo = "https://github.com/mcpplibs/ffmpeg-m", + type = "package", + + xpm = { + linux = { + ["8.1.2"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz", + }, + sha256 = "776d37fcaeb2b829185877b24c8ea9f663ff2b1c3d5db7425c4a29f8b0b9bc6c", + }, + }, + macosx = { + ["8.1.2"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz", + }, + sha256 = "776d37fcaeb2b829185877b24c8ea9f663ff2b1c3d5db7425c4a29f8b0b9bc6c", + }, + }, + windows = { + ["8.1.2"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/ffmpeg-m/archive/refs/tags/v8.1.2.tar.gz", + CN = "https://gitcode.com/mcpp-res/ffmpeg/releases/download/8.1.2/ffmpeg-m-8.1.2.tar.gz", + }, + sha256 = "776d37fcaeb2b829185877b24c8ea9f663ff2b1c3d5db7425c4a29f8b0b9bc6c", + }, + }, + }, + + -- (无 `mcpp` 字段 —— 默认查找会命中 /*/mcpp.toml) +} diff --git a/pkgs/f/ffmpeg.lua b/pkgs/f/ffmpeg.lua index 46a0cb31..b8c9aece 100644 --- a/pkgs/f/ffmpeg.lua +++ b/pkgs/f/ffmpeg.lua @@ -1,3 +1,15 @@ +-- ⚠️ 已冻结 —— 本条目不再接收新版本。 +-- +-- 本包已迁往 `ffmpeg:ffmpeg@8.1.2`(见 pkgs/f/ffmpeg.ffmpeg.lua),理由是命名空间说的是这个库是谁的、 +-- 版本说的是你拿到的是哪一版上游;`mcpplibs` 是 mcpp 的默认命名空间,两者都不是它 +-- 该表达的东西。规则与全生态迁移表:mcpp-index#163。 +-- +-- 这里保留而不删除:已经在用 `mcpplibs:ffmpeg` 的消费者继续解析得到它。新版本只在新条目下 +-- 发布。迁移方式是把依赖写成限定形式 —— +-- +-- [dependencies.ffmpeg] +-- ffmpeg = "8.1.2" +-- -- Form A descriptor: the public ffmpeg module package ships its own -- mcpp.toml. mcpp's default lookup finds /*/mcpp.toml inside -- the GitHub source tarball wrap. diff --git a/pkgs/g/ggml-org.llamacpp.lua b/pkgs/g/ggml-org.llamacpp.lua new file mode 100644 index 00000000..809a3cf5 --- /dev/null +++ b/pkgs/g/ggml-org.llamacpp.lua @@ -0,0 +1,47 @@ +-- llama.cpp 的 C++23 module 层(import llamacpp;),内含 pin 住的上游 checkpoint。 +-- +-- 版本就是上游的构建号。旧的 `0.1.0` 需要一张对照表才能读懂 —— llama.cpp-m 的 +-- README 当时正是这么写的:"Version 0.1.0 maps to llama.cpp b10069"。 +-- +-- `b10069` 不是 semver。已实测 mcpp 能处理:解析、版本键匹配、wire 寻址都正常; +-- 不成立的只有**范围**(`^b10069` 解析不了),所以消费者精确 pin。见 mcpp#363。 +-- +-- 无 CN 镜像(与迁移前一致):mcpp-res 下没有对应仓库,而 docs/cn-mirror.md 明文 +-- 允许单字符串 url 作为正当回退 —— lint 只对表形式要求 CN 指向 gitcode。 +-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。 +-- 规则与全生态迁移表:mcpp-index#163。 +-- +-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 —— +-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。 +package = { + spec = "1", + namespace = "ggml-org", + name = "llamacpp", + description = "C++23 module package for llama.cpp b10069 (import llamacpp;)", + licenses = {"MIT"}, + repo = "https://github.com/mcpplibs/llama.cpp-m", + type = "package", + + xpm = { + linux = { + ["b10069"] = { + url = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.tar.gz", + sha256 = "be0b0deeb31136ea9cf0ba61eda1fb7baf8795a6579494a0991afd2323213e0b", + }, + }, + macosx = { + ["b10069"] = { + url = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.tar.gz", + sha256 = "be0b0deeb31136ea9cf0ba61eda1fb7baf8795a6579494a0991afd2323213e0b", + }, + }, + windows = { + ["b10069"] = { + url = "https://github.com/mcpplibs/llama.cpp-m/archive/refs/tags/b10069.tar.gz", + sha256 = "be0b0deeb31136ea9cf0ba61eda1fb7baf8795a6579494a0991afd2323213e0b", + }, + }, + }, + + -- (无 `mcpp` 字段 —— 默认查找会命中 /*/mcpp.toml) +} diff --git a/pkgs/g/grpc-plugin.lua b/pkgs/g/grpc-plugin.lua new file mode 100644 index 00000000..e1260cc4 --- /dev/null +++ b/pkgs/g/grpc-plugin.lua @@ -0,0 +1,61 @@ +-- grpc_cpp_plugin —— gRPC 的 C++ 代码生成器,作为 mcpp host tool 构建。 +-- +-- 为什么是独立包而不是 grpc 里的一个 target:mcpp 把一个包编成**一个对象池**, +-- 并把其中每个实现对象链进该包的每个 kind="bin" 目标(src/build/plan.cppm 的 +-- "Also include implementation .cpp/.cc/.cxx/.c units")。没有 per-target 源码 +-- 分区。所以插件若住在 grpc 里,会链进全部约 1000 个 gRPC TU,并继承 OpenSSL / +-- re2 / c-ares / zlib —— 而它真正需要的只有 protobuf 的 libprotoc(9 个 TU)。 +-- +-- 也因此它的平台覆盖比主包宽:主包受 compat.openssl 的 windows 缺口限制,插件不受。 +-- +-- 代码是上游的(plugin/src/compiler/* 每个文件都是 Copyright gRPC authors), +-- 所以归 `grpc` 命名空间。 +-- +-- manifest 在归档的 plugin/ 子目录里,默认查找(/mcpp.toml 与 +-- /*/mcpp.toml)够不到两级,故用显式 mcpp 指针。 +-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。 +-- 规则与全生态迁移表:mcpp-index#163。 +-- +-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 —— +-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。 +package = { + spec = "1", + namespace = "grpc", + name = "grpc-plugin", + description = "grpc_cpp_plugin 1.83.0 — the gRPC C++ code generator, buildable as an mcpp host tool", + licenses = {"Apache-2.0"}, + repo = "https://github.com/mcpplibs/grpc-m", + type = "package", + + xpm = { + linux = { + ["1.83.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz", + CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz", + }, + sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e", + }, + }, + macosx = { + ["1.83.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz", + CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz", + }, + sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e", + }, + }, + windows = { + ["1.83.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz", + CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz", + }, + sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e", + }, + }, + }, + + mcpp = "*/plugin/mcpp.toml", +} diff --git a/pkgs/g/grpc.lua b/pkgs/g/grpc.lua index 0c414fb4..0db38808 100644 --- a/pkgs/g/grpc.lua +++ b/pkgs/g/grpc.lua @@ -1,3 +1,14 @@ +-- 命名空间说的是这个库是谁的,不是谁打的包 —— gRPC 是 grpc/grpc 的,本仓库只是 +-- vendored 它的源码并加了 module 层。`mcpplibs` 是 mcpp 的默认命名空间 +-- (`kDefaultNamespace`),不是这个问题的答案。规则见 mcpp-index#163。 +-- +-- 与其余四个包不同,这条是**就地迁移**而非"旧的冻结 + 新增":它 2026-08-05 才进 +-- 索引(#151),满打满算一天,唯一的消费者是本仓的 tests/examples/grpc-module。 +-- 为一天的历史留一份永久重复条目不划算。 +-- +-- 归档换成 v1.83.0-2:`src/` / `include/` / `third_party/` 与 v1.83.0 逐字节相同, +-- 多出的只有 plugin/(grpc_cpp_plugin)与 rules/(grpcgen)。v1.83.0 的 sha256 已 +-- 经发布过,移动 tag 会让它校验失败(mcpp#349:发布数据不得让程序失效),故另起。 -- Form A descriptor: the public gRPC package ships its own mcpp.toml, so this -- file carries metadata and a download address and nothing else. mcpp's default -- lookup finds /*/mcpp.toml inside the GitHub source tarball wrap. @@ -37,7 +48,7 @@ package = { spec = "1", name = "grpc", - namespace = "mcpplibs", + namespace = "grpc", description = "gRPC 1.83.0 — vendored upstream source build with import grpc; (abseil/protobuf/re2/c-ares/OpenSSL come from this index)", licenses = {"Apache-2.0"}, repo = "https://github.com/mcpplibs/grpc-m", @@ -47,19 +58,19 @@ package = { linux = { ["1.83.0"] = { url = { - GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0.tar.gz", - CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz", + CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz", }, - sha256 = "99cf3bda0a4e025f674f08dd68183538c2f655c3f72a55e1e2c1f4e05a282f43", + sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e", }, }, macosx = { ["1.83.0"] = { url = { - GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0.tar.gz", - CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0.tar.gz", + GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz", + CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz", }, - sha256 = "99cf3bda0a4e025f674f08dd68183538c2f655c3f72a55e1e2c1f4e05a282f43", + sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e", }, }, -- No windows block, and the reason is a DEPENDENCY rather than gRPC: diff --git a/pkgs/g/grpcgen.lua b/pkgs/g/grpcgen.lua new file mode 100644 index 00000000..adc103bb --- /dev/null +++ b/pkgs/g/grpcgen.lua @@ -0,0 +1,61 @@ +-- grpcgen —— protoc + grpc_cpp_plugin 的调用收成一条可 import 的构建规则。 +-- +-- [dependencies] +-- grpcgen = { version = "1.83.0", host-module = true } +-- +-- // build.mcpp +-- import mcpp; +-- import grpcgen; +-- int main() { return grpcgen::generate({"helloworld"}) ? 0 : 1; } +-- +-- 这是本生态**自己写的** 163 行 C++(不是上游任何东西),所以留在 `mcpplibs`。 +-- 包名承重:mcpp 用依赖的裸 package.name 注册 host 模块,故包名即模块名,必须是 +-- 合法 C++ 模块名 —— `grpc-rules` 不行(连字符),`grpcgen` 可以。 +-- +-- 需要 mcpp >= 2026.8.5.2:规则里 `import std;` 与 `import mcpp;` 在此之前都编不过。 +-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。 +-- 规则与全生态迁移表:mcpp-index#163。 +-- +-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 —— +-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。 +package = { + spec = "1", + namespace = "mcpplibs", + name = "grpcgen", + description = "protoc + grpc_cpp_plugin codegen as an importable mcpp build rule (host-module)", + licenses = {"Apache-2.0"}, + repo = "https://github.com/mcpplibs/grpc-m", + type = "package", + + xpm = { + linux = { + ["1.83.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz", + CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz", + }, + sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e", + }, + }, + macosx = { + ["1.83.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz", + CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz", + }, + sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e", + }, + }, + windows = { + ["1.83.0"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/grpc-m/archive/refs/tags/v1.83.0-2.tar.gz", + CN = "https://gitcode.com/mcpp-res/grpc/releases/download/1.83.0/grpc-m-1.83.0-2.tar.gz", + }, + sha256 = "9083a85879f67b726d68130ca8374e791e3cc73f9fff8d324cde11314c70b06e", + }, + }, + }, + + mcpp = "*/rules/mcpp.toml", +} diff --git a/pkgs/i/imgui.lua b/pkgs/i/imgui.lua index ff183d3b..e065574d 100644 --- a/pkgs/i/imgui.lua +++ b/pkgs/i/imgui.lua @@ -1,3 +1,15 @@ +-- ⚠️ 已冻结 —— 本条目不再接收新版本。 +-- +-- 本包已迁往 `ocornut:imgui@1.92.8`(见 pkgs/o/ocornut.imgui.lua),理由是命名空间说的是这个库是谁的、 +-- 版本说的是你拿到的是哪一版上游;`mcpplibs` 是 mcpp 的默认命名空间,两者都不是它 +-- 该表达的东西。规则与全生态迁移表:mcpp-index#163。 +-- +-- 这里保留而不删除:已经在用 `mcpplibs:imgui` 的消费者继续解析得到它。新版本只在新条目下 +-- 发布。迁移方式是把依赖写成限定形式 —— +-- +-- [dependencies.ocornut] +-- imgui = "1.92.8" +-- -- Form A descriptor: the public imgui module package ships its own -- mcpp.toml. mcpp's default lookup finds /*/mcpp.toml inside -- the GitHub source tarball wrap. diff --git a/pkgs/l/llamacpp.lua b/pkgs/l/llamacpp.lua index dba97efe..98da8022 100644 --- a/pkgs/l/llamacpp.lua +++ b/pkgs/l/llamacpp.lua @@ -1,3 +1,15 @@ +-- ⚠️ 已冻结 —— 本条目不再接收新版本。 +-- +-- 本包已迁往 `ggml-org:llamacpp@b10069`(见 pkgs/g/ggml-org.llamacpp.lua),理由是命名空间说的是这个库是谁的、 +-- 版本说的是你拿到的是哪一版上游;`mcpplibs` 是 mcpp 的默认命名空间,两者都不是它 +-- 该表达的东西。规则与全生态迁移表:mcpp-index#163。 +-- +-- 这里保留而不删除:已经在用 `mcpplibs:llamacpp` 的消费者继续解析得到它。新版本只在新条目下 +-- 发布。迁移方式是把依赖写成限定形式 —— +-- +-- [dependencies.ggml-org] +-- llamacpp = "b10069" +-- -- Form A descriptor: llama.cpp-m ships its own mcpp.toml and a vendored, -- pinned llama.cpp checkpoint. The default lookup finds that manifest inside -- the GitHub tag archive. CPU is the default backend; Metal is an additive diff --git a/pkgs/o/ocornut.imgui.lua b/pkgs/o/ocornut.imgui.lua new file mode 100644 index 00000000..2156bfe0 --- /dev/null +++ b/pkgs/o/ocornut.imgui.lua @@ -0,0 +1,53 @@ +-- Dear ImGui 的 C++23 module 层。上游是 ocornut/imgui,本包只是在它之上加模块。 +-- +-- 由 `mcpplibs:imgui@0.0.6` 迁来。旧条目(pkgs/i/imgui.lua)冻结保留,老消费者 +-- 继续解析得到,新版本只在这里发布。 +-- +-- `imgui.app` 是 imgui-m 发明的 facade,不属于上游,因此收在 `app` feature 后; +-- backends 属于上游(上游自己就发 backends/imgui_impl_glfw.cpp),默认给。 +-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。 +-- 规则与全生态迁移表:mcpp-index#163。 +-- +-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 —— +-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。 +package = { + spec = "1", + namespace = "ocornut", + name = "imgui", + description = "Dear ImGui 1.92.8 core and GLFW/OpenGL3 backend modules for mcpp (import imgui.core;)", + licenses = {"MIT"}, + repo = "https://github.com/mcpplibs/imgui-m", + type = "package", + + xpm = { + linux = { + ["1.92.8"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/1.92.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/1.92.8/imgui-m-1.92.8.tar.gz", + }, + sha256 = "dec31c8317cd9216097789f6cde1295616f8a0a7568037b9e6c84db01fcc4f7f", + }, + }, + macosx = { + ["1.92.8"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/1.92.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/1.92.8/imgui-m-1.92.8.tar.gz", + }, + sha256 = "dec31c8317cd9216097789f6cde1295616f8a0a7568037b9e6c84db01fcc4f7f", + }, + }, + windows = { + ["1.92.8"] = { + url = { + GLOBAL = "https://github.com/mcpplibs/imgui-m/archive/refs/tags/1.92.8.tar.gz", + CN = "https://gitcode.com/mcpp-res/imgui/releases/download/1.92.8/imgui-m-1.92.8.tar.gz", + }, + sha256 = "dec31c8317cd9216097789f6cde1295616f8a0a7568037b9e6c84db01fcc4f7f", + }, + }, + }, + + -- (无 `mcpp` 字段 —— 默认查找会命中 /*/mcpp.toml) +} diff --git a/pkgs/o/opencv.lua b/pkgs/o/opencv.lua index 6f7c3227..8bc7b1dc 100644 --- a/pkgs/o/opencv.lua +++ b/pkgs/o/opencv.lua @@ -1,3 +1,15 @@ +-- ⚠️ 已冻结 —— 本条目不再接收新版本。 +-- +-- 本包已迁往 `opencv:opencv@5.0.0`(见 pkgs/o/opencv.opencv.lua),理由是命名空间说的是这个库是谁的、 +-- 版本说的是你拿到的是哪一版上游;`mcpplibs` 是 mcpp 的默认命名空间,两者都不是它 +-- 该表达的东西。规则与全生态迁移表:mcpp-index#163。 +-- +-- 这里保留而不删除:已经在用 `mcpplibs:opencv` 的消费者继续解析得到它。新版本只在新条目下 +-- 发布。迁移方式是把依赖写成限定形式 —— +-- +-- [dependencies.opencv] +-- opencv = "5.0.0" +-- -- Form A descriptor: the public opencv module package ships its own -- mcpp.toml. mcpp's default lookup finds /*/mcpp.toml inside -- the GitHub source tarball wrap. diff --git a/pkgs/o/opencv.opencv.lua b/pkgs/o/opencv.opencv.lua new file mode 100644 index 00000000..d3c88ae4 --- /dev/null +++ b/pkgs/o/opencv.opencv.lua @@ -0,0 +1,50 @@ +-- OpenCV 的 C++23 module 层 + vendored 源码构建,单仓库(import opencv.cv;)。 +-- +-- 由 `mcpplibs:opencv@0.0.10` 迁来 —— 真实答案一直写在同一个 manifest 的 +-- description 里:"OpenCV 5.0.0 vendored + C++23 module layer"。旧条目冻结保留。 +-- 命名空间说的是这个库是谁的,不是谁打的包;版本说的是你拿到的是哪一版上游。 +-- 规则与全生态迁移表:mcpp-index#163。 +-- +-- `mcpplibs` 是 mcpp 的**默认命名空间**(`kDefaultNamespace`),裸名就落在那里 —— +-- 它不是"上游是谁"的答案。因此上游库迁到上游 org 名下,消费者写限定名。 +package = { + spec = "1", + namespace = "opencv", + name = "opencv", + description = "OpenCV 5.0.0 vendored + C++23 module layer — import opencv.cv; (single repo, no compat.opencv dependency)", + licenses = {"MIT"}, + repo = "https://github.com/Sunrisepeak/opencv-m", + type = "package", + + xpm = { + linux = { + ["5.0.0"] = { + url = { + GLOBAL = "https://github.com/Sunrisepeak/opencv-m/archive/refs/tags/v5.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/opencv/releases/download/5.0.0/opencv-m-5.0.0.tar.gz", + }, + sha256 = "fb6880777907a86e736e0f4ea81847ad56575dbcce05dd573be808dec7aefa9b", + }, + }, + macosx = { + ["5.0.0"] = { + url = { + GLOBAL = "https://github.com/Sunrisepeak/opencv-m/archive/refs/tags/v5.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/opencv/releases/download/5.0.0/opencv-m-5.0.0.tar.gz", + }, + sha256 = "fb6880777907a86e736e0f4ea81847ad56575dbcce05dd573be808dec7aefa9b", + }, + }, + windows = { + ["5.0.0"] = { + url = { + GLOBAL = "https://github.com/Sunrisepeak/opencv-m/archive/refs/tags/v5.0.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/opencv/releases/download/5.0.0/opencv-m-5.0.0.tar.gz", + }, + sha256 = "fb6880777907a86e736e0f4ea81847ad56575dbcce05dd573be808dec7aefa9b", + }, + }, + }, + + -- (无 `mcpp` 字段 —— 默认查找会命中 /*/mcpp.toml) +} diff --git a/tests/examples/ffmpeg-module/mcpp.toml b/tests/examples/ffmpeg-module/mcpp.toml index c18d4d98..93057d67 100644 --- a/tests/examples/ffmpeg-module/mcpp.toml +++ b/tests/examples/ffmpeg-module/mcpp.toml @@ -8,7 +8,7 @@ # than merging with it, which is what keeps this to ONE project index repo — # two repos pointing at the same tree make every lookup ambiguous. [indices] -default = { path = "../../.." } +ffmpeg = { path = "../../.." } [package] name = "ffmpeg-module-tests" @@ -18,11 +18,11 @@ version = "0.1.0" # GLOBAL published compat index: this member redirects `default`, and a # member-level [indices] replaces the root's `compat` rather than adding to # it. The compat descriptor itself is pre-merge-validated by its own member. -[target.'cfg(linux)'.dependencies] -ffmpeg = "0.0.3" +[target.'cfg(linux)'.dependencies.ffmpeg] +ffmpeg = "8.1.2" -[target.'cfg(macos)'.dependencies] -ffmpeg = "0.0.3" +[target.'cfg(macos)'.dependencies.ffmpeg] +ffmpeg = "8.1.2" -[target.'cfg(windows)'.dependencies] -ffmpeg = "0.0.3" +[target.'cfg(windows)'.dependencies.ffmpeg] +ffmpeg = "8.1.2" diff --git a/tests/examples/grpc-module/mcpp.toml b/tests/examples/grpc-module/mcpp.toml index 8ff7a298..714b9a8d 100644 --- a/tests/examples/grpc-module/mcpp.toml +++ b/tests/examples/grpc-module/mcpp.toml @@ -18,17 +18,17 @@ version = "0.1.0" # dependency has none yet), so on windows this member carries no dependency at # all and the test compiles to a no-op main() — the same shape # tests/examples/openssl uses for the same underlying reason. -[target.'cfg(linux)'.dependencies.mcpplibs] +[target.'cfg(linux)'.dependencies.grpc] grpc = "1.83.0" [target.'cfg(linux)'.build] cxxflags = ["-DHAVE_GRPC=1"] -[target.'cfg(macos)'.dependencies.mcpplibs] +[target.'cfg(macos)'.dependencies.grpc] grpc = "1.83.0" [target.'cfg(macos)'.build] cxxflags = ["-DHAVE_GRPC=1"] [indices] -default = { path = "../../.." } +grpc = { path = "../../.." } diff --git a/tests/examples/imgui-module/mcpp.toml b/tests/examples/imgui-module/mcpp.toml index d2e3d741..246c4bd3 100644 --- a/tests/examples/imgui-module/mcpp.toml +++ b/tests/examples/imgui-module/mcpp.toml @@ -12,11 +12,11 @@ # than merging with it, which is what keeps this to ONE project index repo — # two repos pointing at the same tree make every lookup ambiguous. [indices] -default = { path = "../../.." } +ocornut = { path = "../../.." } [package] name = "imgui-module-tests" version = "0.1.0" -[target.'cfg(linux)'.dependencies] -imgui = "0.0.1" +[target.'cfg(linux)'.dependencies.ocornut] +imgui = "1.92.8" diff --git a/tests/examples/llamacpp-metal/mcpp.toml b/tests/examples/llamacpp-metal/mcpp.toml index c0cbebf6..32056fb4 100644 --- a/tests/examples/llamacpp-metal/mcpp.toml +++ b/tests/examples/llamacpp-metal/mcpp.toml @@ -1,10 +1,10 @@ # Metal is supported only by the macOS ARM64 leg of the workspace matrix. [indices] -default = { path = "../../.." } +ggml-org = { path = "../../.." } [package] name = "llamacpp-metal-tests" version = "0.1.0" -[target.'cfg(macos)'.dependencies] -llamacpp = { version = "0.1.0", features = ["backend-metal"] } +[target.'cfg(macos)'.dependencies.ggml-org] +llamacpp = { version = "b10069", features = ["backend-metal"] } diff --git a/tests/examples/llamacpp/mcpp.toml b/tests/examples/llamacpp/mcpp.toml index fc7191c0..65ae585f 100644 --- a/tests/examples/llamacpp/mcpp.toml +++ b/tests/examples/llamacpp/mcpp.toml @@ -1,16 +1,16 @@ # Resolve the public default-namespace package from this checkout. [indices] -default = { path = "../../.." } +ggml-org = { path = "../../.." } [package] name = "llamacpp-tests" version = "0.1.0" -[target.'cfg(linux)'.dependencies] -llamacpp = "0.1.0" +[target.'cfg(linux)'.dependencies.ggml-org] +llamacpp = "b10069" -[target.'cfg(macos)'.dependencies] -llamacpp = "0.1.0" +[target.'cfg(macos)'.dependencies.ggml-org] +llamacpp = "b10069" -[target.'cfg(windows)'.dependencies] -llamacpp = "0.1.0" +[target.'cfg(windows)'.dependencies.ggml-org] +llamacpp = "b10069" diff --git a/tests/examples/opencv-module-dnn/mcpp.toml b/tests/examples/opencv-module-dnn/mcpp.toml index 6318ef90..a83cdcb1 100644 --- a/tests/examples/opencv-module-dnn/mcpp.toml +++ b/tests/examples/opencv-module-dnn/mcpp.toml @@ -7,21 +7,21 @@ # than merging with it, which is what keeps this to ONE project index repo — # two repos pointing at the same tree make every lookup ambiguous. [indices] -default = { path = "../../.." } +opencv = { path = "../../.." } [package] name = "opencv-module-dnn-tests" version = "0.1.0" -[target.'cfg(linux)'.dependencies] -opencv = { version = "0.0.10", features = ["dnn"] } +[target.'cfg(linux)'.dependencies.opencv] +opencv = { version = "5.0.0", features = ["dnn"] } # macOS: `import opencv.dnn;` on macOS-arm64 (per-OS NEON dnn payload). -[target.'cfg(macos)'.dependencies] -opencv = { version = "0.0.10", features = ["dnn"] } +[target.'cfg(macos)'.dependencies.opencv] +opencv = { version = "5.0.0", features = ["dnn"] } # windows: `import opencv.dnn;` on windows-x86_64 (fast_gemm backend). -[target.'cfg(windows)'.dependencies] -opencv = { version = "0.0.10", features = ["dnn"] } +[target.'cfg(windows)'.dependencies.opencv] +opencv = { version = "5.0.0", features = ["dnn"] } diff --git a/tests/examples/opencv-module-unifont/mcpp.toml b/tests/examples/opencv-module-unifont/mcpp.toml index fd9d255b..82e25df5 100644 --- a/tests/examples/opencv-module-unifont/mcpp.toml +++ b/tests/examples/opencv-module-unifont/mcpp.toml @@ -6,14 +6,14 @@ # than merging with it, which is what keeps this to ONE project index repo — # two repos pointing at the same tree make every lookup ambiguous. [indices] -default = { path = "../../.." } +opencv = { path = "../../.." } [package] name = "opencv-module-unifont-tests" version = "0.1.0" -[target.'cfg(linux)'.dependencies] -opencv = { version = "0.0.9", features = ["unifont"] } +[target.'cfg(linux)'.dependencies.opencv] +opencv = { version = "5.0.0", features = ["unifont"] } -[target.'cfg(macos)'.dependencies] -opencv = { version = "0.0.9", features = ["unifont"] } +[target.'cfg(macos)'.dependencies.opencv] +opencv = { version = "5.0.0", features = ["unifont"] } diff --git a/tests/examples/opencv-module/mcpp.toml b/tests/examples/opencv-module/mcpp.toml index 6e54173f..1a2b464b 100644 --- a/tests/examples/opencv-module/mcpp.toml +++ b/tests/examples/opencv-module/mcpp.toml @@ -9,7 +9,7 @@ # than merging with it, which is what keeps this to ONE project index repo — # two repos pointing at the same tree make every lookup ambiguous. [indices] -default = { path = "../../.." } +opencv = { path = "../../.." } [package] name = "opencv-module-tests" @@ -20,12 +20,12 @@ version = "0.1.0" # member redirects `default`, and a member-level [indices] replaces the # root's `compat` rather than adding to it. The compat descriptor itself is # pre-merge-validated by its own dedicated member. -[target.'cfg(linux)'.dependencies] -opencv = "0.0.10" +[target.'cfg(linux)'.dependencies.opencv] +opencv = "5.0.0" -[target.'cfg(macos)'.dependencies] -opencv = "0.0.10" +[target.'cfg(macos)'.dependencies.opencv] +opencv = "5.0.0" # windows: import opencv.cv on windows-x86_64 (clang-cl; module tarball OS-neutral). -[target.'cfg(windows)'.dependencies] -opencv = "0.0.10" +[target.'cfg(windows)'.dependencies.opencv] +opencv = "5.0.0"