# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils multilib qt4 toolchain-funcs #MY_PV="${PV:8:4}-${PV:12:2}-${PV:14:2}" #MY_P="${PN}-dev-snapshot-${MY_PV}" MY_PV="${PV:0:4}-RC${PV:7:3}" MY_P="${PN}-${MY_PV}" DESCRIPTION="QT 4.x Jabber Client, with Licq-like interface" HOMEPAGE="http://psi-im.org/" #SRC_URI="http://psi-im.org/files/snapshot/${MY_P}.tar.bz2" SRC_URI="mirror://sourceforge/psi/${MY_P}.tar.bz2" RESTRICT="mirror" IUSE="crypt doc kernel_linux spell ssl xscreensaver" SLOT="0" LICENSE="GPL-2" KEYWORDS="~amd64 ~x86" S="${WORKDIR}/${MY_P}" COMMONDEP="$(qt4_min_version 4.2.3) media-libs/libpng sys-libs/zlib >=app-crypt/qca-2.0.0_beta7 spell? ( app-text/aspell ) ssl? ( dev-libs/openssl ) xscreensaver? ( x11-libs/libXScrnSaver )" RDEPEND="${COMMONDEP} crypt? ( >=app-crypt/qca-gnupg-0.1_p20070706 ) ssl? ( >=app-crypt/qca-ossl-0.1_p20070706 )" DEPEND="${COMMONDEP} 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 "Qt4 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" use kernel_linux || myconf="${myconf} --disable-dnotify" use ssl || myconf="${myconf} --disable-openssl" use spell || myconf="${myconf} --disable-aspell" use xscreensaver || myconf="${myconf} --disable-xss" QTDIR=/usr/$(get_libdir) ./configure \ --prefix=/usr ${myconf} \ || die "configure failed" # for custom CXXFLAGS - should use eqmake in near future cd ${S}/src qmake src.pro \ QTDIR=/usr/$(get_libdir) \ QMAKE_CXX=$(tc-getCXX) \ QMAKE_LINK=$(tc-getCXX) \ QMAKE_CFLAGS_RELEASE="${CFLAGS}" \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE_LFLAGS_RELEASE="${LDFLAGS}" \ QMAKE=/usr/bin/qmake \ QMAKE_RPATH= \ "CONFIG+=no_fixpath release" \ || die "qmake src.pro failed" cd ${S} qmake psi.pro \ QTDIR=/usr/$(get_libdir) \ QMAKE_CXX=$(tc-getCXX) \ QMAKE_LINK=$(tc-getCXX) \ QMAKE_CFLAGS_RELEASE="${CFLAGS}" \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE_LFLAGS_RELEASE="${LDFLAGS}" \ QMAKE=/usr/bin/qmake \ QMAKE_RPATH= \ "CONFIG+=no_fixpath release" \ || die "qmake psi.pro failed" emake || die "make failed" if use doc; then cd ${S}/doc make api_public || die "make api_public failed" fi } src_install() { emake INSTALL_ROOT="${D}" install || die "make 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 if use doc; then cd ${S}/doc dohtml -r api || die "dohtml failed" fi }