@@ -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