| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-p2p/gtk-gnutella/gtk-gnutella-0.98.2.ebuild,v 1.5 2012/02/23 20:22:49 ranger Exp $
|
| 4 |
|
| 5 |
EAPI="2"
|
| 6 |
|
| 7 |
inherit eutils
|
| 8 |
|
| 9 |
IUSE="nls dbus ssl +gtk"
|
| 10 |
|
| 11 |
DESCRIPTION="A GTK+ Gnutella client"
|
| 12 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
| 13 |
HOMEPAGE="http://gtk-gnutella.sourceforge.net/"
|
| 14 |
|
| 15 |
SLOT="0"
|
| 16 |
LICENSE="GPL-2"
|
| 17 |
KEYWORDS="amd64 ppc x86 ~x86-fbsd"
|
| 18 |
|
| 19 |
RDEPEND="
|
| 20 |
dev-libs/glib:2
|
| 21 |
sys-libs/zlib
|
| 22 |
gtk? ( >=x11-libs/gtk+-2.2.1:2 )
|
| 23 |
dbus? ( >=sys-apps/dbus-0.35.2 )
|
| 24 |
ssl? ( >=net-libs/gnutls-2.2.5 )
|
| 25 |
nls? ( >=sys-devel/gettext-0.11.5 )"
|
| 26 |
DEPEND="${RDEPEND}
|
| 27 |
virtual/pkgconfig"
|
| 28 |
|
| 29 |
src_configure() {
|
| 30 |
# There is no option to turn off optimization through the build.sh
|
| 31 |
# script.
|
| 32 |
sed -i -e "s/Configure -Oder/Configure -Oder -Doptimize=none/" build.sh || die
|
| 33 |
|
| 34 |
# The build script does not support the equivalent --enable
|
| 35 |
# options so we must construct the configuration by hand.
|
| 36 |
|
| 37 |
local myconf
|
| 38 |
|
| 39 |
if ! use nls; then
|
| 40 |
myconf="${myconf} --disable-nls"
|
| 41 |
fi
|
| 42 |
|
| 43 |
if ! use dbus; then
|
| 44 |
myconf="${myconf} --disable-dbus"
|
| 45 |
fi
|
| 46 |
|
| 47 |
if ! use ssl; then
|
| 48 |
myconf="${myconf} --disable-gnutls"
|
| 49 |
fi
|
| 50 |
|
| 51 |
if use gtk; then
|
| 52 |
myconf="${myconf} --gtk2"
|
| 53 |
else
|
| 54 |
myconf="${myconf} --topless"
|
| 55 |
fi
|
| 56 |
|
| 57 |
./build.sh \
|
| 58 |
--configure-only \
|
| 59 |
--prefix="/usr" \
|
| 60 |
--cc=$(tc-getCC) \
|
| 61 |
${myconf}
|
| 62 |
}
|
| 63 |
|
| 64 |
src_install() {
|
| 65 |
dodir /usr/bin
|
| 66 |
emake INSTALL_PREFIX="${D}" install || die "Install failed"
|
| 67 |
dodoc AUTHORS ChangeLog README TODO
|
| 68 |
|
| 69 |
# Touch the symbols file into the future to avoid warnings from
|
| 70 |
# gtk-gnutella later on, since we will most likely strip the binary.
|
| 71 |
touch --date="next minute" "${D}/usr/lib/gtk-gnutella/gtk-gnutella.nm" || die
|
| 72 |
}
|