[-]
[+]
|
Added |
rrdtool-CentOS_5.spec
|
|
[-]
[+]
|
Added |
rrdtool-1.2.13-php.patch
^
|
@@ -0,0 +1,1095 @@
+diff -Naur php4-orig/config.m4 php4/config.m4
+--- php4-orig/config.m4 2006-06-05 15:56:46.000000000 -0400
++++ php4/config.m4 2006-06-07 15:59:40.000000000 -0400
+@@ -1,24 +1,96 @@
+-dnl $Id: config.m4 9 2001-02-25 22:30:32Z oetiker $
++dnl $Id$
++dnl config.m4 for extension rrdtool
+
+-PHP_ARG_WITH(rrdtool, for RRDTool support,
+-[ --with-rrdtool[=DIR] Include RRDTool support. DIR is the rrdtool
+- install directory.])
++dnl Comments in this file start with the string 'dnl'.
++dnl Remove where necessary. This file will not work
++dnl without editing.
++
++dnl
++dnl Checks for the configure options
++dnl
++
++PHP_ARG_WITH(rrdtool, for rrdtool support,
++[ --with-rrdtool[=DIR] Include rrdtool support (requires rrdtool >= 1.0.49).])
+
+ if test "$PHP_RRDTOOL" != "no"; then
+- for i in /usr/local /usr /opt/rrdtool /usr/local/rrdtool $PHP_RRDTOOL; do
+- if test -f $i/include/rrd.h; then
+- RRDTOOL_DIR=$i
+- fi
+- done
+
+- if test -z "$RRDTOOL_DIR"; then
+- AC_MSG_ERROR(Please reinstall rrdtool, or specify a directory - I cannot find rrd.h)
++ 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
++ RRDTOOL_DIR=$PHP_RRDTOOL
++ RRDTOOL_INCDIR=$PHP_RRDTOOL/include
++ RRDTOOL_LIBDIR=$PHP_RRDTOOL/lib
++ AC_MSG_RESULT([yes])
++ else
++ AC_MSG_RESULT([no])
++ AC_MSG_ERROR([The specified RRDTool path is Invalid or the installation is incomplete
++ Please specify another path or reinstall the rrdtool distribution])
++ fi
++ else
++ dnl Header path
++ AC_MSG_CHECKING([for rrdtool header files in default path])
++ for i in /usr/local/rrdtool /usr/local /usr /opt ""; do
++ test -r $i/include/rrd.h && RRDTOOL_DIR=$i && RRDTOOL_INCDIR=$i/include
++ done
++ if test -z "$RRDTOOL_INCDIR"; then
++ AC_MSG_RESULT([not found])
++ AC_MSG_ERROR([Please reinstall the rrdtool distribution])
++ else
++ AC_MSG_RESULT(found in $RRDTOOL_INCDIR)
++ fi
++ dnl Library path
++ AC_MSG_CHECKING([for rrdtool library files in default path])
++ for i in librrd.$SHLIB_SUFFIX_NAME librrd.a; do
++ test -f $RRDTOOL_DIR/lib/$i && RRDTOOL_LIBDIR=$RRDTOOL_DIR/lib
++ done
++ if test -z "$RRDTOOL_LIBDIR"; then
++ AC_MSG_RESULT([not found])
++ AC_MSG_ERROR([Please reinstall the rrdtool distribution])
++ else
++ AC_MSG_RESULT(found in $RRDTOOL_LIBDIR)
++ fi
+ fi
+- AC_ADD_INCLUDE($RRDTOOL_DIR/include)
+- AC_ADD_LIBRARY_WITH_PATH(rrd, $RRDTOOL_DIR/lib, RRDTOOL_SHARED_LIBADD)
+- PHP_SUBST(RRDTOOL_SHARED_LIBADD)
+
+- AC_DEFINE(HAVE_RRDTOOL,1,[ ])
++dnl Finish the setup
+
+- PHP_EXTENSION(rrdtool, $ext_shared)
++ RRD_H_PATH="$RRDTOOL_INCDIR/rrd.h"
++ PHP_RRDTOOL_DIR=$RRDTOOL_DIR
++ PHP_ADD_INCLUDE($RRDTOOL_INCDIR)
++
++ 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
++ ])
++ ],[
++ -L$RRDTOOL_LIBDIR -ldl
++ ])
++
++ AC_MSG_CHECKING([rrdtool version])
++ AC_TRY_COMPILE([
++#include <$RRD_H_PATH>
++ ], [int main() {
++ double some_variable;
++ some_variable = rrd_version();
++ }
++ ], [
++ AC_MSG_RESULT([1.2.x])
++ ac_cv_rrdversion=yes
++ ], [
++ AC_MSG_RESULT([1.0.x])
++ ac_cv_rrdversion=no
++ ])
++
++ 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 -Naur php4-orig/configure php4/configure
+--- php4-orig/configure 2006-06-06 09:31:42.000000000 -0400
++++ php4/configure 2006-06-07 15:56:06.000000000 -0400
+@@ -1159,6 +1159,7 @@
+
+ cat >> confdefs.h <<\EOF
+ #define HAVE_RRDTOOL 1
++#define HAVE_RRD_12X 1
+ EOF
+
+
+diff -Naur php4-orig/ltconfig php4/ltconfig
+--- php4-orig/ltconfig 2006-06-05 15:56:46.000000000 -0400
++++ php4/ltconfig 2006-06-07 17:16:50.000000000 -0400
+@@ -1247,7 +1247,8 @@
+
+ if test "$ld_shlibs" = yes; then
+ runpath_var=LD_RUN_PATH
+- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
++ #hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
++ hardcode_libdir_flag_spec=''
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ case $host_os in
+ cygwin* | mingw*)
+diff -Naur php4-orig/php_rrdtool.h php4/php_rrdtool.h
+--- php4-orig/php_rrdtool.h 2006-06-05 15:56:46.000000000 -0400
++++ php4/php_rrdtool.h 2006-06-07 17:26:07.000000000 -0400
+@@ -5,42 +5,60 @@
+ *
+ * Joe Miller, <joeym@inficad.com>,<joeym@ibizcorp.com>, 7/19/2000
+ *
+- * $Id: php_rrdtool.h 9 2001-02-25 22:30:32Z oetiker $
++ * $Id: php_rrdtool.h,v 1.1.1.1 2002/02/26 10:21:20 oetiker Exp $
+ *
+ */
+
+-#ifndef _PHP4_RRDTOOL_H
+-#define _PHP4_RRDTOOL_H
++#ifndef PHP_RRDTOOL_H
++#define PHP_RRDTOOL_H
+
+-#if COMPILE_DL
+-#undef HAVE_RRDTOOL
+-#define HAVE_RRDTOOL 1
++#ifdef PHP_WIN32
++#ifdef PHP_RRDTOOL_EXPORTS
++#define PHP_RRDTOOL_API __declspec(dllexport)
++#else
++#define PHP_RRDTOOL_API __declspec(dllimport)
+ #endif
+-#ifndef DLEXPORT
+-#define DLEXPORT
++#else
++#define PHP_RRDTOOL_API
+ #endif
+
+ #if HAVE_RRDTOOL
+
+-PHP_MINFO_FUNCTION(rrdtool);
+-
+ extern zend_module_entry rrdtool_module_entry;
+ #define rrdtool_module_ptr &rrdtool_module_entry
+-#define phpext_rrdtool_ptr rrdtool_module_ptr
+
++#ifdef ZTS
++#include "TSRM.h"
++#endif
++
++#define RRDTOOL_LOGO_GUID "PHP25B1F7E8-916B-11D9-9A54-000A95AE92DA"
++
++/* If you declare any globals in php_rrdtool.h uncomment this:
++ZEND_BEGIN_MODULE_GLOBALS(rrdtool)
++
++ZEND_END_MODULE_GLOBALS(rrdtool)
++ */
++
++PHP_MINIT_FUNCTION(rrdtool);
++PHP_MSHUTDOWN_FUNCTION(rrdtool);
++PHP_MINFO_FUNCTION(rrdtool);
++
++PHP_FUNCTION(rrd_graph);
++PHP_FUNCTION(rrd_fetch);
+ PHP_FUNCTION(rrd_error);
|
[-]
[+]
|
Added |
rrdtool-1.2.19-python.patch
^
|
@@ -0,0 +1,22 @@
+diff -uNr bindings/python-orig/Makefile.am bindings/python/Makefile.am
+--- bindings/python-orig/Makefile.am 2007-03-31 11:21:43.000000000 +0100
++++ bindings/python/Makefile.am 2007-03-31 11:24:47.000000000 +0100
+@@ -2,6 +2,7 @@
+
+ pyexec_PROGRAMS = rrdtoolmodule.so
+
++rrdtoolmodule_so_LDFLAGS = -module -shared
+ rrdtoolmodule_so_LDADD = $(top_builddir)/src/librrd.la
+ rrdtoolmodule_so_SOURCES = rrdtoolmodule.c
+
+diff -uNr bindings/python-orig/Makefile.in bindings/python/Makefile.in
+--- bindings/python-orig/Makefile.in 2007-03-31 11:21:43.000000000 +0100
++++ bindings/python/Makefile.in 2007-03-31 11:22:14.000000000 +0100
+@@ -233,6 +233,7 @@
+ target_os = @target_os@
+ target_vendor = @target_vendor@
+ AM_CPPFLAGS = @CFLAGS@ -I$(top_srcdir)/src @PYTHON_INCLUDES@
++rrdtoolmodule_so_LDFLAGS = -module -shared
+ rrdtoolmodule_so_LDADD = $(top_builddir)/src/librrd.la
+ rrdtoolmodule_so_SOURCES = rrdtoolmodule.c
+ noinst_HEADERS = rrd_extra.h
|
|
Added |
rrdtool-1.2.23.tar.gz
^
|