diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile --- a/devel/glib20/Makefile +++ b/devel/glib20/Makefile @@ -1,6 +1,6 @@ PORTNAME= glib DISTVERSION= 2.84.1 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 2 CATEGORIES= devel MASTER_SITES= GNOME @@ -40,7 +40,6 @@ TRIGGERS= gio-modules glib-schemas MESON_ARGS= -Db_lundef=false \ -Ddefault_library=both \ - -Dfile_monitor_backend='libinotify-kqueue' \ -Dinstalled_tests=false \ -Dlibelf=disabled \ -Dlibmount=disabled \ @@ -86,6 +85,12 @@ MESON_ARGS+= -Dintrospection=enabled .endif +.if exists(/usr/include/sys/inotify.h) +MESON_ARGS+= -Dfile_monitor_backend='inotify' +.else +MESON_ARGS+= -Dfile_monitor_backend='libinotify-kqueue' +.endif + .if ${FLAVOR:U} == default post-extract: ${CP} -r ${LOCALBASE}/gobject-introspection-bootstrap/libdata/pkgconfig ${PKGCONFIG_LINKDIR} diff --git a/devel/libinotify/Makefile b/devel/libinotify/Makefile --- 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 @@ 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 diff --git a/devel/qt6-base/Makefile b/devel/qt6-base/Makefile --- a/devel/qt6-base/Makefile +++ b/devel/qt6-base/Makefile @@ -1,6 +1,6 @@ PORTNAME= base DISTVERSION= ${QT6_VERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel PKGNAMEPREFIX= qt6- @@ -96,6 +96,12 @@ CMAKE_ARGS+= -DCMAKE_ASM_FLAGS=-no-integrated-as .endif +.if exists(/usr/include/sys/inotify.h) +PLIST_SUB+= INOTIFY="" KQUEUE="@comment " +.else +PLIST_SUB+= INOTIFY="@comment " KQUEUE="" +.endif + post-patch: @${REINPLACE_CMD} -e 's|%%OPENSSLLIB%%|${OPENSSLLIB}|g' \ ${WRKSRC}/src/plugins/tls/openssl/qsslsocket_openssl_symbols.cpp diff --git a/devel/qt6-base/files/patch-src_corelib_io_qfilesystemwatcher.cpp b/devel/qt6-base/files/patch-src_corelib_io_qfilesystemwatcher.cpp new file mode 100644 --- /dev/null +++ b/devel/qt6-base/files/patch-src_corelib_io_qfilesystemwatcher.cpp @@ -0,0 +1,11 @@ +--- src/corelib/io/qfilesystemwatcher.cpp.orig 2025-02-13 17:45:28 UTC ++++ src/corelib/io/qfilesystemwatcher.cpp +@@ -11,7 +11,7 @@ + #include + #include + +-#if (defined(Q_OS_LINUX) || defined(Q_OS_QNX)) && QT_CONFIG(inotify) ++#if (defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD)) && QT_CONFIG(inotify) + #define USE_INOTIFY + #endif + diff --git a/devel/qt6-base/pkg-plist b/devel/qt6-base/pkg-plist --- a/devel/qt6-base/pkg-plist +++ b/devel/qt6-base/pkg-plist @@ -63,7 +63,8 @@ %%QT_INCDIR%%/QtCore/%%FULLVER%%/QtCore/private/qfilesystementry_p.h %%QT_INCDIR%%/QtCore/%%FULLVER%%/QtCore/private/qfilesystemiterator_p.h %%QT_INCDIR%%/QtCore/%%FULLVER%%/QtCore/private/qfilesystemmetadata_p.h -%%QT_INCDIR%%/QtCore/%%FULLVER%%/QtCore/private/qfilesystemwatcher_kqueue_p.h +%%INOTIFY%%%%QT_INCDIR%%/QtCore/%%FULLVER%%/QtCore/private/qfilesystemwatcher_inotify_p.h +%%KQUEUE%%%%QT_INCDIR%%/QtCore/%%FULLVER%%/QtCore/private/qfilesystemwatcher_kqueue_p.h %%QT_INCDIR%%/QtCore/%%FULLVER%%/QtCore/private/qfilesystemwatcher_p.h %%QT_INCDIR%%/QtCore/%%FULLVER%%/QtCore/private/qfilesystemwatcher_polling_p.h %%QT_INCDIR%%/QtCore/%%FULLVER%%/QtCore/private/qflatmap_p.h