Gentoo Archives: gentoo-commits

From: Julian Ospald <hasufell@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/qca/
Date: Sun, 04 Oct 2015 19:36:59
Message-Id: 1443985880.eee0cb91595a36bff714a72129c6bdd31c4ad88d.hasufell@gentoo
1 commit: eee0cb91595a36bff714a72129c6bdd31c4ad88d
2 Author: Julian Ospald <hasufell <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 4 19:11:20 2015 +0000
4 Commit: Julian Ospald <hasufell <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 4 19:11:20 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eee0cb91
7
8 app-crypt/qca: add libressl support
9
10 app-crypt/qca/qca-2.1.0.3-r2.ebuild | 128 ++++++++++++++++++++++++++++++++++++
11 1 file changed, 128 insertions(+)
12
13 diff --git a/app-crypt/qca/qca-2.1.0.3-r2.ebuild b/app-crypt/qca/qca-2.1.0.3-r2.ebuild
14 new file mode 100644
15 index 0000000..df34a8e
16 --- /dev/null
17 +++ b/app-crypt/qca/qca-2.1.0.3-r2.ebuild
18 @@ -0,0 +1,128 @@
19 +# Copyright 1999-2015 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +# $Id$
22 +
23 +EAPI=5
24 +
25 +inherit cmake-utils multibuild qmake-utils
26 +
27 +MY_PN="${PN}-qt5"
28 +
29 +DESCRIPTION="Qt Cryptographic Architecture (QCA)"
30 +HOMEPAGE="http://delta.affinix.com/qca/"
31 +SRC_URI="mirror://kde/stable/${MY_PN}/${PV}/src/${MY_PN}-${PV}.tar.xz"
32 +
33 +LICENSE="LGPL-2.1"
34 +SLOT="2"
35 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
36 +
37 +IUSE="botan debug doc examples gcrypt gpg libressl logger nss +openssl pkcs11 +qt4 qt5 sasl softstore test"
38 +REQUIRED_USE="|| ( qt4 qt5 )"
39 +
40 +RDEPEND="
41 + !app-crypt/qca-cyrus-sasl
42 + !app-crypt/qca-gnupg
43 + !app-crypt/qca-logger
44 + !app-crypt/qca-ossl
45 + !app-crypt/qca-pkcs11
46 + botan? ( dev-libs/botan )
47 + gcrypt? ( dev-libs/libgcrypt:= )
48 + gpg? ( app-crypt/gnupg )
49 + nss? ( dev-libs/nss )
50 + openssl? (
51 + !libressl? ( >=dev-libs/openssl-1.0.1:0 )
52 + libressl? ( dev-libs/libressl )
53 + )
54 + pkcs11? (
55 + !libressl? ( dev-libs/openssl:0 )
56 + libressl? ( dev-libs/libressl )
57 + dev-libs/pkcs11-helper
58 + )
59 + qt4? ( dev-qt/qtcore:4 )
60 + qt5? (
61 + dev-qt/qtcore:5
62 + dev-qt/qtconcurrent:5
63 + dev-qt/qtnetwork:5
64 + )
65 + sasl? ( dev-libs/cyrus-sasl:2 )
66 +"
67 +DEPEND="${RDEPEND}
68 + doc? ( app-doc/doxygen )
69 + test? (
70 + qt4? ( dev-qt/qttest:4 )
71 + qt5? ( dev-qt/qttest:5 )
72 + )
73 +"
74 +
75 +S=${WORKDIR}/${MY_PN}-${PV}
76 +
77 +DOCS=( README TODO )
78 +
79 +PATCHES=(
80 + "${FILESDIR}/${PN}-disable-pgp-test.patch"
81 + "${FILESDIR}/${P}-qt55.patch"
82 + "${FILESDIR}/${P}-fix-signals-slots.patch"
83 +)
84 +
85 +qca_plugin_use() {
86 + echo -DWITH_${2:-$1}_PLUGIN=$(usex "$1")
87 +}
88 +
89 +pkg_setup() {
90 + MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
91 +}
92 +
93 +src_configure() {
94 + myconfigure() {
95 + local mycmakeargs=(
96 + -DQCA_FEATURE_INSTALL_DIR="${EPREFIX}$(${MULTIBUILD_VARIANT}_get_mkspecsdir)/features"
97 + -DQCA_PLUGINS_INSTALL_DIR="${EPREFIX}$(${MULTIBUILD_VARIANT}_get_plugindir)"
98 + $(qca_plugin_use botan)
99 + $(qca_plugin_use gcrypt)
100 + $(qca_plugin_use gpg gnupg)
101 + $(qca_plugin_use logger)
102 + $(qca_plugin_use nss)
103 + $(qca_plugin_use openssl ossl)
104 + $(qca_plugin_use pkcs11)
105 + $(qca_plugin_use sasl cyrus-sasl)
106 + $(qca_plugin_use softstore)
107 + $(cmake-utils_use_build test TESTS)
108 + )
109 +
110 + if [[ ${MULTIBUILD_VARIANT} == qt4 ]]; then
111 + mycmakeargs+=(-DQT4_BUILD=ON)
112 + fi
113 +
114 + cmake-utils_src_configure
115 + }
116 +
117 + multibuild_foreach_variant myconfigure
118 +}
119 +
120 +src_compile() {
121 + multibuild_foreach_variant cmake-utils_src_compile
122 +}
123 +
124 +src_test() {
125 + mytest() {
126 + local -x QCA_PLUGIN_PATH="${BUILD_DIR}/lib/qca"
127 + cmake-utils_src_test
128 + }
129 +
130 + multibuild_foreach_variant mytest
131 +}
132 +
133 +src_install() {
134 + multibuild_foreach_variant cmake-utils_src_install
135 +
136 + if use doc; then
137 + pushd "${BUILD_DIR}" >/dev/null || die
138 + doxygen Doxyfile.in || die
139 + dodoc -r apidocs/html
140 + popd >/dev/null || die
141 + fi
142 +
143 + if use examples; then
144 + dodoc -r "${S}"/examples
145 + fi
146 +}