The libgit2 ebuild isn't setting the USE_SSH option correctly. It's setting it to "yes", which CMake ignores, when it should be "ON". --- a/dev-libs/libgit2/libgit2-1.8.0.ebuild 2024-04-11 22:41:04.000000000 +0100 +++ b/dev-libs/libgit2/libgit2-1.8.0.ebuild 2024-04-26 17:50:30.608122949 +0100 @@ -39,7 +39,7 @@ src_configure() { local mycmakeargs=( -DBUILD_TESTS=$(usex test) - -DUSE_SSH=$(usex ssh) + -DUSE_SSH=$(usex ssh ON OFF) -DUSE_GSSAPI=$(usex gssapi ON OFF) -DUSE_HTTP_PARSER=system -DREGEX_BACKEND=pcre2 Reproducible: Always
(In reply to Mark Harmstone from comment #0) > The libgit2 ebuild isn't setting the USE_SSH option correctly. It's setting > it to "yes", which CMake ignores, when it should be "ON". To clarify, *cmake* does recognize "yes" for boolean checks and typically don't need to worry about this, however this specific package is doing a string check for either exactly ON or some other values, aka: cmake/SelectSSH.cmake:if(USE_SSH STREQUAL "exec") cmake/SelectSSH.cmake:elseif(USE_SSH STREQUAL ON OR USE_SSH STREQUAL "libssh2")
(In reply to Ionen Wolkens from comment #1) > (In reply to Mark Harmstone from comment #0) > > The libgit2 ebuild isn't setting the USE_SSH option correctly. It's setting > > it to "yes", which CMake ignores, when it should be "ON". > To clarify, *cmake* does recognize "yes" for boolean checks and typically > don't need to worry about this, however this specific package is doing a > string check for either exactly ON or some other values, aka: > > cmake/SelectSSH.cmake:if(USE_SSH STREQUAL "exec") > cmake/SelectSSH.cmake:elseif(USE_SSH STREQUAL ON OR USE_SSH STREQUAL > "libssh2") Thanks. So is this a bug with the ebuild or a bug with libgit2?
(In reply to Mark Harmstone from comment #2) > Thanks. So is this a bug with the ebuild or a bug with libgit2? Well, libgit2 is misleading by having something that looks like a boolean not be treated like one so it could be improved, but has to be fixed in the ebuild for now either way.
(In reply to Ionen Wolkens from comment #3) > (In reply to Mark Harmstone from comment #2) > > Thanks. So is this a bug with the ebuild or a bug with libgit2? > Well, libgit2 is misleading by having something that looks like a boolean > not be treated like one so it could be improved, but has to be fixed in the > ebuild for now either way. Well, guess they do give a mention in the description fwiw, e.g. option(USE_SSH "Enable SSH support. Can be set to a specific backend" OFF) option(USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON) option(USE_SHA1 "Enable SHA1. Can be set to CollisionDetection(ON)/HTTPS" ON) option(USE_SHA256 "Enable SHA256. Can be set to HTTPS/Builtin" ON) Still a bit weird, but ah well.
Thanks for the report. Indeed the behavior changed in 1.8.0.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f21425212e06d6d8f91f3ce848a9fa9ec3048a6 commit 5f21425212e06d6d8f91f3ce848a9fa9ec3048a6 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2024-04-26 18:15:02 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2024-04-26 18:55:01 +0000 dev-libs/libgit2: Fix handling USE=ssh Closes: https://bugs.gentoo.org/930720 Signed-off-by: Michał Górny <mgorny@gentoo.org> dev-libs/libgit2/{libgit2-1.8.0.ebuild => libgit2-1.8.0-r1.ebuild} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)