pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/tools



Module Name:    pkgsrc
Committed By:   brook
Date:           Sat Jan 21 17:10:26 UTC 2017

Modified Files:
        pkgsrc/mk/tools: flex.mk

Log Message:
Always take the flex version from the second word of the version string.

When necessary, the flex version is obtained from the version string reported
by running flex.  Generally, the first word of the version string is flex and
and the second is a version number.  At least for MacOS, there is a third
vendor-specific word.  The sed command previously used to capture the flex
version captured the last word, not the second one, because the first capture
group was too greedy and could capture more than a single word.  Instead,
force the capture groups to capture only words, i.e., no blanks, and use the
second word for the version.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/mk/tools/flex.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/tools/flex.mk
diff -u pkgsrc/mk/tools/flex.mk:1.1 pkgsrc/mk/tools/flex.mk:1.2
--- pkgsrc/mk/tools/flex.mk:1.1 Sat Nov 26 14:58:45 2011
+++ pkgsrc/mk/tools/flex.mk     Sat Jan 21 17:10:26 2017
@@ -1,4 +1,4 @@
-# $NetBSD: flex.mk,v 1.1 2011/11/26 14:58:45 hans Exp $
+# $NetBSD: flex.mk,v 1.2 2017/01/21 17:10:26 brook Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -47,7 +47,7 @@ FLEX_REQD?=           2.5.4
 .  if !defined(_TOOLS_USE_PKGSRC.flex)
 _TOOLS_VERSION.flex!=                                                  \
        ${TOOLS_PLATFORM.flex} --version |                              \
-       ${SED} -e 's/\(.*\) \(.*\)$$/\2/'
+       ${SED} -e 's/^[[:blank:]]*\([^[:blank:]]\{1,\}\)[[:blank:]]\{1,\}\([^[:blank:]]\{1,\}\).*$$/\2/'
 _TOOLS_PKG.flex=               flex-${_TOOLS_VERSION.flex}
 _TOOLS_USE_PKGSRC.flex=        no
 .    for _dep_ in flex>=${FLEX_REQD}



Home | Main Index | Thread Index | Old Index