# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Console vypress chat clone for *nix like systems." HOMEPAGE="http://deep.perm.ru/echat/" SRC_URI="http://deep.perm.ru/files/echat/${P}f1.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="en ru tu noportreuse noshell tcpserver" DEPEND="sys-apps/sed sys-libs/ncurses" RDEPEND="sys-libs/ncurses" S=${WORKDIR}/${P}f1 src_compile() { local myconf # Choose language use en && myconf="-DEN" use ru && myconf="-DRU" || myconf="-DEN" use tu && myconf="-DTU" || myconf="-DEN" # Some options use noportreuse || myconf="${myconf} -DPORTREUSE" use noshell || myconf="${myconf} -DSHELL" use tcpserver && myconf="${myconf} -DTCP" # Yes, guy didn't use configure, plain old Makefile. mv Makefile Makefile~ # So we do a bit of sed magic here. echo 's|^PREFIX=/usr/local$|PREFIX=/usr|g s|^DEFINES=.*$|DEFINES=-DLINUX -DCHARSET '${myconf}'|g' > sed_script sed -f sed_script Makefile~ > Makefile # And remove the backup and sed script rm Makefile~ sed_script emake || die } src_install() { local doc use en && doc="" use ru && doc=".ru" use tu && doc=".tu" dobin echat || die dodoc NEWS .echatrc.sample README${doc} }