Skip to content

Commit 1dc3c49

Browse files
committed
Added support for Xuantie apps
1 parent de43a49 commit 1dc3c49

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

apps/player/xmake.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
add_rules("mode.debug", "mode.release")
22

3-
add_requires("sdl2")
4-
add_requires("sdl2_image")
3+
add_requires("sdl2",{configs={shared = false}})
4+
add_requires("sdl2_image",{configs={shared = false}})
55
add_requires("ffmpeg")
66

77
target("player")

apps/xmake.lua

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
1-
for _, packagedir in ipairs(os.dirs(path.join(os.scriptdir(), "*"))) do
2-
local packagefile = path.join(packagedir, "xmake.lua")
3-
if os.isfile(packagefile) then
4-
includes(packagefile)
1+
local arch = get_config("arch")
2+
if arch == "xuantie" then
3+
local run_apps = {
4+
"busybox",
5+
"cpp",
6+
"hello",
7+
"shm_ping",
8+
"shm_pong",
9+
"smart-fetch",
10+
"zlib",
11+
}
12+
for _, packagedir in ipairs(run_apps) do
13+
local packagefile = path.join(path.join(os.scriptdir(), packagedir), "xmake.lua")
14+
if os.isfile(packagefile) then
15+
includes(packagefile)
16+
end
17+
end
18+
else
19+
for _, packagedir in ipairs(os.dirs(path.join(os.scriptdir(), "*"))) do
20+
local packagefile = path.join(packagedir, "xmake.lua")
21+
if os.isfile(packagefile) then
22+
includes(packagefile)
23+
end
524
end
625
end

repo/packages/f/ffmpeg/xmake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ do
6666
if package:config("shared") then
6767
table.insert(configs, "--enable-shared")
6868
end
69-
69+
table.insert(configs, "--disable-doc")
7070
local buildenvs = import("package.tools.autoconf").buildenvs(package,
7171
{ldflags = ldflags, packagedeps = packagedeps})
7272
import("package.tools.autoconf").configure(package, configs, {envs = buildenvs})

0 commit comments

Comments
 (0)