summaryrefslogtreecommitdiff
blob: ccd2853ae8514abf9bd0e92e546c3303c4457d1d (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header:

inherit eutils qt4

MVER="${PV/_*/}"
SVER="${PV/*_/}"
MY_P="${PN}-${MVER}-${SVER}"

DESCRIPTION="Qt Cryptographic Architecture (QCA)"
HOMEPAGE="http://delta.affinix.com/qca/"
SRC_URI="http://delta.affinix.com/download/qca/${MVER}/${SVER}/${MY_P}.tar.bz2"

LICENSE="GPL-2"
SLOT="2"
KEYWORDS="~x86 ~amd64"
IUSE="debug doc ssl"

RDEPEND="$(qt_min_version 4.1.0)"

DEPEND="${RDEPEND}
	doc? ( app-doc/doxygen )"

S="${WORKDIR}/${MY_P}"

src_unpack() {
	unpack ${A}

	cd ${S}
	epatch ${FILESDIR}/${PN}-allow_slotting.patch
}

src_compile() {
	local myconf=""
	local qmyconf="CONFIG += no_fixpath"

	# check wheter qt was build with debug use flag
	if ! built_with_use qt debug || ! use debug; then
		myconf="${myconf} --disable-tests"
		qmyconf="${qmyconf} release"
	else
		myconf="${myconf} --enable-debug"
		qmyconf="${qmyconf} debug"
	fi;

	QTDIR="/usr/lib" \
		./configure \
		--prefix=/usr \
		${myconf} \
		|| die "configure failed"

	qmake \
		QMAKE_CFLAGS_RELEASE="${CFLAGS}" \
		QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \
		QMAKE_RPATH= \
		QTDIR="/usr/lib" \
		"${qmyconf}" \
		${PN}.pro \
		|| die "qmake failed"
		
	make || die "make failed"

	use doc && doxygen
}

src_install() {
	make INSTALL_ROOT="${D}" install || die "make install failed"
	if [ "$(get_libdir)" != "lib" ]; then
		mv ${D}/usr/lib ${D}/usr/$(get_libdir)
	fi

	dodoc README TODO

	if use doc; then
		insinto /usr/share/doc/${PF}/doxydoc
		doins ${S}/apidocs/html/*
	fi;
}