commit 83ad88a
hovercats
·
2024-05-02 16:11:17 +0000 UTC
parent b8b00cf
gstreamer: make patch more consistent. merge the sed into the patch aswell
5 files changed,
+60,
-32
+1,
-4
1@@ -2,10 +2,7 @@
2
3 export DESTDIR="$1"
4
5-# Avoid the need for bison
6-patch -p1 < byacc.patch
7-sed '/^args/{s/yfile,//;s/cfile/cfile, yfile/;}' gst/parse/gen_grammar.py.in > _
8-mv -f _ gst/parse/gen_grammar.py.in
9+patch -p1 < 0001-fix-incompatability-with-byacc.patch
10
11 meson setup \
12 -Dprefix=/usr \
+1,
-1
1@@ -1,2 +1,2 @@
2 6c1e203fa5a17436e4118803bbe777f120a12cf891c8fe268366c5fef6e65fe697
3-d69378fcb6e40f43f7341e08d1bcb135ce5425eedf88e0bee6021b39de2e7955e3
4+8c33622b593b7ce7fa9f0e891630907de58494d0b027e0ed6ad91dc5733fd65721
1@@ -0,0 +1,57 @@
2+From 4e7b28955ccb4c8b8c18ecb95b996d0c8d9a3248 Mon Sep 17 00:00:00 2001
3+From: hovercats <hovercatswithlasereyes@protonmail.com>
4+Date: Thu, 2 May 2024 17:47:31 +0200
5+Subject: [PATCH] fix incompatability with byacc
6+
7+---
8+ gst/parse/gen_grammar.py.in | 2 +-
9+ gst/parse/meson.build | 16 ++--------------
10+ 2 files changed, 3 insertions(+), 15 deletions(-)
11+ mode change 100755 => 100644 gst/parse/gen_grammar.py.in
12+
13+diff --git a/gst/parse/gen_grammar.py.in b/gst/parse/gen_grammar.py.in
14+old mode 100755
15+new mode 100644
16+index 3a7af00..f4016bc
17+--- a/gst/parse/gen_grammar.py.in
18++++ b/gst/parse/gen_grammar.py.in
19+@@ -6,7 +6,7 @@ cfile = sys.argv[1]
20+ hfile = sys.argv[2]
21+ yfile = sys.argv[3]
22+
23+-args = ['-d', '-v', '-ppriv_gst_parse_yy', yfile, '-o', cfile]
24++args = ['-d', '-v', '-ppriv_gst_parse_yy', '-o', cfile, yfile]
25+ bison = [r'@BISON@'] + shlex.split(r'@BISON_ARGS@')
26+ subprocess.check_call(bison + args)
27+
28+diff --git a/gst/parse/meson.build b/gst/parse/meson.build
29+index b79a07c..cff1830 100644
30+--- a/gst/parse/meson.build
31++++ b/gst/parse/meson.build
32+@@ -31,21 +31,9 @@ bison_parser_cdata = configuration_data()
33+ bison_cdata = configuration_data()
34+
35+ bison_min_version='2.4'
36+-bison = find_program('bison', 'win_bison')
37++bison = find_program('bison', 'win_bison', 'yacc')
38+
39+-bversion_res = run_command([bison, '--version'], check: true)
40+-bversion = bversion_res.stdout().split('\n')[0].split(' ')[-1].strip()
41+-if bversion.version_compare('<' + bison_min_version)
42+- error('bison version @0@ >= @1@: NO'.format(bversion, bison_min_version))
43+-else
44+- message('bison version @0@ >= @1@: YES'.format(bversion, bison_min_version))
45+-endif
46+-
47+-if bversion.version_compare('>' + '2.5')
48+- bison_parser_cdata.set('BISON_PURE_PARSER', '%define api.pure full')
49+-else
50+- bison_parser_cdata.set('BISON_PURE_PARSER', '%pure-parser')
51+-endif
52++bison_parser_cdata.set('BISON_PURE_PARSER', '%pure-parser')
53+
54+ gen_grammar_file = configure_file(input : 'grammar.y.in',
55+ output : 'grammar.y',
56+--
57+2.44.0
58+
+0,
-26
1@@ -1,26 +0,0 @@
2---- a/gst/parse/meson.build Wed Oct 12 17:39:51 2022
3-+++ b/gst/parse/meson.build Thu Oct 13 14:49:30 2022
4-@@ -31,21 +31,9 @@
5- bison_cdata = configuration_data()
6-
7- bison_min_version='2.4'
8--bison = find_program('bison', 'win_bison')
9-+bison = find_program('bison', 'win_bison', 'yacc')
10-
11--bversion_res = run_command([bison, '--version'], check: true)
12--bversion = bversion_res.stdout().split('\n')[0].split(' ')[-1].strip()
13--if bversion.version_compare('<' + bison_min_version)
14-- error('bison version @0@ >= @1@: NO'.format(bversion, bison_min_version))
15--else
16-- message('bison version @0@ >= @1@: YES'.format(bversion, bison_min_version))
17--endif
18--
19--if bversion.version_compare('>' + '2.5')
20-- bison_parser_cdata.set('BISON_PURE_PARSER', '%define api.pure full')
21--else
22-- bison_parser_cdata.set('BISON_PURE_PARSER', '%pure-parser')
23--endif
24-+bison_parser_cdata.set('BISON_PURE_PARSER', '%pure-parser')
25-
26- gen_grammar_file = configure_file(input : 'grammar.y.in',
27- output : 'grammar.y',
+1,
-1
1@@ -1,2 +1,2 @@
2 https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.24.1.tar.xz
3-patches/byacc.patch
4+patches/0001-fix-incompatability-with-byacc.patch