Fixed building of qca and qca-plugins with USE="debug".
[underlay.git] / app-crypt / qca-pkcs11 / qca-pkcs11-0.1_p20070829.ebuild
blob3285e58d6fa53891b40a8218597e4a0bbf583f1c
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header:
5 inherit eutils qt4
7 QCA_VER="2.0-test3"
8 MY_PV="${PV/_p/-}"
9 MY_P="${PN}-${MY_PV}"
11 DESCRIPTION="PKCS#11 (smartcard) plugin for QCA"
12 HOMEPAGE="http://delta.affinix.com/qca/"
13 SRC_URI="http://delta.affinix.com/download/qca/${QCA_VER/-*/}/${QCA_VER/*-/}/${MY_P}.tar.bz2"
15 LICENSE="LGPL-2"
16 SLOT="2"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="debug"
20 RDEPEND=">=app-crypt/qca-2.0.0_rc2
21 app-crypt/qca-ossl
22 dev-libs/pkcs11-helper"
23 DEPEND="${RDEPEND}"
25 S="${WORKDIR}/${MY_P}"
27 pkg_setup() {
28 if use debug && ! built_with_use '>=app-crypt/qca-2.0.0_rc' debug; then
29 einfo
30 einfo "You are trying to compile ${PN} package with active USE=\"debug\""
31 einfo "while qca is build without this particular flag. It will not"
32 einfo "work."
33 einfo
34 einfo "Possible solutions to this problem are:"
35 einfo "a) install package ${PN} without debug USE flag"
36 einfo "b) re-emerge qca with debug USE flag"
37 einfo
38 die "can't emerge ${PN} with debug USE flag"
42 src_compile() {
43 local myconf="--release"
44 use debug && myconf="--debug"
46 ./configure \
47 --qtdir=/usr \
48 --no-separate-debug-info \
49 ${myconf} || die "configure failed"
51 eqmake4 ${PN}.pro
52 emake || die "make failed"
55 src_install() {
56 emake INSTALL_ROOT="${D}" install || die "make install failed"
57 dodoc README