initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

85
gstreamer/byacc.patch Normal file
View File

@@ -0,0 +1,85 @@
diff --git a/gst/parse/gen_grammar.py.in b/gst/parse/gen_grammar.py.in
index 3a7af00..8d4cc92 100755
--- a/gst/parse/gen_grammar.py.in
+++ b/gst/parse/gen_grammar.py.in
@@ -6,9 +6,9 @@ cfile = sys.argv[1]
hfile = sys.argv[2]
yfile = sys.argv[3]
-args = ['-d', '-v', '-ppriv_gst_parse_yy', yfile, '-o', cfile]
-bison = [r'@BISON@'] + shlex.split(r'@BISON_ARGS@')
-subprocess.check_call(bison + args)
+args = ['-d', '-v', '-p', 'priv_gst_parse_yy', '-o', cfile, yfile]
+yacc = [r'@YACC@'] + shlex.split(r'@YACC_ARGS@')
+subprocess.check_call(yacc + args)
prefix = '''
#ifdef HAVE_CONFIG_H
diff --git a/gst/parse/grammar.y.in b/gst/parse/grammar.y.in
index 2ef703d..8292df9 100644
--- a/gst/parse/grammar.y.in
+++ b/gst/parse/grammar.y.in
@@ -830,7 +830,7 @@ static int yyerror (void *scanner, graph_t *graph, const char *s);
%lex-param { void *scanner }
%parse-param { void *scanner }
%parse-param { graph_t *graph }
-@BISON_PURE_PARSER@
+@YACC_PURE_PARSER@
%start graph
%%
diff --git a/gst/parse/meson.build b/gst/parse/meson.build
index 35ed6f2..0391dad 100644
--- a/gst/parse/meson.build
+++ b/gst/parse/meson.build
@@ -26,41 +26,24 @@ gen_lex = configure_file(input : 'gen_lex.py.in',
output : 'gen_lex.py',
configuration : flex_cdata)
-# Find bison, configure grammar generator
-bison_parser_cdata = configuration_data()
-bison_cdata = configuration_data()
+# Find yacc, configure grammar generator
+yacc_parser_cdata = configuration_data()
+yacc_cdata = configuration_data()
-bison_min_version='2.4'
-bison = find_program('bison', 'win_bison')
+yacc = find_program('byacc')
-bversion_res = run_command([bison, '--version'])
-if bversion_res.returncode() != 0
- error('Could not get bison version (@0@)'.format(bversion_res.stderr()))
-endif
-
-bversion = bversion_res.stdout().split('\n')[0].split(' ')[-1].strip()
-if bversion.version_compare('<' + bison_min_version)
- error('bison version @0@ >= @1@: NO'.format(bversion, bison_min_version))
-else
- message('bison version @0@ >= @1@: YES'.format(bversion, bison_min_version))
-endif
-
-if bversion.version_compare('>' + '2.5')
- bison_parser_cdata.set('BISON_PURE_PARSER', '%define api.pure full')
-else
- bison_parser_cdata.set('BISON_PURE_PARSER', '%pure-parser')
-endif
+yacc_parser_cdata.set('YACC_PURE_PARSER', '%pure-parser')
gen_grammar_file = configure_file(input : 'grammar.y.in',
output : 'grammar.y',
- configuration : bison_parser_cdata)
+ configuration : yacc_parser_cdata)
-bison_cdata.set('BISON', bison.path())
-bison_cdata.set('BISON_ARGS', '')
+yacc_cdata.set('YACC', yacc.path())
+yacc_cdata.set('YACC_ARGS', '')
gen_grammar = configure_file(input : 'gen_grammar.py.in',
output : 'gen_grammar.py',
- configuration : bison_cdata)
+ configuration : yacc_cdata)
# Custom targets
parser = custom_target('parselex',