master hovercats/oakiss / repo / gstreamer / patches / 0001-fix-incompatability-with-byacc.patch
 1From 4e7b28955ccb4c8b8c18ecb95b996d0c8d9a3248 Mon Sep 17 00:00:00 2001
 2From: hovercats <hovercatswithlasereyes@protonmail.com>
 3Date: Thu, 2 May 2024 17:47:31 +0200
 4Subject: [PATCH] fix incompatability with byacc
 5
 6---
 7 gst/parse/gen_grammar.py.in |  2 +-
 8 gst/parse/meson.build       | 16 ++--------------
 9 2 files changed, 3 insertions(+), 15 deletions(-)
10 mode change 100755 => 100644 gst/parse/gen_grammar.py.in
11
12diff --git a/gst/parse/gen_grammar.py.in b/gst/parse/gen_grammar.py.in
13old mode 100755
14new mode 100644
15index 3a7af00..f4016bc
16--- a/gst/parse/gen_grammar.py.in
17+++ b/gst/parse/gen_grammar.py.in
18@@ -6,7 +6,7 @@ cfile = sys.argv[1]
19 hfile = sys.argv[2]
20 yfile = sys.argv[3]
21 
22-args = ['-d', '-v', '-ppriv_gst_parse_yy', yfile, '-o', cfile]
23+args = ['-d', '-v', '-ppriv_gst_parse_yy',  '-o', cfile, yfile]
24 bison = [r'@BISON@'] + shlex.split(r'@BISON_ARGS@')
25 subprocess.check_call(bison + args)
26 
27diff --git a/gst/parse/meson.build b/gst/parse/meson.build
28index b79a07c..cff1830 100644
29--- a/gst/parse/meson.build
30+++ b/gst/parse/meson.build
31@@ -31,21 +31,9 @@ bison_parser_cdata = configuration_data()
32 bison_cdata = configuration_data()
33 
34 bison_min_version='2.4'
35-bison = find_program('bison', 'win_bison')
36+bison = find_program('bison', 'win_bison', 'yacc')
37 
38-bversion_res = run_command([bison, '--version'], check: true)
39-bversion = bversion_res.stdout().split('\n')[0].split(' ')[-1].strip()
40-if bversion.version_compare('<' + bison_min_version)
41-  error('bison version @0@ >= @1@: NO'.format(bversion, bison_min_version))
42-else
43-  message('bison version @0@ >= @1@: YES'.format(bversion, bison_min_version))
44-endif
45-
46-if bversion.version_compare('>' + '2.5')
47-  bison_parser_cdata.set('BISON_PURE_PARSER', '%define api.pure full')
48-else
49-  bison_parser_cdata.set('BISON_PURE_PARSER', '%pure-parser')
50-endif
51+bison_parser_cdata.set('BISON_PURE_PARSER', '%pure-parser')
52 
53 gen_grammar_file = configure_file(input : 'grammar.y.in',
54   output : 'grammar.y',
55-- 
562.44.0
57