blob: 2f58e9654da1306b24382ae334c034d4cd110f50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-crypt/qca/qca-2.0.0-r2.ebuild,v 1.5 2008/02/15 08:59:07 alonbl Exp $
EAPI="1"
inherit eutils multilib qt4
DESCRIPTION="Qt Cryptographic Architecture (QCA)"
HOMEPAGE="http://delta.affinix.com/qca/"
SRC_URI="http://delta.affinix.com/download/${PN}/${PV%.*}/${P}.tar.bz2"
LICENSE="LGPL-2"
SLOT="2"
KEYWORDS="~amd64 ~x86"
IUSE="debug doc examples"
RESTRICT="test"
DEPEND="
!<app-crypt/qca-1.0-r3
>=x11-libs/qt-4.2.0:4"
RDEPEND="${DEPEND}"
pkg_setup() {
if use debug && ! built_with_use x11-libs/qt:4 debug; then
echo
eerror "You are trying to compile ${PN} package with USE=\"debug\""
eerror "while qt4 is built without this particular flag."
echo
eerror "Possible solutions to this problem are:"
eerror "a) install package ${PN} without debug USE flag"
eerror "b) re-emerge qt4 with debug USE flag"
echo
die "can't emerge ${PN} with debug USE flag"
fi
}
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}/${P}-debug-same-pkgconfig-file.patch"
}
src_compile() {
_libdir=$(get_libdir)
local myconf
if use debug; then
myconf="--debug"
else
myconf="--release"
fi
# Multilib fix.
sed -e "/pcfiles.path/s:lib:${_libdir}:" \
-i "${S}"/configure || die "Multilib fix failed."
./configure \
--prefix=/usr \
--qtdir=/usr \
--includedir="/usr/include/qca2" \
--libdir="/usr/${_libdir}/qca2" \
--no-separate-debug-info \
--disable-tests \
${myconf} \
|| die "configure failed"
eqmake4 ${PN}.pro
emake || die "emake failed"
}
src_install() {
emake INSTALL_ROOT="${D}" install || die "emake install failed"
dodoc README TODO || die "dodoc failed."
cat <<-EOF > "${WORKDIR}"/44qca2
LDPATH=/usr/${_libdir}/qca2
EOF
doenvd "${WORKDIR}"/44qca2
if use doc; then
dohtml "${S}"/apidocs/html/* || die "Failed to install documentation"
fi
if use examples; then
insinto /usr/share/doc/${PF}/
doins -r "${S}"/examples || die "Failed to install examples"
fi
}
|