diff --git a/packages/f/ffmpeg/xmake.lua b/packages/f/ffmpeg/xmake.lua index db9ac9bde..760d2a226 100644 --- a/packages/f/ffmpeg/xmake.lua +++ b/packages/f/ffmpeg/xmake.lua @@ -12,9 +12,7 @@ package("ffmpeg") add_deps("x264", {optional = true}) add_deps("x265", {optional = true}) - on_load(function (package) - package:addvar("links", "avfilter", "avdevice", "avformat", "avcodec", "swscale", "swresample", "avutil") - end) + add_links("avfilter", "avdevice", "avformat", "avcodec", "swscale", "swresample", "avutil") on_install("linux", "macosx", function (package) local configs = {"--disable-ffmpeg", diff --git a/packages/l/libxml2/xmake.lua b/packages/l/libxml2/xmake.lua index 2d10aafb4..24cda84a4 100644 --- a/packages/l/libxml2/xmake.lua +++ b/packages/l/libxml2/xmake.lua @@ -12,10 +12,8 @@ package("libxml2") add_deps("autoconf", "automake", "libtool", "pkg-config") end - on_load(function (package) - package:addvar("includedirs", "include/libxml2") - package:addvar("links", "xml2") - end) + add_includedirs("include/libxml2") + add_links("xml2") if is_plat("windows") and winos.version():gt("winxp") then on_install("windows", function (package) diff --git a/packages/m/mbedtls/xmake.lua b/packages/m/mbedtls/xmake.lua index f2d12fe39..05565012a 100644 --- a/packages/m/mbedtls/xmake.lua +++ b/packages/m/mbedtls/xmake.lua @@ -12,9 +12,7 @@ package("mbedtls") add_deps("cmake") end - on_load(function (package) - package:addvar("links", "mbedcrypto", "mbedx509", "mbedtls") - end) + add_links("mbedcrypto", "mbedx509", "mbedtls") if is_plat("windows") and winos.version():gt("winxp") then on_install("windows", function (package) diff --git a/packages/n/ncurses/xmake.lua b/packages/n/ncurses/xmake.lua index 1aed216d0..60b47bffb 100644 --- a/packages/n/ncurses/xmake.lua +++ b/packages/n/ncurses/xmake.lua @@ -8,10 +8,8 @@ package("ncurses") "ftp://ftp.gnu.org/gnu/ncurses/ncurses-$(version).tar.gz") add_versions("6.1", "aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17") - on_load(function (package) - package:addvar("includedirs", "include/ncurses", "include") - package:addvar("links", "ncurses", "form", "panel", "menu") - end) + add_includedirs("include/ncurses", "include") + add_links("ncurses", "form", "panel", "menu") on_install("linux", "macosx", function (package) import("package.tools.autoconf").install(package, {"--without-manpages"}) diff --git a/packages/t/tbox/xmake.lua b/packages/t/tbox/xmake.lua index d96efee66..aff96e922 100644 --- a/packages/t/tbox/xmake.lua +++ b/packages/t/tbox/xmake.lua @@ -13,7 +13,7 @@ package("tbox") on_load(function (package) if package:debug() then - package:addvar("defines", "__tb_debug__") + package:add("defines", "__tb_debug__") end end)