View | Details | Raw Unified | Return to bug 206156
Collapse All | Expand All

(-)Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	rrd
3
PORTNAME=	rrd
4
DISTVERSION=	1.1.3
4
DISTVERSION=	1.1.3
5
PORTREVISION=	1
5
PORTREVISION=	2
6
CATEGORIES=	databases pear
6
CATEGORIES=	databases pear
7
MASTER_SITES=	http://pecl.php.net/get/
7
MASTER_SITES=	http://pecl.php.net/get/
8
PKGNAMEPREFIX=	pecl-
8
PKGNAMEPREFIX=	pecl-
(-)files/patch-config.m4 (+24 lines)
Line 0 Link Here
1
--- config.m4.orig	2016-01-12 12:40:08 UTC
2
+++ config.m4
3
@@ -59,9 +59,11 @@ if test "$PHP_RRD" != "no"; then
4
   LDFLAGS="$LDFLAGS -L$RRDTOOL_LIBDIR"
5
 
6
   dnl rrd_graph_v is available in 1.3.0+
7
+  rrd_graph_c=""
8
   PHP_CHECK_FUNC(rrd_graph_v, rrd)
9
-  if test "$ac_cv_func_rrd_graph_v" != yes; then
10
-    AC_MSG_ERROR([rrd lib version seems older than 1.3.0, update to 1.3.0+])
11
+  if test "$ac_cv_func_rrd_graph_v" == yes; then
12
+    AC_DEFINE(HAVE_RRD_GRAPH, 1, [ ])
13
+    rrd_graph_c="rrd_graph.c"
14
   fi
15
 
16
   dnl rrd_lastupdate_r available in 1.4.0+
17
@@ -72,6 +74,6 @@ if test "$PHP_RRD" != "no"; then
18
 
19
   LDFLAGS=$old_LDFLAGS
20
 
21
-  PHP_NEW_EXTENSION(rrd, rrd.c rrd_graph.c rrd_create.c rrd_update.c rrd_info.c, $ext_shared)
22
+  PHP_NEW_EXTENSION(rrd, rrd.c $rrd_graph_c rrd_create.c rrd_update.c rrd_info.c, $ext_shared)
23
   PHP_SUBST(RRD_SHARED_LIBADD)
24
 fi
(-)files/patch-rrd.c (+81 lines)
Line 0 Link Here
1
--- rrd.c.orig	2016-01-12 12:42:39 UTC
2
+++ rrd.c
3
@@ -19,7 +19,9 @@
4
 #include <rrd.h>
5
 
6
 #include "php_rrd.h"
7
+#ifdef HAVE_RRD_GRAPH
8
 #include "rrd_graph.h"
9
+#endif
10
 #include "rrd_create.h"
11
 #include "rrd_update.h"
12
 #include "rrd_info.h"
13
@@ -387,6 +389,7 @@ PHP_FUNCTION(rrd_tune)
14
 }
15
 /* }}} */
16
 
17
+#ifdef HAVE_RRD_GRAPH
18
 /* {{{ proto array rrd_xport(array options)
19
  * Creates a graph based on options passed via an array
20
  */
21
@@ -480,6 +483,7 @@ PHP_FUNCTION(rrd_xport)
22
 	free(data);
23
 }
24
 /* }}} */
25
+#endif
26
 
27
 #ifdef HAVE_RRDC_DISCONNECT
28
 /* {{{ proto void rrdc_disconnect()
29
@@ -537,18 +541,22 @@ ZEND_BEGIN_ARG_INFO(arginfo_rrd_tune, 0)
30
 	ZEND_ARG_INFO(0, options)
31
 ZEND_END_ARG_INFO()
32
 
33
+#ifdef HAVE_RRD_GRAPH
34
 ZEND_BEGIN_ARG_INFO(arginfo_rrd_xport, 0)
35
 	ZEND_ARG_INFO(0, options)
36
 ZEND_END_ARG_INFO()
37
+#endif
38
 
39
 ZEND_BEGIN_ARG_INFO(arginfo_rrd_info, 0)
40
 	ZEND_ARG_INFO(0, file)
41
 ZEND_END_ARG_INFO()
42
 
43
+#ifdef HAVE_RRD_GRAPH
44
 ZEND_BEGIN_ARG_INFO(arginfo_rrd_graph, 0)
45
 	ZEND_ARG_INFO(0, file)
46
 	ZEND_ARG_INFO(0, options)
47
 ZEND_END_ARG_INFO()
48
+#endif
49
 
50
 ZEND_BEGIN_ARG_INFO(arginfo_rrd_create, 0)
51
 	ZEND_ARG_INFO(0, filename)
52
@@ -565,7 +573,9 @@ ZEND_END_ARG_INFO()
53
 static zend_function_entry rrd_functions[] = {
54
 	PHP_FE(rrd_update, arginfo_rrd_update)
55
 	PHP_FE(rrd_create, arginfo_rrd_create)
56
+#ifdef HAVE_RRD_GRAPH
57
 	PHP_FE(rrd_graph, arginfo_rrd_graph)
58
+#endif
59
 	PHP_FE(rrd_error, NULL)
60
 	PHP_FE(rrd_fetch, arginfo_rrd_fetch)
61
 	PHP_FE(rrd_first, arginfo_rrd_first)
62
@@ -574,7 +584,9 @@ static zend_function_entry rrd_functions
63
 	PHP_FE(rrd_lastupdate, arginfo_rrd_lastupdate)
64
 	PHP_FE(rrd_restore, arginfo_rrd_restore)
65
 	PHP_FE(rrd_tune, arginfo_rrd_tune)
66
+#ifdef HAVE_RRD_GRAPH
67
 	PHP_FE(rrd_xport, arginfo_rrd_xport)
68
+#endif
69
 #ifdef HAVE_RRDC_DISCONNECT
70
 	PHP_FE(rrdc_disconnect, NULL)
71
 #endif
72
@@ -590,7 +602,9 @@ static zend_function_entry rrd_functions
73
 /* {{{ PHP_MINIT_FUNCTION */
74
 static PHP_MINIT_FUNCTION(rrd)
75
 {
76
+#ifdef HAVE_RRD_GRAPH
77
 	rrd_graph_minit(TSRMLS_C);
78
+#endif
79
 	rrd_create_minit(TSRMLS_C);
80
 	rrd_update_minit(TSRMLS_C);
81
 	return SUCCESS;

Return to bug 206156