# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit confutils eutils qt4 MY_PV="${PV/_rc/-RC}" MY_P="${PN}-${MY_PV}" IUSE="doc spell ssl xscreensaver" DESCRIPTION="QT 4.x Jabber Client, with Licq-like interface" HOMEPAGE="http://psi-im.org/" SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" SLOT="0" LICENSE="GPL-2" KEYWORDS="~amd64 ~x86" S="${WORKDIR}/${MY_P}" RDEPEND="$(qt4_min_version 4.2.3) media-libs/libpng sys-libs/zlib dev-libs/glib >app-crypt/qca-1.99 sasl? ( dev-libs/cyrus-sasl ) spell? ( app-text/aspell ) ssl? ( dev-libs/openssl ) xscreensaver? ( x11-libs/libXScrnSaver )" DEPEND="${RDEPEND} doc? ( app-doc/doxygen )" pkg_setup() { if ! (built_with_use x11-libs/qt qt3support); then eerror "In order to compile Psi, you will need to recompile" eerror "qt-4.2 with qt3support USE-flag enabled." die "Recompile qt4 with qt3support use flag enabled" fi; } src_compile() { # growl is mac osx extension only - maybe someday we will want this local myconf="--disable-growl --disable-bundled-qca" QTDIR=/usr/lib ./configure \ --prefix=/usr \ $(enable_extension_disable xss xscreensaver) \ $(enable_extension_disable aspell spell) \ $(enable_extension_disable openssl ssl) \ ${myconf} || die "configure failed" # for custom CXXFLAGS - should use eqmake in near future cd ${S}/src qmake src.pro \ QTDIR=/usr/lib \ QMAKE_CFLAGS_RELEASE="${CFLAGS}" \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE=/usr/bin/qmake \ QMAKE_RPATH= \ "CONFIG+=no_fixpath release" \ || 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= \ "CONFIG+=no_fixpath release" \ || die "qmake failed" emake || die "make failed" if use doc; then cd ${S}/doc make api_public fi; } src_install() { emake INSTALL_ROOT="${D}" install || die "emake install failed" #this way the docs will also be installed in the standard gentoo dir newdoc ${S}/iconsets/roster/README README.roster newdoc ${S}/iconsets/system/README README.system newdoc certs/README README.certs dodoc README use doc && cp -ar ${S}/doc/api ${D}/usr/share/psi }