1 |
commit: 31862cd96272809389aa0a6389bfa9d7dc333309 |
2 |
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 23 13:40:55 2022 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 23 13:40:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31862cd9 |
7 |
|
8 |
dev-util/librnp: enable tests, use "usex" in ebuild |
9 |
|
10 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
11 |
|
12 |
dev-util/librnp/librnp-0.16.0.ebuild | 22 ++++++++++++---------- |
13 |
1 file changed, 12 insertions(+), 10 deletions(-) |
14 |
|
15 |
diff --git a/dev-util/librnp/librnp-0.16.0.ebuild b/dev-util/librnp/librnp-0.16.0.ebuild |
16 |
index 3c528fc1c13e..4f3c972de1fe 100644 |
17 |
--- a/dev-util/librnp/librnp-0.16.0.ebuild |
18 |
+++ b/dev-util/librnp/librnp-0.16.0.ebuild |
19 |
@@ -12,20 +12,22 @@ SRC_URI="https://github.com/rnpgp/rnp/archive/refs/tags/v${PV}.tar.gz -> ${P}.ta |
20 |
LICENSE="Apache-2.0 BSD BSD-2" |
21 |
SLOT="0" |
22 |
KEYWORDS="~amd64" |
23 |
-IUSE="man" |
24 |
+IUSE="man test" |
25 |
|
26 |
-DEPEND="app-arch/bzip2 |
27 |
+RDEPEND="app-arch/bzip2 |
28 |
dev-libs/botan:2= |
29 |
dev-libs/json-c:= |
30 |
sys-libs/zlib" |
31 |
-RDEPEND="${DEPEND}" |
32 |
+DEPEND="${RDEPEND} |
33 |
+ test? ( dev-cpp/gtest )" |
34 |
BDEPEND="man? ( dev-ruby/asciidoctor )" |
35 |
|
36 |
+RESTRICT="!test? ( test )" |
37 |
S="${WORKDIR}/${P/*lib/}" |
38 |
|
39 |
src_configure() { |
40 |
local mycmakeargs=( |
41 |
- -DBUILD_TESTING=off |
42 |
+ -DBUILD_TESTING=$(usex test on off) |
43 |
|
44 |
-DCRYPTO_BACKEND=botan |
45 |
|
46 |
@@ -33,15 +35,15 @@ src_configure() { |
47 |
-DDOWNLOAD_RUBYRNP=off |
48 |
|
49 |
-DENABLE_COVERAGE=off |
50 |
+ -DENABLE_DOC=$(usex man on off) |
51 |
-DENABLE_FUZZERS=off |
52 |
-DENABLE_SANITIZERS=off |
53 |
) |
54 |
|
55 |
- if use man; then |
56 |
- mycmakeargs+=( -DENABLE_DOC=on ) |
57 |
- else |
58 |
- mycmakeargs+=( -DENABLE_DOC=off ) |
59 |
- fi |
60 |
- |
61 |
cmake_src_configure |
62 |
} |
63 |
+ |
64 |
+src_test() { |
65 |
+ cd "${BUILD_DIR}" || die |
66 |
+ ctest -j"${MAKEOPTS}" -R .* --output-on-failure || die |
67 |
+} |