summaryrefslogtreecommitdiff
blob: 9c69c7862509c8488fdad8069713f43485adb90d (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
91
92
93
94
95
96
97
98
99
100
101
102
103
# Copyright 1999-2001 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/net-irc/bitchx/bitchx-1.0.18-r5.ebuild,v 1.3 2002/05/23 06:50:15 seemant Exp $

A=ircii-pana-1.0c18.tar.gz
S=${WORKDIR}/BitchX
DESCRIPTION="An IRC Client"
SRC_URI="ftp://ftp.bitchx.com/pub/BitchX/source/${A}"
HOMEPAGE="http://www.bitchx.com/"

DEPEND="virtual/glibc
        >=sys-libs/ncurses-5.1 
        ssl? ( >=dev-libs/openssl-0.9.6 )
	gnome? ( =x11-libs/gtk+-1.2*
	         >=media-libs/imlib-1.9.10-r1
 	         >=gnome-base/gnome-libs-1.4.1.2-r1 )
	esd? ( >=media-sound/esound-0.2.5
	       >=media-libs/audiofile-0.1.5 )"

src_unpack() {
	unpack ${A}
	cd ${S}
	patch -p1 < ${FILESDIR}/${PF}-gentoo.diff || die
	patch -p1 < ${FILESDIR}/${P}-dupver.patch || die
}

src_compile() {
	local myopts

	if [ -n "`use ssl`" ]
	then
		myopts="$myopts --with-ssl"
	fi


	if [ -n "`use esd`" ]
	then
		myopts="$myopts --enable-sound"
	fi
	
	if [ -z "`use gnome`" ]
	then
	    myopts="$myopts --without-gtk"
	fi

	./configure --prefix=/usr --host=${CHOST} --build=${CHOST}	\
		    --enable-cdrom --enable-ipv6 --with-plugins 	\
		    ${myopts} || die
	emake || die

	if [ -n "`use gnome`" ]
	then
		myopts="$myopts --with-gtk"
		./configure --prefix=/usr --host=${CHOST} --build=${CHOST}	\
		    --enable-cdrom --enable-ipv6 --with-plugins 	\
		    ${myopts} || die
		emake || die
	fi

}

src_install () {
	make prefix=${D}/usr install || die
	cd ${D}/usr/bin

        if [ -n "`use gnome`" ]
	then
		exeinto /usr/bin
		newexe ${S}/source/BitchX BitchX-1.0c18
		dosym gtkBitchX-1.0c18 /usr/bin/gtkBitchX
	fi
	dosym BitchX-1.0c18 /usr/bin/BitchX

	chmod -x ${D}/usr/lib/bx/plugins/BitchX.hints

	cd ${S}
    	dodoc Changelog README* IPv6-support
    	cd doc
    	insinto /usr/X11R6/include/bitmaps
    	doins BitchX.xpm

    	dodoc BitchX-* BitchX.bot *.doc BitchX.faq README.hooks 
    	dodoc bugs *.txt functions ideas mode tcl-ideas watch
    	dodoc *.tcl
    	docinto html
    	dodoc *.html

    	docinto plugins
    	dodoc plugins
    	cd ../dll
    	insinto /usr/lib/bx/wav
    	doins wavplay/*.wav
    	cp acro/README acro/README.acro
    	dodoc acro/README.acro
    	cp arcfour/README arcfour/README.arcfour
    	dodoc arcfour/README.arcfour
    	cp blowfish/README blowfish/README.blowfish
    	dodoc blowfish/README.blowfish
    	dodoc nap/README.nap
    	cp qbx/README qbx/README.qbx
    	dodoc qbx/README.qbx
}