aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--devel/pecl-statgrab/Makefile6
-rw-r--r--devel/pecl-statgrab/files/php_statgrab.h.patch13
2 files changed, 19 insertions, 0 deletions
diff --git a/devel/pecl-statgrab/Makefile b/devel/pecl-statgrab/Makefile
index 73f95a12edc0..9328614fde2a 100644
--- a/devel/pecl-statgrab/Makefile
+++ b/devel/pecl-statgrab/Makefile
@@ -7,6 +7,7 @@
PORTNAME= statgrab
PORTVERSION= 0.4
+PORTREVISION= 1
CATEGORIES= devel pear
MASTER_SITES= http://pecl.php.net/get/
PKGNAMEPREFIX= pecl-
@@ -31,4 +32,9 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
EXTRA_LIBS= -lkvm
.endif
+.if ${PHP_VER} < 5
+post-patch:
+ @${PATCH} -d ${WRKSRC} -p0 < ${FILESDIR}/php_statgrab.h.patch
+.endif
+
.include <bsd.port.post.mk>
diff --git a/devel/pecl-statgrab/files/php_statgrab.h.patch b/devel/pecl-statgrab/files/php_statgrab.h.patch
new file mode 100644
index 000000000000..0d5c1e159d50
--- /dev/null
+++ b/devel/pecl-statgrab/files/php_statgrab.h.patch
@@ -0,0 +1,13 @@
+--- php_statgrab.h.bak Sat Apr 16 13:48:58 2005
++++ php_statgrab.h Sat Apr 16 13:49:01 2005
+@@ -55,6 +55,10 @@
+ PHP_FUNCTION(sg_user_stats);
+ PHP_FUNCTION(sg_network_iface_stats);
+
++#ifdef snprintf
++#undef snprintf
++#endif
++
+ #endif /* PHP_STATGRAB_H */
+
+