|
@@ -6,27 +6,37 @@ package("libpq")
|
|
add_urls("https://github.com/postgres/postgres/archive/refs/tags/REL_$(version).tar.gz", {alias = "github", version = function (version)
|
|
add_urls("https://github.com/postgres/postgres/archive/refs/tags/REL_$(version).tar.gz", {alias = "github", version = function (version)
|
|
return version:gsub("%.", "_")
|
|
return version:gsub("%.", "_")
|
|
end})
|
|
end})
|
|
|
|
+
|
|
|
|
+ add_versions("17.5", "476e0522af981352177c12a05295b08d2f49b35c667aecb5bae1af4807999467")
|
|
add_versions("14.1", "14809c9f669851ab89b344a50219e85b77f3e93d9df9e255b9781d8d60fcfbc9")
|
|
add_versions("14.1", "14809c9f669851ab89b344a50219e85b77f3e93d9df9e255b9781d8d60fcfbc9")
|
|
|
|
|
|
- add_deps("krb5", "openssl", "zlib")
|
|
|
|
- if is_plat("linux") then
|
|
|
|
- add_deps("flex", "bison")
|
|
|
|
- end
|
|
|
|
-
|
|
|
|
- on_install("macosx", "linux", function (package)
|
|
|
|
- local configs = {"--with-openssl", "--without-readline"}
|
|
|
|
- table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
|
|
|
|
- table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
|
|
|
|
- if package:is_plat("macosx") then
|
|
|
|
- table.insert(configs, "--with-gssapi")
|
|
|
|
|
|
+ add_deps("pkgconf", "meson", "ninja", "openssl", "zlib", "bison")
|
|
|
|
+
|
|
|
|
+ on_load(function (package)
|
|
|
|
+ if package:is_plat("macosx", "windows") then
|
|
|
|
+ package:add("deps", "libintl")
|
|
end
|
|
end
|
|
- if package:debug() then
|
|
|
|
- table.insert(configs, "--enable-debug")
|
|
|
|
|
|
+
|
|
|
|
+ if package:is_plat("macosx", "linux", "bsd", "windows") and package:is_arch("i386") ~= false then
|
|
|
|
+ package:add("deps", "flex")
|
|
|
|
+ end
|
|
|
|
+
|
|
|
|
+ if package:is_plat("bsd") then
|
|
|
|
+ package:add("deps", "libedit")
|
|
end
|
|
end
|
|
- if package:config("pic") ~= false then
|
|
|
|
- table.insert(configs, "--with-pic")
|
|
|
|
|
|
+ end)
|
|
|
|
+
|
|
|
|
+ on_install("windows|!arm64 or macosx|!arm64 or linux|!arm64 or bsd|!arm64", function (package)
|
|
|
|
+ local configs = {"-Dssl=openssl", "-Dzlib=enabled"}
|
|
|
|
+
|
|
|
|
+ table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
|
|
|
|
+
|
|
|
|
+ if package:is_plat("bsd") then
|
|
|
|
+ table.insert(configs, "-Dreadline=disabled")
|
|
|
|
+ table.insert(configs, "-Dlibedit_preferred=true")
|
|
end
|
|
end
|
|
- import("package.tools.autoconf").install(package, configs, {packagedeps = {"openssl", "zlib"}})
|
|
|
|
|
|
+
|
|
|
|
+ import("package.tools.meson").install(package, configs)
|
|
end)
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|
|
on_test(function (package)
|