meson: Extract flex version using a regex inside a script
authorNirbheek Chauhan <nirbheek@centricular.com>
Fri, 8 Feb 2019 11:12:43 +0000 (16:42 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 8 Feb 2019 11:24:10 +0000 (16:54 +0530)
commitc164b88ac1178a5899308a0a136a3d80f0a8a9cb
treec4eba527ab492972979c0009da84d7a9378dda34
parentfebfabb39f3eacee28021d8b216e4c5d2db08064
meson: Extract flex version using a regex inside a script

Different builds of Flex on different platforms output different strings
in --version. For example:

macOS:
flex 2.5.35 Apple(flex-31)

Windows:
win_flex.exe 2.6.4
C:\Program Files (x86)\GnuWin32\bin\flex.EXE version 2.5.4

We need to look for a string that looks like a version, which means
a regex till https://github.com/mesonbuild/meson/issues/1609 is fixed.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/356
gst/parse/get_flex_version.py [new file with mode: 0644]
gst/parse/meson.build