public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev]
@ 2021-07-16 12:08 Marek Szuba
  2021-07-16 12:08 ` [gentoo-dev] [PATCH] fortran-2.eclass: use BDEPEND on EAPI 7+ Marek Szuba
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Szuba @ 2021-07-16 12:08 UTC (permalink / raw
  To: gentoo-dev

With many thanks to ulm for having pointed this out. Not that while this
patch does indeed change the eclass behaviour for the established EAPI 7
rather than for the new EAPI 8, it does so in a way I deem non-intrusive
enough to allow this - the only case where something is actually removed
from DEPEND is when Fortran is only required by tests. Not to mention
that, ahem, there is considerable room for improvement as far as the
uptake of EAPI 7+ among consumers of this eclass is concerned.




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-dev] [PATCH] fortran-2.eclass: use BDEPEND on EAPI 7+
  2021-07-16 12:08 [gentoo-dev] Marek Szuba
@ 2021-07-16 12:08 ` Marek Szuba
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Szuba @ 2021-07-16 12:08 UTC (permalink / raw
  To: gentoo-dev

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 <marecki@gentoo.org>
---
 eclass/fortran-2.eclass | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 9d0c71703e4..2409cfcda5b 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 )"
 			;;
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-16 12:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-16 12:08 [gentoo-dev] Marek Szuba
2021-07-16 12:08 ` [gentoo-dev] [PATCH] fortran-2.eclass: use BDEPEND on EAPI 7+ Marek Szuba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox