summaryrefslogtreecommitdiff
path: root/sysutils/watchman
diff options
context:
space:
mode:
authorwiz <wiz>2014-08-23 20:13:59 +0000
committerwiz <wiz>2014-08-23 20:13:59 +0000
commit4a5b2507d6e91a91745192077cc3684ae0461af4 (patch)
tree34b19933697ecb7fa31c3235c8cf9e40b0dc3711 /sysutils/watchman
parent6ac273e1a5cde73261980ca6360ebb5758911121 (diff)
downloadpkgsrc-4a5b2507d6e91a91745192077cc3684ae0461af4.tar.gz
Fix build on NetBSD 6 and FreeBSD 9.
From Niclas Rosenvik. Bump PKGREVISION.
Diffstat (limited to 'sysutils/watchman')
-rw-r--r--sysutils/watchman/Makefile3
-rw-r--r--sysutils/watchman/distinfo7
-rw-r--r--sysutils/watchman/patches/patch-configure.ac15
-rw-r--r--sysutils/watchman/patches/patch-fstype.c12
-rw-r--r--sysutils/watchman/patches/patch-watchman.h24
5 files changed, 49 insertions, 12 deletions
diff --git a/sysutils/watchman/Makefile b/sysutils/watchman/Makefile
index 5ffb2eb7385..61e4183bdd8 100644
--- a/sysutils/watchman/Makefile
+++ b/sysutils/watchman/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2014/08/09 23:08:41 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2014/08/23 20:13:59 wiz Exp $
DISTNAME= watchman-${VERSION}
+PKGREVISION= 1
VERSION= 2.9.8
CATEGORIES= sysutils
MASTER_SITES= -https://github.com/facebook/watchman/archive/v${VERSION}.tar.gz
diff --git a/sysutils/watchman/distinfo b/sysutils/watchman/distinfo
index 4fc63f83491..f39997f44fd 100644
--- a/sysutils/watchman/distinfo
+++ b/sysutils/watchman/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.2 2014/08/09 23:08:41 wiz Exp $
+$NetBSD: distinfo,v 1.3 2014/08/23 20:13:59 wiz Exp $
SHA1 (watchman-2.9.8.tar.gz) = f2ddfb5d42dce32da71dd789f63b705526fc9758
RMD160 (watchman-2.9.8.tar.gz) = f312d38f24ce87ca251753926f73c998895234c1
Size (watchman-2.9.8.tar.gz) = 183007 bytes
-SHA1 (patch-configure.ac) = 2b4658cd9e645b85ec33b0618f9581de9565e506
-SHA1 (patch-fstype.c) = f4664263e4e34663c9b8c3aa66ca3ba6f125c5c5
+SHA1 (patch-configure.ac) = e6893b2258351714e10e3bcc120250dda4c7031a
+SHA1 (patch-fstype.c) = f5b99113e97a22fc340d347fbf5397165d20bcd8
+SHA1 (patch-watchman.h) = 833693d8cfd782cb0ba085a48bdf4848e3696bd3
diff --git a/sysutils/watchman/patches/patch-configure.ac b/sysutils/watchman/patches/patch-configure.ac
index 340473ca2b9..45959929114 100644
--- a/sysutils/watchman/patches/patch-configure.ac
+++ b/sysutils/watchman/patches/patch-configure.ac
@@ -1,8 +1,8 @@
-$NetBSD: patch-configure.ac,v 1.2 2014/08/09 23:08:41 wiz Exp $
+$NetBSD: patch-configure.ac,v 1.3 2014/08/23 20:13:59 wiz Exp $
Fix unportable test(1) construct.
https://github.com/facebook/watchman/issues/48
-
+https://github.com/facebook/watchman/pull/54
--- configure.ac.orig 2014-05-20 21:14:24.000000000 +0000
+++ configure.ac
@@ -88,7 +88,7 @@ AC_ARG_WITH(pcre, [
@@ -14,7 +14,16 @@ https://github.com/facebook/watchman/issues/48
pcre_config="pcre-config"
fi
-@@ -187,11 +187,11 @@ AC_CHECK_FUNCS(backtrace backtrace_symbo
+@@ -183,15 +183,20 @@ AC_CHECK_HEADERS(CoreServices/CoreServic
+ ])
+ AC_CHECK_FUNCS(backtrace backtrace_symbols)
+
++if test -n "$ac_cv_header_sys_statvfs_h"; then
++AC_CHECK_MEMBERS([struct statvfs.f_fstypename,struct statvfs.f_basetype],
++ [AC_DEFINE([STATVFS_HAS_FSTYPE_AS_STRING], [1],[if statvfs holds fstype as string])],[],[[#include <sys/statvfs.h>]])
++fi
++
+ # Do this after we've looked for functions
if test -n "$GCC" ; then
CFLAGS="$CFLAGS -Wall -Wextra -Wdeclaration-after-statement -g -gdwarf-2 -fno-omit-frame-pointer"
fi
diff --git a/sysutils/watchman/patches/patch-fstype.c b/sysutils/watchman/patches/patch-fstype.c
index 135116e95fa..9f57909c0c0 100644
--- a/sysutils/watchman/patches/patch-fstype.c
+++ b/sysutils/watchman/patches/patch-fstype.c
@@ -1,22 +1,24 @@
-$NetBSD: patch-fstype.c,v 1.2 2014/08/09 23:08:41 wiz Exp $
+$NetBSD: patch-fstype.c,v 1.3 2014/08/23 20:13:59 wiz Exp $
NetBSD also supports statvfs, adapt checks.
https://github.com/facebook/watchman/issues/49
+https://github.com/facebook/watchman/pull/54
--- fstype.c.orig 2014-05-20 21:14:24.000000000 +0000
+++ fstype.c
-@@ -53,11 +53,15 @@ w_string_t *w_fstype(const char *path)
+@@ -53,11 +53,16 @@ w_string_t *w_fstype(const char *path)
}
return w_string_new(name);
-#elif defined(sun)
-+#elif HAVE_SYS_STATVFS_H
++#elif STATVFS_HAS_FSTYPE_AS_STRING
struct statvfs sfs;
if (statvfs(path, &sfs) == 0) {
-+#ifdef __NetBSD__
++#ifdef HAVE_STRUCT_STATVFS_F_FSTYPENAME
+ return w_string_new(sfs.f_fstypename);
-+#else
++#endif
++#ifdef HAVE_STRUCT_STATVFS_F_BASETYPE
return w_string_new(sfs.f_basetype);
+#endif
}
diff --git a/sysutils/watchman/patches/patch-watchman.h b/sysutils/watchman/patches/patch-watchman.h
new file mode 100644
index 00000000000..af453b2659c
--- /dev/null
+++ b/sysutils/watchman/patches/patch-watchman.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-watchman.h,v 1.1 2014/08/23 20:13:59 wiz Exp $
+* NetBSD bfore 6.99 uses BSD-style subsecond timespec
+https://github.com/facebook/watchman/pull/54
+--- watchman.h.orig 2014-05-20 21:14:24.000000000 +0000
++++ watchman.h 2014-08-22 11:54:55.000000000 +0000
+@@ -62,6 +62,9 @@
+ #include <sysexits.h>
+ #include <spawn.h>
+ #include <stddef.h>
++#ifdef HAVE_SYS_PARAM_H
++# include <sys/param.h>
++#endif
+ // Not explicitly exported on Darwin, so we get to define it.
+ extern char **environ;
+
+@@ -575,7 +578,7 @@
+ #define WATCHMAN_NSEC_IN_SEC (1000 * 1000 * 1000)
+ #define WATCHMAN_NSEC_IN_MSEC 1000000
+
+-#if defined(__APPLE__) || defined(__FreeBSD__)
++#if defined(__APPLE__) || defined(__FreeBSD__) || (defined(__NetBSD__) && (__NetBSD_Version__ < 6099000000))
+ /* BSD-style subsecond timespec */
+ #define WATCHMAN_ST_TIMESPEC(type) st_##type##timespec
+ #else