summaryrefslogtreecommitdiff
blob: 211d180004c346be3828796feefacd9bd22affdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-p2p/gtk-gnutella/gtk-gnutella-0.93.ebuild,v 1.3 2004/02/11 20:46:38 mholzer Exp $

IUSE="gnome gtk2 nls"

MY_P=${P/_r}
S=${WORKDIR}/${MY_P}
DESCRIPTION="A GTK+ Gnutella client"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
RESTRICT="nomirror"
HOMEPAGE="http://gtk-gnutella.sourceforge.net/"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~ppc ~sparc"

DEPEND="( gtk2? ( =dev-libs/glib-2* =x11-libs/gtk+-2* )
	      : ( =dev-libs/glib-1.2* =x11-libs/gtk+-1.2* ) )"
#DEPEND="=x11-libs/gtk+-1.2*
#	=dev-libs/glib-1.2*"
DEPEND="${DEPEND} || ( dev-util/yacc sys-devel/bison )"

src_compile() {
	if [ `use gtk2` ]; then
		GTK_VER=2
	else
		GTK_VER=1
	fi
	if [ `use nls` ]; then
		USE_NLS=y
	else
		USE_NLS=n
	fi

#	econf `use_enable gtk2`|| die "Configure failed"
	patch Configure < ${FILESDIR}/0.93-Configure.patch
	#FIXME: This should use the commandline defaults modification
	#stuff, fix this before next build
	cat << EOF | ./Configure || die "Configure Failed"




y
n
${GTK_VER}
y
/usr




${CC}


${CFLAGS}




${USE_NLS}






EOF
	emake || die "Make failed"
}

src_install () {

	make INSTALL_PREFIX=${D} install || die "Install failed"
	dodoc AUTHORS ChangeLog LICENSE MANIFEST README TODO doc
	use gnome && ( \
		insinto /usr/share/gnome/apps/Internet
		doins ${FILESDIR}/gtk-gnutella.desktop
	)
}

pkg_postinst () {
	if [ `use gtk2` ]; then
		ewarn "You have enabled the GTK2 build of gtk-gnutella, there"
		ewarn "is a known bug which causes an invalid assertion if"
		ewarn "you select passive search"
	fi
}