pidgin/purple-plugin-pack

Parents 9276e5d6f485
Children a1dc69b75478
I give you a working buildsystem, the output from configure needs some work yet though... but i want this checked in...
--- a/Makefile.am Thu May 01 01:53:40 2008 -0400
+++ b/Makefile.am Thu May 01 01:57:41 2008 -0400
@@ -29,7 +29,7 @@
DIST_SUBDIRS = common doc po $(PP_DIST_DIRS)
-SUBDIRS = common doc $(PO_DIR) $(PP_PURPLE_BUILD) $(PP_PIDGIN_BUILD) $(PP_FINCH_BUILD)
+SUBDIRS = common doc $(PO_DIR) $(PP_BUILD_DIRS)
DISTCLEANFILES=\
pp_config.h \
--- a/configure.ac Thu May 01 01:53:40 2008 -0400
+++ b/configure.ac Thu May 01 01:57:41 2008 -0400
@@ -77,7 +77,7 @@
HAVE_PURPLE="yes"
AM_CONDITIONAL(HAVE_PURPLE, true)
-DEPENDENCIES="$DEPENDENCIES purple"
+DEPENDENCIES="$DEPENDENCIES,purple"
if test x"$prefix" = x"NONE" ; then
PURPLE_LIBDIR=`pkg-config --variable=libdir purple`
@@ -119,7 +119,7 @@
AC_DEFINE(HAVE_PIDGIN, 1, [Define if we've found pidgin.])
HAVE_PIDGIN="yes"
AM_CONDITIONAL(HAVE_PIDGIN, true)
- DEPENDENCIES="$DEPENDENCIES pidgin"
+ DEPENDENCIES="$DEPENDENCIES,pidgin"
], [
AC_MSG_RESULT([no])
HAVE_PIDGIN="no"
@@ -159,7 +159,7 @@
AC_DEFINE(HAVE_FINCH, 1, [Define if we've found finch.])
HAVE_FINCH="yes"
AM_CONDITIONAL(HAVE_FINCH, true)
- DEPENDENCIES="$DEPENDENCIES finch"
+ DEPENDENCIES="$DEPENDENCIES,finch"
], [
AC_MSG_RESULT([no])
HAVE_FINCH="no"
@@ -228,7 +228,7 @@
AC_CHECK_LIB(talkfilters, gtf_filter_count, TALKFILTERS_LIBS="-ltalkfilters")
AC_SUBST(TALKFILTERS_LIBS)
- DEPENDENCIES="$DEPENDENCIES talkfilters"
+ DEPENDENCIES="$DEPENDENCIES,talkfilters"
fi
dnl #######################################################################
@@ -267,7 +267,7 @@
AM_CONDITIONAL(BUILD_SWITCH_SPELL, test x"$BUILD_SWITCH_SPELL" = x"yes")
if test x"$BUILD_SWITCH_SPELL" = x"yes" ; then
- DEPENDENCIES="$DEPENDENCIES gtkspell aspell"
+ DEPENDENCIES="$DEPENDENCIES,gtkspell,aspell"
fi
dnl #######################################################################
@@ -297,7 +297,7 @@
if test x"$HAVE_XMMS" = x"yes" ; then
AC_MSG_RESULT([yes])
- DEPENDENCIES="$DEPENDENCIES xmms"
+ DEPENDENCIES="$DEPENDENCIES,xmms"
else
AC_MSG_RESULT([no])
fi
@@ -370,7 +370,7 @@
echo Purple plugins to be built.......: none
else
echo Purple plugins to be built.......:
- echo $PP_PURPLE_BUILD | xargs -n 4 echo " "
+ echo $PP_PURPLE_BUILD
fi
fi
echo;
@@ -383,7 +383,7 @@
echo Pidgin plugins to be built.......: none
else
echo Pidgin plugins to be built.......:
- echo $PP_PIDGIN_BUILD | xargs -n 4 echo " "
+ echo $PP_PIDGIN_BUILD
fi
fi
echo;
@@ -396,7 +396,7 @@
echo Finch plugins to be built........: none - THIS IS NORMAL
else
echo Finch plugins to be built........:
- echo $PP_FINCH_BUILD | xargs -n 4 echo " "
+ echo $PP_FINCH_BUILD
fi
fi
echo;
--- a/plugin_pack.py Thu May 01 01:53:40 2008 -0400
+++ b/plugin_pack.py Thu May 01 01:57:41 2008 -0400
@@ -201,10 +201,11 @@
commands['dist_dirs'] = dist_dirs
def build_dirs(self, args):
+ """Displays a list of the plugins that can be built"""
if len(args) != 2:
- print 'build_dirs expects 2 arguments:'
- print '\ta comma separated list of dependencies'
- print '\ta comma separated list of plugins to build'
+ print >> sys.stderr, 'build_dirs expects 2 arguments:'
+ print >> sys.stderr, '\ta comma separated list of dependencies'
+ print >> sys.stderr, '\ta comma separated list of plugins to build'
sys.exit(1)
# store the external depedencies
@@ -291,6 +292,12 @@
"""Outputs the contents for the file to be m4_include()'d from configure"""
uniqdirs = self.unique_dirs()
+ # add our --with-plugins option
+ print 'AC_ARG_WITH(plugins,'
+ print ' AC_HELP_STRING([--with-plugins], [what plugins to build]),'
+ print ' ,WITH_PLUGINS=all)'
+
+ # determine and add our output files
print 'PP_DIST_DIRS="%s"' % (string.join(uniqdirs, ' '))
print 'AC_SUBST(PP_DIST_DIRS)'
print
@@ -298,6 +305,17 @@
for dir in uniqdirs:
print '\t%s/Makefile' % (dir)
print '])'
+ print
+
+ # setup a second call to determine the plugins to be built
+ print 'PP_BUILD=`$PYTHON $srcdir/plugin_pack.py build_dirs $DEPENDENCIES $WITH_PLUGINS`'
+ print
+ print 'PP_BUILD_DIRS=`echo $PP_BUILD | sed \'s/,/\ /g\'`'
+ print 'AC_SUBST(PP_BUILD_DIRS)'
+ print
+ print 'PP_PURPLE_BUILD=`$PYTHON $srcdir/plugin_pack.py -p show_names $PP_BUILD`'
+ print 'PP_PIDGIN_BUILD=`$PYTHON $srcdir/plugin_pack.py -P show_names $PP_BUILD`'
+ print 'PP_FINCH_BUILD=`$PYTHON $srcdir/plugin_pack.py -f show_names $PP_BUILD`'
commands['config_file'] = config_file
def dependency_graph(self, args):
@@ -359,6 +377,20 @@
print '}'
commands['dependency_graph'] = dependency_graph
+ def show_names(self, args):
+ """Displays the names of the given comma separated list of provides"""
+
+ names = []
+
+ provides = args[0].split(',')
+ for provide in provides:
+ if provide in self.plugins:
+ names.append(self.plugins[provide].name)
+
+ print string.join(names, ', ')
+
+ commands['show_names'] = show_names
+
def info(self, args):
"""Displays all information about the given plugins"""
for p in args: