ChangeLog

# ChangeLog for net-im/pidgin
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/net-im/pidgin/ChangeLog,v 1.60 2008/07/04 15:24:42 armin76 Exp $

04 Jul 2008; Raúl Porcel pidgin-2.4.3.ebuild:
alpha/ia64 stable wrt #230045

04 Jul 2008; Jeroen Roovers pidgin-2.4.3.ebuild:
Stable for HPPA (bug #230045).

03 Jul 2008; Christian Faulhammer pidgin-2.4.3.ebuild:
stable x86, security bug 230045

02 Jul 2008; Thomas Anderson pidgin-2.4.3.ebuild:
stable amd64, security bug 230045

02 Jul 2008; Ferris McCormick pidgin-2.4.3.ebuild:
Sparc stable, critical bug #230045 (based in part on comment 7).

*pidgin-2.4.3 (02 Jul 2008)

02 Jul 2008; Olivier Crête -pidgin-2.4.1.ebuild,
+pidgin-2.4.3.ebuild:
Version bump

26 May 2008; Olivier Crête
+files/pidgin-2.4.2-jabber_crash_fix.patch, pidgin-2.4.2.ebuild:
Add patch for xmpp crash, from upstream, bug #223361

19 May 2008; Olivier Crête pidgin-2.4.2.ebuild:
Add build-time dep for x11-proto/scrnsaverproto

18 May 2008; Olivier Crête pidgin-2.4.2.ebuild:
Explicitly enable/disable avahi support for bonjour flag, bug #222575

*pidgin-2.4.2 (18 May 2008)

18 May 2008; Olivier Crête +pidgin-2.4.2.ebuild:
Version bump

*pidgin-2.4.1 (01 Apr 2008)

01 Apr 2008; Olivier Crête -pidgin-2.4.0.ebuild,
+pidgin-2.4.1.ebuild:
Version bump

*pidgin-2.4.0 (01 Mar 2008)

01 Mar 2008; -pidgin-2.2.1.ebuild,
-pidgin-2.2.2.ebuild, +pidgin-2.4.0.ebuild:
Version bump

19 Feb 2008; Christoph Mende pidgin-2.3.1.ebuild:
Stable on amd64, bug #210396

18 Feb 2008; Jeroen Roovers pidgin-2.3.1.ebuild:
Stable for HPPA (bug #210396).

18 Feb 2008; Raúl Porcel pidgin-2.3.1.ebuild:
alpha/ia64/sparc stable wrt #210396

17 Feb 2008; nixnut pidgin-2.3.1.ebuild:
Stable on ppc wrt bug 210396

16 Feb 2008; Christian Faulhammer pidgin-2.3.1.ebuild:
stable x86, bug 210396

16 Feb 2008; Olivier Crête pidgin-2.3.1.ebuild:
Make the doxygen dep compile-time only, remove zephyr from the defaults,
reduce the ewarn stuff

*pidgin-2.3.1 (10 Dec 2007)

10 Dec 2007; Olivier Crête -pidgin-2.3.0.ebuild,
+pidgin-2.3.1.ebuild:
Version bump

06 Dec 2007; pidgin-2.3.0.ebuild:
Remove the desktop file on USE=-gtk

*pidgin-2.3.0 (30 Nov 2007)

30 Nov 2007; Olivier Crête pidgin-2.2.2.ebuild,
+pidgin-2.3.0.ebuild:
Version bump, now allow building libpurple without a UI, in preparation for
telepathy-haze

*pidgin-2.2.2 (26 Oct 2007)

26 Oct 2007; Olivier Crête +pidgin-2.2.2.ebuild:
Version bump for security bug #197006

04 Oct 2007; Olivier Crête -pidgin-2.1.0.ebuild:
Remove vulnerable version to bug #194278

04 Oct 2007; Steve Dibb pidgin-2.2.1.ebuild:
amd64 stable, security bug 194278

03 Oct 2007; Tobias Scherbaum pidgin-2.2.1.ebuild:
ppc stable, bug #194278

01 Oct 2007; Jeroen Roovers pidgin-2.2.1.ebuild:
Stable for HPPA (bug #194278).

01 Oct 2007; Raúl Porcel pidgin-2.2.1.ebuild:
alpha/ia64/x86 stable wrt security #194278

30 Sep 2007; Ferris McCormick pidgin-2.2.1.ebuild:
Sparc stable --- security Bug #194278 --- nice; seems good.

*pidgin-2.2.1 (30 Sep 2007)

30 Sep 2007; Olivier Crête
-files/pidgin-2.2.0-proxy.patch, -pidgin-2.1.1.ebuild,
-pidgin-2.2.0.ebuild, -pidgin-2.2.0-r1.ebuild, +pidgin-2.2.1.ebuild:
Add new version to fix security bug #194278 (CVE CVE-2007-4996), remove old
potentially vulnerable versions

*pidgin-2.2.0-r1 (20 Sep 2007)

20 Sep 2007; Timothy Redaelli
+files/pidgin-2.2.0-proxy.patch, +pidgin-2.2.0-r1.ebuild:
Applied upstream patch wrt bug #193034.
Thanks to deadhead for reporting.

16 Sep 2007; Olivier Crête pidgin-2.2.0.ebuild:
Add MyspaceIM, fixes bug #192713

*pidgin-2.2.0 (16 Sep 2007)

16 Sep 2007; Olivier Crête +pidgin-2.2.0.ebuild:
Version bump

28 Aug 2007; nixnut pidgin-2.1.0.ebuild:
Stable on ppc wrt bug 189781

27 Aug 2007; Raúl Porcel pidgin-2.1.1.ebuild:
Add ~alpha/~ia64 wrt #189781

26 Aug 2007; Wulf C. Krueger pidgin-2.1.0.ebuild:
Marked stable on amd64 as per bug 189781.

26 Aug 2007; Wulf C. Krueger pidgin-2.1.0.ebuild:
Marked stable on amd64 as per bug 189781.

24 Aug 2007; Christian Faulhammer pidgin-2.1.0.ebuild:
stable x86, bug 189781

23 Aug 2007; Olivier Crête pidgin-2.1.1.ebuild:
Removed separate xscreensaver and startup-notification use flags, they are
now enabled by the gtk use flag

23 Aug 2007; Jeroen Roovers pidgin-2.1.0.ebuild:
Stable for HPPA (bug #189781).

22 Aug 2007; Gustavo Zacarias pidgin-2.1.0.ebuild:
Stable on sparc wrt #189781

*pidgin-2.1.1 (22 Aug 2007)

22 Aug 2007; Olivier Crête
-files/pidgin-2.0.0-cchar_t-undeclared.patch,
-files/pidgin-2.0.1-desktop.patch,
-files/pidgin-2.0.1-purple-remote-syntax-fix.patch, -pidgin-2.0.2.ebuild,
pidgin-2.1.0.ebuild, +pidgin-2.1.1.ebuild:
Version bump, remove old version

*pidgin-2.1.0 (07 Aug 2007)

07 Aug 2007; Olivier Crête -pidgin-2.0.0.ebuild,
-pidgin-2.0.1.ebuild, +pidgin-2.1.0.ebuild:
Version bump, bug #187192

03 Aug 2007; Tristan Heaven pidgin-2.0.0.ebuild,
pidgin-2.0.1.ebuild, pidgin-2.0.2.ebuild:
Fix sqlite dependencies, bug #186800

20 Jul 2007; pidgin-2.0.2.ebuild:
Always enable msn protocol and remove ssl use flag since its not compulsory

30 Jun 2007; Olivier Crête pidgin-2.0.2.ebuild:
Disable gtk ui if neither gtk or ncurses use flags are present

*pidgin-2.0.2 (18 Jun 2007)

18 Jun 2007; Olivier Crête +pidgin-2.0.2.ebuild:
Version bump

29 May 2007; Timothy Redaelli
+files/pidgin-2.0.1-desktop.patch, pidgin-2.0.1.ebuild:
Do not install .desktop file if we don't compile GTK UI.

27 May 2007;
+files/pidgin-2.0.1-purple-remote-syntax-fix.patch, pidgin-2.0.1.ebuild:
Add patch to fix purple-remote, bug #179958

26 May 2007; Olivier Crête pidgin-2.0.0.ebuild,
pidgin-2.0.1.ebuild:
Rename console use flag to ncurses to match standard and remove evil
custom-cflags use flag

*pidgin-2.0.1 (26 May 2007)

26 May 2007; Olivier Crête +pidgin-2.0.1.ebuild:
Version bump

25 May 2007; Timothy Redaelli pidgin-2.0.0.ebuild:
Add kerberos support.
Thanks to Mike Kelly for reporting wrt bug #179697.

24 May 2007; Olivier Crête pidgin-2.0.0.ebuild:
Add networkmanager local use flag, bug #179525

22 May 2007; Jeroen Roovers pidgin-2.0.0.ebuild:
Marked ~hppa (again, in a way).

20 May 2007; Timothy Redaelli
+files/pidgin-2.0.0-cchar_t-undeclared.patch, pidgin-2.0.0.ebuild:
Add emake to src_compile.
Add a patch for Gentoo/FreeBSD (tested also on Linux)
Add ~x86-fbsd keyword.

13 May 2007; Timothy Redaelli pidgin-2.0.0.ebuild:
Fix FAQ link.
Thanks to Eric Polino wrt bug #178276.

*pidgin-2.0.0 (04 May 2007)

04 May 2007; Olivier Crête +pidgin-2.0.0.ebuild:
Bump to final version!

04 May 2007; Timothy Redaelli
pidgin-2.0.0_beta7.ebuild:
Add prediction use flag for pidgin wrt bug #176923.
Thanks to Tristan Heaven for reporting.

01 May 2007; Olivier Crête pidgin-2.0.0_beta7.ebuild:
Disabled mono support because it causes to many problems

01 May 2007; Olivier Crête pidgin-2.0.0_beta7.ebuild:
Add build dep on perl, and fix ewarn

01 May 2007; Olivier Crête ChangeLog:
Add pidgin, which is the renamed version of net-im/gaim

Manifest

AUX pidgin-2.4.2-jabber_crash_fix.patch 388 RMD160 dda7e9813c7494b3d27397e6a8c88ed30bd7e52c SHA1 06f500febac2a77822b63995936bf1b4152f608a SHA256 2efedf3275861354b2abdafbd7129e06e68a1c787aa97475e69b02464f168430
DIST pidgin-2.3.1.tar.bz2 9358563 RMD160 f7473efa72974610224ea622fcc02d4703552d2c SHA1 d247d085e89360c2a6bd8e4775b7814fd02d10c9 SHA256 2d083687734b232c18b9d4500a314cff5ba1a2584350832c9688ecec668eb79e
DIST pidgin-2.4.2.tar.bz2 9376721 RMD160 5609117af4cfd23bffdd4c071b5239750ad6bcfc SHA1 66c0aa58122f29c3a0262a555f05af46ca76fa77 SHA256 3f09878883c6980083e7774371ec57d8bdc320a325342965afb120d52780d15f
DIST pidgin-2.4.3.tar.bz2 9382967 RMD160 c5fa8f3f9e52ffffcc829d08a8b822cd9cdf5368 SHA1 c967ddda3cb4a8aecfb2566427e8cbd260f2c0de SHA256 8bb5d452fa3239c703647cf2dc28a5dfb849d7df7b89da0018271a337af053a6
EBUILD pidgin-2.3.1.ebuild 5733 RMD160 63252e9889fde319843fa7094fd22ed495e2ba96 SHA1 e3212d8e84dab05d2f9e4d2d83b7014b8f6335e3 SHA256 5218a123a863f65d3751030f03e5222b7d53f711b006edfe7d7796533493aa07
EBUILD pidgin-2.4.2.ebuild 5907 RMD160 6e1baf6d566d8065c03c2502c9ce04a8b8a44d86 SHA1 41c5921f331f6cc48053bbd47c90ad1ab678b67a SHA256 97236055ff6985b37063e5d2003cf366262c294330db3836d528663cc6fd4e57
EBUILD pidgin-2.4.3.ebuild 5801 RMD160 1fac562b47069ffbf21de11fe8013f5941622570 SHA1 004ff0c35461decf2c993cde767b7bf6f9354fac SHA256 5c8a16e28ff9a7b6e8d7287845d96254806db2629c81a44072363647ee8f070e
MISC ChangeLog 8510 RMD160 e66f64c2339dedc7388f7856fef9791d01f13bd7 SHA1 a50bb17dac270575bc626bff5f8a5ea817757c8c SHA256 11b76e54e0889e08b637c1d413fca13cdfd867b709e380fb2552658a85764809
MISC metadata.xml 458 RMD160 dca91f12277688e0a35ab2aefc0d46c8c70facbd SHA1 7dc17a356911852b3f5867e3629ef02a46adb675 SHA256 4457ab0d5db90f61e9d916879c32d1e0a7c6d15f2f7c955a17e5e31cb0777ba9

files

metadata.xml




net-im

Pidgin is an instant messaging program for Windows, Linux, BSD, and other Unixes. You can talk to your friends using AIM, ICQ, Jabber/XMPP, MSN Messenger, Yahoo!, Bonjour, Gadu-Gadu, IRC, Novell GroupWise Messenger, QQ, Lotus Sametime, SILC, SIMPLE, and Zephyr.

pidgin-2.3.1.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/pidgin/pidgin-2.3.1.ebuild,v 1.7 2008/02/19 19:54:52 angelos Exp $

inherit flag-o-matic eutils toolchain-funcs multilib perl-app gnome2

MY_PV=${P/_beta/beta}

DESCRIPTION="GTK Instant Messenger client"
HOMEPAGE="http://pidgin.im/"
SRC_URI="mirror://sourceforge/${PN}/${MY_PV}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 hppa ia64 ppc ~ppc64 sparc x86 ~x86-fbsd"
IUSE="bonjour dbus debug doc eds gadu gnutls gstreamer meanwhile networkmanager nls perl silc tcl tk spell qq gadu"
IUSE="${IUSE} gtk sasl ncurses groupwise prediction zephyr" # mono"

RDEPEND="
bonjour? ( net-dns/avahi )
dbus? ( >=dev-libs/dbus-glib-0.71
>=dev-python/dbus-python-0.71
>=sys-apps/dbus-0.90
>=dev-lang/python-2.4 )
gtk? (
spell? ( >=app-text/gtkspell-2.0.2 )
>=x11-libs/gtk+-2.0
>=x11-libs/startup-notification-0.5
x11-libs/libXScrnSaver
eds? ( gnome-extra/evolution-data-server ) )
>=dev-libs/glib-2.0
gstreamer? ( =media-libs/gstreamer-0.10*
=media-libs/gst-plugins-good-0.10* )
perl? ( >=dev-lang/perl-5.8.2-r1 )
gadu? ( net-libs/libgadu )
gnutls? ( net-libs/gnutls )
!gnutls? ( >=dev-libs/nss-3.11 )
meanwhile? ( net-libs/meanwhile )
silc? ( >=net-im/silc-toolkit-0.9.12-r3 )
zephyr? ( >=app-crypt/mit-krb5-1.3.6-r1 )
tcl? ( dev-lang/tcl )
tk? ( dev-lang/tk )
sasl? ( >=dev-libs/cyrus-sasl-2 )
dev-libs/libxml2
networkmanager? ( net-misc/networkmanager )
prediction? ( =dev-db/sqlite-3* )"
#mono? ( dev-lang/mono )"

DEPEND="$RDEPEND
dev-lang/perl
dev-perl/XML-Parser
dev-util/pkgconfig
doc? ( app-doc/doxygen )
nls? ( sys-devel/gettext )"

S="${WORKDIR}/${MY_PV}"

# Enable Default protocols
DYNAMIC_PRPLS="irc,jabber,oscar,yahoo,simple,msn,myspace"

# List of plugins
# app-accessibility/pidgin-festival
# net-im/librvp
# x11-plugins/guifications
# x11-plugins/pidgin-encryption
# x11-plugins/pidgin-extprefs
# x11-plugins/pidgin-hotkeys
# x11-plugins/pidgin-latex
# x11-plugins/pidgin-libnotify
# x11-plugins/pidgin-otr
# x11-plugins/pidgin-rhythmbox
# x11-plugins/purple-plugin_pack
# x11-themes/pidgin-smileys

print_pidgin_warning() {
ewarn
ewarn "If you experience problems with pidgin, file them as bugs with"
ewarn "Gentoo's bugzilla, http://bugs.gentoo.org"
ewarn
ewarn "Be sure to USE=\"debug\" and include a backtrace for any seg"
ewarn "faults, see http://developer.pidgin.im/wiki/GetABacktrace for details on"
ewarn "backtraces."
ewarn
ewarn "Please read the pidgin FAQ at http://developer.pidgin.im/wiki/FAQ"
ewarn
}

pkg_setup() {
print_pidgin_warning

if use gadu && built_with_use net-libs/libgadu ssl ; then
eerror
eerror "You need to rebuild net-libs/libgadu with USE=-ssl in order"
eerror "enable gadu gadu support in pidgin."
eerror
die "Configure failed"
fi

if use ncurses && ! built_with_use sys-libs/ncurses unicode; then
eerror
eerror "You need to rebuild sys-libs/ncurses with USE=unicode in order"
eerror "to build finch the console client of pidgin."
eerror
die "Configure failed"
fi

if ! use gtk && ! use ncurses ; then
einfo
elog "You did not pick the ncurses or gtk use flags, only libpurple"
elog "will be built."
einfo
fi

if use zephyr && ! built_with_use app-crypt/mit-krb5 krb4 ; then
eerror
eerror "You need to rebuild app-crypt/mit-krb5 with USE=krb4 in order to"
eerror "enable krb4 support for the zephyr protocol in pidgin"
eerror
die "Configure failed"
fi

}

src_compile() {
# Stabilize things, for your own good
strip-flags
replace-flags -O? -O2

# -msse2 doesn't play nice on gcc 3.2
[[ "`gcc-version`" == "3.2" ]] && filter-flags -msse2

local myconf

if use gadu; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},gg"
myconf="${myconf} --with-gadu-includes=."
myconf="${myconf} --with-gadu-libs=."
fi

if use silc; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},silc"
fi

if use qq; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},qq"
fi

if use meanwhile; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},sametime"
fi

if use bonjour; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},bonjour"
fi

if use groupwise; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},novell"
fi

if use zephyr; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},zephyr"
fi

if use gnutls ; then
einfo "Disabling NSS, using GnuTLS"
myconf="${myconf} --enable-nss=no --enable-gnutls=yes"
myconf="${myconf} --with-gnutls-includes=/usr/include/gnutls"
myconf="${myconf} --with-gnutls-libs=/usr/$(get_libdir)"
else
einfo "Disabling GnuTLS, using NSS"
myconf="${myconf} --enable-gnutls=no --enable-nss=yes"
fi

econf \
$(use_enable ncurses consoleui) \
$(use_enable nls) \
$(use_enable perl) \
$(use_enable gtk gtkui) \
$(use_enable gtk startup-notification) \
$(use_enable gtk screensaver) \
$(use_enable gtk sm) \
$(use_enable tcl) \
$(use_enable spell gtkspell) \
$(use_enable tk) \
$(use_enable debug) \
$(use_enable dbus) \
$(use_enable meanwhile) \
$(use_enable eds gevolution) \
$(use_enable gstreamer) \
$(use_enable sasl cyrus-sasl ) \
$(use_enable doc doxygen) \
$(use_enable prediction cap) \
$(use_enable networkmanager nm) \
$(use_with zephyr krb4) \
"--with-dynamic-prpls=${DYNAMIC_PRPLS}" \
--disable-mono \
--x-includes=/usr/include/X11 \
${myconf} || die "Configuration failed"
#$(use_enable mono) \

emake || die "make failed"
}

src_install() {
gnome2_src_install
use perl && fixlocalpod
dodoc AUTHORS HACKING INSTALL NEWS README ChangeLog

# Remove superfluous desktop file
use gtk || rm -rf "${D}/usr/share/applications"
}

pkg_postinst() {
gnome2_pkg_postinst
print_pidgin_warning
}

pidgin-2.4.2.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/pidgin/pidgin-2.4.2.ebuild,v 1.4 2008/05/26 17:26:14 tester Exp $

inherit flag-o-matic eutils toolchain-funcs multilib perl-app gnome2

MY_PV=${P/_beta/beta}

DESCRIPTION="GTK Instant Messenger client"
HOMEPAGE="http://pidgin.im/"
SRC_URI="mirror://sourceforge/${PN}/${MY_PV}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
IUSE="bonjour dbus debug doc eds gadu gnutls gstreamer meanwhile networkmanager nls perl silc tcl tk spell qq gadu"
IUSE="${IUSE} gtk sasl ncurses groupwise prediction zephyr" # mono"

RDEPEND="
bonjour? ( net-dns/avahi )
dbus? ( >=dev-libs/dbus-glib-0.71
>=dev-python/dbus-python-0.71
>=sys-apps/dbus-0.90
>=dev-lang/python-2.4 )
gtk? (
spell? ( >=app-text/gtkspell-2.0.2 )
>=x11-libs/gtk+-2.0
>=x11-libs/startup-notification-0.5
x11-libs/libXScrnSaver
eds? ( gnome-extra/evolution-data-server ) )
>=dev-libs/glib-2.0
gstreamer? ( =media-libs/gstreamer-0.10*
=media-libs/gst-plugins-good-0.10* )
perl? ( >=dev-lang/perl-5.8.2-r1 )
gadu? ( net-libs/libgadu )
gnutls? ( net-libs/gnutls )
!gnutls? ( >=dev-libs/nss-3.11 )
meanwhile? ( net-libs/meanwhile )
silc? ( >=net-im/silc-toolkit-0.9.12-r3 )
zephyr? ( >=app-crypt/mit-krb5-1.3.6-r1 )
tcl? ( dev-lang/tcl )
tk? ( dev-lang/tk )
sasl? ( >=dev-libs/cyrus-sasl-2 )
dev-libs/libxml2
networkmanager? ( net-misc/networkmanager )
prediction? ( =dev-db/sqlite-3* )"
#mono? ( dev-lang/mono )"

DEPEND="$RDEPEND
dev-lang/perl
dev-perl/XML-Parser
dev-util/pkgconfig
gtk? ( x11-proto/scrnsaverproto )
doc? ( app-doc/doxygen )
nls? ( sys-devel/gettext )"

S="${WORKDIR}/${MY_PV}"

# Enable Default protocols
DYNAMIC_PRPLS="irc,jabber,oscar,yahoo,simple,msn,myspace"

# List of plugins
# app-accessibility/pidgin-festival
# net-im/librvp
# x11-plugins/guifications
# x11-plugins/pidgin-encryption
# x11-plugins/pidgin-extprefs
# x11-plugins/pidgin-hotkeys
# x11-plugins/pidgin-latex
# x11-plugins/pidgin-libnotify
# x11-plugins/pidgin-otr
# x11-plugins/pidgin-rhythmbox
# x11-plugins/purple-plugin_pack
# x11-themes/pidgin-smileys

print_pidgin_warning() {
ewarn
ewarn "If you experience problems with pidgin, file them as bugs with"
ewarn "Gentoo's bugzilla, http://bugs.gentoo.org"
ewarn
ewarn "Be sure to USE=\"debug\" and include a backtrace for any seg"
ewarn "faults, see http://developer.pidgin.im/wiki/GetABacktrace for details on"
ewarn "backtraces."
ewarn
ewarn "Please read the pidgin FAQ at http://developer.pidgin.im/wiki/FAQ"
ewarn
}

pkg_setup() {
print_pidgin_warning

if use gadu && built_with_use net-libs/libgadu ssl ; then
eerror
eerror "You need to rebuild net-libs/libgadu with USE=-ssl in order"
eerror "enable gadu gadu support in pidgin."
eerror
die "Configure failed"
fi

if use ncurses && ! built_with_use sys-libs/ncurses unicode; then
eerror
eerror "You need to rebuild sys-libs/ncurses with USE=unicode in order"
eerror "to build finch the console client of pidgin."
eerror
die "Configure failed"
fi

if ! use gtk && ! use ncurses ; then
einfo
elog "You did not pick the ncurses or gtk use flags, only libpurple"
elog "will be built."
einfo
fi

if use zephyr && ! built_with_use app-crypt/mit-krb5 krb4 ; then
eerror
eerror "You need to rebuild app-crypt/mit-krb5 with USE=krb4 in order to"
eerror "enable krb4 support for the zephyr protocol in pidgin"
eerror
die "Configure failed"
fi

}

src_unpack() {
unpack ${A}

cd "${S}"
epatch "${FILESDIR}/pidgin-2.4.2-jabber_crash_fix.patch"
}

src_compile() {
# Stabilize things, for your own good
strip-flags
replace-flags -O? -O2

# -msse2 doesn't play nice on gcc 3.2
[[ "`gcc-version`" == "3.2" ]] && filter-flags -msse2

local myconf

if use gadu; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},gg"
myconf="${myconf} --with-gadu-includes=."
myconf="${myconf} --with-gadu-libs=."
fi

if use silc; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},silc"
fi

if use qq; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},qq"
fi

if use meanwhile; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},sametime"
fi

if use bonjour; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},bonjour"
fi

if use groupwise; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},novell"
fi

if use zephyr; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},zephyr"
fi

if use gnutls ; then
einfo "Disabling NSS, using GnuTLS"
myconf="${myconf} --enable-nss=no --enable-gnutls=yes"
myconf="${myconf} --with-gnutls-includes=/usr/include/gnutls"
myconf="${myconf} --with-gnutls-libs=/usr/$(get_libdir)"
else
einfo "Disabling GnuTLS, using NSS"
myconf="${myconf} --enable-gnutls=no --enable-nss=yes"
fi

econf \
$(use_enable ncurses consoleui) \
$(use_enable nls) \
$(use_enable perl) \
$(use_enable gtk gtkui) \
$(use_enable gtk startup-notification) \
$(use_enable gtk screensaver) \
$(use_enable gtk sm) \
$(use_enable tcl) \
$(use_enable spell gtkspell) \
$(use_enable tk) \
$(use_enable debug) \
$(use_enable dbus) \
$(use_enable meanwhile) \
$(use_enable eds gevolution) \
$(use_enable gstreamer) \
$(use_enable sasl cyrus-sasl ) \
$(use_enable doc doxygen) \
$(use_enable prediction cap) \
$(use_enable networkmanager nm) \
$(use_with zephyr krb4) \
$(use_enable bonjour avahi) \
"--with-dynamic-prpls=${DYNAMIC_PRPLS}" \
--disable-mono \
--x-includes=/usr/include/X11 \
${myconf} || die "Configuration failed"
#$(use_enable mono) \

emake || die "make failed"
}

src_install() {
gnome2_src_install
use perl && fixlocalpod
dodoc AUTHORS HACKING INSTALL NEWS README ChangeLog

# Remove superfluous desktop file
use gtk || rm -rf "${D}/usr/share/applications"
}

pkg_postinst() {
gnome2_pkg_postinst
print_pidgin_warning
}

pidgin-2.4.3.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/pidgin/pidgin-2.4.3.ebuild,v 1.6 2008/07/04 15:24:42 armin76 Exp $

inherit flag-o-matic eutils toolchain-funcs multilib perl-app gnome2

MY_PV=${P/_beta/beta}

DESCRIPTION="GTK Instant Messenger client"
HOMEPAGE="http://pidgin.im/"
SRC_URI="mirror://sourceforge/${PN}/${MY_PV}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 hppa ia64 ~ppc ~ppc64 sparc x86 ~x86-fbsd"
IUSE="bonjour dbus debug doc eds gadu gnutls gstreamer meanwhile networkmanager nls perl silc tcl tk spell qq gadu"
IUSE="${IUSE} gtk sasl ncurses groupwise prediction zephyr" # mono"

RDEPEND="
bonjour? ( net-dns/avahi )
dbus? ( >=dev-libs/dbus-glib-0.71
>=dev-python/dbus-python-0.71
>=sys-apps/dbus-0.90
>=dev-lang/python-2.4 )
gtk? (
spell? ( >=app-text/gtkspell-2.0.2 )
>=x11-libs/gtk+-2.0
>=x11-libs/startup-notification-0.5
x11-libs/libXScrnSaver
eds? ( gnome-extra/evolution-data-server ) )
>=dev-libs/glib-2.0
gstreamer? ( =media-libs/gstreamer-0.10*
=media-libs/gst-plugins-good-0.10* )
perl? ( >=dev-lang/perl-5.8.2-r1 )
gadu? ( net-libs/libgadu )
gnutls? ( net-libs/gnutls )
!gnutls? ( >=dev-libs/nss-3.11 )
meanwhile? ( net-libs/meanwhile )
silc? ( >=net-im/silc-toolkit-0.9.12-r3 )
zephyr? ( >=app-crypt/mit-krb5-1.3.6-r1 )
tcl? ( dev-lang/tcl )
tk? ( dev-lang/tk )
sasl? ( >=dev-libs/cyrus-sasl-2 )
dev-libs/libxml2
networkmanager? ( net-misc/networkmanager )
prediction? ( =dev-db/sqlite-3* )"
#mono? ( dev-lang/mono )"

DEPEND="$RDEPEND
dev-lang/perl
dev-perl/XML-Parser
dev-util/pkgconfig
gtk? ( x11-proto/scrnsaverproto )
doc? ( app-doc/doxygen )
nls? ( sys-devel/gettext )"

S="${WORKDIR}/${MY_PV}"

# Enable Default protocols
DYNAMIC_PRPLS="irc,jabber,oscar,yahoo,simple,msn,myspace"

# List of plugins
# app-accessibility/pidgin-festival
# net-im/librvp
# x11-plugins/guifications
# x11-plugins/pidgin-encryption
# x11-plugins/pidgin-extprefs
# x11-plugins/pidgin-hotkeys
# x11-plugins/pidgin-latex
# x11-plugins/pidgin-libnotify
# x11-plugins/pidgin-otr
# x11-plugins/pidgin-rhythmbox
# x11-plugins/purple-plugin_pack
# x11-themes/pidgin-smileys

print_pidgin_warning() {
ewarn
ewarn "If you experience problems with pidgin, file them as bugs with"
ewarn "Gentoo's bugzilla, http://bugs.gentoo.org"
ewarn
ewarn "Be sure to USE=\"debug\" and include a backtrace for any seg"
ewarn "faults, see http://developer.pidgin.im/wiki/GetABacktrace for details on"
ewarn "backtraces."
ewarn
ewarn "Please read the pidgin FAQ at http://developer.pidgin.im/wiki/FAQ"
ewarn
}

pkg_setup() {
print_pidgin_warning

if use gadu && built_with_use net-libs/libgadu ssl ; then
eerror
eerror "You need to rebuild net-libs/libgadu with USE=-ssl in order"
eerror "enable gadu gadu support in pidgin."
eerror
die "Configure failed"
fi

if use ncurses && ! built_with_use sys-libs/ncurses unicode; then
eerror
eerror "You need to rebuild sys-libs/ncurses with USE=unicode in order"
eerror "to build finch the console client of pidgin."
eerror
die "Configure failed"
fi

if ! use gtk && ! use ncurses ; then
einfo
elog "You did not pick the ncurses or gtk use flags, only libpurple"
elog "will be built."
einfo
fi

if use zephyr && ! built_with_use app-crypt/mit-krb5 krb4 ; then
eerror
eerror "You need to rebuild app-crypt/mit-krb5 with USE=krb4 in order to"
eerror "enable krb4 support for the zephyr protocol in pidgin"
eerror
die "Configure failed"
fi

}

src_compile() {
# Stabilize things, for your own good
strip-flags
replace-flags -O? -O2

# -msse2 doesn't play nice on gcc 3.2
[[ "`gcc-version`" == "3.2" ]] && filter-flags -msse2

local myconf

if use gadu; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},gg"
myconf="${myconf} --with-gadu-includes=."
myconf="${myconf} --with-gadu-libs=."
fi

if use silc; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},silc"
fi

if use qq; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},qq"
fi

if use meanwhile; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},sametime"
fi

if use bonjour; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},bonjour"
fi

if use groupwise; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},novell"
fi

if use zephyr; then
DYNAMIC_PRPLS="${DYNAMIC_PRPLS},zephyr"
fi

if use gnutls ; then
einfo "Disabling NSS, using GnuTLS"
myconf="${myconf} --enable-nss=no --enable-gnutls=yes"
myconf="${myconf} --with-gnutls-includes=/usr/include/gnutls"
myconf="${myconf} --with-gnutls-libs=/usr/$(get_libdir)"
else
einfo "Disabling GnuTLS, using NSS"
myconf="${myconf} --enable-gnutls=no --enable-nss=yes"
fi

econf \
$(use_enable ncurses consoleui) \
$(use_enable nls) \
$(use_enable perl) \
$(use_enable gtk gtkui) \
$(use_enable gtk startup-notification) \
$(use_enable gtk screensaver) \
$(use_enable gtk sm) \
$(use_enable tcl) \
$(use_enable spell gtkspell) \
$(use_enable tk) \
$(use_enable debug) \
$(use_enable dbus) \
$(use_enable meanwhile) \
$(use_enable eds gevolution) \
$(use_enable gstreamer) \
$(use_enable sasl cyrus-sasl ) \
$(use_enable doc doxygen) \
$(use_enable prediction cap) \
$(use_enable networkmanager nm) \
$(use_with zephyr krb4) \
$(use_enable bonjour avahi) \
"--with-dynamic-prpls=${DYNAMIC_PRPLS}" \
--disable-mono \
--x-includes=/usr/include/X11 \
${myconf} || die "Configuration failed"
#$(use_enable mono) \

emake || die "make failed"
}

src_install() {
gnome2_src_install
use perl && fixlocalpod
dodoc AUTHORS HACKING INSTALL NEWS README ChangeLog

# Remove superfluous desktop file
use gtk || rm -rf "${D}/usr/share/applications"
}

pkg_postinst() {
gnome2_pkg_postinst
print_pidgin_warning
}