Skip to content

Commit

Permalink
fortran-2.eclass: use BDEPEND on EAPI 7+
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Marek Szuba committed Jul 20, 2021
1 parent 9454ba8 commit b40ddb4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion eclass/fortran-2.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 )"
;;
Expand Down

0 comments on commit b40ddb4

Please sign in to comment.