From 2e899623829f86b0b124c86c7033105fcdb6ffbc Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Wed, 28 Oct 2015 20:52:12 +0000 Subject: The set of command-line programs providing a simple interface to file system events to shell scripts. WWW: https://github.com/rvoicilas/inotify-tools/ PR: 200254 Submitted by: Yuri Victorovich --- sysutils/Makefile | 1 + sysutils/inotify-tools/Makefile | 29 ++++++++++++++++++++ sysutils/inotify-tools/distinfo | 2 ++ .../files/patch-libinotifytools_src_inotifytools.c | 31 ++++++++++++++++++++++ sysutils/inotify-tools/files/patch-src_common.c | 14 ++++++++++ sysutils/inotify-tools/pkg-descr | 4 +++ sysutils/inotify-tools/pkg-plist | 11 ++++++++ 7 files changed, 92 insertions(+) create mode 100644 sysutils/inotify-tools/Makefile create mode 100644 sysutils/inotify-tools/distinfo create mode 100644 sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c create mode 100644 sysutils/inotify-tools/files/patch-src_common.c create mode 100644 sysutils/inotify-tools/pkg-descr create mode 100644 sysutils/inotify-tools/pkg-plist (limited to 'sysutils') diff --git a/sysutils/Makefile b/sysutils/Makefile index 7374c9c6bc43..0a7b9b5e2062 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -410,6 +410,7 @@ SUBDIR += i2c-tools SUBDIR += i7z SUBDIR += iat + SUBDIR += inotify-tools SUBDIR += installwatch SUBDIR += intel-pcm SUBDIR += iocage diff --git a/sysutils/inotify-tools/Makefile b/sysutils/inotify-tools/Makefile new file mode 100644 index 000000000000..a9129fcac013 --- /dev/null +++ b/sysutils/inotify-tools/Makefile @@ -0,0 +1,29 @@ +# Created by: Yuri Victorovich +# $FreeBSD$ + +PORTNAME= inotify-tools +PORTVERSION= 3.14 +CATEGORIES= sysutils +DISTVERSIONPREFIX= v + +MAINTAINER= yuri@rawbw.com +COMMENT= Command-line utilities to watch for file events + +LICENSE= AGPLv3 + +LIB_DEPENDS= libinotify.so:${PORTSDIR}/devel/libinotify + +USE_GITHUB= yes +GH_ACCOUNT= rvoicilas + +USES= autoreconf gmake libtool +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --disable-doxygen +USE_LDCONFIG= yes +INSTALL_TARGET= install-strip + +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib +LIBS+= -linotify + +.include diff --git a/sysutils/inotify-tools/distinfo b/sysutils/inotify-tools/distinfo new file mode 100644 index 000000000000..a380059bceda --- /dev/null +++ b/sysutils/inotify-tools/distinfo @@ -0,0 +1,2 @@ +SHA256 (rvoicilas-inotify-tools-v3.14_GH0.tar.gz) = 97a4fdf9132da47c2baa677c1a427c435ee55a26df42b2b74a41489b9fbd2323 +SIZE (rvoicilas-inotify-tools-v3.14_GH0.tar.gz) = 66905 diff --git a/sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c b/sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c new file mode 100644 index 000000000000..a3b3f2639035 --- /dev/null +++ b/sysutils/inotify-tools/files/patch-libinotifytools_src_inotifytools.c @@ -0,0 +1,31 @@ +--- libinotifytools/src/inotifytools.c.orig 2010-02-02 14:55:19 UTC ++++ libinotifytools/src/inotifytools.c +@@ -1309,14 +1309,14 @@ int inotifytools_watch_recursively_with_ + + static struct dirent * ent; + char * next_file; +- static struct stat64 my_stat; ++ static struct stat my_stat; + ent = readdir( dir ); + // Watch each directory within this directory + while ( ent ) { + if ( (0 != strcmp( ent->d_name, "." )) && + (0 != strcmp( ent->d_name, ".." )) ) { + nasprintf(&next_file,"%s%s", my_path, ent->d_name); +- if ( -1 == lstat64( next_file, &my_stat ) ) { ++ if ( -1 == lstat( next_file, &my_stat ) ) { + error = errno; + free( next_file ); + if ( errno != EACCES ) { +@@ -1595,9 +1595,9 @@ int inotifytools_error() { + * @internal + */ + int isdir( char const * path ) { +- static struct stat64 my_stat; ++ static struct stat my_stat; + +- if ( -1 == lstat64( path, &my_stat ) ) { ++ if ( -1 == lstat( path, &my_stat ) ) { + if (errno == ENOENT) return 0; + fprintf(stderr, "Stat failed on %s: %s\n", path, strerror(errno)); + return 0; diff --git a/sysutils/inotify-tools/files/patch-src_common.c b/sysutils/inotify-tools/files/patch-src_common.c new file mode 100644 index 000000000000..703e044a743a --- /dev/null +++ b/sysutils/inotify-tools/files/patch-src_common.c @@ -0,0 +1,14 @@ +--- src/common.c.orig 2010-02-02 14:55:19 UTC ++++ src/common.c +@@ -41,9 +41,9 @@ void print_event_descriptions() { + } + + int isdir( char const * path ) { +- static struct stat64 my_stat; ++ static struct stat my_stat; + +- if ( -1 == lstat64( path, &my_stat ) ) { ++ if ( -1 == lstat( path, &my_stat ) ) { + if (errno == ENOENT) return 0; + fprintf(stderr, "Stat failed on %s: %s\n", path, strerror(errno)); + return 0; diff --git a/sysutils/inotify-tools/pkg-descr b/sysutils/inotify-tools/pkg-descr new file mode 100644 index 000000000000..a1d00f85a01f --- /dev/null +++ b/sysutils/inotify-tools/pkg-descr @@ -0,0 +1,4 @@ +The set of command-line programs providing a simple interface +to file system events to shell scripts. + +WWW: https://github.com/rvoicilas/inotify-tools/ diff --git a/sysutils/inotify-tools/pkg-plist b/sysutils/inotify-tools/pkg-plist new file mode 100644 index 000000000000..0ecb78a1556f --- /dev/null +++ b/sysutils/inotify-tools/pkg-plist @@ -0,0 +1,11 @@ +bin/inotifywait +bin/inotifywatch +include/inotifytools/inotify-nosys.h +include/inotifytools/inotify.h +include/inotifytools/inotifytools.h +lib/libinotifytools.a +lib/libinotifytools.so +lib/libinotifytools.so.0 +lib/libinotifytools.so.0.4.1 +man/man1/inotifywait.1.gz +man/man1/inotifywatch.1.gz -- cgit v1.2.3