xmake.lua 1.2 KB

123456789101112131415161718192021222324252627282930
  1. package("atk")
  2. set_homepage("https://gitlab.gnome.org/GNOME/atk")
  3. set_description("ATK - The Accessibility Toolkit")
  4. set_license("LGPL-2.0")
  5. add_urls("https://download.gnome.org/sources/atk/$(version).tar.xz", {version = function (version)
  6. return format("%d.%d/atk-%s", version:major(), version:minor(), version)
  7. end})
  8. add_versions("2.36.0", "fb76247e369402be23f1f5c65d38a9639c1164d934e40f6a9cf3c9e96b652788")
  9. if is_plat("mingw") and is_subhost("msys") then
  10. add_extsources("pacman::atk")
  11. elseif is_plat("linux") then
  12. add_extsources("pacman::atk", "apt::libatk1.0-dev")
  13. elseif is_plat("macosx")then
  14. add_extsources("brew::atk")
  15. end
  16. add_deps("meson", "ninja", "glib", "pkg-config")
  17. add_includedirs("include/atk-1.0")
  18. on_install("linux", function (package)
  19. local configs = {"-Dintrospection=false"}
  20. table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
  21. import("package.tools.meson").install(package, configs)
  22. end)
  23. on_test(function (package)
  24. assert(package:has_cfuncs("atk_object_initialize", {includes = "atk/atk.h"}))
  25. end)