2
0

xmake.lua 1.1 KB

123456789101112131415161718192021222324252627
  1. package("libparserutils")
  2. set_homepage("https://www.netsurf-browser.org/projects/libparserutils")
  3. set_description("LibParserUtils is a library for building efficient parsers")
  4. set_license("MIT")
  5. set_urls("https://source.netsurf-browser.org/libparserutils.git/snapshot/libparserutils-release/$(version).tar.bz2",
  6. "https://git.netsurf-browser.org/libparserutils.git")
  7. add_versions("0.2.5", "816f0cb3281c6f6a6cc974ba00c3975fe91ab1425125aa9af64903065d2a36ec")
  8. add_patches("0.2.5", "patches/0.2.5/uninitialised-variable.patch", "1f9f6b7e0444f1bcb4e13684cc5e3660d33ab30db5e7d995e7644bc8b3fda3ff")
  9. on_load(function (package)
  10. if is_subhost("windows") and not package:is_precompiled() then
  11. package:add("deps", "strawberry-perl")
  12. end
  13. end)
  14. on_install(function (package)
  15. os.cd(package:version_str())
  16. os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
  17. import("package.tools.xmake").install(package)
  18. end)
  19. on_test(function (package)
  20. assert(package:has_cfuncs("parserutils_error_to_string", {includes = "parserutils/parserutils.h"}))
  21. end)