xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. package("libxml2")
  2. set_homepage("http://xmlsoft.org/")
  3. set_description("The XML C parser and toolkit of Gnome.")
  4. set_urls("https://github.com/GNOME/libxml2/archive/$(version).zip", {excludes = {"*/doc/*", "*/result/*", "*/test/*"}})
  5. add_versions("v2.9.8", "c87793e45e66a7aa19200f861873f75195065de786a21c1b469bdb7bfc1230fb")
  6. add_versions("v2.9.7", "31dd4c0e10fa625b47e27fd6a5295d246c883f214da947b9a4a9e13733905ed9")
  7. on_build("windows", function (package)
  8. os.cd("win32")
  9. os.vrun("cscript configure.js iso8859x=yes iconv=no compiler=msvc cruntime=/MT debug=%s prefix=\"%s\"", package:debug() and "yes" or "no", package:installdir())
  10. os.vrun("nmake /f Makefile.msvc")
  11. end)
  12. on_install("windows", function (package)
  13. os.cd("win32")
  14. os.vrun("nmake /f Makefile.msvc install")
  15. package:addvar("includedirs", "include/libxml2")
  16. package:addvar("links", "libxml2")
  17. end)
  18. on_build("macosx", "linux", function (package)
  19. import("package.builder.autoconf").build(package)
  20. end)
  21. on_install("macosx", "linux", function (package)
  22. import("package.builder.autoconf").install(package)
  23. package:addvar("includedirs", "include/libxml2")
  24. end)