summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2020-09-06 22:23:13 +0200
committerMarek Szuba <marecki@gentoo.org>2020-09-06 22:27:09 +0200
commit022da5ba99be2b208ba8ae6ba60c15b118bbac5f (patch)
tree747d757a80db53f716ee15a7f651f06f4124dba1 /sys-auth/yubico-piv-tool
parentdev-libs/botan: ppc64 stable (bug #737166) (diff)
downloadgentoo-022da5ba99be2b208ba8ae6ba60c15b118bbac5f.tar.gz
gentoo-022da5ba99be2b208ba8ae6ba60c15b118bbac5f.tar.bz2
gentoo-022da5ba99be2b208ba8ae6ba60c15b118bbac5f.zip
sys-auth/yubico-piv-tool: only build tests when FEATURES=test is set
This means we no longer need dev-libs/check present even when one does not wish to run the test suite. Closes: https://bugs.gentoo.org/739040 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'sys-auth/yubico-piv-tool')
-rw-r--r--sys-auth/yubico-piv-tool/files/yubico-piv-tool-2.1.1-tests-optional.patch39
-rw-r--r--sys-auth/yubico-piv-tool/yubico-piv-tool-2.1.1.ebuild6
2 files changed, 44 insertions, 1 deletions
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
new file mode 100644
index 000000000000..6653ef2949c0
--- /dev/null
+++ b/sys-auth/yubico-piv-tool/files/yubico-piv-tool-2.1.1-tests-optional.patch
@@ -0,0 +1,39 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -125,7 +125,9 @@
+ find_libcrypto()
+ include_directories(${LIBCRYPTO_INCLUDE_DIRS})
+
++if (BUILD_TESTING)
+ enable_testing()
++endif()
+ find_package(codecov)
+
+ add_subdirectory (lib)
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -92,4 +92,6 @@
+
+ install(FILES ykpiv.pc DESTINATION ${YKPIV_INSTALL_PKGCONFIG_DIR})
+
++if (BUILD_TESTING)
+ add_subdirectory(tests)
++endif ()
+--- a/tool/CMakeLists.txt
++++ b/tool/CMakeLists.txt
+@@ -78,4 +78,6 @@
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/yubico-piv-tool.1" DESTINATION "${YKPIV_INSTALL_MAN_DIR}/man1")
+ endif(MAN_PAGE)
+
++if (BUILD_TESTING)
+ add_subdirectory(tests)
++endif ()
+--- a/ykcs11/CMakeLists.txt
++++ b/ykcs11/CMakeLists.txt
+@@ -102,4 +102,6 @@
+
+ install(FILES ykcs11.pc DESTINATION ${YKPIV_INSTALL_PKGCONFIG_DIR})
+
++if (BUILD_TESTING)
+ add_subdirectory(tests)
++endif ()
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
index e61b928b9a35..e250affc1b84 100644
--- 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
@@ -26,13 +26,17 @@ DEPEND="${RDEPEND}
test? ( dev-libs/check )
"
-PATCHES=("${FILESDIR}/${P}-install-man-page.patch")
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.1.1-install-man-page.patch
+ "${FILESDIR}"/${PN}-2.1.1-tests-optional.patch
+)
S="${WORKDIR}/${PN}-${P}"
src_configure() {
local mycmakeargs=(
-DBUILD_STATIC_LIB=OFF
+ -DBUILD_TESTING=$(usex test)
)
cmake_src_configure
}