]> Pileus Git - ~andy/sunrise/blob - app-crypt/qca-gnupg/qca-gnupg-0.1_p20060406.ebuild
09606b5523c3bfd3741262450b0f2f4ab1e40b9a
[~andy/sunrise] / app-crypt / qca-gnupg / qca-gnupg-0.1_p20060406.ebuild
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils qt4
6
7 MY_PV="${PV/_p/-}"
8 MY_P="${PN}-${MY_PV}"
9
10 DESCRIPTION="Qt GPG frontend API, plugin for QCA"
11 HOMEPAGE="http://delta.affinix.com/qca/"
12 SRC_URI="http://delta.affinix.com/download/qca/2.0/beta2/${MY_P}.tar.bz2"
13
14 LICENSE="GPL-2"
15 SLOT="2"
16 KEYWORDS="~x86 ~amd64"
17 IUSE="debug"
18
19 RDEPEND="$(qt_min_version 4.1.0)
20         >app-crypt/qca-1.99"
21
22 DEPEND="${RDEPEND}
23         >=sys-apps/sed-4.0"
24
25 S="${WORKDIR}/${MY_P}"
26
27 src_unpack() {
28         unpack ${A}
29
30         cd ${S}
31         epatch ${FILESDIR}/${PN}_fix.diff
32 }
33
34 src_compile() {
35         local qmyconf="CONFIG += no_fixpath"
36
37         QTDIR="/usr/lib" ./configure || die "configure failed"
38
39         # check wheter qt was build with debug use flag
40         if ! built_with_use qt debug || ! use debug; then
41                 qmyconf="${qmyconf} release"
42         else
43                 qmyconf="${qmyconf} debug"
44         fi;
45
46         qmake ${PN}.pro \
47                 QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
48                 QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
49                 QMAKE_RPATH= \
50                 QTDIR="/usr/lib" \
51                 "${qmyconf}" \
52                 || die "qmake failed"
53
54         # ugly workaround...
55         if ! built_with_use qt debug || ! use debug; then
56                 sed -i -e 's/QtCore_debug/QtCore/g' Makefile
57         fi;
58
59         make || die "make failed"
60 }
61
62 src_install() {
63         make INSTALL_ROOT="${D}" install || die "make install failed"
64         if [ "$(get_libdir)" != "lib" ]; then
65                 mv ${D}/usr/lib ${D}/usr/$(get_libdir)
66         fi
67 }