1 |
commit: 9146141c89bf4249e78e602b1c18e858adca2143 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 28 18:51:43 2014 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 28 18:53:02 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=9146141c |
7 |
|
8 |
[app-crypt/qca] Add experimental multibuild support. |
9 |
|
10 |
This is subject to change as upstream is still in flux. |
11 |
|
12 |
Package-Manager: portage-2.2.14 |
13 |
|
14 |
--- |
15 |
app-crypt/qca/qca-9999.ebuild | 76 +++++++++++++++++++++++++++++++------------ |
16 |
1 file changed, 55 insertions(+), 21 deletions(-) |
17 |
|
18 |
diff --git a/app-crypt/qca/qca-9999.ebuild b/app-crypt/qca/qca-9999.ebuild |
19 |
index 8e313ba..f1c1452 100644 |
20 |
--- a/app-crypt/qca/qca-9999.ebuild |
21 |
+++ b/app-crypt/qca/qca-9999.ebuild |
22 |
@@ -4,7 +4,7 @@ |
23 |
|
24 |
EAPI=5 |
25 |
|
26 |
-inherit multilib cmake-utils git-r3 |
27 |
+inherit cmake-utils multilib multibuild git-r3 |
28 |
|
29 |
DESCRIPTION="Qt Cryptographic Architecture (QCA)" |
30 |
HOMEPAGE="http://delta.affinix.com/qca/" |
31 |
@@ -15,7 +15,6 @@ SLOT="2" |
32 |
KEYWORDS="" |
33 |
|
34 |
IUSE="botan debug doc examples gcrypt gpg logger nss openssl pkcs11 +qt4 qt5 sasl softstore test" |
35 |
-REQUIRED_USE="^^ ( qt4 qt5 )" |
36 |
|
37 |
RDEPEND=" |
38 |
!app-crypt/qca-cyrus-sasl |
39 |
@@ -54,31 +53,66 @@ qca_plugin_use() { |
40 |
echo "-DWITH_${2:-$1}_PLUGIN=$(use $1 && echo yes || echo no)" |
41 |
} |
42 |
|
43 |
+pkg_setup() { |
44 |
+ MULTIBUILD_VARIANTS=() |
45 |
+ if use qt4; then |
46 |
+ MULTIBUILD_VARIANTS+=( qt4 ) |
47 |
+ fi |
48 |
+ if use qt5; then |
49 |
+ MULTIBUILD_VARIANTS+=( qt5 ) |
50 |
+ fi |
51 |
+} |
52 |
+ |
53 |
src_configure() { |
54 |
- local mycmakeargs=( |
55 |
- -DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)/$(usex qt4 qt4 qt5)/plugins" |
56 |
- -DQCA_FEATURE_INSTALL_DIR="${EPREFIX}/usr/$(usex qt4 share $(get_libdir))/$(usex qt4 qt4 qt5)/mkspecs/features" |
57 |
- $(cmake-utils_use qt4 QT4_BUILD) |
58 |
- $(qca_plugin_use botan) |
59 |
- $(qca_plugin_use gcrypt) |
60 |
- $(qca_plugin_use gpg gnupg) |
61 |
- $(qca_plugin_use logger) |
62 |
- $(qca_plugin_use nss) |
63 |
- $(qca_plugin_use openssl ossl) |
64 |
- $(qca_plugin_use pkcs11) |
65 |
- $(qca_plugin_use sasl cyrus-sasl) |
66 |
- $(qca_plugin_use softstore) |
67 |
- $(cmake-utils_use_build test TESTS) |
68 |
- ) |
69 |
- cmake-utils_src_configure |
70 |
+ myconfigure() { |
71 |
+ local mycmakeargs=( |
72 |
+ -DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}/usr/$(get_libdir)/$(usex qt4 qt4 qt5)/plugins" |
73 |
+ -DQCA_FEATURE_INSTALL_DIR="${EPREFIX}/usr/$(usex qt4 share $(get_libdir))/$(usex qt4 qt4 qt5)/mkspecs/features" |
74 |
+ $(qca_plugin_use botan) |
75 |
+ $(qca_plugin_use gcrypt) |
76 |
+ $(qca_plugin_use gpg gnupg) |
77 |
+ $(qca_plugin_use logger) |
78 |
+ $(qca_plugin_use nss) |
79 |
+ $(qca_plugin_use openssl ossl) |
80 |
+ $(qca_plugin_use pkcs11) |
81 |
+ $(qca_plugin_use sasl cyrus-sasl) |
82 |
+ $(qca_plugin_use softstore) |
83 |
+ $(cmake-utils_use_build test TESTS) |
84 |
+ ) |
85 |
+ |
86 |
+ if [[ ${MULTIBUILD_VARIANT} = qt4 ]]; then |
87 |
+ mycmakeargs+=( -DQT4_BUILD=true ) |
88 |
+ fi |
89 |
+ |
90 |
+ if [[ ${MULTIBUILD_VARIANT} = qt5 ]]; then |
91 |
+ mycmakeargs+=( -DQCA_SUFFIX=QT5 ) |
92 |
+ fi |
93 |
+ |
94 |
+ cmake-utils_src_configure |
95 |
+ } |
96 |
+ |
97 |
+ multibuild_foreach_variant myconfigure |
98 |
} |
99 |
|
100 |
-src_install() { |
101 |
- cmake-utils_src_install |
102 |
+src_compile() { |
103 |
+ multibuild_foreach_variant cmake-utils_src_compile |
104 |
|
105 |
if use doc; then |
106 |
- pushd "${BUILD_DIR}" >/dev/null |
107 |
+ pushd "${BUILD_DIR}" > /dev/null |
108 |
doxygen Doxyfile || die |
109 |
+ popd > /dev/null |
110 |
+ fi |
111 |
+} |
112 |
+ |
113 |
+src_test() { |
114 |
+ multibuild_foreach_variant cmake-utils_src_test |
115 |
+} |
116 |
+ |
117 |
+src_install() { |
118 |
+ multibuild_foreach_variant cmake-utils_src_install |
119 |
+ |
120 |
+ if use doc; then |
121 |
+ pushd "${BUILD_DIR}" > /dev/null |
122 |
dohtml apidocs/html/* |
123 |
popd >/dev/null |
124 |
fi |