Skip to content

Commit

Permalink
Auto-update libfswatch to 1.18.2 (#6268)
Browse files Browse the repository at this point in the history
* Update libfswatch to 1.18.2

* Update xmake.lua

---------

Co-authored-by: star9029 <[email protected]>
  • Loading branch information
waruqi and star-hengxing authored Feb 2, 2025
1 parent 2064dba commit 47b0a32
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions packages/l/libfswatch/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ package("libfswatch")

add_urls("https://github.com/emcrisostomo/fswatch/archive/refs/tags/$(version).tar.gz",
"https://github.com/emcrisostomo/fswatch.git")

add_versions("1.18.2", "698f21fe5489311dabe9e90463fb9d40796780abac8d207b857e86ade7345d86")
add_versions("1.17.1", "bd492b6e203b10b30857778f4dd26f688426cd352937bd7779ee245139bafa2b")

add_deps("cmake")
Expand All @@ -15,12 +17,24 @@ package("libfswatch")
add_syslinks("pthread", "dl")
end

if on_check then
on_check(function (package)
if package:version() and package:version():eq("1.18.2") then
if package:is_plat("bsd") then
-- libfswatch/src/libfswatch/c++/kqueue_monitor.cpp:134:29: error: unknown type name '__darwin_time_t'; did you mean '__sbintime_t'
raise("package(libfswatch 1.18.2) unsupported current platform")
end
end
end)
end

on_install("linux", "bsd", "macosx", function (package)
local configs = {"-DUSE_NLS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
io.replace("CMakeLists.txt", "add_subdirectory(test/src)", "", {plain = true})
io.replace("CMakeLists.txt", "add_subdirectory(fswatch/src)", "", {plain = true})

local configs = {"-DUSE_NLS=OFF"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end)

Expand Down

0 comments on commit 47b0a32

Please sign in to comment.