xmake.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. package("pycdc")
  2. set_homepage("https://github.com/zrax/pycdc")
  3. set_description("C++ python bytecode disassembler and decompiler")
  4. set_license("GPL-3.0")
  5. add_urls("https://github.com/zrax/pycdc.git")
  6. add_versions("2024.08.12", "dc6ca4ae36128f2674b5b4c9b0ce6fdda97d4df0")
  7. if is_plat("windows") and is_arch("arm.*") then
  8. add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
  9. end
  10. on_install(function (package)
  11. os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
  12. import("package.tools.xmake").install(package)
  13. package:addenv("PATH", "bin")
  14. end)
  15. on_test(function (package)
  16. if not package:is_cross() then
  17. os.run("pycdc --help")
  18. os.run("pycdas --help")
  19. end
  20. assert(package:check_cxxsnippets({test = [[
  21. #include "ASTree.h"
  22. void test() {
  23. PycModule mod;
  24. mod.loadFromFile("");
  25. }
  26. ]]}, {configs = {languages = "c++11"}}))
  27. end)