1 # Copyright 2005 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/qt4.eclass,v 1.38 2008/03/26 01:23:13 rion Exp $
5 # @ECLASS: qca-plugin.eclass
7 # Rion <rion@plotinka.ru>
8 # @BLURB: Eclass for QCA plugins
10 # This eclass will be used to build all svn qca plugins
12 inherit eutils qt4 subversion
16 ESVN_REPO_URI
="svn://anonsvn.kde.org/home/kde/trunk/kdesupport/qca/"
18 DEPEND
=">=app-crypt/qca-${PV}"
19 RDEPEND
="${RDEPEND} >=app-crypt/qca-${PV}"
21 # @FUNCTION: qca-plugin_pkg_setup
23 # rion <rion@plotinka.ru>
25 # Default pkg_setup function for packages that depends on qt-plugin
26 qca-plugin_pkg_setup
() {
27 if use debug
&& ! built_with_use
">=app-crypt/qca-9999" debug
; then
29 eerror
"You are trying to compile ${PN} with USE=\"debug\""
30 eerror
"while qca is built without this flag. It will not work."
32 eerror
"Possible solutions to this problem are:"
33 eerror
"a) install ${PN} without debug USE flag"
34 eerror
"b) re-emerge qca with debug USE flag"
36 die
"can't emerge ${PN} with debug USE flag"
41 # @FUNCTION: qca-plugin_src_unpack
43 # rion <rion@plotinka.ru>
45 # Default pkg_setup function for packages that depends on qt-plugin
46 qca-plugin_src_unpack
() {
48 cd "${S}/plugins/${PN}"
53 # @FUNCTION: qca-plugin_src_compile
55 # rion <rion@plotinka.ru>
57 # Default src_compile function for packages that depends on qt-plugin
58 qca-plugin_src_compile
() {
59 cd "${S}/plugins/${PN}"
60 # cannot use econf because of non-standard configure script
63 $
(use debug
&& echo "--debug" ||
echo "--release") \
64 --no-separate-debug-info \
65 || die
"configure failed"
68 emake || die
"make failed"
72 # @FUNCTION: qca-plugin_src_install
74 # rion <rion@plotinka.ru>
76 # Default src_install function for packages that depends on qt-plugin
77 qca-plugin_src_install
() {
78 cd "${S}/plugins/${PN}"
79 emake INSTALL_ROOT
="${D}" install || die
"make install failed"
82 EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_install