xmake.lua 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. package("theora")
  2. set_homepage("https://theora.org/")
  3. set_description("Reference implementation of the Theora video compression format.")
  4. set_license("BSD-3-Clause")
  5. add_urls("https://gitlab.xiph.org/xiph/theora.git",
  6. "https://gitlab.xiph.org/xiph/theora/-/archive/v$(version)/theora-$(version).tar.gz",
  7. "https://github.com/xiph/theora.git")
  8. add_versions("v1.0", "bfaaa9dc04b57b44a3152c2132372c72a20d69e5fc6c9cc8f651cc1bc2434006")
  9. add_versions("v1.1.0", "726e6e157f711011f7377773ce5ee233f7b73a425bf4ad192e4f8a8a71cf21d6")
  10. add_versions("v1.1.1", "316ab9438310cf65c38aa7f5e25986b9d27e9aec771668260c733817ecf26dff")
  11. add_deps("libogg")
  12. if is_plat("wasm") then
  13. add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
  14. end
  15. on_install(function (package)
  16. os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
  17. local configs = {}
  18. if package:config("shared") then
  19. configs.kind = "shared"
  20. end
  21. import("package.tools.xmake").install(package, configs)
  22. end)
  23. on_test(function (package)
  24. assert(package:has_cfuncs("theora_encode_init", {includes = "theora/theora.h"}))
  25. end)