summaryrefslogtreecommitdiff
blob: 8937881e5b036930dce082b1f930389953d0163d (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-im/silc-client/silc-client-1.0.1-r1.ebuild,v 1.4 2004/10/19 10:54:33 absinthe Exp $

DESCRIPTION="IRSSI-based text client for Secure Internet Live Conferencing"
SRC_URI="http://www.silcnet.org/download/client/sources/${P}.tar.bz2"
HOMEPAGE="http://silcnet.org/"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 ppc ~sparc amd64"
IUSE="ipv6 perl debug"

DEPEND="=dev-libs/glib-1.2*
	perl? (
		dev-lang/perl
		!net-irc/irssi
		!net-irc/irssi-cvs
	)
	sys-libs/ncurses
	!<=net-im/silc-toolkit-0.9.12-r1"

src_unpack() {
	unpack ${A}
	cd ${S}

	sed -i \
		-e "s:-g -O2:${CFLAGS}:g" \
		configure
}

src_compile() {
	econf \
		--datadir=/usr/share \
		--with-datadir=/usr/share/${PN} \
		--with-docdir=/usr/share/doc/${PF} \
		--with-helpdir=/usr/share/${PN}/help \
		--with-simdir=/usr/lib/${PN} \
		--with-mandir=/usr/share/man \
		--with-ncurses \
		--without-silcd \
		`use_enable ipv6` \
		`use_enable debug` \
		|| die "econf failed"
	emake -j1 || die "emake failed"
}

src_install() {
	local myflags=""
	if use perl
	then
		R1="s/installsitearch='//"
		R2="s/';//"
		perl_sitearch="`perl -V:installsitearch | sed -e ${R1} -e ${R2}`"
		myflags="${myflags} INSTALLPRIVLIB=/usr/lib"
		myflags="${myflags} INSTALLARCHLIB=${perl_sitearch}"
		myflags="${myflags} INSTALLSITELIB=${perl_sitearch}"
		myflags="${myflags} INSTALLSITEARCH=${perl_sitearch}"
	fi

	make DESTDIR=${D} ${myflags} install || die "make install failed"

	rm -rf ${D}/etc ${D}/usr/libsilc* ${D}/usr/include
}