Skip to content

Commit fac379b

Browse files
committed
mcpplibs.mwrap.sdl3: the relocated info template carries the wrapper's and SDL's notices byte for byte (check_installed_template --deploy)
1 parent b291dff commit fac379b

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

‎.github/workflows/validate.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,10 +1633,10 @@ jobs:
16331633
shell: bash
16341634
run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.freetype@2.13.3 --deploy
16351635

1636-
- name: Installed SDL3 wrapper archive and actual default info template
1636+
- name: Installed SDL3 wrapper archive, actual default info template and its relocated notices
16371637
if: contains(format(' {0} ', env.MEMBERS), ' sdl3-headless ') && matrix.toolchain == 'default'
16381638
shell: bash
1639-
run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.sdl3@3.4.18
1639+
run: python3 tests/mwrap/check_installed_template.py --mcpp "$MCPP" --package mcpplibs.mwrap.sdl3@3.4.18 --deploy
16401640

16411641
- name: Installed Godot wrapper archive and actual standalone math template
16421642
if: contains(format(' {0} ', env.MEMBERS), ' godot-math ') && matrix.toolchain == 'default'

‎tests/mwrap/check_installed_template.py‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,24 @@ def main():
186186
notice = (roots[0] / "NOTICE").read_bytes()
187187
assert b"mcpp-community" in notice and b"The FreeType Project" in notice
188188
print(f"Verified {len(declared)} byte-identical wrapper/FreeType license files", flush=True)
189+
elif identity == "mcpplibs.mwrap.sdl3":
190+
# SDL is zlib-licensed and linked statically: its license and
191+
# README travel with the program, beside the wrapper's.
192+
sources = [path for store in (home / "xpkgs", home / "registry/data/xpkgs")
193+
for path in store.glob(f"mcpplibs.mwrap-x-sdl3/{version}/*/src/sdl3.cppm")]
194+
assert len(sources) == 1, sources
195+
source = sources[0].parent.parent
196+
declared = tomllib.loads((source / "mcpp.toml").read_text(encoding="utf-8"))["runtime"]["deploy"]
197+
roots = list(relocated.rglob("licenses/sdl3"))
198+
assert len(roots) == 1, f"Missing SDL runtime license tree: {roots}"
199+
for entry in declared:
200+
notice = source / entry["from"]
201+
copied = roots[0].parent.parent / entry["to"] / notice.name
202+
assert copied.is_file() and copied.read_bytes() == notice.read_bytes(), copied
203+
assert b"Sam Lantinga" in (roots[0] / "upstream/sdl3/LICENSE.txt").read_bytes()
204+
assert b"Apache License" in (roots[0] / "LICENSE").read_bytes()
205+
assert b"mcpp-community" in (roots[0] / "NOTICE").read_bytes()
206+
print(f"Verified {len(declared)} byte-identical wrapper/SDL license files", flush=True)
189207
else:
190208
raise ValueError(f"No deployment acceptance contract for {identity}")
191209
runtime_env = {key: value for key, value in os.environ.items()

0 commit comments

Comments
 (0)