parent
7164b5745c
commit
a35ede0a1e
1 changed files with 13 additions and 7 deletions
@ -1,24 +1,30 @@ |
|||||||
package("littlefs") |
package("littlefs") |
||||||
set_homepage("https://github.com/littlefs-project/littlefs") |
set_homepage("https://github.com/littlefs-project/littlefs") |
||||||
set_description("A little fail-safe filesystem designed for microcontrollers") |
set_description("A little fail-safe filesystem designed for microcontrollers") |
||||||
set_license("BSD-3-Clause") |
|
||||||
|
|
||||||
add_urls("https://github.com/littlefs-project/littlefs/archive/refs/tags/$(version).tar.gz", |
add_urls("https://github.com/littlefs-project/littlefs/archive/refs/tags/$(version).tar.gz", |
||||||
"https://github.com/littlefs-project/littlefs.git") |
"https://github.com/littlefs-project/littlefs.git") |
||||||
|
add_versions("v2.8.2", "9f46d00d6d6ad0a0d72840455ba748efcad84b8a236bd8b9d3a08e3af7953386") |
||||||
add_versions("v2.9.0", "47b2c2aab6ca595e5eb4f8d1e5ec88d2566a153ca8b21176ba55abcb9d8808b6") |
add_versions("v2.5.0", "07de0d788c2a849a137715b48cce9daeb3fdc7570873ac6faae4566432e140c8") |
||||||
|
|
||||||
on_install(function (package) |
on_install(function (package) |
||||||
|
local configs = {} |
||||||
io.writefile("xmake.lua", [[ |
io.writefile("xmake.lua", [[ |
||||||
add_rules("mode.release", "mode.debug") |
add_rules("mode.release", "mode.debug") |
||||||
target("littlefs") |
target("littlefs") |
||||||
set_kind("$(kind)") |
set_kind("$(kind)") |
||||||
add_files("*.c") |
add_files("*.c") |
||||||
add_headerfiles("*.h", {prefixdir = "littlefs"}) |
add_headerfiles("*.h") |
||||||
|
if is_plat("windows") then |
||||||
|
add_defines("LFS_NO_ERROR", "LFS_NO_DEBUG", "LFS_NO_WARN") |
||||||
|
end |
||||||
]]) |
]]) |
||||||
|
if package:config("shared") then |
||||||
|
configs.kind = "shared" |
||||||
|
end |
||||||
import("package.tools.xmake").install(package, configs) |
import("package.tools.xmake").install(package, configs) |
||||||
end) |
end) |
||||||
|
|
||||||
on_test(function (package) |
on_test(function (package) |
||||||
assert(package:has_cfuncs("lfs_mount", {includes = "littlefs/lfs.h"})) |
assert(package:has_cfuncs("lfs_mount", {includes = "lfs.h"})) |
||||||
end) |
end) |
||||||
|
Loading…
Reference in new issue