xmake.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. "https://mirror.umd.edu/gentoo/distfiles/2d/pkgconf-$(version).tar.xz",
  7. "https://distfiles.ariadne.space/pkgconf/pkgconf-$(version).tar.xz", {alias = "tarball"})
  8. add_urls("https://github.com/pkgconf/pkgconf.git", {alias = "git"})
  9. add_versions("tarball:1.7.4", "d73f32c248a4591139a6b17777c80d4deab6b414ec2b3d21d0a24be348c476ab")
  10. add_versions("tarball:1.8.0", "ef9c7e61822b7cb8356e6e9e1dca58d9556f3200d78acab35e4347e9d4c2bbaf")
  11. add_versions("tarball:1.9.3", "5fb355b487d54fb6d341e4f18d4e2f7e813a6622cf03a9e87affa6a40565699d")
  12. add_versions("tarball:1.9.4", "daccf1bbe5a30d149b556c7d2ffffeafd76d7b514e249271abdd501533c1d8ae")
  13. add_versions("tarball:1.9.5", "1ac1656debb27497563036f7bffc281490f83f9b8457c0d60bcfb638fb6b6171")
  14. add_versions("tarball:2.0.3", "cabdf3c474529854f7ccce8573c5ac68ad34a7e621037535cbc3981f6b23836c")
  15. add_versions("tarball:2.4.3", "51203d99ed573fa7344bf07ca626f10c7cc094e0846ac4aa0023bd0c83c25a41")
  16. add_versions("tarball:2.5.1", "cd05c9589b9f86ecf044c10a2269822bc9eb001eced2582cfffd658b0a50c243")
  17. add_versions("git:1.7.4", "pkgconf-1.7.4")
  18. add_versions("git:1.8.0", "pkgconf-1.8.0")
  19. add_versions("git:1.9.3", "pkgconf-1.9.3")
  20. add_versions("git:1.9.4", "pkgconf-1.9.4")
  21. add_versions("git:1.9.5", "pkgconf-1.9.5")
  22. add_versions("git:2.0.3", "pkgconf-2.0.3")
  23. add_versions("git:2.4.3", "pkgconf-2.4.3")
  24. add_versions("git:2.5.1", "pkgconf-2.5.1")
  25. on_load(function (package)
  26. if not package:is_precompiled() and is_host("windows") then
  27. package:add("deps", "meson", "ninja")
  28. end
  29. end)
  30. on_install("@macosx", "@linux", "@bsd", "@msys", "@cygwin", function(package)
  31. import("package.tools.autoconf").install(package)
  32. end)
  33. on_install("@windows", function(package)
  34. import("package.tools.meson").install(package, {"-Dtests=disabled"})
  35. local bindir = package:installdir("bin")
  36. os.cp(path.join(bindir, "pkgconf.exe"), path.join(bindir, "pkg-config.exe"))
  37. end)
  38. on_test(function (package)
  39. os.vrun("pkgconf --version")
  40. if is_subhost("windows") then
  41. os.vrun("pkg-config --version")
  42. end
  43. end)