diff options
-rw-r--r-- | net-im/gajim/ChangeLog | 14 | ||||
-rw-r--r-- | net-im/gajim/files/gajim-0.13-autotools--enable-site-packages_option.patch | 116 | ||||
-rw-r--r-- | net-im/gajim/files/gajim-0.13.1-define-exception.patch | 39 | ||||
-rw-r--r-- | net-im/gajim/gajim-0.13.1.ebuild | 92 |
4 files changed, 259 insertions, 2 deletions
diff --git a/net-im/gajim/ChangeLog b/net-im/gajim/ChangeLog index 601a9d6a9ae9..72ef29a0378c 100644 --- a/net-im/gajim/ChangeLog +++ b/net-im/gajim/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-im/gajim -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/ChangeLog,v 1.82 2009/10/25 17:41:10 tove Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/ChangeLog,v 1.83 2010/01/04 19:36:50 pva Exp $ + +*gajim-0.13.1 (04 Jan 2010) + + 04 Jan 2010; Peter Volkov <pva@gentoo.org> +gajim-0.13.1.ebuild, + +files/gajim-0.13.1-define-exception.patch, + +files/gajim-0.13-autotools--enable-site-packages_option.patch: + Version bump, bug #273351, thank Bruno 'brubru' Tarquini for this work. + Fixes bug #261130, missed dependency on libbonobo-python + (gnome-python-desktop dep), thank Zhang Weiwu for report; bug #244304, use + modules gnome python dependencies,thank Yu Yuwei for report. 25 Oct 2009; Torsten Veller <tove@gentoo.org> metadata.xml: Remove welp from metadata.xml (#141007) diff --git a/net-im/gajim/files/gajim-0.13-autotools--enable-site-packages_option.patch b/net-im/gajim/files/gajim-0.13-autotools--enable-site-packages_option.patch new file mode 100644 index 000000000000..ad683913e923 --- /dev/null +++ b/net-im/gajim/files/gajim-0.13-autotools--enable-site-packages_option.patch @@ -0,0 +1,116 @@ +autotools: add --enable-site-packages option + +This option allows the installation of pyfiles in PYTHON/site-packages/gajim +instead of DATADIR/gajim/src. + +partial backport of upstream version (http://trac.gajim.org/ticket/5460). + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -65,6 +65,20 @@ + AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) + AC_SUBST([PYTHON_INCLUDES]) + ++dnl **** ++dnl enable installation in python-2.x/site-packages/gajim ++dnl **** ++AC_ARG_ENABLE(site-packages, ++ [AS_HELP_STRING([--enable-site-packages], ++ [install gajim sources in PYTHONDIR/site-packages/gajim ++instead of DATADIR/gajim/src.])] ++, ++AC_SUBST([gajim_srcdir], [\${pkgpythondir}]) ++, ++AC_SUBST([gajim_srcdir], [\${datadir}/\${PACKAGE}/src]) ++) ++ ++AS_AC_EXPAND(GAJIM_SRCDIR, "${gajim_srcdir}") + AS_AC_EXPAND(DATADIR, "${datadir}") + AS_AC_EXPAND(LIBDIR, "${libdir}") + AS_AC_EXPAND(DOCDIR, "${docdir}") +@@ -95,4 +109,11 @@ + ***************************** + Build features: + trayicon ......... ${have_trayicon} ++ ++ Installation: ++ Prefix ........... ${prefix} ++ Python modules ... ${GAJIM_SRCDIR} ++ C modules ........ ${LIBDIR}/gajim ++ Documentation .... ${DOCDIR} ++ Others............ ${DATADIR}/gajim + *****************************" +diff --git a/data/Makefile.am b/data/Makefile.am +--- a/data/Makefile.am ++++ b/data/Makefile.am +@@ -5,7 +5,7 @@ + desktop_in_files = gajim.desktop.in.in + desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop) + +-installdefsdir = $(pkgdatadir)/src/common ++installdefsdir = $(gajim_srcdir)/common + installdefs_DATA = defs.py + + soundsdir = $(pkgdatadir)/data/sounds +diff --git a/scripts/gajim.in b/scripts/gajim.in +--- a/scripts/gajim.in ++++ b/scripts/gajim.in +@@ -32,6 +32,6 @@ + export datadir=@DATADIR@/gajim + PYTHON_EXEC=@PYTHON@ + +-cd ${datadir}/src ++cd "@GAJIM_SRCDIR@" + export PYTHONPATH="$PYTHONPATH:@LIBDIR@/gajim" + exec ${PYTHON_EXEC} -OO $APP.py "$@" +diff --git a/src/Makefile.am b/src/Makefile.am +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -26,37 +26,16 @@ + --override $(srcdir)/trayicon.override \ + $(srcdir)/trayicon.defs > $@ + endif +-gajimsrcdir = $(pkgdatadir)/src +-gajimsrc_PYTHON = $(srcdir)/*.py ++gajimsrcdir = $(gajim_srcdir) ++nobase_dist_gajimsrc_PYTHON = \ ++ $(srcdir)/*.py \ ++ $(srcdir)/common/*.py \ ++ $(srcdir)/common/xmpp/*.py \ ++ $(srcdir)/common/zeroconf/*.py \ ++ $(srcdir)/command_system/*.py \ ++ $(srcdir)/command_system/implementation/*.py + +-gajimsrc1dir = $(pkgdatadir)/src/common +-gajimsrc1_PYTHON = \ +- $(srcdir)/common/*.py +- +-gajimsrc2dir = $(pkgdatadir)/src/common/xmpp +-gajimsrc2_PYTHON = \ +- $(srcdir)/common/xmpp/*.py +- +-gajimsrc3dir = $(pkgdatadir)/src/common/zeroconf +-gajimsrc3_PYTHON = \ +- $(srcdir)/common/zeroconf/*.py +- +-gajimsrc4dir = $(pkgdatadir)/src/command_system +-gajimsrc4_PYTHON = \ +- $(srcdir)/command_system/*.py +- +-gajimsrc5dir = $(pkgdatadir)/src/command_system/implementation +-gajimsrc5_PYTHON = \ +- $(srcdir)/command_system/implementation/*.py +- +-DISTCLEANFILES = +- +-EXTRA_DIST = $(gajimsrc_PYTHON) \ +- $(gajimsrc1_PYTHON) \ +- $(gajimsrc2_PYTHON) \ +- $(gajimsrc3_PYTHON) \ +- $(gajimsrc4_PYTHON) \ +- $(gajimsrc5_PYTHON) \ ++EXTRA_DIST = \ + eggtrayicon.c \ + trayiconmodule.c \ + eggtrayicon.h \ diff --git a/net-im/gajim/files/gajim-0.13.1-define-exception.patch b/net-im/gajim/files/gajim-0.13.1-define-exception.patch new file mode 100644 index 000000000000..0091592a42fd --- /dev/null +++ b/net-im/gajim/files/gajim-0.13.1-define-exception.patch @@ -0,0 +1,39 @@ +=== modified file 'src/common/dbus_support.py' +--- src/common/dbus_support.py 2010-01-04 16:15:54 +0000 ++++ src/common/dbus_support.py 2010-01-04 16:16:12 +0000 +@@ -60,7 +60,7 @@ + raise exceptions.DbusNotSupported + + if not self.present(): +- raise exceptions.SystemBusNotPresent ++ raise exceptions.SystemBusNotPresent + return self.system_bus + + def bus(self): + +=== modified file 'src/common/exceptions.py' +--- src/common/exceptions.py 2010-01-04 16:15:54 +0000 ++++ src/common/exceptions.py 2010-01-04 16:19:55 +0000 +@@ -68,7 +68,20 @@ + Exception.__init__(self) + + def __str__(self): +- return _('Session bus is not available.\nTry reading http://trac.gajim.org/wiki/GajimDBus') ++ return _('Session bus is not available.\nTry reading %(url)s') % \ ++ {'url': 'http://trac.gajim.org/wiki/GajimDBus'} ++ ++class SystemBusNotPresent(Exception): ++ """ ++ This exception indicates that there is no session daemon ++ """ ++ ++ def __init__(self): ++ Exception.__init__(self) ++ ++ def __str__(self): ++ return _('System bus is not available.\nTry reading %(url)s') % \ ++ {'url': 'http://trac.gajim.org/wiki/GajimDBus'} + + class NegotiationError(Exception): + '''A session negotiation failed''' + diff --git a/net-im/gajim/gajim-0.13.1.ebuild b/net-im/gajim/gajim-0.13.1.ebuild new file mode 100644 index 000000000000..1e3589efb5c3 --- /dev/null +++ b/net-im/gajim/gajim-0.13.1.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/gajim-0.13.1.ebuild,v 1.1 2010/01/04 19:36:50 pva Exp $ + +EAPI="2" + +NEED_PYTHON="2.5" +inherit python eutils autotools versionator + +DESCRIPTION="Jabber client written in PyGTK" +HOMEPAGE="http://www.gajim.org/" +SRC_URI="http://www.gajim.org/downloads/$(get_version_component_range 1-2)/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="avahi crypt dbus gnome idle libnotify nls spell srv trayicon X xhtml" + +COMMON_DEPEND=">=dev-python/pygtk-2.12.0" + +DEPEND="${COMMON_DEPEND} + sys-devel/gettext + >=dev-util/intltool-0.40.1 + dev-util/pkgconfig" + +RDEPEND="${COMMON_DEPEND} + >=dev-lang/python-2.5[sqlite,xml] + dev-python/pyopenssl + dev-python/sexy-python + gnome? ( + dev-python/libgnome-python + dev-python/gnome-keyring-python + trayicon? ( dev-python/egg-python ) ) + dbus? ( + dev-python/dbus-python + dev-libs/dbus-glib + libnotify? ( dev-python/notify-python ) + avahi? ( net-dns/avahi[dbus,gtk,python] ) ) + xhtml? ( dev-python/docutils ) + srv? ( || ( + dev-python/libasyncns-python + net-dns/bind-tools ) ) + idle? ( x11-libs/libXScrnSaver ) + spell? ( app-text/gtkspell ) + crypt? ( + app-crypt/gnupg + dev-python/pycrypto )" + +pkg_setup() { + if ! use dbus; then + if use libnotify; then + eerror "The dbus USE flag is required for libnotify support" + die "USE=\"dbus\" needed for libnotify support" + fi + if use avahi; then + eerror "The dbus USE flag is required for avahi support" + die "USE=\"dbus\" needed for avahi support" + fi + fi +} + +src_prepare() { + # install pyfiles in /usr/lib/python2.x/site-packages/gajim + # upstream: http://trac.gajim.org/ticket/5460 + epatch "${FILESDIR}/${PN}-0.13-autotools--enable-site-packages_option.patch" + # http://trac.gajim.org/ticket/5457 + epatch "${FILESDIR}/${P}-define-exception.patch" + eautoreconf +} + +src_configure() { + local myconf + + if ! use gnome; then + myconf+=" $(use_enable trayicon)" + fi + + econf \ + $(use_enable nls) \ + $(use_with X x) \ + --docdir="/usr/share/doc/${PF}" \ + --libdir="$(python_get_sitedir)" \ + --enable-site-packages \ + ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + rm "${D}/usr/share/doc/${PF}/{README.html,COPYING}" + dohtml README.html +} |