mirror of
git://git.yoctoproject.org/meta-freescale.git
synced 2025-10-22 23:02:20 +02:00
gstreamer1.0: Transition to meson based builds
Update gstreamer to meson build system. This update follows the strategy and description provided in commit [3e71919b865433ca007bf23f9b4f9015e25ac04e] from upstream. Autotools patches are completely dropped from the layer, and meson-relevant patches are introduced instead. Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
This commit is contained in:
parent
cb3f6b356b
commit
ca1533819c
|
@ -1,42 +0,0 @@
|
|||
From 90916f96262fa7b27a0a99788c69f9fd6df11000 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
Date: Tue, 24 Nov 2015 16:46:27 +0200
|
||||
Subject: [PATCH] introspection.m4: prefix pkgconfig paths with
|
||||
PKG_CONFIG_SYSROOT_DIR
|
||||
|
||||
We can't use our tweaked introspection.m4 from gobject-introspection tarball
|
||||
because gstreamer also defines INTROSPECTION_INIT in its introspection.m4, which
|
||||
is later supplied to g-ir-scanner.
|
||||
|
||||
Upstream-Status: Pending [review on oe-core list]
|
||||
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
||||
---
|
||||
common/m4/introspection.m4 | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4
|
||||
index 162be57..217a6ae 100644
|
||||
--- a/common/m4/introspection.m4
|
||||
+++ b/common/m4/introspection.m4
|
||||
@@ -54,14 +54,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
|
||||
INTROSPECTION_GIRDIR=
|
||||
INTROSPECTION_TYPELIBDIR=
|
||||
if test "x$found_introspection" = "xyes"; then
|
||||
- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
||||
- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
||||
- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
||||
+ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
||||
+ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
||||
+ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
||||
INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
|
||||
INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
||||
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
|
||||
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
|
||||
- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
|
||||
+ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
|
||||
INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);"
|
||||
fi
|
||||
AC_SUBST(INTROSPECTION_SCANNER)
|
||||
--
|
||||
2.6.2
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From 7018ca1c4bf26c8317e7fcd2e7e4e648195f42ca Mon Sep 17 00:00:00 2001
|
||||
From: Ross Burton <ross.burton@intel.com>
|
||||
Date: Wed, 20 Dec 2017 13:03:03 +0000
|
||||
Subject: [PATCH] gstreamer: use a patch instead of sed to fix gtk-doc
|
||||
|
||||
Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient
|
||||
binaries instead of libtool wrapper or running them directly.
|
||||
|
||||
Also substitute a bogus plugin scanner, as trying to run the real one is causing
|
||||
issues during build on x86_64.
|
||||
|
||||
Upstream-Status: Inappropriate
|
||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||
|
||||
---
|
||||
common/gtk-doc.mak | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak
|
||||
index 3f83491..e5cb0d1 100644
|
||||
--- a/common/gtk-doc.mak
|
||||
+++ b/common/gtk-doc.mak
|
||||
@@ -6,11 +6,11 @@
|
||||
if GTK_DOC_USE_LIBTOOL
|
||||
GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
|
||||
-GTKDOC_RUN = $(LIBTOOL) --mode=execute
|
||||
+GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
|
||||
else
|
||||
GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
|
||||
-GTKDOC_RUN =
|
||||
+GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper
|
||||
endif
|
||||
|
||||
# We set GPATH here; this gives us semantics for GNU make
|
||||
@@ -101,6 +101,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
|
||||
GST_PLUGIN_PATH_1_0= \
|
||||
GST_REGISTRY_1_0=doc-registry.xml \
|
||||
$(GTKDOC_EXTRA_ENVIRONMENT) \
|
||||
+ GST_PLUGIN_SCANNER_1_0="$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy" \
|
||||
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \
|
||||
CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \
|
||||
LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
|
||||
--
|
||||
2.15.1
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
From 35db4a2433fbdf8612cf98b5aab5b14aeb5372f8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
|
||||
Date: Thu, 17 Oct 2019 12:13:35 +0100
|
||||
Subject: [PATCH] meson: build gir even when cross-compiling if introspection
|
||||
was enabled explicitly
|
||||
|
||||
This can be made to work in certain circumstances when
|
||||
cross-compiling, so default to not building g-i stuff
|
||||
when cross-compiling, but allow it if introspection was
|
||||
enabled explicitly via -Dintrospection=enabled.
|
||||
|
||||
Fixes #454 and #381.
|
||||
|
||||
Upstream-Status: Backport [35db4a2433fbdf8612cf98b5aab5b14aeb5372f8]
|
||||
|
||||
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
|
||||
---
|
||||
meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 90d98d8eb..a47e7f34e 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -466,7 +466,7 @@ rt_lib = cc.find_library('rt', required : false)
|
||||
gir = find_program('g-ir-scanner', required : get_option('introspection'))
|
||||
gnome = import('gnome')
|
||||
|
||||
-build_gir = gir.found() and not meson.is_cross_build()
|
||||
+build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled())
|
||||
|
||||
gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
|
||||
'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
From f6c7973c03d9ba7dab60c496e768c5e6c4ee824c Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Rafael Giani <crg7475@mailbox.org>
|
||||
Date: Sun, 20 Oct 2019 10:36:44 +0200
|
||||
Subject: [PATCH] meson: Add valgrind feature
|
||||
|
||||
This allows for enabling/disabling Valgrind support. Since Valgrind is
|
||||
an external dependency, such a feature is needed by build environemnts
|
||||
such as Yocto to make sure builds are deterministic. These changes also
|
||||
add more Valgrind specific configure log output.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
|
||||
---
|
||||
meson.build | 23 ++++++++++++++++++++++-
|
||||
meson_options.txt | 1 +
|
||||
2 files changed, 23 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index b55ecc5..4751761 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -199,7 +199,6 @@ check_headers = [
|
||||
'sys/wait.h',
|
||||
'ucontext.h',
|
||||
'unistd.h',
|
||||
- 'valgrind/valgrind.h',
|
||||
'sys/resource.h',
|
||||
]
|
||||
|
||||
@@ -214,6 +213,28 @@ foreach h : check_headers
|
||||
endif
|
||||
endforeach
|
||||
|
||||
+valgrind_option = get_option('valgrind')
|
||||
+if valgrind_option.disabled()
|
||||
+ message('Valgrind support not requested; disabled.')
|
||||
+else
|
||||
+ valgrind_header = 'valgrind/valgrind.h'
|
||||
+ has_valgrind_header = cc.has_header(valgrind_header)
|
||||
+ if has_valgrind_header
|
||||
+ message('Valgrind support requested, and header ' + valgrind_header + \
|
||||
+ ' found. Enabled Valgrind support.')
|
||||
+ define = 'HAVE_' + valgrind_header.underscorify().to_upper()
|
||||
+ cdata.set(define, 1)
|
||||
+ else
|
||||
+ if valgrind_option.enabled()
|
||||
+ error('Valgrind support requested and set as required, but header ' + \
|
||||
+ valgrind_header + ' not found.')
|
||||
+ else
|
||||
+ message('Valgrind support requested, but header ' + valgrind_header + \
|
||||
+ ' not found. Disabling Valgrind support.')
|
||||
+ endif
|
||||
+ endif
|
||||
+endif
|
||||
+
|
||||
if cc.has_member('struct tm', 'tm_gmtoff', prefix : '#include <time.h>')
|
||||
cdata.set('HAVE_TM_GMTOFF', 1)
|
||||
endif
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index e7ff7ba..8afde39 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -19,6 +19,7 @@ option('memory-alignment', type: 'combo',
|
||||
|
||||
# Feature options
|
||||
option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
|
||||
+option('valgrind', type : 'feature', value : 'auto', description : 'Enable Valgrind support')
|
||||
option('libunwind', type : 'feature', value : 'auto', description : 'Use libunwind to generate backtraces')
|
||||
option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind')
|
||||
option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces')
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -0,0 +1,257 @@
|
|||
From b843400284751968862751dfe93853f151551c64 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Rafael Giani <crg7475@mailbox.org>
|
||||
Date: Fri, 25 Oct 2019 00:06:26 +0200
|
||||
Subject: [PATCH] meson: Add option for installed tests
|
||||
|
||||
This adds an option for producing installed versions of the unit tests.
|
||||
These versions don't need meson to run (only a small shell script). This
|
||||
makes it easier to run cross compiled tests on a target machine.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
|
||||
---
|
||||
build-aux/gen-installed-test-desc.py | 18 ++++++
|
||||
build-aux/gen-installed-test-shscript.py | 25 ++++++++
|
||||
meson_options.txt | 2 +
|
||||
tests/check/meson.build | 46 +++++++++++++-
|
||||
tests/files/testfile | 80 ++++++++++++++++++++++++
|
||||
5 files changed, 170 insertions(+), 1 deletion(-)
|
||||
create mode 100644 build-aux/gen-installed-test-desc.py
|
||||
create mode 100644 build-aux/gen-installed-test-shscript.py
|
||||
create mode 100644 tests/files/testfile
|
||||
|
||||
diff --git a/build-aux/gen-installed-test-desc.py b/build-aux/gen-installed-test-desc.py
|
||||
new file mode 100644
|
||||
index 0000000..69e8a0f
|
||||
--- /dev/null
|
||||
+++ b/build-aux/gen-installed-test-desc.py
|
||||
@@ -0,0 +1,18 @@
|
||||
+import sys
|
||||
+import os
|
||||
+import argparse
|
||||
+
|
||||
+def write_template(filename, data):
|
||||
+ with open(filename, 'w') as f:
|
||||
+ f.write(data)
|
||||
+
|
||||
+def build_template(testdir, testname):
|
||||
+ return "[Test]\nType=session\nExec={}\n".format(os.path.join(testdir, testname))
|
||||
+
|
||||
+argparser = argparse.ArgumentParser(description='Generate installed-test data.')
|
||||
+argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory')
|
||||
+argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name')
|
||||
+argparser.add_argument('--output', metavar='file', required=True, help='Output file')
|
||||
+args = argparser.parse_args()
|
||||
+
|
||||
+write_template(args.output, build_template(args.test_execdir, args.testname))
|
||||
diff --git a/build-aux/gen-installed-test-shscript.py b/build-aux/gen-installed-test-shscript.py
|
||||
new file mode 100644
|
||||
index 0000000..5da86fb
|
||||
--- /dev/null
|
||||
+++ b/build-aux/gen-installed-test-shscript.py
|
||||
@@ -0,0 +1,25 @@
|
||||
+import sys
|
||||
+import os
|
||||
+import argparse
|
||||
+
|
||||
+def write_template(filename, data):
|
||||
+ with open(filename, 'w') as f:
|
||||
+ f.write(data)
|
||||
+
|
||||
+def build_template(testdir, testname):
|
||||
+ return ''.join([
|
||||
+ "#!/usr/bin/env sh\n",
|
||||
+ "export GST_STATE_IGNORE_ELEMENTS=''\n",
|
||||
+ "export CK_DEFAULT_TIMEOUT=20\n",
|
||||
+ "export GST_PLUGIN_LOADING_WHITELIST='gstreamer'\n",
|
||||
+ "{}\n".format(os.path.join(testdir, testname)),
|
||||
+ ])
|
||||
+
|
||||
+argparser = argparse.ArgumentParser(description='Generate installed-test data.')
|
||||
+argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory')
|
||||
+argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name')
|
||||
+argparser.add_argument('--output', metavar='file', required=True, help='Output file')
|
||||
+args = argparser.parse_args()
|
||||
+
|
||||
+write_template(args.output, build_template(args.test_execdir, args.testname))
|
||||
+os.chmod(args.output, 0o755)
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 8afde39..8884dcc 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -16,6 +16,8 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
|
||||
option('memory-alignment', type: 'combo',
|
||||
choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
|
||||
value: 'malloc')
|
||||
+option('installed-tests', type : 'boolean', value : false, description : 'enable installed tests')
|
||||
+option('test-files-path', type : 'string', description : 'Path where to find test files')
|
||||
|
||||
# Feature options
|
||||
option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
|
||||
diff --git a/tests/check/meson.build b/tests/check/meson.build
|
||||
index 04da83f..2db7f76 100644
|
||||
--- a/tests/check/meson.build
|
||||
+++ b/tests/check/meson.build
|
||||
@@ -118,11 +118,17 @@ if add_languages('cpp', required : false)
|
||||
]
|
||||
endif
|
||||
|
||||
+test_files_path = get_option('test-files-path')
|
||||
+if test_files_path == ''
|
||||
+ test_files_path = meson.current_source_dir() + '/../files'
|
||||
+endif
|
||||
+message('Using path "@0@" as the path to read test files from'.format(test_files_path))
|
||||
+
|
||||
test_defines = [
|
||||
'-UG_DISABLE_ASSERT',
|
||||
'-UG_DISABLE_CAST_CHECKS',
|
||||
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
|
||||
- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
|
||||
+ '-DTESTFILE="@0@"'.format(test_files_path + '/testfile'),
|
||||
'-DGST_USE_UNSTABLE_API',
|
||||
'-DGST_DISABLE_DEPRECATED',
|
||||
]
|
||||
@@ -137,6 +143,14 @@ endif
|
||||
glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep]
|
||||
gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep]
|
||||
|
||||
+installed_tests_datadir = join_paths(prefix, get_option('datadir'), 'installed-tests', 'gstreamer-1.0')
|
||||
+installed_tests_execdir = join_paths(prefix, libexecdir, 'installed-tests', 'gstreamer-1.0')
|
||||
+installed_tests_enabled = get_option('installed-tests')
|
||||
+
|
||||
+python = import('python').find_installation()
|
||||
+gen_installed_test_desc = files('../../build-aux/gen-installed-test-desc.py')
|
||||
+gen_installed_test_shscript = files('../../build-aux/gen-installed-test-shscript.py')
|
||||
+
|
||||
foreach t : core_tests
|
||||
fname = t[0]
|
||||
test_name = fname.split('.')[0].underscorify()
|
||||
@@ -150,8 +164,38 @@ foreach t : core_tests
|
||||
include_directories : [configinc],
|
||||
link_with : link_with_libs,
|
||||
dependencies : test_deps + glib_deps + gst_deps,
|
||||
+ install_dir: installed_tests_execdir,
|
||||
+ install: installed_tests_enabled
|
||||
)
|
||||
|
||||
+ if installed_tests_enabled
|
||||
+ installed_test_shscript = test_name + '.sh'
|
||||
+ shscript = custom_target (test_name + '_shscript',
|
||||
+ output: installed_test_shscript,
|
||||
+ command: [
|
||||
+ python,
|
||||
+ gen_installed_test_shscript,
|
||||
+ '--test-execdir=@0@'.format(installed_tests_execdir),
|
||||
+ '--testname=@0@'.format(test_name),
|
||||
+ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_shscript)),
|
||||
+ ],
|
||||
+ install: true,
|
||||
+ install_dir: installed_tests_execdir)
|
||||
+
|
||||
+ installed_test_desc = test_name + '.test'
|
||||
+ data = custom_target(test_name + '_desc',
|
||||
+ output: installed_test_desc,
|
||||
+ command: [
|
||||
+ python,
|
||||
+ gen_installed_test_desc,
|
||||
+ '--test-execdir=@0@'.format(installed_tests_execdir),
|
||||
+ '--testname=@0@'.format(installed_test_shscript),
|
||||
+ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_desc)),
|
||||
+ ],
|
||||
+ install: true,
|
||||
+ install_dir: installed_tests_datadir)
|
||||
+ endif
|
||||
+
|
||||
env = environment()
|
||||
env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
|
||||
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
||||
diff --git a/tests/files/testfile b/tests/files/testfile
|
||||
new file mode 100644
|
||||
index 0000000..89954e0
|
||||
--- /dev/null
|
||||
+++ b/tests/files/testfile
|
||||
@@ -0,0 +1,80 @@
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
+................................................................................
|
||||
--
|
||||
2.17.1
|
||||
|
37
recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
Normal file
37
recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
Currently gstreamer configuration depends on whether setcap is found on the host
|
||||
system. Turn this into a configure option to make builds deterinistic.
|
||||
|
||||
RP 2020/2/19
|
||||
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
||||
Upstream-Status: Pending
|
||||
|
||||
Index: gstreamer-1.16.1/libs/gst/helpers/meson.build
|
||||
===================================================================
|
||||
--- gstreamer-1.16.1.orig/libs/gst/helpers/meson.build
|
||||
+++ gstreamer-1.16.1/libs/gst/helpers/meson.build
|
||||
@@ -73,7 +73,12 @@ if have_ptp
|
||||
endif
|
||||
endif
|
||||
|
||||
- setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false)
|
||||
+ setcap_feature = get_option('setcap')
|
||||
+ if setcap_feature.disabled()
|
||||
+ setcap = find_program('dontexist', required : false)
|
||||
+ else
|
||||
+ setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false)
|
||||
+ endif
|
||||
|
||||
# user/group to change to in gst-ptp-helper
|
||||
ptp_helper_setuid_user = get_option('ptp-helper-setuid-user')
|
||||
Index: gstreamer-1.16.1/meson_options.txt
|
||||
===================================================================
|
||||
--- gstreamer-1.16.1.orig/meson_options.txt
|
||||
+++ gstreamer-1.16.1/meson_options.txt
|
||||
@@ -26,6 +26,7 @@ option('libunwind', type : 'feature', va
|
||||
option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind')
|
||||
option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces')
|
||||
option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files')
|
||||
+option('setcap', type : 'feature', value : 'auto', description : 'Use setcap')
|
||||
|
||||
# Common feature options
|
||||
option('examples', type : 'feature', value : 'auto', yield : true)
|
|
@ -6,13 +6,9 @@ BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
|
|||
SECTION = "multimedia"
|
||||
LICENSE = "LGPLv2+"
|
||||
|
||||
DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native elfutils"
|
||||
DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
|
||||
|
||||
inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
|
||||
|
||||
# This way common/m4/introspection.m4 will come first
|
||||
# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
|
||||
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
|
||||
inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
|
||||
file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
|
||||
|
@ -23,55 +19,66 @@ SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
|
|||
|
||||
SRC_URI = " \
|
||||
${GST1.0_SRC};branch=${SRCBRANCH} \
|
||||
file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
|
||||
file://gtk-doc-tweaks.patch \
|
||||
file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
|
||||
file://0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch \
|
||||
file://0003-meson-Add-valgrind-feature.patch \
|
||||
file://0004-meson-Add-option-for-installed-tests.patch \
|
||||
file://capfix.patch \
|
||||
"
|
||||
SRCREV = "a4c220605ac0923596b89f4f07c05d235bc09259"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
DEFAULT_PREFERENCE = "-1"
|
||||
|
||||
EXTRA_AUTORECONF = ""
|
||||
PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
|
||||
check \
|
||||
debug \
|
||||
tools"
|
||||
|
||||
PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false"
|
||||
PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false"
|
||||
PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled"
|
||||
PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false"
|
||||
PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind,"
|
||||
PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
|
||||
PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils"
|
||||
PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion"
|
||||
PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled"
|
||||
PACKAGECONFIG[setcap] = "-Dsetcap=enabled,-Dsetcap=disabled,libcap libcap-native"
|
||||
|
||||
PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
|
||||
PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
|
||||
PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
|
||||
PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
|
||||
# TODO: put this in a gettext.bbclass patch
|
||||
def gettext_oemeson(d):
|
||||
if d.getVar('USE_NLS') == 'no':
|
||||
return '-Dnls=disabled'
|
||||
# Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
|
||||
if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
|
||||
return '-Dnls=disabled'
|
||||
return '-Dnls=enabled'
|
||||
|
||||
EXTRA_OECONF = " \
|
||||
--disable-dependency-tracking \
|
||||
--disable-examples \
|
||||
EXTRA_OEMESON += " \
|
||||
-Dexamples=disabled \
|
||||
-Ddbghelp=disabled \
|
||||
${@gettext_oemeson(d)} \
|
||||
"
|
||||
|
||||
CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no"
|
||||
GTKDOC_MESON_OPTION = "gtk_doc"
|
||||
GTKDOC_MESON_ENABLE_FLAG = "enabled"
|
||||
GTKDOC_MESON_DISABLE_FLAG = "disabled"
|
||||
|
||||
# musl libc generates warnings if <sys/poll.h> is included directly
|
||||
CACHED_CONFIGUREVARS += "ac_cv_header_sys_poll_h=no"
|
||||
GIR_MESON_ENABLE_FLAG = "enabled"
|
||||
GIR_MESON_DISABLE_FLAG = "disabled"
|
||||
|
||||
PACKAGES += "${PN}-bash-completion"
|
||||
|
||||
# Add the core element plugins to the main package
|
||||
FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
|
||||
FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
|
||||
FILES_${PN}-dev += "${datadir}/gdb/* ${datadir}/gstreamer-1.0/gdb/*"
|
||||
FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
|
||||
FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
|
||||
FILES_${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb ${datadir}/glib-2.0/gdb"
|
||||
|
||||
RRECOMMENDS_${PN}_qemux86 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
|
||||
RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
|
||||
CVE_PRODUCT = "gstreamer"
|
||||
|
||||
delete_pkg_m4_file() {
|
||||
# This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
|
||||
rm "${S}/common/m4/pkg.m4" || true
|
||||
rm -f "${S}/common/m4/gtk-doc.m4"
|
||||
}
|
||||
|
||||
do_configure[prefuncs] += "delete_pkg_m4_file"
|
||||
|
||||
do_compile_prepend() {
|
||||
export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
|
||||
}
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
require recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc
|
||||
|
||||
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
|
||||
|
|
Loading…
Reference in New Issue
Block a user