Skip to content

Commit

Permalink
check pkgconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
xq114 committed Feb 5, 2025
1 parent f275ffb commit 1c8d2db
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/l/libxkbcommon/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ package("libxkbcommon")
import("package.tools.meson").install(package, configs)

package:addenv("PATH", "bin")
package:addenv("PKG_CONFIG_PATH", path.join(package:installdir("lib"), "pkgconfig"))
package:addenv("PKG_CONFIG_PATH", path.join("lib", "pkgconfig"))
end)

on_test(function (package)
Expand Down
3 changes: 3 additions & 0 deletions packages/o/open3d/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ package("open3d")
if package:is_plat("windows") then
import("package.tools.cmake").install(package, configs, {buildir = os.tmpfile() .. ".dir"})
elseif package:is_plat("linux") then
local envs = import("package.tools.cmake").buildenvs(package, {packagedeps = {"libxrandr", "libxrender", "libxinerama", "libxcursor", "libxfixes", "libxext", "libxi", "libx11", "libxkbcommon", "wayland", "wayland-protocol"}})
print(envs)
print("Open3d PKG_CONFIG_PATH: ", envs.PKG_CONFIG_PATH)
import("package.tools.cmake").install(package, configs, {packagedeps = {"libxrandr", "libxrender", "libxinerama", "libxcursor", "libxfixes", "libxext", "libxi", "libx11", "libxkbcommon", "wayland", "wayland-protocol"}})
else
import("package.tools.cmake").install(package, configs)
Expand Down
8 changes: 6 additions & 2 deletions packages/w/wayland/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,21 @@ package("wayland")
os.mkdir(package:installdir("share", "aclocal"))

-- build wayland
local configs = {"-Ddocumentation=false", "-Dc_link_args=-lm"}
table.insert(configs, "--libdir=lib")
local configs = {"-Ddocumentation=false", "-Dc_link_args=-lm", "--libdir=lib"}
table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
local envs = meson.buildenvs(package)
envs.LD_LIBRARY_PATH = path.joinenv(table.join(LD_LIBRARY_PATH, envs.LD_LIBRARY_PATH))
envs.PKG_CONFIG_PATH = path.joinenv(table.join(PKG_CONFIG_PATH, envs.PKG_CONFIG_PATH))
envs.ACLOCAL_PATH = path.joinenv(table.join(ACLOCAL_PATH, envs.ACLOCAL_PATH))
envs.ACLOCAL = ACLOCAL
meson.install(package, configs, {envs = envs})

package:addenv("PKG_CONFIG_PATH", path.join("lib", "pkgconfig"))
package:addenv("PKG_CONFIG_PATH", path.join("share", "pkgconfig"))
end)

on_test(function (package)
os.vrun("wayland-scanner --version")
assert(package:check_importfiles("pkgconfig::wayland-client"))
assert(package:has_cfuncs("wl_list_init", {includes = "wayland-util.h"}))
end)

0 comments on commit 1c8d2db

Please sign in to comment.