# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils darcs qt4 confutils EDARCS_REPOSITORY="http://dev.psi-im.org/darcs/psi" EDARCS_GET_CMD="get --partial --set-scripts-executable" EDARCS_UPDATE_CMD="pull --set-scripts-executable" IUSE="ssl crypt jingle xscreensaver plugins xmms debug" DESCRIPTION="QT 4.x Jabber Client, with Licq-like interface" HOMEPAGE="http://psi.affinix.com" SLOT="0" LICENSE="GPL-2" KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" RDEPEND=" >app-crypt/qca-1.99 ssl? ( >=app-crypt/qca-openssl ) crypt? ( >=app-crypt/qca-gnupg ) jingle? ( dev-libs/expat media-libs/speex net-libs/ortp ) xscreensaver? ( x11-misc/xscreensaver ) xmms? ( media-sound/xmms ) $(qt_min_version 4.1.2)" DEPEND="${RDEPEND}" src_compile() { local myconf="" local qmyconf="CONFIG += no_fixpath" einfo "" einfo "Unpacking language files, you must have linguas_* in USE where" einfo "'*' is the language files you wish. English is always available" einfo "" cd ${WORKDIR} if ! [ -d langs ] ; then mkdir langs fi local i for i in `ls -c1 | grep "\.{ts,qm}$"` ; do mv $i langs done cd ${S} epatch ${FILESDIR}/psi-slotted_qca2.patch if ! built_with_use qt debug || ! use debug then sed -i -e 's/CONFIG += debug/#CONFIG += debug/g' src/src.pro qmyconf="${qmyconf} release" else qmyconf="${qmyconf} debug" fi if use jingle then ewarn "psi-jingle is still alpha-code" CONFSCRIPT=configure-jingle myconf="${myconf} $(use_enable jingle)" if use xmms then eerror "No xmms-support in psi-jingle" die fi else CONFSCRIPT=configure if use xmms then einfo "Enabling XMMS-support" else einfo "Disabling XMMS-support" myconf="${myconf} --disable-xmms" fi fi QTDIR=/usr/lib ./${CONFSCRIPT} \ --prefix=/usr \ $(use_enable plugins) \ $(enable_extension_disable xss xscreensaver) \ ${myconf} \ --disable-growl \ || die "configure failed" # for CXXFLAGS from make.conf cd ${S}/src qmake src.pro \ QTDIR=/usr/lib \ QMAKE_CFLAGS_RELEASE="${CFLAGS}" \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE=/usr/bin/qmake \ QMAKE_RPATH= \ "${qmyconf}" \ || die "qmake failed" cd ${S} qmake psi.pro \ QTDIR=/usr/lib \ QMAKE_CFLAGS_RELEASE="${CFLAGS}" \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE=/usr/bin/qmake \ QMAKE_RPATH= \ "${qmyconf}" \ || die "qmake failed" emake || die "make failed" einfo "Building language packs" cd ${WORKDIR}/langs for i in `ls -c1 | grep "\.ts$"` ; do lrelease $i done; } src_install() { einfo "Installing" make INSTALL_ROOT="${D}" install || die "Make install failed" #this way the docs will also be installed in the standard gentoo dir for i in roster system emoticons; do newdoc ${S}/iconsets/${i}/README README.${i} done; newdoc certs/README README.certs dodoc ChangeLog README TODO #Install language packs cp ${WORKDIR}/langs/psi_*.qm ${D}/usr/share/psi/ }