From b40ddb4f450aa66f3021f31991dafc1fd1e97733 Mon Sep 17 00:00:00 2001 From: Marek Szuba Date: Fri, 16 Jul 2021 12:53:57 +0100 Subject: fortran-2.eclass: use BDEPEND on EAPI 7+ For FORTRAN_NEEDED=test we need both the compiler and the test binaries to run on the build host only, hence new EAPIs only set BDEPEND here; For other modes (other than "no", of course), we need a Fortran compiler running on the build host as well as the runtime libraries built for the target arch, necessitating the use of both DEPEND and BDEPEND on newer EAPIs. Closes: https://bugs.gentoo.org/802153 Signed-off-by: Marek Szuba --- eclass/fortran-2.eclass | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'eclass') diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass index 9d0c71703e49..2409cfcda5be 100644 --- a/eclass/fortran-2.eclass +++ b/eclass/fortran-2.eclass @@ -69,6 +69,9 @@ if [[ ! ${_FORTRAN_2_CLASS} ]]; then for _f_use in ${FORTRAN_NEEDED}; do case ${_f_use} in always) + if [[ ${EAPI} != [56] ]]; then + BDEPEND+=" virtual/fortran" + fi DEPEND+=" virtual/fortran" RDEPEND+=" virtual/fortran" break @@ -77,9 +80,16 @@ for _f_use in ${FORTRAN_NEEDED}; do break ;; test) - DEPEND+=" ${_f_use}? ( virtual/fortran )" + if [[ ${EAPI} != [56] ]]; then + BDEPEND+=" ${_f_use}? ( virtual/fortran )" + else + DEPEND+=" ${_f_use}? ( virtual/fortran )" + fi ;; *) + if [[ ${EAPI} != [56] ]]; then + BDEPEND+=" ${_f_use}? ( virtual/fortran )" + fi DEPEND+=" ${_f_use}? ( virtual/fortran )" RDEPEND+=" ${_f_use}? ( virtual/fortran )" ;; -- cgit v1.2.3-65-gdbad