summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-04-27 15:43:44 +0800
committerGitHub <[email protected]>2025-04-27 15:43:44 +0800
commit2774ecbc0961e1e2b1f995d8937b44c2c90e11c6 (patch)
treed8c01e66824369d74badd6c2c61bfa4ee33c4ab9
parent00ff68e7319def8c566443aa513454ad86ccecd7 (diff)
parenta0030c2c4fc23fd344dc5f8d9b2c18bc0d7c6b39 (diff)
Merge pull request #6372 from binLep/dev
Updated the issue where package dependencies cannot find so files during installation
-rw-r--r--xmake/modules/target/action/install/main.lua2
-rw-r--r--xmake/modules/target/action/uninstall/main.lua2
-rw-r--r--xmake/modules/utils/binary/deplibs.lua4
-rw-r--r--xmake/plugins/pack/batchcmds.lua2
4 files changed, 5 insertions, 5 deletions
diff --git a/xmake/modules/target/action/install/main.lua b/xmake/modules/target/action/install/main.lua
index 470765cb6..e4192a747 100644
--- a/xmake/modules/target/action/install/main.lua
+++ b/xmake/modules/target/action/install/main.lua
@@ -79,7 +79,7 @@ function _get_target_package_libfiles(target, opt)
if pkg:enabled() and pkg:get("libfiles") then
for _, libfile in ipairs(table.wrap(pkg:get("libfiles"))) do
local filename = path.filename(libfile)
- if filename:endswith(".dll") or filename:endswith(".so") or filename:find("%.so%.%d+$") or filename:endswith(".dylib") then
+ if filename:endswith(".dll") or filename:endswith(".so") or filename:find("%.so[%.%d+]+$") or filename:endswith(".dylib") then
table.insert(libfiles, libfile)
end
end
diff --git a/xmake/modules/target/action/uninstall/main.lua b/xmake/modules/target/action/uninstall/main.lua
index d095f0aee..f5c15ee9d 100644
--- a/xmake/modules/target/action/uninstall/main.lua
+++ b/xmake/modules/target/action/uninstall/main.lua
@@ -79,7 +79,7 @@ function _get_target_package_libfiles(target, opt)
if pkg:enabled() and pkg:get("libfiles") then
for _, libfile in ipairs(table.wrap(pkg:get("libfiles"))) do
local filename = path.filename(libfile)
- if filename:endswith(".dll") or filename:endswith(".so") or filename:find("%.so%.%d+$") or filename:endswith(".dylib") then
+ if filename:endswith(".dll") or filename:endswith(".so") or filename:find("%.so[%.%d+]+$") or filename:endswith(".dylib") then
table.insert(libfiles, libfile)
end
end
diff --git a/xmake/modules/utils/binary/deplibs.lua b/xmake/modules/utils/binary/deplibs.lua
index cb6b230e0..48002f5d8 100644
--- a/xmake/modules/utils/binary/deplibs.lua
+++ b/xmake/modules/utils/binary/deplibs.lua
@@ -81,7 +81,7 @@ function _get_all_depends_by_objdump(binaryfile, opt)
else
if line:startswith("NEEDED") then
local filename = line:split("%s+")[2]
- if filename and filename:endswith(".so") or filename:find("%.so%.%d+$") then
+ if filename and filename:endswith(".so") or filename:find("%.so[%.%d+]+$") then
depends = depends or {}
table.insert(depends, filename)
end
@@ -122,7 +122,7 @@ function _get_all_depends_by_ldd(binaryfile, opt)
line = splitinfo[1]
end
line = line:gsub("%(.+%)", ""):trim()
- local filename = line:match(".-%.so$") or line:match(".-%.so%.%d+")
+ local filename = line:match(".-%.so$") or line:match(".-%.so[%.%d+]+$")
if filename then
depends = depends or {}
table.insert(depends, filename:trim())
diff --git a/xmake/plugins/pack/batchcmds.lua b/xmake/plugins/pack/batchcmds.lua
index 7e7313abe..e9a7f4c24 100644
--- a/xmake/plugins/pack/batchcmds.lua
+++ b/xmake/plugins/pack/batchcmds.lua
@@ -92,7 +92,7 @@ function _get_target_package_libfiles(target, opt)
if pkg:enabled() and pkg:get("libfiles") then
for _, libfile in ipairs(table.wrap(pkg:get("libfiles"))) do
local filename = path.filename(libfile)
- if filename:endswith(".dll") or filename:endswith(".so") or filename:find("%.so%.%d+$") or filename:endswith(".dylib") then
+ if filename:endswith(".dll") or filename:endswith(".so") or filename:find("%.so[%.%d+]+$") or filename:endswith(".dylib") then
table.insert(libfiles, libfile)
end
end