Added a modified ebuild for mail-client/mailody that
[underlay.git] / app-crypt / qca / qca-2.0.0_rc2.ebuild
blob7854ea99b26e2f0c65cbc52b96ed5b5ef1a7af97
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 MVER="${PV%%_*}"
8 SVER="${PV/*_rc/test}"
9 MY_P="${PN}-${MVER}-${SVER}"
11 DESCRIPTION="Qt Cryptographic Architecture (QCA)"
12 HOMEPAGE="http://delta.affinix.com/qca/"
13 SRC_URI="http://delta.affinix.com/download/qca/${MVER/\.0/}/${SVER}/${MY_P}.tar.bz2"
15 LICENSE="LGPL-2"
16 SLOT="2"
17 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
18 IUSE="debug doc"
19 RESTRICT="strip test"
21 RDEPEND="$(qt4_min_version 4.2.0)"
22 DEPEND="${RDEPEND}
23 doc? ( app-doc/doxygen )"
25 S="${WORKDIR}/${MY_P}"
27 pkg_setup() {
28 if use debug && ! built_with_use qt debug; then
29 einfo
30 einfo "You are trying to compile ${PN} package with active USE=\"debug\""
31 einfo "while qt4 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 qt4 with debug USE flag"
37 einfo
38 die "can't emerge ${PN} with debug USE flag"
42 src_unpack() {
43 unpack ${A}
44 cd "${S}"
46 epatch "${FILESDIR}"/${PN}-${MVER}-configure.patch
47 epatch "${FILESDIR}"/${P}-defer-plugin-updates.patch
50 src_compile() {
51 local myconf="--no-separate-debug-info --disable-tests"
53 if use debug; then
54 myconf="${myconf} --debug-and-release"
55 else
56 myconf="${myconf} --release"
59 ./configure \
60 --prefix=/usr \
61 --qtdir=/usr \
62 --includedir="/usr/include/qca2" \
63 --libdir="/usr/$(get_libdir)/qca2" \
64 ${myconf} \
65 || die "configure failed"
67 eqmake4 ${PN}.pro
68 emake || die "make failed"
70 use doc && doxygen
73 src_install() {
74 emake INSTALL_ROOT="${D}" install || die "make install failed"
75 dodoc README TODO
77 cat > "${T}/44qca2" << EOF
78 LDPATH=/usr/$(get_libdir)/qca2
79 EOF
80 doenvd "${T}/44qca2"
82 if use doc; then
83 dohtml -r "${S}"/apidocs/html || die "dohtml failed"