xmake.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package("libhubbub")
  2. set_homepage("https://www.netsurf-browser.org/projects/libhubbub")
  3. set_description("Hubbub is an HTML5 compliant parsing library")
  4. set_license("MIT")
  5. set_urls("https://source.netsurf-browser.org/libhubbub.git/snapshot/libhubbub-release/$(version).tar.bz2",
  6. "https://git.netsurf-browser.org/libhubbub.git")
  7. add_versions("0.3.8", "570f2aef99071e0c24d16444b74884d611f46b264bbfb6e314039c9786e87160")
  8. add_patches("0.3.8", "patches/0.3.8/treebuilder.patch", "c966decf79bcd0bbca4fe6c4ccdba776b9b9b3551a5956a894f14a55ec21eb72")
  9. add_deps("libparserutils")
  10. if is_plat("windows") then
  11. add_deps("strings_h", {private = true})
  12. end
  13. on_load(function (package)
  14. if not package:is_precompiled() then
  15. package:add("deps", "gperf")
  16. if is_subhost("windows") then
  17. package:add("deps", "strawberry-perl")
  18. end
  19. end
  20. end)
  21. on_install(function (package)
  22. os.cd(package:version_str())
  23. os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
  24. import("package.tools.xmake").install(package)
  25. end)
  26. on_test(function (package)
  27. assert(package:has_cfuncs("hubbub_error_to_string", {includes = "hubbub/hubbub.h"}))
  28. end)