1 |
commit: 022da5ba99be2b208ba8ae6ba60c15b118bbac5f |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 6 20:23:13 2020 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 6 20:27:09 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=022da5ba |
7 |
|
8 |
sys-auth/yubico-piv-tool: only build tests when FEATURES=test is set |
9 |
|
10 |
This means we no longer need dev-libs/check present even when one does |
11 |
not wish to run the test suite. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/739040 |
14 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
15 |
|
16 |
.../yubico-piv-tool-2.1.1-tests-optional.patch | 39 ++++++++++++++++++++++ |
17 |
.../yubico-piv-tool/yubico-piv-tool-2.1.1.ebuild | 6 +++- |
18 |
2 files changed, 44 insertions(+), 1 deletion(-) |
19 |
|
20 |
diff --git a/sys-auth/yubico-piv-tool/files/yubico-piv-tool-2.1.1-tests-optional.patch b/sys-auth/yubico-piv-tool/files/yubico-piv-tool-2.1.1-tests-optional.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..6653ef2949c |
23 |
--- /dev/null |
24 |
+++ b/sys-auth/yubico-piv-tool/files/yubico-piv-tool-2.1.1-tests-optional.patch |
25 |
@@ -0,0 +1,39 @@ |
26 |
+--- a/CMakeLists.txt |
27 |
++++ b/CMakeLists.txt |
28 |
+@@ -125,7 +125,9 @@ |
29 |
+ find_libcrypto() |
30 |
+ include_directories(${LIBCRYPTO_INCLUDE_DIRS}) |
31 |
+ |
32 |
++if (BUILD_TESTING) |
33 |
+ enable_testing() |
34 |
++endif() |
35 |
+ find_package(codecov) |
36 |
+ |
37 |
+ add_subdirectory (lib) |
38 |
+--- a/lib/CMakeLists.txt |
39 |
++++ b/lib/CMakeLists.txt |
40 |
+@@ -92,4 +92,6 @@ |
41 |
+ |
42 |
+ install(FILES ykpiv.pc DESTINATION ${YKPIV_INSTALL_PKGCONFIG_DIR}) |
43 |
+ |
44 |
++if (BUILD_TESTING) |
45 |
+ add_subdirectory(tests) |
46 |
++endif () |
47 |
+--- a/tool/CMakeLists.txt |
48 |
++++ b/tool/CMakeLists.txt |
49 |
+@@ -78,4 +78,6 @@ |
50 |
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/yubico-piv-tool.1" DESTINATION "${YKPIV_INSTALL_MAN_DIR}/man1") |
51 |
+ endif(MAN_PAGE) |
52 |
+ |
53 |
++if (BUILD_TESTING) |
54 |
+ add_subdirectory(tests) |
55 |
++endif () |
56 |
+--- a/ykcs11/CMakeLists.txt |
57 |
++++ b/ykcs11/CMakeLists.txt |
58 |
+@@ -102,4 +102,6 @@ |
59 |
+ |
60 |
+ install(FILES ykcs11.pc DESTINATION ${YKPIV_INSTALL_PKGCONFIG_DIR}) |
61 |
+ |
62 |
++if (BUILD_TESTING) |
63 |
+ add_subdirectory(tests) |
64 |
++endif () |
65 |
|
66 |
diff --git a/sys-auth/yubico-piv-tool/yubico-piv-tool-2.1.1.ebuild b/sys-auth/yubico-piv-tool/yubico-piv-tool-2.1.1.ebuild |
67 |
index e61b928b9a3..e250affc1b8 100644 |
68 |
--- a/sys-auth/yubico-piv-tool/yubico-piv-tool-2.1.1.ebuild |
69 |
+++ b/sys-auth/yubico-piv-tool/yubico-piv-tool-2.1.1.ebuild |
70 |
@@ -26,13 +26,17 @@ DEPEND="${RDEPEND} |
71 |
test? ( dev-libs/check ) |
72 |
" |
73 |
|
74 |
-PATCHES=("${FILESDIR}/${P}-install-man-page.patch") |
75 |
+PATCHES=( |
76 |
+ "${FILESDIR}"/${PN}-2.1.1-install-man-page.patch |
77 |
+ "${FILESDIR}"/${PN}-2.1.1-tests-optional.patch |
78 |
+) |
79 |
|
80 |
S="${WORKDIR}/${PN}-${P}" |
81 |
|
82 |
src_configure() { |
83 |
local mycmakeargs=( |
84 |
-DBUILD_STATIC_LIB=OFF |
85 |
+ -DBUILD_TESTING=$(usex test) |
86 |
) |
87 |
cmake_src_configure |
88 |
} |