View | Details | Raw Unified | Return to bug 204366 | Differences between
and this patch

Collapse All | Expand All

(-)b/sysutils/inotify-tools/Makefile (-3 / +3 lines)
Lines 2-10 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	inotify-tools
4
PORTNAME=	inotify-tools
5
PORTVERSION=	3.14
5
PORTVERSION=	3.14.40
6
CATEGORIES=	sysutils
7
DISTVERSIONPREFIX=	v
6
DISTVERSIONPREFIX=	v
7
CATEGORIES=	sysutils
8
8
9
MAINTAINER=	yuri@rawbw.com
9
MAINTAINER=	yuri@rawbw.com
10
COMMENT=	Command-line utilities to watch for file events
10
COMMENT=	Command-line utilities to watch for file events
Lines 15-20 LIB_DEPENDS= libinotify.so:${PORTSDIR}/devel/libinotify Link Here
15
15
16
USE_GITHUB=	yes
16
USE_GITHUB=	yes
17
GH_ACCOUNT=	rvoicilas
17
GH_ACCOUNT=	rvoicilas
18
GH_TAGNAME=	1df9af4
18
19
19
USES=		autoreconf gmake libtool
20
USES=		autoreconf gmake libtool
20
GNU_CONFIGURE=	yes
21
GNU_CONFIGURE=	yes
Lines 24-29 INSTALL_TARGET= install-strip Link Here
24
25
25
CPPFLAGS+=	-I${LOCALBASE}/include
26
CPPFLAGS+=	-I${LOCALBASE}/include
26
LDFLAGS+=	-L${LOCALBASE}/lib
27
LDFLAGS+=	-L${LOCALBASE}/lib
27
LIBS+=		-linotify
28
28
29
.include <bsd.port.mk>
29
.include <bsd.port.mk>
(-)b/sysutils/inotify-tools/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (rvoicilas-inotify-tools-v3.14_GH0.tar.gz) = 97a4fdf9132da47c2baa677c1a427c435ee55a26df42b2b74a41489b9fbd2323
1
SHA256 (rvoicilas-inotify-tools-v3.14.40-1df9af4_GH0.tar.gz) = 3cb567344dad1fbe9a935d5a7c3f9c9bbce151df982631eb319763b2708ef4ea
2
SIZE (rvoicilas-inotify-tools-v3.14_GH0.tar.gz) = 66905
2
SIZE (rvoicilas-inotify-tools-v3.14.40-1df9af4_GH0.tar.gz) = 70023
(-)b/sysutils/inotify-tools/files/patch-configure.ac (+18 lines)
Added Link Here
1
--- configure.ac.orig	2014-11-09 20:57:04 UTC
2
+++ configure.ac
3
@@ -44,6 +44,7 @@ AM_CONDITIONAL([STATIC_BINARY_ENABLE], t
4
 
5
 
6
 # Checks for libraries.
7
+AC_SEARCH_LIBS(inotify_init, inotify)
8
 
9
 # Checks for header files.
10
 AC_CHECK_HEADERS([sys/inotify.h mcheck.h])
11
@@ -62,6 +63,7 @@ AC_C_CONST
12
 AC_C_INLINE
13
 
14
 # Checks for library functions.
15
+AC_CHECK_FUNCS(stat64, [], [CPPFLAGS="$CPPFLAGS -Dstat64=stat -Dlstat64=lstat"])
16
 
17
 # Set variables used in man page templates
18
 MAN_DATE=$(date +'%B %d, %Y')
(-)a/sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c (-31 lines)
Removed Link Here
1
--- libinotifytools/src/inotifytools.c.orig	2010-02-02 14:55:19 UTC
2
+++ libinotifytools/src/inotifytools.c
3
@@ -1309,14 +1309,14 @@ int inotifytools_watch_recursively_with_
4
 
5
 	static struct dirent * ent;
6
 	char * next_file;
7
-	static struct stat64 my_stat;
8
+	static struct stat my_stat;
9
 	ent = readdir( dir );
10
 	// Watch each directory within this directory
11
 	while ( ent ) {
12
 		if ( (0 != strcmp( ent->d_name, "." )) &&
13
 		     (0 != strcmp( ent->d_name, ".." )) ) {
14
 			nasprintf(&next_file,"%s%s", my_path, ent->d_name);
15
-			if ( -1 == lstat64( next_file, &my_stat ) ) {
16
+			if ( -1 == lstat( next_file, &my_stat ) ) {
17
 				error = errno;
18
 				free( next_file );
19
 				if ( errno != EACCES ) {
20
@@ -1595,9 +1595,9 @@ int inotifytools_error() {
21
  * @internal
22
  */
23
 int isdir( char const * path ) {
24
-	static struct stat64 my_stat;
25
+	static struct stat my_stat;
26
 
27
-	if ( -1 == lstat64( path, &my_stat ) ) {
28
+	if ( -1 == lstat( path, &my_stat ) ) {
29
 		if (errno == ENOENT) return 0;
30
 		fprintf(stderr, "Stat failed on %s: %s\n", path, strerror(errno));
31
 		return 0;
(-)b/sysutils/inotify-tools/files/patch-src_Makefile.am (+16 lines)
Added Link Here
1
--- src/Makefile.am.orig	2015-11-02 16:26:29 UTC
2
+++ src/Makefile.am
3
@@ -2,10 +2,11 @@ bin_PROGRAMS = inotifywait inotifywatch
4
 inotifywait_SOURCES = inotifywait.c common.c common.h
5
 inotifywatch_SOURCES = inotifywatch.c common.c common.h
6
 
7
-AM_CFLAGS = -Wall -Werror -Wpointer-arith -std=c99 -I../libinotifytools/src -L../libinotifytools/src
8
+AM_CFLAGS = -Wall -Werror -Wpointer-arith -std=c99
9
 AM_CPPFLAGS = -I$(top_srcdir)/libinotifytools/src
10
 LDADD = ../libinotifytools/src/libinotifytools.la
11
 
12
+AM_LDFLAGS =  -L$(top_srcdir)/libinotifytools/src
13
 if STATIC_BINARY_ENABLE
14
-AM_LDFLAGS = -static-libtool-libs
15
+AM_LDFLAGS += -static-libtool-libs
16
 endif
(-)a/sysutils/inotify-tools/files/patch-src_common.c (-14 lines)
Removed Link Here
1
--- src/common.c.orig	2010-02-02 14:55:19 UTC
2
+++ src/common.c
3
@@ -41,9 +41,9 @@ void print_event_descriptions() {
4
 }
5
 
6
 int isdir( char const * path ) {
7
-	static struct stat64 my_stat;
8
+	static struct stat my_stat;
9
 
10
-	if ( -1 == lstat64( path, &my_stat ) ) {
11
+	if ( -1 == lstat( path, &my_stat ) ) {
12
 		if (errno == ENOENT) return 0;
13
 		fprintf(stderr, "Stat failed on %s: %s\n", path, strerror(errno));
14
 		return 0;
(-)b/sysutils/inotify-tools/files/patch-src_inotifywatch.c (-19 / +7 lines)
Lines 1-4 Link Here
1
--- src/inotifywatch.c.orig	2015-11-08 15:17:11 UTC
1
--- src/inotifywatch.c.orig	2015-11-02 17:01:50 UTC
2
+++ src/inotifywatch.c
2
+++ src/inotifywatch.c
3
@@ -12,6 +12,7 @@
3
@@ -12,6 +12,7 @@
4
 #include <errno.h>
4
 #include <errno.h>
Lines 8-22 Link Here
8
 #include <regex.h>
8
 #include <regex.h>
9
 #include <signal.h>
9
 #include <signal.h>
10
 #include <stdbool.h>
10
 #include <stdbool.h>
11
@@ -91,6 +92,7 @@ int main(int argc, char ** argv)
11
@@ -93,6 +94,7 @@ int main(int argc, char ** argv)
12
 	done = false;
12
 	char * exc_iregex = NULL;
13
 	char * regex = NULL;
13
 	char * inc_regex = NULL;
14
 	char * iregex = NULL;
14
 	char * inc_iregex = NULL;
15
+	sigset_t set, oset;
15
+	sigset_t set, oset;
16
 
16
 
17
 	signal( SIGINT, handle_impatient_user );
17
 	signal( SIGINT, handle_impatient_user );
18
 
18
 
19
@@ -109,6 +111,16 @@ int main(int argc, char ** argv)
19
@@ -121,11 +123,23 @@ int main(int argc, char ** argv)
20
 		return EXIT_FAILURE;
20
 		return EXIT_FAILURE;
21
 	}
21
 	}
22
 
22
 
Lines 31-39 Link Here
31
+	pthread_sigmask(SIG_BLOCK, &set, &oset);
31
+	pthread_sigmask(SIG_BLOCK, &set, &oset);
32
+
32
+
33
 	if ( !inotifytools_initialize() ) {
33
 	if ( !inotifytools_initialize() ) {
34
 		fprintf(stderr, "Couldn't initialize inotify.  Are you running Linux "
34
 		warn_inotify_init_error();
35
 		                "2.6.13 or later, and was the\n"
36
@@ -120,6 +132,8 @@ int main(int argc, char ** argv)
37
 		return EXIT_FAILURE;
35
 		return EXIT_FAILURE;
38
 	}
36
 	}
39
 
37
 
Lines 42-53 Link Here
42
 	// Attempt to watch file
40
 	// Attempt to watch file
43
 	// If events is still 0, make it all events.
41
 	// If events is still 0, make it all events.
44
 	if ( !events )
42
 	if ( !events )
45
@@ -195,7 +209,7 @@ int main(int argc, char ** argv)
46
 	char * moved_from = 0;
47
 
48
 	do {
49
-		event = inotifytools_next_event( 0 );
50
+		event = inotifytools_next_event( -1 );
51
 		if ( !event ) {
52
 			if ( !inotifytools_error() ) {
53
 				return EXIT_TIMEOUT;
54
- 

Return to bug 204366