git: e8fe34cde858 - main - devel/libinotify: Prepare for the native inotify impl

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Mon, 07 Jul 2025 11:26:47 UTC
The branch main has been updated by arrowd:

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

commit e8fe34cde858431730c9d53a6b9a2bfd5d9ceb07
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-06-07 10:36:09 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-07-07 11:26:36 +0000

    devel/libinotify: Prepare for the native inotify impl
    
    The idea behind the change is to leave the library as-is to allow old programs
    linked to it to run, but prevent new programs from linking to it. This is
    achieved by replacing libinotify sys/inotify.h with a native one and removing
    LDFLAGS from the .pc file
    
    Differential Revision:  https://reviews.freebsd.org/D50736
---
 devel/libinotify/Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/devel/libinotify/Makefile b/devel/libinotify/Makefile
index 5487626c9544..e8b8d3afb66d 100644
--- a/devel/libinotify/Makefile
+++ b/devel/libinotify/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	libinotify
 PORTVERSION=	20240724
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
 MASTER_SITES=	https://github.com/libinotify-kqueue/libinotify-kqueue/releases/download/${PORTVERSION}/
 
@@ -18,4 +18,11 @@ GNU_CONFIGURE=	yes
 INSTALL_TARGET=	install-strip
 USE_LDCONFIG=	yes
 
+.if exists(/usr/include/sys/inotify.h)
+post-install:
+	${INSTALL_DATA} /usr/include/sys/inotify.h ${STAGEDIR}${PREFIX}/include/sys/
+	${SED} -e '/Libs:/d' -e '/Cflags:/d' ${WRKSRC}/libinotify.pc \
+		> ${STAGEDIR}${PREFIX}/libdata/pkgconfig/libinotify.pc
+.endif
+
 .include <bsd.port.mk>