Skip to content

Commit

Permalink
feat(fribidi): optimize includes export
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamOfIce committed Jul 28, 2023
1 parent 6424368 commit 502aa9b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/f/fribidi/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
30 changes: 30 additions & 0 deletions packages/l/libass/xmake.lua
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 502aa9b

Please sign in to comment.