|
| 1 | +-- Form A descriptor: the godot-cpp module package ships its own mcpp.toml. |
| 2 | +-- mcpp's default lookup finds <verdir>/*/mcpp.toml inside the GitHub source |
| 3 | +-- tarball wrap. |
| 4 | +-- |
| 5 | +-- The package is the thin C++23 module layer over godot-cpp's unchanged C++ |
| 6 | +-- API: `import godot_cpp;` re-exports the whole public `godot` namespace, so |
| 7 | +-- code that used to open with a stack of `#include <godot_cpp/...>` opens with |
| 8 | +-- one import and is otherwise the same. godot-cpp's sources and its |
| 9 | +-- pre-generated GDExtension bindings arrive through the package's own |
| 10 | +-- compat.godot-cpp dependency (1022-TU source build -- see |
| 11 | +-- pkgs/c/compat.godot-cpp.lua). |
| 12 | +-- |
| 13 | +-- Module name: ONE segment, `godot_cpp`, matching the library and the |
| 14 | +-- `#include <godot_cpp/...>` root users already type. The dotted spelling is |
| 15 | +-- reserved here for packages that expose several submodules (opencv.cv, |
| 16 | +-- ffmpeg.av); this one has a single interface unit. |
| 17 | +-- |
| 18 | +-- What the module cannot carry: MACROS. GDCLASS, GDREGISTER_CLASS, |
| 19 | +-- GDVIRTUAL_*, D_METHOD, memnew/memdelete and the ERR_* family are |
| 20 | +-- preprocessor constructs, and GDExtension code is written in them. The |
| 21 | +-- package ships `<godot-cpp-m/macros.h>` for exactly that, to be included |
| 22 | +-- next to the import; godot-cpp's headers sit in the module's global module |
| 23 | +-- fragment, so the two spellings denote the same entities and mixing them is |
| 24 | +-- well-formed. The package's own tests cover both shapes. |
| 25 | +-- |
| 26 | +-- Also not re-exported (upstream's shape, not a wrapper choice): the internal |
| 27 | +-- container templates HashMap/HashSet and their default hashers. Their inline |
| 28 | +-- bodies reach `hash_murmur3_one_float/double`, which are `static` AND declare |
| 29 | +-- an unnamed union -- and exposing a TU-local TYPE from a module interface is |
| 30 | +-- a hard error, not the -Wexpose-global-module-tu-local warning. Extension |
| 31 | +-- code uses Dictionary/Array/TypedArray; the headers still have the rest. |
| 32 | +-- |
| 33 | +-- The version TRACKS UPSTREAM rather than counting the wrapper's own |
| 34 | +-- iterations: 4.5.0 is the godot-cpp release it wraps, and the version |
| 35 | +-- compat.godot-cpp carries, so the version tells a consumer the one thing |
| 36 | +-- that matters -- which Godot they are targeting. |
| 37 | +-- |
| 38 | +-- The name is `godot-cpp-m`, NOT `godot-cpp`, and that is load-bearing rather |
| 39 | +-- than cosmetic. This package and its own compat.godot-cpp dependency are |
| 40 | +-- always resolved together, and mcpp's installed-package lookup matches on |
| 41 | +-- (name, version) WITHOUT the namespace: with both named `godot-cpp` at the |
| 42 | +-- same version -- which "the version tracks upstream" guarantees -- resolving |
| 43 | +-- this one lands on compat's unpacked directory and fails with "no mcpp.toml |
| 44 | +-- at <verdir>/*/mcpp.toml". Reproducible with a namespace unrelated to either |
| 45 | +-- package: leave a single <anything>-x-godot-cpp/4.5.0 in the store and the |
| 46 | +-- resolution goes to it; remove it and the same descriptor installs fine. The |
| 47 | +-- store DIRECTORIES are namespaced (ns-x-name) -- the lookup is not. Distinct |
| 48 | +-- short names sidestep it, keep the version tracking upstream, and `-m` |
| 49 | +-- matches the repository name. `import godot_cpp;` is unaffected. |
| 50 | +-- |
| 51 | +-- Versions track upstream godot-cpp one for one, as compat.godot-cpp's do: |
| 52 | +-- 10.0.0-rc1 binds Godot 4.6, 4.5.0 binds Godot 4.5. |
| 53 | +-- |
| 54 | +-- 10.0.0-rc1 additionally ships a generated `hashfuncs.hpp` shim -- upstream's |
| 55 | +-- header with `static` dropped from two functions -- without which GCC refuses |
| 56 | +-- the module interface outright ("exposes TU-local entity 'union <unnamed>'", |
| 57 | +-- a hard error no -W flag reaches). It is scoped to the package's own include |
| 58 | +-- path, so compat.godot-cpp still compiles upstream's copy untouched. See the |
| 59 | +-- package README. |
| 60 | +-- |
| 61 | +-- CN tags carry an `-m` suffix: the gitcode mirror repo is shared with the |
| 62 | +-- compat.godot-cpp archives, which already hold the bare-version tags. |
| 63 | +-- |
| 64 | +-- Three platforms, one OS-neutral tarball: godot-cpp is portable C++ and |
| 65 | +-- compat.godot-cpp covers all three. |
| 66 | +package = { |
| 67 | + spec = "1", |
| 68 | + name = "godot-cpp-m", |
| 69 | + namespace = "godotengine", |
| 70 | + description = "C++23 module package for godot-cpp (import godot_cpp) — Godot GDExtension API, C++ API unchanged", |
| 71 | + licenses = {"MIT"}, -- module layer; upstream godot-cpp is MIT as well |
| 72 | + repo = "https://github.com/mcpplibs/godot-cpp-m", |
| 73 | + type = "package", |
| 74 | + |
| 75 | + xpm = { |
| 76 | + linux = { |
| 77 | + ["10.0.0-rc1"] = { |
| 78 | + url = { |
| 79 | + GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v10.0.0-rc1.tar.gz", |
| 80 | + CN = "https://gitcode.com/mcpp-res/godot-cpp/releases/download/v10.0.0-rc1-m/godot-cpp-m-10.0.0-rc1.tar.gz", |
| 81 | + }, |
| 82 | + sha256 = "895975f32456d821b1297dbd5298ea3e9b925b00557a187927f3dacf2f035220", |
| 83 | + }, |
| 84 | + ["4.5.0"] = { |
| 85 | + url = { |
| 86 | + GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v4.5.0.tar.gz", |
| 87 | + CN = "https://gitcode.com/mcpp-res/godot-cpp/releases/download/v4.5.0-m/godot-cpp-m-4.5.0.tar.gz", |
| 88 | + }, |
| 89 | + sha256 = "d91794f46ec4a74c1f8c61c894efdecceaf54feff103b9b139fd6a8f16e43051", |
| 90 | + }, |
| 91 | + }, |
| 92 | + macosx = { |
| 93 | + ["10.0.0-rc1"] = { |
| 94 | + url = { |
| 95 | + GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v10.0.0-rc1.tar.gz", |
| 96 | + CN = "https://gitcode.com/mcpp-res/godot-cpp/releases/download/v10.0.0-rc1-m/godot-cpp-m-10.0.0-rc1.tar.gz", |
| 97 | + }, |
| 98 | + sha256 = "895975f32456d821b1297dbd5298ea3e9b925b00557a187927f3dacf2f035220", |
| 99 | + }, |
| 100 | + ["4.5.0"] = { |
| 101 | + url = { |
| 102 | + GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v4.5.0.tar.gz", |
| 103 | + CN = "https://gitcode.com/mcpp-res/godot-cpp/releases/download/v4.5.0-m/godot-cpp-m-4.5.0.tar.gz", |
| 104 | + }, |
| 105 | + sha256 = "d91794f46ec4a74c1f8c61c894efdecceaf54feff103b9b139fd6a8f16e43051", |
| 106 | + }, |
| 107 | + }, |
| 108 | + windows = { |
| 109 | + ["10.0.0-rc1"] = { |
| 110 | + url = { |
| 111 | + GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v10.0.0-rc1.tar.gz", |
| 112 | + CN = "https://gitcode.com/mcpp-res/godot-cpp/releases/download/v10.0.0-rc1-m/godot-cpp-m-10.0.0-rc1.tar.gz", |
| 113 | + }, |
| 114 | + sha256 = "895975f32456d821b1297dbd5298ea3e9b925b00557a187927f3dacf2f035220", |
| 115 | + }, |
| 116 | + ["4.5.0"] = { |
| 117 | + url = { |
| 118 | + GLOBAL = "https://github.com/mcpplibs/godot-cpp-m/archive/refs/tags/v4.5.0.tar.gz", |
| 119 | + CN = "https://gitcode.com/mcpp-res/godot-cpp/releases/download/v4.5.0-m/godot-cpp-m-4.5.0.tar.gz", |
| 120 | + }, |
| 121 | + sha256 = "d91794f46ec4a74c1f8c61c894efdecceaf54feff103b9b139fd6a8f16e43051", |
| 122 | + }, |
| 123 | + }, |
| 124 | + }, |
| 125 | + |
| 126 | + -- (no `mcpp` field -- default lookup will find <verdir>/*/mcpp.toml) |
| 127 | +} |
0 commit comments