From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 78790138334 for ; Mon, 5 Nov 2018 15:39:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52763E0BD0; Mon, 5 Nov 2018 15:38:36 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DA8D2E0BC5 for ; Mon, 5 Nov 2018 15:38:35 +0000 (UTC) Received: from localhost (unknown [91.246.83.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bircoph) by smtp.gentoo.org (Postfix) with ESMTPSA id 1603D335CEA for ; Mon, 5 Nov 2018 15:38:32 +0000 (UTC) Date: Mon, 5 Nov 2018 18:37:55 +0300 From: Andrew Savchenko To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH v3 2/2] fortran-2.eclass: support EAPI 7 Message-Id: <20181105183755.49d349a86277e17613e0da4a@gentoo.org> In-Reply-To: <20181102012520.bcf256d577c0493a55570dac@gentoo.org> References: <20181028013841.7bd52f2b363d0b11fbe97dd1@gentoo.org> <20181102012520.bcf256d577c0493a55570dac@gentoo.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA512"; boundary="Signature=_Mon__5_Nov_2018_18_37_55_+0300_oIKsOn08mleXCy6." X-Archives-Salt: 47e4f68b-deb9-421f-82da-fc2f3c1bd2f2 X-Archives-Hash: e5769fbd71b614379bcad16256c3bd07 --Signature=_Mon__5_Nov_2018_18_37_55_+0300_oIKsOn08mleXCy6. Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =20 # @ECLASS: fortran-2.eclass @@ -92,7 +95,7 @@ unset _f_use fortran_int64_abi_fflags() { debug-print-function ${FUNCNAME} "${@}" =20 - _FC=3D$(tc-getFC) + local _FC=3D$(tc-getFC) if [[ ${_FC} =3D=3D *gfortran* ]]; then echo "-fdefault-integer-8" elif [[ ${_FC} =3D=3D ifort ]]; then @@ -112,17 +115,17 @@ _fortran_write_testsuite() { local filebase=3D${T}/test-fortran =20 # f77 code - cat <<- EOF > "${filebase}.f" + cat <<- EOF > "${filebase}.f" || die end EOF =20 # f90/95 code - cat <<- EOF > "${filebase}.f90" + cat <<- EOF > "${filebase}.f90" || die end EOF =20 # 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=3D$(tc-getFC) =20 - 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=3D$? - (( ${ret} )) || break + [[ ${ret} =3D=3D 0 ]] && break done =20 rm -f "${fcode}.x" @@ -193,12 +196,12 @@ _fortran-has-openmp() { _fortran_die_msg() { debug-print-function ${FUNCNAME} "${@}" =20 - echo + eerror eerror "Please install currently selected gcc version with USE=3Dfortran." 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}/_fortra= n_compile_test.log for information)" } =20 @@ -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 --Signature=_Mon__5_Nov_2018_18_37_55_+0300_oIKsOn08mleXCy6. Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE63ZIHsdeM+1XgNer9lNaM7oe5I0FAlvgY9MACgkQ9lNaM7oe 5I01RRAAn9I89DlubIdHoxSdE4yPrkFw12Cs6zgiavHzQBZm0EHSDv8wGpG/0/DL 3Yv7kqAOUHNA0OCl9qaBv4JPTGkc0zMx0OkPjvqPNKH4gHdCP8sEqVs55qTCKcgd /YALkGW6g/EeH1wptRVCKQd6qr4qa9dRMbJpRyJAarh05I50smkmL34Dc5Zjpto8 WEufZDIKElvvEOT9bdrH5lON2ksBHT1sFVRPTdxd9OCInZWp712GeF4GyDtiwg+V ZqlK48Y9j3B65b590Scdozene8l5lqqRjFIxOH7GSIecgWaYukrAlBjv8cUo9FeM N3UMz81IofAQNtYAOe4S/Nq0ZNACmawIn5z7v+y0ftsBb6DGDDc1Rrw30SasSCr6 He52yctX3bNxZ5vDKESmxe7FCcDo6k/TvHj4hyRaFm4ddd7/QmgAhR/Bo0IW20c5 QN9dW+JggDYmYhqVIjePxI3SA2GjjY4m2analv3/2+g+Fm0yOU+qSeCjNWIIL07K LvItoawFHataL5ir+nn4qb+0imUwDG9axHW54nkPvrqD+9HZ8zC7uoQB1xDC3RTF Q6C48K19gf6tdtqCczkaHq+MCY1iTOUK8gsOLR90TUvtpTnfrugLf3Qd7OijtkHU OovkpBBtw05pKAmX45VcrhiIJsZw248WmNSCL2EpjLk7CUHKCFo= =7KCL -----END PGP SIGNATURE----- --Signature=_Mon__5_Nov_2018_18_37_55_+0300_oIKsOn08mleXCy6.--