OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 29-Aug-2007 19:24:44 Branch: HEAD Handle: 2007082918244300 Modified files: openpkg-src/rrdtool rrdtool.patch rrdtool.spec Log: make Perl bindings optional and disable by default; add optional and disabled by default Python binding support Summary: Revision Changes Path 1.18 +27 -0 openpkg-src/rrdtool/rrdtool.patch 1.99 +31 -5 openpkg-src/rrdtool/rrdtool.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/rrdtool/rrdtool.patch ============================================================================ $ cvs diff -u -r1.17 -r1.18 rrdtool.patch --- openpkg-src/rrdtool/rrdtool.patch 14 May 2007 08:11:51 -0000 1.17 +++ openpkg-src/rrdtool/rrdtool.patch 29 Aug 2007 17:24:43 -0000 1.18 @@ -122,3 +122,30 @@ WriteMakefile( 'NAME' => 'RRDs', 'VERSION_FROM' => 'RRDs.pm', # finds $VERSION +Index: bindings/python/setup.py +--- bindings/python/setup.py.orig 2007-05-02 20:06 +0200 ++++ bindings/python/setup.py 2007-08-03 03:31 +0200 +@@ -47,7 +47,7 @@ + Extension( + "rrdtoolmodule", + ["rrdtoolmodule.c"], +- libraries=['rrd'], ++ libraries=['rrd', 'freetype', 'art_lgpl', 'png', 'z'], + runtime_library_dirs=[library_dir], + library_dirs=[library_dir], + include_dirs=[include_dir], +Index: configure +--- configure.orig 2007-05-02 20:07:06 +0200 ++++ configure 2007-08-03 04:37:34 +0200 +@@ -27259,9 +27259,9 @@ + echo $ECHO_N "checking for headers required to compile python extensions... $ECHO_C" >&6 + py_prefix=`$PYTHON -c "import sys; print sys.prefix"` + py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" ++PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION} -I${py_prefix}/include/python" + if test "$py_prefix" != "$py_exec_prefix"; then +- PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" ++ PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION} -I${py_exec_prefix}/include/python" + fi + + save_CPPFLAGS="$CPPFLAGS" @@ . patch -p0 <<'@@ .' Index: openpkg-src/rrdtool/rrdtool.spec ============================================================================ $ cvs diff -u -r1.98 -r1.99 rrdtool.spec --- openpkg-src/rrdtool/rrdtool.spec 14 May 2007 08:11:51 -0000 1.98 +++ openpkg-src/rrdtool/rrdtool.spec 29 Aug 2007 17:24:43 -0000 1.99 @@ -38,7 +38,11 @@ Group: Database License: LGPL Version: %{V_rrdtool} -Release: 20070514 +Release: 20070829 + +# package options +%option with_perl no +%option with_python no # list of sources Source0: http://oss.oetiker.ch/rrdtool/pub/rrdtool-%{V_rrdtool}.tar.gz @@ -51,8 +55,16 @@ BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module PreReq: OpenPKG, openpkg >= 20040130 -BuildPreReq: perl, png, zlib, libart, freetype -PreReq: perl, png, zlib, libart, freetype +BuildPreReq: png, zlib, libart, freetype +PreReq: png, zlib, libart, freetype +%if "%{with_perl}" == "yes" +BuildPreReq: perl +PreReq: perl +%endif +%if "%{with_python}" == "yes" +BuildPreReq: python +PreReq: python +%endif AutoReq: no AutoReqProv: no @@ -103,10 +115,14 @@ ./configure \ --cache-file=./config.cache \ --prefix=%{l_prefix} \ - --disable-shared \ - --disable-tcl \ +%if "%{with_python}" == "yes" + --enable-python \ +%else --disable-python \ +%endif + --disable-tcl \ --disable-ruby \ + --disable-shared \ --enable-local-libpng \ --enable-local-zlib \ --enable-rrdcgi @@ -115,11 +131,13 @@ %{l_make} %{l_mflags} # build Perl part +%if "%{with_perl}" == "yes" %{l_prefix}/bin/perl-openpkg prepare %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped configure build %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared configure build %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} configure build %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} configure build +%endif %install rm -rf $RPM_BUILD_ROOT @@ -132,20 +150,28 @@ DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" # install Perl part +%if "%{with_perl}" == "yes" %{l_prefix}/bin/perl-openpkg -d bindings/perl-piped install %{l_prefix}/bin/perl-openpkg -d bindings/perl-shared install %{l_prefix}/bin/perl-openpkg -d RRDTool-OO-%{V_rrdtool_oo} install %{l_prefix}/bin/perl-openpkg -d RRD-Simple-%{V_rrd_simple} install +%endif # strip down installation hierarchy rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc +%if "%{with_python}" == "no" rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python +%endif rm -rf $RPM_BUILD_ROOT%{l_prefix}/rrdtool-* rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/rrdtutorial.es.1 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true # post-process Perl part +%if "%{with_perl}" == "yes" %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup +%else + >perl-openpkg-files +%endif # determine installation files %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org