aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/inotify-tools
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2017-08-18 23:25:32 +0800
committerswills <swills@FreeBSD.org>2017-08-18 23:25:32 +0800
commitaad750b4244b792dbd00d363d7ded9d3c3b5cec7 (patch)
tree056558d641c2795af6ffe73bec27089ab7bd081b /sysutils/inotify-tools
parent76497310571a0294d979596653bde1d79cb21633 (diff)
downloadfreebsd-ports-gnome-aad750b4244b792dbd00d363d7ded9d3c3b5cec7.tar.gz
freebsd-ports-gnome-aad750b4244b792dbd00d363d7ded9d3c3b5cec7.tar.zst
freebsd-ports-gnome-aad750b4244b792dbd00d363d7ded9d3c3b5cec7.zip
sysutils/inotify-tools: multiple cleanups
* Added STATIC option * Fixed license * Simplified patches * Switched to USES=localbase * Reorganized sections PR: 221595 Submitted by: Yuri Victorovich <yuri@rawbw.com> (maintainer)
Diffstat (limited to 'sysutils/inotify-tools')
-rw-r--r--sysutils/inotify-tools/Makefile25
-rw-r--r--sysutils/inotify-tools/files/patch-configure.ac8
-rw-r--r--sysutils/inotify-tools/files/patch-src_common.c14
-rw-r--r--sysutils/inotify-tools/pkg-plist2
4 files changed, 22 insertions, 27 deletions
diff --git a/sysutils/inotify-tools/Makefile b/sysutils/inotify-tools/Makefile
index 321458c8679c..5917ff46b723 100644
--- a/sysutils/inotify-tools/Makefile
+++ b/sysutils/inotify-tools/Makefile
@@ -4,26 +4,41 @@
PORTNAME= inotify-tools
PORTVERSION= 3.14.01
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= yuri@rawbw.com
COMMENT= Command-line utilities to watch for file events
-LICENSE= AGPLv3
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libinotify.so:devel/libinotify
+USES= autoreconf gmake libtool localbase
USE_GITHUB= yes
GH_ACCOUNT= rvoicilas
GH_TAGNAME= 1df9af4
-
-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
+OPTIONS_DEFINE= STATIC
+OPTIONS_SUB= yes
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|stat64|stat|' \
+ ${WRKSRC}/src/common.c \
+ ${WRKSRC}/libinotifytools/src/inotifytools.c
+
+post-build-STATIC-on:
+ @cd ${WRKSRC}/src && \
+ ${CC} -pthread ${LDFLAGS} -static -o inotifywait.static inotifywait.o common.o ../libinotifytools/src/.libs/libinotifytools.a ${LOCALBASE}/lib/libinotify.a && \
+ ${CC} -pthread ${LDFLAGS} -static -o inotifywatch.static inotifywatch.o common.o ../libinotifytools/src/.libs/libinotifytools.a ${LOCALBASE}/lib/libinotify.a
+
+post-install-STATIC-on:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/inotifywait.static ${STAGEDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/inotifywatch.static ${STAGEDIR}${PREFIX}/bin
.include <bsd.port.mk>
diff --git a/sysutils/inotify-tools/files/patch-configure.ac b/sysutils/inotify-tools/files/patch-configure.ac
index beecd0234aa2..4ecbb4ede887 100644
--- a/sysutils/inotify-tools/files/patch-configure.ac
+++ b/sysutils/inotify-tools/files/patch-configure.ac
@@ -8,11 +8,3 @@
# Checks for header files.
AC_CHECK_HEADERS([sys/inotify.h mcheck.h])
-@@ -62,6 +63,7 @@ AC_C_CONST
- AC_C_INLINE
-
- # Checks for library functions.
-+AC_CHECK_FUNCS(stat64, [], [CPPFLAGS="$CPPFLAGS -Dstat64=stat -Dlstat64=lstat"])
-
- # Set variables used in man page templates
- MAN_DATE=$(date +'%B %d, %Y')
diff --git a/sysutils/inotify-tools/files/patch-src_common.c b/sysutils/inotify-tools/files/patch-src_common.c
deleted file mode 100644
index 703e044a743a..000000000000
--- a/sysutils/inotify-tools/files/patch-src_common.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- 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-plist b/sysutils/inotify-tools/pkg-plist
index 0ecb78a1556f..3fb813799798 100644
--- a/sysutils/inotify-tools/pkg-plist
+++ b/sysutils/inotify-tools/pkg-plist
@@ -1,5 +1,7 @@
bin/inotifywait
bin/inotifywatch
+%%STATIC%%bin/inotifywait.static
+%%STATIC%%bin/inotifywatch.static
include/inotifytools/inotify-nosys.h
include/inotifytools/inotify.h
include/inotifytools/inotifytools.h