# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ IUSE="gnome gtk2 xml2" DESCRIPTION="A GTK+ Gnutella client" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" HOMEPAGE="http://gtk-gnutella.sourceforge.net/" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86 ~ppc ~sparc" DEPEND="xml2? ( dev-libs/libxml2 ) ( gtk2? ( =dev-libs/glib-2* =x11-libs/gtk+-2* ) : ( =dev-libs/glib-1.2* =x11-libs/gtk+-1.2* ) )" # Depends on a too new version of gettext. # nls? ( >=sys-devel/gettext-0.12.1 ) src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${P}-gcc3.3.patch } src_compile() { local myconf if [ `use gtk2` ]; then myconf="-Dgtkversion=2" else myconf="-Dgtkversion=1" fi if [ `use xml2` ]; then myconf="${myconf} -Dd_libxml2" else myconf="${myconf} -Ud_libxml2" fi # Depends on a too new version of gettext. # if [ `use nls` ]; then # myconf="${myconf} -Dd_enablenls" # else myconf="${myconf} -Ud_enablenls" # fi ./Configure -d -s -e \ -Dprefix="/usr" \ -Dprivlib="/usr/share/gtk-gnutella" \ -Dccflags="${CFLAGS}" \ ${myconf} \ -Doptimize=" " \ -Dofficial="true" || die "Configure failed" emake || die "Compile failed" } src_install() { dodir /usr/bin make INSTALL_PREFIX=${D} install || die "Install failed" find ${D}/usr/share -type f -exec chmod a-x {} \; dodoc AUTHORS ChangeLog README TODO use gnome && ( \ insinto /usr/share/gnome/apps/Internet doins ${FILESDIR}/gtk-gnutella.desktop ) } pkg_postinst() { if [ `use gtk2` ]; then ewarn "Please note that the Gtk2 interface is considered \"experimental\" by" ewarn "the gtk-gnutella developers. If it proves to be unstable, please file" ewarn "a bug report with them (${HOMEPAGE})." echo fi if [ ! `use xml2` ]; then ewarn "You have installed gtk-gnutella without xml2 support. As such, your" ewarn "search filters may not be saved when you quit the application." einfo "If you would like this feature enabled, re-emerge with USE=\"xml2\"." echo fi }