pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/compiler mk/compiler/gfortran.mk: Fix bugs in versi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f89b2226ae85
branches:  trunk
changeset: 426114:f89b2226ae85
user:      gdt <gdt%pkgsrc.org@localhost>
date:      Thu Mar 26 12:42:02 2020 +0000

description:
mk/compiler/gfortran.mk: Fix bugs in version selection

Adjust regexp that removes .Y.Z from gcc-X.Y.Z.

Test for gcc being contained in PKGSRC_COMPILER, vs ==, so that a
value of "ccache gcc" is handled properly.

(ok for mk during freeze jperkin@)

diffstat:

 mk/compiler/gfortran.mk |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r c12f16df401a -r f89b2226ae85 mk/compiler/gfortran.mk
--- a/mk/compiler/gfortran.mk   Thu Mar 26 12:32:37 2020 +0000
+++ b/mk/compiler/gfortran.mk   Thu Mar 26 12:42:02 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gfortran.mk,v 1.13 2020/03/07 15:19:20 maya Exp $
+# $NetBSD: gfortran.mk,v 1.14 2020/03/26 12:42:02 gdt Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -36,9 +36,9 @@
 # If pkgsrc base compiler is GCC, match the gfortran requirement as closely as
 # possible.  Otherwise, default to a mainstream version and hope for the best.
 # If base compiler is clang, we really should use flang rather than gfortran.
-POSSIBLE_GFORTRAN_VERSION?=    ${CC_VERSION:C/.[0-9].[0-9]//:S/gcc-//}
+POSSIBLE_GFORTRAN_VERSION?=    ${CC_VERSION:S/gcc-//:C/.[0-9].[0-9]$//}
 
-.if (${PKGSRC_COMPILER} == gcc) && \
+.if !empty(PKGSRC_COMPILER:Mgcc) && \
     exists(${PKGSRCDIR}/lang/gcc${POSSIBLE_GFORTRAN_VERSION}/buildlink3.mk)
 GFORTRAN_VERSION?=             ${POSSIBLE_GFORTRAN_VERSION}
 .else



Home | Main Index | Thread Index | Old Index