|
@@ -33,6 +33,18 @@ package("vmaf")
|
|
|
|
|
|
add_deps("meson", "ninja")
|
|
|
|
|
|
+ if on_check then
|
|
|
+ on_check("android", function (package)
|
|
|
+ local ndk = package:toolchain("ndk")
|
|
|
+ local ndkver = ndk:config("ndkver")
|
|
|
+ assert(ndkver and tonumber(ndkver) > 22, "package(vmaf) require ndk version > 22")
|
|
|
+ if package:is_arch("armeabi-v7a") then
|
|
|
+ local ndk_sdkver = ndk:config("ndk_sdkver")
|
|
|
+ assert(ndk_sdkver and tonumber(ndk_sdkver) > 21, "package(vmaf/armeabi-v7a) require ndk api level > 21")
|
|
|
+ end
|
|
|
+ end)
|
|
|
+ end
|
|
|
+
|
|
|
on_load(function (package)
|
|
|
if package:config("asm") or package:config("avx512") then
|
|
|
package:add("deps", "nasm")
|
|
@@ -47,7 +59,12 @@ package("vmaf")
|
|
|
end
|
|
|
end)
|
|
|
|
|
|
- on_install("!windows and !android", function (package)
|
|
|
+ on_install("!windows", function (package)
|
|
|
+ os.cd("libvmaf")
|
|
|
+ if not package:config("tools") then
|
|
|
+ io.replace("meson.build", [[subdir('tools')]], "", {plain = true})
|
|
|
+ end
|
|
|
+
|
|
|
local configs = {"-Denable_tests=false", "-Denable_docs=false"}
|
|
|
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
|
|
|
|
|
@@ -57,11 +74,6 @@ package("vmaf")
|
|
|
table.insert(configs, "-Denable_float=" .. (package:config("float") and "true" or "false"))
|
|
|
table.insert(configs, "-Denable_cuda=" .. (package:config("cuda") and "true" or "false"))
|
|
|
table.insert(configs, "-Denable_nvtx=" .. (package:config("nvtx") and "true" or "false"))
|
|
|
-
|
|
|
- os.cd("libvmaf")
|
|
|
- if not package:config("tools") then
|
|
|
- io.replace("meson.build", [[subdir('tools')]], "", {plain = true})
|
|
|
- end
|
|
|
import("package.tools.meson").install(package, configs)
|
|
|
end)
|
|
|
|