Add patch for xchat that removes the space after nick-completed nicknames.
[overlay.git] / net-irc / xchat / xchat-2.8.6-r2.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-irc/xchat/xchat-2.8.6-r2.ebuild,v 1.3 2009/09/07 13:36:02 armin76 Exp $
4
5 inherit eutils versionator gnome2
6
7 DESCRIPTION="Graphical IRC client"
8 SRC_URI="http://www.xchat.org/files/source/$(get_version_component_range 1-2)/${P}.tar.bz2
9         mirror://sourceforge/${PN}/${P}.tar.bz2
10         xchatdccserver? ( mirror://gentoo/${PN}-dccserver-0.6.patch.bz2 )"
11 HOMEPAGE="http://www.xchat.org/"
12
13 LICENSE="GPL-2"
14 SLOT="2"
15 KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
16 IUSE="perl dbus tcl python ssl mmx ipv6 libnotify nls spell xchatnogtk xchatdccserver xft"
17
18 RDEPEND=">=dev-libs/glib-2.6.0
19         !xchatnogtk? ( >=x11-libs/gtk+-2.10.0 )
20         ssl? ( >=dev-libs/openssl-0.9.6d )
21         perl? ( >=dev-lang/perl-5.6.1 )
22         python? ( >=dev-lang/python-2.2 )
23         tcl? ( dev-lang/tcl )
24         dbus? ( >=dev-libs/dbus-glib-0.71 )
25         spell? ( app-text/gtkspell )
26         libnotify? ( x11-libs/libnotify )
27         !<net-irc/xchat-gnome-0.9"
28
29 DEPEND="${RDEPEND}
30         >=dev-util/pkgconfig-0.7
31         nls? ( sys-devel/gettext )"
32
33 src_unpack() {
34         unpack ${A}
35         cd "${S}"
36
37         use xchatdccserver && epatch "${DISTDIR}"/xchat-dccserver-0.6.patch.bz2
38
39         # use libdir/xchat/plugins as the plugin directory
40         if [ $(get_libdir) != "lib" ] ; then
41                 sed -i -e 's:${prefix}/lib/xchat:${libdir}/xchat:' \
42                         "${S}"/configure{,.in} || die
43         fi
44
45         epatch "${FILESDIR}"/xchat-2.8.6-nickcompletion_without_space.diff
46         epatch "${FILESDIR}"/xc286-smallfixes.diff
47         epatch "${FILESDIR}"/${P}-shm-pixmaps.patch
48
49         # don't disable deprecated gtk+ symbols, it's not forwards compatible, bug 234458
50         sed -i -e '/define GTK_DISABLE_DEPRECATED/d' src/fe-gtk/*.c
51 }
52
53 src_compile() {
54         # Added for to fix a sparc seg fault issue by Jason Wever <weeve@gentoo.org>
55         if [[ ${ARCH} = sparc ]] ; then
56                 replace-flags "-O[3-9]" "-O2"
57         fi
58
59         # xchat's configure script uses sys.path to find library path
60         # instead of python-config (#25943)
61         unset PYTHONPATH
62
63         econf \
64                 --enable-shm \
65                 $(use_enable ssl openssl) \
66                 $(use_enable perl) \
67                 $(use_enable python) \
68                 $(use_enable tcl) \
69                 $(use_enable mmx) \
70                 $(use_enable ipv6) \
71                 $(use_enable nls) \
72                 $(use_enable dbus) \
73                 $(use_enable xft) \
74                 $(use_enable spell spell gtkspell) \
75                 $(use_enable !xchatnogtk gtkfe) \
76                 || die "econf failed"
77
78         emake || die "emake failed"
79 }
80
81 src_install() {
82         USE_DESTDIR=1 gnome2_src_install || die "make install failed"
83
84         # install plugin development header
85         insinto /usr/include/xchat
86         doins src/common/xchat-plugin.h || die "doins failed"
87
88         dodoc ChangeLog README* || die "dodoc failed"
89 }
90
91 pkg_postinst() {
92         elog
93         elog "XChat binary has been renamed from xchat-2 to xchat."
94         elog
95
96         if has_version net-irc/xchat-systray
97         then
98                 elog "XChat now includes it's own systray icon, you may want to remove net-irc/xchat-systray."
99                 elog
100         fi
101 }