xmake.lua 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. package("pkgconf")
  2. set_kind("binary")
  3. set_homepage("http://pkgconf.org")
  4. set_description("A program which helps to configure compiler and linker flags for development frameworks.")
  5. add_urls("https://distfiles.dereferenced.org/pkgconf/pkgconf-$(version).tar.xz")
  6. add_versions("1.7.4", "d73f32c248a4591139a6b17777c80d4deab6b414ec2b3d21d0a24be348c476ab")
  7. add_versions("1.8.0", "ef9c7e61822b7cb8356e6e9e1dca58d9556f3200d78acab35e4347e9d4c2bbaf")
  8. add_versions("1.9.3", "5fb355b487d54fb6d341e4f18d4e2f7e813a6622cf03a9e87affa6a40565699d")
  9. on_load(function (package)
  10. if not package:is_precompiled() and is_host("windows") then
  11. package:add("deps", "meson", "ninja")
  12. end
  13. end)
  14. on_install("@macosx", "@linux", "@bsd", function(package)
  15. import("package.tools.autoconf").install(package)
  16. end)
  17. on_install("@windows", function(package)
  18. import("package.tools.meson").install(package, {"-Dtests=false"})
  19. local bindir = package:installdir("bin")
  20. os.cp(path.join(bindir, "pkgconf.exe"), path.join(bindir, "pkg-config.exe"))
  21. end)
  22. on_test(function (package)
  23. os.vrun("pkgconf --version")
  24. if is_subhost("windows") then
  25. os.vrun("pkg-config --version")
  26. end
  27. end)