1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 GENTOO_DEPEND_ON_PERL=no
8 PYTHON_COMPAT=( python2_7 python3_{3,4} )
10 inherit autotools flag-o-matic eutils toolchain-funcs multilib perl-app gnome2 python-single-r1
12 DESCRIPTION="GTK Instant Messenger client"
13 HOMEPAGE="http://pidgin.im/"
15 mirror://sourceforge/${PN}/${P}.tar.bz2
16 https://dev.gentoo.org/~polynomial-c/${PN}-eds-3.6.patch.bz2"
20 KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ppc64 sparc x86 ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos"
21 IUSE="dbus debug doc eds gadu gnutls +gstreamer +gtk idn meanwhile mxit"
22 IUSE+=" networkmanager nls perl silc tcl tk spell sasl ncurses"
23 IUSE+=" groupwise prediction python +xscreensaver zephyr zeroconf" # mono"
26 # dbus requires python to generate C code for dbus bindings (thus DEPEND only).
27 # finch uses libgnt that links with libpython - {R,}DEPEND. But still there is
28 # no way to build dbus and avoid libgnt linkage with python. If you want this
29 # send patch upstream.
30 # purple-url-handler and purple-remote require dbus-python thus in reality we
31 # rdepend on python if dbus enabled. But it is possible to separate this dep.
34 >=dev-libs/libxml2-2.6.18
35 ncurses? ( sys-libs/ncurses[unicode]
36 dbus? ( ${PYTHON_DEPS} )
37 python? ( ${PYTHON_DEPS} ) )
39 >=x11-libs/gtk+-2.10:2[aqua=]
41 xscreensaver? ( x11-libs/libXScrnSaver )
42 spell? ( >=app-text/gtkspell-2.0.2:2 )
43 eds? ( >=gnome-extra/evolution-data-server-3.6:= )
44 prediction? ( >=dev-db/sqlite-3.3:3 ) )
45 gstreamer? ( =media-libs/gstreamer-0.10*
46 =media-libs/gst-plugins-good-0.10*
47 net-libs/farstream:0.1
48 media-plugins/gst-plugins-meta:0.10
49 media-plugins/gst-plugins-gconf:0.10 )
50 zeroconf? ( net-dns/avahi[dbus] )
51 dbus? ( >=dev-libs/dbus-glib-0.71
53 dev-python/dbus-python )
54 perl? ( >=dev-lang/perl-5.16:= )
55 gadu? ( || ( >=net-libs/libgadu-1.11.0[ssl,gnutls]
56 >=net-libs/libgadu-1.11.0[-ssl] ) )
57 gnutls? ( net-libs/gnutls )
58 !gnutls? ( >=dev-libs/nss-3.15.4 )
59 meanwhile? ( net-libs/meanwhile )
60 silc? ( >=net-im/silc-toolkit-1.0.1 )
61 tcl? ( dev-lang/tcl:0= )
62 tk? ( dev-lang/tk:0= )
63 sasl? ( dev-libs/cyrus-sasl:2 )
64 networkmanager? ( net-misc/networkmanager )
65 idn? ( net-dns/libidn )
66 !<x11-plugins/pidgin-facebookchat-1.69-r1"
67 # Mono support crashes pidgin
68 #mono? ( dev-lang/mono )"
70 # We want nls in case gtk is enabled, bug #
71 NLS_DEPEND=">=dev-util/intltool-0.41.1 sys-devel/gettext"
77 gtk? ( x11-proto/scrnsaverproto
79 dbus? ( ${PYTHON_DEPS} )
80 doc? ( app-doc/doxygen )
81 !gtk? ( nls? ( ${NLS_DEPEND} ) )"
83 DOCS="AUTHORS HACKING NEWS README ChangeLog"
85 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
86 dbus? ( ${PYTHON_REQUIRED_USE} )"
88 # Enable Default protocols
89 DYNAMIC_PRPLS="irc,jabber,oscar,yahoo,simple,msn,myspace"
92 # app-accessibility/pidgin-festival
94 # x11-plugins/guifications
95 # x11-plugins/msn-pecan
96 # x11-plugins/pidgin-encryption
97 # x11-plugins/pidgin-extprefs
98 # x11-plugins/pidgin-hotkeys
99 # x11-plugins/pidgin-latex
100 # x11-plugins/pidgintex
101 # x11-plugins/pidgin-libnotify
102 # x11-plugins/pidgin-mbpurple
103 # x11-plugins/pidgin-bot-sentry
104 # x11-plugins/pidgin-otr
105 # x11-plugins/pidgin-rhythmbox
106 # x11-plugins/purple-plugin_pack
107 # x11-themes/pidgin-smileys
108 # x11-plugins/pidgin-knotify
109 # Plugins in Sunrise:
110 # x11-plugins/pidgin-audacious-remote
111 # x11-plugins/pidgin-autoanswer
112 # x11-plugins/pidgin-birthday-reminder
113 # x11-plugins/pidgin-blinklight
114 # x11-plugins/pidgin-convreverse
115 # x11-plugins/pidgin-embeddedvideo
116 # x11-plugins/pidgin-extended-blist-sort
117 # x11-plugins/pidgin-gfire
118 # x11-plugins/pidgin-lastfm
119 # x11-plugins/pidgin-sendscreenshot
120 # x11-plugins/pidgimpd
123 if ! use gtk && ! use ncurses ; then
124 elog "You did not pick the ncurses or gtk use flags, only libpurple"
125 elog "will be built."
127 if use python || use dbus ; then
128 python-single-r1_pkg_setup
131 # dbus is enabled, no way to disable linkage with python => python is enabled
132 #REQUIRED_USE="gtk? ( nls ) dbus? ( python )"
133 if use gtk && ! use nls; then
134 ewarn "gtk build => nls is enabled!"
136 if use dbus && ! use python; then
137 elog "dbus is enabled, no way to disable linkage with python => python is enabled"
143 "${FILESDIR}"/${PN}-2.10.0-gold.patch \
144 "${WORKDIR}"/${PN}-eds-3.6.patch \
145 "${FILESDIR}"/${PN}-2.10.9-fix-gtkmedia.patch \
146 "${FILESDIR}"/${PN}-2.10.10-eds-3.6-configure.ac.patch \
147 "${FILESDIR}"/${P}-tinfo.patch
154 # Stabilize things, for your own good
156 replace-flags -O? -O2
161 DYNAMIC_PRPLS="${DYNAMIC_PRPLS},gg"
162 myconf="${myconf} --with-gadu-includes=."
163 myconf="${myconf} --with-gadu-libs=."
166 use groupwise && DYNAMIC_PRPLS+=",novell"
167 use silc && DYNAMIC_PRPLS+=",silc"
168 use meanwhile && DYNAMIC_PRPLS+=",sametime"
169 use mxit && DYNAMIC_PRPLS+=",mxit"
170 use zephyr && DYNAMIC_PRPLS+=",zephyr"
171 use zeroconf && DYNAMIC_PRPLS+=",bonjour"
174 einfo "Disabling NSS, using GnuTLS"
175 myconf+=" --enable-nss=no --enable-gnutls=yes"
176 myconf+=" --with-gnutls-includes=${EPREFIX}/usr/include/gnutls"
177 myconf+=" --with-gnutls-libs=${EPREFIX}/usr/$(get_libdir)"
179 einfo "Disabling GnuTLS, using NSS"
180 myconf+=" --enable-gnutls=no --enable-nss=yes"
183 if use dbus || { use ncurses && use python; }; then
184 myconf+=" --with-python=${PYTHON}"
186 myconf+=" --without-python"
190 $(use_enable ncurses consoleui) \
191 $(use_enable gtk gtkui) \
192 $(use_enable gtk sm) \
193 $(use gtk || use_enable nls) \
194 $(use gtk && echo "--enable-nls") \
195 $(use gtk && use_enable xscreensaver screensaver) \
196 $(use gtk && use_enable prediction cap) \
197 $(use gtk && use_enable eds gevolution) \
198 $(use gtk && use_enable spell gtkspell) \
202 $(use_enable debug) \
204 $(use_enable meanwhile) \
205 $(use_enable gstreamer) \
206 $(use_enable gstreamer farstream) \
207 $(use_enable gstreamer vv) \
208 $(use_enable sasl cyrus-sasl ) \
209 $(use_enable doc doxygen) \
210 $(use_enable networkmanager nm) \
211 $(use_enable zeroconf avahi) \
213 --with-system-ssl-certs="${EPREFIX}/etc/ssl/certs/" \
214 --with-dynamic-prpls="${DYNAMIC_PRPLS}" \
216 --x-includes="${EPREFIX}"/usr/include/X11 \
218 #$(use_enable mono) \
224 # Fix tray pathes for kde-3.5, e16 (x11-wm/enlightenment) and other
225 # implementations that are not complient with new hicolor theme yet, #323355
227 for d in 16 22 32 48; do
228 pixmapdir=${ED}/usr/share/pixmaps/pidgin/tray/hicolor/${d}x${d}/actions
229 mkdir "${pixmapdir}" || die
230 pushd "${pixmapdir}" >/dev/null || die
231 for f in ../status/*; do
237 use perl && perl_delete_localpod
239 if use python || use dbus ; then
240 python_fix_shebang "${D}"
244 dodoc finch/plugins/pietray.py
245 docompress -x /usr/share/doc/${PF}/pietray.py
247 prune_libtool_files --all