Browse Source

fix(libvpx): fix a typo

冰雪殇璃陌梦 2 năm trước cách đây
mục cha
commit
d5453a9e31
2 tập tin đã thay đổi với 4 bổ sung6 xóa
  1. 3 3
      packages/l/libvpx/utils.lua
  2. 1 3
      packages/l/libvpx/xmake.lua

+ 3 - 3
packages/l/libvpx/utils.lua

@@ -21,8 +21,8 @@ end
 function _join(array, separator)
     local result = ""
     for idx, val in ipairs(array) do
-        rusult = result .. val
-        if not idx == #array then
+        result = result .. val
+        if not (idx == #array) then
             result = result .. separator
         end
     end
@@ -35,7 +35,7 @@ function get_target(package)
 
     local platforms = {}
     for plat in io.readfile("configure"):gmatch("all_platforms=\"%${all_platforms} ([%a%d-_]-)\"") do
-        table.insert(platforms, plat:split("-", {plain = true}):slice(1, 3))
+        table.insert(platforms, table.slice(plat:split("-", {plain = true}), 1, 3))
     end
 
     local arch = package:targetarch()

+ 1 - 3
packages/l/libvpx/xmake.lua

@@ -30,9 +30,7 @@ package("libvpx")
         add_configs("shared",  {description = "Build shared library.", default = false, type = "boolean", readonly = true})
     end
 
-    if is_host("freebsd", "linux", "macosx") then
-        add_deps("which")
-    end
+    add_deps("which", {optional = true})
 
     on_load(function (package)
         if package:is_targetarch("x64", "x86_64") then