Skip to content

Commit 66c0373

Browse files
authored
[e-dant-watcher] add new port (#49464)
1 parent 6f5c259 commit 66c0373

5 files changed

Lines changed: 104 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index b9872dc..86cb5fb 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -109,10 +109,11 @@ if(ANDROID)
6+
# Android's stdlib ("bionic") doesn't need to be linked with (p)threads.
7+
set(LINK_LIBRARIES "${LINK_LIBRARIES}")
8+
else()
9+
+ set(THREADS_PREFER_PTHREAD_FLAG TRUE)
10+
find_package(Threads REQUIRED)
11+
set(LINK_LIBRARIES
12+
"${LINK_LIBRARIES}"
13+
- "Threads::Threads"
14+
+ "${CMAKE_THREAD_LIBS_INIT}"
15+
)
16+
if(APPLE)
17+
list(APPEND LINK_LIBRARIES
18+
@@ -409,7 +410,7 @@ wtr_add_hdr_target(
19+
"wtr.hdr_watcher"
20+
"include/wtr/watcher.hpp"
21+
)
22+
-
23+
+if(0)
24+
wtr_add_hdr_target(
25+
"watcher-c-hdr"
26+
"watcher-c/include/wtr/watcher-c.h"
27+
@@ -468,17 +469,17 @@ wtr_add_bin_target(
28+
""
29+
""
30+
)
31+
-
32+
+endif()
33+
set(PC_WATCHER_LIBS_PRIVATE "${LINK_LIBRARIES}")
34+
set(PC_WATCHER_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
35+
-set(PC_WATCHER_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/wtr")
36+
+set(PC_WATCHER_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include/wtr")
37+
wtr_add_pkg_config_target("watcher.pc" "watcher.pc.in")
38+
-
39+
+if(0)
40+
set(PC_LIBWATCHER_C_LIBS_PRIVATE "${LINK_LIBRARIES}")
41+
set(PC_LIBWATCHER_C_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
42+
set(PC_LIBWATCHER_C_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/wtr")
43+
wtr_add_pkg_config_target("watcher-c.pc" "watcher-c/watcher-c.pc.in")
44+
-
45+
+endif()
46+
if(BUILD_TESTING)
47+
message(STATUS "wtr.test_tool_test_all: Added (BUILD_TESTING=${BUILD_TESTING})")
48+
add_test(
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
set(VCPKG_BUILD_TYPE release) # header-only
2+
3+
vcpkg_from_github(
4+
OUT_SOURCE_PATH SOURCE_PATH
5+
REPO e-dant/watcher
6+
REF "${VERSION}"
7+
SHA512 94f4a7074598ca490db4e2171eafa4cfc7a1d9a6107c3e24780a4716c84af3e3466030fb21c9b2a56c34ee18d5ec6842f741bcb92e252a45702a2e64945f3450
8+
HEAD_REF release
9+
PATCHES
10+
fix-install.patch
11+
)
12+
13+
vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}"
14+
OPTIONS
15+
-DBUILD_LIB=OFF
16+
-DBUILD_BIN=OFF
17+
-DBUILD_TESTING=OFF
18+
)
19+
20+
vcpkg_cmake_install()
21+
vcpkg_fixup_pkgconfig()
22+
23+
# remove empty lib and debug/lib directories (and duplicate files from debug/include)
24+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
25+
26+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/license")

ports/e-dant-watcher/vcpkg.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "e-dant-watcher",
3+
"version": "0.14.3",
4+
"description": "Filesystem watcher. Works anywhere. Simple, efficient and friendly.",
5+
"homepage": "https://github.com/e-dant/watcher",
6+
"license": "MIT",
7+
"dependencies": [
8+
{
9+
"name": "vcpkg-cmake",
10+
"host": true
11+
},
12+
{
13+
"name": "vcpkg-cmake-config",
14+
"host": true
15+
}
16+
]
17+
}

versions/baseline.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,6 +2636,10 @@
26362636
"baseline": "2019-11-13",
26372637
"port-version": 0
26382638
},
2639+
"e-dant-watcher": {
2640+
"baseline": "0.14.3",
2641+
"port-version": 0
2642+
},
26392643
"eabase": {
26402644
"baseline": "2025-08-01",
26412645
"port-version": 0

versions/e-/e-dant-watcher.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"versions": [
3+
{
4+
"git-tree": "991f44857b733c9c4a764adc108f0c9346f1fd4a",
5+
"version": "0.14.3",
6+
"port-version": 0
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)