# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=4 inherit git-2 eutils gnome2 versionator autotools DESCRIPTION="Graphical IRC client based on XChat" SRC_URI="" EGIT_REPO_URI="https://github.com/hexchat/${PN}.git git://github.com/hexchat/${PN}.git" DESCRIPTION="Graphical IRC client based on XChat" HOMEPAGE="http://www.hexchat.org/" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="dbus fastscroll +gtk ipv6 libnotify mmx nls ntlm perl python spell ssl tcl" RDEPEND=">=dev-libs/glib-2.6.0:2 x11-libs/pango !=dev-libs/dbus-glib-0.71 ) gtk? ( >=x11-libs/gtk+-2.10.0:2 ) libnotify? ( x11-libs/libnotify ) ntlm? ( net-libs/libntlm ) perl? ( >=dev-lang/perl-5.8.0 ) python? ( =dev-lang/python-2* ) tcl? ( dev-lang/tcl ) spell? ( app-text/gtkspell:2 ) ssl? ( >=dev-libs/openssl-0.9.6d )" DEPEND="${RDEPEND} virtual/pkgconfig nls? ( sys-devel/gettext )" src_unpack() { if [[ ${PV} == "9999" ]] ; then git-2_src_unpack fi } pkg_setup() { # Added for to fix a sparc seg fault issue by Jason Wever # I'm not sure this is still needed. if [[ ${ARCH} = sparc ]] ; then replace-flags "-O[3-9]" "-O2" fi } src_prepare() { epatch "${FILESDIR}"/${PN}-2.9.1-input-box.patch \ "${FILESDIR}"/${PN}-2.8.8-cflags.patch # use libdir/hexchat/plugins as the plugin directory if [[ $(get_libdir) != "lib" ]] ; then sed -i -e 's:${prefix}/lib/hexchat:${libdir}/hexchat:' \ "${S}"/configure.in || die fi ./autogen.sh } src_configure() { econf \ --enable-shm \ $(use_enable dbus) \ $(use_enable ipv6) \ $(use_enable mmx) \ $(use_enable nls) \ $(use_enable ntlm) \ $(use_enable perl) \ $(use_enable python) \ $(use_enable spell spell gtkspell) \ $(use_enable ssl openssl) \ $(use_enable tcl) \ $(use_enable gtk gtkfe) \ $(use_enable !gtk textfe) \ $(use_enable fastscroll xft) } src_install() { default prune_libtool_files --all # install plugin development header insinto /usr/include/hexchat doins src/common/xchat-plugin.h || die "doins failed" dodoc ChangeLog README* || die "dodoc failed" # remove useless desktop entry when gtk USE flag is unset if ! use gtk ; then rm "${ED}"/usr/share/applications -rf fi # Don't install .la files find "${ED}" -name '*.la' -delete } pkg_postinst() { if use !gtk ; then elog "You have disabled the gtk USE flag. This means you don't have" elog "the GTK-GUI for HexChat but only a text interface called \"hexchat-text\"." fi gnome2_icon_cache_update }