initial import
This commit is contained in:
54
gstreamer/PKGBUILD
Normal file
54
gstreamer/PKGBUILD
Normal file
@@ -0,0 +1,54 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=gstreamer
|
||||
pkgver=1.18.3
|
||||
_debver=1.18.3
|
||||
_debrel=1
|
||||
pkgrel=1
|
||||
pkgdesc="Multimedia graph framework - core"
|
||||
url="https://gstreamer.freedesktop.org/"
|
||||
arch=(i686 x86_64)
|
||||
license=(LGPL-2)
|
||||
depends=(libxml2 glib2 libunwind libcap libelf python)
|
||||
makedepends=(gobject-introspection bash-completion meson gmp gsl gtk quilt)
|
||||
install=gstreamer.install
|
||||
source=(https://gstreamer.freedesktop.org/src/$pkgname/$pkgname-$pkgver.tar.xz
|
||||
https://deb.debian.org/debian/pool/main/g/gstreamer1.0/gstreamer1.0_$_debver-$_debrel.debian.tar.xz
|
||||
byacc.patch)
|
||||
sha512sums=('c0258fb1f233facec72b5004d33d36871b11235d369e7f1f1e0597c5880bef89a5337550fa8b285688b5c9f42dac6e7d1f1208076d4b90a09363d2805e0dfba9'
|
||||
'6d296df98d9e798741196c0880d787cc512777c000da855844fe68e32fa8cae0fabbd0a14d9288823e91edafab7cb5b427caf84ba9c9a27926e21b33c00b57b5'
|
||||
'3b6dcee15ea2d04d49131b9d9bb9252563513ed60f2b2222a10af2deb17df7b0966165d59532e2a7a1a05d1f01d700380c6463f187ce725f2872c7c39e612ac2')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
# Doesn't apply and seems unimportant
|
||||
rm -v debian/patches/0001-registrybinary-Update-magic-version-string.patch || true
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
patch -p1 -i ../byacc.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
hyperbola-meson $pkgname-$pkgver build \
|
||||
-D doc=disabled \
|
||||
-D ptp-helper-permissions=none \
|
||||
-D dbghelp=disabled \
|
||||
-D gobject-cast-checks=disabled \
|
||||
-D package-name="GStreamer (Hyperbola GNU/Linux-libre)" \
|
||||
-D package-origin="https://www.hyperbola.info/"
|
||||
meson compile -C build
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" meson install -C build
|
||||
install -Dm644 $pkgname-$pkgver/COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
|
||||
}
|
||||
85
gstreamer/byacc.patch
Normal file
85
gstreamer/byacc.patch
Normal 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',
|
||||
7
gstreamer/gstreamer.install
Normal file
7
gstreamer/gstreamer.install
Normal file
@@ -0,0 +1,7 @@
|
||||
post_install() {
|
||||
post_upgrade $1 ''
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
setcap cap_net_bind_service,cap_net_admin+ep usr/libexec/gstreamer-1.0/gst-ptp-helper
|
||||
}
|
||||
Reference in New Issue
Block a user