|
@@ -5,6 +5,8 @@ package("libfswatch")
|
|
|
|
|
|
add_urls("https://github.com/emcrisostomo/fswatch/archive/refs/tags/$(version).tar.gz",
|
|
add_urls("https://github.com/emcrisostomo/fswatch/archive/refs/tags/$(version).tar.gz",
|
|
"https://github.com/emcrisostomo/fswatch.git")
|
|
"https://github.com/emcrisostomo/fswatch.git")
|
|
|
|
+
|
|
|
|
+ add_versions("1.18.2", "698f21fe5489311dabe9e90463fb9d40796780abac8d207b857e86ade7345d86")
|
|
add_versions("1.17.1", "bd492b6e203b10b30857778f4dd26f688426cd352937bd7779ee245139bafa2b")
|
|
add_versions("1.17.1", "bd492b6e203b10b30857778f4dd26f688426cd352937bd7779ee245139bafa2b")
|
|
|
|
|
|
add_deps("cmake")
|
|
add_deps("cmake")
|
|
@@ -15,12 +17,24 @@ package("libfswatch")
|
|
add_syslinks("pthread", "dl")
|
|
add_syslinks("pthread", "dl")
|
|
end
|
|
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)
|
|
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(test/src)", "", {plain = true})
|
|
io.replace("CMakeLists.txt", "add_subdirectory(fswatch/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)
|
|
import("package.tools.cmake").install(package, configs)
|
|
end)
|
|
end)
|
|
|
|
|