# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-im/centericq/centericq-4.21.0-r2.ebuild,v 1.7 2006/02/17 16:38:52 blubb Exp $ inherit eutils IUSE="bidi nls unicode ssl gnutls crypt icq jabber aim msn yahoo gg irc rss lj" DESCRIPTION="A ncurses ICQ/Yahoo!/AIM/IRC/MSN/Jabber/GaduGadu/RSS/LiveJournal Client" SRC_URI="http://thekonst.net/download/${P}.tar.bz2" HOMEPAGE="http://thekonst.net/en/centericq" SLOT="0" LICENSE="GPL-2" KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc x86" DEPEND="virtual/libc >=sys-libs/ncurses-5.2 bidi? ( dev-libs/fribidi ) jabber? ( crypt? ( >=app-crypt/gpgme-1.0.2 ) ) ssl? ( !gnutls? ( >=dev-libs/openssl-0.9.6b ) gnutls? ( net-libs/gnutls ) ) msn? ( net-misc/curl )" RDEPEND="${DEPEND} nls? ( sys-devel/gettext )" src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${P}-emacs_improve.diff epatch ${FILESDIR}/${P}-makefile_src.diff epatch ${FILESDIR}/${P}-browser.diff epatch ${FILESDIR}/${P}-libgadu.diff epatch ${FILESDIR}/${P}-icqface_help.diff epatch ${FILESDIR}/${P}-msg_esc.diff epatch ${FILESDIR}/${P}-amd64.diff epatch ${FILESDIR}/${P}-amd64_jabber.diff epatch ${FILESDIR}/${P}-amd64_connect.diff epatch ${FILESDIR}/${P}-security_CAN_2005-2448.diff epatch ${FILESDIR}/${P}-wrong_configure.diff epatch ${FILESDIR}/${P}-no_sys_mount_on_hurd.diff epatch ${FILESDIR}/${P}-memory_cleanup.diff epatch ${FILESDIR}/${P}-remote_segv.diff epatch ${FILESDIR}/${P}-stpcpy.diff epatch ${FILESDIR}/${P}-vgetstring.diff epatch ${FILESDIR}/${P}-jabber_segv.diff epatch ${FILESDIR}/${P}-new_msn.diff epatch ${FILESDIR}/${P}-msn_segv.diff use unicode && epatch ${FILESDIR}/${P}-utf8.diff } src_compile() { local myopts="--disable-konst" use nls && myopts="${myopts} --enable-locales-fix" || myopts="${myopts} --disable-nls" use bidi && myopts="${myopts} --with-fribidi" if use ssl && use gnutls ; then myopts="${myopts} --with-ssl --without-openssl" elif use ssl && ! use gnutls ; then myopts="${myopts} --with-ssl --with-openssl" else myopts="${myopts} --without-ssl" fi use icq || myopts="${myopts} --disable-icq" use jabber && { use crypt || myopts="${myopts} --without-gpgme" } || myopts="${myopts} --disable-jabber" use aim || myopts="${myopts} --disable-aim" use msn || myopts="${myopts} --disable-msn" if use msn && (! use ssl && ! use gnutls) ; then eerror "" eerror "USE flag problem" eerror "================" eerror "'msn' USE flag detected, but 'ssl' and 'gnutls' USE flag missing:" eerror "MSN support needs libcurl with SSL support." eerror "" die "Please either activate the 'ssl' or 'gnutls' USE flag or deactivate the 'msn' USE flag for net-im/centericq" fi use yahoo || myopts="${myopts} --disable-yahoo" use gg || myopts="${myopts} --disable-gg" use irc || myopts="${myopts} --disable-irc" use rss || myopts="${myopts} --disable-rss" use lj || myopts="${myopts} --disable-lj" # Re-run autconf and automake to keep from barfing. This is a hack. einfo "Running autoconf to fix configure scripts" for i in $(ls -1 {.,*-*}/configure.in); do IFS='/'; set -- ${i}; unset IFS; dir="${1}" einfo "-> dir: ${dir}" pushd ${dir} >/dev/null && WANT_AUTOCONF=2.5 autoconf && popd >/dev/null done econf ${myopts} || die "Configure failed" emake || die "Compilation failed" } src_install () { einstall || die "Installation failed" dodoc ABOUT-NLS AUTHORS ChangeLog COPYING FAQ README THANKS TODO }