Browse Source

update libmpdclient package (#404)

* update libmpdclient package to copy the generated version.h to the include dir while removing the version.h.in file as well

* make sure libmpdclient is a shared lib

* now libmpdclient has a choice between shared and static
Ashley 4 years ago
parent
commit
ee232186b0
1 changed files with 5 additions and 1 deletions
  1. 5 1
      packages/l/libmpdclient/xmake.lua

+ 5 - 1
packages/l/libmpdclient/xmake.lua

@@ -6,8 +6,12 @@ package("libmpdclient")
     add_deps("meson", "ninja")
 
     on_install("linux", function (package)
-        import("package.tools.meson").install(package)
+        local configs = {}
+        table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
+        import("package.tools.meson").install(package, configs)
         os.cp("include", package:installdir())
+        os.cp("build_*/version.h", package:installdir() .. "/include/mpd")
+        os.rm(package:installdir() .. "/include/mpd/version.h.in")
     end)
 
     on_test(function (package)