diff --git a/packages/f/fribidi/xmake.lua b/packages/f/fribidi/xmake.lua index 0dfdb84c4cf..15c951cfee8 100644 --- a/packages/f/fribidi/xmake.lua +++ b/packages/f/fribidi/xmake.lua @@ -20,6 +20,7 @@ package("fribidi") add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) end + add_includedirs("include", "include/fribidi") on_load("windows", function (package) if not package:config("shared") then package:add("defines", "FRIBIDI_LIB_STATIC") diff --git a/packages/l/libass/xmake.lua b/packages/l/libass/xmake.lua new file mode 100644 index 00000000000..f7ca6cbf386 --- /dev/null +++ b/packages/l/libass/xmake.lua @@ -0,0 +1,30 @@ +package("libass") + set_homepage("https://github.com/libass/libass") + set_description("libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format.") + + add_urls("https://github.com/libass/libass/-/archive/$(version).tar.gz", + "https://github.com/libass/libass.git") + + add_versions("0.17.1", "5ba42655d7e8c5e87bba3ffc8a2b1bc19c29904240126bb0d4b924f39429219f") + + add_deps("autoconf", "automake", "libtool", "fribidi", "freetype", "harfbuzz") + + if is_plat("wasm") then + add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) + end + + on_install(function (package) + local configs = {"--disable-require-system-font-provider"} + table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) + if package:is_debug() then + table.insert(configs, "--enable-debug") + end + if package:is_plat("wasm") then + table.join2(configs, {"--host=i686-gnu", "--disable-asm", "--disable-fontconfig"}) + end + import("package.tools.autoconf").install(package, configs) + end) + + on_test(function (package) + assert(package:has_cfuncs("foo", {includes = "foo.h"})) + end)