Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Feb 2026 06:09:42 +0000
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c7ba72321120 - main - Mk/Uses/inotify.mk: Add USES=inotify
Message-ID:  <69897a26.30df5.b9ba802@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by adamw:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c7ba72321120d3f3dc5fa5f1f4f0b575f340494b

commit c7ba72321120d3f3dc5fa5f1f4f0b575f340494b
Author:     Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2026-02-09 05:56:27 +0000
Commit:     Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2026-02-09 06:09:17 +0000

    Mk/Uses/inotify.mk: Add USES=inotify
    
    FreeBSD 15 includes the inotify system in base, but anything prior to 15
    needs the libinotify port. This USES script makes it a little easier to
    depend on and use the correct thing.
    
    Reviewed by:    mat
    Approved by:    mat
    Differential Revision:  https://reviews.freebsd.org/D54116
---
 Mk/Uses/inotify.mk | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/Mk/Uses/inotify.mk b/Mk/Uses/inotify.mk
new file mode 100644
index 000000000000..2d8ae93b7027
--- /dev/null
+++ b/Mk/Uses/inotify.mk
@@ -0,0 +1,34 @@
+# Handle dependency on libinotify
+#
+# Feature: inotify
+# Valid ARGS: none
+#
+# inotify was added to base in FreeBSD 15, so <15 needs the
+# devel/libinotify port.
+#
+# MAINTAINER: adamw@FreeBSD.org
+
+.if !defined(_INCLUDE_USES_INOTIFY_MK)
+_INCLUDE_USES_INOTIFY_MK=	yes
+
+.  if exists(/usr/include/sys/inotify.h)
+INOTIFY_INCLUDE_PATH=   /usr/include/sys
+INOTIFY_LIB=
+INOTIFY_LIB_PATH=       /usr/lib/libc.so
+.  else
+INOTIFY_PORT=		true
+INOTIFY_INCLUDE_PATH=	${LOCALBASE}/include/sys
+INOTIFY_LIB=		-linotify
+INOTIFY_LIB_PATH=	${LOCALBASE}/lib/libinotify.so
+
+LIB_DEPENDS+=	        libinotify.so:devel/libinotify
+.  endif
+
+CMAKE_ARGS+=    -DINOTIFY_INCLUDE_DIR=${INOTIFY_INCLUDE_PATH} \
+                -DINOTIFY_LIBRARIES=${INOTIFY_LIB_PATH} \
+                -DINOTIFY_LIBRARY=${INOTIFY_LIB_PATH} \
+                -DLIBINOTIFY_INCLUDE_DIR=${INOTIFY_INCLUDE_PATH} \
+                -DLIBINOTIFY_LIBRARIES=${INOTIFY_LIB_PATH} \
+                -DLIBINOTIFY_LIBRARY=${INOTIFY_LIB_PATH}
+
+.endif # !defined(_INCLUDE_USES_INOTIFY_MK)


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69897a26.30df5.b9ba802>