summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-03-20 21:24:44 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-03-20 21:24:44 +0000
commit566dab8f8d1b938bd209b616c1da82601373dccc (patch)
tree0581e07370407ae85c49a0698df6ff3c579e69c8
parent- Update to 0.17a (diff)
Contained herein are bindings to allow you to interface php scripts with RRD
tool directly via RRD tool's 'librrd' library, thus avoiding the need to use system() calls to the rrdtool binary. WWW: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/contrib/php_rrdtool.txt PR: ports/94704 Submitted by: Rick van der Zwet <rick@wzoeterwoude.net>
-rw-r--r--databases/php5-rrdtool/files/patch-config.m455
-rw-r--r--databases/php5-rrdtool/pkg-descr5
-rw-r--r--net/Makefile1
-rw-r--r--net/php5-rrdtool/files/patch-config.m455
-rw-r--r--net/php5-rrdtool/pkg-descr5
5 files changed, 121 insertions, 0 deletions
diff --git a/databases/php5-rrdtool/files/patch-config.m4 b/databases/php5-rrdtool/files/patch-config.m4
new file mode 100644
index 000000000000..733aa4b443b5
--- /dev/null
+++ b/databases/php5-rrdtool/files/patch-config.m4
@@ -0,0 +1,55 @@
+--- config.m4.orig Wed Nov 30 19:44:51 2005
++++ config.m4 Sun Mar 19 20:48:34 2006
+@@ -13,7 +13,7 @@
+ [ --with-rrdtool[=DIR] Include rrdtool support (requires rrdtool >= 1.0.49).])
+
+ if test "$PHP_RRDTOOL" != "no"; then
+-
++ PHP_NEW_EXTENSION(rrdtool, rrdtool.c, $ext_shared)
+ if test "$PHP_RRDTOOL" != "yes"; then
+ AC_MSG_CHECKING(if rrdtool specified path is valid)
+ if test -r $PHP_RRDTOOL/include/rrd.h && test -f $PHP_RRDTOOL/lib/librrd.$SHLIB_SUFFIX_NAME -o -f $PHP_RRDTOOL/lib/librrd.a; then # path given as parameter
+@@ -51,7 +51,14 @@
+ fi
+ fi
+
+-dnl Finish the setup
++
++ dnl PHP Libaries include
++ AC_DEFINE(HAVE_RRDTOOL,1,[ ])
++ PHP_SUBST(RRDTOOL_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(rrd, $RRDTOOL_LIBDIR, RRDTOOL_SHARED_LIBADD)
++ PHP_ADD_INCLUDE($RRDTOOL_INCDIR)
++
++ dnl Finish the setup
+
+ RRD_H_PATH="$RRDTOOL_INCDIR/rrd.h"
+ PHP_RRDTOOL_DIR=$RRDTOOL_DIR
+@@ -59,14 +66,9 @@
+
+ PHP_CHECK_LIBRARY(rrd, rrd_create,
+ [],[
+- PHP_CHECK_LIBRARY(rrd, rrd_create,
+- [],[
+- AC_MSG_ERROR([wrong rrd lib version or lib not found])
+- ],[
+- -L$RRDTOOL_LIBDIR -ldl
+- ])
++ AC_MSG_ERROR([wrong rrd lib version or lib not found])
+ ],[
+- -L$RRDTOOL_LIBDIR -ldl
++ -L$RRDTOOL_LIBDIR
+ ])
+
+ AC_MSG_CHECKING([rrdtool version])
+@@ -87,10 +89,4 @@
+ if test "$ac_cv_rrdversion" = yes; then
+ AC_DEFINE(HAVE_RRD_12X, 1, [Whether you have rrd_verion])
+ fi
+-
+- PHP_ADD_LIBRARY_WITH_PATH(rrd, $RRDTOOL_LIBDIR, RRDTOOL_SHARED_LIBADD)
+-
+- PHP_NEW_EXTENSION(rrdtool, rrdtool.c, $ext_shared)
+- PHP_SUBST(RRDTOOL_SHARED_LIBADD)
+- AC_DEFINE(HAVE_RRDTOOL, 1, [ ])
+ fi
diff --git a/databases/php5-rrdtool/pkg-descr b/databases/php5-rrdtool/pkg-descr
new file mode 100644
index 000000000000..0e3d378eb184
--- /dev/null
+++ b/databases/php5-rrdtool/pkg-descr
@@ -0,0 +1,5 @@
+Contained herein are bindings to allow you to interface php scripts with RRD
+tool directly via RRD tool's 'librrd' library, thus avoiding the need to use
+system() calls to the rrdtool binary.
+
+WWW: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/contrib/php_rrdtool.txt
diff --git a/net/Makefile b/net/Makefile
index 9079dbe50dfd..003768693a45 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -517,6 +517,7 @@
SUBDIR += php4-xmlrpc
SUBDIR += php4-yp
SUBDIR += php5-ldap
+ SUBDIR += php5-rrdtool
SUBDIR += php5-soap
SUBDIR += php5-sockets
SUBDIR += php5-xmlrpc
diff --git a/net/php5-rrdtool/files/patch-config.m4 b/net/php5-rrdtool/files/patch-config.m4
new file mode 100644
index 000000000000..733aa4b443b5
--- /dev/null
+++ b/net/php5-rrdtool/files/patch-config.m4
@@ -0,0 +1,55 @@
+--- config.m4.orig Wed Nov 30 19:44:51 2005
++++ config.m4 Sun Mar 19 20:48:34 2006
+@@ -13,7 +13,7 @@
+ [ --with-rrdtool[=DIR] Include rrdtool support (requires rrdtool >= 1.0.49).])
+
+ if test "$PHP_RRDTOOL" != "no"; then
+-
++ PHP_NEW_EXTENSION(rrdtool, rrdtool.c, $ext_shared)
+ if test "$PHP_RRDTOOL" != "yes"; then
+ AC_MSG_CHECKING(if rrdtool specified path is valid)
+ if test -r $PHP_RRDTOOL/include/rrd.h && test -f $PHP_RRDTOOL/lib/librrd.$SHLIB_SUFFIX_NAME -o -f $PHP_RRDTOOL/lib/librrd.a; then # path given as parameter
+@@ -51,7 +51,14 @@
+ fi
+ fi
+
+-dnl Finish the setup
++
++ dnl PHP Libaries include
++ AC_DEFINE(HAVE_RRDTOOL,1,[ ])
++ PHP_SUBST(RRDTOOL_SHARED_LIBADD)
++ PHP_ADD_LIBRARY_WITH_PATH(rrd, $RRDTOOL_LIBDIR, RRDTOOL_SHARED_LIBADD)
++ PHP_ADD_INCLUDE($RRDTOOL_INCDIR)
++
++ dnl Finish the setup
+
+ RRD_H_PATH="$RRDTOOL_INCDIR/rrd.h"
+ PHP_RRDTOOL_DIR=$RRDTOOL_DIR
+@@ -59,14 +66,9 @@
+
+ PHP_CHECK_LIBRARY(rrd, rrd_create,
+ [],[
+- PHP_CHECK_LIBRARY(rrd, rrd_create,
+- [],[
+- AC_MSG_ERROR([wrong rrd lib version or lib not found])
+- ],[
+- -L$RRDTOOL_LIBDIR -ldl
+- ])
++ AC_MSG_ERROR([wrong rrd lib version or lib not found])
+ ],[
+- -L$RRDTOOL_LIBDIR -ldl
++ -L$RRDTOOL_LIBDIR
+ ])
+
+ AC_MSG_CHECKING([rrdtool version])
+@@ -87,10 +89,4 @@
+ if test "$ac_cv_rrdversion" = yes; then
+ AC_DEFINE(HAVE_RRD_12X, 1, [Whether you have rrd_verion])
+ fi
+-
+- PHP_ADD_LIBRARY_WITH_PATH(rrd, $RRDTOOL_LIBDIR, RRDTOOL_SHARED_LIBADD)
+-
+- PHP_NEW_EXTENSION(rrdtool, rrdtool.c, $ext_shared)
+- PHP_SUBST(RRDTOOL_SHARED_LIBADD)
+- AC_DEFINE(HAVE_RRDTOOL, 1, [ ])
+ fi
diff --git a/net/php5-rrdtool/pkg-descr b/net/php5-rrdtool/pkg-descr
new file mode 100644
index 000000000000..0e3d378eb184
--- /dev/null
+++ b/net/php5-rrdtool/pkg-descr
@@ -0,0 +1,5 @@
+Contained herein are bindings to allow you to interface php scripts with RRD
+tool directly via RRD tool's 'librrd' library, thus avoiding the need to use
+system() calls to the rrdtool binary.
+
+WWW: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/contrib/php_rrdtool.txt