From ebb2eebf8ef41cae6786bb2849af54e32cd04f3c Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Mon, 21 May 2012 14:25:47 +0200 Subject: [PATCH] rrdtool: fix to remove the installed rrd.a and rrd.la from lua's cmod dir Note: autofoo magic installs an rrd.a and rrd.la file into lua's cmod directory which is completely nonsense. --- database/rrdtool/rrdtool.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/database/rrdtool/rrdtool.conf b/database/rrdtool/rrdtool.conf index cff246d9f..da3953224 100644 --- a/database/rrdtool/rrdtool.conf +++ b/database/rrdtool/rrdtool.conf @@ -33,3 +33,25 @@ fi # ruby support is broken right now (2007-05-13) var_append extraconfopt ' ' "--disable-ruby" + +# lua binding support + +# fix to remove the installed rrd.a and rrd.la from lua's cmod dir +rrdtool_lua_installfix() { + egrep '.*\/rrd\.(a|la)$' $builddir/flist.txt | + while read fn ; do + if [ -e $root/$fn ]; then + # remove the file + rm -f $root/$fn + # fix flist.txt + local pattern=$( echo $fn | sed "s:\/:\\\/:g" ) + sed '/$pattern/d' $builddir/flist.txt > $builddir/flist.txt.fixed + fi + done + # replace the old flist.txt with the fixed one + [ -e $builddir/flist.txt.fixed ] && mv $builddir/flist.txt{.fixed,} +} + +if pkginstalled -f lua; then + hook_add postflist 9 'rrdtool_lua_installfix' +fi