commit: 8d5428f7bbd5dc4fe9e8cb36c9383a86adbb96a0 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Wed May 31 03:33:40 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Wed May 31 03:33:40 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d5428f7
net-libs/libssh2: conditionally set test options Closes: https://bugs.gentoo.org/907443 Signed-off-by: Sam James <sam <AT> gentoo.org> net-libs/libssh2/libssh2-1.11.0.ebuild | 11 +++++++++-- net-libs/libssh2/libssh2-9999.ebuild | 12 +++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/net-libs/libssh2/libssh2-1.11.0.ebuild b/net-libs/libssh2/libssh2-1.11.0.ebuild index 2f60c46c3928..30a399914f72 100644 --- a/net-libs/libssh2/libssh2-1.11.0.ebuild +++ b/net-libs/libssh2/libssh2-1.11.0.ebuild @@ -47,9 +47,16 @@ multilib_src_configure() { -DBUILD_TESTING=$(usex test) -DCRYPTO_BACKEND=${crypto_backend} -DENABLE_ZLIB_COMPRESSION=$(usex zlib) - -DRUN_SSHD_TESTS=OFF - -DRUN_DOCKER_TESTS=OFF ) + + if use test ; then + # Pass separately to avoid unused var warnings w/ USE=-test + mycmakeargs+=( + -DRUN_SSHD_TESTS=OFF + -DRUN_DOCKER_TESTS=OFF + ) + fi + cmake_src_configure } diff --git a/net-libs/libssh2/libssh2-9999.ebuild b/net-libs/libssh2/libssh2-9999.ebuild index 290d28ce2558..8a5ad181cafd 100644 --- a/net-libs/libssh2/libssh2-9999.ebuild +++ b/net-libs/libssh2/libssh2-9999.ebuild @@ -48,10 +48,20 @@ multilib_src_configure() { -DRUN_SSHD_TESTS=OFF -DRUN_DOCKER_TESTS=OFF ) + + if use test ; then + # Pass separately to avoid unused var warnings w/ USE=-test + mycmakeargs+=( + -DRUN_SSHD_TESTS=OFF + -DRUN_DOCKER_TESTS=OFF + ) + fi + + cmake_src_configure } multilib_src_install_all() { einstalldocs - find "${ED}" -name '*.la' -delete || die + find "${ED}" -name '*.a' -delete || die }
