forked from pool/libqt5-qtwebengine
bb7c176b23
1 OBS-URL: https://build.opensuse.org/request/show/314508 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtwebengine?expand=0&rev=5
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
Index: src/3rdparty/chromium/build/compiler_version.py
|
|
===================================================================
|
|
--- src/3rdparty/chromium/build/compiler_version.py.orig
|
|
+++ src/3rdparty/chromium/build/compiler_version.py
|
|
@@ -56,7 +56,7 @@ def GetVersion(compiler, tool):
|
|
if tool == "compiler":
|
|
compiler = compiler + " -dumpversion"
|
|
# 4.6
|
|
- version_re = re.compile(r"(\d+)\.(\d+)")
|
|
+ version_re = re.compile(r"(\d+)(?:\.(\d+))?")
|
|
elif tool == "assembler":
|
|
compiler = compiler + " -Xassembler --version -x assembler -c /dev/null"
|
|
# Unmodified: GNU assembler (GNU Binutils) 2.24
|
|
@@ -88,7 +88,11 @@ def GetVersion(compiler, tool):
|
|
raise subprocess.CalledProcessError(pipe.returncode, compiler)
|
|
|
|
parsed_output = version_re.match(tool_output)
|
|
- result = parsed_output.group(1) + parsed_output.group(2)
|
|
+ if parsed_output.group(2) == None:
|
|
+ result = parsed_output.group(1) + "1"
|
|
+ else:
|
|
+ result = parsed_output.group(1) + parsed_output.group(2)
|
|
+
|
|
compiler_version_cache[cache_key] = result
|
|
return result
|
|
except Exception, e:
|