diff options
author | Cian Mc Govern | 2020-11-21 20:54:44 +0000 |
---|---|---|
committer | Cian Mc Govern | 2020-11-21 20:54:44 +0000 |
commit | 79cc279d52c2863a04e263d7fadc430a8b22b494 (patch) | |
tree | 4172b209e8654a8854a4fd0f3f879f7e723cb2b9 /QTBUG-86018.patch | |
parent | a6f9253285a2f3d53adc961669b6cc46bba71d9f (diff) | |
download | aur-79cc279d52c2863a04e263d7fadc430a8b22b494.tar.gz |
Bison 3.7 fix
Diffstat (limited to 'QTBUG-86018.patch')
-rw-r--r-- | QTBUG-86018.patch | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/QTBUG-86018.patch b/QTBUG-86018.patch index 9effe79ab7ca..7df470db62b7 100644 --- a/QTBUG-86018.patch +++ b/QTBUG-86018.patch @@ -1,37 +1,11 @@ -diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/build/scripts/rule_bison.py b/src/3rdparty/chromium/third_party/WebKit/Source/build/scripts/rule_bison.py -index f75e25fd23f..7e0767e951a 100755 --- a/src/3rdparty/chromium/third_party/WebKit/Source/build/scripts/rule_bison.py +++ b/src/3rdparty/chromium/third_party/WebKit/Source/build/scripts/rule_bison.py -@@ -45,6 +45,19 @@ from utilities import abs - - from blinkbuild.name_style_converter import NameStyleConverter - -+def modify_file(path, prefix_lines, suffix_lines, replace_list=[]): -+ prefix_lines = map(lambda s: s + '\n', prefix_lines) -+ suffix_lines = map(lambda s: s + '\n', suffix_lines) -+ with open(path, 'r') as f: -+ old_lines = f.readlines() -+ for i in range(len(old_lines)): -+ for src, dest in replace_list: -+ old_lines[i] = old_lines[i].replace(src, dest) -+ new_lines = prefix_lines + old_lines + suffix_lines -+ with open(path, 'w') as f: -+ f.writelines(new_lines) -+ -+ - assert len(sys.argv) == 4 or len(sys.argv) == 5 - - inputFile = abs(sys.argv[1]) -@@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard - print >>outputHFile, outputHContents - print >>outputHFile, '#endif // %s' % headerGuard +@@ -100,7 +100,7 @@ + outputHFile = open(outputHTmp) + outputHContents = outputHFile.read() outputHFile.close() -+ -+common_replace_list = [(inputRoot + '.hh', -+ inputRoot + '.h')] -+modify_file( -+ outputCpp, [], [], -+ replace_list=common_replace_list) --- -cgit v1.2.1 - +-os.unlink(outputHTmp) ++# not working for bison-3.7: os.unlink(outputHTmp) + + # Rewrite the generated header with #include guards. + outputH = os.path.join(outputDir, inputRoot + '.h') |