xmake.lua 1.0 KB

1234567891011121314151617181920212223242526272829
  1. package("eudev")
  2. set_homepage("https://dev.gentoo.org/~blueness/eudev/")
  3. set_description("A fork of systemd with the aim of isolating udev from any particular flavor of system initialization.")
  4. add_urls("https://dev.gentoo.org/~blueness/eudev/eudev-$(version).tar.gz")
  5. add_versions("3.2.9", "89618619084a19e1451d373c43f141b469c9fd09767973d73dd268b92074d4fc")
  6. if is_plat("linux") then
  7. add_deps("autoconf", "automake", "libtool", "pkg-config", "gperf")
  8. end
  9. on_install("linux", function (package)
  10. local configs = {}
  11. if package:config("shared") then
  12. table.insert(configs, "--enable-shared=yes")
  13. else
  14. table.insert(configs, "--enable-shared=no")
  15. end
  16. if package:config("pic") ~= false then
  17. table.insert(configs, "--with-pic")
  18. end
  19. import("package.tools.autoconf").install(package, configs)
  20. end)
  21. on_test(function (package)
  22. assert(package:has_cfuncs("udev_new", {includes = "libudev.h"}))
  23. end)