# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: inherit eutils qt4 QCA_VER="2.0-beta5" MY_PV="${PV/_p/-}" MY_P="${PN}-${MY_PV}" DESCRIPTION="PKCS#11 features as a plugin for QCA" HOMEPAGE="http://delta.affinix.com/qca/" SRC_URI="http://delta.affinix.com/download/qca/${QCA_VER/-*/}/${QCA_VER/*-/}/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="2" KEYWORDS="~x86" IUSE="debug" RDEPEND="$(qt4_min_version 4.2.0) >=app-crypt/qca-2.0.0_beta5 dev-libs/pkcs11-helper" DEPEND="${RDEPEND}" S="${WORKDIR}/${MY_P}" pkg_setup() { if use debug && ! built_with_use qt debug; then einfo einfo "You are trying to compile ${PN} package with active USE=\"debug\"" einfo "while qt4 is build without this particular flag. It will not" einfo "work." einfo einfo "Possible solutions to this problem are:" einfo "a) install package ${PN} without debug USE flag" einfo "b) re-emerge qt4 with debug USE flag" einfo die "can't emerge ${PN} with debug USE flag" fi } src_compile() { local myconf="" if use debug; then myconf="--debug-and-release" else myconf="--release" fi ./configure --qtdir=/usr ${myconf} || die "configure failed" emake || die "make failed" } src_install() { emake INSTALL_ROOT="${D}" install || die "make install failed" }