diff -Nru telepathy-idle-0.1.11/aclocal.m4 telepathy-idle-0.1.12/aclocal.m4 --- telepathy-idle-0.1.11/aclocal.m4 2011-10-28 17:11:27.000000000 +0000 +++ telepathy-idle-0.1.12/aclocal.m4 2012-08-02 13:03:02.000000000 +0000 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,8 +14,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -179,12 +180,15 @@ fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -194,7 +198,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -210,7 +214,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -239,12 +243,14 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -326,14 +332,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 +# serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -373,6 +379,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -437,7 +444,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -502,10 +509,13 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -739,12 +749,15 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -876,12 +889,15 @@ fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -904,13 +920,14 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -918,13 +935,13 @@ [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -935,13 +952,15 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009, +# 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 2 + # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To @@ -969,8 +988,10 @@ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], - [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl -python2.1 python2.0]) +[python python2 python3 python3.2 python3.1 python3.0 python2.7 dnl + python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) m4_if([$1],[],[ dnl No version check is needed. @@ -1042,9 +1063,7 @@ dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. - dnl Query distutils for this directory. distutils does not exist in - dnl Python 1.5, so we fall back to the hardcoded directory if it - dnl doesn't work. + dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE @@ -1053,8 +1072,7 @@ else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || - echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` @@ -1080,9 +1098,7 @@ dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) - dnl Query distutils for this directory. distutils does not exist in - dnl Python 1.5, so we fall back to the hardcoded directory if it - dnl doesn't work. + dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE @@ -1091,8 +1107,7 @@ else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || - echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` @@ -1140,12 +1155,14 @@ sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. @@ -1222,13 +1239,13 @@ fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 +# serial 2 # AM_SILENT_RULES([DEFAULT]) # -------------------------- @@ -1243,18 +1260,50 @@ no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac +dnl +dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using `$V' instead of `$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -1277,13 +1326,13 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- @@ -1292,13 +1341,13 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1320,10 +1369,11 @@ # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) @@ -1393,9 +1443,11 @@ ]) # _AM_PROG_TAR m4_include([m4/as-ac-expand.m4]) -m4_include([m4/as-compiler-flag.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) +m4_include([m4/tp-compiler-flag.m4]) +m4_include([m4/tp-compiler-warnings.m4]) +m4_include([m4/tp-linker-flag.m4]) diff -Nru telepathy-idle-0.1.11/ChangeLog telepathy-idle-0.1.12/ChangeLog --- telepathy-idle-0.1.11/ChangeLog 2011-10-28 17:12:03.000000000 +0000 +++ telepathy-idle-0.1.12/ChangeLog 2012-08-03 07:17:18.000000000 +0000 @@ -1,3 +1,645 @@ +commit 81cffc1bd9d0e1e8778a392e23dd4f100e09a761 +Author: Will Thompson +Date: 2012-08-02 14:05:41 +0100 + + Tell Automake about _gen/svc-gtk-doc.h + + When the codegen was updated, this started being built, but not cleaned + up, so distcheck was broken. + +commit 79d504189a5d8828a9155af016724f0e5aab38ce +Author: Will Thompson +Date: 2012-08-02 14:02:42 +0100 + + Version 0.1.12 + +commit 55922907eda82efcbb2b7782c87248290e16d392 +Author: Will Thompson +Date: 2012-08-02 13:51:53 +0100 + + NEWS for 0.1.12 + +commit 2c5a91e26f4dd098465f0b32013bc0b3d0edeceb +Author: Will Thompson +Date: 2012-07-19 12:13:41 +0100 + + IMManager: replace constructor with constructed. + +commit 10696387956845ad0ad764c9de99b909e5dae586 +Author: Will Thompson +Date: 2012-07-18 14:23:16 +0100 + + Reindent idle-im-channel.c + +commit 2d61fce82d6aeb711ad49adaa0a9ed6fdd6567e5 +Author: Will Thompson +Date: 2012-07-18 14:20:03 +0100 + + Make IdleIMChannel use TpBaseChannel + + https://bugs.freedesktop.org/show_bug.cgi?id=31725 + +commit 1ce34440c58a9b82cb15711d95e35a8acb512ecd +Author: Will Thompson +Date: 2012-07-18 14:12:07 +0100 + + servicetest: squash dbus-python deprecation warning + +commit bf7da882f6f5489e45afa8055616184d6ddaaac4 +Author: Thomas Thurman +Date: 2012-07-09 12:11:12 +0100 + + Renamed variables to avoid warnings with "-Werror=shadow". + + idle-parser.c: renamed "link" to "link_". + idle-server-connection.c: renamed "socket" to "socket_". + + https://bugs.freedesktop.org/show_bug.cgi?id=51906 + +commit 382886e7dacd79b86dc72a38e9ef32d321d8ab95 +Merge: f8bec1f f333fe8 +Author: Simon McVittie +Date: 2012-05-30 13:08:35 +0100 + + Merge branch 'catch-up' + + Conflicts: + configure.ac + src/idle-muc-channel.c + +commit f8bec1f34af87c4bc044b022abc69f1176ba1f33 +Author: Jonny Lamb +Date: 2012-05-16 18:40:59 +0100 + + room-config: use G_N_ELEMENTS + + Signed-off-by: Jonny Lamb + +commit cd6059e686d95fb1d8d9f080abedce6ab95a9c82 +Author: Jonny Lamb +Date: 2012-05-16 18:37:09 +0100 + + room-config: simplify password protection validation + + Yeah okay I might have been calling tp_asv_get_* a little too many + times... + + Signed-off-by: Jonny Lamb + +commit 6ff9e1a08d0a3c24e68cb1b65289eb95e7060359 +Author: Jonny Lamb +Date: 2012-05-16 18:30:56 +0100 + + room-config: flicker CanUpdateConfiguration but keep MutableProperties stable + + I had misunderstood these two properties before, yet again. This is + better and easier. I added more tests. + + Signed-off-by: Jonny Lamb + +commit a66b3c0c7ded54ca407439871d87b7fbd20535e8 +Author: Jonny Lamb +Date: 2012-05-16 18:08:08 +0100 + + muc-channel: move RoomConfig stuff into IdleRoomConfig + + Genius! + + Signed-off-by: Jonny Lamb + +commit 33f0ab025272f54e613f84c68b09a4c2046b7409 +Author: Jonny Lamb +Date: 2012-05-16 17:40:02 +0100 + + muc-channel: validate Password properties to simplify {,un}setting branch + + This is much better. I should have done this before. I also added some + tests to make sure bad args are rejected. + + Signed-off-by: Jonny Lamb + +commit eb9aa795c7f4047f93f785889955cbf40408c448 +Author: Jonny Lamb +Date: 2012-05-16 17:08:20 +0100 + + muc-channel: turn DO_QUICK_BOOLEAN from a macro into a function + + Signed-off-by: Jonny Lamb + +commit 0ca501e59fcff2279a927535708bf2143169d7fe +Author: Jonny Lamb +Date: 2012-05-16 17:01:34 +0100 + + muc-channel: track op-ness in the channel to mark config properties {,im}mutable + + I must admit I misunderstood what was going on with this earlier when + I removed it. I was just being an idiot. I've brought it back now and + it's even tested! + + Signed-off-by: Jonny Lamb + +commit ae49f3ee466d8064fe33826233efa68d3e2fbb0a +Author: Jonny Lamb +Date: 2012-05-15 14:47:22 +0100 + + muc-channel: set configuration retrieved when appropriate + + Signed-off-by: Jonny Lamb + +commit 7456e007f33524239a49f412802aae2d44307849 +Author: Jonny Lamb +Date: 2012-05-15 14:09:01 +0100 + + muc-channel: remove the last of the TpProperties code + + Woo! + + Signed-off-by: Jonny Lamb + +commit 0ebd6dce95490067aa2af15cd361bacef0d695d6 +Author: Jonny Lamb +Date: 2012-05-15 14:02:43 +0100 + + muc-channel: remove last property flags setting + + Signed-off-by: Jonny Lamb + +commit b2cffbe9682ee5d9174a13dbe0646026abfb3699 +Author: Jonny Lamb +Date: 2012-05-15 13:54:52 +0100 + + muc-channel: start setting RoomConfig properties for mode changes + + Ignore the indentation; it's all wrong. I hate idle. + + Signed-off-by: Jonny Lamb + +commit d342dfbab2e8a39f64d9c5d792a4a8fa96eef6cf +Author: Jonny Lamb +Date: 2012-05-15 11:17:41 +0100 + + muc-channel: remove SetProperties implementation + + Woo, getting closer! + + Signed-off-by: Jonny Lamb + +commit 65ab1d0ec73dcf83533284ec157b255023edaee1 +Author: Jonny Lamb +Date: 2012-05-14 21:10:19 +0100 + + tests: add RoomConfig1 test + + Signed-off-by: Jonny Lamb + +commit c718f11c8dc1e8270fb5d101c366df97f074e315 +Author: Jonny Lamb +Date: 2012-05-14 21:09:39 +0100 + + muc-channel: add initial RoomConfig1 implementation + + Signed-off-by: Jonny Lamb + +commit 5430aa1495a9efb0e9b9ad030fc7c66655aac064 +Author: Jonny Lamb +Date: 2012-05-14 16:00:11 +0100 + + muc-channel: stop implementing {Get,List}Properties + + We're porting to RoomConfig now, we don't need this. + + Signed-off-by: Jonny Lamb + +commit 7e1c6dd5060edb917838435193ea1e9601a16a5d +Author: Will Thompson +Date: 2011-09-09 13:29:55 +0100 + + Implement Channel.I.Room + + This is really trivial, I'm happy to report. + +commit 6c79a8d71d16c615b416c7b45b24ed0701e7540d +Author: Will Thompson +Date: 2011-09-09 12:15:40 +0100 + + MUCManager: use constants for property names + +commit af091b3540daf716d7cbe080bf903f7c84e3b520 +Author: Will Thompson +Date: 2011-09-09 12:10:06 +0100 + + MUCManager: simplify foreach_channel + +commit dbd130225b9aa35b1244efc0ce2ed3c1979a59d7 +Author: Will Thompson +Date: 2011-09-09 12:07:56 +0100 + + MUCManager: simplify foreach_channel_class + +commit d8fb9480f7bb452eac31a9b0563d6340be0c226c +Author: Will Thompson +Date: 2011-09-09 12:04:27 +0100 + + MUCManager: move ChannelType check up + + There's no reason for us to even look at the rest of the request if it's + not a request for a text channel. + +commit 7c284a169e4441c524432d627c100cee6d7b9923 +Author: Will Thompson +Date: 2011-09-09 11:58:57 +0100 + + MUCManager: reindent requests code. + + I think I may have been partly responsible for the abominable formatting + before, and I apologise. + +commit 7f1093771689ffbef577bb245152eb25264ca32e +Author: Jonny Lamb +Date: 2012-05-14 21:14:15 +0100 + + server-connection: fix race when writing to stream when closed + + Signed-off-by: Jonny Lamb + +commit 84492da380ae2c0453e2c1aae9218e9f7df1909a +Author: Jonny Lamb +Date: 2012-05-14 21:13:43 +0100 + + configure: disable newer deprecations and API additions + + Signed-off-by: Jonny Lamb + +commit f333fe80d27ded0882b9301ecab957bbe8d79e5e +Author: Simon McVittie +Date: 2012-05-10 14:35:51 +0100 + + Fix coding style nits in the tests + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit 2a6ad36e772ec38eb5ad67f2cfa7cf9042fa0b1d +Author: Simon McVittie +Date: 2012-05-10 14:18:02 +0100 + + Bring in the compiler/linker warnings from telepathy-glib + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit 263707940384faff5133c322a75ef5036a6362f5 +Author: Simon McVittie +Date: 2012-05-10 14:17:40 +0100 + + idle_debug_init: don't make a semicolon have side-effects + + I really don't like that style. gcc didn't warn about it, but IMO + it should... + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit 3e6a3e363f6486dc35fb2e1fbf4de04946e60594 +Author: Simon McVittie +Date: 2012-05-10 14:16:54 +0100 + + Fix some confusing variable-shadowing by just reusing the variables + + This code is a bit of a mess, and it implements Telepathy 0.x + Properties by hand, without even using the (now deprecated!) mixin, + but I'm not going to fix that right now. + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit c3de9e89b571782e393d0f3b1a8236d34beec9d5 +Author: Simon McVittie +Date: 2012-05-10 14:15:54 +0100 + + Make some internal functions properly static + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit 33101f04c60d7806b7f77802cc24471ecab9458e +Author: Simon McVittie +Date: 2012-05-10 14:15:32 +0100 + + Prototype functions properly: foo() is not a prototype, foo(void) is + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit 05542224e7a75936e13aa066180de0fa7b934f37 +Author: Simon McVittie +Date: 2012-05-10 14:14:17 +0100 + + Various dull C89-compliance + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit 5b210484408cf7ce82e6cd79e227785cec8eb811 +Author: Simon McVittie +Date: 2012-05-10 13:45:08 +0100 + + configure.ac: fix some underquoting + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit 9a86956fd150e98bb255a397e0c18a5d9b772ac4 +Author: Simon McVittie +Date: 2012-05-10 13:44:33 +0100 + + configure.ac: drop redundant AC_SUBSTs and content-free comments + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit 7dd61ce124bed7532ed84112ddda3c3d1387afb9 +Author: Simon McVittie +Date: 2012-05-10 13:42:38 +0100 + + Stop refcounting handles, which have been "immortal" since 0.14 + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + +commit fdcfc1c8c6764183e3df65f11d0abc463a3a9984 +Author: Simon McVittie +Date: 2012-05-07 20:04:36 +0100 + + Remove generated marshallers, just use g_cclosure_marshal_generic + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49600 + +commit 752984356467f08c4a61417cc6aafda489251190 +Author: Simon McVittie +Date: 2012-05-07 20:03:06 +0100 + + Fix codegen to respect changes to the input + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49600 + +commit 32e728c006349fb32f1b470a5c7d44a1f1390d0d +Author: Simon McVittie +Date: 2012-05-07 20:02:45 +0100 + + Allow generation of unstable interfaces + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49600 + +commit f8777fb07851b801b75550048d4d95175c887b4d +Author: Simon McVittie +Date: 2012-05-07 19:59:47 +0100 + + Update Renaming interface from spec 0.25.2 to satisfy pickier codegen + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49600 + +commit ebacb6f3533ef64a9a18dd597ed299f7584746a0 +Author: Simon McVittie +Date: 2012-05-07 19:56:49 +0100 + + Update codegen tools from telepathy-glib, requiring GLib 2.30 + + The updated codegen needs g_cclosure_marshal_generic. + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49600 + +commit 418bb2c2958084f5278f9d0c0927c0f81d4d451c +Author: Simon McVittie +Date: 2012-05-07 19:48:04 +0100 + + Remove INSTALL from git + + We have no customizations relative to the one provided by Automake. + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49600 + +commit 25480a1a42a227a716ede318deebb506adf9a553 +Author: Simon McVittie +Date: 2012-05-07 19:43:25 +0100 + + Use TpIntset, not deprecated TpIntSet + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49600 + +commit 48ca05d7fa53b3cf8fd8d85756434c570cc8fd56 +Author: Simon McVittie +Date: 2012-05-07 19:43:08 +0100 + + Use TP_ERROR, not deprecated TP_ERRORS + + Signed-off-by: Simon McVittie + Reviewed-by: Xavier Claessens + Bug: https://bugs.freedesktop.org/show_bug.cgi?id=49600 + +commit 307faa064970b2830c618d470fe56eec3ac191c6 +Author: Simon McVittie +Date: 2012-05-07 19:37:31 +0100 + + Set G_MESSAGES_DEBUG during testing + + The same as Gabble commit cbfa9d06. + +commit 2479ef3d6052ec03eb998496cb32f41f54f5799c +Author: Guillaume Desmottes +Date: 2012-04-03 16:38:03 +0200 + + use new GLib API checking macros + +commit 7aba06d98bb844e6af037ee8a8b72bb686725512 +Author: Guillaume Desmottes +Date: 2012-04-03 16:38:27 +0200 + + config.h has to be the first header included in C files + +commit 493011ede54f4ff96410118153b76cf8cd8a1001 +Author: Jonny Lamb +Date: 2012-04-03 13:26:20 -0400 + + muc-channel,parser: fix GLib version check + + g_value_{get,set}_schar actually appeared in 2.31, so let's check for + that instead. Sigh. + + Signed-off-by: Jonny Lamb + +commit bbe052521053fe370173947b8fec0deb7ce6ef6f +Author: Jonny Lamb +Date: 2012-04-03 10:14:17 -0400 + + replace calls to g_value_{get,set}_char with _schar versions + + g_value_{get,set}_char was deprecated and replaced with + {get,set}_schar in GLib 2.32. + + Signed-off-by: Jonny Lamb + +commit e0453c6ea47e1ee1ffe76acf2f0f6e9a94487fcb +Merge: 8cba7da 529606d +Author: Will Thompson +Date: 2012-04-02 17:40:00 +0100 + + Merge branch '48084-eats-cpu-on-failed-ssh-forward' + +commit 529606d547089bd4f6c6e7520fb96af7d1ffe23a +Author: Will Thompson +Date: 2012-03-30 13:24:34 +0100 + + Test server dropping connection after authentication. + + This has always worked fine, but wasn't tested. + +commit 461c00a7db16b8473d64dacd2af048b8b3b480b3 +Author: Will Thompson +Date: 2012-03-30 13:22:27 +0100 + + Connection: handle ServerConn errors while Connecting + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48084 + +commit 05fa69e93345351ac193008596b5318afddd9bca +Author: Will Thompson +Date: 2012-03-30 13:17:13 +0100 + + ServerConnection: guard against double-disconnection + + idle_server_connection_disconnect_full_async() clears priv->io_stream, + so calling it twice would previously crash us. + +commit 232ad6ddef6d4670e78615a83a4db4f554933047 +Author: Will Thompson +Date: 2012-03-30 12:11:25 +0100 + + Connection: inline enqueueing messages + + _add_msg_to_queue() is only called from one place; moving it into + _send_with_priority() makes the code marginally smaller and easier to + follow. + +commit ccec1e5c075d2c712dba48b64696cbc6e36f1b3b +Author: Will Thompson +Date: 2012-03-30 11:59:27 +0100 + + Connection: simplify adding queue timeouts + + So previously there was this special-case in _send_with_priority() + which would send out the message immediately rather than enqueueing it + if: + + • it was max priority, or + • we're connected, and there's no timeout, and it's been at least + timeout seconds since we last sent something. + + The “max priority doesn't need to wait for the queue” case is + dysfunctional: if you call idle_server_connection_send_async() while + another call is in flight, then it fails (because + g_output_stream_write_async() fails in that case), and so + _send_with_max_priority_ready() would just push the message to the top + of the queue where it belongs. + + The “flush immediately” logic is much clearer if added to the code + which sets up the timeouts. + + The “if we're connected” check didn't do anything anyway: + _add_msg_to_queue() adds a timeout regardless of whether we're connected + (which is good, because it gets used during connection…). + +commit e605db1cbe3707edf86fc51c4d0f5114c76ae0a3 +Author: Will Thompson +Date: 2012-03-30 11:49:36 +0100 + + IdleConnection: remove unused message-batching code + + This code has been buggy for ages, but it never mattered because it + never ran… so let's just remove it. It simplifies the message queue + timeout dramatically. + +commit b0c8cc59b600f117826f3541b86414af2c538229 +Author: Will Thompson +Date: 2012-03-30 11:46:14 +0100 + + IdleConnection: don't drop & leak messages on full output buffer + + In practice this loop is never entered because + MSG_QUEUE_UNLOAD_AT_A_TIME is defined to 1. Perhaps we should just + remove this loop. + +commit bbacae0297273ecc9ad556cb9a033fd6e339facc +Author: Will Thompson +Date: 2012-03-30 10:46:21 +0100 + + Connection: delete requeueing logic. + + If sending a message fails, the connection to the server is hosed and we + should give up rather than trying again later. This patch stops us + trying again later for the same message, at least… + +commit 1606e4a28eab2abb140ebddd2f26685e5738c457 +Author: Will Thompson +Date: 2012-03-30 10:37:54 +0100 + + ServerConnection: disconnect on end-of-file. + +commit 8cba7dab98c6e00608b3c5ae3077e2005ab69e18 +Author: Danielle Madeley +Date: 2011-11-07 22:03:44 +1100 + + Fix the test broken by the last commit + + Oh yeah, the tests... + +commit 9b251d95bf5f0a074226c0948fc59cd4ee4d460d +Author: Danielle Madeley +Date: 2011-11-07 21:25:46 +1100 + + Make unknown timestamp a G_MAXINT64 + + This makes idle compliant with the updated spec. + +commit a4c98cfc5f89e84628c7ebd4bcaeb431f986917a +Author: Sjoerd Simons +Date: 2011-11-01 23:10:00 +0000 + + Support trailing parameter without a initial : + + BIP doesn't start the trailing parameter with a : when it's only a + single word in various cases. For example when sending the topic. Adjust + our parser to accept trailing parameters not starting with : if it's the + final word in the string + +commit 8e80e5fc190d6dc7654f835bdb0467c035a02fa3 +Author: Will Thompson +Date: 2011-11-01 13:00:07 +0000 + + Subject: implement ActorHandle property. + + Reviewed-by: Sjoerd Simons + +commit 9a4964631952846d829fc63d8f4f5299e697908a +Author: Will Thompson +Date: 2011-10-28 18:15:17 +0100 + + nano version bump + commit 872881685ba1b652e8cacee92ae0dbe6c172613f Author: Will Thompson Date: 2011-10-28 18:00:57 +0100 diff -Nru telepathy-idle-0.1.11/config.guess telepathy-idle-0.1.12/config.guess --- telepathy-idle-0.1.11/config.guess 2011-10-28 17:02:49.000000000 +0000 +++ telepathy-idle-0.1.12/config.guess 2012-07-02 14:11:19.000000000 +0000 @@ -2,9 +2,9 @@ # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -57,8 +55,8 @@ Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +143,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -792,13 +790,12 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -807,6 +804,9 @@ *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -861,6 +861,13 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -895,13 +902,16 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -943,7 +953,7 @@ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -978,13 +988,13 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -1315,6 +1325,9 @@ i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff -Nru telepathy-idle-0.1.11/config.h.in telepathy-idle-0.1.12/config.h.in --- telepathy-idle-0.1.11/config.h.in 2011-10-28 17:11:38.000000000 +0000 +++ telepathy-idle-0.1.12/config.h.in 2012-08-02 13:03:31.000000000 +0000 @@ -3,6 +3,12 @@ /* DBus services directory */ #undef DBUS_SERVICES_DIR +/* Prevent post 2.30 APIs */ +#undef GLIB_VERSION_MAX_ALLOWED + +/* Ignore post 2.28 deprecations */ +#undef GLIB_VERSION_MIN_REQUIRED + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -64,6 +70,12 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Prevent post 0.20 APIs */ +#undef TP_VERSION_MAX_ALLOWED + +/* Ignore post 0.18 deprecations */ +#undef TP_VERSION_MIN_REQUIRED + /* Version number of package */ #undef VERSION diff -Nru telepathy-idle-0.1.11/config.sub telepathy-idle-0.1.12/config.sub --- telepathy-idle-0.1.11/config.sub 2011-10-28 17:02:49.000000000 +0000 +++ telepathy-idle-0.1.12/config.sub 2012-07-02 14:11:19.000000000 +0000 @@ -2,9 +2,9 @@ # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-03-23' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -76,8 +74,8 @@ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -132,6 +130,10 @@ os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -223,6 +225,12 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,17 +255,22 @@ # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -291,7 +304,7 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -300,7 +313,7 @@ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +328,7 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +341,10 @@ strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,11 +367,13 @@ # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ @@ -365,8 +382,10 @@ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ @@ -400,7 +419,7 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -408,10 +427,11 @@ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -711,7 +731,6 @@ i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -808,10 +827,18 @@ ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -1120,13 +1147,8 @@ basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1336,7 +1358,7 @@ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ @@ -1521,6 +1543,9 @@ c4x-* | tic4x-*) os=-coff ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1548,9 +1573,6 @@ ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout diff -Nru telepathy-idle-0.1.11/configure telepathy-idle-0.1.12/configure --- telepathy-idle-0.1.11/configure 2011-10-28 17:11:31.000000000 +0000 +++ telepathy-idle-0.1.12/configure 2012-08-02 13:03:04.000000000 +0000 @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for telepathy-idle 0.1.11. +# Generated by GNU Autoconf 2.69 for telepathy-idle 0.1.12. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,7 +192,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -222,21 +246,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -340,6 +368,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -461,6 +497,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -495,16 +535,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -516,28 +556,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -571,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='telepathy-idle' PACKAGE_TARNAME='telepathy-idle' -PACKAGE_VERSION='0.1.11' -PACKAGE_STRING='telepathy-idle 0.1.11' +PACKAGE_VERSION='0.1.12' +PACKAGE_STRING='telepathy-idle 0.1.12' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=Telepathy&component=idle' PACKAGE_URL='' @@ -637,7 +657,6 @@ TELEPATHY_CFLAGS DBUS_LIBS DBUS_CFLAGS -GLIB_GENMARSHAL GLIB_LIBS GLIB_CFLAGS PKG_CONFIG_LIBDIR @@ -673,6 +692,7 @@ am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -720,6 +740,8 @@ INSTALL_PROGRAM AM_BACKSLASH AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V target_alias host_alias build_alias @@ -770,6 +792,8 @@ with_gnu_ld with_sysroot enable_libtool_lock +enable_fatal_warnings +enable_Werror ' ac_precious_vars='build_alias host_alias @@ -792,7 +816,8 @@ TELEPATHY_CFLAGS TELEPATHY_LIBS OPENSSL_CFLAGS -OPENSSL_LIBS' +OPENSSL_LIBS +PYTHON' # Initialize some variables set by options. @@ -1248,8 +1273,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1335,7 +1358,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures telepathy-idle 0.1.11 to adapt to many kinds of systems. +\`configure' configures telepathy-idle 0.1.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1405,7 +1428,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of telepathy-idle 0.1.11:";; + short | recursive ) echo "Configuration of telepathy-idle 0.1.12:";; esac cat <<\_ACEOF @@ -1422,11 +1445,16 @@ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) + --enable-fatal-warnings make various warnings fatal + --disable-fatal-warnings + make various warnings non-fatal + --disable-Werror compile without -Werror (normally enabled in + development builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR @@ -1460,6 +1488,7 @@ C compiler flags for OPENSSL, overriding pkg-config OPENSSL_LIBS linker flags for OPENSSL, overriding pkg-config + PYTHON the Python interpreter Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1527,10 +1556,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -telepathy-idle configure 0.1.11 -generated by GNU Autoconf 2.68 +telepathy-idle configure 0.1.12 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1606,7 +1635,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1805,8 +1834,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by telepathy-idle $as_me 0.1.11, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by telepathy-idle $as_me 0.1.12, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2169,6 +2198,33 @@ no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' @@ -2240,7 +2296,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2409,7 +2465,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2449,7 +2505,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2500,7 +2556,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2553,7 +2609,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2639,7 +2695,7 @@ # Define the identity of the package. PACKAGE='telepathy-idle' - VERSION='0.1.11' + VERSION='0.1.12' cat >>confdefs.h <<_ACEOF @@ -2669,11 +2725,11 @@ # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -2688,8 +2744,8 @@ -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -2897,6 +2953,7 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -2929,7 +2986,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2969,7 +3026,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3022,7 +3079,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3063,7 +3120,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3121,7 +3178,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3165,7 +3222,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3611,8 +3668,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3710,6 +3766,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3769,7 +3826,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -3846,7 +3903,7 @@ for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -3922,7 +3979,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3988,7 +4045,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4055,7 +4112,7 @@ for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -4311,7 +4368,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4355,7 +4412,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4513,6 +4570,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -4552,7 +4614,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -4774,7 +4836,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4814,7 +4876,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4940,10 +5002,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -4981,8 +5039,8 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -5120,7 +5178,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5160,7 +5218,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5264,7 +5322,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5308,7 +5366,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5433,7 +5491,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5473,7 +5531,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5532,7 +5590,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5572,7 +5630,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5622,13 +5680,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -5775,6 +5833,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -6163,7 +6222,7 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -6174,7 +6233,20 @@ case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -6207,7 +6279,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6247,7 +6319,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6327,7 +6399,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6367,7 +6439,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6419,7 +6491,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6459,7 +6531,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6511,7 +6583,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6551,7 +6623,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6603,7 +6675,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6643,7 +6715,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6695,7 +6767,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6735,7 +6807,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6814,7 +6886,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -6825,6 +6903,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -6857,6 +6936,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -6878,7 +6958,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -7283,7 +7365,22 @@ # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -7361,6 +7458,10 @@ + + + + test -z "$LN_S" && LN_S="ln -s" @@ -7820,7 +7921,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -7864,7 +7967,7 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -7911,18 +8014,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -8284,7 +8402,6 @@ hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -8537,8 +8654,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -8918,6 +9034,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -8963,6 +9080,7 @@ hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -8991,10 +9109,6 @@ hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -9007,7 +9121,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9046,7 +9160,6 @@ fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -9670,11 +9783,6 @@ - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -9764,7 +9872,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -9773,7 +9881,7 @@ ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -9838,7 +9946,7 @@ ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -9977,7 +10085,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -9985,10 +10093,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -9996,7 +10100,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10014,7 +10118,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -10033,19 +10137,8 @@ esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -10106,7 +10199,7 @@ ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -10122,7 +10215,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -10159,9 +10252,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10255,7 +10348,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -10324,7 +10417,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10349,7 +10442,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -10373,7 +10466,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -10404,7 +10497,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10414,7 +10507,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -11196,6 +11289,8 @@ + + ac_config_commands="$ac_config_commands libtool" @@ -11235,7 +11330,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11275,7 +11370,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11328,7 +11423,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11369,7 +11464,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -11427,7 +11522,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11471,7 +11566,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -11667,8 +11762,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -11766,6 +11860,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -11825,7 +11920,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -12030,7 +12125,7 @@ return 0; } _ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : @@ -12070,8 +12165,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -12193,6 +12287,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -12250,7 +12345,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -12306,12 +12401,38 @@ +if test 0 = 0; then : + # version x.y.z - "official release", + # disable extra checks by default + # Check whether --enable-fatal-warnings was given. +if test "${enable_fatal_warnings+set}" = set; then : + enableval=$enable_fatal_warnings; +else + enable_fatal_warnings=no +fi + + +else + # version x.y.z.1 - development snapshot, + # enable extra checks by default + # Check whether --enable-fatal-warnings was given. +if test "${enable_fatal_warnings+set}" = set; then : + enableval=$enable_fatal_warnings; +else + enable_fatal_warnings=yes +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wall" >&5 -$as_echo_n "checking to see if compiler understands -Wall... " >&6; } + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands " >&5 +$as_echo_n "checking to see if compiler understands ... " >&6; } save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wall" + save_CXXFLAGS="$CXXFLAGS" + CFLAGS="$CFLAGS " + CXXFLAGS="$CXXFLAGS " cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12331,23 +12452,40 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" + CXXFLAGS="$save_CXXFLAGS" if test "X$flag_ok" = Xyes ; then - ERROR_CFLAGS="-Wall" + true else - ERROR_CFLAGS="" + true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Werror" >&5 -$as_echo_n "checking to see if compiler understands -Werror... " >&6; } + + tp_warnings="" + for tp_flag in all \ + extra \ + declaration-after-statement \ + shadow \ + missing-prototypes \ + nested-externs \ + pointer-arith \ + sign-compare \ + strict-prototypes \ + format-security \ + init-self; do + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -W$tp_flag" >&5 +$as_echo_n "checking to see if compiler understands -W$tp_flag... " >&6; } save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Werror" + save_CXXFLAGS="$CXXFLAGS" + CFLAGS="$CFLAGS -W$tp_flag" + CXXFLAGS="$CXXFLAGS -W$tp_flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12367,23 +12505,29 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" + CXXFLAGS="$save_CXXFLAGS" if test "X$flag_ok" = Xyes ; then - werror=yes + tp_warnings="$tp_warnings -W$tp_flag" true else - werror=no + true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } + done + + tp_error_flags="-Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wextra" >&5 -$as_echo_n "checking to see if compiler understands -Wextra... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Werror" >&5 +$as_echo_n "checking to see if compiler understands -Werror... " >&6; } save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wextra" + save_CXXFLAGS="$CXXFLAGS" + CFLAGS="$CFLAGS -Werror" + CXXFLAGS="$CXXFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12403,23 +12547,29 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" + CXXFLAGS="$save_CXXFLAGS" if test "X$flag_ok" = Xyes ; then - wextra=yes + tp_werror=yes true else - wextra=no + tp_werror=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wno-missing-field-initializers" >&5 -$as_echo_n "checking to see if compiler understands -Wno-missing-field-initializers... " >&6; } + for tp_flag in missing-field-initializers \ + unused-parameter; do + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wno-$tp_flag" >&5 +$as_echo_n "checking to see if compiler understands -Wno-$tp_flag... " >&6; } save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-missing-field-initializers" + save_CXXFLAGS="$CXXFLAGS" + CFLAGS="$CFLAGS -Wno-$tp_flag" + CXXFLAGS="$CXXFLAGS -Wno-$tp_flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12439,23 +12589,26 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" + CXXFLAGS="$save_CXXFLAGS" if test "X$flag_ok" = Xyes ; then - wno_missing_field_initializers=yes + tp_warnings="$tp_warnings -Wno-$tp_flag" true else - wno_missing_field_initializers=no + true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wno-unused-parameter" >&5 -$as_echo_n "checking to see if compiler understands -Wno-unused-parameter... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -Wno-error=$tp_flag" >&5 +$as_echo_n "checking to see if compiler understands -Wno-error=$tp_flag... " >&6; } save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -Wno-unused-parameter" + save_CXXFLAGS="$CXXFLAGS" + CFLAGS="$CFLAGS -Wno-error=$tp_flag" + CXXFLAGS="$CXXFLAGS -Wno-error=$tp_flag" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12475,22 +12628,70 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" + CXXFLAGS="$save_CXXFLAGS" if test "X$flag_ok" = Xyes ; then - wno_unused_parameter=yes + tp_error_flags="$tp_error_flags -Wno-error=$tp_flag" true else - wno_unused_parameter=no + tp_werror=no true fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } + done + + # Check whether --enable-Werror was given. +if test "${enable_Werror+set}" = set; then : + enableval=$enable_Werror; tp_werror=$enableval +else + : +fi + + + if test "x$tp_werror" = xyes && test "x$enable_fatal_warnings" = xyes; then + ERROR_CFLAGS="$tp_error_flags $tp_warnings" + else + ERROR_CFLAGS="$tp_warnings" + fi + + + + +# these aren't really error flags but they serve a similar purpose for us - +# making the toolchain stricter +if test "x$enable_fatal_warnings" = xyes; then + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler/linker understand -Wl,--no-copy-dt-needed-entries" >&5 +$as_echo_n "checking to see if compiler/linker understand -Wl,--no-copy-dt-needed-entries... " >&6; } + + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,--no-copy-dt-needed-entries" + if ac_fn_c_try_compile "$LINENO"; then : + flag_ok=yes +else + flag_ok=no +fi +rm -f core conftest.err conftest.$ac_objext + LDFLAGS="$save_LDFLAGS" + if test "X$flag_ok" = Xyes ; then + ERROR_LDFLAGS="$ERROR_LDFLAGS -Wl,--no-copy-dt-needed-entries" + true + else + + true + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 +$as_echo "$flag_ok" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : @@ -12647,6 +12848,13 @@ +$as_echo "#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_28" >>confdefs.h + + +$as_echo "#define GLIB_VERSION_MAX_ALLOWED GLIB_VERSION_2_30" >>confdefs.h + + + @@ -12673,7 +12881,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12716,7 +12924,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12775,12 +12983,12 @@ pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 ") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 \""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 " 2>/dev/null` + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12792,12 +13000,12 @@ pkg_cv_GLIB_LIBS="$GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 \""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 ") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 \""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 " 2>/dev/null` + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12818,14 +13026,14 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 " 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 " 2>&1` else - GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 " 2>&1` + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLIB_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 ) were not met: + as_fn_error $? "Package requirements (glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 ) were not met: $GLIB_PKG_ERRORS @@ -12859,12 +13067,6 @@ fi - - -GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` - - - pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5 $as_echo_n "checking for DBUS... " >&6; } @@ -12957,7 +13159,10 @@ fi +$as_echo "#define TP_VERSION_MIN_REQUIRED TP_VERSION_0_18" >>confdefs.h + +$as_echo "#define TP_VERSION_MAX_ALLOWED TP_VERSION_0_20" >>confdefs.h pkg_failed=no @@ -13052,9 +13257,6 @@ fi - - - pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5 $as_echo_n "checking for OPENSSL... " >&6; } @@ -13146,9 +13348,6 @@ fi - - - XSLTPROC= for ac_prog in xsltproc do @@ -13168,7 +13367,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_XSLTPROC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13200,6 +13399,8 @@ + + if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.3" >&5 @@ -13233,7 +13434,7 @@ $as_echo_n "(cached) " >&6 else - for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do + for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros @@ -13277,7 +13478,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13342,7 +13543,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 @@ -13353,8 +13554,7 @@ else am_py_prefix=$prefix fi - am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || - echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` @@ -13380,7 +13580,7 @@ pkgpythondir=\${pythondir}/$PACKAGE - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 @@ -13391,8 +13591,7 @@ else am_py_exec_prefix=$exec_prefix fi - am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || - echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` @@ -13944,16 +14143,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -14013,28 +14212,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -14055,8 +14242,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by telepathy-idle $as_me 0.1.11, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by telepathy-idle $as_me 0.1.12, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -14121,11 +14308,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -telepathy-idle config.status 0.1.11 -configured by $0, generated by GNU Autoconf 2.68, +telepathy-idle config.status 0.1.12 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -14216,7 +14403,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -14258,6 +14445,7 @@ enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -14340,7 +14528,6 @@ allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -14396,6 +14583,7 @@ # Quote evaled strings. for var in SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -14446,7 +14634,6 @@ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -15250,8 +15437,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -15305,6 +15492,9 @@ # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -15606,10 +15796,6 @@ # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator diff -Nru telepathy-idle-0.1.11/configure.ac telepathy-idle-0.1.12/configure.ac --- telepathy-idle-0.1.11/configure.ac 2011-10-28 17:09:14.000000000 +0000 +++ telepathy-idle-0.1.12/configure.ac 2012-08-02 13:02:53.000000000 +0000 @@ -11,7 +11,7 @@ m4_define([idle_major_version], [0]) m4_define([idle_minor_version], [1]) -m4_define([idle_micro_version], [11]) +m4_define([idle_micro_version], [12]) m4_define([idle_nano_version], [0]) m4_define([idle_base_version], @@ -42,59 +42,62 @@ AC_PROG_CC_STDC AM_PROG_AS -dnl decide error flags -AS_COMPILER_FLAG(-Wall, ERROR_CFLAGS="-Wall", ERROR_CFLAGS="") -AS_COMPILER_FLAG(-Werror, werror=yes, werror=no) -AS_COMPILER_FLAG(-Wextra, wextra=yes, wextra=no) -AS_COMPILER_FLAG(-Wno-missing-field-initializers, - wno_missing_field_initializers=yes, - wno_missing_field_initializers=no) -AS_COMPILER_FLAG(-Wno-unused-parameter, - wno_unused_parameter=yes, - wno_unused_parameter=no) - -ifelse(idle_nano_version, 0, [], - [ - if test x$werror = xyes; then - ERROR_CFLAGS="$ERROR_CFLAGS -Werror" - fi - if test x$wextra = xyes -a \ - x$wno_missing_field_initializers = xyes -a \ - x$wno_unused_parameter = xyes; then - ERROR_CFLAGS="$ERROR_CFLAGS -Wextra -Wno-missing-field-initializers -Wno-unused-parameter" - fi - ]) - -AC_SUBST(ERROR_CFLAGS) +AS_IF([test idle_nano_version = 0], +[ # version x.y.z - "official release", + # disable extra checks by default + AC_ARG_ENABLE([fatal-warnings], + [AC_HELP_STRING([--enable-fatal-warnings], + [make various warnings fatal])], + [], + [enable_fatal_warnings=no]) +], +[ # version x.y.z.1 - development snapshot, + # enable extra checks by default + AC_ARG_ENABLE([fatal-warnings], + [AC_HELP_STRING([--disable-fatal-warnings], + [make various warnings non-fatal])], + [], + [enable_fatal_warnings=yes]) +]) + +TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$enable_fatal_warnings" = xyes], + [all \ + extra \ + declaration-after-statement \ + shadow \ + missing-prototypes \ + nested-externs \ + pointer-arith \ + sign-compare \ + strict-prototypes \ + format-security \ + init-self], + [missing-field-initializers \ + unused-parameter]) +AC_SUBST([ERROR_CFLAGS]) + +# these aren't really error flags but they serve a similar purpose for us - +# making the toolchain stricter +if test "x$enable_fatal_warnings" = xyes; then + TP_ADD_LINKER_FLAG([ERROR_LDFLAGS], [-Wl,--no-copy-dt-needed-entries]) +fi AC_HEADER_STDC([]) AC_C_INLINE -dnl Check for Glib -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.28.0, gobject-2.0 >= 2.28.0, gio-2.0 >= 2.28.0 ]) - -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) - -GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` -AC_SUBST(GLIB_GENMARSHAL) - -dnl Check for D-Bus -PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.51, dbus-glib-1 >= 0.51]) - -AC_SUBST(DBUS_CFLAGS) -AC_SUBST(DBUS_LIBS) +AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_28, [Ignore post 2.28 deprecations]) +AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_30, [Prevent post 2.30 APIs]) -PKG_CHECK_MODULES(TELEPATHY, [telepathy-glib >= 0.15.9]) +PKG_CHECK_MODULES([GLIB], + [glib-2.0 >= 2.30.0, gobject-2.0 >= 2.30.0, gio-2.0 >= 2.30.0 ]) -AC_SUBST(TELEPATHY_CFLAGS) -AC_SUBST(TELEPATHY_LIBS) +PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.51, dbus-glib-1 >= 0.51]) -dnl Check for OpenSSL -PKG_CHECK_MODULES(OPENSSL, [openssl >= 0.9.7]) +AC_DEFINE(TP_VERSION_MIN_REQUIRED, TP_VERSION_0_18, [Ignore post 0.18 deprecations]) +AC_DEFINE(TP_VERSION_MAX_ALLOWED, TP_VERSION_0_20, [Prevent post 0.20 APIs]) +PKG_CHECK_MODULES([TELEPATHY], [telepathy-glib >= 0.15.9]) -AC_SUBST(OPENSSL_CFLAGS) -AC_SUBST(OPENSSL_LIBS) +PKG_CHECK_MODULES([OPENSSL], [openssl >= 0.9.7]) dnl Check for code generation tools XSLTPROC= diff -Nru telepathy-idle-0.1.11/data/Makefile.in telepathy-idle-0.1.12/data/Makefile.in --- telepathy-idle-0.1.11/data/Makefile.in 2011-10-28 17:11:32.000000000 +0000 +++ telepathy-idle-0.1.12/data/Makefile.in 2012-08-02 13:03:03.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,24 +55,31 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/tp-compiler-flag.m4 \ + $(top_srcdir)/m4/tp-compiler-warnings.m4 \ + $(top_srcdir)/m4/tp-linker-flag.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -77,6 +101,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(managerdir)" "$(DESTDIR)$(servicedir)" DATA = $(manager_DATA) $(service_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -114,7 +144,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -279,8 +308,11 @@ -rm -rf .libs _libs install-managerDATA: $(manager_DATA) @$(NORMAL_INSTALL) - test -z "$(managerdir)" || $(MKDIR_P) "$(DESTDIR)$(managerdir)" @list='$(manager_DATA)'; test -n "$(managerdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(managerdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(managerdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -294,13 +326,14 @@ @$(NORMAL_UNINSTALL) @list='$(manager_DATA)'; test -n "$(managerdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(managerdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(managerdir)" && rm -f $$files + dir='$(DESTDIR)$(managerdir)'; $(am__uninstall_files_from_dir) install-serviceDATA: $(service_DATA) @$(NORMAL_INSTALL) - test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)" @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(servicedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(servicedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -314,9 +347,7 @@ @$(NORMAL_UNINSTALL) @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(servicedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(servicedir)" && rm -f $$files + dir='$(DESTDIR)$(servicedir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -371,10 +402,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru telepathy-idle-0.1.11/debian/changelog telepathy-idle-0.1.12/debian/changelog --- telepathy-idle-0.1.11/debian/changelog 2011-11-02 07:12:25.000000000 +0000 +++ telepathy-idle-0.1.12/debian/changelog 2012-08-05 12:39:37.000000000 +0000 @@ -1,3 +1,11 @@ +telepathy-idle (0.1.12-1) unstable; urgency=low + + * New upstream release + * debian/patches/Support-trailing-parameter-without-a-initial.patch: + + Removed. Fixed upstream + + -- Sjoerd Simons Sun, 05 Aug 2012 14:39:28 +0200 + telepathy-idle (0.1.11-2) unstable; urgency=low * debian/patches/Support-trailing-parameter-without-a-initial.patch: diff -Nru telepathy-idle-0.1.11/debian/patches/series telepathy-idle-0.1.12/debian/patches/series --- telepathy-idle-0.1.11/debian/patches/series 2011-11-02 07:12:25.000000000 +0000 +++ telepathy-idle-0.1.12/debian/patches/series 2012-08-05 12:39:37.000000000 +0000 @@ -1 +0,0 @@ -Support-trailing-parameter-without-a-initial.patch diff -Nru telepathy-idle-0.1.11/debian/patches/Support-trailing-parameter-without-a-initial.patch telepathy-idle-0.1.12/debian/patches/Support-trailing-parameter-without-a-initial.patch --- telepathy-idle-0.1.11/debian/patches/Support-trailing-parameter-without-a-initial.patch 2011-11-02 07:12:25.000000000 +0000 +++ telepathy-idle-0.1.12/debian/patches/Support-trailing-parameter-without-a-initial.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -From a4c98cfc5f89e84628c7ebd4bcaeb431f986917a Mon Sep 17 00:00:00 2001 -From: Sjoerd Simons -Date: Tue, 1 Nov 2011 23:10:00 +0000 -Subject: [PATCH] Support trailing parameter without a initial : - -BIP doesn't start the trailing parameter with a : when it's only a -single word in various cases. For example when sending the topic. Adjust -our parser to accept trailing parameters not starting with : if it's the -final word in the string ---- - src/idle-parser.c | 34 ++++++++++++++++++++------ - tests/twisted/channels/muc-channel-topic.py | 11 ++++++++ - 2 files changed, 37 insertions(+), 8 deletions(-) - -diff --git a/src/idle-parser.c b/src/idle-parser.c -index 1019b32..6eb74cf 100644 ---- a/src/idle-parser.c -+++ b/src/idle-parser.c -@@ -389,23 +389,41 @@ static void _parse_and_forward_one(IdleParser *parser, gchar **tokens, IdleParse - iter += 2; - } - } else if ((*format == ':') || (*format == '.')) { -- /* Because of the way things are tokenized, if there is a space -- * immediately after the the ':', the current token will only be -- * ":", so we check that iter[1][1] is non-NULL rather than checking -- * iter[0][1] (since iter[0] is a NULL-terminated token string -- * whereas iter[1] is a pointer into the full message string -+ /* Assume the happy case of the trailing parameter starting after the : -+ * in the trailing string as the RFC intended */ -+ const gchar *trailing = iter[1] + 1; -+ -+ /* Some IRC proxies *cough* bip *cough* omit the : in the trailing -+ * parameter if that parameter is just one word, to cope with that check -+ * if there are no more tokens after the current one and if so, accept a -+ * trailing string without the : prefix. */ -+ if (iter[0][0] != ':') { -+ if (iter[2] == NULL) { -+ trailing = iter[1]; -+ } else { -+ success = FALSE; -+ break; -+ } -+ } -+ -+ /* -+ * because of the way things are tokenized, if there is a -+ * space immediately after the the ':', the current token will only be -+ * ":", so we check that the trailing string is non-NULL rather than -+ * checking iter[0][1] (since iter[0] is a NULL-terminated token string -+ * whereas trailing is a pointer into the full message string - */ -- if ((iter[0][0] != ':') || (iter[1][1] == '\0')) { -+ if (trailing[0] == '\0') { - success = FALSE; - break; - } - - g_value_init(&val, G_TYPE_STRING); -- g_value_set_string(&val, iter[1] + 1); -+ g_value_set_string(&val, trailing); - g_value_array_append(args, &val); - g_value_unset(&val); - -- IDLE_DEBUG("set string \"%s\"", iter[1] + 1); -+ IDLE_DEBUG("set string \"%s\"", trailing); - } else { - if (!_parse_atom(parser, args, *format, iter[0], contact_reffed, room_reffed)) { - success = FALSE; -diff --git a/tests/twisted/channels/muc-channel-topic.py b/tests/twisted/channels/muc-channel-topic.py -index 3f59146..6d84d18 100644 ---- a/tests/twisted/channels/muc-channel-topic.py -+++ b/tests/twisted/channels/muc-channel-topic.py -@@ -122,6 +122,17 @@ def test(q, bus, conn, stream): - 'Timestamp': 1234, - }) - -+ # BIP omits the : for the trailing parameter if it's a single word, make -+ # sure we pass that as well -+ stream.sendMessage('TOPIC', room, 'badgers!', -+ prefix='alice') -+ expect_subject_props_changed(q, -+ { 'Subject': 'badgers!', -+ 'Actor': 'alice', -+ 'ActorHandle': alice_handle, -+ 'Timestamp': 1234, -+ }) -+ - test_can_set(q, stream, channel) - - # Topic is read/write, if we get ops it should stay that way --- -1.7.7.1 - diff -Nru telepathy-idle-0.1.11/depcomp telepathy-idle-0.1.12/depcomp --- telepathy-idle-0.1.11/depcomp 2011-10-28 17:02:49.000000000 +0000 +++ telepathy-idle-0.1.12/depcomp 2012-07-02 14:11:19.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-03-27.16; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,7 @@ case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -40,11 +40,11 @@ Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -57,6 +57,12 @@ ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -90,10 +96,24 @@ # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" + cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -148,20 +168,21 @@ ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -193,18 +214,15 @@ # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else @@ -216,10 +234,17 @@ rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -249,12 +274,11 @@ test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. + # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. + # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -265,23 +289,26 @@ ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want: + # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -290,15 +317,21 @@ exit $stat fi rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; @@ -334,7 +367,7 @@ done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// @@ -349,9 +382,9 @@ tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. + # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -397,14 +430,59 @@ done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -422,7 +500,7 @@ shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -442,15 +520,14 @@ done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -503,9 +580,10 @@ touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -525,7 +603,7 @@ shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -594,8 +672,8 @@ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff -Nru telepathy-idle-0.1.11/extensions/Connection_Interface_Renaming.xml telepathy-idle-0.1.12/extensions/Connection_Interface_Renaming.xml --- telepathy-idle-0.1.11/extensions/Connection_Interface_Renaming.xml 2008-11-10 10:30:23.000000000 +0000 +++ telepathy-idle-0.1.12/extensions/Connection_Interface_Renaming.xml 2012-06-14 14:52:47.000000000 +0000 @@ -12,21 +12,22 @@

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details.

+Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

- + - - + + The handle of the original identifier - + The handle of the new identifier @@ -49,8 +50,11 @@

If the contact's old handle is in any of the member lists of a channel which has the groups interface, it will be removed from the channel and the new handle will be added. The resulting - MembersChanged signal must be emitted after the Renamed - signal; the reason should be RENAMED. + MembersChanged + signal must be emitted after the + Renamed signal; the reason should be + RENAMED.

The handles may be either general-purpose or channel-specific. @@ -60,16 +64,17 @@

- - + + The desired identifier

Request that the user's own identifier is changed on the server. - If successful, a Renamed signal will be emitted for the current - "self handle" as returned by GetSelfHandle.

+ If successful, a Renamed signal will + be emitted for the current "self handle" as returned by GetSelfHandle.

It is protocol-dependent how the identifier that's actually used will be derived from the supplied identifier; some sort of normalization might take place.

diff -Nru telepathy-idle-0.1.11/extensions/Makefile.am telepathy-idle-0.1.12/extensions/Makefile.am --- telepathy-idle-0.1.11/extensions/Makefile.am 2009-11-05 12:25:17.000000000 +0000 +++ telepathy-idle-0.1.12/extensions/Makefile.am 2012-08-02 13:07:33.000000000 +0000 @@ -10,11 +10,9 @@ extensions.h nodist_libidle_extensions_la_SOURCES = \ - _gen/signals-marshal.c \ - _gen/signals-marshal.h \ - _gen/signals-marshal.list \ _gen/enums.h \ _gen/interfaces.h \ + _gen/svc-gtk-doc.h \ _gen/svc.h \ _gen/svc.c @@ -33,7 +31,7 @@ DROP_NAMESPACE = sed -e 's@xmlns:tp="http://telepathy\.freedesktop\.org/wiki/DbusSpec.extensions-v0"@@g' XSLTPROCFLAGS = --nonet --novalid -_gen/all.xml: all.xml $(wildcard *.xml) +_gen/all.xml: all.xml $(wildcard $(srcdir)/*.xml) @$(mkdir_p) _gen $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \ --xinclude $(tools_dir)/identity.xsl \ @@ -44,24 +42,15 @@ $(tools_dir)/doc-generator.xsl \ $< > $@ -_gen/svc.c _gen/svc.h: _gen/all.xml \ +_gen/svc.c _gen/svc.h _gen/svc-gtk-doc.h: _gen/all.xml \ $(tools_dir)/glib-ginterface-gen.py $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \ --filename=_gen/svc --signal-marshal-prefix=_idle_ext \ --include='' \ - --include='"_gen/signals-marshal.h"' \ --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ + --allow-unstable \ $< Idle_Svc_ -_gen/signals-marshal.list: _gen/all.xml $(tools_dir)/glib-signals-marshal-gen.py - $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@ - -_gen/signals-marshal.h: _gen/signals-marshal.list - $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_idle_ext_marshal $< > $@ - -_gen/signals-marshal.c: _gen/signals-marshal.list - $(AM_V_GEN)$(GLIB_GENMARSHAL) --body --prefix=_idle_ext_marshal $< > $@ - _gen/enums.h: _gen/all.xml $(tools_dir)/c-constants-generator.xsl $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \ --stringparam mixed-case-prefix Idle \ diff -Nru telepathy-idle-0.1.11/extensions/Makefile.in telepathy-idle-0.1.12/extensions/Makefile.in --- telepathy-idle-0.1.11/extensions/Makefile.in 2011-10-28 17:11:32.000000000 +0000 +++ telepathy-idle-0.1.12/extensions/Makefile.in 2012-08-02 13:07:48.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,10 +55,12 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/tp-compiler-flag.m4 \ + $(top_srcdir)/m4/tp-compiler-warnings.m4 \ + $(top_srcdir)/m4/tp-linker-flag.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -51,11 +70,11 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libidle_extensions_la_LIBADD = am_libidle_extensions_la_OBJECTS = -nodist_libidle_extensions_la_OBJECTS = signals-marshal.lo svc.lo +nodist_libidle_extensions_la_OBJECTS = svc.lo libidle_extensions_la_OBJECTS = $(am_libidle_extensions_la_OBJECTS) \ $(nodist_libidle_extensions_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -67,25 +86,30 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libidle_extensions_la_SOURCES) \ $(nodist_libidle_extensions_la_SOURCES) DIST_SOURCES = $(libidle_extensions_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -123,7 +147,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -242,11 +265,9 @@ extensions.h nodist_libidle_extensions_la_SOURCES = \ - _gen/signals-marshal.c \ - _gen/signals-marshal.h \ - _gen/signals-marshal.list \ _gen/enums.h \ _gen/interfaces.h \ + _gen/svc-gtk-doc.h \ _gen/svc.h \ _gen/svc.c @@ -306,7 +327,7 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libidle-extensions.la: $(libidle_extensions_la_OBJECTS) $(libidle_extensions_la_DEPENDENCIES) +libidle-extensions.la: $(libidle_extensions_la_OBJECTS) $(libidle_extensions_la_DEPENDENCIES) $(EXTRA_libidle_extensions_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libidle_extensions_la_OBJECTS) $(libidle_extensions_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -315,48 +336,35 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signals-marshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/svc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -signals-marshal.lo: _gen/signals-marshal.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT signals-marshal.lo -MD -MP -MF $(DEPDIR)/signals-marshal.Tpo -c -o signals-marshal.lo `test -f '_gen/signals-marshal.c' || echo '$(srcdir)/'`_gen/signals-marshal.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/signals-marshal.Tpo $(DEPDIR)/signals-marshal.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='_gen/signals-marshal.c' object='signals-marshal.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o signals-marshal.lo `test -f '_gen/signals-marshal.c' || echo '$(srcdir)/'`_gen/signals-marshal.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< svc.lo: _gen/svc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT svc.lo -MD -MP -MF $(DEPDIR)/svc.Tpo -c -o svc.lo `test -f '_gen/svc.c' || echo '$(srcdir)/'`_gen/svc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/svc.Tpo $(DEPDIR)/svc.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='_gen/svc.c' object='svc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='_gen/svc.c' object='svc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o svc.lo `test -f '_gen/svc.c' || echo '$(srcdir)/'`_gen/svc.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o svc.lo `test -f '_gen/svc.c' || echo '$(srcdir)/'`_gen/svc.c mostlyclean-libtool: -rm -f *.lo @@ -462,10 +470,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -566,7 +579,7 @@ pdf pdf-am ps ps-am tags uninstall uninstall-am -_gen/all.xml: all.xml $(wildcard *.xml) +_gen/all.xml: all.xml $(wildcard $(srcdir)/*.xml) @$(mkdir_p) _gen $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \ --xinclude $(tools_dir)/identity.xsl \ @@ -577,24 +590,15 @@ $(tools_dir)/doc-generator.xsl \ $< > $@ -_gen/svc.c _gen/svc.h: _gen/all.xml \ +_gen/svc.c _gen/svc.h _gen/svc-gtk-doc.h: _gen/all.xml \ $(tools_dir)/glib-ginterface-gen.py $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \ --filename=_gen/svc --signal-marshal-prefix=_idle_ext \ --include='' \ - --include='"_gen/signals-marshal.h"' \ --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ + --allow-unstable \ $< Idle_Svc_ -_gen/signals-marshal.list: _gen/all.xml $(tools_dir)/glib-signals-marshal-gen.py - $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@ - -_gen/signals-marshal.h: _gen/signals-marshal.list - $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_idle_ext_marshal $< > $@ - -_gen/signals-marshal.c: _gen/signals-marshal.list - $(AM_V_GEN)$(GLIB_GENMARSHAL) --body --prefix=_idle_ext_marshal $< > $@ - _gen/enums.h: _gen/all.xml $(tools_dir)/c-constants-generator.xsl $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \ --stringparam mixed-case-prefix Idle \ diff -Nru telepathy-idle-0.1.11/INSTALL telepathy-idle-0.1.12/INSTALL --- telepathy-idle-0.1.11/INSTALL 2008-11-10 10:30:23.000000000 +0000 +++ telepathy-idle-0.1.12/INSTALL 2012-07-02 14:11:19.000000000 +0000 @@ -1,16 +1,25 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Inc. -This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== -These are generic installation instructions. + Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +32,9 @@ It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,30 +44,37 @@ may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,65 +83,120 @@ all sorts of other programs in order to regenerate files that came with the distribution. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. + Compilers and Options ===================== -Some systems require unusual options for compilation or linking that the -`configure' script does not know about. Run `./configure --help' for -details on some of the pertinent environment variables. + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== -You can compile the package for more than one kind of computer at the + You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + + On MacOS X 10.5 and later systems, you can create libraries and +executables that work on multiple system types--known as "fat" or +"universal" binaries--by specifying multiple `-arch' options to the +compiler but only a single `-arch' option to the preprocessor. Like +this: + + ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ + CPP="gcc -E" CXXCPP="g++ -E" + + This is not guaranteed to produce working output in all cases, you +may have to build one architecture at a time and combine the results +using the `lipo' tool if you have problems. Installation Names ================== -By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PREFIX'. + By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PREFIX', the package will -use PREFIX as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - -Some packages pay attention to `--enable-FEATURE' options to + Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The @@ -137,14 +208,58 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + +Particular systems +================== + + On HP-UX, the default C compiler is not ANSI C compatible. If GNU +CC is not installed, it is recommended to use the following options in +order to use an ANSI C compiler: + + ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" + +and if that doesn't work, install pre-built binaries of GCC for HP-UX. + + HP-UX `make' updates targets which have the same time stamps as +their prerequisites, which makes it generally unusable when shipped +generated files such as `configure' are involved. Use GNU `make' +instead. + + On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot +parse its `' header file. The option `-nodtk' can be used as +a workaround. If GNU CC is not installed, it is therefore recommended +to try + + ./configure CC="cc" + +and if that doesn't work, try + + ./configure CC="cc -nodtk" + + On Solaris, don't put `/usr/ucb' early in your `PATH'. This +directory contains several dysfunctional programs; working variants of +these programs are available in `/usr/bin'. So, if you need `/usr/ucb' +in your `PATH', put it _after_ `/usr/bin'. + + On Haiku, software installed for all users goes in `/boot/common', +not `/usr/local'. It is recommended to use the following options: + + ./configure --prefix=/boot/common + Specifying the System Type ========================== -There may be some features `configure' cannot figure out automatically, -but needs to determine by the type of machine the package will run on. -Usually, assuming the package is built to be run on the _same_ -architectures, `configure' can figure that out, but if it prints a -message saying it cannot guess the machine type, give it the + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: @@ -152,14 +267,15 @@ where SYSTEM can have one of these forms: - OS KERNEL-OS + OS + KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will +use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a @@ -170,9 +286,9 @@ Sharing Defaults ================ -If you want to set default values for `configure' scripts to share, you -can create a site shell script called `config.site' that gives default -values for variables like `CC', `cache_file', and `prefix'. + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. @@ -181,7 +297,7 @@ Defining Variables ================== -Variables not defined in a site shell script can be set in the + Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set @@ -190,21 +306,29 @@ ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== -`configure' recognizes the following options to control how it operates. + `configure' recognizes the following options to control how it +operates. `--help' `-h' - Print a summary of the options to `configure', and exit. + Print a summary of all of the options to `configure', and exit. + +`--help=short' +`--help=recursive' + Print a summary of the options unique to this package's + `configure', and exit. The `short' variant lists options used + only in the top level, while the `recursive' variant lists options + also present in any nested packages. `--version' `-V' @@ -231,6 +355,16 @@ Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. +`--prefix=DIR' + Use DIR as the installation prefix. *note Installation Names:: + for more details, including other options available for fine-tuning + the installation locations. + +`--no-create' +`-n' + Run the configure checks, but stop before creating any output + files. + `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. diff -Nru telepathy-idle-0.1.11/install-sh telepathy-idle-0.1.12/install-sh --- telepathy-idle-0.1.11/install-sh 2011-10-28 17:02:49.000000000 +0000 +++ telepathy-idle-0.1.12/install-sh 2012-07-02 14:11:19.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -200,7 +208,11 @@ fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff -Nru telepathy-idle-0.1.11/ltmain.sh telepathy-idle-0.1.12/ltmain.sh --- telepathy-idle-0.1.11/ltmain.sh 2011-10-28 17:02:45.000000000 +0000 +++ telepathy-idle-0.1.12/ltmain.sh 2012-07-02 14:11:14.000000000 +0000 @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 Debian-2.4-4 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.1 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4 Debian-2.4-4" +VERSION="2.4.2 Debian-2.4.2-1.1" TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1120,6 +1117,10 @@ opt_silent=false func_append preserve_args " $opt" ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" @@ -2059,7 +2060,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6150,7 +6163,8 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6834,7 +6848,7 @@ test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7319,6 +7333,7 @@ # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7438,7 +7453,7 @@ versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8026,6 +8041,11 @@ # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8056,7 +8076,7 @@ elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8064,11 +8084,7 @@ if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9158,6 +9174,8 @@ esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9267,7 +9285,8 @@ *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff -Nru telepathy-idle-0.1.11/m4/libtool.m4 telepathy-idle-0.1.12/m4/libtool.m4 --- telepathy-idle-0.1.11/m4/libtool.m4 2011-10-28 17:02:45.000000000 +0000 +++ telepathy-idle-0.1.12/m4/libtool.m4 2012-07-02 14:11:14.000000000 +0000 @@ -1,8 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -11,8 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -146,6 +146,8 @@ AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -801,6 +803,7 @@ m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -822,6 +825,31 @@ ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -852,6 +880,10 @@ m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -954,7 +986,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -962,6 +1000,7 @@ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -973,6 +1012,7 @@ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -990,7 +1030,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1035,8 +1077,8 @@ ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1047,6 +1089,8 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1330,14 +1374,27 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1414,13 +1471,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1600,6 +1657,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1639,7 +1701,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2185,7 +2247,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2194,7 +2256,7 @@ ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2259,7 +2321,7 @@ ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2398,7 +2460,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2406,10 +2468,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2417,7 +2475,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2435,7 +2493,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2454,19 +2512,8 @@ esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2527,7 +2574,7 @@ ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2543,7 +2590,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2580,9 +2627,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2657,7 +2704,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2726,7 +2773,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2751,7 +2798,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2775,7 +2822,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2806,7 +2853,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2816,7 +2863,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3197,10 +3244,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3238,8 +3281,8 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -3658,6 +3701,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -3990,7 +4034,7 @@ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4242,7 +4286,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4287,7 +4333,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -4334,18 +4380,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4505,7 +4566,9 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4533,7 +4596,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4787,8 +4849,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5084,6 +5145,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5130,10 +5192,6 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5146,7 +5204,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5185,7 +5243,6 @@ fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5627,9 +5684,6 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5787,7 +5841,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6157,7 +6210,7 @@ esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6173,9 +6226,6 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -6337,7 +6387,7 @@ _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6918,12 +6968,18 @@ } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7120,7 +7176,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7253,7 +7308,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7440,6 +7494,77 @@ ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7509,6 +7634,13 @@ dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], diff -Nru telepathy-idle-0.1.11/m4/ltoptions.m4 telepathy-idle-0.1.12/m4/ltoptions.m4 --- telepathy-idle-0.1.11/m4/ltoptions.m4 2011-10-28 17:02:45.000000000 +0000 +++ telepathy-idle-0.1.12/m4/ltoptions.m4 2012-07-02 14:11:14.000000000 +0000 @@ -326,9 +326,24 @@ # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff -Nru telepathy-idle-0.1.11/m4/ltversion.m4 telepathy-idle-0.1.12/m4/ltversion.m4 --- telepathy-idle-0.1.11/m4/ltversion.m4 2011-10-28 17:02:45.000000000 +0000 +++ telepathy-idle-0.1.12/m4/ltversion.m4 2012-07-02 14:11:15.000000000 +0000 @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru telepathy-idle-0.1.11/m4/Makefile.in telepathy-idle-0.1.12/m4/Makefile.in --- telepathy-idle-0.1.11/m4/Makefile.in 2011-10-28 17:11:32.000000000 +0000 +++ telepathy-idle-0.1.12/m4/Makefile.in 2012-08-02 13:03:04.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,24 +54,31 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/tp-compiler-flag.m4 \ + $(top_srcdir)/m4/tp-compiler-warnings.m4 \ + $(top_srcdir)/m4/tp-linker-flag.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -90,7 +114,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -294,10 +317,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru telepathy-idle-0.1.11/m4/tp-compiler-flag.m4 telepathy-idle-0.1.12/m4/tp-compiler-flag.m4 --- telepathy-idle-0.1.11/m4/tp-compiler-flag.m4 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.12/m4/tp-compiler-flag.m4 2012-06-14 14:52:47.000000000 +0000 @@ -0,0 +1,43 @@ +dnl A version of AS_COMPILER_FLAG that supports both C and C++. +dnl Based on: + +dnl as-compiler-flag.m4 0.1.0 +dnl autostars m4 macro for detection of compiler flags +dnl David Schleef +dnl $Id: as-compiler-flag.m4,v 1.1 2005/06/18 18:02:46 burgerman Exp $ + +dnl TP_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) +dnl Tries to compile with the given CFLAGS and CXXFLAGS. +dnl +dnl Runs ACTION-IF-ACCEPTED if the compiler for the currently selected +dnl AC_LANG can compile with the flags, and ACTION-IF-NOT-ACCEPTED otherwise. + +AC_DEFUN([TP_COMPILER_FLAG], +[ + AC_MSG_CHECKING([to see if compiler understands $1]) + + save_CFLAGS="$CFLAGS" + save_CXXFLAGS="$CXXFLAGS" + CFLAGS="$CFLAGS $1" + CXXFLAGS="$CXXFLAGS $1" + + AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no]) + CFLAGS="$save_CFLAGS" + CXXFLAGS="$save_CXXFLAGS" + + if test "X$flag_ok" = Xyes ; then + $2 + true + else + $3 + true + fi + AC_MSG_RESULT([$flag_ok]) +]) + +dnl TP_ADD_COMPILER_FLAG(VARIABLE, CFLAGS) +dnl Append CFLAGS to VARIABLE if the compiler supports them. +AC_DEFUN([TP_ADD_COMPILER_FLAG], +[ + TP_COMPILER_FLAG([$2], [$1="[$]$1 $2"]) +]) diff -Nru telepathy-idle-0.1.11/m4/tp-compiler-warnings.m4 telepathy-idle-0.1.12/m4/tp-compiler-warnings.m4 --- telepathy-idle-0.1.11/m4/tp-compiler-warnings.m4 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.12/m4/tp-compiler-warnings.m4 2012-06-14 14:52:47.000000000 +0000 @@ -0,0 +1,49 @@ +dnl TP_COMPILER_WARNINGS(VARIABLE, WERROR_BY_DEFAULT, DESIRABLE, UNDESIRABLE) +dnl $1 (VARIABLE): the variable to put flags into +dnl $2 (WERROR_BY_DEFAULT): a command returning true if -Werror should be the +dnl default +dnl $3 (DESIRABLE): warning flags we want (e.g. all extra shadow) +dnl $4 (UNDESIRABLE): warning flags we don't want (e.g. +dnl missing-field-initializers unused-parameter) +AC_DEFUN([TP_COMPILER_WARNINGS], +[ + AC_REQUIRE([AC_ARG_ENABLE])dnl + AC_REQUIRE([AC_HELP_STRING])dnl + AC_REQUIRE([TP_COMPILER_FLAG])dnl + + tp_warnings="" + for tp_flag in $3; do + TP_COMPILER_FLAG([-W$tp_flag], [tp_warnings="$tp_warnings -W$tp_flag"]) + done + + tp_error_flags="-Werror" + TP_COMPILER_FLAG([-Werror], [tp_werror=yes], [tp_werror=no]) + + for tp_flag in $4; do + TP_COMPILER_FLAG([-Wno-$tp_flag], + [tp_warnings="$tp_warnings -Wno-$tp_flag"]) +dnl Yes, we do need to use both -Wno-foo and -Wno-error=foo. Simon says: +dnl some warnings we explicitly don't want, like unused-parameter, but +dnl they're in -Wall. when a distro using cdbs compiles us, we have: +dnl -Werror -Wno-unused-parameter -Wall +dnl ^ from us ^ from cdbs +dnl which turns -Wunused-parameter back on, in effect + TP_COMPILER_FLAG([-Wno-error=$tp_flag], + [tp_error_flags="$tp_error_flags -Wno-error=$tp_flag"], [tp_werror=no]) + done + + AC_ARG_ENABLE([Werror], + AC_HELP_STRING([--disable-Werror], + [compile without -Werror (normally enabled in development builds)]), + tp_werror=$enableval, :) + + if test "x$tp_werror" = xyes && $2; then +dnl We put -Wno-error=foo before -Wno-foo because clang interprets -Wall +dnl -Werror -Wno-foo -Wno-error=foo as “make foo a non-fatal warning”, but does +dnl what we want if you reverse them. + $1="$tp_error_flags $tp_warnings" + else + $1="$tp_warnings" + fi + +]) diff -Nru telepathy-idle-0.1.11/m4/tp-linker-flag.m4 telepathy-idle-0.1.12/m4/tp-linker-flag.m4 --- telepathy-idle-0.1.11/m4/tp-linker-flag.m4 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.12/m4/tp-linker-flag.m4 2012-06-14 14:52:47.000000000 +0000 @@ -0,0 +1,44 @@ +dnl A version of AS_COMPILER_FLAG that supports linker flags +dnl Based on: + +dnl as-compiler-flag.m4 0.1.0 +dnl autostars m4 macro for detection of compiler flags +dnl David Schleef +dnl $Id: as-compiler-flag.m4,v 1.1 2005/06/18 18:02:46 burgerman Exp $ + +dnl TP_LINKER_FLAG(LDFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED]) +dnl Tries to compile with the given LDFLAGS. +dnl +dnl Runs ACTION-IF-ACCEPTED if the compiler/linker for the currently selected +dnl AC_LANG can compile with the flags, and ACTION-IF-NOT-ACCEPTED otherwise. +dnl +dnl Note that LDFLAGS are passed to the linker via the compiler, so you +dnl should check for -Wl,--no-add-needed rather than --no-add-needed. + +AC_DEFUN([TP_LINKER_FLAG], +[ + AC_MSG_CHECKING([to see if compiler/linker understand $1]) + + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $1" + + AC_COMPILE_IFELSE(AC_LANG_SOURCE([]), [flag_ok=yes], [flag_ok=no]) + + LDFLAGS="$save_LDFLAGS" + + if test "X$flag_ok" = Xyes ; then + $2 + true + else + $3 + true + fi + AC_MSG_RESULT([$flag_ok]) +]) + +dnl TP_ADD_LINKER_FLAG(VARIABLE, LDFLAGS) +dnl Append LDFLAGS to VARIABLE if the linker supports them. +AC_DEFUN([TP_ADD_LINKER_FLAG], +[ + TP_LINKER_FLAG([$2], [$1="[$]$1 $2"]) +]) diff -Nru telepathy-idle-0.1.11/Makefile.in telepathy-idle-0.1.12/Makefile.in --- telepathy-idle-0.1.11/Makefile.in 2011-10-28 17:11:32.000000000 +0000 +++ telepathy-idle-0.1.12/Makefile.in 2012-08-02 13:03:04.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -41,10 +58,12 @@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/tp-compiler-flag.m4 \ + $(top_srcdir)/m4/tp-compiler-warnings.m4 \ + $(top_srcdir)/m4/tp-linker-flag.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -53,11 +72,11 @@ CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = @@ -68,6 +87,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -80,9 +104,11 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -111,6 +137,8 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -146,7 +174,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -261,7 +288,7 @@ $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/tools/telepathy.am $(am__configure_deps) @for dep in $?; do \ @@ -286,6 +313,7 @@ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; +$(srcdir)/tools/telepathy.am: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck @@ -297,10 +325,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -491,13 +517,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -532,7 +555,11 @@ $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -540,7 +567,7 @@ $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -571,6 +598,8 @@ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -580,7 +609,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -591,6 +620,7 @@ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -619,8 +649,16 @@ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -651,10 +689,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -742,18 +785,19 @@ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am + dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am check-twisted : all diff -Nru telepathy-idle-0.1.11/missing telepathy-idle-0.1.12/missing --- telepathy-idle-0.1.11/missing 2011-10-28 17:02:49.000000000 +0000 +++ telepathy-idle-0.1.12/missing 2012-07-02 14:11:19.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. diff -Nru telepathy-idle-0.1.11/NEWS telepathy-idle-0.1.12/NEWS --- telepathy-idle-0.1.11/NEWS 2011-10-28 17:09:14.000000000 +0000 +++ telepathy-idle-0.1.12/NEWS 2012-08-02 13:01:51.000000000 +0000 @@ -1,3 +1,25 @@ +telepathy-idle 0.1.12 (2012-08-02) +================================== + +The “Menomale che Silvio c’è” release. + +Dependencies: + +• GLib 2.30 is now required. (fd.o#49600) + +Fixes: + +• Implement the the ActorHandle property on the Subject interface, to fix + showing who changed the topic in Empathy. (sjoerd) + +• fd.o#48084: Idle no longer gets stuck in a 100% CPU loop when the connection + is lost in some situations. (wjt) + +• fd.o#49600: Get rid of deprecated things. (smcv) + +• fd.o#51906: Renamed variables to avoid warnings with "-Werror=shadow". + (Thomas Thurman) + telepathy-idle 0.1.11 (2011-10-28) ================================== diff -Nru telepathy-idle-0.1.11/src/idle.c telepathy-idle-0.1.12/src/idle.c --- telepathy-idle-0.1.11/src/idle.c 2011-07-20 09:38:01.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle.c 2012-06-14 14:52:47.000000000 +0000 @@ -27,7 +27,7 @@ #include "idle-connection-manager.h" #include "idle-debug.h" -static TpBaseConnectionManager *_construct_cm() { +static TpBaseConnectionManager *_construct_cm (void) { TpBaseConnectionManager *base_cm = TP_BASE_CONNECTION_MANAGER(g_object_new(IDLE_TYPE_CONNECTION_MANAGER, NULL)); return base_cm; diff -Nru telepathy-idle-0.1.11/src/idle-connection.c telepathy-idle-0.1.12/src/idle-connection.c --- telepathy-idle-0.1.11/src/idle-connection.c 2011-10-12 10:51:18.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-connection.c 2012-06-14 14:52:47.000000000 +0000 @@ -19,9 +19,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "idle-connection.h" +#include "config.h" -#include +#include "idle-connection.h" #include #include @@ -58,7 +58,6 @@ #define DEFAULT_KEEPALIVE_INTERVAL 30 /* sec */ -#define MSG_QUEUE_UNLOAD_AT_A_TIME 1 #define MSG_QUEUE_TIMEOUT 2 static gboolean flush_queue_faster = FALSE; @@ -82,8 +81,6 @@ ); typedef struct _IdleOutputPendingMsg IdleOutputPendingMsg; -typedef struct _MsgQueueTimeoutData MsgQueueTimeoutData; -typedef struct _SendWithPriorityData SendWithPriorityData; struct _IdleOutputPendingMsg { gchar *message; @@ -91,21 +88,17 @@ guint64 id; }; -struct _MsgQueueTimeoutData { - IdleConnection *conn; - GSList *sent_msgs; -}; - -struct _SendWithPriorityData { - IdleConnection *conn; - gchar *msg; - guint priority; -}; - -static IdleOutputPendingMsg *idle_output_pending_msg_new() { +/* Steals @message. */ +static IdleOutputPendingMsg * +idle_output_pending_msg_new ( + gchar *message, + guint priority) +{ IdleOutputPendingMsg *msg = g_slice_new(IdleOutputPendingMsg); static guint64 last_id = 0; + msg->message = message; + msg->priority = priority; msg->id = last_id++; return msg; @@ -604,14 +597,19 @@ } static void _connection_disconnect_with_gerror(IdleConnection *conn, TpConnectionStatusReason reason, const gchar *key, const GError *error) { - GHashTable *details = tp_asv_new(key, G_TYPE_STRING, error->message, NULL); + if (TP_BASE_CONNECTION (conn)->status == TP_CONNECTION_STATUS_DISCONNECTED) { + IDLE_DEBUG ("Already disconnected; refusing to report error %s", error->message); + } else { + GHashTable *details = tp_asv_new(key, G_TYPE_STRING, error->message, NULL); + + g_assert(error->domain == TP_ERROR); - g_assert(error->domain == TP_ERRORS); - tp_base_connection_disconnect_with_dbus_error(TP_BASE_CONNECTION(conn), - tp_error_get_dbus_name(error->code), - details, - reason); - g_hash_table_unref(details); + tp_base_connection_disconnect_with_dbus_error(TP_BASE_CONNECTION(conn), + tp_error_get_dbus_name(error->code), + details, + reason); + g_hash_table_unref(details); + } } static void _connection_disconnect_with_error(IdleConnection *conn, TpConnectionStatusReason reason, const gchar *key, GQuark domain, gint code, const gchar *message) { @@ -661,7 +659,7 @@ if (priv->conn != NULL) { IDLE_DEBUG("conn already open!"); - g_set_error(error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "connection already open!"); + g_set_error(error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "connection already open!"); return FALSE; } @@ -769,13 +767,7 @@ switch (state) { case SERVER_CONNECTION_STATE_NOT_CONNECTED: - /* when the Disconnect method is called, the parent's status is - * immediately set to disconnected, and when the underlying network - * connection finally disconnects and triggers this callback - * we need to finish shutting down the connection -- so we can only - * ignore the case where the parent's status is connecting */ - if (conn->parent.status != TP_CONNECTION_STATUS_CONNECTING) - connection_disconnect_cb(conn, tp_reason); + connection_disconnect_cb(conn, tp_reason); break; case SERVER_CONNECTION_STATE_CONNECTING: @@ -826,44 +818,27 @@ return TRUE; } -static void _sent_msgs_foreach_free(gpointer data) { - idle_output_pending_msg_free((IdleOutputPendingMsg *) data); -} - -static void _restore_msg_to_queue(gpointer data, gpointer user_data) { - GQueue *msg_queue = (GQueue *) user_data; - g_queue_push_head(msg_queue, data); -} - static void _msg_queue_timeout_ready(GObject *source_object, GAsyncResult *res, gpointer user_data) { IdleServerConnection *sconn = IDLE_SERVER_CONNECTION(source_object); - MsgQueueTimeoutData *data = (MsgQueueTimeoutData *) user_data; - IdleConnection *conn = data->conn; + IdleConnection *conn = IDLE_CONNECTION (user_data); IdleConnectionPrivate *priv = IDLE_CONNECTION_GET_PRIVATE(conn); - GSList *sent_msgs = data->sent_msgs; GError *error = NULL; - g_slice_free(MsgQueueTimeoutData, data); priv->msg_sending = FALSE; if (!idle_server_connection_send_finish(sconn, res, &error)) { IDLE_DEBUG("idle_server_connection_send failed: %s", error->message); g_error_free(error); - g_slist_foreach(sent_msgs, _restore_msg_to_queue, priv->msg_queue); return; } - g_slist_free_full(sent_msgs, _sent_msgs_foreach_free); priv->last_msg_sent = time(NULL); } static gboolean msg_queue_timeout_cb(gpointer user_data) { IdleConnection *conn = IDLE_CONNECTION(user_data); IdleConnectionPrivate *priv = IDLE_CONNECTION_GET_PRIVATE(conn); - int i; IdleOutputPendingMsg *output_msg; - MsgQueueTimeoutData *data; - gchar msg[IRC_MSG_MAXLEN + 3]; IDLE_DEBUG("called"); @@ -885,60 +860,13 @@ return FALSE; } - data = g_slice_new0(MsgQueueTimeoutData); - data->conn = conn; - data->sent_msgs = g_slist_prepend(data->sent_msgs, output_msg); - - g_strlcpy(msg, output_msg->message, IRC_MSG_MAXLEN + 3); - - for (i = 1; i < MSG_QUEUE_UNLOAD_AT_A_TIME; i++) { - output_msg = (IdleOutputPendingMsg *) g_queue_pop_head(priv->msg_queue); - data->sent_msgs = g_slist_prepend(data->sent_msgs, output_msg); - - if ((output_msg != NULL) && ((strlen(msg) + strlen(output_msg->message)) < IRC_MSG_MAXLEN + 2)) - strcat(msg, output_msg->message); - else - break; - } - - idle_server_connection_send_async(priv->conn, msg, NULL, _msg_queue_timeout_ready, data); + idle_server_connection_send_async(priv->conn, output_msg->message, NULL, _msg_queue_timeout_ready, conn); + idle_output_pending_msg_free (output_msg); priv->msg_sending = TRUE; return TRUE; } -static void _add_msg_to_queue(IdleConnection *conn, gchar *msg, guint priority) { - IdleConnectionPrivate *priv = IDLE_CONNECTION_GET_PRIVATE(conn); - IdleOutputPendingMsg *output_msg; - - output_msg = idle_output_pending_msg_new(); - output_msg->message = msg; - output_msg->priority = priority; - - g_queue_insert_sorted(priv->msg_queue, output_msg, pending_msg_compare, NULL); - idle_connection_add_queue_timeout (conn); -} - -static void _send_with_max_priority_ready(GObject *source_object, GAsyncResult *res, gpointer user_data) { - IdleServerConnection *sconn = IDLE_SERVER_CONNECTION(source_object); - SendWithPriorityData *data = (SendWithPriorityData *) user_data; - IdleConnection *conn = data->conn; - gchar *msg = data->msg; - guint priority = data->priority; - GError *error = NULL; - - g_slice_free(SendWithPriorityData, data); - - if (!idle_server_connection_send_finish(sconn, res, &error)) { - IDLE_DEBUG("idle_server_connection_send failed: %s", error->message); - g_error_free(error); - _add_msg_to_queue(conn, msg, priority); - return; - } - - g_free(msg); -} - static void idle_connection_add_queue_timeout (IdleConnection *self) { @@ -946,12 +874,20 @@ if (priv->msg_queue_timeout == 0) { + time_t curr_time = time(NULL); + if (flush_queue_faster) priv->msg_queue_timeout = g_timeout_add (MSG_QUEUE_TIMEOUT, msg_queue_timeout_cb, self); else priv->msg_queue_timeout = g_timeout_add_seconds (MSG_QUEUE_TIMEOUT, msg_queue_timeout_cb, self); + + /* If it's been long enough since the last message went out, flush one + * immediately. + */ + if (curr_time - priv->last_msg_sent > MSG_QUEUE_TIMEOUT) + msg_queue_timeout_cb (self); } } @@ -971,13 +907,11 @@ * Queue a IRC command for sending, clipping it to IRC_MSG_MAXLEN bytes and appending the required to it */ static void _send_with_priority(IdleConnection *conn, const gchar *msg, guint priority) { - gchar cmd[IRC_MSG_MAXLEN + 3]; IdleConnectionPrivate *priv = IDLE_CONNECTION_GET_PRIVATE(conn); - SendWithPriorityData *data; + gchar cmd[IRC_MSG_MAXLEN + 3]; int len; gchar *converted; GError *convert_error = NULL; - time_t curr_time = time(NULL); g_assert(msg != NULL); @@ -1000,22 +934,10 @@ converted = g_strdup(cmd); } - if (priority == SERVER_CMD_MAX_PRIORITY || - (conn->parent.status == TP_CONNECTION_STATUS_CONNECTED && - priv->msg_queue_timeout == 0 && - curr_time - priv->last_msg_sent > MSG_QUEUE_TIMEOUT)) { - priv->last_msg_sent = curr_time; - - data = g_slice_new0(SendWithPriorityData); - data->conn = conn; - data->msg = converted; - data->priority = priority; - - idle_server_connection_send_async(priv->conn, converted, NULL, _send_with_max_priority_ready, data); - return; - } - - _add_msg_to_queue(conn, converted, priority); + g_queue_insert_sorted(priv->msg_queue, + idle_output_pending_msg_new(converted, priority), + pending_msg_compare, NULL); + idle_connection_add_queue_timeout (conn); } void idle_connection_send(IdleConnection *conn, const gchar *msg) { @@ -1080,7 +1002,7 @@ server_msg = g_strndup(begin, length); } - _connection_disconnect_with_error(conn, reason, "server-message", TP_ERRORS, error, (server_msg == NULL) ? "" : server_msg); + _connection_disconnect_with_error(conn, reason, "server-message", TP_ERROR, error, (server_msg == NULL) ? "" : server_msg); g_free(server_msg); return IDLE_PARSER_HANDLER_RESULT_HANDLED; @@ -1137,13 +1059,16 @@ static IdleParserHandlerResult _version_privmsg_handler(IdleParser *parser, IdleParserMessageCode code, GValueArray *args, gpointer user_data) { IdleConnection *conn = IDLE_CONNECTION(user_data); const gchar *msg = g_value_get_string(g_value_array_get_nth(args, 2)); + TpHandle handle; + const gchar *nick; + gchar *reply; if (g_ascii_strcasecmp(msg, "\001VERSION\001")) return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; - TpHandle handle = g_value_get_uint(g_value_array_get_nth(args, 0)); - const gchar *nick = tp_handle_inspect(tp_base_connection_get_handles(TP_BASE_CONNECTION(conn), TP_HANDLE_TYPE_CONTACT), handle); - gchar *reply = g_strdup_printf("VERSION telepathy-idle %s Telepathy IM/VoIP Framework http://telepathy.freedesktop.org", VERSION); + handle = g_value_get_uint(g_value_array_get_nth(args, 0)); + nick = tp_handle_inspect(tp_base_connection_get_handles(TP_BASE_CONNECTION(conn), TP_HANDLE_TYPE_CONTACT), handle); + reply = g_strdup_printf("VERSION telepathy-idle %s Telepathy IM/VoIP Framework http://telepathy.freedesktop.org", VERSION); idle_ctcp_notice(nick, reply, conn); @@ -1173,11 +1098,15 @@ TpHandle handle = g_value_get_uint(g_value_array_get_nth(args, 0)); TpHandle self = tp_base_connection_get_self_handle(TP_BASE_CONNECTION(conn)); if (handle == self) { + const char *user; + const char *host; + if (priv->relay_prefix != NULL) { g_free(priv->relay_prefix); } - const char* user = g_value_get_string(g_value_array_get_nth(args, 1)); - const char* host = g_value_get_string(g_value_array_get_nth(args, 2)); + + user = g_value_get_string(g_value_array_get_nth(args, 1)); + host = g_value_get_string(g_value_array_get_nth(args, 2)); priv->relay_prefix = g_strdup_printf("%s!%s@%s", priv->nickname, user, host); IDLE_DEBUG("user host prefix = %s", priv->relay_prefix); } @@ -1239,7 +1168,8 @@ idle_connection_clear_queue_timeout (conn); } -void _queue_alias_changed(IdleConnection *conn, TpHandle handle, const gchar *alias) { +static void +_queue_alias_changed(IdleConnection *conn, TpHandle handle, const gchar *alias) { IdleConnectionPrivate *priv = IDLE_CONNECTION_GET_PRIVATE(conn); if (!priv->queued_aliases_owners) { @@ -1259,7 +1189,8 @@ G_TYPE_INVALID)); } -static GQuark _canon_nick_quark() { +static GQuark +_canon_nick_quark (void) { static GQuark quark = 0; if (!quark) @@ -1349,6 +1280,7 @@ TpHandleRepoIface *repo = tp_base_connection_get_handles ( TP_BASE_CONNECTION (iface), TP_HANDLE_TYPE_CONTACT); GError *error = NULL; + GHashTable *aliases; if (!tp_handles_are_valid (repo, handles, FALSE, &error)) { @@ -1357,7 +1289,7 @@ return; } - GHashTable *aliases = g_hash_table_new (NULL, NULL); + aliases = g_hash_table_new (NULL, NULL); for (guint i = 0; i < handles->len; i++) { @@ -1375,6 +1307,7 @@ static void idle_connection_request_aliases(TpSvcConnectionInterfaceAliasing *iface, const GArray *handles, DBusGMethodInvocation *context) { TpHandleRepoIface *repo = tp_base_connection_get_handles(TP_BASE_CONNECTION(iface), TP_HANDLE_TYPE_CONTACT); GError *error = NULL; + const gchar **aliases; if (!tp_handles_are_valid(repo, handles, FALSE, &error)) { dbus_g_method_return_error(context, error); @@ -1382,7 +1315,7 @@ return; } - const gchar **aliases = g_new0(const gchar *, handles->len + 1); + aliases = g_new0(const gchar *, handles->len + 1); for (guint i = 0; i < handles->len; i++) { TpHandle handle = g_array_index(handles, TpHandle, i); @@ -1396,19 +1329,17 @@ static gboolean _send_rename_request(IdleConnection *obj, const gchar *nick, DBusGMethodInvocation *context) { TpHandleRepoIface *handles = tp_base_connection_get_handles(TP_BASE_CONNECTION(obj), TP_HANDLE_TYPE_CONTACT); TpHandle handle = tp_handle_ensure(handles, nick, NULL, NULL); + gchar msg[IRC_MSG_MAXLEN + 1]; if (handle == 0) { - IDLE_DEBUG("failed to get handle for \"%s\"", nick); + GError error = {TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Invalid nickname requested"}; - GError error = {TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "Invalid nickname requested"}; + IDLE_DEBUG("failed to get handle for \"%s\"", nick); dbus_g_method_return_error(context, &error); return FALSE; } - tp_handle_unref(handles, handle); - - gchar msg[IRC_MSG_MAXLEN + 1]; g_snprintf(msg, IRC_MSG_MAXLEN + 1, "NICK %s", nick); idle_connection_send(obj, msg); @@ -1427,7 +1358,7 @@ const gchar *requested_alias = g_hash_table_lookup(aliases, GUINT_TO_POINTER(conn->parent.self_handle)); if ((g_hash_table_size(aliases) != 1) || !requested_alias) { - GError error = {TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "You can only set your own alias in IRC"}; + GError error = {TP_ERROR, TP_ERROR_NOT_AVAILABLE, "You can only set your own alias in IRC"}; dbus_g_method_return_error(context, &error); return; @@ -1452,7 +1383,7 @@ if (ret == NULL) { IDLE_DEBUG("g_convert failed: %s", error->message); - g_set_error(_error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "character set conversion failed: %s", error->message); + g_set_error(_error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "character set conversion failed: %s", error->message); g_error_free(error); *output = NULL; return FALSE; diff -Nru telepathy-idle-0.1.11/src/idle-connection-manager.c telepathy-idle-0.1.12/src/idle-connection-manager.c --- telepathy-idle-0.1.11/src/idle-connection-manager.c 2011-09-12 16:56:48.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-connection-manager.c 2012-06-14 14:52:47.000000000 +0000 @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include "idle-connection-manager.h" #include diff -Nru telepathy-idle-0.1.11/src/idle-contact-info.c telepathy-idle-0.1.12/src/idle-contact-info.c --- telepathy-idle-0.1.11/src/idle-contact-info.c 2011-09-12 16:56:48.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-contact-info.c 2012-06-14 14:52:47.000000000 +0000 @@ -235,7 +235,7 @@ if (request == NULL) goto cleanup; - error = g_error_new(TP_ERRORS, TP_ERROR_DOES_NOT_EXIST, "User '%s' unknown; they may have disconnected", server); + error = g_error_new(TP_ERROR, TP_ERROR_DOES_NOT_EXIST, "User '%s' unknown; they may have disconnected", server); dbus_g_method_return_error(request->context, error); g_error_free(error); @@ -269,7 +269,7 @@ msg = g_value_get_string(g_value_array_get_nth(args, 1)); - error = g_error_new_literal(TP_ERRORS, TP_ERROR_SERVICE_BUSY, msg); + error = g_error_new_literal(TP_ERROR, TP_ERROR_SERVICE_BUSY, msg); dbus_g_method_return_error(request->context, error); g_error_free(error); diff -Nru telepathy-idle-0.1.11/src/idle-ctcp.c telepathy-idle-0.1.12/src/idle-ctcp.c --- telepathy-idle-0.1.11/src/idle-ctcp.c 2008-11-10 10:30:17.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-ctcp.c 2012-06-14 14:52:47.000000000 +0000 @@ -84,11 +84,13 @@ } gchar *idle_ctcp_kill_blingbling(const gchar *msg) { + gchar *killed, *killed_iter; + if (msg == NULL) return NULL; - gchar *killed = g_malloc0(strlen(msg) + 1); - gchar *killed_iter = killed; + killed = g_malloc0(strlen(msg) + 1); + killed_iter = killed; for (const gchar *iter = msg; *iter != '\0';) { switch (*iter) { @@ -125,15 +127,19 @@ } gchar **idle_ctcp_decode(const gchar *msg) { + GPtrArray *tokens; + gchar cur_token[IRC_MSG_MAXLEN] = {'\0'}; + gchar *cur_iter = cur_token; + gchar **ret; + const gchar *iter; + gboolean string = FALSE; + if (!msg || (msg[0] != '\001') || !msg[1] || (msg[1] == '\001')) return NULL; - GPtrArray *tokens = g_ptr_array_new(); - gchar cur_token[IRC_MSG_MAXLEN] = {'\0'}; - gchar *cur_iter = cur_token; + tokens = g_ptr_array_new(); - const gchar *iter = msg + 1; - gboolean string = FALSE; + iter = msg + 1; while (*iter != '\0') { switch (*iter) { case '\\': @@ -194,7 +200,7 @@ g_ptr_array_add(tokens, NULL); - gchar **ret = (gchar **) tokens->pdata; + ret = (gchar **) tokens->pdata; g_ptr_array_free(tokens, FALSE); return ret; diff -Nru telepathy-idle-0.1.11/src/idle-debug.c telepathy-idle-0.1.12/src/idle-debug.c --- telepathy-idle-0.1.11/src/idle-debug.c 2010-05-22 13:40:11.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-debug.c 2012-06-14 14:52:47.000000000 +0000 @@ -36,11 +36,15 @@ {NULL, 0} }; -void idle_debug_init() { +void +idle_debug_init (void) { + const gchar *flags_string = g_getenv("IDLE_DEBUG"); guint nkeys; - for (nkeys = 0; _keys[nkeys].value; nkeys++); - const gchar *flags_string = g_getenv("IDLE_DEBUG"); + for (nkeys = 0; _keys[nkeys].value; nkeys++) { + /* do nothing, just count nkeys */ + } + if (flags_string) { tp_debug_set_flags(flags_string); _flags |= g_parse_debug_string(flags_string, _keys, nkeys); diff -Nru telepathy-idle-0.1.11/src/idle-debug.h telepathy-idle-0.1.12/src/idle-debug.h --- telepathy-idle-0.1.11/src/idle-debug.h 2010-05-22 13:40:11.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-debug.h 2012-06-14 14:52:47.000000000 +0000 @@ -32,7 +32,7 @@ IDLE_DEBUG_TEXT = (1 << 6), } IdleDebugFlags; -void idle_debug_init(); +void idle_debug_init (void); void idle_debug(IdleDebugFlags flag, const gchar *format, ...) G_GNUC_PRINTF(2, 3); void idle_debug_free (void); diff -Nru telepathy-idle-0.1.11/src/idle-handles.c telepathy-idle-0.1.12/src/idle-handles.c --- telepathy-idle-0.1.11/src/idle-handles.c 2011-09-12 16:56:48.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-handles.c 2012-06-14 14:52:47.000000000 +0000 @@ -92,11 +92,13 @@ static gboolean _channelname_is_valid(const gchar *channel) { static const gchar not_allowed_chars[] = {' ', '\007', ',', '\r', '\n', ':', '\0'}; + gsize len; + const gchar *tmp; if (!idle_muc_channel_is_typechar(channel[0])) return FALSE; - gsize len = strlen(channel); + len = strlen(channel); if ((len < 2) || (len > 50)) return FALSE; @@ -107,7 +109,7 @@ } } - const gchar *tmp = strchr(channel + 1, ':'); + tmp = strchr(channel + 1, ':'); if (tmp != NULL) { for (const gchar *tmp2 = channel + 1; tmp2 != tmp; tmp2++) { if (strchr(not_allowed_chars, *tmp2)) @@ -129,12 +131,14 @@ } gchar *idle_normalize_nickname (const gchar *id, GError **error) { + gchar *normalized; + if (!idle_nickname_is_valid(id, FALSE)) { - g_set_error(error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, "invalid nickname"); + g_set_error(error, TP_ERROR, TP_ERROR_INVALID_HANDLE, "invalid nickname"); return NULL; } - gchar *normalized = g_utf8_strdown(id, -1); + normalized = g_utf8_strdown(id, -1); return normalized; } @@ -144,12 +148,14 @@ } static gchar *_channel_normalize_func(TpHandleRepoIface *repo, const gchar *id, gpointer ctx, GError **error) { + gchar *normalized; + if (!_channelname_is_valid(id)) { - g_set_error(error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, "invalid channel ID"); + g_set_error(error, TP_ERROR, TP_ERROR_INVALID_HANDLE, "invalid channel ID"); return NULL; } - gchar *normalized = g_utf8_strdown(id, -1); + normalized = g_utf8_strdown(id, -1); return normalized; } diff -Nru telepathy-idle-0.1.11/src/idle-im-channel.c telepathy-idle-0.1.12/src/idle-im-channel.c --- telepathy-idle-0.1.11/src/idle-im-channel.c 2011-09-12 16:56:48.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-im-channel.c 2012-08-01 10:11:18.000000000 +0000 @@ -1,7 +1,7 @@ /* * This file is part of telepathy-idle * - * Copyright (C) 2006-2007 Collabora Limited + * Copyright (C) 2006-2007, 2012 Collabora Limited * Copyright (C) 2006-2007 Nokia Corporation * * This library is free software; you can redistribute it and/or @@ -18,490 +18,165 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "idle-im-channel.h" +#include "config.h" -#include +#include "idle-im-channel.h" #include -#include -#include -#include #include -#include -#include -#include #define IDLE_DEBUG_FLAG IDLE_DEBUG_IM #include "idle-connection.h" #include "idle-debug.h" -#include "idle-handles.h" #include "idle-text.h" -static void _channel_iface_init(gpointer, gpointer); static void _destroyable_iface_init(gpointer, gpointer); +static GPtrArray *idle_im_channel_get_interfaces (TpBaseChannel *channel); +static void idle_im_channel_close (TpBaseChannel *base); static void idle_im_channel_send (GObject *obj, TpMessage *message, TpMessageSendingFlags flags); +static void idle_im_channel_finalize (GObject *object); -G_DEFINE_TYPE_WITH_CODE(IdleIMChannel, idle_im_channel, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL, _channel_iface_init); - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_TYPE_TEXT, tp_message_mixin_text_iface_init); - G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES, tp_message_mixin_messages_iface_init); - G_IMPLEMENT_INTERFACE(TP_TYPE_CHANNEL_IFACE, NULL); - G_IMPLEMENT_INTERFACE(TP_TYPE_EXPORTABLE_CHANNEL, NULL); - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE, _destroyable_iface_init) - G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_DBUS_PROPERTIES, tp_dbus_properties_mixin_iface_init);) - -/* property enum */ -enum { - PROP_CONNECTION = 1, - PROP_OBJECT_PATH, - PROP_INTERFACES, - PROP_CHANNEL_TYPE, - PROP_HANDLE_TYPE, - PROP_HANDLE, - PROP_TARGET_ID, - PROP_REQUESTED, - PROP_INITIATOR_HANDLE, - PROP_INITIATOR_ID, - PROP_CHANNEL_DESTROYED, - PROP_CHANNEL_PROPERTIES, - LAST_PROPERTY_ENUM -}; - -const gchar *im_channel_interfaces[] = { - TP_IFACE_CHANNEL_INTERFACE_MESSAGES, - TP_IFACE_CHANNEL_INTERFACE_DESTROYABLE, - NULL -}; +G_DEFINE_TYPE_WITH_CODE(IdleIMChannel, idle_im_channel, TP_TYPE_BASE_CHANNEL, + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_TYPE_TEXT, tp_message_mixin_text_iface_init); + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES, tp_message_mixin_messages_iface_init); + G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE, _destroyable_iface_init); + ) /* private structure */ typedef struct _IdleIMChannelPrivate IdleIMChannelPrivate; struct _IdleIMChannelPrivate { - IdleConnection *connection; - gchar *object_path; - TpHandle handle; - TpHandle initiator; - - gboolean closed; - - gboolean dispose_has_run; + gpointer unused; }; -#define IDLE_IM_CHANNEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IDLE_TYPE_IM_CHANNEL, IdleIMChannelPrivate)) - -static void idle_im_channel_init (IdleIMChannel *obj) { -} - -static void idle_im_channel_dispose (GObject *object); -static void idle_im_channel_finalize (GObject *object); - -static GObject *idle_im_channel_constructor(GType type, guint n_props, GObjectConstructParam *props) { - GObject *obj; - IdleIMChannelPrivate *priv; - TpDBusDaemon *bus; - TpHandleRepoIface *handles; - TpBaseConnection *conn; - TpChannelTextMessageType types[] = { - TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, - TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, - TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, - }; - const gchar * supported_content_types[] = { - "text/plain", - NULL - }; - - obj = G_OBJECT_CLASS(idle_im_channel_parent_class)->constructor(type, n_props, props); - priv = IDLE_IM_CHANNEL_GET_PRIVATE(IDLE_IM_CHANNEL(obj)); - - conn = TP_BASE_CONNECTION(priv->connection); - - handles = tp_base_connection_get_handles(conn, TP_HANDLE_TYPE_CONTACT); - tp_handle_ref(handles, priv->handle); - tp_handle_ref(handles, priv->initiator); - g_assert(tp_handle_is_valid(tp_base_connection_get_handles(TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_CONTACT), priv->handle, NULL)); - - bus = tp_base_connection_get_dbus_daemon (conn); - tp_dbus_daemon_register_object (bus, priv->object_path, obj); - - /* initialize message mixin */ - tp_message_mixin_init (obj, G_STRUCT_OFFSET (IdleIMChannel, message_mixin), - conn); - tp_message_mixin_implement_sending (obj, idle_im_channel_send, - G_N_ELEMENTS (types), types, 0, - TP_DELIVERY_REPORTING_SUPPORT_FLAG_RECEIVE_FAILURES, - supported_content_types); - - return obj; -} - -static void idle_im_channel_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { - IdleIMChannel *chan; - IdleIMChannelPrivate *priv; - TpHandleRepoIface *handles; - - g_assert(object != NULL); - g_assert(IDLE_IS_IM_CHANNEL(object)); - - chan = IDLE_IM_CHANNEL(object); - priv = IDLE_IM_CHANNEL_GET_PRIVATE(chan); - handles = tp_base_connection_get_handles( - TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_CONTACT); - - switch (property_id) { - case PROP_CONNECTION: - g_value_set_object(value, priv->connection); - break; - - case PROP_OBJECT_PATH: - g_value_set_string(value, priv->object_path); - break; - - case PROP_INTERFACES: - g_value_set_static_boxed(value, im_channel_interfaces); - break; - - case PROP_CHANNEL_TYPE: - g_value_set_string(value, TP_IFACE_CHANNEL_TYPE_TEXT); - break; - - case PROP_HANDLE_TYPE: - g_value_set_uint(value, TP_HANDLE_TYPE_CONTACT); - break; - - case PROP_HANDLE: - g_value_set_uint(value, priv->handle); - break; - - case PROP_TARGET_ID: - g_value_set_string(value, - tp_handle_inspect(handles, priv->handle)); - break; - - case PROP_REQUESTED: - g_value_set_boolean(value, priv->initiator != priv->handle); - break; - - case PROP_INITIATOR_HANDLE: - g_value_set_uint(value, priv->initiator); - break; - - case PROP_INITIATOR_ID: - g_value_set_string(value, - tp_handle_inspect(handles, priv->initiator)); - break; - - case PROP_CHANNEL_DESTROYED: - g_value_set_boolean (value, priv->closed); - break; - - case PROP_CHANNEL_PROPERTIES: - { - GHashTable *props = - tp_dbus_properties_mixin_make_properties_hash ( - object, - TP_IFACE_CHANNEL, "Interfaces", - TP_IFACE_CHANNEL, "ChannelType", - TP_IFACE_CHANNEL, "TargetHandleType", - TP_IFACE_CHANNEL, "TargetHandle", - TP_IFACE_CHANNEL, "TargetID", - TP_IFACE_CHANNEL, "InitiatorHandle", - TP_IFACE_CHANNEL, "InitiatorID", - TP_IFACE_CHANNEL, "Requested", - TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "MessagePartSupportFlags", - TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "DeliveryReportingSupport", - TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "SupportedContentTypes", - TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "MessageTypes", - NULL); - g_value_take_boxed (value, props); - break; - } - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); - break; - } -} - -static void idle_im_channel_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { - IdleIMChannel *chan = IDLE_IM_CHANNEL(object); - IdleIMChannelPrivate *priv; - - g_assert(chan != NULL); - g_assert(IDLE_IS_IM_CHANNEL(chan)); - - priv = IDLE_IM_CHANNEL_GET_PRIVATE(chan); - - switch (property_id) { - case PROP_CONNECTION: - priv->connection = g_value_get_object(value); - break; - - case PROP_OBJECT_PATH: - if (priv->object_path) - g_free(priv->object_path); - - priv->object_path = g_value_dup_string(value); - break; - - case PROP_HANDLE: - priv->handle = g_value_get_uint(value); - break; - - case PROP_INITIATOR_HANDLE: - priv->initiator = g_value_get_uint(value); - break; - - case PROP_CHANNEL_TYPE: - case PROP_HANDLE_TYPE: - /* writeable in the interface, but setting them makes - no sense, so ignore them */ - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); - break; - } -} - -static void idle_im_channel_class_init (IdleIMChannelClass *idle_im_channel_class) { - GObjectClass *object_class = G_OBJECT_CLASS(idle_im_channel_class); - GParamSpec *param_spec; - - g_type_class_add_private (idle_im_channel_class, sizeof (IdleIMChannelPrivate)); - - object_class->constructor = idle_im_channel_constructor; - - object_class->get_property = idle_im_channel_get_property; - object_class->set_property = idle_im_channel_set_property; - - object_class->dispose = idle_im_channel_dispose; - object_class->finalize = idle_im_channel_finalize; - - g_object_class_override_property(object_class, PROP_OBJECT_PATH, "object-path"); - g_object_class_override_property(object_class, PROP_CHANNEL_TYPE, "channel-type"); - g_object_class_override_property(object_class, PROP_HANDLE_TYPE, "handle-type"); - g_object_class_override_property(object_class, PROP_HANDLE, "handle"); - g_object_class_override_property(object_class, PROP_CHANNEL_DESTROYED, "channel-destroyed"); - g_object_class_override_property(object_class, PROP_CHANNEL_PROPERTIES, "channel-properties"); - - param_spec = g_param_spec_object("connection", "IdleConnection object", - "The IdleConnection object that owns this " - "IMChannel object.", - IDLE_TYPE_CONNECTION, - G_PARAM_CONSTRUCT_ONLY | - G_PARAM_READWRITE | - G_PARAM_STATIC_NICK | - G_PARAM_STATIC_BLURB); - g_object_class_install_property(object_class, PROP_CONNECTION, param_spec); - - param_spec = g_param_spec_boxed ("interfaces", "Extra D-Bus interfaces", - "Interfaces implemented by this object besides Channel", - G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_INTERFACES, param_spec); - - param_spec = g_param_spec_string ("target-id", "Contact's identifier", - "The name of the person we're speaking to", - NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_TARGET_ID, param_spec); - - param_spec = g_param_spec_boolean ("requested", "Requested?", - "True if this channel was requested by the local user", - FALSE, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_REQUESTED, param_spec); - - param_spec = g_param_spec_uint ("initiator-handle", "Initiator's handle", - "The contact who initiated the channel", - 0, G_MAXUINT32, 0, - G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_INITIATOR_HANDLE, param_spec); - - param_spec = g_param_spec_string ("initiator-id", "Initiator's bare JID", - "The string obtained by inspecting the initiator-handle", - NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); - g_object_class_install_property (object_class, PROP_INITIATOR_ID, param_spec); - - static TpDBusPropertiesMixinPropImpl channel_props[] = { - { "Interfaces", "interfaces", NULL }, - { "ChannelType", "channel-type", NULL }, - { "TargetHandleType", "handle-type", NULL }, - { "TargetHandle", "handle", NULL }, - { "TargetID", "target-id", NULL }, - { "InitiatorHandle", "initiator-handle", NULL }, - { "InitiatorID", "initiator-id", NULL }, - { "Requested", "requested", NULL }, - { NULL } - }; - static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = { - { TP_IFACE_CHANNEL, - tp_dbus_properties_mixin_getter_gobject_properties, - NULL, - channel_props, - }, - { NULL } - }; - - idle_im_channel_class->dbus_props_class.interfaces = prop_interfaces; - tp_dbus_properties_mixin_class_init(object_class, G_STRUCT_OFFSET(IdleIMChannelClass, dbus_props_class)); - tp_message_mixin_init_dbus_properties (object_class); -} - -void idle_im_channel_dispose (GObject *object) { - IdleIMChannel *self = IDLE_IM_CHANNEL(object); - IdleIMChannelPrivate *priv = IDLE_IM_CHANNEL_GET_PRIVATE(self); - - g_assert(object != NULL); - - if (priv->dispose_has_run) - return; - - priv->dispose_has_run = TRUE; - - if (!priv->closed) - tp_svc_channel_emit_closed((TpSvcChannel *)(self)); - - if (G_OBJECT_CLASS(idle_im_channel_parent_class)->dispose) - G_OBJECT_CLASS(idle_im_channel_parent_class)->dispose (object); -} - -void idle_im_channel_finalize (GObject *object) { - IdleIMChannel *self = IDLE_IM_CHANNEL(object); - IdleIMChannelPrivate *priv = IDLE_IM_CHANNEL_GET_PRIVATE(self); - TpHandleRepoIface *handles; - - handles = tp_base_connection_get_handles(TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_CONTACT); - tp_handle_unref(handles, priv->handle); - tp_handle_unref(handles, priv->initiator); - - if (priv->object_path) - g_free(priv->object_path); - - tp_message_mixin_finalize (object); - - G_OBJECT_CLASS(idle_im_channel_parent_class)->finalize (object); -} - -gboolean idle_im_channel_receive(IdleIMChannel *chan, TpChannelTextMessageType type, TpHandle sender, const gchar *text) { - IdleIMChannelPrivate *priv = IDLE_IM_CHANNEL_GET_PRIVATE (chan); - TpBaseConnection *base_conn = TP_BASE_CONNECTION (priv->connection); - - return idle_text_received (G_OBJECT (chan), base_conn, type, text, sender); -} - -/** - * idle_im_channel_close - * - * Implements DBus method Close - * on interface org.freedesktop.Telepathy.Channel - * - * @error: Used to return a pointer to a GError detailing any error - * that occured, DBus will throw the error only if this - * function returns false. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -static void idle_im_channel_close (TpSvcChannel *iface, DBusGMethodInvocation *context) { - IdleIMChannel *obj = IDLE_IM_CHANNEL(iface); - IdleIMChannelPrivate *priv; - - g_assert(obj != NULL); - g_assert(IDLE_IS_IM_CHANNEL(obj)); - - priv = IDLE_IM_CHANNEL_GET_PRIVATE(obj); - - IDLE_DEBUG("called on %p", obj); - - /* The IM manager will resurrect the channel if we have pending - * messages. When we're resurrected, we want the initiator - * to be the contact who sent us those messages, if it isn't already */ - if (tp_message_mixin_has_pending_messages ((GObject *)obj, NULL)) { - IDLE_DEBUG("Not really closing, I still have pending messages"); - - if (priv->initiator != priv->handle) { - TpHandleRepoIface *contact_repo = - tp_base_connection_get_handles( - (TpBaseConnection *) priv->connection, - TP_HANDLE_TYPE_CONTACT); - - g_assert(priv->initiator != 0); - g_assert(priv->handle != 0); - - tp_handle_unref(contact_repo, priv->initiator); - priv->initiator = priv->handle; - tp_handle_ref(contact_repo, priv->initiator); - } - - tp_message_mixin_set_rescued ((GObject *) obj); - } else { - IDLE_DEBUG ("Actually closing, I have no pending messages"); - priv->closed = TRUE; - } +static void +idle_im_channel_init (IdleIMChannel *obj) +{ +} + +static void +idle_im_channel_constructed (GObject *obj) +{ + TpChannelTextMessageType types[] = { + TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, + TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, + TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, + }; + const gchar * supported_content_types[] = { + "text/plain", + NULL + }; + + G_OBJECT_CLASS (idle_im_channel_parent_class)->constructed (obj); + + /* initialize message mixin */ + tp_message_mixin_init (obj, G_STRUCT_OFFSET (IdleIMChannel, message_mixin), + tp_base_channel_get_connection (TP_BASE_CHANNEL (obj))); + tp_message_mixin_implement_sending (obj, idle_im_channel_send, + G_N_ELEMENTS (types), types, 0, + TP_DELIVERY_REPORTING_SUPPORT_FLAG_RECEIVE_FAILURES, + supported_content_types); +} + +static void +idle_im_channel_fill_properties ( + TpBaseChannel *chan, + GHashTable *properties) +{ + TpBaseChannelClass *klass = TP_BASE_CHANNEL_CLASS (idle_im_channel_parent_class); + + klass->fill_immutable_properties (chan, properties); + + tp_dbus_properties_mixin_fill_properties_hash ( + G_OBJECT (chan), properties, + TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "MessagePartSupportFlags", + TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "DeliveryReportingSupport", + TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "SupportedContentTypes", + TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "MessageTypes", + NULL); +} + +static gchar * +idle_im_channel_get_path_suffix (TpBaseChannel *base) +{ + return g_strdup_printf("ImChannel%u", + tp_base_channel_get_target_handle (base)); +} + +static void +idle_im_channel_class_init (IdleIMChannelClass *idle_im_channel_class) +{ + TpBaseChannelClass *base_class = TP_BASE_CHANNEL_CLASS (idle_im_channel_class); + GObjectClass *object_class = G_OBJECT_CLASS (idle_im_channel_class); + + g_type_class_add_private (idle_im_channel_class, sizeof (IdleIMChannelPrivate)); + + object_class->constructed = idle_im_channel_constructed; + object_class->finalize = idle_im_channel_finalize; + + base_class->channel_type = TP_IFACE_CHANNEL_TYPE_TEXT; + base_class->target_handle_type = TP_HANDLE_TYPE_CONTACT; + base_class->close = idle_im_channel_close; + base_class->fill_immutable_properties = idle_im_channel_fill_properties; + base_class->get_object_path_suffix = idle_im_channel_get_path_suffix; + base_class->get_interfaces = idle_im_channel_get_interfaces; + + tp_message_mixin_init_dbus_properties (object_class); +} + +static void +idle_im_channel_finalize (GObject *object) +{ + tp_message_mixin_finalize (object); + + G_OBJECT_CLASS(idle_im_channel_parent_class)->finalize (object); +} + +gboolean +idle_im_channel_receive ( + IdleIMChannel *chan, + TpChannelTextMessageType type, + TpHandle sender, + const gchar *text) +{ + TpBaseConnection *base_conn = tp_base_channel_get_connection (TP_BASE_CHANNEL (chan)); + + return idle_text_received (G_OBJECT (chan), base_conn, type, text, sender); +} + +static void +idle_im_channel_close (TpBaseChannel *base) +{ + IdleIMChannel *obj = IDLE_IM_CHANNEL (base); + + /* The IM manager will resurrect the channel if we have pending + * messages. When we're resurrected, we want the initiator + * to be the contact who sent us those messages, if it isn't already */ + if (tp_message_mixin_has_pending_messages ((GObject *)obj, NULL)) + { + IDLE_DEBUG("%p not really closing, I still have pending messages", obj); + + tp_message_mixin_set_rescued ((GObject *) obj); + tp_base_channel_reopened (base, tp_base_channel_get_target_handle (base)); + } + else + { + IDLE_DEBUG ("%p actually closing, I have no pending messages", obj); + tp_base_channel_destroyed (base); + } +} + +static GPtrArray * +idle_im_channel_get_interfaces (TpBaseChannel *channel) +{ + GPtrArray *interfaces = g_ptr_array_sized_new (2); - tp_svc_channel_emit_closed(iface); + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_MESSAGES); + g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_DESTROYABLE); - tp_svc_channel_return_from_close(context); -} - - -/** - * idle_im_channel_get_channel_type - * - * Implements DBus method GetChannelType - * on interface org.freedesktop.Telepathy.Channel - * - * @error: Used to return a pointer to a GError detailing any error - * that occured, DBus will throw the error only if this - * function returns false. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -static void idle_im_channel_get_channel_type (TpSvcChannel *iface, DBusGMethodInvocation *context) { - tp_svc_channel_return_from_get_channel_type(context, TP_IFACE_CHANNEL_TYPE_TEXT); -} - - -/** - * idle_im_channel_get_handle - * - * Implements DBus method GetHandle - * on interface org.freedesktop.Telepathy.Channel - * - * @error: Used to return a pointer to a GError detailing any error - * that occured, DBus will throw the error only if this - * function returns false. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -static void idle_im_channel_get_handle (TpSvcChannel *iface, DBusGMethodInvocation *context) { - IdleIMChannel *obj = IDLE_IM_CHANNEL(iface); - IdleIMChannelPrivate *priv; - - g_assert(obj != NULL); - g_assert(IDLE_IS_IM_CHANNEL(obj)); - - priv = IDLE_IM_CHANNEL_GET_PRIVATE(obj); - - tp_svc_channel_return_from_get_handle(context, TP_HANDLE_TYPE_CONTACT, priv->handle); -} - - -/** - * idle_im_channel_get_interfaces - * - * Implements DBus method GetInterfaces - * on interface org.freedesktop.Telepathy.Channel - * - * @error: Used to return a pointer to a GError detailing any error - * that occured, DBus will throw the error only if this - * function returns false. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -static void idle_im_channel_get_interfaces(TpSvcChannel *iface, DBusGMethodInvocation *context) { - tp_svc_channel_return_from_get_interfaces(context, im_channel_interfaces); + return interfaces; } /** @@ -511,41 +186,45 @@ * org.freedesktop.Telepathy.Channel.Type.Text and D-Bus method SendMessage on * Channel.Interface.Messages */ -static void idle_im_channel_send (GObject *obj, TpMessage *message, TpMessageSendingFlags flags) { - IdleIMChannel *self = (IdleIMChannel *) obj; - IdleIMChannelPrivate *priv = IDLE_IM_CHANNEL_GET_PRIVATE(self); - const gchar *recipient = tp_handle_inspect(tp_base_connection_get_handles(TP_BASE_CONNECTION(priv->connection), TP_HANDLE_TYPE_CONTACT), priv->handle); - - idle_text_send (obj, message, flags, recipient, priv->connection); -} - -static void idle_im_channel_destroy(TpSvcChannelInterfaceDestroyable *iface, DBusGMethodInvocation *context) { - IdleIMChannel *obj = (IdleIMChannel *)(iface); - IdleIMChannelPrivate *priv = IDLE_IM_CHANNEL_GET_PRIVATE(obj); - - IDLE_DEBUG ("called on %p with %spending messages", obj, - tp_message_mixin_has_pending_messages ((GObject *)obj, NULL) ? "" : "no "); - - priv->closed = TRUE; - tp_svc_channel_emit_closed(iface); - tp_svc_channel_interface_destroyable_return_from_destroy(context); -} - -static void _channel_iface_init(gpointer g_iface, gpointer iface_data) { - TpSvcChannelClass *klass = (TpSvcChannelClass *)g_iface; - -#define IMPLEMENT(x) tp_svc_channel_implement_##x (\ - klass, idle_im_channel_##x) - IMPLEMENT(close); - IMPLEMENT(get_channel_type); - IMPLEMENT(get_handle); - IMPLEMENT(get_interfaces); -#undef IMPLEMENT -} - -static void _destroyable_iface_init(gpointer klass, gpointer iface_data) { +static void +idle_im_channel_send ( + GObject *obj, + TpMessage *message, + TpMessageSendingFlags flags) +{ + TpBaseChannel *base = TP_BASE_CHANNEL (obj); + TpBaseConnection *conn = tp_base_channel_get_connection (base); + const gchar *recipient = tp_handle_inspect ( + tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_CONTACT), + tp_base_channel_get_target_handle (base)); + + idle_text_send (obj, message, flags, recipient, IDLE_CONNECTION (conn)); +} + +static void +idle_im_channel_destroy ( + TpSvcChannelInterfaceDestroyable *iface, + DBusGMethodInvocation *context) +{ + TpBaseChannel *chan = TP_BASE_CHANNEL (iface); + GObject *obj = (GObject *) chan; + + IDLE_DEBUG ("called on %p with %spending messages", obj, + tp_message_mixin_has_pending_messages (obj, NULL) ? "" : "no "); + + tp_message_mixin_clear (obj); + tp_base_channel_destroyed (chan); + + tp_svc_channel_interface_destroyable_return_from_destroy(context); +} + +static void +_destroyable_iface_init ( + gpointer klass, + gpointer iface_data) +{ #define IMPLEMENT(x) tp_svc_channel_interface_destroyable_implement_##x (\ - klass, idle_im_channel_##x) - IMPLEMENT (destroy); + klass, idle_im_channel_##x) + IMPLEMENT (destroy); #undef IMPLEMENT } diff -Nru telepathy-idle-0.1.11/src/idle-im-channel.h telepathy-idle-0.1.12/src/idle-im-channel.h --- telepathy-idle-0.1.11/src/idle-im-channel.h 2010-10-09 22:58:12.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-im-channel.h 2012-08-01 10:11:18.000000000 +0000 @@ -24,6 +24,7 @@ #include #include #include +#include G_BEGIN_DECLS @@ -31,13 +32,12 @@ typedef struct _IdleIMChannelClass IdleIMChannelClass; struct _IdleIMChannelClass { - GObjectClass parent_class; - TpDBusPropertiesMixinClass dbus_props_class; + TpBaseChannelClass parent_class; }; struct _IdleIMChannel { - GObject parent; - TpMessageMixin message_mixin; + TpBaseChannel parent; + TpMessageMixin message_mixin; }; GType idle_im_channel_get_type(void); diff -Nru telepathy-idle-0.1.11/src/idle-im-manager.c telepathy-idle-0.1.12/src/idle-im-manager.c --- telepathy-idle-0.1.11/src/idle-im-manager.c 2011-02-11 13:54:38.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-im-manager.c 2012-08-01 10:11:18.000000000 +0000 @@ -33,7 +33,7 @@ #include "idle-text.h" static void _im_manager_iface_init(gpointer g_iface, gpointer iface_data); -static GObject * _im_manager_constructor (GType type, guint n_props, GObjectConstructParam *props); +static void _im_manager_constructed (GObject *obj); static void _im_manager_dispose (GObject *object); G_DEFINE_TYPE_WITH_CODE(IdleIMManager, idle_im_manager, G_TYPE_OBJECT, @@ -128,7 +128,7 @@ g_type_class_add_private(klass, sizeof(IdleIMManagerPrivate)); - object_class->constructor = _im_manager_constructor; + object_class->constructed = _im_manager_constructed; object_class->dispose = _im_manager_dispose; object_class->get_property = idle_im_manager_get_property; object_class->set_property = idle_im_manager_set_property; @@ -137,30 +137,20 @@ g_object_class_install_property(object_class, PROP_CONNECTION, param_spec); } -static GObject * -_im_manager_constructor (GType type, - guint n_props, - GObjectConstructParam *props) +static void +_im_manager_constructed (GObject *obj) { - GObject *obj; - IdleIMManager *self; - IdleIMManagerPrivate *priv; - - obj = G_OBJECT_CLASS (idle_im_manager_parent_class)->constructor (type, - n_props, - props); + IdleIMManager *self = IDLE_IM_MANAGER (obj); + IdleIMManagerPrivate *priv = IDLE_IM_MANAGER_GET_PRIVATE (self); - self = IDLE_IM_MANAGER (obj); - priv = IDLE_IM_MANAGER_GET_PRIVATE (self); + G_OBJECT_CLASS (idle_im_manager_parent_class)->constructed (obj); - g_return_val_if_fail (priv->conn, obj); + g_return_if_fail (priv->conn); priv->status_changed_id = g_signal_connect (priv->conn, "status-changed", (GCallback) connection_status_changed_cb, self); - - return obj; } @@ -359,7 +349,7 @@ /* Don't support opening a channel to our self handle */ if (handle == base_conn->self_handle) { - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Can't open a text channel to yourself"); goto error; } @@ -374,7 +364,7 @@ if (require_new) { - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Already chatting with contact #%u in another channel", handle); goto error; } @@ -437,7 +427,6 @@ tp_base_connection_get_handles (base_connection, TP_HANDLE_TYPE_CONTACT); IdleIMChannel *chan; const gchar *name; - gchar *object_path = NULL; GSList *requests = NULL; g_assert (g_hash_table_lookup (priv->channels, GUINT_TO_POINTER (handle)) @@ -446,14 +435,13 @@ name = tp_handle_inspect (handle_repo, handle); IDLE_DEBUG ("Requested channel for handle: %u (%s)", handle, name); - object_path = g_strdup_printf("%s/ImChannel%u", priv->conn->parent.object_path, handle); chan = g_object_new (IDLE_TYPE_IM_CHANNEL, "connection", priv->conn, - "object-path", object_path, "handle", handle, "initiator-handle", initiator, + "requested", handle != initiator, NULL); - g_free (object_path); + tp_base_channel_register (TP_BASE_CHANNEL (chan)); g_hash_table_insert (priv->channels, GUINT_TO_POINTER (handle), chan); if (request != NULL) diff -Nru telepathy-idle-0.1.11/src/idle-im-manager.h telepathy-idle-0.1.12/src/idle-im-manager.h --- telepathy-idle-0.1.11/src/idle-im-manager.h 2009-11-05 12:25:18.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-im-manager.h 2012-06-14 14:52:47.000000000 +0000 @@ -36,7 +36,7 @@ GObject parent; }; -GType idle_im_manager_get_type(); +GType idle_im_manager_get_type (void); #define IDLE_TYPE_IM_MANAGER (idle_im_manager_get_type()) #define IDLE_IM_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), IDLE_TYPE_IM_MANAGER, IdleIMManager)) diff -Nru telepathy-idle-0.1.11/src/idle-muc-channel.c telepathy-idle-0.1.12/src/idle-muc-channel.c --- telepathy-idle-0.1.11/src/idle-muc-channel.c 2011-10-28 16:54:36.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-muc-channel.c 2012-06-14 14:52:47.000000000 +0000 @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include "idle-muc-channel.h" #include @@ -35,12 +37,12 @@ #include #include #include -#include #define IDLE_DEBUG_FLAG IDLE_DEBUG_MUC #include "idle-connection.h" #include "idle-debug.h" #include "idle-text.h" +#include "room-config.h" static void _password_iface_init(gpointer, gpointer); static void subject_iface_init(gpointer, gpointer); @@ -53,7 +55,10 @@ G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_INTERFACE_PASSWORD, _password_iface_init); G_IMPLEMENT_INTERFACE(TP_TYPE_SVC_CHANNEL_TYPE_TEXT, tp_message_mixin_text_iface_init); G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES, tp_message_mixin_messages_iface_init); + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_ROOM, NULL); G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_SUBJECT, subject_iface_init); + G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_ROOM_CONFIG, + tp_base_room_config_iface_init); ) /* property enum */ @@ -62,8 +67,11 @@ PROP_SUBJECT, PROP_SUBJECT_ACTOR, + PROP_SUBJECT_ACTOR_HANDLE, PROP_SUBJECT_TIMESTAMP, - PROP_CAN_SET_SUBJECT + PROP_CAN_SET_SUBJECT, + + PROP_SERVER, }; /* signal enum */ @@ -111,51 +119,21 @@ guint limit; gchar *topic; gchar *key; - guint topic_touched; + gint64 topic_touched; TpHandle topic_toucher; const gchar *topic_toucher_id; } IRCChannelModeState; -typedef enum { - TP_PROPERTY_INVITE_ONLY = 0, - TP_PROPERTY_LIMIT, - TP_PROPERTY_LIMITED, - TP_PROPERTY_MODERATED, - TP_PROPERTY_PASSWORD, - TP_PROPERTY_PASSWORD_REQUIRED, - TP_PROPERTY_PRIVATE, - LAST_TP_PROPERTY_ENUM -} IdleMUCChannelTPProperty; - -typedef struct { - const gchar *name; - GType type; -} TPPropertySignature; - -typedef struct { - GValue *value; - guint flags; -} TPProperty; - static const gchar *muc_channel_interfaces[] = { TP_IFACE_CHANNEL_INTERFACE_PASSWORD, TP_IFACE_CHANNEL_INTERFACE_GROUP, TP_IFACE_CHANNEL_INTERFACE_MESSAGES, + TP_IFACE_CHANNEL_INTERFACE_ROOM, TP_IFACE_CHANNEL_INTERFACE_SUBJECT, + TP_IFACE_CHANNEL_INTERFACE_ROOM_CONFIG, NULL }; -static const TPPropertySignature property_signatures[] = { - {"invite-only", G_TYPE_BOOLEAN}, - {"limit", G_TYPE_UINT}, - {"limited", G_TYPE_BOOLEAN}, - {"moderated", G_TYPE_BOOLEAN}, - {"password", G_TYPE_STRING}, - {"password-required", G_TYPE_BOOLEAN}, - {"private", G_TYPE_BOOLEAN}, - {NULL, G_TYPE_NONE} -}; - static const gchar *ascii_muc_states[] = { "MUC_STATE_CREATED", "MUC_STATE_JOINING", @@ -164,43 +142,23 @@ "MUC_STATE_PARTED" }; -static void _free_prop_value_struct(gpointer data, gpointer user_data) -{ - g_boxed_free(TP_STRUCT_TYPE_PROPERTY_VALUE, data); -} - -static void _free_flags_struct(gpointer data, gpointer user_data) -{ - g_boxed_free(TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE, data); -} - -static void _free_prop_info_struct(gpointer data, gpointer user_data) -{ - g_boxed_free(TP_STRUCT_TYPE_PROPERTY_SPEC, data); -} - - static gboolean add_member(GObject *gobj, TpHandle handle, const gchar *message, GError **error); static gboolean remove_member(GObject *gobj, TpHandle handle, const gchar *message, GError **error); -static void muc_channel_tp_properties_init(IdleMUCChannel *chan); -static void muc_channel_tp_properties_destroy(IdleMUCChannel *chan); -static void change_tp_properties(IdleMUCChannel *chan, const GPtrArray *props); -static void set_tp_property_flags(IdleMUCChannel *chan, const GArray *prop_ids, TpPropertyFlags add, TpPropertyFlags remove); - static guint signals[LAST_SIGNAL] = {0}; /* private structure */ struct _IdleMUCChannelPrivate { const gchar *channel_name; + TpBaseRoomConfig *room_config; + IdleMUCState state; IRCChannelModeState mode_state; gboolean can_set_topic; guint password_flags; - TPProperty *properties; DBusGMethodInvocation *passwd_ctx; @@ -225,10 +183,9 @@ priv->can_set_topic = TRUE; - priv->properties = g_new0(TPProperty, LAST_TP_PROPERTY_ENUM); - muc_channel_tp_properties_init(obj); - priv->dispose_has_run = FALSE; + + priv->mode_state.topic_touched = G_MAXINT64; } static void idle_muc_channel_dispose (GObject *object); @@ -273,7 +230,7 @@ if (tp_base_channel_is_requested (base)) { /* Add ourself to 'remote-pending' while we are joining the channel */ - TpIntSet *remote; + TpIntset *remote; TpHandle initiator = tp_base_channel_get_initiator (base); g_assert (initiator == conn->self_handle); @@ -283,6 +240,9 @@ initiator, TP_CHANNEL_GROUP_CHANGE_REASON_NONE); tp_intset_destroy (remote); } + + priv->room_config = + (TpBaseRoomConfig *) idle_room_config_new ((TpBaseChannel *) self); } static void @@ -303,12 +263,18 @@ case PROP_SUBJECT_ACTOR: g_value_set_string (value, priv->mode_state.topic_toucher_id); break; + case PROP_SUBJECT_ACTOR_HANDLE: + g_value_set_uint (value, priv->mode_state.topic_toucher); + break; case PROP_SUBJECT_TIMESTAMP: g_value_set_int64 (value, priv->mode_state.topic_touched); break; case PROP_CAN_SET_SUBJECT: g_value_set_boolean (value, priv->can_set_topic); break; + case PROP_SERVER: + g_value_set_static_string (value, ""); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } @@ -338,6 +304,8 @@ TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "DeliveryReportingSupport", TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "SupportedContentTypes", TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "MessageTypes", + TP_IFACE_CHANNEL_INTERFACE_ROOM, "RoomName", + TP_IFACE_CHANNEL_INTERFACE_ROOM, "Server", NULL); } @@ -345,9 +313,15 @@ GObjectClass *object_class = G_OBJECT_CLASS (idle_muc_channel_class); TpBaseChannelClass *base_channel_class = TP_BASE_CHANNEL_CLASS (idle_muc_channel_class); GParamSpec *param_spec; + static TpDBusPropertiesMixinPropImpl room_props[] = { + { "RoomName", "target-id", NULL }, + { "Server", "server", NULL }, + { NULL }, + }; static TpDBusPropertiesMixinPropImpl subject_props[] = { { "Subject", "subject", NULL }, { "Actor", "subject-actor", NULL }, + { "ActorHandle", "subject-actor-handle", NULL }, { "Timestamp", "subject-timestamp", NULL }, { "CanSet", "can-set-subject", NULL }, { NULL }, @@ -369,6 +343,12 @@ base_channel_class->get_object_path_suffix = idle_muc_channel_get_path_suffix; param_spec = g_param_spec_string ( + "server", "Room.Server", "always empty", + "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); + g_object_class_install_property (object_class, PROP_SERVER, + param_spec); + + param_spec = g_param_spec_string ( "subject", "Subject.Subject", "(aka topic)", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_SUBJECT, @@ -380,6 +360,14 @@ g_object_class_install_property (object_class, PROP_SUBJECT_ACTOR, param_spec); + param_spec = g_param_spec_uint ( + "subject-actor-handle", "Subject.ActorHandle", + "who set the topic (who hoo hoo, hoo hoo)", + 0, G_MAXUINT, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); + g_object_class_install_property (object_class, PROP_SUBJECT_ACTOR_HANDLE, + param_spec); + param_spec = g_param_spec_int64 ( "subject-timestamp", "Subject.Timestamp", "when they set it", G_MININT64, G_MAXINT64, 0, @@ -401,6 +389,12 @@ tp_group_mixin_init_dbus_properties (object_class); tp_group_mixin_class_allow_self_removal (object_class); + tp_base_room_config_register_class (base_channel_class); + + tp_dbus_properties_mixin_implement_interface (object_class, + TP_IFACE_QUARK_CHANNEL_INTERFACE_ROOM, + tp_dbus_properties_mixin_getter_gobject_properties, NULL, + room_props); tp_dbus_properties_mixin_implement_interface (object_class, TP_IFACE_QUARK_CHANNEL_INTERFACE_SUBJECT, tp_dbus_properties_mixin_getter_gobject_properties, NULL, @@ -416,6 +410,8 @@ priv->dispose_has_run = TRUE; + tp_clear_object (&priv->room_config); + if (G_OBJECT_CLASS (idle_muc_channel_parent_class)->dispose) G_OBJECT_CLASS (idle_muc_channel_parent_class)->dispose (object); } @@ -430,9 +426,6 @@ if (priv->mode_state.key) g_free(priv->mode_state.key); - muc_channel_tp_properties_destroy(self); - g_free(priv->properties); - if (priv->namereply_set) tp_handle_set_destroy(priv->namereply_set); @@ -456,218 +449,6 @@ NULL); } -static void muc_channel_tp_properties_init(IdleMUCChannel *chan) { - IdleMUCChannelPrivate *priv; - TPProperty *props; - int i; - - g_assert(chan != NULL); - g_assert(IDLE_IS_MUC_CHANNEL(chan)); - - priv = chan->priv; - props = priv->properties; - - for (i = 0; i < LAST_TP_PROPERTY_ENUM; i++) { - GValue *value; - props[i].value = value = g_new0(GValue, 1); - - g_value_init(value, property_signatures[i].type); - - props[i].flags = 0; - } -} - -static void muc_channel_tp_properties_destroy(IdleMUCChannel *chan) { - IdleMUCChannelPrivate *priv; - TPProperty *props; - - g_assert(chan != NULL); - g_assert(IDLE_IS_MUC_CHANNEL(chan)); - - priv = chan->priv; - props = priv->properties; - - for (int i = 0; i < LAST_TP_PROPERTY_ENUM; i++) { - g_value_unset(props[i].value); - g_free(props[i].value); - } -} - -static gboolean g_value_compare(const GValue *v1, const GValue *v2) { - GType t1, t2; - - g_assert(v1 != NULL); - g_assert(v2 != NULL); - - g_assert(G_IS_VALUE(v1)); - g_assert(G_IS_VALUE(v2)); - - t1 = G_VALUE_TYPE(v1); - t2 = G_VALUE_TYPE(v2); - - if (t1 != t2) { - IDLE_DEBUG("different types %s and %s compared!", g_type_name(t1), g_type_name(t2)); - return FALSE; - } - - switch (t1) { - case G_TYPE_BOOLEAN: - return g_value_get_boolean(v1) == g_value_get_boolean(v2); - - case G_TYPE_UINT: - return g_value_get_uint(v1) == g_value_get_uint(v2); - - case G_TYPE_STRING: { - const gchar *s1, *s2; - - s1 = g_value_get_string(v1); - s2 = g_value_get_string(v2); - - if ((s1 == NULL) && (s2 == NULL)) - return TRUE; - else if ((s1 == NULL) || (s2 == NULL)) - return FALSE; - else - return (strcmp(s1, s2) == 0); - } - - default: - IDLE_DEBUG("unknown type %s in comparison", g_type_name(t1)); - return FALSE; - } -} - -static void change_tp_properties(IdleMUCChannel *chan, const GPtrArray *props) { - IdleMUCChannelPrivate *priv; - guint i; - GPtrArray *changed_props; - GArray *flags; - - g_assert(chan != NULL); - g_assert(IDLE_IS_MUC_CHANNEL(chan)); - g_assert(props != NULL); - - priv = chan->priv; - - changed_props = g_ptr_array_new(); - flags = g_array_new(FALSE, FALSE, sizeof(guint)); - - for (i = 0; i < props->len; i++) { - GValue *curr_val; - GValue prop = {0, }; - GValue *new_val; - guint prop_id; - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_VALUE); - g_value_set_static_boxed(&prop, g_ptr_array_index(props, i)); - - dbus_g_type_struct_get(&prop, - 0, &prop_id, - 1, &new_val, - G_MAXUINT); - - if (prop_id >= LAST_TP_PROPERTY_ENUM) { - IDLE_DEBUG("prop_id >= LAST_TP_PROPERTY_ENUM, corruption!11"); - continue; - } - - curr_val = priv->properties[prop_id].value; - - if (!g_value_compare(new_val, curr_val)) { - g_value_copy(new_val, curr_val); - - g_ptr_array_add(changed_props, g_value_get_boxed(&prop)); - g_array_append_val(flags, prop_id); - - IDLE_DEBUG("tp_property %u changed", prop_id); - } - g_value_unset(new_val); - g_free(new_val); - - g_value_unset(&prop); - } - - if (changed_props->len > 0) { - IDLE_DEBUG("emitting PROPERTIES_CHANGED with %u properties", changed_props->len); - // tp_svc_properties_interface_emit_properties_changed((TpSvcPropertiesInterface *)(chan), changed_props); - } - - if (flags->len > 0) { - IDLE_DEBUG("flagging properties as readable with %u props", flags->len); - set_tp_property_flags(chan, flags, TP_PROPERTY_FLAG_READ, 0); - } - - g_ptr_array_free(changed_props, TRUE); - g_array_free(flags, TRUE); -} - -static void set_tp_property_flags(IdleMUCChannel *chan, const GArray *props, TpPropertyFlags add, TpPropertyFlags remove) { - IdleMUCChannelPrivate *priv; - GPtrArray *changed_props; - - g_assert(chan != NULL); - g_assert(IDLE_IS_MUC_CHANNEL(chan)); - - priv = chan->priv; - - changed_props = g_ptr_array_new(); - - if (props == NULL) { - IDLE_DEBUG("setting all flags with %u, %u", add, remove); - - for (int i = 0; i < LAST_TP_PROPERTY_ENUM; i++) { - guint curr_flags = priv->properties[i].flags; - guint flags = (curr_flags | add) & (~remove); - - if (curr_flags != flags) { - GValue prop = {0, }; - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE); - g_value_take_boxed(&prop, dbus_g_type_specialized_construct(TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE)); - - dbus_g_type_struct_set(&prop, - 0, i, - 1, flags, - G_MAXUINT); - - priv->properties[i].flags = flags; - - g_ptr_array_add(changed_props, g_value_get_boxed(&prop)); - } - } - } else { - for (guint i = 0; i < props->len; i++) { - guint prop_id = g_array_index(props, guint, i); - guint curr_flags = priv->properties[prop_id].flags; - guint flags = (curr_flags | add) & (~remove); - - if (curr_flags != flags) { - GValue prop = {0, }; - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE); - g_value_take_boxed(&prop, dbus_g_type_specialized_construct(TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE)); - - dbus_g_type_struct_set(&prop, - 0, prop_id, - 1, flags, - G_MAXUINT); - - priv->properties[prop_id].flags = flags; - - g_ptr_array_add(changed_props, g_value_get_boxed(&prop)); - } - } - } - - if (changed_props->len > 0) { - IDLE_DEBUG("emitting PROPERTY_FLAGS_CHANGED with %u properties", changed_props->len); - // tp_svc_properties_interface_emit_property_flags_changed((TpSvcPropertiesInterface *)(chan), changed_props); - } - - g_ptr_array_foreach(changed_props, _free_flags_struct, NULL); - g_ptr_array_free(changed_props, TRUE); -} - static void provide_password_reply(IdleMUCChannel *chan, gboolean success) { IdleMUCChannelPrivate *priv; @@ -732,29 +513,6 @@ return priv->join_ready; } -static IdleMUCChannelTPProperty to_prop_id(IRCChannelModeFlags flag) { - switch (flag) { - case MODE_FLAG_INVITE_ONLY: - return TP_PROPERTY_INVITE_ONLY; - - case MODE_FLAG_MODERATED: - return TP_PROPERTY_MODERATED; - - case MODE_FLAG_PRIVATE: - case MODE_FLAG_SECRET: - return TP_PROPERTY_PRIVATE; - - case MODE_FLAG_KEY: - return TP_PROPERTY_PASSWORD_REQUIRED; - - case MODE_FLAG_USER_LIMIT: - return TP_PROPERTY_LIMITED; - - default: - return LAST_TP_PROPERTY_ENUM; - } -} - static void idle_muc_channel_update_can_set_topic ( IdleMUCChannel *self, @@ -779,8 +537,6 @@ IdleMUCChannelPrivate *priv; IRCChannelModeFlags flags; guint group_add = 0, group_remove = 0; - GPtrArray *tp_props_to_change; - guint prop_flags = 0; guint combined; g_assert(obj != NULL); @@ -791,8 +547,6 @@ priv = obj->priv; flags = priv->mode_state.flags; - tp_props_to_change = g_ptr_array_new(); - IDLE_DEBUG("got %x, %x", add, remove); add &= ~flags; @@ -813,43 +567,22 @@ } if (combined & (MODE_FLAG_OPERATOR_PRIVILEGE | MODE_FLAG_HALFOP_PRIVILEGE)) { - GArray *flags_to_change; - - static const guint flags_helper[] = { - TP_PROPERTY_INVITE_ONLY, - TP_PROPERTY_LIMIT, - TP_PROPERTY_LIMITED, - TP_PROPERTY_MODERATED, - TP_PROPERTY_PASSWORD, - TP_PROPERTY_PASSWORD_REQUIRED, - TP_PROPERTY_PRIVATE, - LAST_TP_PROPERTY_ENUM - }; - - flags_to_change = g_array_new(FALSE, FALSE, sizeof(guint)); - - for (int i = 0; flags_helper[i] != LAST_TP_PROPERTY_ENUM; i++) { - guint prop_id = flags_helper[i]; - g_array_append_val(flags_to_change, prop_id); - } - - prop_flags = TP_PROPERTY_FLAG_WRITE; if (add & (MODE_FLAG_OPERATOR_PRIVILEGE | MODE_FLAG_HALFOP_PRIVILEGE)) { group_add |= TP_CHANNEL_GROUP_FLAG_CAN_ADD | TP_CHANNEL_GROUP_FLAG_CAN_REMOVE | TP_CHANNEL_GROUP_FLAG_MESSAGE_REMOVE; - set_tp_property_flags(obj, flags_to_change, prop_flags, 0); + tp_base_room_config_set_can_update_configuration (priv->room_config, TRUE); if (flags & MODE_FLAG_TOPIC_ONLY_SETTABLE_BY_OPS) idle_muc_channel_update_can_set_topic (obj, TRUE); } else if (remove & (MODE_FLAG_OPERATOR_PRIVILEGE | MODE_FLAG_HALFOP_PRIVILEGE)) { group_remove |= TP_CHANNEL_GROUP_FLAG_CAN_REMOVE | TP_CHANNEL_GROUP_FLAG_MESSAGE_REMOVE; + tp_base_room_config_set_can_update_configuration (priv->room_config, FALSE); + if (flags & MODE_FLAG_INVITE_ONLY) group_remove |= TP_CHANNEL_GROUP_FLAG_CAN_ADD; - set_tp_property_flags(obj, flags_to_change, 0, prop_flags); - if (flags & MODE_FLAG_TOPIC_ONLY_SETTABLE_BY_OPS) idle_muc_channel_update_can_set_topic (obj, FALSE); } @@ -865,73 +598,68 @@ for (int i = 1; i < LAST_MODE_FLAG_ENUM; i <<= 1) { if (combined & i) { - IdleMUCChannelTPProperty tp_prop_id; - - tp_prop_id = to_prop_id(i); + gboolean value = (add & i) ? TRUE : FALSE; - if (tp_prop_id < LAST_TP_PROPERTY_ENUM) { - GValue prop = {0, }; - GValue val_auto_is_fine = {0, }; - GValue *val = &val_auto_is_fine; - GType type = property_signatures[tp_prop_id].type; - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_VALUE); - g_value_take_boxed(&prop, dbus_g_type_specialized_construct(TP_STRUCT_TYPE_PROPERTY_VALUE)); - - g_value_init(val, type); - - if (type != G_TYPE_BOOLEAN) { - IDLE_DEBUG("type != G_TYPE_BOOLEAN for %u (modeflag %u), ignoring", tp_prop_id, i); - continue; - } - - g_value_set_boolean(val, (add & i) ? TRUE : FALSE); - - dbus_g_type_struct_set(&prop, - 0, tp_prop_id, - 1, val, - G_MAXUINT); - - g_ptr_array_add(tp_props_to_change, g_value_get_boxed(&prop)); - - if (add & i) { - GValue prop = {0, }; - GValue val_auto_is_fine = {0, }; - GValue *val = &val_auto_is_fine; - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_VALUE); - g_value_take_boxed(&prop, dbus_g_type_specialized_construct(TP_STRUCT_TYPE_PROPERTY_VALUE)); - - if (i == MODE_FLAG_USER_LIMIT) { - g_value_init(val, G_TYPE_UINT); - g_value_set_uint(val, priv->mode_state.limit); - tp_prop_id = TP_PROPERTY_LIMIT; - } else if (i == MODE_FLAG_KEY) { - g_value_init(val, G_TYPE_STRING); - g_value_set_string(val, priv->mode_state.key); - tp_prop_id = TP_PROPERTY_PASSWORD; - } else { - continue; - } - - dbus_g_type_struct_set(&prop, - 0, tp_prop_id, - 1, val, - G_MAXUINT); + switch (i) + { + case MODE_FLAG_INVITE_ONLY: + /* invite-only */ + g_object_set (priv->room_config, + "invite-only", value, + NULL); + break; + + case MODE_FLAG_MODERATED: + /* moderated */ + g_object_set (priv->room_config, + "moderated", value, + NULL); + break; + + case MODE_FLAG_USER_LIMIT: + /* limit */ + g_object_set (priv->room_config, + "limit", value ? priv->mode_state.limit : 0, + NULL); + break; + + case MODE_FLAG_KEY: + /* password-protected */ + { + g_object_set (priv->room_config, + "password-protected", value, + NULL); + + /* if value==TRUE we have a password! */ + if (value) + { + g_object_set (priv->room_config, + "password", priv->mode_state.key, + NULL); + } + } + break; + + case MODE_FLAG_PRIVATE: + case MODE_FLAG_SECRET: + /* private */ + g_object_set (priv->room_config, + "private", value, + NULL); + break; + + default: + break; + } - g_ptr_array_add(tp_props_to_change, g_value_get_boxed(&prop)); - } - } } } tp_group_mixin_change_flags((GObject *)obj, group_add, group_remove); - change_tp_properties(obj, tp_props_to_change); - priv->mode_state.flags = flags; + tp_base_room_config_emit_properties_changed (priv->room_config); - g_ptr_array_foreach(tp_props_to_change, _free_prop_value_struct, NULL); - g_ptr_array_free(tp_props_to_change, TRUE); + priv->mode_state.flags = flags; IDLE_DEBUG("changed to %x", flags); } @@ -994,7 +722,7 @@ IdleMUCChannelPrivate *priv = chan->priv; TpBaseConnection *base_conn = tp_base_channel_get_connection ( TP_BASE_CHANNEL (chan)); - TpIntSet *set; + TpIntset *set; set = tp_intset_new(); tp_intset_add(set, joiner); @@ -1025,7 +753,7 @@ static void _network_member_left(IdleMUCChannel *chan, TpHandle leaver, TpHandle actor, const gchar *message, TpChannelGroupChangeReason reason) { TpBaseChannel *base = TP_BASE_CHANNEL (chan); TpBaseConnection *base_conn = tp_base_channel_get_connection (base); - TpIntSet *set = tp_intset_new(); + TpIntset *set = tp_intset_new(); tp_intset_add(set, leaver); tp_group_mixin_change_members((GObject *) chan, message, NULL, set, NULL, NULL, actor, reason); @@ -1056,8 +784,8 @@ void idle_muc_channel_invited(IdleMUCChannel *chan, TpHandle inviter) { TpBaseConnection *base_conn = tp_base_channel_get_connection (TP_BASE_CHANNEL (chan)); - TpIntSet *add = tp_intset_new(); - TpIntSet *local = tp_intset_new(); + TpIntset *add = tp_intset_new(); + TpIntset *local = tp_intset_new(); tp_intset_add(add, inviter); tp_intset_add(local, base_conn->self_handle); @@ -1078,7 +806,11 @@ for (guint i = 1; (i + 1) < args->n_values; i += 2) { TpHandle handle = g_value_get_uint(g_value_array_get_nth(args, i)); +#if GLIB_CHECK_VERSION(2, 31, 0) + gchar modechar = g_value_get_schar(g_value_array_get_nth(args, i + 1)); +#else gchar modechar = g_value_get_char(g_value_array_get_nth(args, i + 1)); +#endif if (handle == base_conn->self_handle) { guint remove = MODE_FLAG_OPERATOR_PRIVILEGE | MODE_FLAG_VOICE_PRIVILEGE | MODE_FLAG_HALFOP_PRIVILEGE; @@ -1145,22 +877,8 @@ TpBaseChannel *base = TP_BASE_CHANNEL (chan); TpBaseConnection *base_conn = tp_base_channel_get_connection (base); TpHandleRepoIface *handles = tp_base_connection_get_handles(base_conn, TP_HANDLE_TYPE_CONTACT); - GArray *flags_to_change = g_array_new(FALSE, FALSE, sizeof(guint)); - static const guint flags_helper[] = { - TP_PROPERTY_INVITE_ONLY, - TP_PROPERTY_LIMITED, - TP_PROPERTY_MODERATED, - TP_PROPERTY_PASSWORD_REQUIRED, - TP_PROPERTY_PRIVATE, - LAST_TP_PROPERTY_ENUM - }; - - for (const guint *prop_id = flags_helper; *prop_id != LAST_TP_PROPERTY_ENUM; prop_id++) - g_array_append_val(flags_to_change, *prop_id); - - set_tp_property_flags(chan, flags_to_change, TP_PROPERTY_FLAG_READ, 0); - g_array_free(flags_to_change, TRUE); + tp_base_room_config_set_retrieved (priv->room_config); for (guint i = 1; i < args->n_values; i++) { const gchar *modes = g_value_get_string(g_value_array_get_nth(args, i)); @@ -1184,9 +902,6 @@ IDLE_DEBUG("got MODE '%c' concerning us", *modes); mode_accum |= _modechar_to_modeflag(*modes); } - - if (handle) - tp_handle_unref(handles, handle); } break; @@ -1312,7 +1027,7 @@ idle_muc_channel_topic_touch ( IdleMUCChannel *self, const TpHandle toucher, - const guint timestamp) + const gint64 timestamp) { IdleMUCChannelPrivate *priv = self->priv; @@ -1324,7 +1039,7 @@ idle_muc_channel_topic_full ( IdleMUCChannel *self, const TpHandle toucher, - const guint timestamp, + const gint64 timestamp, const gchar *topic) { IdleMUCChannelPrivate *priv = self->priv; @@ -1333,7 +1048,7 @@ TpHandleRepoIface *handles = tp_base_connection_get_handles (base_conn, TP_HANDLE_TYPE_CONTACT); guint i = 0; - static const gchar *changed[] = { NULL, NULL, NULL, NULL }; + static const gchar *changed[] = { NULL, NULL, NULL, NULL, NULL }; /* Don't blow up if we pass the existing topic pointer in. */ if (priv->mode_state.topic != topic) @@ -1353,6 +1068,7 @@ { priv->mode_state.topic_toucher = toucher; changed[i++] = "Actor"; + changed[i++] = "ActorHandle"; } if (toucher != 0) @@ -1368,7 +1084,7 @@ idle_muc_channel_topic_unset ( IdleMUCChannel *self) { - idle_muc_channel_topic_full (self, 0, 0, ""); + idle_muc_channel_topic_full (self, 0, G_MAXINT64, ""); } void idle_muc_channel_badchannelkey(IdleMUCChannel *chan) { @@ -1393,10 +1109,10 @@ } void idle_muc_channel_rename(IdleMUCChannel *chan, TpHandle old_handle, TpHandle new_handle) { - TpIntSet *add = tp_intset_new(); - TpIntSet *remove = tp_intset_new(); - TpIntSet *local = tp_intset_new(); - TpIntSet *remote = tp_intset_new(); + TpIntset *add = tp_intset_new(); + TpIntset *remove = tp_intset_new(); + TpIntset *local = tp_intset_new(); + TpIntset *remote = tp_intset_new(); if (old_handle == chan->group.self_handle) tp_group_mixin_change_self_handle((GObject *) chan, new_handle); @@ -1459,7 +1175,7 @@ if ((nick == NULL) || (nick[0] == '\0')) { IDLE_DEBUG("invalid handle %u passed", handle); - g_set_error(error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, "invalid handle %u passed", handle); + g_set_error(error, TP_ERROR, TP_ERROR_INVALID_HANDLE, "invalid handle %u passed", handle); return FALSE; } @@ -1487,7 +1203,7 @@ if ((nick == NULL) || (nick[0] == '\0')) { IDLE_DEBUG("invalid handle %u passed", handle); - g_set_error(error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, "invalid handle %u passed", handle); + g_set_error(error, TP_ERROR, TP_ERROR_INVALID_HANDLE, "invalid handle %u passed", handle); return FALSE; } @@ -1511,13 +1227,13 @@ if (handle == base_conn->self_handle) { if (tp_handle_set_is_member(obj->group.members, handle) || tp_handle_set_is_member(obj->group.remote_pending, handle)) { - GError *e = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + GError *e = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE, "we are already a member of or trying to join %s", priv->channel_name); IDLE_DEBUG ("%s", e->message); g_propagate_error (error, e); return FALSE; } else { - TpIntSet *add_set = tp_intset_new(); + TpIntset *add_set = tp_intset_new(); send_join_request(obj, NULL); @@ -1529,7 +1245,7 @@ } } else { if (tp_handle_set_is_member(obj->group.members, handle) || tp_handle_set_is_member(obj->group.remote_pending, handle)) { - GError *e = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + GError *e = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE, "the requested contact (handle %u) to be added " "to the room (%s) is already a member of, or " "has already been invited to join, the room", @@ -1539,7 +1255,7 @@ return FALSE; } else { GError *invite_error; - TpIntSet *add_set = tp_intset_new(); + TpIntset *add_set = tp_intset_new(); if (!send_invite_request(obj, handle, &invite_error)) { *error = invite_error; @@ -1587,7 +1303,7 @@ if (!tp_handle_set_is_member(obj->group.members, handle)) { IDLE_DEBUG("handle %u not a current member!", handle); - g_set_error(error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "handle %u is not a current member of the channel", handle); + g_set_error(error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "handle %u is not a current member of the channel", handle); return FALSE; } @@ -1643,150 +1359,6 @@ /** - * idle_muc_channel_get_properties - * - * Implements DBus method GetProperties - * on interface org.freedesktop.Telepathy.Properties - * - * @error: Used to return a pointer to a GError detailing any error - * that occured, DBus will throw the error only if this - * function returns false. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -static void idle_muc_channel_get_properties (TpSvcPropertiesInterface *iface, const GArray * properties, DBusGMethodInvocation *context) { - IdleMUCChannel *obj = IDLE_MUC_CHANNEL(iface); - IdleMUCChannelPrivate *priv; - GError *error; - GPtrArray *ret; - - g_assert(obj != NULL); - g_assert(IDLE_IS_MUC_CHANNEL(obj)); - - priv = obj->priv; - - for (guint i = 0; i < properties->len; i++) { - IdleMUCChannelTPProperty prop = g_array_index(properties, guint, i); - - if (prop >= LAST_TP_PROPERTY_ENUM) { - IDLE_DEBUG("invalid property id %u", prop); - - error = g_error_new(TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "invalid property id %u", prop); - dbus_g_method_return_error(context, error); - g_error_free(error); - - return; - } - - if (!(priv->properties[prop].flags & TP_PROPERTY_FLAG_READ)) { - IDLE_DEBUG("not allowed to read property %u", prop); - - error = g_error_new(TP_ERRORS, TP_ERROR_PERMISSION_DENIED, "not allowed to read property %u", prop); - dbus_g_method_return_error(context, error); - g_error_free(error); - - return; - } - } - - ret = g_ptr_array_sized_new(properties->len); - - for (guint i = 0; i < properties->len; i++) { - IdleMUCChannelTPProperty prop = g_array_index(properties, guint, i); - GValue prop_val = {0, }; - - g_value_init(&prop_val, TP_STRUCT_TYPE_PROPERTY_VALUE); - g_value_take_boxed(&prop_val, - dbus_g_type_specialized_construct(TP_STRUCT_TYPE_PROPERTY_VALUE)); - - dbus_g_type_struct_set(&prop_val, - 0, prop, - 1, priv->properties[prop].value, - G_MAXUINT); - - g_ptr_array_add(ret, g_value_get_boxed(&prop_val)); - } - - tp_svc_properties_interface_return_from_get_properties(context, ret); - - g_ptr_array_foreach(ret, _free_prop_value_struct, NULL); - g_ptr_array_free(ret, TRUE); -} - -/** - * idle_muc_channel_list_properties - * - * Implements DBus method ListProperties - * on interface org.freedesktop.Telepathy.Properties - * - * @error: Used to return a pointer to a GError detailing any error - * that occured, DBus will throw the error only if this - * function returns false. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -static void idle_muc_channel_list_properties (TpSvcPropertiesInterface *iface, DBusGMethodInvocation *context) { - IdleMUCChannel *obj = IDLE_MUC_CHANNEL(iface); - IdleMUCChannelPrivate *priv; - GError *error; - GPtrArray *ret; - - g_assert(obj != NULL); - g_assert(IDLE_IS_MUC_CHANNEL(obj)); - - priv = obj->priv; - - ret = g_ptr_array_sized_new(LAST_TP_PROPERTY_ENUM); - - for (int i = 0; i < LAST_TP_PROPERTY_ENUM; i++) { - GValue prop = {0, }; - const gchar *dbus_sig; - - switch (property_signatures[i].type) { - case G_TYPE_BOOLEAN: - dbus_sig = "b"; - break; - - case G_TYPE_UINT: - dbus_sig = "u"; - break; - - case G_TYPE_STRING: - dbus_sig = "s"; - break; - - default: - IDLE_DEBUG("encountered unknown type %s", g_type_name(property_signatures[i].type)); - error = g_error_new(TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "internal error in %s", G_STRFUNC); - dbus_g_method_return_error(context, error); - g_error_free(error); - g_ptr_array_free(ret, TRUE); - - return; - } - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_SPEC); - g_value_take_boxed(&prop, - dbus_g_type_specialized_construct(TP_STRUCT_TYPE_PROPERTY_SPEC)); - - dbus_g_type_struct_set(&prop, - 0, i, - 1, property_signatures[i].name, - 2, dbus_sig, - 3, priv->properties[i].flags, - G_MAXUINT); - - g_ptr_array_add(ret, g_value_get_boxed(&prop)); - } - - tp_svc_properties_interface_return_from_list_properties(context, ret); - - g_ptr_array_foreach(ret, _free_prop_info_struct, NULL); - g_ptr_array_free(ret, TRUE); -} - - -/** * idle_muc_channel_provide_password * * Implements DBus method ProvidePassword @@ -1808,7 +1380,7 @@ priv = obj->priv; if (!(priv->password_flags & TP_CHANNEL_PASSWORD_FLAG_PROVIDE) || (priv->passwd_ctx != NULL)) { - GError *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + GError *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE, "don't need a password now or authentication already " "in progress (%s)", priv->channel_name); IDLE_DEBUG ("%s", error->message); @@ -1838,7 +1410,7 @@ TpBaseConnection *base_conn = tp_base_channel_get_connection (base); if ((priv->mode_state.flags & MODE_FLAG_MODERATED) && !(priv->mode_state.flags & (MODE_FLAG_OPERATOR_PRIVILEGE | MODE_FLAG_HALFOP_PRIVILEGE | MODE_FLAG_VOICE_PRIVILEGE))) { - GError error = { TP_ERRORS, TP_ERROR_PERMISSION_DENIED, "Channel is moderated" }; + GError error = { TP_ERROR, TP_ERROR_PERMISSION_DENIED, "Channel is moderated" }; IDLE_DEBUG("Channel is moderated"); tp_message_mixin_sent (obj, message, 0, NULL, &error); @@ -1848,260 +1420,6 @@ idle_text_send(obj, message, flags, priv->channel_name, IDLE_CONNECTION (base_conn)); } -static char to_irc_mode(IdleMUCChannelTPProperty prop_id) { - switch (prop_id) { - case TP_PROPERTY_INVITE_ONLY: - return 'i'; - case TP_PROPERTY_MODERATED: - return 'm'; - case TP_PROPERTY_PRIVATE: - return 's'; - default: - return '\0'; - } -} - -static int prop_arr_find(const GPtrArray *props, IdleMUCChannelTPProperty needle) { - for (guint i = 0; i < props->len; i++) { - GValue prop = {0, }; - guint prop_id; - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_VALUE); - g_value_set_static_boxed(&prop, g_ptr_array_index(props, i)); - - dbus_g_type_struct_get(&prop, - 0, &prop_id, - G_MAXUINT); - - if (prop_id == needle) { - return i; - } - } - - return -1; -} - -static void send_properties_request(IdleMUCChannel *obj, const GPtrArray *properties) { - IdleMUCChannelPrivate *priv; - GPtrArray *waiting; - gchar cmd[IRC_MSG_MAXLEN + 2]; - size_t len; - gchar *body; - - g_assert(obj != NULL); - g_assert(IDLE_IS_MUC_CHANNEL(obj)); - g_assert(properties != NULL); - - priv = obj->priv; - - waiting = g_ptr_array_new(); - - g_snprintf(cmd, IRC_MSG_MAXLEN + 2, "MODE %s ", priv->channel_name); - len = strlen(cmd); - body = cmd + len; - - for (guint i = 0; i < properties->len; i++) { - GValue prop = {0, }; - IdleMUCChannelTPProperty prop_id; - GValue *prop_val; - char irc_mode; - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_VALUE); - g_value_set_static_boxed(&prop, g_ptr_array_index(properties, i)); - - dbus_g_type_struct_get(&prop, - 0, &prop_id, - 1, &prop_val, - G_MAXUINT); - - irc_mode = to_irc_mode(prop_id); - - if (irc_mode != '\0') { - g_assert(G_VALUE_TYPE(prop_val) == G_TYPE_BOOLEAN); - - gboolean state = g_value_get_boolean(prop_val); - - size_t seq = 0; - - body[seq++] = state ? '+' : '-'; - - body[seq++] = irc_mode; - body[seq++] = '\0'; - - send_command (obj, cmd); - } else { - g_ptr_array_add(waiting, g_value_get_boxed(&prop)); - } - } - - if (waiting->len) { - int i, j; - gpointer tmp; - - i = prop_arr_find(waiting, TP_PROPERTY_LIMITED); - j = prop_arr_find(waiting, TP_PROPERTY_LIMIT); - - if ((i != -1) && (j != -1) && (i < j)) { - IDLE_DEBUG("swapping order of TP_PROPERTY_LIMIT and TP_PROPERTY_LIMITED"); - - tmp = g_ptr_array_index(waiting, i); - g_ptr_array_index(waiting, i) = g_ptr_array_index(waiting, j); - g_ptr_array_index(waiting, j) = tmp; - } - - i = prop_arr_find(waiting, TP_PROPERTY_PASSWORD_REQUIRED); - j = prop_arr_find(waiting, TP_PROPERTY_PASSWORD); - - if ((i != -1) && (j != -1) && (i < j)) { - IDLE_DEBUG("swapping order of TP_PROPERTY_PASSWORD and TP_PROPERTY_PASSWORD_REQUIRED"); - - tmp = g_ptr_array_index(waiting, i); - g_ptr_array_index(waiting, i) = g_ptr_array_index(waiting, j); - g_ptr_array_index(waiting, j) = tmp; - } - } - - /* okay now the data is ALWAYS before the boolean */ - - for (guint i = 0; i < waiting->len; i++) { - GValue prop = {0, }; - IdleMUCChannelTPProperty prop_id; - GValue *prop_val; - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_VALUE); - g_value_set_static_boxed(&prop, g_ptr_array_index(waiting, i)); - - dbus_g_type_struct_get(&prop, - 0, &prop_id, - 1, &prop_val, - G_MAXUINT); - - g_assert(prop_id < LAST_TP_PROPERTY_ENUM); - - if (prop_id == TP_PROPERTY_LIMIT || prop_id == TP_PROPERTY_PASSWORD) { - int j; - - g_value_copy(prop_val, priv->properties[prop_id].value); - - j = prop_arr_find(waiting, prop_id + 1); - - if (j == -1) { - if (prop_id == TP_PROPERTY_LIMIT && priv->mode_state.flags & MODE_FLAG_USER_LIMIT) - g_snprintf(body, IRC_MSG_MAXLEN - len, "+l %u", g_value_get_uint(prop_val)); - else if (prop_id == TP_PROPERTY_PASSWORD && priv->mode_state.flags & MODE_FLAG_KEY) - g_snprintf(body, IRC_MSG_MAXLEN - len, "+k %s", g_value_get_string(prop_val)); - else - IDLE_DEBUG("%u", __LINE__); - } - } else if (prop_id == TP_PROPERTY_LIMITED) { - guint limit = g_value_get_uint(priv->properties[TP_PROPERTY_LIMIT].value); - - if (g_value_get_boolean(prop_val)) { - if (limit != 0) - g_snprintf(body, IRC_MSG_MAXLEN - len, "+l %u", limit); - } else { - g_snprintf(body, IRC_MSG_MAXLEN - len, "-l"); - } - } else if (prop_id == TP_PROPERTY_PASSWORD_REQUIRED) { - const gchar *key = g_value_get_string(priv->properties[TP_PROPERTY_PASSWORD].value); - - if (g_value_get_boolean(prop_val)) { - if (key != NULL) - g_snprintf(body, IRC_MSG_MAXLEN - len, "+k %s", key); - } else { - g_snprintf(body, IRC_MSG_MAXLEN - len, "-k"); - } - } - - send_command (obj, cmd); - } - - g_ptr_array_free(waiting, TRUE); -} - -/** - * idle_muc_channel_set_properties - * - * Implements DBus method SetProperties - * on interface org.freedesktop.Telepathy.Properties - * - * @error: Used to return a pointer to a GError detailing any error - * that occured, DBus will throw the error only if this - * function returns false. - * - * Returns: TRUE if successful, FALSE if an error was thrown. - */ -static void idle_muc_channel_set_properties (TpSvcPropertiesInterface *iface, const GPtrArray * properties, DBusGMethodInvocation *context) { - IdleMUCChannel *obj = IDLE_MUC_CHANNEL(iface); - IdleMUCChannelPrivate *priv; - GPtrArray *to_change; - GError *error; - - g_assert(obj != NULL); - g_assert(IDLE_IS_MUC_CHANNEL(obj)); - - priv = obj->priv; - - to_change = g_ptr_array_new(); - - for (guint i = 0; i < properties->len; i++) { - GValue prop = {0, }; - IdleMUCChannelTPProperty prop_id; - GValue *prop_val; - - g_value_init(&prop, TP_STRUCT_TYPE_PROPERTY_VALUE); - g_value_set_static_boxed(&prop, g_ptr_array_index(properties, i)); - - dbus_g_type_struct_get(&prop, - 0, &prop_id, - 1, &prop_val, - G_MAXUINT); - - if (prop_id >= LAST_TP_PROPERTY_ENUM) { - IDLE_DEBUG("invalid property id %u", prop_id); - - error = g_error_new(TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "invalid property id %u", prop_id); - dbus_g_method_return_error(context, error); - g_error_free(error); - g_ptr_array_free(to_change, TRUE); - - return; - } - - if ((priv->properties[prop_id].flags & TP_PROPERTY_FLAG_WRITE) == 0) { - IDLE_DEBUG("not allowed to set property with id %u", prop_id); - - error = g_error_new(TP_ERRORS, TP_ERROR_PERMISSION_DENIED, "not allowed to set property with id %u", prop_id); - dbus_g_method_return_error(context, error); - g_error_free(error); - g_ptr_array_free(to_change, TRUE); - - return; - } - - if (!g_value_type_compatible(G_VALUE_TYPE(prop_val), property_signatures[prop_id].type)) { - IDLE_DEBUG("incompatible value type %s for prop_id %u", g_type_name(G_VALUE_TYPE(prop_val)), prop_id); - - error = g_error_new(TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, "incompatible value type %s for prop_id %u", g_type_name(G_VALUE_TYPE(prop_val)), prop_id); - dbus_g_method_return_error(context, error); - g_error_free(error); - g_ptr_array_free(to_change, TRUE); - - return; - } - - if (!g_value_compare(prop_val, priv->properties[prop_id].value)) { - g_ptr_array_add(to_change, g_value_get_boxed(&prop)); - } - } - - send_properties_request(obj, to_change); - - g_ptr_array_free(to_change, TRUE); - - tp_svc_properties_interface_return_from_set_properties(context); -} - static void idle_muc_channel_set_subject ( TpSvcChannelInterfaceSubject *iface, @@ -2113,7 +1431,7 @@ if (priv->state != MUC_STATE_JOINED) { - GError *error = g_error_new (TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + GError *error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Can't set subject: not in the room (state=%s)", ascii_muc_states[priv->state]); dbus_g_method_return_error (context, error); @@ -2121,7 +1439,7 @@ } else if (!priv->can_set_topic) { - GError error = { TP_ERRORS, TP_ERROR_PERMISSION_DENIED, + GError error = { TP_ERROR, TP_ERROR_PERMISSION_DENIED, "The channel's +t and you're not an op" }; dbus_g_method_return_error (context, &error); } @@ -2193,14 +1511,6 @@ #undef IMPLEMENT } -static void _properties_iface_init(gpointer g_iface, gpointer iface_data) { -#define IMPLEMENT(x) (void) idle_muc_channel_##x - IMPLEMENT(get_properties); - IMPLEMENT(list_properties); - IMPLEMENT(set_properties); -#undef IMPLEMENT -} - static void subject_iface_init ( gpointer g_iface, @@ -2212,7 +1522,4 @@ tp_svc_channel_interface_subject_implement_##x (klass, idle_muc_channel_##x) IMPLEMENT (set_subject); #undef IMPLEMENT - - /* TODO: remove this, it's just to squash unusedness warnings. */ - _properties_iface_init (NULL, NULL); } diff -Nru telepathy-idle-0.1.11/src/idle-muc-channel.h telepathy-idle-0.1.12/src/idle-muc-channel.h --- telepathy-idle-0.1.11/src/idle-muc-channel.h 2011-10-28 16:54:36.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-muc-channel.h 2012-06-14 14:52:47.000000000 +0000 @@ -22,6 +22,7 @@ #define __IDLE_MUC_CHANNEL_H__ #include +#include #include #include @@ -94,8 +95,8 @@ gboolean idle_muc_channel_receive(IdleMUCChannel *chan, TpChannelTextMessageType type, TpHandle sender, const gchar *msg); void idle_muc_channel_rename(IdleMUCChannel *chan, TpHandle old_handle, TpHandle new_handle); void idle_muc_channel_topic(IdleMUCChannel *chan, const gchar *topic); -void idle_muc_channel_topic_full(IdleMUCChannel *chan, const TpHandle handle, const guint timestamp, const gchar *topic); -void idle_muc_channel_topic_touch(IdleMUCChannel *chan, const TpHandle handle, const guint timestamp); +void idle_muc_channel_topic_full(IdleMUCChannel *chan, const TpHandle handle, const gint64 timestamp, const gchar *topic); +void idle_muc_channel_topic_touch(IdleMUCChannel *chan, const TpHandle handle, const gint64 timestamp); void idle_muc_channel_topic_unset(IdleMUCChannel *chan); gboolean idle_muc_channel_is_ready(IdleMUCChannel *chan); diff -Nru telepathy-idle-0.1.11/src/idle-muc-manager.c telepathy-idle-0.1.12/src/idle-muc-manager.c --- telepathy-idle-0.1.11/src/idle-muc-manager.c 2011-10-28 16:54:36.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-muc-manager.c 2012-06-14 14:52:47.000000000 +0000 @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include "idle-muc-manager.h" #include @@ -81,14 +83,6 @@ static void _muc_manager_close_all(IdleMUCManager *manager); static void _muc_manager_add_handlers(IdleMUCManager *manager); -static void _muc_manager_foreach_channel(TpChannelManager *manager, TpExportableChannelFunc func, gpointer user_data); -static void _muc_manager_type_foreach_channel_class (GType type, TpChannelManagerTypeChannelClassFunc func, gpointer user_data); - -static gboolean _muc_manager_create_channel (TpChannelManager *manager, gpointer request_token, GHashTable *request_properties); -static gboolean _muc_manager_request_channel (TpChannelManager *manager, gpointer request_token, GHashTable *request_properties); -static gboolean _muc_manager_ensure_channel (TpChannelManager *manager, gpointer request_token, GHashTable *request_properties); -static gboolean _muc_manager_request (IdleMUCManager *self, gpointer request_token, GHashTable *request_properties, gboolean require_new); - static IdleMUCChannel *_muc_manager_new_channel(IdleMUCManager *manager, TpHandle handle, TpHandle initiator, gboolean requested); static void _channel_closed_cb(IdleMUCChannel *chan, gpointer user_data); @@ -96,17 +90,28 @@ static const gchar * const muc_channel_fixed_properties[] = { - TP_IFACE_CHANNEL ".ChannelType", - TP_IFACE_CHANNEL ".TargetHandleType", + TP_PROP_CHANNEL_CHANNEL_TYPE, + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL }; static const gchar * const muc_channel_allowed_properties[] = { - TP_IFACE_CHANNEL ".TargetHandle", - TP_IFACE_CHANNEL ".TargetID", + TP_PROP_CHANNEL_TARGET_HANDLE, + TP_PROP_CHANNEL_TARGET_ID, NULL }; +static const gchar * const muc_channel_allowed_room_properties[] = { + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, /* But it must be None */ + TP_PROP_CHANNEL_INTERFACE_ROOM_ROOM_NAME, + NULL +}; + +static const gchar * const muc_channel_all_allowed_properties[] = { + TP_PROP_CHANNEL_TARGET_HANDLE, + TP_PROP_CHANNEL_TARGET_ID, + TP_PROP_CHANNEL_INTERFACE_ROOM_ROOM_NAME, +}; static GObject* _muc_manager_constructor(GType type, guint n_props, GObjectConstructParam *props) @@ -181,13 +186,14 @@ static IdleParserHandlerResult _numeric_error_handler(IdleParser *parser, IdleParserMessageCode code, GValueArray *args, gpointer user_data) { IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE(user_data); TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 0)); + IdleMUCChannel *chan; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); if (!chan) return IDLE_PARSER_HANDLER_RESULT_HANDLED; @@ -221,13 +227,14 @@ IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE(user_data); TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 0)); const gchar *topic = g_value_get_string(g_value_array_get_nth(args, 1)); + IdleMUCChannel *chan; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); if (chan) idle_muc_channel_topic(chan, topic); @@ -240,13 +247,14 @@ TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 0)); TpHandle toucher_handle = g_value_get_uint(g_value_array_get_nth(args, 1)); time_t touched = g_value_get_uint(g_value_array_get_nth(args, 2)); + IdleMUCChannel *chan; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); idle_connection_emit_queued_aliases_changed(priv->conn); @@ -262,6 +270,7 @@ TpHandle inviter_handle = g_value_get_uint(g_value_array_get_nth(args, 0)); TpHandle invited_handle = g_value_get_uint(g_value_array_get_nth(args, 1)); TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 2)); + IdleMUCChannel *chan; if (invited_handle != priv->conn->parent.self_handle) return IDLE_PARSER_HANDLER_RESULT_HANDLED; @@ -271,7 +280,7 @@ return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); idle_connection_emit_queued_aliases_changed(priv->conn); @@ -289,6 +298,7 @@ IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE(manager); TpHandle joiner_handle = g_value_get_uint(g_value_array_get_nth(args, 0)); TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 1)); + IdleMUCChannel *chan; idle_connection_emit_queued_aliases_changed(priv->conn); @@ -297,7 +307,7 @@ return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); if (!chan) { /* TODO: If we're in "bouncer mode", maybe these should be Requested: @@ -316,13 +326,14 @@ TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 1)); TpHandle kicked_handle = g_value_get_uint(g_value_array_get_nth(args, 2)); const gchar *message = (args->n_values == 4) ? g_value_get_string(g_value_array_get_nth(args, 3)) : NULL; + IdleMUCChannel *chan; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); if (chan) idle_muc_channel_kick(chan, kicked_handle, kicker_handle, message); @@ -333,13 +344,14 @@ static IdleParserHandlerResult _numeric_namereply_handler(IdleParser *parser, IdleParserMessageCode code, GValueArray *args, gpointer user_data) { IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE(user_data); TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 0)); + IdleMUCChannel *chan; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); if (chan) idle_muc_channel_namereply(chan, args); @@ -350,13 +362,14 @@ static IdleParserHandlerResult _numeric_namereply_end_handler(IdleParser *parser, IdleParserMessageCode code, GValueArray *args, gpointer user_data) { IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE(user_data); TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 0)); + IdleMUCChannel *chan; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); if (chan) idle_muc_channel_namereply_end(chan); @@ -367,13 +380,14 @@ static IdleParserHandlerResult _mode_handler(IdleParser *parser, IdleParserMessageCode code, GValueArray *args, gpointer user_data) { IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE(user_data); TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 0)); + IdleMUCChannel *chan; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); if (chan) idle_muc_channel_mode(chan, args); @@ -412,22 +426,22 @@ IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE(manager); TpHandle sender_handle = (TpHandle) g_value_get_uint(g_value_array_get_nth(args, 0)); TpHandle room_handle = (TpHandle) g_value_get_uint(g_value_array_get_nth(args, 1)); + IdleMUCChannel *chan; + TpChannelTextMessageType type; + gchar *body; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); /* XXX: just check for chan == NULL here and bail with NOT_HANDLED if room * was not found ? Currently we go through all of the decoding of the * message, but don't actually deliver the message to a channel if chan is * NULL, and then we return 'HANDLED', which seems wrong */ - TpChannelTextMessageType type; - gchar *body; - if (code == IDLE_PARSER_PREFIXCMD_NOTICE_CHANNEL) { type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE; body = idle_ctcp_kill_blingbling(g_value_get_string(g_value_array_get_nth(args, 2))); @@ -451,13 +465,14 @@ TpHandle leaver_handle = g_value_get_uint(g_value_array_get_nth(args, 0)); TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 1)); const gchar *message = (args->n_values == 3) ? g_value_get_string(g_value_array_get_nth(args, 2)) : NULL; + IdleMUCChannel *chan; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); if (chan) idle_muc_channel_part(chan, leaver_handle, message); @@ -495,13 +510,14 @@ TpHandle room_handle = g_value_get_uint(g_value_array_get_nth(args, 1)); const gchar *topic = (args->n_values == 3) ? g_value_get_string(g_value_array_get_nth(args, 2)) : NULL; time_t stamp = time(NULL); + IdleMUCChannel *chan; if (!priv->channels) { IDLE_DEBUG("Channels hash table missing, ignoring..."); return IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; } - IdleMUCChannel *chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); + chan = g_hash_table_lookup(priv->channels, GUINT_TO_POINTER(room_handle)); if (chan) { if (topic) @@ -527,9 +543,7 @@ return; } - GHashTable *tmp = priv->channels; - priv->channels = NULL; - g_hash_table_destroy(tmp); + tp_clear_pointer (&priv->channels, g_hash_table_destroy); } static void @@ -578,51 +592,50 @@ idle_parser_add_handler(priv->conn->parser, IDLE_PARSER_PREFIXCMD_TOPIC, _topic_handler, manager); } -struct _ForeachHelperData { - TpExportableChannelFunc func; - gpointer user_data; -}; - -static void _foreach_helper(gpointer key, gpointer value, gpointer user_data) { - struct _ForeachHelperData *data = user_data; - data->func(value, data->user_data); -} - -static void _muc_manager_foreach_channel(TpChannelManager *iface, TpExportableChannelFunc func, gpointer user_data) { - IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE(iface); - struct _ForeachHelperData data = {func, user_data}; - - if (!priv->channels) { - IDLE_DEBUG("Channels hash table missing, ignoring..."); - return; - } +static void +_muc_manager_foreach_channel ( + TpChannelManager *iface, + TpExportableChannelFunc func, + gpointer user_data) +{ + IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE (iface); - g_hash_table_foreach(priv->channels, _foreach_helper, &data); + if (priv->channels == NULL) + { + IDLE_DEBUG ("Channels hash table missing, ignoring..."); + } + else + { + GHashTableIter iter; + gpointer v; + + g_hash_table_iter_init (&iter, priv->channels); + while (g_hash_table_iter_next (&iter, NULL, &v)) + func (TP_EXPORTABLE_CHANNEL (v), user_data); + } } static void -_muc_manager_type_foreach_channel_class (GType type, - TpChannelManagerTypeChannelClassFunc func, - gpointer user_data) -{ - GHashTable *table = g_hash_table_new_full (g_str_hash, g_str_equal, - NULL, (GDestroyNotify) tp_g_value_slice_free); - GValue *channel_type_value, *handle_type_value; - - channel_type_value = tp_g_value_slice_new (G_TYPE_STRING); - g_value_set_static_string (channel_type_value, TP_IFACE_CHANNEL_TYPE_TEXT); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType", - channel_type_value); - - handle_type_value = tp_g_value_slice_new (G_TYPE_UINT); - g_value_set_uint (handle_type_value, TP_HANDLE_TYPE_ROOM); - g_hash_table_insert (table, TP_IFACE_CHANNEL ".TargetHandleType", - handle_type_value); +_muc_manager_type_foreach_channel_class ( + GType type, + TpChannelManagerTypeChannelClassFunc func, + gpointer user_data) +{ + static GHashTable *handle_fixed = NULL, *room_name_fixed = NULL; - func (type, table, muc_channel_allowed_properties, - user_data); + if (G_UNLIKELY (handle_fixed == NULL)) + { + handle_fixed = tp_asv_new ( + TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT, + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_ROOM, + NULL); + room_name_fixed = tp_asv_new ( + TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT, + NULL); + } - g_hash_table_destroy (table); + func (type, handle_fixed, muc_channel_allowed_properties, user_data); + func (type, room_name_fixed, muc_channel_allowed_room_properties, user_data); } @@ -669,7 +682,7 @@ * didn't finish before we killed the channel. */ for (GSList *l = reqs; l != NULL; l = l->next) { - tp_channel_manager_emit_request_failed(manager, l->data, TP_ERRORS, + tp_channel_manager_emit_request_failed(manager, l->data, TP_ERROR, TP_ERROR_DISCONNECTED, "Unable to complete this channel request, we're disconnecting!"); } @@ -687,16 +700,16 @@ TpChannelManager *manager = TP_CHANNEL_MANAGER(user_data); IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE(user_data); GSList *reqs = take_request_tokens(user_data, chan); + gint err_code = 0; + const gchar* err_msg = NULL; + TpHandle handle; + GSList *l; if (err == MUC_CHANNEL_JOIN_ERROR_NONE) { tp_channel_manager_emit_new_channel(manager, (TpExportableChannel *) chan, reqs); goto out; } - gint err_code = 0; - const gchar* err_msg = NULL; - TpHandle handle; - g_object_get(chan, "handle", &handle, NULL); switch (err) { @@ -720,8 +733,8 @@ break; } - for (GSList *l = reqs; reqs != NULL; reqs = reqs->next) { - tp_channel_manager_emit_request_failed(manager, l->data, TP_ERRORS, err_code, err_msg); + for (l = reqs; reqs != NULL; reqs = reqs->next) { + tp_channel_manager_emit_request_failed(manager, l->data, TP_ERROR, err_code, err_msg); } if (priv->channels) @@ -731,126 +744,145 @@ g_slist_free (reqs); } - static gboolean -_muc_manager_create_channel (TpChannelManager *manager, - gpointer request_token, - GHashTable *request_properties) +_muc_manager_request ( + IdleMUCManager *self, + gpointer request_token, + GHashTable *request_properties, + gboolean require_new) { - IdleMUCManager *self = IDLE_MUC_MANAGER (manager); + IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE (self); + TpBaseConnection *base_conn = (TpBaseConnection *) priv->conn; + TpHandleRepoIface *room_repo = tp_base_connection_get_handles (base_conn, + TP_HANDLE_TYPE_ROOM); + GError *error = NULL; + TpHandleType handle_type; + TpHandle handle; + const gchar *channel_type; + IdleMUCChannel *channel; + + channel_type = tp_asv_get_string (request_properties, + TP_PROP_CHANNEL_CHANNEL_TYPE); + + if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT)) + return FALSE; + + handle_type = tp_asv_get_uint32 (request_properties, + TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL); + + switch (handle_type) + { + case TP_HANDLE_TYPE_ROOM: + handle = tp_asv_get_uint32 (request_properties, + TP_PROP_CHANNEL_TARGET_HANDLE, NULL); + + if (!tp_handle_is_valid (room_repo, handle, &error)) + goto error; + + break; + + case TP_HANDLE_TYPE_NONE: + { + const gchar *room_name = tp_asv_get_string (request_properties, + TP_PROP_CHANNEL_INTERFACE_ROOM_ROOM_NAME); + + if (room_name == NULL) + return FALSE; + + handle = tp_handle_ensure (room_repo, room_name, NULL, &error); + if (handle == 0) + goto error; + + break; + } + + default: + return FALSE; + } + + if (tp_channel_manager_asv_has_unknown_properties (request_properties, + muc_channel_fixed_properties, muc_channel_all_allowed_properties, + &error)) + goto error; + + channel = g_hash_table_lookup (priv->channels, GINT_TO_POINTER (handle)); + + if (channel != NULL) + { + if (require_new) + { + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, + "That channel has already been created (or requested)"); + goto error; + } + else if (idle_muc_channel_is_ready (channel)) + { + tp_channel_manager_emit_request_already_satisfied (self, + request_token, TP_EXPORTABLE_CHANNEL (channel)); + return TRUE; + } + } + else + { + channel = _muc_manager_new_channel (self, handle, base_conn->self_handle, TRUE); + idle_muc_channel_join_attempt (channel); + } - return _muc_manager_request (self, request_token, request_properties, - TRUE); -} + associate_request (self, channel, request_token); + return TRUE; + +error: + tp_channel_manager_emit_request_failed (self, request_token, + error->domain, error->code, error->message); + g_error_free (error); + return TRUE; +} static gboolean -_muc_manager_request_channel (TpChannelManager *manager, - gpointer request_token, - GHashTable *request_properties) +_muc_manager_create_channel ( + TpChannelManager *manager, + gpointer request_token, + GHashTable *request_properties) { - IdleMUCManager *self = IDLE_MUC_MANAGER (manager); + IdleMUCManager *self = IDLE_MUC_MANAGER (manager); - return _muc_manager_request (self, request_token, request_properties, - FALSE); + return _muc_manager_request (self, request_token, request_properties, TRUE); } - static gboolean -_muc_manager_ensure_channel (TpChannelManager *manager, - gpointer request_token, - GHashTable *request_properties) +_muc_manager_request_channel ( + TpChannelManager *manager, + gpointer request_token, + GHashTable *request_properties) { - IdleMUCManager *self = IDLE_MUC_MANAGER (manager); + IdleMUCManager *self = IDLE_MUC_MANAGER (manager); - return _muc_manager_request (self, request_token, request_properties, - FALSE); + return _muc_manager_request (self, request_token, request_properties, FALSE); } static gboolean -_muc_manager_request (IdleMUCManager *self, - gpointer request_token, - GHashTable *request_properties, - gboolean require_new) -{ - IdleMUCManagerPrivate *priv = IDLE_MUC_MANAGER_GET_PRIVATE (self); - TpBaseConnection *base_conn = (TpBaseConnection *) priv->conn; - TpHandleRepoIface *room_repo = tp_base_connection_get_handles (base_conn, - TP_HANDLE_TYPE_ROOM); - GError *error = NULL; - TpHandle handle; - const gchar *channel_type; - IdleMUCChannel *channel; - - if (tp_asv_get_uint32 (request_properties, - TP_IFACE_CHANNEL ".TargetHandleType", NULL) != TP_HANDLE_TYPE_ROOM) - return FALSE; - - handle = tp_asv_get_uint32 (request_properties, - TP_IFACE_CHANNEL ".TargetHandle", NULL); - - if (!tp_handle_is_valid (room_repo, handle, &error)) - goto error; - - channel_type = tp_asv_get_string (request_properties, - TP_IFACE_CHANNEL ".ChannelType"); - - if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT)) - { - if (tp_channel_manager_asv_has_unknown_properties (request_properties, - muc_channel_fixed_properties, muc_channel_allowed_properties, - &error)) - goto error; - - channel = g_hash_table_lookup (priv->channels, - GINT_TO_POINTER (handle)); - - if (channel != NULL) - { - if (require_new) - { - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, - "That channel has already been created (or requested)"); - goto error; - } - else if (idle_muc_channel_is_ready (channel)) - { - tp_channel_manager_emit_request_already_satisfied (self, - request_token, - TP_EXPORTABLE_CHANNEL (channel)); - return TRUE; - } - } - else - { - channel = _muc_manager_new_channel (self, handle, base_conn->self_handle, TRUE); - idle_muc_channel_join_attempt(channel); - } - - associate_request(self, channel, request_token); - - return TRUE; - } - else - { - return FALSE; - } +_muc_manager_ensure_channel ( + TpChannelManager *manager, + gpointer request_token, + GHashTable *request_properties) +{ + IdleMUCManager *self = IDLE_MUC_MANAGER (manager); -error: - tp_channel_manager_emit_request_failed (self, request_token, - error->domain, error->code, error->message); - g_error_free (error); - return TRUE; + return _muc_manager_request (self, request_token, request_properties, FALSE); } +static void +_muc_manager_iface_init ( + gpointer g_iface, + gpointer iface_data) +{ + TpChannelManagerIface *iface = g_iface; -static void _muc_manager_iface_init(gpointer g_iface, gpointer iface_data) { - TpChannelManagerIface *iface = g_iface; - - iface->foreach_channel = _muc_manager_foreach_channel; - iface->type_foreach_channel_class = _muc_manager_type_foreach_channel_class; - iface->request_channel = _muc_manager_request_channel; - iface->create_channel = _muc_manager_create_channel; - iface->ensure_channel = _muc_manager_ensure_channel; + iface->foreach_channel = _muc_manager_foreach_channel; + iface->type_foreach_channel_class = _muc_manager_type_foreach_channel_class; + iface->request_channel = _muc_manager_request_channel; + iface->create_channel = _muc_manager_create_channel; + iface->ensure_channel = _muc_manager_ensure_channel; } diff -Nru telepathy-idle-0.1.11/src/idle-muc-manager.h telepathy-idle-0.1.12/src/idle-muc-manager.h --- telepathy-idle-0.1.11/src/idle-muc-manager.h 2009-11-05 12:25:18.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-muc-manager.h 2012-06-14 14:52:47.000000000 +0000 @@ -36,7 +36,7 @@ GObject parent; }; -GType idle_muc_manager_get_type(); +GType idle_muc_manager_get_type (void); #define IDLE_TYPE_MUC_MANAGER (idle_muc_manager_get_type()) #define IDLE_MUC_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), IDLE_TYPE_MUC_MANAGER, IdleMUCManager)) diff -Nru telepathy-idle-0.1.11/src/idle-parser.c telepathy-idle-0.1.12/src/idle-parser.c --- telepathy-idle-0.1.11/src/idle-parser.c 2011-10-03 17:04:20.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-parser.c 2012-07-17 16:34:17.000000000 +0000 @@ -21,8 +21,8 @@ /* For strnlen(), which is a GNU extension. */ #define _GNU_SOURCE -#include "idle-parser.h" #include "config.h" +#include "idle-parser.h" #include "idle-connection.h" #include "idle-muc-channel.h" @@ -180,10 +180,10 @@ int i; for (i = 0; i < IDLE_PARSER_LAST_MESSAGE_CODE; i++) { - GSList *link; + GSList *link_; - for (link = priv->handlers[i]; link != NULL; link = link->next) - g_slice_free(MessageHandlerClosure, link->data); + for (link_ = priv->handlers[i]; link_ != NULL; link_ = link_->next) + g_slice_free(MessageHandlerClosure, link_->data); g_slist_free(priv->handlers[i]); } @@ -297,10 +297,10 @@ int i; for (i = 0; i < IDLE_PARSER_LAST_MESSAGE_CODE; i++) { - GSList *link; + GSList *link_; - while ((link = g_slist_find_custom(priv->handlers[i], user_data, _message_handler_closure_user_data_compare))) - priv->handlers[i] = g_slist_remove_link(priv->handlers[i], link); + while ((link_ = g_slist_find_custom(priv->handlers[i], user_data, _message_handler_closure_user_data_compare))) + priv->handlers[i] = g_slist_remove_link(priv->handlers[i], link_); } } @@ -365,7 +365,7 @@ static void _parse_and_forward_one(IdleParser *parser, gchar **tokens, IdleParserMessageCode code, const gchar *format) { IdleParserPrivate *priv = IDLE_PARSER_GET_PRIVATE(parser); GValueArray *args = g_value_array_new(3); - GSList *link = priv->handlers[code]; + GSList *link_ = priv->handlers[code]; IdleParserHandlerResult result = IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED; gboolean success = TRUE; gchar **iter = tokens; @@ -389,23 +389,41 @@ iter += 2; } } else if ((*format == ':') || (*format == '.')) { - /* Because of the way things are tokenized, if there is a space - * immediately after the the ':', the current token will only be - * ":", so we check that iter[1][1] is non-NULL rather than checking - * iter[0][1] (since iter[0] is a NULL-terminated token string - * whereas iter[1] is a pointer into the full message string + /* Assume the happy case of the trailing parameter starting after the : + * in the trailing string as the RFC intended */ + const gchar *trailing = iter[1] + 1; + + /* Some IRC proxies *cough* bip *cough* omit the : in the trailing + * parameter if that parameter is just one word, to cope with that check + * if there are no more tokens after the current one and if so, accept a + * trailing string without the : prefix. */ + if (iter[0][0] != ':') { + if (iter[2] == NULL) { + trailing = iter[1]; + } else { + success = FALSE; + break; + } + } + + /* + * because of the way things are tokenized, if there is a + * space immediately after the the ':', the current token will only be + * ":", so we check that the trailing string is non-NULL rather than + * checking iter[0][1] (since iter[0] is a NULL-terminated token string + * whereas trailing is a pointer into the full message string */ - if ((iter[0][0] != ':') || (iter[1][1] == '\0')) { + if (trailing[0] == '\0') { success = FALSE; break; } g_value_init(&val, G_TYPE_STRING); - g_value_set_string(&val, iter[1] + 1); + g_value_set_string(&val, trailing); g_value_array_append(args, &val); g_value_unset(&val); - IDLE_DEBUG("set string \"%s\"", iter[1] + 1); + IDLE_DEBUG("set string \"%s\"", trailing); } else { if (!_parse_atom(parser, args, *format, iter[0], contact_reffed, room_reffed)) { success = FALSE; @@ -431,18 +449,18 @@ IDLE_DEBUG("successfully parsed"); - while (link) { - MessageHandlerClosure *closure = link->data; + while (link_) { + MessageHandlerClosure *closure = link_->data; result = closure->handler(parser, code, args, closure->user_data); if (result == IDLE_PARSER_HANDLER_RESULT_NOT_HANDLED) { - link = link->next; + link_ = link_->next; } else if (result == IDLE_PARSER_HANDLER_RESULT_HANDLED) { break; } else if (result == IDLE_PARSER_HANDLER_RESULT_NO_MORE_PLEASE) { - GSList *tmp = link->next; + GSList *tmp = link_->next; g_free(closure); - priv->handlers[code] = g_slist_remove_link(priv->handlers[code], link); - link = tmp; + priv->handlers[code] = g_slist_remove_link(priv->handlers[code], link_); + link_ = tmp; } else { g_assert_not_reached(); } @@ -496,12 +514,10 @@ if (atom == 'r') { if ((handle = tp_handle_ensure(room_repo, id, NULL, NULL))) { tp_handle_set_add(room_reffed, handle); - tp_handle_unref(room_repo, handle); } } else { if ((handle = tp_handle_ensure(contact_repo, id, NULL, NULL))) { tp_handle_set_add(contact_reffed, handle); - tp_handle_unref(contact_repo, handle); idle_connection_canon_nick_receive(priv->conn, handle, id); } @@ -521,7 +537,11 @@ if (atom == 'C') { g_value_init(&val, G_TYPE_CHAR); +#if GLIB_CHECK_VERSION(2, 31, 0) + g_value_set_schar(&val, modechar); +#else g_value_set_char(&val, modechar); +#endif g_value_array_append(arr, &val); g_value_unset(&val); diff -Nru telepathy-idle-0.1.11/src/idle-server-connection.c telepathy-idle-0.1.12/src/idle-server-connection.c --- telepathy-idle-0.1.11/src/idle-server-connection.c 2011-10-12 10:51:18.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-server-connection.c 2012-07-17 16:34:17.000000000 +0000 @@ -31,7 +31,6 @@ #define IDLE_DEBUG_FLAG IDLE_DEBUG_NETWORK #include "idle-connection.h" #include "idle-debug.h" -#include "idle-server-connection-signals-marshal.h" typedef struct _IdleServerConnectionPrivate IdleServerConnectionPrivate; @@ -188,7 +187,7 @@ G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, 0, NULL, NULL, - idle_server_connection_marshal_VOID__UINT_UINT, + g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); signals[RECEIVED] = g_signal_new("received", @@ -224,14 +223,21 @@ GInputStream *input_stream = G_INPUT_STREAM(source_object); IdleServerConnection *conn = IDLE_SERVER_CONNECTION(user_data); IdleServerConnectionPrivate *priv = IDLE_SERVER_CONNECTION_GET_PRIVATE(conn); + gssize ret; GError *error = NULL; if (priv->io_stream == NULL) /* ie. we are in the process of disconnecting */ goto cleanup; - if (g_input_stream_read_finish(input_stream, res, &error) == -1) { + + ret = g_input_stream_read_finish(input_stream, res, &error); + + if (ret == -1) { IDLE_DEBUG("g_input_stream_read failed: %s", error->message); g_error_free(error); goto disconnect; + } else if (ret == 0) { + IDLE_DEBUG("g_input_stream_read returned end-of-file"); + goto disconnect; } g_signal_emit(conn, signals[RECEIVED], 0, priv->input_buffer); @@ -252,7 +258,7 @@ IdleServerConnection *conn = IDLE_SERVER_CONNECTION(g_async_result_get_source_object(G_ASYNC_RESULT(result))); IdleServerConnectionPrivate *priv = IDLE_SERVER_CONNECTION_GET_PRIVATE(conn); GInputStream *input_stream; - GSocket *socket; + GSocket *socket_; GSocketConnection *socket_connection; gint nodelay = 1; gint socket_fd; @@ -261,17 +267,17 @@ socket_connection = g_socket_client_connect_to_host_finish(socket_client, res, &error); if (socket_connection == NULL) { IDLE_DEBUG("g_socket_client_connect_to_host failed: %s", error->message); - g_simple_async_result_set_error(result, TP_ERRORS, TP_ERROR_NETWORK_ERROR, "%s", error->message); + g_simple_async_result_set_error(result, TP_ERROR, TP_ERROR_NETWORK_ERROR, "%s", error->message); g_error_free(error); change_state(conn, SERVER_CONNECTION_STATE_NOT_CONNECTED, SERVER_CONNECTION_STATE_REASON_ERROR); g_object_unref(conn); goto cleanup; } - socket = g_socket_connection_get_socket(socket_connection); - g_socket_set_keepalive(socket, TRUE); + socket_ = g_socket_connection_get_socket(socket_connection); + g_socket_set_keepalive(socket_, TRUE); - socket_fd = g_socket_get_fd(socket); + socket_fd = g_socket_get_fd(socket_); setsockopt(socket_fd, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay)); g_tcp_connection_set_graceful_disconnect(G_TCP_CONNECTION(socket_connection), TRUE); @@ -295,7 +301,7 @@ IDLE_DEBUG("already connecting or connected!"); g_simple_async_report_error_in_idle(G_OBJECT(conn), callback, user_data, - TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + TP_ERROR, TP_ERROR_NOT_AVAILABLE, "already connecting or connected!"); return; } @@ -304,7 +310,7 @@ IDLE_DEBUG("host not set!"); g_simple_async_report_error_in_idle(G_OBJECT(conn), callback, user_data, - TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + TP_ERROR, TP_ERROR_NOT_AVAILABLE, "host not set!"); return; } @@ -313,7 +319,7 @@ IDLE_DEBUG("port not set!"); g_simple_async_report_error_in_idle(G_OBJECT(conn), callback, user_data, - TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + TP_ERROR, TP_ERROR_NOT_AVAILABLE, "port not set!"); return; } @@ -340,7 +346,7 @@ if (!g_io_stream_close_finish(io_stream, res, &error)) { IDLE_DEBUG("g_io_stream_close failed: %s", error->message); - g_simple_async_result_set_error(result, TP_ERRORS, TP_ERROR_NETWORK_ERROR, "%s", error->message); + g_simple_async_result_set_error(result, TP_ERROR, TP_ERROR_NETWORK_ERROR, "%s", error->message); g_error_free(error); } @@ -366,11 +372,20 @@ IDLE_DEBUG("the connection was not open"); g_simple_async_report_error_in_idle(G_OBJECT(conn), callback, user_data, - TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + TP_ERROR, TP_ERROR_NOT_AVAILABLE, "the connection was not open"); return; } + if (priv->io_stream == NULL) { + IDLE_DEBUG("We were exploding anyway"); + g_simple_async_report_error_in_idle(G_OBJECT(conn), + callback, user_data, + TP_ERROR, TP_ERROR_NOT_AVAILABLE, + "We were exploding anyway"); + return; + } + priv->reason = reason; result = g_simple_async_result_new(G_OBJECT(conn), callback, user_data, idle_server_connection_disconnect_full_async); @@ -397,7 +412,7 @@ nwrite = g_output_stream_write_finish(output_stream, res, &error); if (nwrite == -1) { IDLE_DEBUG("g_output_stream_write failed : %s", error->message); - g_simple_async_result_set_error(result, TP_ERRORS, TP_ERROR_NETWORK_ERROR, "%s", error->message); + g_simple_async_result_set_error(result, TP_ERROR, TP_ERROR_NETWORK_ERROR, "%s", error->message); g_error_free(error); goto cleanup; } @@ -423,11 +438,12 @@ GSimpleAsyncResult *result; gsize output_buffer_size = sizeof(priv->output_buffer); - if (priv->state != SERVER_CONNECTION_STATE_CONNECTED) { + if (priv->state != SERVER_CONNECTION_STATE_CONNECTED + || priv->io_stream == NULL) { IDLE_DEBUG("connection was not open!"); g_simple_async_report_error_in_idle(G_OBJECT(conn), callback, user_data, - TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + TP_ERROR, TP_ERROR_NOT_AVAILABLE, "connection was not open!"); return; } @@ -457,7 +473,9 @@ } gboolean idle_server_connection_send_finish(IdleServerConnection *conn, GAsyncResult *result, GError **error) { - g_return_val_if_fail(g_simple_async_result_is_valid(result, G_OBJECT(conn), idle_server_connection_send_async), FALSE); + /* we can't check the source tag here because we use + * report_error_in_idle which never sets a source tag */ + g_return_val_if_fail(g_simple_async_result_is_valid(result, G_OBJECT(conn), NULL), FALSE); return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT(result), error); } diff -Nru telepathy-idle-0.1.11/src/idle-server-connection-signals-marshal.list telepathy-idle-0.1.12/src/idle-server-connection-signals-marshal.list --- telepathy-idle-0.1.11/src/idle-server-connection-signals-marshal.list 2011-10-12 10:51:18.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-server-connection-signals-marshal.list 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -VOID:UINT,UINT diff -Nru telepathy-idle-0.1.11/src/idle-text.c telepathy-idle-0.1.12/src/idle-text.c --- telepathy-idle-0.1.11/src/idle-text.c 2011-05-10 12:02:12.000000000 +0000 +++ telepathy-idle-0.1.12/src/idle-text.c 2012-06-14 14:52:47.000000000 +0000 @@ -95,7 +95,7 @@ break; default: IDLE_DEBUG("unsupported message type %u", type); - g_set_error(error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, "unsupported message type %u", type); + g_set_error(error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "unsupported message type %u", type); return NULL; } @@ -159,11 +159,13 @@ guint n_parts; GStrv messages; GStrv bodies; + gsize msg_len; + guint i; #define INVALID_ARGUMENT(msg, ...) \ G_STMT_START { \ IDLE_DEBUG (msg , ## __VA_ARGS__); \ - g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, \ + g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, \ msg , ## __VA_ARGS__); \ goto failed; \ } G_STMT_END @@ -198,12 +200,12 @@ /* Okay, it's valid. Let's send it. */ - gsize msg_len = idle_connection_get_max_message_length(conn); + msg_len = idle_connection_get_max_message_length(conn); messages = idle_text_encode_and_split(type, recipient, text, msg_len, &bodies, &error); if (messages == NULL) goto failed; - for(guint i = 0; messages[i] != NULL; i++) { + for(i = 0; messages[i] != NULL; i++) { g_assert(bodies[i] != NULL); idle_connection_send(conn, messages[i]); } diff -Nru telepathy-idle-0.1.11/src/Makefile.am telepathy-idle-0.1.12/src/Makefile.am --- telepathy-idle-0.1.11/src/Makefile.am 2011-10-12 10:51:18.000000000 +0000 +++ telepathy-idle-0.1.12/src/Makefile.am 2012-06-14 14:52:47.000000000 +0000 @@ -1,7 +1,3 @@ -BUILT_SOURCES = \ - idle-server-connection-signals-marshal.h \ - idle-server-connection-signals-marshal.c - # correctly clean the generated source files CLEANFILES = $(BUILT_SOURCES) $(man_MANS) @@ -28,6 +24,8 @@ idle-muc-channel.h \ idle-muc-manager.c \ idle-muc-manager.h \ + room-config.c \ + room-config.h \ idle-parser.c \ idle-parser.h \ protocol.c \ @@ -36,7 +34,7 @@ idle-server-connection.h \ idle-text.h \ idle-text.c \ - idle-server-connection-signals-marshal.list + $(NULL) nodist_libidle_convenience_la_SOURCES = \ $(BUILT_SOURCES) @@ -63,24 +61,16 @@ @TELEPATHY_CFLAGS@ \ -std=c99 +AM_LDFLAGS = \ + $(ERROR_LDFLAGS) \ + $(NULL) + ALL_LIBS = \ @DBUS_LIBS@ \ @GLIB_LIBS@ \ @OPENSSL_LIBS@ \ @TELEPATHY_LIBS@ -%-signals-marshal.h: %-signals-marshal.list Makefile - $(AM_V_GEN)glib-genmarshal --header --prefix=$(subst -,_,$*)_marshal $< > $*-signals-marshal.h - -%-signals-marshal.c: %-signals-marshal.list Makefile - $(AM_V_GEN)glib-genmarshal --body --prefix=$(subst -,_,$*)_marshal $< > $*-signals-marshal.c - -%-marshal.h: %-marshal.list Makefile - $(AM_V_GEN)glib-genmarshal --header --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.h - -%-marshal.c: %-marshal.list Makefile - $(AM_V_GEN)glib-genmarshal --body --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.c - man_MANS = telepathy-idle.8 EXTRA_DIST = telepathy-idle.8.in diff -Nru telepathy-idle-0.1.11/src/Makefile.in telepathy-idle-0.1.12/src/Makefile.in --- telepathy-idle-0.1.11/src/Makefile.in 2011-10-28 17:11:32.000000000 +0000 +++ telepathy-idle-0.1.12/src/Makefile.in 2012-08-02 13:03:04.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -40,10 +57,12 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/tp-compiler-flag.m4 \ + $(top_srcdir)/m4/tp-compiler-warnings.m4 \ + $(top_srcdir)/m4/tp-linker-flag.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -57,14 +76,13 @@ idle-connection-manager.lo idle-contact-info.lo idle-ctcp.lo \ idle-debug.lo idle-handles.lo idle-im-channel.lo \ idle-im-manager.lo idle-muc-channel.lo idle-muc-manager.lo \ - idle-parser.lo protocol.lo idle-server-connection.lo \ - idle-text.lo -am__objects_1 = idle-server-connection-signals-marshal.lo -nodist_libidle_convenience_la_OBJECTS = $(am__objects_1) + room-config.lo idle-parser.lo protocol.lo \ + idle-server-connection.lo idle-text.lo +nodist_libidle_convenience_la_OBJECTS = libidle_convenience_la_OBJECTS = $(am_libidle_convenience_la_OBJECTS) \ $(nodist_libidle_convenience_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__installdirs = "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man8dir)" PROGRAMS = $(libexec_PROGRAMS) @@ -83,27 +101,32 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libidle_convenience_la_SOURCES) \ $(nodist_libidle_convenience_la_SOURCES) \ $(telepathy_idle_SOURCES) DIST_SOURCES = $(libidle_convenience_la_SOURCES) \ $(telepathy_idle_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -125,6 +148,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) @@ -165,7 +194,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -274,10 +302,6 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -BUILT_SOURCES = \ - idle-server-connection-signals-marshal.h \ - idle-server-connection-signals-marshal.c - # correctly clean the generated source files CLEANFILES = $(BUILT_SOURCES) $(man_MANS) @@ -302,6 +326,8 @@ idle-muc-channel.h \ idle-muc-manager.c \ idle-muc-manager.h \ + room-config.c \ + room-config.h \ idle-parser.c \ idle-parser.h \ protocol.c \ @@ -310,7 +336,7 @@ idle-server-connection.h \ idle-text.h \ idle-text.c \ - idle-server-connection-signals-marshal.list + $(NULL) nodist_libidle_convenience_la_SOURCES = \ $(BUILT_SOURCES) @@ -336,6 +362,10 @@ @TELEPATHY_CFLAGS@ \ -std=c99 +AM_LDFLAGS = \ + $(ERROR_LDFLAGS) \ + $(NULL) + ALL_LIBS = \ @DBUS_LIBS@ \ @GLIB_LIBS@ \ @@ -344,8 +374,7 @@ man_MANS = telepathy-idle.8 EXTRA_DIST = telepathy-idle.8.in -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am +all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -388,12 +417,15 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libidle-convenience.la: $(libidle_convenience_la_OBJECTS) $(libidle_convenience_la_DEPENDENCIES) +libidle-convenience.la: $(libidle_convenience_la_OBJECTS) $(libidle_convenience_la_DEPENDENCIES) $(EXTRA_libidle_convenience_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libidle_convenience_la_OBJECTS) $(libidle_convenience_la_LIBADD) $(LIBS) install-libexecPROGRAMS: $(libexec_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)" @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -433,7 +465,7 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -telepathy-idle$(EXEEXT): $(telepathy_idle_OBJECTS) $(telepathy_idle_DEPENDENCIES) +telepathy-idle$(EXEEXT): $(telepathy_idle_OBJECTS) $(telepathy_idle_DEPENDENCIES) $(EXTRA_telepathy_idle_DEPENDENCIES) @rm -f telepathy-idle$(EXEEXT) $(AM_V_CCLD)$(LINK) $(telepathy_idle_OBJECTS) $(telepathy_idle_LDADD) $(LIBS) @@ -454,35 +486,32 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle-muc-channel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle-muc-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle-parser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle-server-connection-signals-marshal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle-server-connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle-text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/room-config.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -491,11 +520,18 @@ -rm -rf .libs _libs install-man8: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)" - @list=''; test -n "$(man8dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.8[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man8dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.8[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -524,9 +560,7 @@ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -624,15 +658,13 @@ fi; \ done check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am +check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(man8dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am +install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -642,10 +674,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -658,7 +695,6 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \ @@ -732,7 +768,7 @@ uninstall-man: uninstall-man8 -.MAKE: all check install install-am install-strip +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libexecPROGRAMS clean-libtool clean-noinstLTLIBRARIES \ @@ -751,18 +787,6 @@ uninstall-man8 -%-signals-marshal.h: %-signals-marshal.list Makefile - $(AM_V_GEN)glib-genmarshal --header --prefix=$(subst -,_,$*)_marshal $< > $*-signals-marshal.h - -%-signals-marshal.c: %-signals-marshal.list Makefile - $(AM_V_GEN)glib-genmarshal --body --prefix=$(subst -,_,$*)_marshal $< > $*-signals-marshal.c - -%-marshal.h: %-marshal.list Makefile - $(AM_V_GEN)glib-genmarshal --header --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.h - -%-marshal.c: %-marshal.list Makefile - $(AM_V_GEN)glib-genmarshal --body --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.c - %.8: %.8.in Makefile $(AM_V_GEN)sed -e 's,[@]libexecdir[@],@libexecdir@,' < $< > $@ diff -Nru telepathy-idle-0.1.11/src/protocol.c telepathy-idle-0.1.12/src/protocol.c --- telepathy-idle-0.1.11/src/protocol.c 2011-04-22 11:29:16.000000000 +0000 +++ telepathy-idle-0.1.12/src/protocol.c 2012-06-14 14:52:47.000000000 +0000 @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "config.h" + #include "protocol.h" #include @@ -38,7 +40,7 @@ G_DEFINE_TYPE (IdleProtocol, idle_protocol, TP_TYPE_BASE_PROTOCOL) -gboolean +static gboolean filter_nick (const TpCMParamSpec *paramspec, GValue *value, GError **error) @@ -50,7 +52,7 @@ if (!idle_nickname_is_valid (nick, TRUE)) { - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE, "Invalid account name '%s'", nick); return FALSE; } @@ -77,7 +79,7 @@ if (ch == '\0' || ch == '\n' || ch == '\r' || ch == ' ' || ch == '@') { - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "Invalid user name '%s'", username); return FALSE; } diff -Nru telepathy-idle-0.1.11/src/room-config.c telepathy-idle-0.1.12/src/room-config.c --- telepathy-idle-0.1.11/src/room-config.c 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.12/src/room-config.c 2012-06-14 14:52:47.000000000 +0000 @@ -0,0 +1,292 @@ +/* + * room-config.c - Channel.Interface.RoomConfig1 implementation + * Copyright © 2011-2012 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "room-config.h" +#include "idle-muc-channel.h" + +#include + +#define IDLE_DEBUG_FLAG IDLE_DEBUG_MUC +#include "idle-debug.h" + +static void idle_room_config_update_configuration_async ( + TpBaseRoomConfig *base_config, + GHashTable *validated_properties, + GAsyncReadyCallback callback, + gpointer user_data); + +struct _IdleRoomConfigPrivate { + gpointer hi_dere; +}; + +G_DEFINE_TYPE (IdleRoomConfig, idle_room_config, TP_TYPE_BASE_ROOM_CONFIG) + +static void +idle_room_config_password_protected_cb (GObject *object, + GParamSpec *pspec, + gpointer user_data) +{ + gboolean protected; + + g_object_get (object, + "password-protected", &protected, + NULL); + + if (!protected) + { + g_object_set (object, + "password", "", + NULL); + } +} + +static void +idle_room_config_init (IdleRoomConfig *self) +{ + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, IDLE_TYPE_ROOM_CONFIG, + IdleRoomConfigPrivate); +} + +static void +idle_room_config_constructed (GObject *object) +{ + TpBaseRoomConfig *self = TP_BASE_ROOM_CONFIG (object); + static const TpBaseRoomConfigProperty prop_helper[] = { + TP_BASE_ROOM_CONFIG_INVITE_ONLY, + TP_BASE_ROOM_CONFIG_LIMIT, + TP_BASE_ROOM_CONFIG_MODERATED, + TP_BASE_ROOM_CONFIG_PASSWORD, + TP_BASE_ROOM_CONFIG_PASSWORD_PROTECTED, + TP_BASE_ROOM_CONFIG_PRIVATE, + }; + guint i; + void (*chain_up)(GObject *) = + G_OBJECT_CLASS (idle_room_config_parent_class)->constructed; + + if (chain_up != NULL) + chain_up (object); + + for (i = 0; i < G_N_ELEMENTS (prop_helper); ++i) + { + tp_base_room_config_set_property_mutable (self, prop_helper[i], TRUE); + } + + /* Just to get the mutable properties out there. */ + tp_base_room_config_emit_properties_changed (self); + + /* Let's reset the password back to the empty string when + * password-protected is set to False. */ + g_signal_connect (self, "notify::password-protected", + G_CALLBACK (idle_room_config_password_protected_cb), NULL); +} + +static void +idle_room_config_class_init (IdleRoomConfigClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + TpBaseRoomConfigClass *parent_class = TP_BASE_ROOM_CONFIG_CLASS (klass); + + object_class->constructed = idle_room_config_constructed; + + parent_class->update_async = idle_room_config_update_configuration_async; + g_type_class_add_private (klass, sizeof (IdleRoomConfigPrivate)); +} + +IdleRoomConfig * +idle_room_config_new ( + TpBaseChannel *channel) +{ + g_return_val_if_fail (TP_IS_BASE_CHANNEL (channel), NULL); + + return g_object_new (IDLE_TYPE_ROOM_CONFIG, + "channel", channel, + NULL); +} + +static void +send_mode (IdleRoomConfig *self, + const gchar *cmd) +{ + TpBaseChannel *channel; + TpBaseConnection *connection; + gchar *s, *target_id; + + channel = tp_base_room_config_dup_channel ((TpBaseRoomConfig *) self); + g_object_get (channel, + "target-id", &target_id, + NULL); + + connection = tp_base_channel_get_connection (channel); + + s = g_strdup_printf ("MODE %s %s", target_id, cmd); + idle_connection_send (IDLE_CONNECTION (connection), s); + g_free (s); + + g_free (target_id); + g_object_unref (channel); +} + +static void +do_quick_boolean (IdleRoomConfig *self, + GHashTable *properties, + TpBaseRoomConfigProperty prop_id, + const gchar *gobject_property_name, + const gchar irc_mode) +{ + if (g_hash_table_lookup (properties, GUINT_TO_POINTER (prop_id)) != NULL) + { + gboolean new_value = tp_asv_get_boolean (properties, + GUINT_TO_POINTER (prop_id), NULL); + gboolean current_value; + + g_object_get (self, + gobject_property_name, ¤t_value, + NULL); + + if (current_value != new_value) + { + gchar *cmd = g_strdup_printf ("%c%c", + new_value ? '+' : '-', irc_mode); + send_mode (self, cmd); + g_free (cmd); + } + } +} + +static void +idle_room_config_update_configuration_async ( + TpBaseRoomConfig *base_config, + GHashTable *validated_properties, + GAsyncReadyCallback callback, + gpointer user_data) +{ + IdleRoomConfig *self = IDLE_ROOM_CONFIG (base_config); + GSimpleAsyncResult *result = g_simple_async_result_new ((GObject *) self, + callback, user_data, idle_room_config_update_configuration_async); + gboolean present = FALSE; + gboolean password_protected = FALSE; + const gchar *password = NULL; + + password_protected = tp_asv_get_boolean (validated_properties, + GUINT_TO_POINTER (TP_BASE_ROOM_CONFIG_PASSWORD_PROTECTED), &present); + password = tp_asv_get_string (validated_properties, + GUINT_TO_POINTER (TP_BASE_ROOM_CONFIG_PASSWORD)); + + /* first, do sanity checking for Password & PasswordProtected */ + if (password_protected && tp_str_empty (password)) + { + g_simple_async_result_set_error (result, TP_ERROR, + TP_ERROR_INVALID_ARGUMENT, + "PasswordProtected=True but no password given"); + g_simple_async_result_complete_in_idle (result); + g_object_unref (result); + return; + } + + /* TODO: We shouldn't return from this function before we've had our + * commands acked back to us from the server, but that's harder and + * we'd have to add some queueing code which is a faff. We should + * really do this though... + * + * http://i.imgur.com/FIOwY.jpg + */ + + if (!password_protected && present && password != NULL) + { + g_simple_async_result_set_error (result, TP_ERROR, + TP_ERROR_INVALID_ARGUMENT, + "PasswordProtected=False but then a password given, madness!"); + g_simple_async_result_complete_in_idle (result); + g_object_unref (result); + return; + } + + /* okay go and do the quick ones */ + do_quick_boolean (self, validated_properties, + TP_BASE_ROOM_CONFIG_INVITE_ONLY, "invite-only", 'i'); + do_quick_boolean (self, validated_properties, + TP_BASE_ROOM_CONFIG_MODERATED, "moderated", 'm'); + do_quick_boolean (self, validated_properties, + TP_BASE_ROOM_CONFIG_PRIVATE, "private", 's'); + + /* now the rest */ + + /* limit */ + if (g_hash_table_lookup (validated_properties, + GUINT_TO_POINTER (TP_BASE_ROOM_CONFIG_LIMIT)) != NULL) + { + guint limit = tp_asv_get_uint32 (validated_properties, + GUINT_TO_POINTER (TP_BASE_ROOM_CONFIG_LIMIT), NULL); + gchar *cmd = NULL; + guint current; + + g_object_get (self, + "limit", ¤t, + NULL); + + if (limit != current) + { + /* a non-zero limit means we want a limit enabled, so let's + * set it. if the limit is zero let's disable the limit. */ + if (limit > 0) + cmd = g_strdup_printf ("+l %u", limit); + else + cmd = g_strdup ("-l"); + } + + if (cmd != NULL) + send_mode (self, cmd); + g_free (cmd); + } + + /* set a new password */ + if (password != NULL) + { + gchar *cmd; + + /* we've already validated this; either PasswordProtected was + * not included, or it's TRUE */ + + cmd = g_strdup_printf ("+k %s", password); + send_mode (self, cmd); + g_free (cmd); + + /* TODO: this can be removed when we add queueing to these mode + * changes */ + g_object_set (self, + "password-protected", TRUE, + NULL); + } + + /* unset a password */ + if (!password_protected && present) + { + gchar *cmd; + + /* we've already validated this; PasswordProtected=FALSE so no + * Password is given */ + + cmd = g_strdup ("-k"); + send_mode (self, cmd); + g_free (cmd); + } + + g_simple_async_result_complete_in_idle (result); + g_object_unref (result); +} diff -Nru telepathy-idle-0.1.11/src/room-config.h telepathy-idle-0.1.12/src/room-config.h --- telepathy-idle-0.1.11/src/room-config.h 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.12/src/room-config.h 2012-06-14 14:52:47.000000000 +0000 @@ -0,0 +1,61 @@ +/* + * room-config.h - header for Channel.I.RoomConfig1 implementation + * Copyright © 2011-2012 Collabora Ltd. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef IDLE_ROOM_CONFIG_H +#define IDLE_ROOM_CONFIG_H + +#include +#include + +typedef struct _IdleRoomConfig IdleRoomConfig; +typedef struct _IdleRoomConfigClass IdleRoomConfigClass; +typedef struct _IdleRoomConfigPrivate IdleRoomConfigPrivate; + +struct _IdleRoomConfigClass { + TpBaseRoomConfigClass parent_class; +}; + +struct _IdleRoomConfig { + TpBaseRoomConfig parent; + + IdleRoomConfigPrivate *priv; +}; + +IdleRoomConfig *idle_room_config_new ( + TpBaseChannel *channel); + +/* TYPE MACROS */ +GType idle_room_config_get_type (void); + +#define IDLE_TYPE_ROOM_CONFIG \ + (idle_room_config_get_type ()) +#define IDLE_ROOM_CONFIG(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), IDLE_TYPE_ROOM_CONFIG, IdleRoomConfig)) +#define IDLE_ROOM_CONFIG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), IDLE_TYPE_ROOM_CONFIG,\ + IdleRoomConfigClass)) +#define IDLE_IS_ROOM_CONFIG(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), IDLE_TYPE_ROOM_CONFIG)) +#define IDLE_IS_ROOM_CONFIG_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), IDLE_TYPE_ROOM_CONFIG)) +#define IDLE_ROOM_CONFIG_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), IDLE_TYPE_ROOM_CONFIG, \ + IdleRoomConfigClass)) + +#endif /* IDLE_ROOM_CONFIG_H */ diff -Nru telepathy-idle-0.1.11/tests/Makefile.am telepathy-idle-0.1.12/tests/Makefile.am --- telepathy-idle-0.1.11/tests/Makefile.am 2009-03-27 23:24:50.000000000 +0000 +++ telepathy-idle-0.1.12/tests/Makefile.am 2012-06-14 14:52:47.000000000 +0000 @@ -24,6 +24,10 @@ @TELEPATHY_CFLAGS@ \ @OPENSSL_CFLAGS@ +AM_LDFLAGS = \ + $(ERROR_LDFLAGS) \ + $(NULL) + ALL_LIBS = \ @DBUS_LIBS@ \ @GLIB_LIBS@ \ diff -Nru telepathy-idle-0.1.11/tests/Makefile.in telepathy-idle-0.1.12/tests/Makefile.in --- telepathy-idle-0.1.11/tests/Makefile.in 2011-10-28 17:11:32.000000000 +0000 +++ telepathy-idle-0.1.12/tests/Makefile.in 2012-08-02 13:03:04.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -40,10 +57,12 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/tp-compiler-flag.m4 \ + $(top_srcdir)/m4/tp-compiler-warnings.m4 \ + $(top_srcdir)/m4/tp-linker-flag.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -57,8 +76,8 @@ test_ctcp_kill_blingbling_DEPENDENCIES = \ $(top_builddir)/src/libidle-convenience.la \ $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent test_ctcp_tokenize_SOURCES = test-ctcp-tokenize.c test_ctcp_tokenize_OBJECTS = test-ctcp-tokenize.$(OBJEXT) @@ -81,21 +100,21 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = test-ctcp-kill-blingbling.c test-ctcp-tokenize.c \ test-text-encode-and-split.c @@ -108,6 +127,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -178,7 +202,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -308,6 +331,10 @@ @TELEPATHY_CFLAGS@ \ @OPENSSL_CFLAGS@ +AM_LDFLAGS = \ + $(ERROR_LDFLAGS) \ + $(NULL) + ALL_LIBS = \ @DBUS_LIBS@ \ @GLIB_LIBS@ \ @@ -359,13 +386,13 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -test-ctcp-kill-blingbling$(EXEEXT): $(test_ctcp_kill_blingbling_OBJECTS) $(test_ctcp_kill_blingbling_DEPENDENCIES) +test-ctcp-kill-blingbling$(EXEEXT): $(test_ctcp_kill_blingbling_OBJECTS) $(test_ctcp_kill_blingbling_DEPENDENCIES) $(EXTRA_test_ctcp_kill_blingbling_DEPENDENCIES) @rm -f test-ctcp-kill-blingbling$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ctcp_kill_blingbling_OBJECTS) $(test_ctcp_kill_blingbling_LDADD) $(LIBS) -test-ctcp-tokenize$(EXEEXT): $(test_ctcp_tokenize_OBJECTS) $(test_ctcp_tokenize_DEPENDENCIES) +test-ctcp-tokenize$(EXEEXT): $(test_ctcp_tokenize_OBJECTS) $(test_ctcp_tokenize_DEPENDENCIES) $(EXTRA_test_ctcp_tokenize_DEPENDENCIES) @rm -f test-ctcp-tokenize$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ctcp_tokenize_OBJECTS) $(test_ctcp_tokenize_LDADD) $(LIBS) -test-text-encode-and-split$(EXEEXT): $(test_text_encode_and_split_OBJECTS) $(test_text_encode_and_split_DEPENDENCIES) +test-text-encode-and-split$(EXEEXT): $(test_text_encode_and_split_OBJECTS) $(test_text_encode_and_split_DEPENDENCIES) $(EXTRA_test_text_encode_and_split_DEPENDENCIES) @rm -f test-text-encode-and-split$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_text_encode_and_split_OBJECTS) $(test_text_encode_and_split_LDADD) $(LIBS) @@ -382,26 +409,23 @@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -625,14 +649,15 @@ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -668,13 +693,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -711,10 +733,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru telepathy-idle-0.1.11/tests/test-ctcp-kill-blingbling.c telepathy-idle-0.1.12/tests/test-ctcp-kill-blingbling.c --- telepathy-idle-0.1.11/tests/test-ctcp-kill-blingbling.c 2008-11-10 10:30:18.000000000 +0000 +++ telepathy-idle-0.1.12/tests/test-ctcp-kill-blingbling.c 2012-06-14 14:52:47.000000000 +0000 @@ -3,7 +3,9 @@ #include #include -int main() { +int +main (void) +{ gboolean fail = FALSE; const gchar *test_strings[] = { diff -Nru telepathy-idle-0.1.11/tests/test-ctcp-tokenize.c telepathy-idle-0.1.12/tests/test-ctcp-tokenize.c --- telepathy-idle-0.1.11/tests/test-ctcp-tokenize.c 2009-01-10 21:02:59.000000000 +0000 +++ telepathy-idle-0.1.12/tests/test-ctcp-tokenize.c 2012-06-14 14:52:47.000000000 +0000 @@ -6,7 +6,9 @@ #include -int main() { +int +main (void) +{ gboolean fail = FALSE; const gchar *test_str = "\001 foo \" fo bar\" bar\\001\\002\\003baz\"for every foo there is \\001 bar\\\\\001"; diff -Nru telepathy-idle-0.1.11/tests/test-text-encode-and-split.c telepathy-idle-0.1.12/tests/test-text-encode-and-split.c --- telepathy-idle-0.1.11/tests/test-text-encode-and-split.c 2009-08-29 15:08:03.000000000 +0000 +++ telepathy-idle-0.1.12/tests/test-text-encode-and-split.c 2012-06-14 14:52:47.000000000 +0000 @@ -19,7 +19,7 @@ G_STMT_END -gboolean +static gboolean test (TpChannelTextMessageType type, gchar *msg) { diff -Nru telepathy-idle-0.1.11/tests/twisted/channels/muc-channel-topic.py telepathy-idle-0.1.12/tests/twisted/channels/muc-channel-topic.py --- telepathy-idle-0.1.11/tests/twisted/channels/muc-channel-topic.py 2011-10-28 16:54:36.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/channels/muc-channel-topic.py 2012-04-08 08:36:31.000000000 +0000 @@ -68,6 +68,8 @@ q.expect('dbus-signal', signal='StatusChanged', args=[0, 1]) + alice_handle, bob_handle = conn.RequestHandles(HT_CONTACT, ['alice', 'bob']) + call_async(q, conn.Requests, 'CreateChannel', { CHANNEL_TYPE: CHANNEL_TYPE_TEXT, TARGET_HANDLE_TYPE: HT_ROOM, @@ -86,8 +88,9 @@ # No topic set subject_props = channel.Properties.GetAll(CHANNEL_IFACE_SUBJECT) assertEquals('', subject_props['Subject']) - assertEquals(0, subject_props['Timestamp']) + assertEquals(0x7fffffffffffffffL, subject_props['Timestamp']) assertEquals('', subject_props['Actor']) + assertEquals(0, subject_props['ActorHandle']) # Before the topic arrives from the server, check that our API works okay. # FIXME: when we make SetSubject return asynchronously, this will need @@ -106,6 +109,7 @@ expect_subject_props_changed(q, { 'Timestamp': 1307802600, 'Actor': 'bob', + 'ActorHandle': bob_handle, }, exact_timestamp=True) # Another user changes the topic. @@ -114,6 +118,18 @@ expect_subject_props_changed(q, { 'Subject': 'I am as high as a kite', 'Actor': 'alice', + 'ActorHandle': alice_handle, + 'Timestamp': 1234, + }) + + # BIP omits the : for the trailing parameter if it's a single word, make + # sure we pass that as well + stream.sendMessage('TOPIC', room, 'badgers!', + prefix='alice') + expect_subject_props_changed(q, + { 'Subject': 'badgers!', + 'Actor': 'alice', + 'ActorHandle': alice_handle, 'Timestamp': 1234, }) diff -Nru telepathy-idle-0.1.11/tests/twisted/channels/requests-muc.py telepathy-idle-0.1.12/tests/twisted/channels/requests-muc.py --- telepathy-idle-0.1.11/tests/twisted/channels/requests-muc.py 2011-10-28 16:54:36.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/channels/requests-muc.py 2012-06-14 14:52:47.000000000 +0000 @@ -2,9 +2,11 @@ Test connecting to a IRC channel via the Requests interface """ +import functools from idletest import exec_test, BaseIRCServer from servicetest import ( EventPattern, call_async, sync_dbus, make_channel_proxy, assertEquals, + assertSameSets, assertContains, ) import constants as cs import dbus @@ -14,7 +16,38 @@ # do nothing; wait for the test to call sendJoin(). return -def test(q, bus, conn, stream): +def build_request(conn, channel_name, use_room): + rccs = conn.Properties.Get(cs.CONN_IFACE_REQUESTS, + 'RequestableChannelClasses') + + if use_room: + # We allow TargetHandleType in Room-flavoured requests, but it has to + # be None if specified. + assertContains( + ({ cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT }, + [cs.TARGET_HANDLE_TYPE, cs.ROOM_NAME], + ), rccs) + + request = { + cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, + cs.ROOM_NAME: '#idletest' + } + else: + assertContains( + ({ cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, + cs.TARGET_HANDLE_TYPE: cs.HT_ROOM, + }, + [cs.TARGET_HANDLE, cs.TARGET_ID] + ), rccs) + request = { + cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, + cs.TARGET_HANDLE_TYPE: cs.HT_ROOM, + cs.TARGET_ID: '#idletest', + } + + return dbus.Dictionary(request, signature='sv') + +def test(q, bus, conn, stream, use_room=False): conn.Connect() q.expect_many( EventPattern('dbus-signal', signal='StatusChanged', args=[1, 1]), @@ -24,14 +57,8 @@ self_handle = conn.GetSelfHandle() - request = dbus.Dictionary({ - cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, - cs.TARGET_HANDLE_TYPE: cs.HT_ROOM, - cs.TARGET_ID: '#idletest', - }, signature='sv') - - call_async(q, conn, 'CreateChannel', request, - dbus_interface=cs.CONN_IFACE_REQUESTS) + request = build_request(conn, '#idletest', use_room) + call_async(q, conn.Requests, 'CreateChannel', request) # Idle should try to join the channel. q.expect('stream-JOIN') @@ -55,14 +82,18 @@ path, props = cc.value assert props[cs.CHANNEL_TYPE] == cs.CHANNEL_TYPE_TEXT - assert sorted(props[cs.INTERFACES]) == \ - sorted([cs.CHANNEL_IFACE_GROUP, - cs.CHANNEL_IFACE_PASSWORD, - cs.CHANNEL_IFACE_MESSAGES, - cs.CHANNEL_IFACE_SUBJECT, - ]) + assertSameSets( + [cs.CHANNEL_IFACE_GROUP, + cs.CHANNEL_IFACE_PASSWORD, + cs.CHANNEL_IFACE_MESSAGES, + cs.CHANNEL_IFACE_ROOM, + cs.CHANNEL_IFACE_SUBJECT, + cs.CHANNEL_IFACE_ROOM_CONFIG, + ], props[cs.INTERFACES]) assert props[cs.TARGET_HANDLE_TYPE] == cs.HT_ROOM assert props[cs.TARGET_ID] == '#idletest' + assertEquals('#idletest', props[cs.ROOM_NAME]) + assertEquals('', props[cs.ROOM_SERVER]) assert props[cs.TARGET_HANDLE] == \ conn.RequestHandles(cs.HT_ROOM, ['#idletest'])[0] assert props[cs.REQUESTED] @@ -117,4 +148,5 @@ if __name__ == '__main__': exec_test(test, protocol=DelayJoinServer) + exec_test(functools.partial(test, use_room=True), protocol=DelayJoinServer) diff -Nru telepathy-idle-0.1.11/tests/twisted/connect/socket-closed-after-handshake.py telepathy-idle-0.1.12/tests/twisted/connect/socket-closed-after-handshake.py --- telepathy-idle-0.1.11/tests/twisted/connect/socket-closed-after-handshake.py 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/connect/socket-closed-after-handshake.py 2012-04-08 08:36:31.000000000 +0000 @@ -0,0 +1,23 @@ +""" +Test what happens if the server just abruptly disconnects. +""" + +from idletest import exec_test +from servicetest import EventPattern +import constants as cs + +def test(q, bus, conn, stream): + conn.Connect() + q.expect_many( + EventPattern('irc-connected'), + EventPattern('dbus-signal', signal='StatusChanged', + args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED]), + ) + + stream.transport.loseConnection() + q.expect('dbus-signal', signal='StatusChanged', + args=[cs.CONN_STATUS_DISCONNECTED, cs.CSR_NETWORK_ERROR]) + +if __name__ == '__main__': + exec_test(test) + diff -Nru telepathy-idle-0.1.11/tests/twisted/connect/socket-closed-during-handshake.py telepathy-idle-0.1.12/tests/twisted/connect/socket-closed-during-handshake.py --- telepathy-idle-0.1.11/tests/twisted/connect/socket-closed-during-handshake.py 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/connect/socket-closed-during-handshake.py 2012-04-08 08:36:31.000000000 +0000 @@ -0,0 +1,24 @@ +""" +Test connecting to a server which closes the socket mid-login handshake. + +https://bugs.freedesktop.org/show_bug.cgi?id=48084 +""" + +from idletest import exec_test, BaseIRCServer + +class DropConnectionServer(BaseIRCServer): + def handleNICK(self, args, prefix): + self.transport.loseConnection() + +def test(q, bus, conn, stream): + conn.Connect() + # Idle should start to connect... + q.expect('dbus-signal', signal='StatusChanged', args=[1, 1]) + + # ...and then give up with an error when the server drops the connection + # mid-handshake. + q.expect('dbus-signal', signal='StatusChanged', args=[2, 2]) + +if __name__ == '__main__': + exec_test(test, protocol=DropConnectionServer) + diff -Nru telepathy-idle-0.1.11/tests/twisted/constants.py telepathy-idle-0.1.12/tests/twisted/constants.py --- telepathy-idle-0.1.11/tests/twisted/constants.py 2011-10-28 16:54:36.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/constants.py 2012-06-14 14:52:47.000000000 +0000 @@ -58,6 +58,9 @@ INITIATOR_ID = CHANNEL + '.InitiatorID' INTERFACES = CHANNEL + '.Interfaces' +ROOM_NAME = CHANNEL_IFACE_ROOM + '.RoomName' +ROOM_SERVER = CHANNEL_IFACE_ROOM + '.Server' + INITIAL_AUDIO = CHANNEL_TYPE_STREAMED_MEDIA + '.InitialAudio' INITIAL_VIDEO = CHANNEL_TYPE_STREAMED_MEDIA + '.InitialVideo' IMMUTABLE_STREAMS = CHANNEL_TYPE_STREAMED_MEDIA + '.ImmutableStreams' diff -Nru telepathy-idle-0.1.11/tests/twisted/Makefile.am telepathy-idle-0.1.12/tests/twisted/Makefile.am --- telepathy-idle-0.1.11/tests/twisted/Makefile.am 2011-10-03 17:04:20.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/Makefile.am 2012-06-14 14:52:47.000000000 +0000 @@ -6,6 +6,8 @@ connect/connect-fail-ssl.py \ connect/server-quit-ignore.py \ connect/server-quit-noclose.py \ + connect/socket-closed-after-handshake.py \ + connect/socket-closed-during-handshake.py \ connect/invalid-nick.py \ contacts.py \ channels/join-muc-channel.py \ @@ -20,6 +22,7 @@ messages/leading-space.py \ messages/long-message-split.py \ messages/room-contact-mixup.py \ + messages/room-config.py \ $(NULL) TESTS = diff -Nru telepathy-idle-0.1.11/tests/twisted/Makefile.in telepathy-idle-0.1.12/tests/twisted/Makefile.in --- telepathy-idle-0.1.11/tests/twisted/Makefile.in 2011-10-28 17:11:32.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/Makefile.in 2012-08-02 13:03:04.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -38,21 +55,23 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/tp-compiler-flag.m4 \ + $(top_srcdir)/m4/tp-compiler-warnings.m4 \ + $(top_srcdir)/m4/tp-linker-flag.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = @@ -63,6 +82,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -133,7 +157,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -250,6 +273,8 @@ connect/connect-fail-ssl.py \ connect/server-quit-ignore.py \ connect/server-quit-noclose.py \ + connect/socket-closed-after-handshake.py \ + connect/socket-closed-during-handshake.py \ connect/invalid-nick.py \ contacts.py \ channels/join-muc-channel.py \ @@ -264,6 +289,7 @@ messages/leading-space.py \ messages/long-message-split.py \ messages/room-contact-mixup.py \ + messages/room-config.py \ $(NULL) TESTS_ENVIRONMENT = \ @@ -536,14 +562,15 @@ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -579,13 +606,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -622,10 +646,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru telepathy-idle-0.1.11/tests/twisted/messages/room-config.py telepathy-idle-0.1.12/tests/twisted/messages/room-config.py --- telepathy-idle-0.1.11/tests/twisted/messages/room-config.py 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/messages/room-config.py 2012-06-14 14:52:47.000000000 +0000 @@ -0,0 +1,365 @@ +""" +Test RoomConfig1 implementation +""" + +from idletest import exec_test, sync_stream +from servicetest import EventPattern, call_async, assertContains, assertEquals, \ + wrap_channel +import constants as cs +import dbus + +def change_channel_mode(stream, mode_change): + stream.sendMessage('324', stream.nick, '#test', mode_change, + prefix='idle.test.server') + +def setup(q, bus, conn, stream, op_user=True): + conn.Connect() + q.expect('dbus-signal', signal='StatusChanged', + args=[cs.CONN_STATUS_CONNECTED, cs.CSR_REQUESTED]) + + # test MUC channel + call_async(q, conn.Requests, 'CreateChannel', + {cs.CHANNEL_TYPE: cs.CHANNEL_TYPE_TEXT, + cs.TARGET_HANDLE_TYPE: cs.HT_ROOM, + cs.TARGET_ID: '#test'}) + + ret, _, _ = q.expect_many(EventPattern('dbus-return', method='CreateChannel'), + EventPattern('dbus-signal', signal='MembersChanged'), + EventPattern('stream-MODE', data=['#test'])) + + chan = wrap_channel(bus.get_object(conn.bus_name, ret.value[0]), + 'Text', extra=['RoomConfig1']) + + change_channel_mode(stream, '+n') + + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'ConfigurationRetrieved': True}, []]) + + if op_user: + change_channel_mode(stream, '+o test') + + q.expect_many(EventPattern('dbus-signal', signal='GroupFlagsChanged', + args=[cs.GF_MESSAGE_REMOVE | cs.GF_CAN_REMOVE, 0]), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'CanUpdateConfiguration': True}, + []])) + + return chan + +def test_props_present(q, bus, conn, stream): + chan = setup(q, bus, conn, stream) + + props = chan.Properties.GetAll(cs.CHANNEL_IFACE_ROOM_CONFIG) + assertContains('PasswordProtected', props) + assertContains('Password', props) + assertContains('Description', props) + assertContains('Title', props) + assertContains('ConfigurationRetrieved', props) + assertContains('Persistent', props) + assertContains('Private', props) + assertContains('Limit', props) + assertContains('Anonymous', props) + assertContains('CanUpdateConfiguration', props) + assertContains('PasswordHint', props) + assertContains('Moderated', props) + assertContains('InviteOnly', props) + assertContains('MutableProperties', props) + + # this should do nothing + forbidden = [EventPattern('dbus-signal', signal='PropertiesChanged')] + q.forbid_events(forbidden) + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', {}) + + sync_stream(q, stream) + q.unforbid_events(forbidden) + + # we should have these mutable ones + mutable_props = ['InviteOnly', + 'Limit', + 'Moderated', + 'Private', + 'PasswordProtected', + 'Password'] + assertEquals(mutable_props, props['MutableProperties']) + +def test_simple_bools(q, bus, conn, stream): + chan = setup(q, bus, conn, stream) + + # the three easy booleans + for (prop, mode) in [('InviteOnly', 'i'), + ('Moderated', 'm'), + ('Private', 's')]: + # first set them all to true + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', {prop: True}) + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '+' + mode]), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {prop: True}, []]) + ) + # then them all to false + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', {prop: False}) + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '-' + mode]), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {prop: False}, []]) + ) + + # set them all to true now + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'InviteOnly': True, + 'Moderated': True, + 'Private': True}) + + # ... and a monster return + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '+i']), + EventPattern('stream-MODE', data=['#test', '+m']), + EventPattern('stream-MODE', data=['#test', '+s']), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'InviteOnly': True, + 'Moderated': True, + 'Private': True}, + []]) + ) + + # set only moderated to false, + forbidden = [EventPattern('stream-MODE', data=['#test', '+i']), + EventPattern('stream-MODE', data=['#test', '+s'])] + q.forbid_events(forbidden) + + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'InviteOnly': True, + 'Moderated': False, + 'Private': True}) + + # ... and another monster return + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '-m']), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'Moderated': False}, + []]) + ) + + sync_stream(q, stream) + q.unforbid_events(forbidden) + +def test_limit(q, bus, conn, stream): + chan = setup(q, bus, conn, stream) + + # do nothing, really + forbidden = [EventPattern('stream-MODE'), + EventPattern('dbus-signal', signal='PropertiesChanged')] + q.forbid_events(forbidden) + + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'Limit': dbus.UInt32(0)}) + + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration')) + + sync_stream(q, stream) + q.unforbid_events(forbidden) + + # set a limit + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'Limit': dbus.UInt32(1337)}) # totally 1337 + + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '+l', '1337']), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'Limit': 1337}, + []]) + ) + + # unset the limit + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'Limit': dbus.UInt32(0)}) + + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '-l']), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'Limit': 0}, + []]) + ) + +def test_password(q, bus, conn, stream): + chan = setup(q, bus, conn, stream) + + # set a password + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'Password': 'as1m0v', + 'PasswordProtected': True}) + + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '+k', 'as1m0v']), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'PasswordProtected': True, + 'Password': 'as1m0v'}, + []]) + ) + + # unset a password + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'PasswordProtected': False}) + + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '-k']), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'PasswordProtected': False, + 'Password': ''}, + []]) + ) + + # set another password + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'Password': 'balls'}) + + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '+k', 'balls']), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'PasswordProtected': True, + 'Password': 'balls'}, + []]) + ) + + # change password + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'Password': 'penguin3'}) + + q.expect_many(EventPattern('dbus-return', method='UpdateConfiguration'), + EventPattern('stream-MODE', data=['#test', '+k', 'penguin3']), + EventPattern('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'Password': 'penguin3'}, + []]) + ) + + # get rid of it + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'PasswordProtected': False}) + q.expect('stream-MODE', data=['#test', '-k']), + + # try some wacky values + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'PasswordProtected': True}) + q.expect('dbus-error', method='UpdateConfiguration', + name=cs.INVALID_ARGUMENT) + + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'PasswordProtected': True, + 'Password': ''}) + q.expect('dbus-error', method='UpdateConfiguration', + name=cs.INVALID_ARGUMENT) + + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {'PasswordProtected': False, + 'Password': 'scumbagsteve'}) + q.expect('dbus-error', method='UpdateConfiguration', + name=cs.INVALID_ARGUMENT) + +def test_modechanges(q, bus, conn, stream): + chan = setup(q, bus, conn, stream) + + # password + change_channel_mode(stream, '+k bettercallsaul') + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'PasswordProtected': True, + 'Password': 'bettercallsaul'}, + []]) + + change_channel_mode(stream, '-k') + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'PasswordProtected': False, + 'Password': ''}, + []]) + + # limit + change_channel_mode(stream, '+l 42') + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'Limit': 42}, + []]) + + change_channel_mode(stream, '-l') + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'Limit': 0}, + []]) + + # the other three + for mode, prop in [('i', 'InviteOnly'), + ('m', 'Moderated'), + ('s', 'Private')]: + + change_channel_mode(stream, '+%s' % mode) + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {prop: True}, + []]) + + change_channel_mode(stream, '-%s' % mode) + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {prop: False}, + []]) + + # a lot in one go + change_channel_mode(stream, '+imsk holly') + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'InviteOnly': True, + 'Moderated': True, + 'Private': True, + 'PasswordProtected': True, + 'Password': 'holly'}, + []]) + +def test_mode_no_op(q, bus, conn, stream): + chan = setup(q, bus, conn, stream, op_user=False) + + # we haven't been opped, so we can't be allowed to change these + # values + for key, val in [('InviteOnly', True), + ('Moderated', True), + ('Private', True), + ('Password', True), + ('Limit', 99)]: + call_async(q, chan.RoomConfig1, 'UpdateConfiguration', + {key: val}) + + q.expect('dbus-error', method='UpdateConfiguration', + name=cs.PERMISSION_DENIED) + + # op the user + change_channel_mode(stream, '+o test') + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'CanUpdateConfiguration': True}, + []]) + + # remove ops again + change_channel_mode(stream, '-o test') + q.expect('dbus-signal', signal='PropertiesChanged', + args=[cs.CHANNEL_IFACE_ROOM_CONFIG, + {'CanUpdateConfiguration': False}, + []]) + +if __name__ == '__main__': + exec_test(test_props_present) + exec_test(test_simple_bools) + exec_test(test_limit) + exec_test(test_password) + exec_test(test_modechanges) + exec_test(test_mode_no_op) diff -Nru telepathy-idle-0.1.11/tests/twisted/servicetest.py telepathy-idle-0.1.12/tests/twisted/servicetest.py --- telepathy-idle-0.1.11/tests/twisted/servicetest.py 2011-02-11 13:54:38.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/servicetest.py 2012-08-01 10:11:18.000000000 +0000 @@ -11,7 +11,9 @@ import pprint import unittest -import dbus.glib +import dbus +from dbus.mainloop.glib import DBusGMainLoop +DBusGMainLoop(set_as_default=True) from twisted.internet import reactor diff -Nru telepathy-idle-0.1.11/tests/twisted/tools/exec-with-log.sh.in telepathy-idle-0.1.12/tests/twisted/tools/exec-with-log.sh.in --- telepathy-idle-0.1.11/tests/twisted/tools/exec-with-log.sh.in 2011-09-12 16:56:48.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/tools/exec-with-log.sh.in 2012-06-14 14:52:47.000000000 +0000 @@ -3,6 +3,8 @@ cd "@abs_top_builddir@/tests/twisted/tools" export IDLE_DEBUG=all IDLE_HTFU=seriously +G_MESSAGES_DEBUG=all +export G_MESSAGES_DEBUG ulimit -c unlimited exec >> idle-testing.log 2>&1 diff -Nru telepathy-idle-0.1.11/tests/twisted/tools/Makefile.in telepathy-idle-0.1.12/tests/twisted/tools/Makefile.in --- telepathy-idle-0.1.11/tests/twisted/tools/Makefile.in 2011-10-28 17:11:32.000000000 +0000 +++ telepathy-idle-0.1.12/tests/twisted/tools/Makefile.in 2012-08-02 13:03:04.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,24 +54,31 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/tp-compiler-flag.m4 \ + $(top_srcdir)/m4/tp-compiler-warnings.m4 \ + $(top_srcdir)/m4/tp-linker-flag.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -90,7 +114,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -313,10 +336,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru telepathy-idle-0.1.11/tools/glib-ginterface-gen.py telepathy-idle-0.1.12/tools/glib-ginterface-gen.py --- telepathy-idle-0.1.11/tools/glib-ginterface-gen.py 2008-11-10 10:30:18.000000000 +0000 +++ telepathy-idle-0.1.12/tools/glib-ginterface-gen.py 2012-08-02 13:03:31.000000000 +0000 @@ -16,23 +16,33 @@ # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. +# Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA import sys import os.path import xml.dom.minidom +from libtpcodegen import file_set_contents from libglibcodegen import Signature, type_to_gtype, cmp_by_name, \ - camelcase_to_lower, NS_TP, dbus_gutils_wincaps_to_uscore, \ - signal_to_marshal_name, method_to_glue_marshal_name + NS_TP, dbus_gutils_wincaps_to_uscore NS_TP = "http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" +def get_emits_changed(node): + try: + return [ + annotation.getAttribute('value') + for annotation in node.getElementsByTagName('annotation') + if annotation.getAttribute('name') == 'org.freedesktop.DBus.Property.EmitsChangedSignal' + ][0] + except IndexError: + return None + class Generator(object): def __init__(self, dom, prefix, basename, signal_marshal_prefix, @@ -41,6 +51,7 @@ self.dom = dom self.__header = [] self.__body = [] + self.__docs = [] assert prefix.endswith('_') assert not signal_marshal_prefix.endswith('_') @@ -66,6 +77,7 @@ self.prefix_ = prefix.lower() self.PREFIX_ = prefix.upper() + self.basename = basename self.signal_marshal_prefix = signal_marshal_prefix self.headers = headers self.end_headers = end_headers @@ -73,11 +85,20 @@ self.allow_havoc = allow_havoc def h(self, s): + if isinstance(s, unicode): + s = s.encode('utf-8') self.__header.append(s) def b(self, s): + if isinstance(s, unicode): + s = s.encode('utf-8') self.__body.append(s) + def d(self, s): + if isinstance(s, unicode): + s = s.encode('utf-8') + self.__docs.append(s) + def do_node(self, node): node_name = node.getAttribute('name').replace('/', '') node_name_mixed = self.node_name_mixed = node_name.replace('_', '') @@ -89,16 +110,25 @@ interface = interfaces[0] self.iface_name = interface.getAttribute('name') - tmp = node.getAttribute('causes-havoc') + tmp = interface.getAttribute('tp:implement-service') + if tmp == "no": + return + + tmp = interface.getAttribute('tp:causes-havoc') if tmp and not self.allow_havoc: raise AssertionError('%s is %s' % (self.iface_name, tmp)) + iface_emits_changed = get_emits_changed(interface) + self.b('static const DBusGObjectInfo _%s%s_object_info;' % (self.prefix_, node_name_lc)) self.b('') methods = interface.getElementsByTagName('method') signals = interface.getElementsByTagName('signal') + properties = interface.getElementsByTagName('property') + # Don't put properties in dbus-glib glue + glue_properties = [] self.b('struct _%s%sClass {' % (self.Prefix, node_name_mixed)) self.b(' GTypeInterface parent_class;') @@ -150,20 +180,55 @@ self.b('}') self.b('') - self.h('/**') - self.h(' * %s%s:' % (self.Prefix, node_name_mixed)) - self.h(' *') - self.h(' * Dummy typedef representing any implementation of this ' + self.d('/**') + self.d(' * %s%s:' % (self.Prefix, node_name_mixed)) + self.d(' *') + self.d(' * Dummy typedef representing any implementation of this ' 'interface.') - self.h(' */') + self.d(' */') + self.h('typedef struct _%s%s %s%s;' % (self.Prefix, node_name_mixed, self.Prefix, node_name_mixed)) self.h('') - self.h('/**') - self.h(' * %s%sClass:' % (self.Prefix, node_name_mixed)) - self.h(' *') - self.h(' * The class of %s%s.' % (self.Prefix, node_name_mixed)) - self.h(' */') + + self.d('/**') + self.d(' * %s%sClass:' % (self.Prefix, node_name_mixed)) + self.d(' *') + self.d(' * The class of %s%s.' % (self.Prefix, node_name_mixed)) + + if methods: + self.d(' *') + self.d(' * In a full implementation of this interface (i.e. all') + self.d(' * methods implemented), the interface initialization') + self.d(' * function used in G_IMPLEMENT_INTERFACE() would') + self.d(' * typically look like this:') + self.d(' *') + self.d(' * ') + self.d(' * static void') + self.d(' * implement_%s (gpointer klass,' % self.node_name_lc) + self.d(' * gpointer unused G_GNUC_UNUSED)') + self.d(' * {') + self.d(' * #define IMPLEMENT(x) %s%s_implement_##x (\\' + % (self.prefix_, self.node_name_lc)) + self.d(' * klass, my_object_##x)') + + for method in methods: + class_member_name = method.getAttribute('tp:name-for-bindings') + class_member_name = class_member_name.lower() + self.d(' * IMPLEMENT (%s);' % class_member_name) + + self.d(' * #undef IMPLEMENT') + self.d(' * }') + self.d(' * ') + else: + self.d(' * This interface has no D-Bus methods, so an') + self.d(' * implementation can typically pass %NULL to') + self.d(' * G_IMPLEMENT_INTERFACE() as the interface') + self.d(' * initialization function.') + + self.d(' */') + self.d('') + self.h('typedef struct _%s%sClass %s%sClass;' % (self.Prefix, node_name_mixed, self.Prefix, node_name_mixed)) self.h('') @@ -196,23 +261,85 @@ for signal in signals: base_init_code.extend(self.do_signal(signal)) - self.b('static void') - self.b('%s%s_base_init (gpointer klass)' + self.b('static inline void') + self.b('%s%s_base_init_once (gpointer klass G_GNUC_UNUSED)' % (self.prefix_, node_name_lc)) self.b('{') - self.b(' static gboolean initialized = FALSE;') - self.b('') - self.b(' if (initialized)') - self.b(' return;') - self.b('') - self.b(' initialized = TRUE;') + + if properties: + self.b(' static TpDBusPropertiesMixinPropInfo properties[%d] = {' + % (len(properties) + 1)) + + for m in properties: + access = m.getAttribute('access') + assert access in ('read', 'write', 'readwrite') + + if access == 'read': + flags = 'TP_DBUS_PROPERTIES_MIXIN_FLAG_READ' + elif access == 'write': + flags = 'TP_DBUS_PROPERTIES_MIXIN_FLAG_WRITE' + else: + flags = ('TP_DBUS_PROPERTIES_MIXIN_FLAG_READ | ' + 'TP_DBUS_PROPERTIES_MIXIN_FLAG_WRITE') + + prop_emits_changed = get_emits_changed(m) + + if prop_emits_changed is None: + prop_emits_changed = iface_emits_changed + + if prop_emits_changed == 'true': + flags += ' | TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_CHANGED' + elif prop_emits_changed == 'invalidates': + flags += ' | TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_INVALIDATED' + + self.b(' { 0, %s, "%s", 0, NULL, NULL }, /* %s */' + % (flags, m.getAttribute('type'), m.getAttribute('name'))) + + self.b(' { 0, 0, NULL, 0, NULL, NULL }') + self.b(' };') + self.b(' static TpDBusPropertiesMixinIfaceInfo interface =') + self.b(' { 0, properties, NULL, NULL };') + self.b('') + + + self.b(' dbus_g_object_type_install_info (%s%s_get_type (),' + % (self.prefix_, node_name_lc)) + self.b(' &_%s%s_object_info);' + % (self.prefix_, node_name_lc)) self.b('') + + if properties: + self.b(' interface.dbus_interface = g_quark_from_static_string ' + '("%s");' % self.iface_name) + + for i, m in enumerate(properties): + self.b(' properties[%d].name = g_quark_from_static_string ("%s");' + % (i, m.getAttribute('name'))) + self.b(' properties[%d].type = %s;' + % (i, type_to_gtype(m.getAttribute('type'))[1])) + + self.b(' tp_svc_interface_set_dbus_properties_info (%s, &interface);' + % self.current_gtype) + + self.b('') + for s in base_init_code: self.b(s) - self.b(' dbus_g_object_type_install_info (%s%s_get_type (),' + self.b('}') + + self.b('static void') + self.b('%s%s_base_init (gpointer klass)' % (self.prefix_, node_name_lc)) - self.b(' &_%s%s_object_info);' + self.b('{') + self.b(' static gboolean initialized = FALSE;') + self.b('') + self.b(' if (!initialized)') + self.b(' {') + self.b(' initialized = TRUE;') + self.b(' %s%s_base_init_once (klass);' % (self.prefix_, node_name_lc)) + self.b(' }') + # insert anything we need to do per implementation here self.b('}') self.h('') @@ -225,6 +352,10 @@ for method, offset in zip(methods, offsets): self.do_method_glue(method, offset) + if len(methods) == 0: + # empty arrays are a gcc extension, so put in a dummy member + self.b(" { NULL, NULL, 0 }") + self.b('};') self.b('') @@ -235,7 +366,9 @@ self.b(' %d,' % len(methods)) self.b('"' + method_blob.replace('\0', '\\0') + '",') self.b('"' + self.get_signal_glue(signals).replace('\0', '\\0') + '",') - self.b('"\\0"') + self.b('"' + + self.get_property_glue(glue_properties).replace('\0', '\\0') + + '",') self.b('};') self.b('') @@ -282,10 +415,13 @@ return ''.join(info) + '\0', offsets def do_method_glue(self, method, offset): - lc_name = camelcase_to_lower(method.getAttribute('name')) + lc_name = method.getAttribute('tp:name-for-bindings') + if method.getAttribute('name') != lc_name.replace('_', ''): + raise AssertionError('Method %s tp:name-for-bindings (%s) does ' + 'not match' % (method.getAttribute('name'), lc_name)) + lc_name = lc_name.lower() - marshaller = method_to_glue_marshal_name(method, - self.signal_marshal_prefix) + marshaller = 'g_cclosure_marshal_generic' wrapper = self.prefix_ + self.node_name_lc + '_' + lc_name self.b(" { (GCallback) %s, %s, %d }," % (wrapper, marshaller, offset)) @@ -299,12 +435,21 @@ return '\0'.join(info) + '\0\0' + # the implementation can be the same + get_property_glue = get_signal_glue + def get_method_impl_names(self, method): dbus_method_name = method.getAttribute('name') - class_member_name = camelcase_to_lower(dbus_method_name) + + class_member_name = method.getAttribute('tp:name-for-bindings') + if dbus_method_name != class_member_name.replace('_', ''): + raise AssertionError('Method %s tp:name-for-bindings (%s) does ' + 'not match' % (dbus_method_name, class_member_name)) + class_member_name = class_member_name.lower() + stub_name = (self.prefix_ + self.node_name_lc + '_' + class_member_name) - return (stub_name + '_impl', class_member_name) + return (stub_name + '_impl', class_member_name + '_cb') def do_method(self, method): assert self.node_name_mixed is not None @@ -316,7 +461,12 @@ # DoStuff dbus_method_name = method.getAttribute('name') # do_stuff - class_member_name = camelcase_to_lower(dbus_method_name) + class_member_name = method.getAttribute('tp:name-for-bindings') + if dbus_method_name != class_member_name.replace('_', ''): + raise AssertionError('Method %s tp:name-for-bindings (%s) does ' + 'not match' % (dbus_method_name, class_member_name)) + class_member_name = class_member_name.lower() + # void tp_svc_thing_do_stuff (TpSvcThing *, const char *, guint, # DBusGMethodInvocation *); stub_name = (self.prefix_ + self.node_name_lc + '_' + @@ -358,18 +508,19 @@ else: out_args.append(struct) - # Implementation type declaration (in header, docs in body) - self.b('/**') - self.b(' * %s:' % impl_name) - self.b(' * @self: The object implementing this interface') + # Implementation type declaration (in header, docs separated) + self.d('/**') + self.d(' * %s:' % impl_name) + self.d(' * @self: The object implementing this interface') for (ctype, name) in in_args: - self.b(' * @%s: %s (FIXME, generate documentation)' + self.d(' * @%s: %s (FIXME, generate documentation)' % (name, ctype)) - self.b(' * @context: Used to return values or throw an error') - self.b(' *') - self.b(' * The signature of an implementation of the D-Bus method') - self.b(' * %s on interface %s.' % (dbus_method_name, self.iface_name)) - self.b(' */') + self.d(' * @context: Used to return values or throw an error') + self.d(' *') + self.d(' * The signature of an implementation of the D-Bus method') + self.d(' * %s on interface %s.' % (dbus_method_name, self.iface_name)) + self.d(' */') + self.h('typedef void (*%s) (%s%s *self,' % (impl_name, self.Prefix, self.node_name_mixed)) for (ctype, name) in in_args: @@ -387,7 +538,7 @@ self.b(' %s%s,' % (ctype, name)) self.b(' DBusGMethodInvocation *context)') self.b('{') - self.b(' %s impl = (%s%s_GET_CLASS (self)->%s);' + self.b(' %s impl = (%s%s_GET_CLASS (self)->%s_cb);' % (impl_name, self.PREFIX_, self.node_name_uc, class_member_name)) self.b('') self.b(' if (impl != NULL)') @@ -414,38 +565,41 @@ % (self.prefix_, self.node_name_lc, class_member_name, self.Prefix, self.node_name_mixed, impl_name)) - self.b('/**') - self.b(' * %s%s_implement_%s:' + self.d('/**') + self.d(' * %s%s_implement_%s:' % (self.prefix_, self.node_name_lc, class_member_name)) - self.b(' * @klass: A class whose instances implement this interface') - self.b(' * @impl: A callback used to implement the %s D-Bus method' + self.d(' * @klass: A class whose instances implement this interface') + self.d(' * @impl: A callback used to implement the %s D-Bus method' % dbus_method_name) - self.b(' *') - self.b(' * Register an implementation for the %s method in the vtable' + self.d(' *') + self.d(' * Register an implementation for the %s method in the vtable' % dbus_method_name) - self.b(' * of an implementation of this interface. To be called from') - self.b(' * the interface init function.') - self.b(' */') + self.d(' * of an implementation of this interface. To be called from') + self.d(' * the interface init function.') + self.d(' */') + self.b('void') self.b('%s%s_implement_%s (%s%sClass *klass, %s impl)' % (self.prefix_, self.node_name_lc, class_member_name, self.Prefix, self.node_name_mixed, impl_name)) self.b('{') - self.b(' klass->%s = impl;' % class_member_name) + self.b(' klass->%s_cb = impl;' % class_member_name) self.b('}') self.b('') # Return convenience function (static inline, in header) - self.h('/**') - self.h(' * %s:' % ret_name) - self.h(' * @context: The D-Bus method invocation context') + self.d('/**') + self.d(' * %s:' % ret_name) + self.d(' * @context: The D-Bus method invocation context') for (ctype, name) in out_args: - self.h(' * @%s: %s (FIXME, generate documentation)' + self.d(' * @%s: %s (FIXME, generate documentation)' % (name, ctype)) - self.h(' *') - self.h(' * Return successfully by calling dbus_g_method_return().') - self.h(' * This inline function exists only to provide type-safety.') - self.h(' */') + self.d(' *') + self.d(' * Return successfully by calling dbus_g_method_return().') + self.d(' * This inline function exists only to provide type-safety.') + self.d(' */') + self.d('') + tmp = (['DBusGMethodInvocation *context'] + [ctype + name for (ctype, name) in out_args]) self.h('static inline') @@ -477,8 +631,15 @@ # const char *arg0, guint arg1); dbus_name = signal.getAttribute('name') + + ugly_name = signal.getAttribute('tp:name-for-bindings') + if dbus_name != ugly_name.replace('_', ''): + raise AssertionError('Signal %s tp:name-for-bindings (%s) does ' + 'not match' % (dbus_name, ugly_name)) + stub_name = (self.prefix_ + self.node_name_lc + '_emit_' + - camelcase_to_lower(dbus_name)) + ugly_name.lower()) + const_name = self.get_signal_const_entry(signal) # Gather arguments @@ -508,17 +669,17 @@ # FIXME: emit docs - self.b('/**') - self.b(' * %s:' % stub_name) - self.b(' * @instance: The object implementing this interface') + self.d('/**') + self.d(' * %s:' % stub_name) + self.d(' * @instance: The object implementing this interface') for (ctype, name, gtype) in args: - self.b(' * @%s: %s (FIXME, generate documentation)' + self.d(' * @%s: %s (FIXME, generate documentation)' % (name, ctype)) - self.b(' *') - self.b(' * Type-safe wrapper around g_signal_emit to emit the') - self.b(' * %s signal on interface %s.' + self.d(' *') + self.d(' * Type-safe wrapper around g_signal_emit to emit the') + self.d(' * %s signal on interface %s.' % (dbus_name, self.iface_name)) - self.b(' */') + self.d(' */') self.b('void') self.b(('%s (' % stub_name) + (',\n '.join(tmp)) + ')') @@ -532,16 +693,30 @@ self.b('}') self.b('') + signal_name = dbus_gutils_wincaps_to_uscore(dbus_name).replace('_', + '-') + + self.d('/**') + self.d(' * %s%s::%s:' + % (self.Prefix, self.node_name_mixed, signal_name)) + self.d(' * @self: an object') + for (ctype, name, gtype) in args: + self.d(' * @%s: %s (FIXME, generate documentation)' + % (name, ctype)) + self.d(' *') + self.d(' * The %s D-Bus signal is emitted whenever ' + 'this GObject signal is.' % dbus_name) + self.d(' */') + self.d('') + in_base_init.append(' %s_signals[%s] =' % (self.node_name_lc, const_name)) - in_base_init.append(' g_signal_new ("%s",' - % (dbus_gutils_wincaps_to_uscore(dbus_name).replace('_', '-'))) + in_base_init.append(' g_signal_new ("%s",' % signal_name) in_base_init.append(' G_OBJECT_CLASS_TYPE (klass),') in_base_init.append(' G_SIGNAL_RUN_LAST|G_SIGNAL_DETAILED,') in_base_init.append(' 0,') in_base_init.append(' NULL, NULL,') - in_base_init.append(' %s,' - % signal_to_marshal_name(signal, self.signal_marshal_prefix)) + in_base_init.append(' g_cclosure_marshal_generic,') in_base_init.append(' G_TYPE_NONE,') tmp = ['%d' % len(args)] + [gtype for (ctype, name, gtype) in args] in_base_init.append(' %s);' % ',\n '.join(tmp)) @@ -549,22 +724,33 @@ return in_base_init + def have_properties(self, nodes): + for node in nodes: + interface = node.getElementsByTagName('interface')[0] + if interface.getElementsByTagName('property'): + return True + return False + def __call__(self): + nodes = self.dom.getElementsByTagName('node') + nodes.sort(cmp_by_name) + self.h('#include ') self.h('#include ') + + if self.have_properties(nodes): + self.h('#include ') + self.h('') self.h('G_BEGIN_DECLS') self.h('') - self.b('#include "%s.h"' % basename) + self.b('#include "%s.h"' % self.basename) self.b('') for header in self.headers: self.b('#include %s' % header) self.b('') - nodes = self.dom.getElementsByTagName('node') - nodes.sort(cmp_by_name) - for node in nodes: self.do_node(node) @@ -577,9 +763,9 @@ self.h('') self.b('') - open(basename + '.h', 'w').write('\n'.join(self.__header)) - open(basename + '.c', 'w').write('\n'.join(self.__body)) - + file_set_contents(self.basename + '.h', '\n'.join(self.__header)) + file_set_contents(self.basename + '.c', '\n'.join(self.__body)) + file_set_contents(self.basename + '-gtk-doc.h', '\n'.join(self.__docs)) def cmdline_error(): print """\ diff -Nru telepathy-idle-0.1.11/tools/glib-signals-marshal-gen.py telepathy-idle-0.1.12/tools/glib-signals-marshal-gen.py --- telepathy-idle-0.1.11/tools/glib-signals-marshal-gen.py 2008-11-10 10:30:18.000000000 +0000 +++ telepathy-idle-0.1.12/tools/glib-signals-marshal-gen.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -#!/usr/bin/python - -import sys -import xml.dom.minidom -from string import ascii_letters, digits - - -from libglibcodegen import signal_to_marshal_name, method_to_glue_marshal_name - - -class Generator(object): - - def __init__(self, dom): - self.dom = dom - self.marshallers = {} - - def do_method(self, method): - marshaller = method_to_glue_marshal_name(method, 'PREFIX') - - assert '__' in marshaller - rhs = marshaller.split('__', 1)[1].split('_') - - self.marshallers[marshaller] = rhs - - def do_signal(self, signal): - marshaller = signal_to_marshal_name(signal, 'PREFIX') - - assert '__' in marshaller - rhs = marshaller.split('__', 1)[1].split('_') - - self.marshallers[marshaller] = rhs - - def __call__(self): - methods = self.dom.getElementsByTagName('method') - - for method in methods: - self.do_method(method) - - signals = self.dom.getElementsByTagName('signal') - - for signal in signals: - self.do_signal(signal) - - all = self.marshallers.keys() - all.sort() - for marshaller in all: - rhs = self.marshallers[marshaller] - if not marshaller.startswith('g_cclosure'): - print 'VOID:' + ','.join(rhs) - -if __name__ == '__main__': - argv = sys.argv[1:] - dom = xml.dom.minidom.parse(argv[0]) - - Generator(dom)() diff -Nru telepathy-idle-0.1.11/tools/libglibcodegen.py telepathy-idle-0.1.12/tools/libglibcodegen.py --- telepathy-idle-0.1.11/tools/libglibcodegen.py 2008-11-10 10:30:18.000000000 +0000 +++ telepathy-idle-0.1.12/tools/libglibcodegen.py 2012-06-14 14:52:47.000000000 +0000 @@ -4,7 +4,7 @@ please make any changes there. """ -# Copyright (C) 2006, 2007 Collabora Limited +# Copyright (C) 2006-2008 Collabora Limited # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -14,51 +14,22 @@ # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Library General Public License for more details. +# Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -from string import ascii_letters, digits - - -NS_TP = "http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" - -_ASCII_ALNUM = ascii_letters + digits - - -def camelcase_to_lower(s): - out =""; - out += s[0].lower() - last_upper=False - if s[0].isupper(): - last_upper=True - for i in range(1,len(s)): - if s[i].isupper(): - if last_upper: - if (i+1) < len(s) and s[i+1].islower(): - out += "_" + s[i].lower() - else: - out += s[i].lower() - else: - out += "_" + s[i].lower() - last_upper=True - else: - out += s[i] - last_upper=False - return out - - -def camelcase_to_upper(s): - return camelcase_to_lower(s).upper() - - -def cmp_by_name(node1, node2): - return cmp(node1.getAttributeNode("name").nodeValue, - node2.getAttributeNode("name").nodeValue) - +from libtpcodegen import NS_TP, \ + Signature, \ + cmp_by_name, \ + escape_as_identifier, \ + get_by_path, \ + get_descendant_text, \ + get_docstring, \ + xml_escape, \ + get_deprecated def dbus_gutils_wincaps_to_uscore(s): """Bug-for-bug compatible Python port of _dbus_gutils_wincaps_to_uscore @@ -77,44 +48,6 @@ return ret -def escape_as_identifier(identifier): - """Escape the given string to be a valid D-Bus object path or service - name component, using a reversible encoding to ensure uniqueness. - - The reversible encoding is as follows: - - * The empty string becomes '_' - * Otherwise, each non-alphanumeric character is replaced by '_' plus - two lower-case hex digits; the same replacement is carried out on - the first character, if it's a digit - """ - # '' -> '_' - if not identifier: - return '_' - - # A bit of a fast path for strings which are already OK. - # We deliberately omit '_' because, for reversibility, that must also - # be escaped. - if (identifier.strip(_ASCII_ALNUM) == '' and - identifier[0] in ascii_letters): - return identifier - - # The first character may not be a digit - if identifier[0] not in ascii_letters: - ret = ['_%02x' % ord(identifier[0])] - else: - ret = [identifier[0]] - - # Subsequent characters may be digits or ASCII letters - for c in identifier[1:]: - if c in _ASCII_ALNUM: - ret.append(c) - else: - ret.append('_%02x' % ord(c)) - - return ''.join(ret) - - def signal_to_marshal_type(signal): """ return a list of strings indicating the marshalling type for this signal. @@ -167,69 +100,6 @@ return prefix + '_marshal_VOID__' + name -class _SignatureIter: - """Iterator over a D-Bus signature. Copied from dbus-python 0.71 so we - can run genginterface in a limited environment with only Python - (like Scratchbox). - """ - def __init__(self, string): - self.remaining = string - - def next(self): - if self.remaining == '': - raise StopIteration - - signature = self.remaining - block_depth = 0 - block_type = None - end = len(signature) - - for marker in range(0, end): - cur_sig = signature[marker] - - if cur_sig == 'a': - pass - elif cur_sig == '{' or cur_sig == '(': - if block_type == None: - block_type = cur_sig - - if block_type == cur_sig: - block_depth = block_depth + 1 - - elif cur_sig == '}': - if block_type == '{': - block_depth = block_depth - 1 - - if block_depth == 0: - end = marker - break - - elif cur_sig == ')': - if block_type == '(': - block_depth = block_depth - 1 - - if block_depth == 0: - end = marker - break - - else: - if block_depth == 0: - end = marker - break - - end = end + 1 - self.remaining = signature[end:] - return Signature(signature[0:end]) - - -class Signature(str): - """A string, iteration over which is by D-Bus single complete types - rather than characters. - """ - def __iter__(self): - return _SignatureIter(self) - - def type_to_gtype(s): if s == 'y': #byte return ("guchar ", "G_TYPE_UCHAR","UCHAR", False) @@ -244,9 +114,9 @@ elif s == 'u': #uint32 return ("guint ", "G_TYPE_UINT","UINT", False) elif s == 'x': #int64 - return ("gint ", "G_TYPE_INT64","INT64", False) - elif s == 't': #uint32 - return ("guint ", "G_TYPE_UINT64","UINT64", False) + return ("gint64 ", "G_TYPE_INT64","INT64", False) + elif s == 't': #uint64 + return ("guint64 ", "G_TYPE_UINT64","UINT64", False) elif s == 'd': #double return ("gdouble ", "G_TYPE_DOUBLE","DOUBLE", False) elif s == 's': #string @@ -276,10 +146,10 @@ elif s == 'ab': #boolean array return ("GArray *", "DBUS_TYPE_G_BOOLEAN_ARRAY", "BOXED", True) elif s == 'ao': #object path array - return ("GArray *", "DBUS_TYPE_G_OBJECT_ARRAY", "BOXED", True) - elif s[:2] == 'a(': #array of structs, recurse - gtype = type_to_gtype(s[1:])[1] - return ("GPtrArray *", "(dbus_g_type_get_collection (\"GPtrArray\", "+gtype+"))", "BOXED", True) + return ("GPtrArray *", + 'dbus_g_type_get_collection ("GPtrArray",' + ' DBUS_TYPE_G_OBJECT_PATH)', + "BOXED", True) elif s == 'a{ss}': #hash table of string to string return ("GHashTable *", "DBUS_TYPE_G_STRING_STRING_HASHTABLE", "BOXED", False) elif s[:2] == 'a{': #some arbitrary hash tables @@ -288,6 +158,9 @@ first = type_to_gtype(s[2]) second = type_to_gtype(s[3:-1]) return ("GHashTable *", "(dbus_g_type_get_map (\"GHashTable\", " + first[1] + ", " + second[1] + "))", "BOXED", False) + elif s[:2] in ('a(', 'aa'): # array of structs or arrays, recurse + gtype = type_to_gtype(s[1:])[1] + return ("GPtrArray *", "(dbus_g_type_get_collection (\"GPtrArray\", "+gtype+"))", "BOXED", True) elif s[:1] == '(': #struct gtype = "(dbus_g_type_get_struct (\"GValueArray\", " for subsig in Signature(s[1:-1]): diff -Nru telepathy-idle-0.1.11/tools/libtpcodegen.py telepathy-idle-0.1.12/tools/libtpcodegen.py --- telepathy-idle-0.1.11/tools/libtpcodegen.py 1970-01-01 00:00:00.000000000 +0000 +++ telepathy-idle-0.1.12/tools/libtpcodegen.py 2012-06-14 14:52:47.000000000 +0000 @@ -0,0 +1,227 @@ +"""Library code for language-independent D-Bus-related code generation. + +The master copy of this library is in the telepathy-glib repository - +please make any changes there. +""" + +# Copyright (C) 2006-2008 Collabora Limited +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +import os +from string import ascii_letters, digits + + +NS_TP = "http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" + +_ASCII_ALNUM = ascii_letters + digits + +def file_set_contents(filename, contents): + try: + os.remove(filename) + except OSError: + pass + try: + os.remove(filename + '.tmp') + except OSError: + pass + + open(filename + '.tmp', 'w').write(contents) + os.rename(filename + '.tmp', filename) + +def cmp_by_name(node1, node2): + return cmp(node1.getAttributeNode("name").nodeValue, + node2.getAttributeNode("name").nodeValue) + + +def escape_as_identifier(identifier): + """Escape the given string to be a valid D-Bus object path or service + name component, using a reversible encoding to ensure uniqueness. + + The reversible encoding is as follows: + + * The empty string becomes '_' + * Otherwise, each non-alphanumeric character is replaced by '_' plus + two lower-case hex digits; the same replacement is carried out on + the first character, if it's a digit + """ + # '' -> '_' + if not identifier: + return '_' + + # A bit of a fast path for strings which are already OK. + # We deliberately omit '_' because, for reversibility, that must also + # be escaped. + if (identifier.strip(_ASCII_ALNUM) == '' and + identifier[0] in ascii_letters): + return identifier + + # The first character may not be a digit + if identifier[0] not in ascii_letters: + ret = ['_%02x' % ord(identifier[0])] + else: + ret = [identifier[0]] + + # Subsequent characters may be digits or ASCII letters + for c in identifier[1:]: + if c in _ASCII_ALNUM: + ret.append(c) + else: + ret.append('_%02x' % ord(c)) + + return ''.join(ret) + + +def get_by_path(element, path): + branches = path.split('/') + branch = branches[0] + + # Is the current branch an attribute, if so, return the attribute value + if branch[0] == '@': + return element.getAttribute(branch[1:]) + + # Find matching children for the branch + children = [] + if branch == '..': + children.append(element.parentNode) + else: + for x in element.childNodes: + if x.localName == branch: + children.append(x) + + ret = [] + # If this is not the last path element, recursively gather results from + # children + if len(branches) > 1: + for x in children: + add = get_by_path(x, '/'.join(branches[1:])) + if isinstance(add, list): + ret += add + else: + return add + else: + ret = children + + return ret + + +def get_docstring(element): + docstring = None + for x in element.childNodes: + if x.namespaceURI == NS_TP and x.localName == 'docstring': + docstring = x + if docstring is not None: + docstring = docstring.toxml().replace('\n', ' ').strip() + if docstring.startswith(''): + docstring = docstring[14:].lstrip() + if docstring.endswith(''): + docstring = docstring[:-15].rstrip() + if docstring in ('', ''): + docstring = '' + return docstring + +def get_deprecated(element): + text = [] + for x in element.childNodes: + if hasattr(x, 'data'): + text.append(x.data.replace('\n', ' ').strip()) + else: + # This caters for tp:dbus-ref elements, but little else. + if x.childNodes and hasattr(x.childNodes[0], 'data'): + text.append(x.childNodes[0].data.replace('\n', ' ').strip()) + return ' '.join(text) + +def get_descendant_text(element_or_elements): + if not element_or_elements: + return '' + if isinstance(element_or_elements, list): + return ''.join(map(get_descendant_text, element_or_elements)) + parts = [] + for x in element_or_elements.childNodes: + if x.nodeType == x.TEXT_NODE: + parts.append(x.nodeValue) + elif x.nodeType == x.ELEMENT_NODE: + parts.append(get_descendant_text(x)) + else: + pass + return ''.join(parts) + + +class _SignatureIter: + """Iterator over a D-Bus signature. Copied from dbus-python 0.71 so we + can run genginterface in a limited environment with only Python + (like Scratchbox). + """ + def __init__(self, string): + self.remaining = string + + def next(self): + if self.remaining == '': + raise StopIteration + + signature = self.remaining + block_depth = 0 + block_type = None + end = len(signature) + + for marker in range(0, end): + cur_sig = signature[marker] + + if cur_sig == 'a': + pass + elif cur_sig == '{' or cur_sig == '(': + if block_type == None: + block_type = cur_sig + + if block_type == cur_sig: + block_depth = block_depth + 1 + + elif cur_sig == '}': + if block_type == '{': + block_depth = block_depth - 1 + + if block_depth == 0: + end = marker + break + + elif cur_sig == ')': + if block_type == '(': + block_depth = block_depth - 1 + + if block_depth == 0: + end = marker + break + + else: + if block_depth == 0: + end = marker + break + + end = end + 1 + self.remaining = signature[end:] + return Signature(signature[0:end]) + + +class Signature(str): + """A string, iteration over which is by D-Bus single complete types + rather than characters. + """ + def __iter__(self): + return _SignatureIter(self) + + +def xml_escape(s): + s = s.replace('&', '&').replace("'", ''').replace('"', '"') + return s.replace('<', '<').replace('>', '>') diff -Nru telepathy-idle-0.1.11/tools/Makefile.am telepathy-idle-0.1.12/tools/Makefile.am --- telepathy-idle-0.1.11/tools/Makefile.am 2011-09-12 16:56:48.000000000 +0000 +++ telepathy-idle-0.1.12/tools/Makefile.am 2012-06-14 14:52:47.000000000 +0000 @@ -3,15 +3,12 @@ c-interfaces-generator.xsl \ doc-generator.xsl \ glib-ginterface-gen.py \ - glib-signals-marshal-gen.py \ identity.xsl \ libglibcodegen.py \ + libtpcodegen.py \ make-release-mail.py CLEANFILES = libglibcodegen.pyc libglibcodegen.pyo -glib-ginterface-gen.py: libglibcodegen.py - touch $@ - -glib-signals-marshal-gen.py: libglibcodegen.py +glib-ginterface-gen.py: libglibcodegen.py libtpcodegen.py touch $@ diff -Nru telepathy-idle-0.1.11/tools/Makefile.in telepathy-idle-0.1.12/tools/Makefile.in --- telepathy-idle-0.1.11/tools/Makefile.in 2011-10-28 17:11:32.000000000 +0000 +++ telepathy-idle-0.1.12/tools/Makefile.in 2012-08-02 13:03:04.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -37,24 +54,31 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ - $(top_srcdir)/m4/as-compiler-flag.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/tp-compiler-flag.m4 \ + $(top_srcdir)/m4/tp-compiler-warnings.m4 \ + $(top_srcdir)/m4/tp-linker-flag.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -90,7 +114,6 @@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GLIB_CFLAGS = @GLIB_CFLAGS@ -GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -204,9 +227,9 @@ c-interfaces-generator.xsl \ doc-generator.xsl \ glib-ginterface-gen.py \ - glib-signals-marshal-gen.py \ identity.xsl \ libglibcodegen.py \ + libtpcodegen.py \ make-release-mail.py CLEANFILES = libglibcodegen.pyc libglibcodegen.pyo @@ -300,10 +323,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -396,10 +424,7 @@ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am -glib-ginterface-gen.py: libglibcodegen.py - touch $@ - -glib-signals-marshal-gen.py: libglibcodegen.py +glib-ginterface-gen.py: libglibcodegen.py libtpcodegen.py touch $@ # Tell versions [3.59,3.63) of GNU make to not export all variables.