Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update winbuild libimagequant to 2.16.0 #5727

Merged
merged 2 commits into from Sep 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 10 additions & 8 deletions winbuild/build_prepare.py
Expand Up @@ -257,24 +257,25 @@ def cmd_msbuild(
"libs": [r"bin\*.lib"],
},
"libimagequant": {
# Merge master into msvc (matches 2.14.1 except for version bump)
"url": "https://github.com/ImageOptim/libimagequant/archive/16adaded22d1f90db5c9154a06d00a8b672ca09a.zip", # noqa: E501
"filename": "libimagequant-16adaded22d1f90db5c9154a06d00a8b672ca09a.zip",
"dir": "libimagequant-16adaded22d1f90db5c9154a06d00a8b672ca09a",
# commit: Merge branch 'master' into msvc (matches 2.16.0 tag)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're using a tag, can we download the actual tag archive instead of a commit hash?

From https://github.com/ImageOptim/libimagequant/releases/tag/2.16.0:

https://github.com/ImageOptim/libimagequant/archive/refs/tags/2.16.0.zip

Copy link
Contributor Author

@nulano nulano Sep 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a commit merging the 2.16.0 tag into the msvc branch, there are a few minor changes still: ImageOptim/libimagequant@2.16.0...f41ee30

"url": "https://github.com/ImageOptim/libimagequant/archive/f41ee301ff3a407b16991af3dbe03910919bbdc3.zip", # noqa: E501
"filename": "libimagequant-f41ee301ff3a407b16991af3dbe03910919bbdc3.zip",
"dir": "libimagequant-f41ee301ff3a407b16991af3dbe03910919bbdc3",
"patch": {
"CMakeLists.txt": {
"add_library": "add_compile_options(-openmp-)\r\nadd_library",
" SHARED": " STATIC",
"if(OPENMP_FOUND)": "if(false)",
"install": "#install",
}
},
"build": [
# lint: do not inline
cmd_cmake(),
cmd_nmake(target="clean"),
cmd_nmake(),
cmd_nmake(target="imagequant_a"),
cmd_copy("imagequant_a.lib", "imagequant.lib"),
],
"headers": [r"*.h"],
"libs": [r"*.lib"],
"libs": [r"imagequant.lib"],
},
"harfbuzz": {
"url": "https://github.com/harfbuzz/harfbuzz/archive/3.0.0.zip",
Expand Down Expand Up @@ -437,6 +438,7 @@ def build_dep(name):
assert patch_from in text
text = text.replace(patch_from, patch_to)
with open(patch_file, "w") as f:
print(f"Patching {patch_file}")
f.write(text)

banner = f"Building {name} ({dir})"
Expand Down