summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Popov <arrowd@FreeBSD.org>2025-09-11 18:57:42 +0300
committerGleb Popov <arrowd@FreeBSD.org>2025-09-11 18:58:12 +0300
commit5bd848fb61bacc2b76b7f1bb3dca8b1fe1a8670b (patch)
tree447f59eadb7848a5487912c3ae8a756edcac9f9e
parentRevert "textproc/exempi: Fix build on 16-CURRENT" (diff)
java/intellij-fsnotifier: Fix building on FreeBSD 15+
Reported by: rene
-rw-r--r--java/intellij-fsnotifier/Makefile4
-rw-r--r--java/intellij-fsnotifier/files/extrapatch-cmake_target__definitions.cmake12
2 files changed, 16 insertions, 0 deletions
diff --git a/java/intellij-fsnotifier/Makefile b/java/intellij-fsnotifier/Makefile
index f7c6f2e227b0..441f8dbdf053 100644
--- a/java/intellij-fsnotifier/Makefile
+++ b/java/intellij-fsnotifier/Makefile
@@ -24,4 +24,8 @@ CMAKE_ARGS+= -DVERSION=${PORTVERSION}
PLIST_SUB+= PORTVERSION=${PORTVERSION}
+.if exists(/usr/include/sys/inotify.h)
+EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-cmake_target__definitions.cmake
+.endif
+
.include <bsd.port.mk>
diff --git a/java/intellij-fsnotifier/files/extrapatch-cmake_target__definitions.cmake b/java/intellij-fsnotifier/files/extrapatch-cmake_target__definitions.cmake
new file mode 100644
index 000000000000..bffb0ce63f8c
--- /dev/null
+++ b/java/intellij-fsnotifier/files/extrapatch-cmake_target__definitions.cmake
@@ -0,0 +1,12 @@
+FreeBSD 15+ has native inotify implementation
+
+--- cmake/target_definitions.cmake.orig 2023-07-24 21:16:54 UTC
++++ cmake/target_definitions.cmake
+@@ -19,7 +19,6 @@ foreach(_lib _type IN ZIP_LISTS LIBS TYPES)
+ add_library(fsnotifier_staticlib STATIC ${HEADERS} ${SOURCES})
+ foreach(_lib _type IN ZIP_LISTS LIBS TYPES)
+ target_link_libraries(${_lib} PUBLIC
+- ${INOTIFY_LIBRARY_DIRS}/${CMAKE_${_type}_LIBRARY_PREFIX}${INOTIFY_LIBRARIES}${CMAKE_${_type}_LIBRARY_SUFFIX}
+ Threads::Threads)
+ target_include_directories(${_lib} PUBLIC ${INOTIFY_INCLUDE_DIRS})
+ set_target_properties(${_lib} PROPERTIES OUTPUT_NAME fsnotifier)