Index: AUTHORS =================================================================== RCS file: /cvs/gnome/gnome-applets/AUTHORS,v retrieving revision 1.11 diff -u -p -r1.11 AUTHORS --- AUTHORS 14 Feb 2003 22:18:26 -0000 1.11 +++ AUTHORS 13 Apr 2006 15:17:48 -0000 @@ -23,3 +23,4 @@ Szabolcs Ban (Shooby) Tim Janik John Kodis Loban A Rahman +Raphaël Slinckx Index: MAINTAINERS =================================================================== RCS file: /cvs/gnome/gnome-applets/MAINTAINERS,v retrieving revision 1.28 diff -u -p -r1.28 MAINTAINERS --- MAINTAINERS 4 Oct 2005 02:17:31 -0000 1.28 +++ MAINTAINERS 13 Apr 2006 15:17:48 -0000 @@ -10,3 +10,6 @@ GSwitchIt Maintainer: Mixer Maintainer: Ronald S. Bultje + +Invet Applet Maintainer: + Raphaël Slinckx Index: Makefile.am =================================================================== RCS file: /cvs/gnome/gnome-applets/Makefile.am,v retrieving revision 1.169 diff -u -p -r1.169 Makefile.am --- Makefile.am 30 Jan 2006 09:17:33 -0000 1.169 +++ Makefile.am 13 Apr 2006 15:17:48 -0000 @@ -8,6 +8,7 @@ endif vfs_applets = \ drivemount \ gtik \ + invest-applet \ libgweather \ gweather \ trashapplet @@ -73,6 +74,7 @@ DIST_SUBDIRS = \ battstat \ multiload \ gtik \ + invest-applet \ libgweather \ gweather \ man \ Index: acinclude.m4 =================================================================== RCS file: acinclude.m4 diff -N acinclude.m4 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ acinclude.m4 13 Apr 2006 15:17:48 -0000 @@ -0,0 +1,40 @@ +dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) +dnl +dnl example +dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) +dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local + +AC_DEFUN([AS_AC_EXPAND], +[ + EXP_VAR=[$1] + FROM_VAR=[$2] + + dnl first expand prefix and exec_prefix if necessary + prefix_save=$prefix + exec_prefix_save=$exec_prefix + + dnl if no prefix given, then use /usr/local, the default prefix + if test "x$prefix" = "xNONE"; then + prefix=$ac_default_prefix + fi + dnl if no exec_prefix given, then use prefix + if test "x$exec_prefix" = "xNONE"; then + exec_prefix=$prefix + fi + + full_var="$FROM_VAR" + dnl loop until it doesn't change anymore + while true; do + new_full_var="`eval echo $full_var`" + if test "x$new_full_var"="x$full_var"; then break; fi + full_var=$new_full_var + done + + dnl clean up + full_var=$new_full_var + AC_SUBST([$1], "$full_var") + + dnl restore prefix and exec_prefix + prefix=$prefix_save + exec_prefix=$exec_prefix_save +]) Index: configure.in =================================================================== RCS file: /cvs/gnome/gnome-applets/configure.in,v retrieving revision 1.417 diff -u -p -r1.417 configure.in --- configure.in 10 Apr 2006 14:48:58 -0000 1.417 +++ configure.in 13 Apr 2006 15:17:48 -0000 @@ -313,6 +313,36 @@ AM_CONDITIONAL(HAVE_LIBAPM, test "x$HAVE AM_CONDITIONAL(NEED_LIBAPM, test "x$NEED_LIBAPM" = "xyes") AM_CONDITIONAL(BUILD_BATTSTAT_APPLET, test x$build_battstat_applet = xyes) +dnl ****************************************** +dnl ** invest-applet checks ** +dnl ****************************************** + +dnl *** Python 2.4 +AM_PATH_PYTHON(2.4) +AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) + +dnl *** Write the values of various paths in defs.py +AC_SUBST(VERSION) +AC_SUBST(PACKAGE) + +AS_AC_EXPAND(DATADIR, $datadir) +AC_SUBST(DATADIR) + +AS_AC_EXPAND(LIBDIR, $libdir) +AC_SUBST(LIBDIR) + +AS_AC_EXPAND(PYTHONDIR, $pythondir) +AC_SUBST(PYTHONDIR) + +dnl *** PyGTK & co for Gnome +PKG_CHECK_MODULES(INVEST, + gtk+-2.0 >= 2.6 + pygtk-2.0 >= 2.6 + pygobject-2.0 >= 2.6 + gnome-python-2.0 >= 2.10 + gnome-python-extras-2.0 >= 2.10 +) + dnl ******************************************* dnl ** Mini-Commander checks ** dnl ******************************************* @@ -629,6 +659,11 @@ charpick/help/Makefile gtik/Makefile gtik/access/Makefile gtik/help/Makefile +invest-applet/Makefile +invest-applet/invest/Makefile +invest-applet/invest/defs.py +invest-applet/data/Makefile +invest-applet/data/art/Makefile libgweather/Makefile libgweather/gweather.pc gweather/Makefile @@ -679,6 +714,7 @@ gnome-applets-$VERSION configure summary - geyes always - gswitchit always - gtik $build_gnome_vfs_applets + - invest-applet $build_gnome_vfs_applets - gweather $build_gnome_vfs_applets - mini-commander $enable_mini_commander - mixer $HAVE_GST Index: m4/python.m4 =================================================================== RCS file: m4/python.m4 diff -N m4/python.m4 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ m4/python.m4 13 Apr 2006 15:17:48 -0000 @@ -0,0 +1,62 @@ +## this one is commonly used with AM_PATH_PYTHONDIR ... +dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) +dnl Check if a module containing a given symbol is visible to python. +AC_DEFUN(AM_CHECK_PYMOD, +[AC_REQUIRE([AM_PATH_PYTHON]) +py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) +AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ +ifelse([$2],[], [prog=" +import sys +try: + import $1 +except ImportError: + sys.exit(1) +except: + sys.exit(0) +sys.exit(0)"], [prog=" +import $1 +$1.$2"]) +if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC + then + eval "py_cv_mod_$py_mod_var=yes" + else + eval "py_cv_mod_$py_mod_var=no" + fi +]) +py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` +if test "x$py_val" != xno; then + AC_MSG_RESULT(yes) + ifelse([$3], [],, [$3 +])dnl +else + AC_MSG_RESULT(no) + ifelse([$4], [],, [$4 +])dnl +fi +]) + +dnl a macro to check for ability to create python extensions +dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) +dnl function also defines PYTHON_INCLUDES +AC_DEFUN([AM_CHECK_PYTHON_HEADERS], +[AC_REQUIRE([AM_PATH_PYTHON]) +AC_MSG_CHECKING(for headers required to compile python extensions) +dnl deduce PYTHON_INCLUDES +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}" +if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" +fi +AC_SUBST(PYTHON_INCLUDES) +dnl check if the headers exist: +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +AC_TRY_CPP([#include ],dnl +[AC_MSG_RESULT(found) +$1],dnl +[AC_MSG_RESULT(not found) +$2]) +CPPFLAGS="$save_CPPFLAGS" +])