public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrew Savchenko <bircoph@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH v3 2/2] fortran-2.eclass: support EAPI 7
Date: Mon, 5 Nov 2018 18:37:55 +0300	[thread overview]
Message-ID: <20181105183755.49d349a86277e17613e0da4a@gentoo.org> (raw)
In-Reply-To: <20181102012520.bcf256d577c0493a55570dac@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 2722 bytes --]

Hi all!

Here follow updated patches for fortran-2.eclass EAPI 7 update.

Patch 2 contains only code cleanup and fixes unrelated to EAPI 7
update:

diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index 820cbbcb49bd..b871d16e3e05 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: fortran-2.eclass
@@ -92,7 +95,7 @@ unset _f_use
 fortran_int64_abi_fflags() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	_FC=$(tc-getFC)
+	local _FC=$(tc-getFC)
 	if [[ ${_FC} == *gfortran* ]]; then
 		echo "-fdefault-integer-8"
 	elif [[ ${_FC} == ifort ]]; then
@@ -112,17 +115,17 @@ _fortran_write_testsuite() {
 	local filebase=${T}/test-fortran
 
 	# f77 code
-	cat <<- EOF > "${filebase}.f"
+	cat <<- EOF > "${filebase}.f" || die
 	       end
 	EOF
 
 	# f90/95 code
-	cat <<- EOF > "${filebase}.f90"
+	cat <<- EOF > "${filebase}.f90" || die
 	end
 	EOF
 
 	# f2003 code
-	cat <<- EOF > "${filebase}.f03"
+	cat <<- EOF > "${filebase}.f03" || die
 	       procedure(), pointer :: p
 	       end
 	EOF
@@ -170,7 +173,7 @@ _fortran-has-openmp() {
 	local ret
 	local _fc=$(tc-getFC)
 
-	cat <<- EOF > "${fcode}"
+	cat <<- EOF > "${fcode}" || die
 	       call omp_get_num_threads
 	       end
 	EOF
@@ -179,7 +182,7 @@ _fortran-has-openmp() {
 		${_fc} ${flag} "${fcode}" -o "${fcode}.x" \
 			&>> "${T}"/_fortran_compile_test.log
 		ret=$?
-		(( ${ret} )) || break
+		[[ ${ret} == 0 ]] && break
 	done
 
 	rm -f "${fcode}.x"
@@ -193,12 +196,12 @@ _fortran-has-openmp() {
 _fortran_die_msg() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	echo
+	eerror
 	eerror "Please install currently selected gcc version with USE=fortran."
 	eerror "If you intend to use a different compiler then gfortran, please"
 	eerror "set FC variable accordingly and take care that the necessary"
 	eerror "fortran dialects are supported."
-	echo
+	eerror
 	die "Currently no working fortran compiler is available (see ${T}/_fortran_compile_test.log for information)"
 }
 
@@ -250,7 +253,7 @@ _fortran-2_pkg_setup() {
 	for _f_use in ${FORTRAN_NEEDED}; do
 	case ${_f_use} in
 		always)
-			_fortran_test_function && break
+			_fortran_test_function && break 2
 			;;
 		no)
 			einfo "Forcing fortran support off"
@@ -258,7 +261,7 @@ _fortran-2_pkg_setup() {
 			;;
 		*)
 			if use ${_f_use}; then
-				_fortran_test_function && break
+				_fortran_test_function && break 2
 			else
 				unset FC
 				unset F77


Best regards,
Andrew Savchenko

[-- Attachment #2: Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2018-11-05 15:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-27 22:38 [gentoo-dev] [PATCH] fortran-2.eclass: support EAPI 7 Andrew Savchenko
2018-10-28 18:29 ` Michał Górny
2018-10-29  0:57   ` Andrew Savchenko
2018-10-30  7:18     ` Michał Górny
2018-11-01 22:27       ` Andrew Savchenko
2018-11-02  0:47         ` Michael Orlitzky
2018-11-02 14:20         ` Michał Górny
2018-11-05 15:37           ` Andrew Savchenko
2018-10-29 22:52 ` Andreas K. Huettel
2018-11-01 22:26   ` Andrew Savchenko
2018-11-01 22:25 ` [gentoo-dev] [PATCH v2] " Andrew Savchenko
2018-11-02 10:27   ` Ulrich Mueller
2018-11-05 14:30     ` Andrew Savchenko
2018-11-05 15:37   ` Andrew Savchenko [this message]
2018-11-17 11:38     ` [gentoo-dev] [PATCH v3 2/2] " Andrew Savchenko
2018-11-05 15:38   ` [gentoo-dev] [PATCH v3 1/2] " Andrew Savchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181105183755.49d349a86277e17613e0da4a@gentoo.org \
    --to=bircoph@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox