commit:     f37f80a04ae26ee655325e7108de54718e0288aa
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon May 26 15:48:57 2025 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue May 27 18:14:49 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f37f80a0

ssl-cert.eclass: fix dependencies

RDEPEND is sometimes needed to support pkg_config use.
IDEPEND is the most common need, but requires EAPI 8.

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 eclass/ssl-cert.eclass | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/eclass/ssl-cert.eclass b/eclass/ssl-cert.eclass
index dd95200dbc4a..bc1e3ab9db5e 100644
--- a/eclass/ssl-cert.eclass
+++ b/eclass/ssl-cert.eclass
@@ -44,10 +44,16 @@ inherit edo
 
 if [[ "${SSL_DEPS_SKIP}" == "0" ]]; then
        if [[ "${SSL_CERT_MANDATORY}" == "0" ]]; then
-               BDEPEND="${SSL_CERT_USE}? ( dev-libs/openssl )"
+               RDEPEND="${SSL_CERT_USE}? ( dev-libs/openssl )"
+               if [[ ${EAPI} != 7 ]]; then
+                       IDEPEND="${SSL_CERT_USE}? ( dev-libs/openssl )"
+               fi
                IUSE="${SSL_CERT_USE}"
        else
-               BDEPEND="dev-libs/openssl"
+               RDEPEND="dev-libs/openssl"
+               if [[ ${EAPI} != 7 ]]; then
+                       IDEPEND="dev-libs/openssl"
+               fi
        fi
 fi
 
@@ -204,9 +210,8 @@ install_cert() {
        fi
 
        case ${EBUILD_PHASE} in
-       unpack|prepare|configure|compile|test|install)
-               die "install_cert cannot be called in ${EBUILD_PHASE}"
-               ;;
+               config|preinst|postinst) ;;
+               *) die "install_cert cannot be called in ${EBUILD_PHASE}" ;;
        esac
 
        # Generate a CA environment #164601

Reply via email to