git: 201baf55783b - main - sysutils/inotify-tools: Update 3.22.6.0 → 4.23.8.0

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Tue, 22 Aug 2023 06:55:39 UTC
The branch main has been updated by yuri:

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

commit 201baf55783b3bdb953cdbd356c7afb403f9d022
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-08-22 06:02:07 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-08-22 06:55:33 +0000

    sysutils/inotify-tools: Update 3.22.6.0 → 4.23.8.0
    
    Reported by:    portscout
---
 sysutils/inotify-tools/Makefile                    | 13 +++---
 sysutils/inotify-tools/distinfo                    |  6 +--
 sysutils/inotify-tools/files/patch-configure.ac    |  6 +--
 sysutils/inotify-tools/files/patch-src_Makefile.am | 18 ++++----
 .../inotify-tools/files/patch-src_inotifywatch.c   | 48 ----------------------
 5 files changed, 25 insertions(+), 66 deletions(-)

diff --git a/sysutils/inotify-tools/Makefile b/sysutils/inotify-tools/Makefile
index 331457edcf03..1a1be48fa229 100644
--- a/sysutils/inotify-tools/Makefile
+++ b/sysutils/inotify-tools/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	inotify-tools
-DISTVERSION=	3.22.6.0
+DISTVERSION=	4.23.8.0
 CATEGORIES=	sysutils
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -10,11 +10,14 @@ LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libinotify.so:devel/libinotify
+TEST_DEPENDS=	bash:shells/bash
 
-USES=		autoreconf compiler:c11 gmake libtool localbase
+USES=		autoreconf compiler:c11 gmake libtool localbase shebangfix
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
 
+SHEBANG_GLOB=	*.t *.sh
+
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--disable-doxygen
 
@@ -24,9 +27,9 @@ OPTIONS_DEFINE=	STATIC
 OPTIONS_SUB=	yes
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|stat64|stat|' \
-		${WRKSRC}/src/common.c \
-		${WRKSRC}/libinotifytools/src/inotifytools.c
+	@${REINPLACE_CMD} \
+		-e 's|SHELL_PATH ?= /bin/bash|SHELL_PATH ?= ${LOCALBASE}/bin/bash|' \
+		${WRKSRC}/t/Makefile
 
 post-build-STATIC-on:
 	@cd ${WRKSRC}/src && \
diff --git a/sysutils/inotify-tools/distinfo b/sysutils/inotify-tools/distinfo
index e1e6961506f5..ceabaaecce2a 100644
--- a/sysutils/inotify-tools/distinfo
+++ b/sysutils/inotify-tools/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1655175207
-SHA256 (inotify-tools-inotify-tools-3.22.6.0_GH0.tar.gz) = c6b7e70f1df09e386217102a1fe041cfc15fa4f3d683d2970140b6814cf2ed12
-SIZE (inotify-tools-inotify-tools-3.22.6.0_GH0.tar.gz) = 92918
+TIMESTAMP = 1692682288
+SHA256 (inotify-tools-inotify-tools-4.23.8.0_GH0.tar.gz) = 8ad8b72a146af57688f3289b33b92a026915fc677997147071887b65b603d20a
+SIZE (inotify-tools-inotify-tools-4.23.8.0_GH0.tar.gz) = 93265
diff --git a/sysutils/inotify-tools/files/patch-configure.ac b/sysutils/inotify-tools/files/patch-configure.ac
index 851282839de2..6ff698392eac 100644
--- a/sysutils/inotify-tools/files/patch-configure.ac
+++ b/sysutils/inotify-tools/files/patch-configure.ac
@@ -1,7 +1,7 @@
---- configure.ac.orig	2021-09-28 08:39:16 UTC
+--- configure.ac.orig	2023-08-21 19:51:56 UTC
 +++ configure.ac
-@@ -45,6 +45,7 @@ AM_CONDITIONAL([STATIC_BINARY_ENABLE], test "$STATIC_B
- 
+@@ -55,6 +55,7 @@ fi
+ AM_CONDITIONAL(IS_CLANG, test "$IS_CLANG" = "yes")
  
  # Checks for libraries.
 +AC_SEARCH_LIBS(inotify_init, inotify)
diff --git a/sysutils/inotify-tools/files/patch-src_Makefile.am b/sysutils/inotify-tools/files/patch-src_Makefile.am
index 5214cd1fdfb3..96f6b8cd3c84 100644
--- a/sysutils/inotify-tools/files/patch-src_Makefile.am
+++ b/sysutils/inotify-tools/files/patch-src_Makefile.am
@@ -1,11 +1,15 @@
---- src/Makefile.am.orig	2021-09-28 08:39:16 UTC
+--- src/Makefile.am.orig	2023-08-21 19:51:56 UTC
 +++ src/Makefile.am
-@@ -11,7 +11,7 @@ fsnotifywatch_SOURCES = inotifywatch.c common.c common
- fsnotifywatch_CPPFLAGS = -DENABLE_FANOTIFY
+@@ -12,10 +12,10 @@ fsnotifywatch_CPPFLAGS = $(AM_CPPFLAGS) -DENABLE_FANOT
  endif
  
--AM_CFLAGS = -Wall -Wextra -Wshadow -Werror -std=c99 -I../libinotifytools/src
-+AM_CFLAGS = -Wall -Wextra -Wshadow -Werror -std=c99
- AM_CPPFLAGS = -I$(top_srcdir)/libinotifytools/src
- LDADD = ../libinotifytools/src/libinotifytools.la
+ if IS_CLANG
+-AM_CFLAGS = -std=c99 -fno-exceptions -Wall -Wextra -Wshadow -Werror -Wno-unused-command-line-argument -I../libinotifytools/src
++AM_CFLAGS = -std=c99 -fno-exceptions -Wall -Wextra -Wshadow -Werror -Wno-unused-command-line-argument
+ AM_CPPFLAGS = -std=c++17 -fno-exceptions -Wall -Wextra -Wshadow -Werror -Wno-unused-command-line-argument -I../libinotifytools/src
+ else
+-AM_CFLAGS = -std=c99 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src
++AM_CFLAGS = -std=c99 -fno-exceptions -Wall -Wextra -Wshadow -Werror
+ AM_CPPFLAGS = -std=c++17 -fno-exceptions -Wall -Wextra -Wshadow -Werror -I../libinotifytools/src
+ endif
  
diff --git a/sysutils/inotify-tools/files/patch-src_inotifywatch.c b/sysutils/inotify-tools/files/patch-src_inotifywatch.c
deleted file mode 100644
index 3b16e9a71dca..000000000000
--- a/sysutils/inotify-tools/files/patch-src_inotifywatch.c
+++ /dev/null
@@ -1,48 +0,0 @@
---- src/inotifywatch.c.orig	2021-09-28 08:39:16 UTC
-+++ src/inotifywatch.c
-@@ -11,6 +11,9 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <getopt.h>
-+#ifdef __FreeBSD__
-+#include <pthread.h>
-+#endif // __FreeBSD__
- #include <limits.h>
- #include <regex.h>
- #include <signal.h>
-@@ -96,8 +99,24 @@ int main(int argc, char **argv) {
-     char *inc_iregex = NULL;
-     int rc;
- 
-+#ifdef __FreeBSD__
-+    sigset_t set, oset;
-+#endif // __FreeBSD__
-+
-     signal(SIGINT, handle_impatient_user);
- 
-+#ifdef __FreeBSD__
-+    // Block some signals in libinotify's worker thread, so that
-+    // handle_signal runs in the context of the main thread and
-+    // the 'done' flag is actually honored.
-+    sigemptyset(&set);
-+    sigaddset(&set, SIGINT);
-+    sigaddset(&set, SIGHUP);
-+    sigaddset(&set, SIGTERM);
-+    sigaddset(&set, SIGALRM);
-+    pthread_sigmask(SIG_BLOCK, &set, &oset);
-+#endif // __FreeBSD__
-+
-     // Parse commandline options, aborting if something goes wrong
-     if (!parse_opts(&argc, &argv, &events, &timeout, &verbose, &zero, &sort,
- 		    &recursive, &no_dereference, &fromfile, &exc_regex,
-@@ -130,6 +149,10 @@ int main(int argc, char **argv) {
- 	    warn_inotify_init_error(fanotify);
- 	    return EXIT_FAILURE;
-     }
-+
-+#ifdef __FreeBSD__
-+    pthread_sigmask(SIG_SETMASK, &oset, NULL);
-+#endif // __FreeBSD__
- 
-     // Attempt to watch file
-     // If events is still 0, make it all events.