summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-07-13 09:11:47 +0000
committerEric Bénard <eric@eukrea.com>2012-07-13 11:26:06 +0200
commit32afac217b40e313c39baba73dc7023a26099e4b (patch)
tree991d104ae1573bf8724b2c5e6792e50353fd3e21
parent6c0ca58ecd44d5f9048bb1972c534bca48667dad (diff)
downloadmeta-openembedded-32afac217b40e313c39baba73dc7023a26099e4b.tar.gz
rrdtool: add 1.4.7
All binding are disabled since they are not safe for cross-compilation. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Eric Bénard <eric@eukrea.com>
-rw-r--r--meta-oe/recipes-extended/rrdtool/rrdtool/0001-rrdtool-eradicate-tcl-support.patch1733
-rw-r--r--meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb33
2 files changed, 1766 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rrdtool/rrdtool/0001-rrdtool-eradicate-tcl-support.patch b/meta-oe/recipes-extended/rrdtool/rrdtool/0001-rrdtool-eradicate-tcl-support.patch
new file mode 100644
index 000000000..1157dc720
--- /dev/null
+++ b/meta-oe/recipes-extended/rrdtool/rrdtool/0001-rrdtool-eradicate-tcl-support.patch
@@ -0,0 +1,1733 @@
1From 2dcb4bb8aadfead3e77bdb78b96ec8022e605a0d Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Sat, 12 May 2012 20:41:35 +0200
4Subject: [PATCH] rrdtool: eradicate tcl support
5
6TCL breaks autoreconf
7
8Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
9---
10 Makefile.am | 3 -
11 bindings/Makefile.am | 5 +-
12 bindings/tcl/Makefile.am | 58 ----
13 bindings/tcl/Makefile.in | 668 ------------------------------------
14 bindings/tcl/README | 31 --
15 bindings/tcl/ifOctets.tcl.in | 45 ---
16 bindings/tcl/tclrrd.c | 762 ------------------------------------------
17 configure.ac | 54 ---
18 8 files changed, 1 insertion(+), 1625 deletions(-)
19 delete mode 100644 bindings/tcl/Makefile.am
20 delete mode 100644 bindings/tcl/Makefile.in
21 delete mode 100644 bindings/tcl/README
22 delete mode 100644 bindings/tcl/ifOctets.tcl.in
23 delete mode 100644 bindings/tcl/tclrrd.c
24
25diff --git a/Makefile.am b/Makefile.am
26index 2003373..969e36b 100644
27--- a/Makefile.am
28+++ b/Makefile.am
29@@ -36,9 +36,6 @@ site-perl-install: all bindings/perl-piped/Makefile bindings/perl-shared/Makefil
30 cd bindings/perl-piped && $(MAKE) install
31 cd bindings/perl-shared && $(MAKE) install
32
33-site-tcl-install: all
34- cd bindings/tcl && $(MAKE) tcl-install
35-
36 site-python-install: all
37 cd bindings/python && $(PYTHON) setup.py install $(if $(DESTDIR),--root=$(DESTDIR))
38
39diff --git a/bindings/Makefile.am b/bindings/Makefile.am
40index c4fdc10..3574a60 100644
41--- a/bindings/Makefile.am
42+++ b/bindings/Makefile.am
43@@ -1,13 +1,10 @@
44 .PHONY: python ruby
45
46-if BUILD_TCL
47-SUB_tcl = tcl
48-endif
49 if BUILD_LUA
50 SUB_lua = lua
51 endif
52
53-SUBDIRS = $(SUB_tcl) $(SUB_lua)
54+SUBDIRS = $(SUB_lua)
55
56 # the following files are not mentioned in any other Makefile
57 EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-piped/RRDp.pm perl-piped/t/base.t \
58diff --git a/bindings/tcl/Makefile.am b/bindings/tcl/Makefile.am
59deleted file mode 100644
60index c0e8b0f..0000000
61--- a/bindings/tcl/Makefile.am
62+++ /dev/null
63@@ -1,58 +0,0 @@
64-
65-EXTRA_DIST = README tclrrd.c
66-
67-VERSION = @VERSION@
68-
69-AM_CFLAGS = @CFLAGS@
70-### no including this by default @WERROR@
71-
72-TCL_PREFIX = @TCL_PREFIX@
73-TCL_SHLIB_LD = @TCL_SHLIB_LD@
74-TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
75-TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
76-TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
77-TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@
78-TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
79-TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@
80-
81-CLEANFILES = tclrrd.o tclrrd.so
82-
83-SRC_DIR = $(top_srcdir)/src
84-AM_CPPFLAGS = $(TCL_INCLUDE_SPEC) -I$(SRC_DIR) -DUSE_TCL_STUBS
85-LIBDIRS = -L$(top_builddir)/src/.libs -L$(top_builddir)/src -L$(libdir)
86-LIB_RUNTIME_DIR = $(libdir)
87-
88-if BUILD_TCL_SITE
89-tclpkgdir = @TCL_PACKAGE_DIR@
90-tclpkg_DATA = pkgIndex.tcl
91-tclpkg_SCRIPTS = ifOctets.tcl
92-else
93-pkglib_DATA = pkgIndex.tcl
94-pkglib_SCRIPTS = ifOctets.tcl
95-endif
96-
97-# Automake doen't like `tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)' as
98-# library name. So we build and install this library `by hand'.
99-#
100-# We do, however, specify a lib_LIBRARIES target such that
101-# automake creates the directory (if neecessary).
102-#
103-TCL_RRD_LIB = tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)
104-
105-lib_LIBRARIES =
106-
107-all-local: $(TCL_RRD_LIB)
108-
109-$(TCL_RRD_LIB): tclrrd.o
110- $(TCL_SHLIB_LD) $(TCL_LD_SEARCH_FLAGS) $(LIBDIRS) $< -o $@ -lrrd_th -lm $(TCL_STUB_LIB_SPEC) $(LDFLAGS) $(LIBS)
111-
112-tclrrd.o: tclrrd.c
113- $(CC) $(AM_CFLAGS) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(AM_CPPFLAGS) -c tclrrd.c -DVERSION=\"$(VERSION)\"
114-
115-pkgIndex.tcl:
116- echo "package ifneeded Rrd $(VERSION) \"load $(libdir)/tclrrd$(VERSION)[info sharedlibextension]\"" > $@
117-
118-install-exec-local: $(TCL_RRD_LIB)
119- @$(NORMAL_INSTALL)
120- $(INSTALL_PROGRAM) $(TCL_RRD_LIB) $(DESTDIR)$(libdir)/$(TCL_RRD_LIB)
121-
122diff --git a/bindings/tcl/Makefile.in b/bindings/tcl/Makefile.in
123deleted file mode 100644
124index 0a36517..0000000
125--- a/bindings/tcl/Makefile.in
126+++ /dev/null
127@@ -1,668 +0,0 @@
128-# Makefile.in generated by automake 1.11 from Makefile.am.
129-# @configure_input@
130-
131-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
132-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
133-# Inc.
134-# This Makefile.in is free software; the Free Software Foundation
135-# gives unlimited permission to copy and/or distribute it,
136-# with or without modifications, as long as this notice is preserved.
137-
138-# This program is distributed in the hope that it will be useful,
139-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
140-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
141-# PARTICULAR PURPOSE.
142-
143-@SET_MAKE@
144-
145-
146-
147-VPATH = @srcdir@
148-pkgdatadir = $(datadir)/@PACKAGE@
149-pkgincludedir = $(includedir)/@PACKAGE@
150-pkglibdir = $(libdir)/@PACKAGE@
151-pkglibexecdir = $(libexecdir)/@PACKAGE@
152-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
153-install_sh_DATA = $(install_sh) -c -m 644
154-install_sh_PROGRAM = $(install_sh) -c
155-install_sh_SCRIPT = $(install_sh) -c
156-INSTALL_HEADER = $(INSTALL_DATA)
157-transform = $(program_transform_name)
158-NORMAL_INSTALL = :
159-PRE_INSTALL = :
160-POST_INSTALL = :
161-NORMAL_UNINSTALL = :
162-PRE_UNINSTALL = :
163-POST_UNINSTALL = :
164-build_triplet = @build@
165-host_triplet = @host@
166-target_triplet = @target@
167-subdir = bindings/tcl
168-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
169- $(srcdir)/ifOctets.tcl.in
170-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
171-am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
172- $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
173- $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
174- $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
175- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
176- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
177- $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
178- $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
179- $(top_srcdir)/configure.ac
180-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
181- $(ACLOCAL_M4)
182-mkinstalldirs = $(install_sh) -d
183-CONFIG_HEADER = $(top_builddir)/rrd_config.h
184-CONFIG_CLEAN_FILES = ifOctets.tcl
185-CONFIG_CLEAN_VPATH_FILES =
186-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
187-am__vpath_adj = case $$p in \
188- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
189- *) f=$$p;; \
190- esac;
191-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
192-am__install_max = 40
193-am__nobase_strip_setup = \
194- srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
195-am__nobase_strip = \
196- for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
197-am__nobase_list = $(am__nobase_strip_setup); \
198- for p in $$list; do echo "$$p $$p"; done | \
199- sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
200- $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
201- if (++n[$$2] == $(am__install_max)) \
202- { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
203- END { for (dir in files) print dir, files[dir] }'
204-am__base_list = \
205- sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
206- sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
207-am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibdir)" \
208- "$(DESTDIR)$(tclpkgdir)" "$(DESTDIR)$(pkglibdir)" \
209- "$(DESTDIR)$(tclpkgdir)"
210-LIBRARIES = $(lib_LIBRARIES)
211-SCRIPTS = $(pkglib_SCRIPTS) $(tclpkg_SCRIPTS)
212-AM_V_GEN = $(am__v_GEN_$(V))
213-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
214-am__v_GEN_0 = @echo " GEN " $@;
215-AM_V_at = $(am__v_at_$(V))
216-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
217-am__v_at_0 = @
218-SOURCES =
219-DIST_SOURCES =
220-DATA = $(pkglib_DATA) $(tclpkg_DATA)
221-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
222-ACLOCAL = @ACLOCAL@
223-ALL_LIBS = @ALL_LIBS@
224-AMTAR = @AMTAR@
225-AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
226-AR = @AR@
227-AUTOCONF = @AUTOCONF@
228-AUTOHEADER = @AUTOHEADER@
229-AUTOMAKE = @AUTOMAKE@
230-AWK = @AWK@
231-CC = @CC@
232-CCDEPMODE = @CCDEPMODE@
233-CFLAGS = @CFLAGS@
234-COMP_LUA = @COMP_LUA@
235-COMP_PERL = @COMP_PERL@
236-COMP_PYTHON = @COMP_PYTHON@
237-COMP_RUBY = @COMP_RUBY@
238-CORE_LIBS = @CORE_LIBS@
239-CPP = @CPP@
240-CPPFLAGS = @CPPFLAGS@
241-CYGPATH_W = @CYGPATH_W@
242-DEFS = @DEFS@
243-DEPDIR = @DEPDIR@
244-DSYMUTIL = @DSYMUTIL@
245-DUMPBIN = @DUMPBIN@
246-ECHO_C = @ECHO_C@
247-ECHO_N = @ECHO_N@
248-ECHO_T = @ECHO_T@
249-EGREP = @EGREP@
250-EXEEXT = @EXEEXT@
251-FGREP = @FGREP@
252-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
253-GMSGFMT = @GMSGFMT@
254-GMSGFMT_015 = @GMSGFMT_015@
255-GREP = @GREP@
256-INSTALL = @INSTALL@
257-INSTALL_DATA = @INSTALL_DATA@
258-INSTALL_PROGRAM = @INSTALL_PROGRAM@
259-INSTALL_SCRIPT = @INSTALL_SCRIPT@
260-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
261-INTLLIBS = @INTLLIBS@
262-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
263-LD = @LD@
264-LDFLAGS = @LDFLAGS@
265-LIBICONV = @LIBICONV@
266-LIBINTL = @LIBINTL@
267-LIBOBJS = @LIBOBJS@
268-LIBS = @LIBS@
269-LIBTOOL = @LIBTOOL@
270-LIBVERS = @LIBVERS@
271-LIPO = @LIPO@
272-LN_S = @LN_S@
273-LTLIBICONV = @LTLIBICONV@
274-LTLIBINTL = @LTLIBINTL@
275-LTLIBOBJS = @LTLIBOBJS@
276-LUA = @LUA@
277-LUA_CFLAGS = @LUA_CFLAGS@
278-LUA_DEFINES = @LUA_DEFINES@
279-LUA_INSTALL_CMOD = @LUA_INSTALL_CMOD@
280-LUA_INSTALL_LMOD = @LUA_INSTALL_LMOD@
281-LUA_LFLAGS = @LUA_LFLAGS@
282-MAINT = @MAINT@
283-MAKEINFO = @MAKEINFO@
284-MKDIR_P = @MKDIR_P@
285-MSGFMT = @MSGFMT@
286-MSGFMT_015 = @MSGFMT_015@
287-MSGMERGE = @MSGMERGE@
288-MULTITHREAD_CFLAGS = @MULTITHREAD_CFLAGS@
289-MULTITHREAD_LDFLAGS = @MULTITHREAD_LDFLAGS@
290-NM = @NM@
291-NMEDIT = @NMEDIT@
292-NROFF = @NROFF@
293-NUMVERS = @NUMVERS@
294-OBJDUMP = @OBJDUMP@
295-OBJEXT = @OBJEXT@
296-OTOOL = @OTOOL@
297-OTOOL64 = @OTOOL64@
298-PACKAGE = @PACKAGE@
299-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
300-PACKAGE_NAME = @PACKAGE_NAME@
301-PACKAGE_STRING = @PACKAGE_STRING@
302-PACKAGE_TARNAME = @PACKAGE_TARNAME@
303-PACKAGE_VERSION = @PACKAGE_VERSION@
304-PATH_SEPARATOR = @PATH_SEPARATOR@
305-PERL = @PERL@
306-PERLCC = @PERLCC@
307-PERLCCFLAGS = @PERLCCFLAGS@
308-PERLFLAGS = @PERLFLAGS@
309-PERLLD = @PERLLD@
310-PERLLDFLAGS = @PERLLDFLAGS@
311-PERL_CC = @PERL_CC@
312-PERL_MAKE_OPTIONS = @PERL_MAKE_OPTIONS@
313-PERL_VERSION = @PERL_VERSION@
314-PKGCONFIG = @PKGCONFIG@
315-POD2HTML = @POD2HTML@
316-POD2MAN = @POD2MAN@
317-POSUB = @POSUB@
318-PTHREAD_CC = @PTHREAD_CC@
319-PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
320-PTHREAD_LIBS = @PTHREAD_LIBS@
321-PYTHON = @PYTHON@
322-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
323-PYTHON_INCLUDES = @PYTHON_INCLUDES@
324-PYTHON_PLATFORM = @PYTHON_PLATFORM@
325-PYTHON_PREFIX = @PYTHON_PREFIX@
326-PYTHON_VERSION = @PYTHON_VERSION@
327-RANLIB = @RANLIB@
328-RRDDOCDIR = @RRDDOCDIR@
329-RRDGRAPH_YLEGEND_ANGLE = @RRDGRAPH_YLEGEND_ANGLE@
330-RRD_DEFAULT_FONT = @RRD_DEFAULT_FONT@
331-RRD_GETOPT_LONG = @RRD_GETOPT_LONG@
332-RUBY = @RUBY@
333-RUBY_MAKE_OPTIONS = @RUBY_MAKE_OPTIONS@
334-SED = @SED@
335-SET_MAKE = @SET_MAKE@
336-SHELL = @SHELL@
337-STRIP = @STRIP@
338-TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@
339-TCL_LD_SEARCH_FLAGS = @TCL_LD_SEARCH_FLAGS@
340-TCL_PACKAGE_DIR = @TCL_PACKAGE_DIR@
341-TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
342-### no including this by default @WERROR@
343-TCL_PREFIX = @TCL_PREFIX@
344-TCL_SHLIB_CFLAGS = @TCL_SHLIB_CFLAGS@
345-TCL_SHLIB_LD = @TCL_SHLIB_LD@
346-TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
347-TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
348-TCL_VERSION = @TCL_VERSION@
349-TROFF = @TROFF@
350-USE_NLS = @USE_NLS@
351-VERSION = @VERSION@
352-WERROR = @WERROR@
353-XGETTEXT = @XGETTEXT@
354-XGETTEXT_015 = @XGETTEXT_015@
355-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
356-abs_builddir = @abs_builddir@
357-abs_srcdir = @abs_srcdir@
358-abs_top_builddir = @abs_top_builddir@
359-abs_top_srcdir = @abs_top_srcdir@
360-ac_ct_CC = @ac_ct_CC@
361-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
362-acx_pthread_config = @acx_pthread_config@
363-am__include = @am__include@
364-am__leading_dot = @am__leading_dot@
365-am__quote = @am__quote@
366-am__tar = @am__tar@
367-am__untar = @am__untar@
368-bindir = @bindir@
369-build = @build@
370-build_alias = @build_alias@
371-build_cpu = @build_cpu@
372-build_os = @build_os@
373-build_vendor = @build_vendor@
374-builddir = @builddir@
375-datadir = @datadir@
376-datarootdir = @datarootdir@
377-docdir = @docdir@
378-dvidir = @dvidir@
379-exec_prefix = @exec_prefix@
380-host = @host@
381-host_alias = @host_alias@
382-host_cpu = @host_cpu@
383-host_os = @host_os@
384-host_vendor = @host_vendor@
385-htmldir = @htmldir@
386-includedir = @includedir@
387-infodir = @infodir@
388-install_sh = @install_sh@
389-libdir = @libdir@
390-libexecdir = @libexecdir@
391-localedir = @localedir@
392-localstatedir = @localstatedir@
393-lt_ECHO = @lt_ECHO@
394-mandir = @mandir@
395-mkdir_p = @mkdir_p@
396-oldincludedir = @oldincludedir@
397-pdfdir = @pdfdir@
398-pkgpyexecdir = @pkgpyexecdir@
399-pkgpythondir = @pkgpythondir@
400-prefix = @prefix@
401-program_transform_name = @program_transform_name@
402-psdir = @psdir@
403-pyexecdir = @pyexecdir@
404-pythondir = @pythondir@
405-sbindir = @sbindir@
406-sharedstatedir = @sharedstatedir@
407-srcdir = @srcdir@
408-sysconfdir = @sysconfdir@
409-target = @target@
410-target_alias = @target_alias@
411-target_cpu = @target_cpu@
412-target_os = @target_os@
413-target_vendor = @target_vendor@
414-top_build_prefix = @top_build_prefix@
415-top_builddir = @top_builddir@
416-top_srcdir = @top_srcdir@
417-EXTRA_DIST = README tclrrd.c
418-AM_CFLAGS = @CFLAGS@
419-CLEANFILES = tclrrd.o tclrrd.so
420-SRC_DIR = $(top_srcdir)/src
421-AM_CPPFLAGS = $(TCL_INCLUDE_SPEC) -I$(SRC_DIR) -DUSE_TCL_STUBS
422-LIBDIRS = -L$(top_builddir)/src/.libs -L$(top_builddir)/src -L$(libdir)
423-LIB_RUNTIME_DIR = $(libdir)
424-@BUILD_TCL_SITE_TRUE@tclpkgdir = @TCL_PACKAGE_DIR@
425-@BUILD_TCL_SITE_TRUE@tclpkg_DATA = pkgIndex.tcl
426-@BUILD_TCL_SITE_TRUE@tclpkg_SCRIPTS = ifOctets.tcl
427-@BUILD_TCL_SITE_FALSE@pkglib_DATA = pkgIndex.tcl
428-@BUILD_TCL_SITE_FALSE@pkglib_SCRIPTS = ifOctets.tcl
429-
430-# Automake doen't like `tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)' as
431-# library name. So we build and install this library `by hand'.
432-#
433-# We do, however, specify a lib_LIBRARIES target such that
434-# automake creates the directory (if neecessary).
435-#
436-TCL_RRD_LIB = tclrrd$(VERSION)$(TCL_SHLIB_SUFFIX)
437-lib_LIBRARIES =
438-all: all-am
439-
440-.SUFFIXES:
441-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
442- @for dep in $?; do \
443- case '$(am__configure_deps)' in \
444- *$$dep*) \
445- ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
446- && { if test -f $@; then exit 0; else break; fi; }; \
447- exit 1;; \
448- esac; \
449- done; \
450- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/tcl/Makefile'; \
451- $(am__cd) $(top_srcdir) && \
452- $(AUTOMAKE) --gnu bindings/tcl/Makefile
453-.PRECIOUS: Makefile
454-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
455- @case '$?' in \
456- *config.status*) \
457- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
458- *) \
459- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
460- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
461- esac;
462-
463-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
464- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
465-
466-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
467- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
468-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
469- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
470-$(am__aclocal_m4_deps):
471-ifOctets.tcl: $(top_builddir)/config.status $(srcdir)/ifOctets.tcl.in
472- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
473-install-libLIBRARIES: $(lib_LIBRARIES)
474- @$(NORMAL_INSTALL)
475- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
476- @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
477- list2=; for p in $$list; do \
478- if test -f $$p; then \
479- list2="$$list2 $$p"; \
480- else :; fi; \
481- done; \
482- test -z "$$list2" || { \
483- echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
484- $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
485- @$(POST_INSTALL)
486- @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
487- for p in $$list; do \
488- if test -f $$p; then \
489- $(am__strip_dir) \
490- echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
491- ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
492- else :; fi; \
493- done
494-
495-uninstall-libLIBRARIES:
496- @$(NORMAL_UNINSTALL)
497- @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
498- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
499- test -n "$$files" || exit 0; \
500- echo " ( cd '$(DESTDIR)$(libdir)' && rm -f "$$files" )"; \
501- cd "$(DESTDIR)$(libdir)" && rm -f $$files
502-
503-clean-libLIBRARIES:
504- -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
505-install-pkglibSCRIPTS: $(pkglib_SCRIPTS)
506- @$(NORMAL_INSTALL)
507- test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
508- @list='$(pkglib_SCRIPTS)'; test -n "$(pkglibdir)" || list=; \
509- for p in $$list; do \
510- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
511- if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
512- done | \
513- sed -e 'p;s,.*/,,;n' \
514- -e 'h;s|.*|.|' \
515- -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
516- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
517- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
518- if ($$2 == $$4) { files[d] = files[d] " " $$1; \
519- if (++n[d] == $(am__install_max)) { \
520- print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
521- else { print "f", d "/" $$4, $$1 } } \
522- END { for (d in files) print "f", d, files[d] }' | \
523- while read type dir files; do \
524- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
525- test -z "$$files" || { \
526- echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(pkglibdir)$$dir'"; \
527- $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(pkglibdir)$$dir" || exit $$?; \
528- } \
529- ; done
530-
531-uninstall-pkglibSCRIPTS:
532- @$(NORMAL_UNINSTALL)
533- @list='$(pkglib_SCRIPTS)'; test -n "$(pkglibdir)" || exit 0; \
534- files=`for p in $$list; do echo "$$p"; done | \
535- sed -e 's,.*/,,;$(transform)'`; \
536- test -n "$$list" || exit 0; \
537- echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \
538- cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files
539-install-tclpkgSCRIPTS: $(tclpkg_SCRIPTS)
540- @$(NORMAL_INSTALL)
541- test -z "$(tclpkgdir)" || $(MKDIR_P) "$(DESTDIR)$(tclpkgdir)"
542- @list='$(tclpkg_SCRIPTS)'; test -n "$(tclpkgdir)" || list=; \
543- for p in $$list; do \
544- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
545- if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
546- done | \
547- sed -e 'p;s,.*/,,;n' \
548- -e 'h;s|.*|.|' \
549- -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
550- $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
551- { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
552- if ($$2 == $$4) { files[d] = files[d] " " $$1; \
553- if (++n[d] == $(am__install_max)) { \
554- print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
555- else { print "f", d "/" $$4, $$1 } } \
556- END { for (d in files) print "f", d, files[d] }' | \
557- while read type dir files; do \
558- if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
559- test -z "$$files" || { \
560- echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(tclpkgdir)$$dir'"; \
561- $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(tclpkgdir)$$dir" || exit $$?; \
562- } \
563- ; done
564-
565-uninstall-tclpkgSCRIPTS:
566- @$(NORMAL_UNINSTALL)
567- @list='$(tclpkg_SCRIPTS)'; test -n "$(tclpkgdir)" || exit 0; \
568- files=`for p in $$list; do echo "$$p"; done | \
569- sed -e 's,.*/,,;$(transform)'`; \
570- test -n "$$list" || exit 0; \
571- echo " ( cd '$(DESTDIR)$(tclpkgdir)' && rm -f" $$files ")"; \
572- cd "$(DESTDIR)$(tclpkgdir)" && rm -f $$files
573-
574-mostlyclean-libtool:
575- -rm -f *.lo
576-
577-clean-libtool:
578- -rm -rf .libs _libs
579-install-pkglibDATA: $(pkglib_DATA)
580- @$(NORMAL_INSTALL)
581- test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
582- @list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
583- for p in $$list; do \
584- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
585- echo "$$d$$p"; \
586- done | $(am__base_list) | \
587- while read files; do \
588- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkglibdir)'"; \
589- $(INSTALL_DATA) $$files "$(DESTDIR)$(pkglibdir)" || exit $$?; \
590- done
591-
592-uninstall-pkglibDATA:
593- @$(NORMAL_UNINSTALL)
594- @list='$(pkglib_DATA)'; test -n "$(pkglibdir)" || list=; \
595- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
596- test -n "$$files" || exit 0; \
597- echo " ( cd '$(DESTDIR)$(pkglibdir)' && rm -f" $$files ")"; \
598- cd "$(DESTDIR)$(pkglibdir)" && rm -f $$files
599-install-tclpkgDATA: $(tclpkg_DATA)
600- @$(NORMAL_INSTALL)
601- test -z "$(tclpkgdir)" || $(MKDIR_P) "$(DESTDIR)$(tclpkgdir)"
602- @list='$(tclpkg_DATA)'; test -n "$(tclpkgdir)" || list=; \
603- for p in $$list; do \
604- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
605- echo "$$d$$p"; \
606- done | $(am__base_list) | \
607- while read files; do \
608- echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tclpkgdir)'"; \
609- $(INSTALL_DATA) $$files "$(DESTDIR)$(tclpkgdir)" || exit $$?; \
610- done
611-
612-uninstall-tclpkgDATA:
613- @$(NORMAL_UNINSTALL)
614- @list='$(tclpkg_DATA)'; test -n "$(tclpkgdir)" || list=; \
615- files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
616- test -n "$$files" || exit 0; \
617- echo " ( cd '$(DESTDIR)$(tclpkgdir)' && rm -f" $$files ")"; \
618- cd "$(DESTDIR)$(tclpkgdir)" && rm -f $$files
619-tags: TAGS
620-TAGS:
621-
622-ctags: CTAGS
623-CTAGS:
624-
625-
626-distdir: $(DISTFILES)
627- @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
628- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
629- list='$(DISTFILES)'; \
630- dist_files=`for file in $$list; do echo $$file; done | \
631- sed -e "s|^$$srcdirstrip/||;t" \
632- -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
633- case $$dist_files in \
634- */*) $(MKDIR_P) `echo "$$dist_files" | \
635- sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
636- sort -u` ;; \
637- esac; \
638- for file in $$dist_files; do \
639- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
640- if test -d $$d/$$file; then \
641- dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
642- if test -d "$(distdir)/$$file"; then \
643- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
644- fi; \
645- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
646- cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
647- find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
648- fi; \
649- cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
650- else \
651- test -f "$(distdir)/$$file" \
652- || cp -p $$d/$$file "$(distdir)/$$file" \
653- || exit 1; \
654- fi; \
655- done
656-check-am: all-am
657-check: check-am
658-all-am: Makefile $(LIBRARIES) $(SCRIPTS) $(DATA) all-local
659-installdirs:
660- for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(tclpkgdir)" "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(tclpkgdir)"; do \
661- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
662- done
663-install: install-am
664-install-exec: install-exec-am
665-install-data: install-data-am
666-uninstall: uninstall-am
667-
668-install-am: all-am
669- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
670-
671-installcheck: installcheck-am
672-install-strip:
673- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
674- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
675- `test -z '$(STRIP)' || \
676- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
677-mostlyclean-generic:
678-
679-clean-generic:
680- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
681-
682-distclean-generic:
683- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
684- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
685-
686-maintainer-clean-generic:
687- @echo "This command is intended for maintainers to use"
688- @echo "it deletes files that may require special tools to rebuild."
689-clean: clean-am
690-
691-clean-am: clean-generic clean-libLIBRARIES clean-libtool \
692- mostlyclean-am
693-
694-distclean: distclean-am
695- -rm -f Makefile
696-distclean-am: clean-am distclean-generic
697-
698-dvi: dvi-am
699-
700-dvi-am:
701-
702-html: html-am
703-
704-html-am:
705-
706-info: info-am
707-
708-info-am:
709-
710-install-data-am: install-tclpkgDATA install-tclpkgSCRIPTS
711-
712-install-dvi: install-dvi-am
713-
714-install-dvi-am:
715-
716-install-exec-am: install-exec-local install-libLIBRARIES \
717- install-pkglibDATA install-pkglibSCRIPTS
718-
719-install-html: install-html-am
720-
721-install-html-am:
722-
723-install-info: install-info-am
724-
725-install-info-am:
726-
727-install-man:
728-
729-install-pdf: install-pdf-am
730-
731-install-pdf-am:
732-
733-install-ps: install-ps-am
734-
735-install-ps-am:
736-
737-installcheck-am:
738-
739-maintainer-clean: maintainer-clean-am
740- -rm -f Makefile
741-maintainer-clean-am: distclean-am maintainer-clean-generic
742-
743-mostlyclean: mostlyclean-am
744-
745-mostlyclean-am: mostlyclean-generic mostlyclean-libtool
746-
747-pdf: pdf-am
748-
749-pdf-am:
750-
751-ps: ps-am
752-
753-ps-am:
754-
755-uninstall-am: uninstall-libLIBRARIES uninstall-pkglibDATA \
756- uninstall-pkglibSCRIPTS uninstall-tclpkgDATA \
757- uninstall-tclpkgSCRIPTS
758-
759-.MAKE: install-am install-strip
760-
761-.PHONY: all all-am all-local check check-am clean clean-generic \
762- clean-libLIBRARIES clean-libtool distclean distclean-generic \
763- distclean-libtool distdir dvi dvi-am html html-am info info-am \
764- install install-am install-data install-data-am install-dvi \
765- install-dvi-am install-exec install-exec-am install-exec-local \
766- install-html install-html-am install-info install-info-am \
767- install-libLIBRARIES install-man install-pdf install-pdf-am \
768- install-pkglibDATA install-pkglibSCRIPTS install-ps \
769- install-ps-am install-strip install-tclpkgDATA \
770- install-tclpkgSCRIPTS installcheck installcheck-am installdirs \
771- maintainer-clean maintainer-clean-generic mostlyclean \
772- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
773- uninstall uninstall-am uninstall-libLIBRARIES \
774- uninstall-pkglibDATA uninstall-pkglibSCRIPTS \
775- uninstall-tclpkgDATA uninstall-tclpkgSCRIPTS
776-
777-
778-all-local: $(TCL_RRD_LIB)
779-
780-$(TCL_RRD_LIB): tclrrd.o
781- $(TCL_SHLIB_LD) $(TCL_LD_SEARCH_FLAGS) $(LIBDIRS) $< -o $@ -lrrd_th -lm $(TCL_STUB_LIB_SPEC) $(LDFLAGS) $(LIBS)
782-
783-tclrrd.o: tclrrd.c
784- $(CC) $(AM_CFLAGS) $(CFLAGS) $(TCL_SHLIB_CFLAGS) $(AM_CPPFLAGS) -c tclrrd.c -DVERSION=\"$(VERSION)\"
785-
786-pkgIndex.tcl:
787- echo "package ifneeded Rrd $(VERSION) \"load $(libdir)/tclrrd$(VERSION)[info sharedlibextension]\"" > $@
788-
789-install-exec-local: $(TCL_RRD_LIB)
790- @$(NORMAL_INSTALL)
791- $(INSTALL_PROGRAM) $(TCL_RRD_LIB) $(DESTDIR)$(libdir)/$(TCL_RRD_LIB)
792-
793-# Tell versions [3.59,3.63) of GNU make to not export all variables.
794-# Otherwise a system limit (for SysV at least) may be exceeded.
795-.NOEXPORT:
796diff --git a/bindings/tcl/README b/bindings/tcl/README
797deleted file mode 100644
798index 065a03a..0000000
799--- a/bindings/tcl/README
800+++ /dev/null
801@@ -1,31 +0,0 @@
802-TCLRRD -- A TCL interpreter extension to access the RRD library,
803- contributed to Tobias Oetiker's RRD tools.
804-
805-Copyright (c) 1999,2000 Frank Strauss, Technical University of Braunschweig.
806-
807-See the file "COPYING" for information on usage and redistribution
808-of this file, and for a DISCLAIMER OF ALL WARRANTIES.
809-
810-TCLRRD adds a dynamically loadable package to the Tcl 8.x interpreter
811-to access all RRD functions as of RRDtool 1.0.13. All command names
812-and arguments are equal to those of RRDtool. They are assigned to the
813-namespace `Rrd', e.g. `Rrd::create'. Return values are a bit
814-different from plain RRDtool behavior to enable more native Tcl
815-usage. Errors are mapped to the TCL_ERROR return code together with
816-the RRD error strings.
817-
818-TCLRRD makes it easy to combine RRD use with advanced SNMP functionality
819-of scotty (http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/). E.g., it's easy
820-to use some scotty code to get the counters of some interfaces by their
821-interface name and then use Rrd::update to store the values. Furthermore,
822-data source types (see RRD::create documentation) and integer value ranges
823-could be easily retrieved from MIB information.
824-
825-TCLRRD has been written on a Linux system for use with Tcl 8.x. It should
826-work on many other platforms, although it has not been tested. There are
827-no fool proof installation procedures. Take a look at Makefile.am and
828-adapt it, if required.
829-
830-TCLRRD has been written for RRD 1.0.13.
831-
832- Frank Strauss <strauss@ibr.cs.tu-bs.de>, 09-Mar-2000
833diff --git a/bindings/tcl/ifOctets.tcl.in b/bindings/tcl/ifOctets.tcl.in
834deleted file mode 100644
835index 7a36397..0000000
836--- a/bindings/tcl/ifOctets.tcl.in
837+++ /dev/null
838@@ -1,45 +0,0 @@
839-#!/bin/sh
840-# the next line restarts using tclsh -*- tcl -*- \
841-exec tclsh@TCL_VERSION@ "$0" "$@"
842-
843-#package require Tnm 3.0
844-package require Rrd @VERSION@
845-
846-set rrdfile "[lindex $argv 0]-[lindex $argv 1].rrd"
847-
848-# create rrdfile if not yet existent
849-if {[file exists $rrdfile] == 0} {
850- Rrd::create $rrdfile --step 5 \
851- DS:inOctets:COUNTER:10:U:U DS:outOctets:COUNTER:10:U:U \
852- RRA:AVERAGE:0.5:1:12
853-}
854-
855-# get an snmp session context
856-set session [Tnm::snmp generator -address [lindex $argv 0]]
857-
858-# walk through the ifDescr column to find the right interface
859-$session walk descr IF-MIB!ifDescr {
860-
861- # is this the right interface?
862- if {"[Tnm::snmp value $descr 0]" == "[lindex $argv 1]"} {
863-
864- # get the instance part of this table row
865- set inst [lindex [Tnm::mib split [Tnm::snmp oid $descr 0]] 1]
866-
867- # get the two interface's octet counter values
868- set in [lindex [lindex [$session get IF-MIB!ifInOctets.$inst] 0] 2]
869- set out [lindex [lindex [$session get IF-MIB!ifOutOctets.$inst] 0] 2]
870-
871- # write the values to the rrd
872- puts "$in $out"
873- Rrd::update $rrdfile --template inOctets:outOctets N:$in:$out
874-
875- Rrd::graph gaga.png --title "gaga" \
876- DEF:in=$rrdfile:inOctets:AVERAGE \
877- DEF:out=$rrdfile:outOctets:AVERAGE \
878- AREA:in#0000FF:inOctets \
879- LINE2:out#00C000:outOctets
880-
881- #puts [Rrd::fetch $rrdfile AVERAGE]
882- }
883-}
884diff --git a/bindings/tcl/tclrrd.c b/bindings/tcl/tclrrd.c
885deleted file mode 100644
886index f1f0234..0000000
887--- a/bindings/tcl/tclrrd.c
888+++ /dev/null
889@@ -1,762 +0,0 @@
890-/*
891- * tclrrd.c -- A TCL interpreter extension to access the RRD library.
892- *
893- * Copyright (c) 1999,2000 Frank Strauss, Technical University of Braunschweig.
894- *
895- * Thread-safe code copyright (c) 2005 Oleg Derevenetz, CenterTelecom Voronezh ISP.
896- *
897- * See the file "COPYING" for information on usage and redistribution
898- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
899- *
900- * $Id: tclrrd.c 1854 2009-06-07 14:46:21Z oetiker $
901- */
902-
903-
904-
905-#include <errno.h>
906-#include <string.h>
907-#include <time.h>
908-#include <unistd.h>
909-#include <tcl.h>
910-#include <stdlib.h>
911-#include "../../src/rrd_tool.h"
912-#include "../../src/rrd_format.h"
913-
914-/* support pre-8.4 tcl */
915-
916-#ifndef CONST84
917-# define CONST84
918-#endif
919-
920-extern int Tclrrd_Init(
921- Tcl_Interp *interp);
922-extern int Tclrrd_SafeInit(
923- Tcl_Interp *interp);
924-
925-
926-/*
927- * some rrd_XXX() and new thread-safe versions of Rrd_XXX()
928- * functions might modify the argv strings passed to it.
929- * Hence, we need to do some preparation before
930- * calling the rrd library functions.
931- */
932-static char **getopt_init(
933- int argc,
934- CONST84 char *argv[])
935-{
936- char **argv2;
937- int i;
938-
939- argv2 = calloc(argc, sizeof(char *));
940- for (i = 0; i < argc; i++) {
941- argv2[i] = strdup(argv[i]);
942- }
943- return argv2;
944-}
945-
946-static void getopt_cleanup(
947- int argc,
948- char **argv2)
949-{
950- int i;
951-
952- for (i = 0; i < argc; i++) {
953- if (argv2[i] != NULL) {
954- free(argv2[i]);
955- }
956- }
957- free(argv2);
958-}
959-
960-static void getopt_free_element(
961- char *argv2[],
962- int argn)
963-{
964- if (argv2[argn] != NULL) {
965- free(argv2[argn]);
966- argv2[argn] = NULL;
967- }
968-}
969-
970-static void getopt_squieeze(
971- int *argc,
972- char *argv2[])
973-{
974- int i, null_i = 0, argc_tmp = *argc;
975-
976- for (i = 0; i < argc_tmp; i++) {
977- if (argv2[i] == NULL) {
978- (*argc)--;
979- } else {
980- argv2[null_i++] = argv2[i];
981- }
982- }
983-}
984-
985-
986-
987-/* Thread-safe version */
988-static int Rrd_Create(
989- ClientData __attribute__((unused)) clientData,
990- Tcl_Interp *interp,
991- int argc,
992- CONST84 char *argv[])
993-{
994- int argv_i;
995- char **argv2;
996- char *parsetime_error = NULL;
997- time_t last_up = time(NULL) - 10;
998- long int long_tmp;
999- unsigned long int pdp_step = 300;
1000- rrd_time_value_t last_up_tv;
1001-
1002- argv2 = getopt_init(argc, argv);
1003-
1004- for (argv_i = 1; argv_i < argc; argv_i++) {
1005- if (!strcmp(argv2[argv_i], "--start") || !strcmp(argv2[argv_i], "-b")) {
1006- if (argv_i++ >= argc) {
1007- Tcl_AppendResult(interp, "RRD Error: option '",
1008- argv2[argv_i - 1], "' needs an argument",
1009- (char *) NULL);
1010- getopt_cleanup(argc, argv2);
1011- return TCL_ERROR;
1012- }
1013- if ((parsetime_error = rrd_parsetime(argv2[argv_i], &last_up_tv))) {
1014- Tcl_AppendResult(interp, "RRD Error: invalid time format: '",
1015- argv2[argv_i], "'", (char *) NULL);
1016- getopt_cleanup(argc, argv2);
1017- return TCL_ERROR;
1018- }
1019- if (last_up_tv.type == RELATIVE_TO_END_TIME ||
1020- last_up_tv.type == RELATIVE_TO_START_TIME) {
1021- Tcl_AppendResult(interp,
1022- "RRD Error: specifying time relative to the 'start' ",
1023- "or 'end' makes no sense here",
1024- (char *) NULL);
1025- getopt_cleanup(argc, argv2);
1026- return TCL_ERROR;
1027- }
1028- last_up = mktime(&last_up_tv.tm) +last_up_tv.offset;
1029- if (last_up < 3600 * 24 * 365 * 10) {
1030- Tcl_AppendResult(interp,
1031- "RRD Error: the first entry to the RRD should be after 1980",
1032- (char *) NULL);
1033- getopt_cleanup(argc, argv2);
1034- return TCL_ERROR;
1035- }
1036- getopt_free_element(argv2, argv_i - 1);
1037- getopt_free_element(argv2, argv_i);
1038- } else if (!strcmp(argv2[argv_i], "--step")
1039- || !strcmp(argv2[argv_i], "-s")) {
1040- if (argv_i++ >= argc) {
1041- Tcl_AppendResult(interp, "RRD Error: option '",
1042- argv2[argv_i - 1], "' needs an argument",
1043- (char *) NULL);
1044- getopt_cleanup(argc, argv2);
1045- return TCL_ERROR;
1046- }
1047- long_tmp = atol(argv2[argv_i]);
1048- if (long_tmp < 1) {
1049- Tcl_AppendResult(interp,
1050- "RRD Error: step size should be no less than one second",
1051- (char *) NULL);
1052- getopt_cleanup(argc, argv2);
1053- return TCL_ERROR;
1054- }
1055- pdp_step = long_tmp;
1056- getopt_free_element(argv2, argv_i - 1);
1057- getopt_free_element(argv2, argv_i);
1058- } else if (!strcmp(argv2[argv_i], "--")) {
1059- getopt_free_element(argv2, argv_i);
1060- break;
1061- } else if (argv2[argv_i][0] == '-') {
1062- Tcl_AppendResult(interp, "RRD Error: unknown option '",
1063- argv2[argv_i], "'", (char *) NULL);
1064- getopt_cleanup(argc, argv2);
1065- return TCL_ERROR;
1066- }
1067- }
1068-
1069- getopt_squieeze(&argc, argv2);
1070-
1071- if (argc < 2) {
1072- Tcl_AppendResult(interp, "RRD Error: needs rrd filename",
1073- (char *) NULL);
1074- getopt_cleanup(argc, argv2);
1075- return TCL_ERROR;
1076- }
1077-
1078- rrd_create_r(argv2[1], pdp_step, last_up, argc - 2,
1079- (const char **)argv2 + 2);
1080-
1081- getopt_cleanup(argc, argv2);
1082-
1083- if (rrd_test_error()) {
1084- Tcl_AppendResult(interp, "RRD Error: ",
1085- rrd_get_error(), (char *) NULL);
1086- rrd_clear_error();
1087- return TCL_ERROR;
1088- }
1089-
1090- return TCL_OK;
1091-}
1092-
1093-
1094-
1095-/* Thread-safe version */
1096-static int Rrd_Dump(
1097- ClientData __attribute__((unused)) clientData,
1098- Tcl_Interp *interp,
1099- int argc,
1100- CONST84 char *argv[])
1101-{
1102- if (argc < 2) {
1103- Tcl_AppendResult(interp, "RRD Error: needs rrd filename",
1104- (char *) NULL);
1105- return TCL_ERROR;
1106- }
1107-
1108- rrd_dump_r(argv[1], NULL);
1109-
1110- /* NOTE: rrd_dump() writes to stdout. No interaction with TCL. */
1111-
1112- if (rrd_test_error()) {
1113- Tcl_AppendResult(interp, "RRD Error: ",
1114- rrd_get_error(), (char *) NULL);
1115- rrd_clear_error();
1116- return TCL_ERROR;
1117- }
1118-
1119- return TCL_OK;
1120-}
1121-
1122-/* Thread-safe version */
1123-static int Rrd_Flushcached(
1124- ClientData __attribute__((unused)) clientData,
1125- Tcl_Interp *interp,
1126- int argc,
1127- CONST84 char *argv[])
1128-{
1129- if (argc < 2) {
1130- Tcl_AppendResult(interp, "RRD Error: needs rrd filename",
1131- (char *) NULL);
1132- return TCL_ERROR;
1133- }
1134-
1135- rrd_flushcached(argc, (char**)argv);
1136-
1137- if (rrd_test_error()) {
1138- Tcl_AppendResult(interp, "RRD Error: ",
1139- rrd_get_error(), (char *) NULL);
1140- rrd_clear_error();
1141- return TCL_ERROR;
1142- }
1143-
1144- return TCL_OK;
1145-}
1146-
1147-
1148-/* Thread-safe version */
1149-static int Rrd_Last(
1150- ClientData __attribute__((unused)) clientData,
1151- Tcl_Interp *interp,
1152- int argc,
1153- CONST84 char *argv[])
1154-{
1155- time_t t;
1156-
1157- if (argc < 2) {
1158- Tcl_AppendResult(interp, "RRD Error: needs rrd filename",
1159- (char *) NULL);
1160- return TCL_ERROR;
1161- }
1162-
1163- t = rrd_last_r(argv[1]);
1164-
1165- if (rrd_test_error()) {
1166- Tcl_AppendResult(interp, "RRD Error: ",
1167- rrd_get_error(), (char *) NULL);
1168- rrd_clear_error();
1169- return TCL_ERROR;
1170- }
1171-
1172- Tcl_SetIntObj(Tcl_GetObjResult(interp), t);
1173-
1174- return TCL_OK;
1175-}
1176-
1177-
1178-
1179-/* Thread-safe version */
1180-static int Rrd_Update(
1181- ClientData __attribute__((unused)) clientData,
1182- Tcl_Interp *interp,
1183- int argc,
1184- CONST84 char *argv[])
1185-{
1186- int argv_i;
1187- char **argv2, *template = NULL;
1188-
1189- argv2 = getopt_init(argc, argv);
1190-
1191- for (argv_i = 1; argv_i < argc; argv_i++) {
1192- if (!strcmp(argv2[argv_i], "--template")
1193- || !strcmp(argv2[argv_i], "-t")) {
1194- if (argv_i++ >= argc) {
1195- Tcl_AppendResult(interp, "RRD Error: option '",
1196- argv2[argv_i - 1], "' needs an argument",
1197- (char *) NULL);
1198- if (template != NULL) {
1199- free(template);
1200- }
1201- getopt_cleanup(argc, argv2);
1202- return TCL_ERROR;
1203- }
1204- if (template != NULL) {
1205- free(template);
1206- }
1207- template = strdup(argv2[argv_i]);
1208- getopt_free_element(argv2, argv_i - 1);
1209- getopt_free_element(argv2, argv_i);
1210- } else if (!strcmp(argv2[argv_i], "--")) {
1211- getopt_free_element(argv2, argv_i);
1212- break;
1213- } else if (argv2[argv_i][0] == '-') {
1214- Tcl_AppendResult(interp, "RRD Error: unknown option '",
1215- argv2[argv_i], "'", (char *) NULL);
1216- if (template != NULL) {
1217- free(template);
1218- }
1219- getopt_cleanup(argc, argv2);
1220- return TCL_ERROR;
1221- }
1222- }
1223-
1224- getopt_squieeze(&argc, argv2);
1225-
1226- if (argc < 2) {
1227- Tcl_AppendResult(interp, "RRD Error: needs rrd filename",
1228- (char *) NULL);
1229- if (template != NULL) {
1230- free(template);
1231- }
1232- getopt_cleanup(argc, argv2);
1233- return TCL_ERROR;
1234- }
1235-
1236- rrd_update_r(argv2[1], template, argc - 2, (const char **)argv2 + 2);
1237-
1238- if (template != NULL) {
1239- free(template);
1240- }
1241- getopt_cleanup(argc, argv2);
1242-
1243- if (rrd_test_error()) {
1244- Tcl_AppendResult(interp, "RRD Error: ",
1245- rrd_get_error(), (char *) NULL);
1246- rrd_clear_error();
1247- return TCL_ERROR;
1248- }
1249-
1250- return TCL_OK;
1251-}
1252-
1253-static int Rrd_Lastupdate(
1254- ClientData __attribute__((unused)) clientData,
1255- Tcl_Interp *interp,
1256- int argc,
1257- CONST84 char *argv[])
1258-{
1259- time_t last_update;
1260- char **argv2;
1261- char **ds_namv;
1262- char **last_ds;
1263- char s[30];
1264- Tcl_Obj *listPtr;
1265- unsigned long ds_cnt, i;
1266-
1267- /* TODO: support for rrdcached */
1268- if (argc != 2) {
1269- Tcl_AppendResult(interp, "RRD Error: needs a single rrd filename",
1270- (char *) NULL);
1271- return TCL_ERROR;
1272- }
1273-
1274- argv2 = getopt_init(argc, argv);
1275- if (rrd_lastupdate_r(argv2[1], &last_update,
1276- &ds_cnt, &ds_namv, &last_ds) == 0) {
1277- listPtr = Tcl_GetObjResult(interp);
1278- for (i = 0; i < ds_cnt; i++) {
1279- sprintf(s, " %28s", ds_namv[i]);
1280- Tcl_ListObjAppendElement(interp, listPtr,
1281- Tcl_NewStringObj(s, -1));
1282- sprintf(s, "\n\n%10lu:", last_update);
1283- Tcl_ListObjAppendElement(interp, listPtr,
1284- Tcl_NewStringObj(s, -1));
1285- for (i = 0; i < ds_cnt; i++) {
1286- sprintf(s, " %s", last_ds[i]);
1287- Tcl_ListObjAppendElement(interp, listPtr,
1288- Tcl_NewStringObj(s, -1));
1289- free(last_ds[i]);
1290- free(ds_namv[i]);
1291- }
1292- sprintf(s, "\n");
1293- Tcl_ListObjAppendElement(interp, listPtr,
1294- Tcl_NewStringObj(s, -1));
1295- free(last_ds);
1296- free(ds_namv);
1297- }
1298- }
1299- return TCL_OK;
1300-}
1301-
1302-static int Rrd_Fetch(
1303- ClientData __attribute__((unused)) clientData,
1304- Tcl_Interp *interp,
1305- int argc,
1306- CONST84 char *argv[])
1307-{
1308- time_t start, end, j;
1309- unsigned long step, ds_cnt, i, ii;
1310- rrd_value_t *data, *datai;
1311- char **ds_namv;
1312- Tcl_Obj *listPtr;
1313- char s[30];
1314- char **argv2;
1315-
1316- argv2 = getopt_init(argc, argv);
1317- if (rrd_fetch(argc, argv2, &start, &end, &step,
1318- &ds_cnt, &ds_namv, &data) != -1) {
1319- datai = data;
1320- listPtr = Tcl_GetObjResult(interp);
1321- for (j = start; j <= end; j += step) {
1322- for (ii = 0; ii < ds_cnt; ii++) {
1323- sprintf(s, "%.2f", *(datai++));
1324- Tcl_ListObjAppendElement(interp, listPtr,
1325- Tcl_NewStringObj(s, -1));
1326- }
1327- }
1328- for (i = 0; i < ds_cnt; i++)
1329- free(ds_namv[i]);
1330- free(ds_namv);
1331- free(data);
1332- }
1333- getopt_cleanup(argc, argv2);
1334-
1335- if (rrd_test_error()) {
1336- Tcl_AppendResult(interp, "RRD Error: ",
1337- rrd_get_error(), (char *) NULL);
1338- rrd_clear_error();
1339- return TCL_ERROR;
1340- }
1341-
1342- return TCL_OK;
1343-}
1344-
1345-
1346-
1347-static int Rrd_Graph(
1348- ClientData __attribute__((unused)) clientData,
1349- Tcl_Interp *interp,
1350- int argc,
1351- CONST84 char *argv[])
1352-{
1353- Tcl_Channel channel;
1354- int mode, fd2;
1355- ClientData fd1;
1356- FILE *stream = NULL;
1357- char **calcpr = NULL;
1358- int rc, xsize, ysize;
1359- double ymin, ymax;
1360- char dimensions[50];
1361- char **argv2;
1362- CONST84 char *save;
1363-
1364- /*
1365- * If the "filename" is a Tcl fileID, then arrange for rrd_graph() to write to
1366- * that file descriptor. Will this work with windoze? I have no idea.
1367- */
1368- if ((channel = Tcl_GetChannel(interp, argv[1], &mode)) != NULL) {
1369- /*
1370- * It >is< a Tcl fileID
1371- */
1372- if (!(mode & TCL_WRITABLE)) {
1373- Tcl_AppendResult(interp, "channel \"", argv[1],
1374- "\" wasn't opened for writing", (char *) NULL);
1375- return TCL_ERROR;
1376- }
1377- /*
1378- * Must flush channel to make sure any buffered data is written before
1379- * rrd_graph() writes to the stream
1380- */
1381- if (Tcl_Flush(channel) != TCL_OK) {
1382- Tcl_AppendResult(interp, "flush failed for \"", argv[1], "\": ",
1383- strerror(Tcl_GetErrno()), (char *) NULL);
1384- return TCL_ERROR;
1385- }
1386- if (Tcl_GetChannelHandle(channel, TCL_WRITABLE, &fd1) != TCL_OK) {
1387- Tcl_AppendResult(interp,
1388- "cannot get file descriptor associated with \"",
1389- argv[1], "\"", (char *) NULL);
1390- return TCL_ERROR;
1391- }
1392- /*
1393- * Must dup() file descriptor so we can fclose(stream), otherwise the fclose()
1394- * would close Tcl's file descriptor
1395- */
1396- if ((fd2 = dup((int)fd1)) == -1) {
1397- Tcl_AppendResult(interp,
1398- "dup() failed for file descriptor associated with \"",
1399- argv[1], "\": ", strerror(errno), (char *) NULL);
1400- return TCL_ERROR;
1401- }
1402- /*
1403- * rrd_graph() wants a FILE*
1404- */
1405- if ((stream = fdopen(fd2, "wb")) == NULL) {
1406- Tcl_AppendResult(interp,
1407- "fdopen() failed for file descriptor associated with \"",
1408- argv[1], "\": ", strerror(errno), (char *) NULL);
1409- close(fd2); /* plug potential file descriptor leak */
1410- return TCL_ERROR;
1411- }
1412-
1413- save = argv[1];
1414- argv[1] = "-";
1415- argv2 = getopt_init(argc, argv);
1416- argv[1] = save;
1417- } else {
1418- Tcl_ResetResult(interp); /* clear error from Tcl_GetChannel() */
1419- argv2 = getopt_init(argc, argv);
1420- }
1421-
1422- rc = rrd_graph(argc, argv2, &calcpr, &xsize, &ysize, stream, &ymin,
1423- &ymax);
1424- getopt_cleanup(argc, argv2);
1425-
1426- if (stream != NULL)
1427- fclose(stream); /* plug potential malloc & file descriptor leak */
1428-
1429- if (rc != -1) {
1430- sprintf(dimensions, "%d %d", xsize, ysize);
1431- Tcl_AppendResult(interp, dimensions, (char *) NULL);
1432- if (calcpr) {
1433-#if 0
1434- int i;
1435-
1436- for (i = 0; calcpr[i]; i++) {
1437- printf("%s\n", calcpr[i]);
1438- free(calcpr[i]);
1439- }
1440-#endif
1441- free(calcpr);
1442- }
1443- }
1444-
1445- if (rrd_test_error()) {
1446- Tcl_AppendResult(interp, "RRD Error: ",
1447- rrd_get_error(), (char *) NULL);
1448- rrd_clear_error();
1449- return TCL_ERROR;
1450- }
1451-
1452- return TCL_OK;
1453-}
1454-
1455-
1456-
1457-static int Rrd_Tune(
1458- ClientData __attribute__((unused)) clientData,
1459- Tcl_Interp *interp,
1460- int argc,
1461- CONST84 char *argv[])
1462-{
1463- char **argv2;
1464-
1465- argv2 = getopt_init(argc, argv);
1466- rrd_tune(argc, argv2);
1467- getopt_cleanup(argc, argv2);
1468-
1469- if (rrd_test_error()) {
1470- Tcl_AppendResult(interp, "RRD Error: ",
1471- rrd_get_error(), (char *) NULL);
1472- rrd_clear_error();
1473- return TCL_ERROR;
1474- }
1475-
1476- return TCL_OK;
1477-}
1478-
1479-
1480-
1481-static int Rrd_Resize(
1482- ClientData __attribute__((unused)) clientData,
1483- Tcl_Interp *interp,
1484- int argc,
1485- CONST84 char *argv[])
1486-{
1487- char **argv2;
1488-
1489- argv2 = getopt_init(argc, argv);
1490- rrd_resize(argc, argv2);
1491- getopt_cleanup(argc, argv2);
1492-
1493- if (rrd_test_error()) {
1494- Tcl_AppendResult(interp, "RRD Error: ",
1495- rrd_get_error(), (char *) NULL);
1496- rrd_clear_error();
1497- return TCL_ERROR;
1498- }
1499-
1500- return TCL_OK;
1501-}
1502-
1503-
1504-
1505-static int Rrd_Restore(
1506- ClientData __attribute__((unused)) clientData,
1507- Tcl_Interp *interp,
1508- int argc,
1509- CONST84 char *argv[])
1510-{
1511- char **argv2;
1512-
1513- argv2 = getopt_init(argc, argv);
1514- rrd_restore(argc, argv2);
1515- getopt_cleanup(argc, argv2);
1516-
1517- if (rrd_test_error()) {
1518- Tcl_AppendResult(interp, "RRD Error: ",
1519- rrd_get_error(), (char *) NULL);
1520- rrd_clear_error();
1521- return TCL_ERROR;
1522- }
1523-
1524- return TCL_OK;
1525-}
1526-
1527-
1528-
1529-/*
1530- * The following structure defines the commands in the Rrd extension.
1531- */
1532-
1533-typedef struct {
1534- char *name; /* Name of the command. */
1535- Tcl_CmdProc *proc; /* Procedure for command. */
1536- int hide; /* Hide if safe interpreter */
1537-} CmdInfo;
1538-
1539-static CmdInfo rrdCmds[] = {
1540- {"Rrd::create", Rrd_Create, 1}, /* Thread-safe version */
1541- {"Rrd::dump", Rrd_Dump, 0}, /* Thread-safe version */
1542- {"Rrd::flushcached", Rrd_Flushcached, 0},
1543- {"Rrd::last", Rrd_Last, 0}, /* Thread-safe version */
1544- {"Rrd::lastupdate", Rrd_Lastupdate, 0}, /* Thread-safe version */
1545- {"Rrd::update", Rrd_Update, 1}, /* Thread-safe version */
1546- {"Rrd::fetch", Rrd_Fetch, 0},
1547- {"Rrd::graph", Rrd_Graph, 1}, /* Due to RRD's API, a safe
1548- interpreter cannot create
1549- a graph since it writes to
1550- a filename supplied by the
1551- caller */
1552- {"Rrd::tune", Rrd_Tune, 1},
1553- {"Rrd::resize", Rrd_Resize, 1},
1554- {"Rrd::restore", Rrd_Restore, 1},
1555- {(char *) NULL, (Tcl_CmdProc *) NULL, 0}
1556-};
1557-
1558-
1559-
1560-static int init(
1561- Tcl_Interp *interp,
1562- int safe)
1563-{
1564- CmdInfo *cmdInfoPtr;
1565- Tcl_CmdInfo info;
1566-
1567- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL)
1568- return TCL_ERROR;
1569-
1570- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) {
1571- return TCL_ERROR;
1572- }
1573-
1574- /*
1575- * Why a global array? In keeping with the Rrd:: namespace, why
1576- * not simply create a normal variable Rrd::version and set it?
1577- */
1578- Tcl_SetVar2(interp, "rrd", "version", VERSION, TCL_GLOBAL_ONLY);
1579-
1580- for (cmdInfoPtr = rrdCmds; cmdInfoPtr->name != NULL; cmdInfoPtr++) {
1581- /*
1582- * Check if the command already exists and return an error
1583- * to ensure we detect name clashes while loading the Rrd
1584- * extension.
1585- */
1586- if (Tcl_GetCommandInfo(interp, cmdInfoPtr->name, &info)) {
1587- Tcl_AppendResult(interp, "command \"", cmdInfoPtr->name,
1588- "\" already exists", (char *) NULL);
1589- return TCL_ERROR;
1590- }
1591- if (safe && cmdInfoPtr->hide) {
1592-#if 0
1593- /*
1594- * Turns out the one cannot hide a command in a namespace
1595- * due to a limitation of Tcl, one can only hide global
1596- * commands. Thus, if we created the commands without
1597- * the Rrd:: namespace in a safe interpreter, then the
1598- * "unsafe" commands could be hidden -- which would allow
1599- * an owning interpreter either un-hiding them or doing
1600- * an "interp invokehidden". If the Rrd:: namespace is
1601- * used, then it's still possible for the owning interpreter
1602- * to fake out the missing commands:
1603- *
1604- * # Make all Rrd::* commands available in master interperter
1605- * package require Rrd
1606- * set safe [interp create -safe]
1607- * # Make safe Rrd::* commands available in safe interperter
1608- * interp invokehidden $safe -global load ./tclrrd1.2.11.so
1609- * # Provide the safe interpreter with the missing commands
1610- * $safe alias Rrd::update do_update $safe
1611- * proc do_update {which_interp $args} {
1612- * # Do some checking maybe...
1613- * :
1614- * return [eval Rrd::update $args]
1615- * }
1616- *
1617- * Our solution for now is to just not create the "unsafe"
1618- * commands in a safe interpreter.
1619- */
1620- if (Tcl_HideCommand(interp, cmdInfoPtr->name, cmdInfoPtr->name) !=
1621- TCL_OK)
1622- return TCL_ERROR;
1623-#endif
1624- } else
1625- Tcl_CreateCommand(interp, cmdInfoPtr->name, cmdInfoPtr->proc,
1626- (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
1627- }
1628-
1629- if (Tcl_PkgProvide(interp, "Rrd", VERSION) != TCL_OK) {
1630- return TCL_ERROR;
1631- }
1632-
1633- return TCL_OK;
1634-}
1635-
1636-int Tclrrd_Init(
1637- Tcl_Interp *interp)
1638-{
1639- return init(interp, 0);
1640-}
1641-
1642-/*
1643- * See the comments above and note how few commands are considered "safe"...
1644- * Using rrdtool in a safe interpreter has very limited functionality. It's
1645- * tempting to just return TCL_ERROR and forget about it.
1646- */
1647-int Tclrrd_SafeInit(
1648- Tcl_Interp *interp)
1649-{
1650- return init(interp, 1);
1651-}
1652diff --git a/configure.ac b/configure.ac
1653index 73ef4ec..acd74e8 100644
1654--- a/configure.ac
1655+++ b/configure.ac
1656@@ -830,57 +830,6 @@ AM_CONDITIONAL(LUA_SITE_LINSTALL, [test "$LUA_INSTALL_LMOD" != "$LUA_RRD_LIBDIR"
1657 AM_CONDITIONAL(LUA50, [test "$lua_vndot" = "50"])
1658 AM_CONDITIONAL(BUILD_LUA, [test "$enable_lua" = "yes"])
1659
1660-enable_tcl_site=no
1661-
1662-AC_ARG_ENABLE(tcl,AS_HELP_STRING([--disable-tcl],[do not build the tcl modules]),
1663-[],[enable_tcl=yes])
1664-
1665-if test "$enable_tcl" = "yes"; then
1666- dnl Check for Tcl.
1667- withval=""
1668- AC_ARG_WITH(tcllib,[ --with-tcllib=DIR location of the tclConfig.sh])
1669- enable_tcl=no
1670- for dir in $withval /usr/lib /usr/lib64 /usr/local/lib /usr/lib/tcl8.4 /usr/lib/tcl8.3 ; do
1671- AC_MSG_CHECKING(for tclConfig.sh in $dir)
1672- if test -f "$dir/tclConfig.sh" ; then
1673- tcl_config=$dir/tclConfig.sh
1674- enable_tcl=yes
1675- AC_MSG_RESULT(yes)
1676- break
1677- else
1678- AC_MSG_RESULT(no)
1679- fi
1680- done
1681-
1682- if test "$enable_tcl" = "no"; then
1683- AC_MSG_WARN([tclConfig.sh not found - Tcl interface will not be built])
1684- else
1685- . $tcl_config
1686- TCL_PACKAGE_DIR="$TCL_PACKAGE_PATH/tclrrd$VERSION"
1687- if test -n "$TCL_INC_DIR"; then
1688- TCL_INCLUDE_SPEC="$TCL_INCLUDE_SPEC -I$TCL_INC_DIR"
1689- fi
1690- fi
1691- AC_ARG_ENABLE(tcl-site,AS_HELP_STRING([--enable-tcl-site],[install the tcl extension in the tcl tree]),
1692- [],[enable_tcl_site=yes])
1693-
1694-fi
1695-
1696-AM_CONDITIONAL(BUILD_TCL, test "$enable_tcl" = "yes" )
1697-AM_CONDITIONAL(BUILD_TCL_SITE, test "$enable_tcl_site" = "yes" )
1698-
1699-
1700-AC_SUBST(TCL_PREFIX)
1701-AC_SUBST(TCL_SHLIB_CFLAGS)
1702-AC_SUBST(TCL_SHLIB_LD)
1703-AC_SUBST(TCL_SHLIB_SUFFIX)
1704-AC_SUBST(TCL_PACKAGE_PATH)
1705-AC_SUBST(TCL_LD_SEARCH_FLAGS)
1706-AC_SUBST(TCL_STUB_LIB_SPEC)
1707-AC_SUBST(TCL_VERSION)
1708-AC_SUBST(TCL_PACKAGE_DIR)
1709-AC_SUBST(TCL_INCLUDE_SPEC)
1710-
1711 AC_ARG_ENABLE(python,AS_HELP_STRING([--disable-python],[do not build the python modules]),
1712 [],[enable_python=yes])
1713
1714@@ -932,8 +881,6 @@ AC_CONFIG_FILES([src/Makefile])
1715 AC_CONFIG_FILES([src/librrd.sym.in])
1716 AC_CONFIG_FILES([src/librrd.pc])
1717 AC_CONFIG_FILES([bindings/Makefile])
1718-AC_CONFIG_FILES([bindings/tcl/Makefile])
1719-AC_CONFIG_FILES([bindings/tcl/ifOctets.tcl])
1720 AC_CONFIG_FILES([Makefile])
1721 AC_CONFIG_FILES([bindings/lua/Makefile])
1722
1723@@ -982,7 +929,6 @@ if test "$lua_need_compat51" = "1"; then
1724 echo " Lua Lua-modules dir: $LUA_INSTALL_LMOD"
1725 fi
1726 fi
1727-echo " Build Tcl Bindings: $enable_tcl"
1728 echo " Build Python Bindings: $enable_python"
1729 echo " Build rrdcgi: $enable_rrdcgi"
1730 echo " Build librrd MT: $enable_pthread"
1731--
17321.7.10
1733
diff --git a/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
new file mode 100644
index 000000000..76a713346
--- /dev/null
+++ b/meta-oe/recipes-extended/rrdtool/rrdtool_1.4.7.bb
@@ -0,0 +1,33 @@
1DESCRIPTION = "High performance data logging and graphing system for time series data."
2HOMEPAGE = "http://oss.oetiker.ch/rrdtool/"
3
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=44fee82a1d2ed0676cf35478283e0aa0"
6
7DEPENDS = "libpng zlib cairo glib-2.0 libxml2"
8
9SRC_URI = "http://oss.oetiker.ch/rrdtool/pub/rrdtool-${PV}.tar.gz \
10 file://0001-rrdtool-eradicate-tcl-support.patch \
11 "
12SRC_URI[md5sum] = "ffe369d8921b4dfdeaaf43812100c38f"
13SRC_URI[sha256sum] = "956aaf431c955ba88dd7d98920ade3a8c4bad04adb1f9431377950a813a7af11"
14
15inherit autotools gettext
16
17EXTRA_AUTORECONF = "-I m4"
18
19EXTRA_OECONF = " \
20 --enable-shared \
21 --enable-local-libpng \
22 --enable-local-zlib \
23 --disable-libwrap \
24 --program-prefix='' \
25 rd_cv_ieee_works=yes \
26 --disable-perl \
27 --disable-python \
28 --disable-ruby \
29 --disable-lua \
30 --disable-rpath \
31"
32
33