summaryrefslogtreecommitdiff
path: root/sysutils/intellij-fsnotifier
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2019-03-05 11:24:01 +0000
committerryoon <ryoon@pkgsrc.org>2019-03-05 11:24:01 +0000
commit9aa2a65366897a232ff9e87fa21388c85077aca6 (patch)
tree17d554b9fe82813b7911575c842c1482f1cf936a /sysutils/intellij-fsnotifier
parent5ce66d0a85acb9bd8e3d0c6498af8f1defa3cb11 (diff)
downloadpkgsrc-9aa2a65366897a232ff9e87fa21388c85077aca6.tar.gz
sysutils/intellij-fsnotifier: import intellij-fsnotifier-0.0.20190228
A file system monitoring utility for JetBrains IntelliJ IDEA Integrated Development Environment.
Diffstat (limited to 'sysutils/intellij-fsnotifier')
-rw-r--r--sysutils/intellij-fsnotifier/DESCR2
-rw-r--r--sysutils/intellij-fsnotifier/Makefile29
-rw-r--r--sysutils/intellij-fsnotifier/PLIST3
-rw-r--r--sysutils/intellij-fsnotifier/distinfo8
-rw-r--r--sysutils/intellij-fsnotifier/patches/patch-Makefile29
-rw-r--r--sysutils/intellij-fsnotifier/patches/patch-main.c65
6 files changed, 136 insertions, 0 deletions
diff --git a/sysutils/intellij-fsnotifier/DESCR b/sysutils/intellij-fsnotifier/DESCR
new file mode 100644
index 00000000000..916d91a4ed8
--- /dev/null
+++ b/sysutils/intellij-fsnotifier/DESCR
@@ -0,0 +1,2 @@
+A file system monitoring utility for JetBrains IntelliJ IDEA
+Integrated Development Environment.
diff --git a/sysutils/intellij-fsnotifier/Makefile b/sysutils/intellij-fsnotifier/Makefile
new file mode 100644
index 00000000000..b65bc2c5d87
--- /dev/null
+++ b/sysutils/intellij-fsnotifier/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1 2019/03/05 11:24:01 ryoon Exp $
+
+DISTNAME= fsnotifier-0.0.20190228
+PKGNAME= intellij-${DISTNAME}
+CATEGORIES= sysutils
+MASTER_SITES= ${MASTER_SITE_GITHUB:=idea4bsd/}
+GITHUB_PROJECT= fsnotifier
+GITHUB_TAG= bb7815166319ba46c27809ed8fc0c6b5fa14f869
+
+MAINTAINER= ryoon@NetBSD.org
+HOMEPAGE= https://github.com/idea4bsd/fsnotifier
+COMMENT= File system monitoring utility for IntelliJ IDEA IDE
+LICENSE= apache-2.0
+
+INTELLIJCEDIR= intellij-ce-bin-2018.3.5
+PYCHARMCEDIR= pycharm-bin-2018.3.5
+INSTALLATION_DIRS= ${INTELLIJCEDIR}/bin ${PYCHARMCEDIR}/bin
+
+PLIST_SUBST+= INTELLIJCEDIR=${INTELLIJCEDIR}
+PLIST_SUBST+= PYCHARMCEDIR=${PYCHARMCEDIR}
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/fsnotifier \
+ ${DESTDIR}${PREFIX}/${INTELLIJCEDIR}/bin/fsnotifier
+ ${INSTALL_PROGRAM} ${WRKSRC}/fsnotifier \
+ ${DESTDIR}${PREFIX}/${PYCHARMCEDIR}/bin/fsnotifier
+
+.include "../../devel/libinotify/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/intellij-fsnotifier/PLIST b/sysutils/intellij-fsnotifier/PLIST
new file mode 100644
index 00000000000..fb22324d519
--- /dev/null
+++ b/sysutils/intellij-fsnotifier/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2019/03/05 11:24:01 ryoon Exp $
+${INTELLIJCEDIR}/bin/fsnotifier
+${PYCHARMCEDIR}/bin/fsnotifier
diff --git a/sysutils/intellij-fsnotifier/distinfo b/sysutils/intellij-fsnotifier/distinfo
new file mode 100644
index 00000000000..477818b701f
--- /dev/null
+++ b/sysutils/intellij-fsnotifier/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2019/03/05 11:24:01 ryoon Exp $
+
+SHA1 (fsnotifier-0.0.20190228-bb7815166319ba46c27809ed8fc0c6b5fa14f869.tar.gz) = a70c316fa25435d596fd0d982f709f2309fee43f
+RMD160 (fsnotifier-0.0.20190228-bb7815166319ba46c27809ed8fc0c6b5fa14f869.tar.gz) = af28d29ecc915c8a5113235c90d43f59117f1061
+SHA512 (fsnotifier-0.0.20190228-bb7815166319ba46c27809ed8fc0c6b5fa14f869.tar.gz) = 7aa052076784f97936a75dce3ed4a89b41f388675fee484ec63481dd00d27b8373bb9ad5cdc185e3eb4e4263154ed319e70b332e8253e76836a85f85c75c110b
+Size (fsnotifier-0.0.20190228-bb7815166319ba46c27809ed8fc0c6b5fa14f869.tar.gz) = 12933 bytes
+SHA1 (patch-Makefile) = 8d3fb94a6ed0411bf12e01f3db216633b7c8d535
+SHA1 (patch-main.c) = 45504b3d11700b479230b9b07413457beaa392af
diff --git a/sysutils/intellij-fsnotifier/patches/patch-Makefile b/sysutils/intellij-fsnotifier/patches/patch-Makefile
new file mode 100644
index 00000000000..6cd52088709
--- /dev/null
+++ b/sysutils/intellij-fsnotifier/patches/patch-Makefile
@@ -0,0 +1,29 @@
+$NetBSD: patch-Makefile,v 1.1 2019/03/05 11:24:01 ryoon Exp $
+
+* Fix build on NetBSD
+
+--- Makefile.orig 2016-11-18 15:38:37.000000000 +0000
++++ Makefile
+@@ -2,16 +2,20 @@ PROG= fsnotifier
+ SRCS= inotify.c main.c util.c
+ MAN=
+ CSTD= c99
++PREFIX?= /usr/local
+
+ CFLAGS+= -Wall -Wextra -D_DEFAULT_SOURCE
+
+-CFLAGS+= -std=${CSTD} -I/usr/local/include${INOTIFY}
+-LDFLAGS+= -L/usr/local/lib${INOTIFY} -Wl,-rpath=/usr/local/lib${INOTIFY}
++CFLAGS+= -std=${CSTD} -I${PREFIX}/include${INOTIFY}
++LDFLAGS+= -L${PREFIX}/lib${INOTIFY} -Wl,-rpath=${PREFIX}/lib${INOTIFY}
+ LDFLAGS+= -pthread
+
+ OS!= uname -s
+ .if ${OS} == "OpenBSD"
+ INOTIFY?= /inotify
++.elif ${OS} == "NetBSD"
++PREFIX= /usr/pkg
++CFLAGS+= -D_NETBSD_SOURCE
+ .endif
+
+ .if defined(STATIC_INOTIFY)
diff --git a/sysutils/intellij-fsnotifier/patches/patch-main.c b/sysutils/intellij-fsnotifier/patches/patch-main.c
new file mode 100644
index 00000000000..12e6c3e03db
--- /dev/null
+++ b/sysutils/intellij-fsnotifier/patches/patch-main.c
@@ -0,0 +1,65 @@
+$NetBSD: patch-main.c,v 1.1 2019/03/05 11:24:01 ryoon Exp $
+
+* Fix build on NetBSD
+
+--- main.c.orig 2016-11-18 15:38:37.000000000 +0000
++++ main.c
+@@ -429,17 +429,31 @@ static bool register_roots(array* new_ro
+ #if defined(__BSD__)
+
+ static array* unwatchable_mounts() {
++#if defined(__NetBSD__)
++ int fsCount = getvfsstat(NULL, 0, MNT_WAIT);
++#else
+ int fsCount = getfsstat(NULL, 0, MNT_WAIT);
++#endif
+ if (fsCount > 0) {
++#if defined(__NetBSD__)
++ struct statvfs fs[fsCount];
++ fsCount = getvfsstat(fs, (int)(sizeof(struct statvfs) * fsCount), MNT_NOWAIT);
++#else
+ struct statfs fs[fsCount];
+ fsCount = getfsstat(fs, (int)(sizeof(struct statfs) * fsCount), MNT_NOWAIT);
++#endif
+ if (fsCount > 0) {
+ array* mounts = array_create(fsCount);
+ CHECK_NULL(mounts, NULL);
+
+ for (int i=0; i<fsCount; i++) {
++#if defined(__NetBSD__)
++ userlog(LOG_DEBUG, "mtab: %s : %s (%d)", fs[i].f_mntonname, fs[i].f_fstypename, fs[i].f_flag);
++ if ((fs[i].f_flag & MNT_LOCAL) != MNT_LOCAL) {
++#else
+ userlog(LOG_DEBUG, "mtab: %s : %s (%d)", fs[i].f_mntonname, fs[i].f_fstypename, fs[i].f_flags);
+ if ((fs[i].f_flags & MNT_LOCAL) != MNT_LOCAL) {
++#endif
+ CHECK_NULL(array_push(mounts, strdup(fs[i].f_mntonname)), NULL);
+ }
+ }
+@@ -512,8 +526,14 @@ static void inotify_callback(const char*
+ static void report_event(const char* event, const char* path) {
+ userlog(LOG_DEBUG, "%s: %s", event, path);
+
++#if defined(__clang__)
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wincompatible-pointer-types"
++#elif defined(__GNUC__)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"
++#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
++#endif
+ char* copy = path, *p;
+ for (p = copy; *p != '\0'; ++p) {
+ if (*p == '\n') {
+@@ -524,7 +544,11 @@ static void report_event(const char* eve
+ *p = '\0';
+ }
+ }
++#if defined(__clang__)
+ #pragma clang diagnostic pop
++#elif defined(__GNUC__)
++#pragma GCC diagnostic pop
++#endif
+
+ fputs(event, stdout);
+ fputc('\n', stdout);