Auto-update libavif to v1.1.0 (#4650)

* Update libavif to v1.1.0

* add deps

* add check

* Update xmake.lua

---------

Co-authored-by: star9029 <hengxings783@gmail.com>
pull/4712/head
ruki 4 months ago committed by GitHub
parent a8f0b7e12b
commit f3254fa166
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 21
      packages/l/libavif/xmake.lua
  2. 2
      packages/l/libyuv/xmake.lua

@ -1,30 +1,39 @@
package("libavif")
set_homepage("https://github.com/AOMediaCodec/libavif")
set_description("libavif - Library for encoding and decoding .avif files")
set_license("BSD-2-Clause")
add_urls("https://github.com/AOMediaCodec/libavif/archive/refs/tags/$(version).tar.gz",
"https://github.com/AOMediaCodec/libavif.git")
add_versions("v1.1.0", "edb31951005d7a143be1724f24825809599a4832073add50eaf987733defb5c8")
add_versions("v1.0.4", "dc56708c83a4b934a8af2b78f67f866ba2fb568605c7cf94312acf51ee57d146")
add_versions("v0.9.1", "8526f3fff34a05a51d7c703cdcf1d0d38c939b5b6dd4bb7d3a3405ddad88186c")
add_configs("dav1d", {description = "Use the dav1d codec for decoding.", default = false, type = "boolean"})
add_deps("cmake")
add_deps("libyuv")
if on_check then
on_check("android", function (package)
local ndk = package:toolchain("ndk"):config("ndkver")
assert(ndk and tonumber(ndk) > 22, "package(libavif): library deps libyuv need ndk version > 22")
end)
end
on_load(function (package)
if package:config("dav1d") then
package:add("deps", "dav1d")
end
end)
on_install("windows", "linux", "macosx", function (package)
on_install("!cross and !wasm", function (package)
local configs = {"-DAVIF_ENABLE_WERROR=OFF", "-DAVIF_BUILD_TESTS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:config("dav1d") then
table.insert(configs, "-DAVIF_CODEC_DAV1D=ON")
end
table.insert(configs, "-DAVIF_CODEC_DAV1D=" .. (package:config("dav1d") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

@ -32,7 +32,7 @@ package("libyuv")
if on_check then
on_check("android", function (package)
local ndk = package:toolchain("ndk"):config("ndkver")
assert(ndk and tonumber(ndk) > 22, "package(libyuv/arm64): need ndk version > 22")
assert(ndk and tonumber(ndk) > 22, "package(libyuv): need ndk version > 22")
end)
end

Loading…
Cancel
Save