Accepting request 70072 from devel:languages:python

Fix a version dependency problem with Tcl (bnc#693085) and put the Tcl bindings into a separate subpackage (forwarded request 70035 from rmax)

OBS-URL: https://build.opensuse.org/request/show/70072
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rrdtool?expand=0&rev=32
This commit is contained in:
Berthold Gunreben 2011-05-12 09:00:59 +00:00 committed by Git OBS Bridge
commit 36b53d053b
3 changed files with 45 additions and 10 deletions

15
rrdtool-tclversion.patch Normal file
View File

@ -0,0 +1,15 @@
Index: bindings/tcl/tclrrd.c
===================================================================
--- bindings/tcl/tclrrd.c.orig
+++ bindings/tcl/tclrrd.c
@@ -678,10 +678,6 @@ static int init(
if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL)
return TCL_ERROR;
- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) {
- return TCL_ERROR;
- }
-
/*
* Why a global array? In keeping with the Rrd:: namespace, why
* not simply create a normal variable Rrd::version and set it?

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed May 11 11:48:32 UTC 2011 - max@novell.com
- Move the Tcl bindings into a separate subpackage.
- Remove the superfluous call to (bnc#693085).
- Adopt the current practice of packaging Tcl extensions.
-------------------------------------------------------------------
Tue Dec 28 02:05:03 UTC 2010 - pascal.bleser@opensuse.org

View File

@ -40,6 +40,7 @@ Release: 1
# http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{version}.tar.gz
Source: %{name}-%{version}.tar.bz2
Patch1: rrdtool-lua_lib64.patch
Patch2: rrdtool-tclversion.patch
# http://www.infodrom.org/projects/cgilib/download/cgilib-%{cgilib_version}.tar.gz
Source1: cgilib-%{cgilib_version}.tar.bz2
Patch11: cgilib-fix_automake.patch
@ -59,6 +60,7 @@ definable time period.
%if %{_lib}==lib64
%patch1
%endif
%patch2
pushd "cgilib-%{cgilib_version}"
%patch11
popd #cgilib
@ -108,9 +110,7 @@ make \
ihtmldir=%{_docdir}/%{name}/html/ \
examplesdir=%{_docdir}/%{name}/examples/ \
libdir=%{_libdir} \
pkglibdir=%_datadir/tcl/tclrrd%version \
TCL_PACKAGE_DIR=%_datadir/tcl/tclrrd%version \
TCL_PACKAGE_PATH=%_datadir/tcl \
pkglibdir=%tcl_archdir/tclrrd%version \
install
# we install this later again
rm -r $RPM_BUILD_ROOT%{_prefix}/lib/perl
@ -134,11 +134,6 @@ popd
find "%{buildroot}" -type f -name '*.la' -exec %__rm {} \;
# documentation
install -m 644 CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO $RPM_BUILD_ROOT/%{_docdir}/%{name}
# Script libraries for Tcl extensions should be in a package-specific
# subdir of /usr/share/tcl
mkdir -p $RPM_BUILD_ROOT/usr/share/tcl/tclrrd%{version}
#mv $RPM_BUILD_ROOT/usr/lib/tclrrd%{version}/pkgIndex.tcl \
# $RPM_BUILD_ROOT/usr/share/tcl/tclrrd%{version}
%clean
rm -rf $RPM_BUILD_ROOT
@ -152,10 +147,8 @@ rm -rf $RPM_BUILD_ROOT
%doc %{_docdir}/rrdtool
%doc %{_mandir}/*/*
/usr/bin/*
%{_datadir}/tcl
%{_libdir}/librrd.so.*
%{_libdir}/librrd_th.so.*
%{_libdir}/tclrrd*.so
%{perl_vendorlib}/RRDp.pm
%{perl_vendorarch}/RRDs.pm
#%{perl_vendorarch}/ntmake.pl
@ -228,4 +221,24 @@ This package contains the Lua bindings
%{_libdir}/lua/*/rrd.so.*
%endif
%package -n tcl-rrdtool
License: GPLv2+
Summary: Tcl bindings for rrdtool
Group: Productivity/Scientific/Math
Requires: tcl
%description -n tcl-rrdtool
A tool to log and analyze data gathered from all kinds of data sources.
The data analysis part of RRDtool is based on the ability to quickly
generate graphical representations of the data values collected over a
definable time period.
This package contains the Tcl bindings
%files -n tcl-rrdtool
%defattr(-, root, root)
%{tcl_archdir}/*
%{_libdir}/tclrrd*.so
%changelog