improve python and xcb (#961)

* add bspwm

* improve xcb

* add version

* improve to find python

* fix xcb

* improve bspwm

* improve bspwm

* remove bspwm
pull/835/head^2
ruki 3 years ago committed by GitHub
parent 981e0a4d82
commit ea2e194fd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      packages/l/libxcb/xmake.lua
  2. 10
      packages/p/python/xmake.lua

@ -36,7 +36,7 @@ package("libxcb")
add_versions("1.13.1", "f09a76971437780a602303170fd51b5f7474051722bc39d566a272d2c4bde1b5")
add_versions("1.14", "2c7fcddd1da34d9b238c9caeda20d3bd7486456fc50b3cc6567185dbd5b0ad02")
for name, opt in pairs(components) do
for name, opt in pairs(components) do
add_configs(name, {description = format("Enable %s submodule (default is %s).", name, opt.default_value), default = opt.default_value})
end
@ -50,7 +50,7 @@ package("libxcb")
end
on_load("linux", function(package)
for name, opt in pairs(components) do
for name, opt in pairs(components) do
if opt.apt_package and package:config(name) then
package:add("extsources", opt.apt_package)
end
@ -64,11 +64,13 @@ package("libxcb")
"--disable-silent-rules",
"--enable-devel-docs=no",
"--with-doxygen=no"}
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
if package:is_plat("linux") and package:config("pic") ~= false then
table.insert(configs, "--with-pic")
end
for name, opt in pairs(components) do
table.insert(configs, format("--enable-%s=%s", name, package:config(name)))
table.insert(configs, format("--enable-%s=%s", name, package:config(name) and "yes" or "no"))
end
import("package.tools.autoconf").install(package, configs)
end)

@ -72,6 +72,16 @@ package("python")
package:addenv("PATH", "Scripts")
end)
on_fetch(function (package, opt)
if opt.system then
local result = package:find_tool("python3", opt)
if not result then
result = package:find_tool("python", opt)
end
return result
end
end)
on_install("@windows", "@msys", "@cygwin", function (package)
if package:version():ge("3.0") then
os.cp("python.exe", path.join(package:installdir("bin"), "python3.exe"))

Loading…
Cancel
Save