Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
fdintino committed Sep 24, 2023
1 parent 499fbf3 commit 3802d9f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion depends/install_libavif.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ cmake .. \
-DCMAKE_BUILD_TYPE=Release \
"${LIBAVIF_CMAKE_FLAGS[@]}"
make
sudo make install
make install || sudo make install
popd

popd
22 changes: 16 additions & 6 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,21 +370,29 @@ def cmd_msbuild(
],
"bins": [r"*.dll"],
},
"rav1e": {
"url": "https://github.com/xiph/rav1e/releases/download/v0.6.6/rav1e-0.6.6-windows-msvc-generic.zip",
"filename": "rav1e-0.6.6-windows-msvc-generic.zip",
"dir": "rav1e-windows-msvc-sdk",
"license": [],
"build": [],
"libs": [r"lib\*.lib"],
"headers": [r"include"],
},
"libavif": {
"url": "https://github.com/AOMediaCodec/libavif/archive/v1.0.1.zip",
"filename": "libavif-1.0.1.zip",
"dir": "libavif-1.0.1",
"license": "LICENSE",
"build": [
cmd_cd("ext"),
cmd_rmdir("aom"),
'cmd.exe /c "aom.cmd"',
cmd_rmdir("dav1d"),
'cmd.exe /c "dav1d.cmd"',
cmd_cd(".."),
*cmds_cmake(
"avif",
"-DBUILD_SHARED_LIBS=OFF",
"-DAVIF_CODEC_RAV1E=ON",
"-DAVIF_CODEC_AOM=ON",
"-DAVIF_LOCAL_AOM=ON",
"-DAVIF_CODEC_DAV1D=ON",
Expand All @@ -394,6 +402,7 @@ def cmd_msbuild(
cmd_lib_combine(
r"avif_combined.lib",
r"avif.lib",
r"{lib_dir}\rav1e.lib",
r"ext\aom\build.libavif\aom.lib",
r"ext\dav1d\build\src\libdav1d.a",
),
Expand Down Expand Up @@ -578,10 +587,11 @@ def build_dep(name: str) -> str:
if "license_pattern" in dep:
match = re.search(dep["license_pattern"], license_text, re.DOTALL)
license_text = "\n".join(match.groups())
assert len(license_text) > 50
with open(os.path.join(license_dir, f"{dir}.txt"), "w") as f:
print(f"Writing license {dir}.txt")
f.write(license_text)
if licenses:
assert len(license_text) > 50
with open(os.path.join(license_dir, f"{dir}.txt"), "w") as f:
print(f"Writing license {dir}.txt")
f.write(license_text)

for patch_file, patch_list in dep.get("patch", {}).items():
patch_file = os.path.join(sources_dir, dir, patch_file.format(**prefs))
Expand Down

0 comments on commit 3802d9f

Please sign in to comment.