pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/compiler mk: Fix malformed conditional.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8ec8f25d061a
branches:  trunk
changeset: 376295:8ec8f25d061a
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Mon Apr 04 15:38:47 2022 +0000

description:
mk: Fix malformed conditional.

There's no guarantee that POSSIBLE_GFORTRAN_VERSION is a numeric value,
so cannot be compared as such.  For example on my macOS it is set to
"clang-12 (clang-1205.0.22.9)".

This really needs to be normalised correctly at some point.

diffstat:

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

diffs (18 lines):

diff -r a3706a1f6299 -r 8ec8f25d061a mk/compiler/gfortran.mk
--- a/mk/compiler/gfortran.mk   Mon Apr 04 13:21:41 2022 +0000
+++ b/mk/compiler/gfortran.mk   Mon Apr 04 15:38:47 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gfortran.mk,v 1.19 2022/04/02 08:01:48 nia Exp $
+# $NetBSD: gfortran.mk,v 1.20 2022/04/04 15:38:47 jperkin Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -47,7 +47,7 @@
 POSSIBLE_GFORTRAN_VERSION=     10
 .endif
 
-.if ${POSSIBLE_GFORTRAN_VERSION} <= 9 && \
+.if !empty(POSSIBLE_GFORTRAN_VERSION:M[0-9]) && \
     !empty(MACHINE_PLATFORM:MNetBSD-*-earm*)
 POSSIBLE_GFORTRAN_VERSION=     10
 .endif



Home | Main Index | Thread Index | Old Index