diff --git a/.github/generate-sbom.py b/.github/generate-sbom.py index ff51183dae6..f38f99c9606 100755 --- a/.github/generate-sbom.py +++ b/.github/generate-sbom.py @@ -326,6 +326,45 @@ def generate(version: str) -> dict: "scope": "optional", "description": "AVIF codec (optional, used by PIL._avif).", "licenses": [{"license": {"id": "BSD-2-Clause"}}], + "pedigree": { + "ancestors": [ + { + "bom-ref": "pkg:github/aomediacodec/libavif@1.4.2#upstream", + "type": "library", + "name": "libavif", + "version": "1.4.2", + "purl": "pkg:github/aomediacodec/libavif@1.4.2", + "externalReferences": [ + { + "type": "distribution", + "url": "https://github.com/AOMediaCodec/libavif/releases/tag/v1.4.2", + } + ], + } + ], + "patches": [ + { + "type": "unofficial", + "diff": { + "text": { + # partially apply https://github.com/AOMediaCodec/libavif/pull/3460/changes/c81f7ecfa0f13786b15336961686300781144beb + "content": base64.b64encode( + ( + Path(__file__).parent.parent + / "patches" + / "libavif.patch" + ).read_bytes() + ).decode(), + "encoding": "base64", + } + }, + }, + ], + "notes": ( + "Vendored from upstream libavif 1.4.2, " + "patched to use dav1d 1.5.5 on Windows." + ), + }, "externalReferences": [ {"type": "website", "url": "https://github.com/AOMediaCodec/libavif"}, { diff --git a/patches/libavif.patch b/patches/libavif.patch new file mode 100644 index 00000000000..2b3af29a8e1 --- /dev/null +++ b/patches/libavif.patch @@ -0,0 +1,10 @@ +diff --git a/cmake/Modules/LocalDav1d.cmake b/cmake/Modules/LocalDav1d.cmake +index b03bab8..8245750 100644 +--- a/cmake/Modules/LocalDav1d.cmake ++++ b/cmake/Modules/LocalDav1d.cmake +@@ -1,4 +1,4 @@ +-set(AVIF_DAV1D_TAG "1.5.3") ++set(AVIF_DAV1D_TAG "1.5.5") + + function(avif_build_local_dav1d) + set(download_step_args)