blob: 49a0c3b73e10f7355caca0035c6a5fc794a03c11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/gajim/gajim-0.12.1.ebuild,v 1.4 2009/05/31 23:59:52 ranger Exp $
EAPI="2"
inherit multilib python eutils autotools
DESCRIPTION="Jabber client written in PyGTK"
HOMEPAGE="http://www.gajim.org/"
SRC_URI="http://www.gajim.org/downloads/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE="avahi dbus gnome idle libnotify nls spell srv trayicon X xhtml"
DEPEND="|| (
( <dev-lang/python-2.5 dev-python/pysqlite )
>=dev-lang/python-2.5[sqlite]
)
dev-python/pygtk
sys-devel/gettext
dev-util/intltool
dev-util/pkgconfig"
RDEPEND="gnome? ( dev-python/gnome-python-extras
dev-python/gnome-python-desktop
)
dbus? ( dev-python/dbus-python dev-libs/dbus-glib )
libnotify? ( x11-libs/libnotify )
xhtml? ( dev-python/docutils )
srv? ( net-dns/bind-tools )
idle? ( x11-libs/libXScrnSaver )
spell? ( app-text/gtkspell )
avahi? ( net-dns/avahi[dbus,gtk,python] )
dev-python/pyopenssl
dev-python/sexy-python
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() {
# bug #251466 move *.py out of /usr/share
# upstream: (http://trac.gajim.org/ticket/4770)
epatch "${FILESDIR}/fix_autotools_and_search_dirs.patch"
# not upstream:
epatch "${FILESDIR}/0.12.1_autotools_install_pyfiles_in_pkglibdir.patch"
# sound paths:
epatch "${FILESDIR}/0.12.1-sound-path-fix.patch"
# small fix from upstream
epatch "${FILESDIR}/0.12.1-roster_window.py_r10934.patch"
# fix datadir path (trunk use an env var for config this)
sed -i "s|'DATA',.*|'DATA', '/usr/share/gajim/data')|" \
"src/common/configpaths.py" || die 'sed failed'
eautoreconf
}
src_configure() {
local myconf
if ! use gnome; then
myconf="${myconf} $(use_enable trayicon)"
myconf="${myconf} $(use_enable idle)"
fi
econf $(use_enable nls) \
$(use_enable spell gtkspell) \
$(use_enable dbus remote) \
$(use_with X x) \
--docdir="/usr/share/doc/${PF}" \
--libdir="$(python_get_sitedir)" \
${myconf} || die "econf failed"
}
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
rm "${D}/usr/share/doc/${PF}/README.html"
dohtml README.html
}
pkg_postinst() {
python_mod_optimize $(python_get_sitedir)/gajim/
}
pkg_postrm() {
python_mod_cleanup $(python_get_sitedir)/gajim/
}
|