diff options
| -rw-r--r-- | recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch | 42 | ||||
| -rw-r--r-- | recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch | 47 | ||||
| -rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch (renamed from recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch) | 0 | ||||
| -rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch | 36 | ||||
| -rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch | 74 | ||||
| -rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch | 257 | ||||
| -rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch | 37 | ||||
| -rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb | 87 |
8 files changed, 451 insertions, 129 deletions
diff --git a/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch b/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch deleted file mode 100644 index 2cab87f9e..000000000 --- a/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | From 90916f96262fa7b27a0a99788c69f9fd6df11000 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 3 | Date: Tue, 24 Nov 2015 16:46:27 +0200 | ||
| 4 | Subject: [PATCH] introspection.m4: prefix pkgconfig paths with | ||
| 5 | PKG_CONFIG_SYSROOT_DIR | ||
| 6 | |||
| 7 | We can't use our tweaked introspection.m4 from gobject-introspection tarball | ||
| 8 | because gstreamer also defines INTROSPECTION_INIT in its introspection.m4, which | ||
| 9 | is later supplied to g-ir-scanner. | ||
| 10 | |||
| 11 | Upstream-Status: Pending [review on oe-core list] | ||
| 12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 13 | --- | ||
| 14 | common/m4/introspection.m4 | 12 ++++++------ | ||
| 15 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4 | ||
| 18 | index 162be57..217a6ae 100644 | ||
| 19 | --- a/common/m4/introspection.m4 | ||
| 20 | +++ b/common/m4/introspection.m4 | ||
| 21 | @@ -54,14 +54,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], | ||
| 22 | INTROSPECTION_GIRDIR= | ||
| 23 | INTROSPECTION_TYPELIBDIR= | ||
| 24 | if test "x$found_introspection" = "xyes"; then | ||
| 25 | - INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` | ||
| 26 | - INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` | ||
| 27 | - INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` | ||
| 28 | + INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` | ||
| 29 | + INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` | ||
| 30 | + INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` | ||
| 31 | INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` | ||
| 32 | INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" | ||
| 33 | INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` | ||
| 34 | INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` | ||
| 35 | - INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection | ||
| 36 | + INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection | ||
| 37 | INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);" | ||
| 38 | fi | ||
| 39 | AC_SUBST(INTROSPECTION_SCANNER) | ||
| 40 | -- | ||
| 41 | 2.6.2 | ||
| 42 | |||
diff --git a/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch b/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch deleted file mode 100644 index d86c78d79..000000000 --- a/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | From 7018ca1c4bf26c8317e7fcd2e7e4e648195f42ca Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ross Burton <ross.burton@intel.com> | ||
| 3 | Date: Wed, 20 Dec 2017 13:03:03 +0000 | ||
| 4 | Subject: [PATCH] gstreamer: use a patch instead of sed to fix gtk-doc | ||
| 5 | |||
| 6 | Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient | ||
| 7 | binaries instead of libtool wrapper or running them directly. | ||
| 8 | |||
| 9 | Also substitute a bogus plugin scanner, as trying to run the real one is causing | ||
| 10 | issues during build on x86_64. | ||
| 11 | |||
| 12 | Upstream-Status: Inappropriate | ||
| 13 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 14 | |||
| 15 | --- | ||
| 16 | common/gtk-doc.mak | 5 +++-- | ||
| 17 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak | ||
| 20 | index 3f83491..e5cb0d1 100644 | ||
| 21 | --- a/common/gtk-doc.mak | ||
| 22 | +++ b/common/gtk-doc.mak | ||
| 23 | @@ -6,11 +6,11 @@ | ||
| 24 | if GTK_DOC_USE_LIBTOOL | ||
| 25 | GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
| 26 | GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) | ||
| 27 | -GTKDOC_RUN = $(LIBTOOL) --mode=execute | ||
| 28 | +GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper | ||
| 29 | else | ||
| 30 | GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
| 31 | GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) | ||
| 32 | -GTKDOC_RUN = | ||
| 33 | +GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper | ||
| 34 | endif | ||
| 35 | |||
| 36 | # We set GPATH here; this gives us semantics for GNU make | ||
| 37 | @@ -101,6 +101,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) | ||
| 38 | GST_PLUGIN_PATH_1_0= \ | ||
| 39 | GST_REGISTRY_1_0=doc-registry.xml \ | ||
| 40 | $(GTKDOC_EXTRA_ENVIRONMENT) \ | ||
| 41 | + GST_PLUGIN_SCANNER_1_0="$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy" \ | ||
| 42 | CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \ | ||
| 43 | CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \ | ||
| 44 | LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ | ||
| 45 | -- | ||
| 46 | 2.15.1 | ||
| 47 | |||
diff --git a/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch index 67a872cdd..67a872cdd 100644 --- a/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 000000000..1ed7198a5 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From 35db4a2433fbdf8612cf98b5aab5b14aeb5372f8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> | ||
| 3 | Date: Thu, 17 Oct 2019 12:13:35 +0100 | ||
| 4 | Subject: [PATCH] meson: build gir even when cross-compiling if introspection | ||
| 5 | was enabled explicitly | ||
| 6 | |||
| 7 | This can be made to work in certain circumstances when | ||
| 8 | cross-compiling, so default to not building g-i stuff | ||
| 9 | when cross-compiling, but allow it if introspection was | ||
| 10 | enabled explicitly via -Dintrospection=enabled. | ||
| 11 | |||
| 12 | Fixes #454 and #381. | ||
| 13 | |||
| 14 | Upstream-Status: Backport [35db4a2433fbdf8612cf98b5aab5b14aeb5372f8] | ||
| 15 | |||
| 16 | Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 17 | --- | ||
| 18 | meson.build | 2 +- | ||
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/meson.build b/meson.build | ||
| 22 | index 90d98d8eb..a47e7f34e 100644 | ||
| 23 | --- a/meson.build | ||
| 24 | +++ b/meson.build | ||
| 25 | @@ -466,7 +466,7 @@ rt_lib = cc.find_library('rt', required : false) | ||
| 26 | gir = find_program('g-ir-scanner', required : get_option('introspection')) | ||
| 27 | gnome = import('gnome') | ||
| 28 | |||
| 29 | -build_gir = gir.found() and not meson.is_cross_build() | ||
| 30 | +build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) | ||
| 31 | |||
| 32 | gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ | ||
| 33 | 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \ | ||
| 34 | -- | ||
| 35 | 2.17.1 | ||
| 36 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch new file mode 100644 index 000000000..f553340f4 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | From f6c7973c03d9ba7dab60c496e768c5e6c4ee824c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 3 | Date: Sun, 20 Oct 2019 10:36:44 +0200 | ||
| 4 | Subject: [PATCH] meson: Add valgrind feature | ||
| 5 | |||
| 6 | This allows for enabling/disabling Valgrind support. Since Valgrind is | ||
| 7 | an external dependency, such a feature is needed by build environemnts | ||
| 8 | such as Yocto to make sure builds are deterministic. These changes also | ||
| 9 | add more Valgrind specific configure log output. | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 14 | --- | ||
| 15 | meson.build | 23 ++++++++++++++++++++++- | ||
| 16 | meson_options.txt | 1 + | ||
| 17 | 2 files changed, 23 insertions(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/meson.build b/meson.build | ||
| 20 | index b55ecc5..4751761 100644 | ||
| 21 | --- a/meson.build | ||
| 22 | +++ b/meson.build | ||
| 23 | @@ -199,7 +199,6 @@ check_headers = [ | ||
| 24 | 'sys/wait.h', | ||
| 25 | 'ucontext.h', | ||
| 26 | 'unistd.h', | ||
| 27 | - 'valgrind/valgrind.h', | ||
| 28 | 'sys/resource.h', | ||
| 29 | ] | ||
| 30 | |||
| 31 | @@ -214,6 +213,28 @@ foreach h : check_headers | ||
| 32 | endif | ||
| 33 | endforeach | ||
| 34 | |||
| 35 | +valgrind_option = get_option('valgrind') | ||
| 36 | +if valgrind_option.disabled() | ||
| 37 | + message('Valgrind support not requested; disabled.') | ||
| 38 | +else | ||
| 39 | + valgrind_header = 'valgrind/valgrind.h' | ||
| 40 | + has_valgrind_header = cc.has_header(valgrind_header) | ||
| 41 | + if has_valgrind_header | ||
| 42 | + message('Valgrind support requested, and header ' + valgrind_header + \ | ||
| 43 | + ' found. Enabled Valgrind support.') | ||
| 44 | + define = 'HAVE_' + valgrind_header.underscorify().to_upper() | ||
| 45 | + cdata.set(define, 1) | ||
| 46 | + else | ||
| 47 | + if valgrind_option.enabled() | ||
| 48 | + error('Valgrind support requested and set as required, but header ' + \ | ||
| 49 | + valgrind_header + ' not found.') | ||
| 50 | + else | ||
| 51 | + message('Valgrind support requested, but header ' + valgrind_header + \ | ||
| 52 | + ' not found. Disabling Valgrind support.') | ||
| 53 | + endif | ||
| 54 | + endif | ||
| 55 | +endif | ||
| 56 | + | ||
| 57 | if cc.has_member('struct tm', 'tm_gmtoff', prefix : '#include <time.h>') | ||
| 58 | cdata.set('HAVE_TM_GMTOFF', 1) | ||
| 59 | endif | ||
| 60 | diff --git a/meson_options.txt b/meson_options.txt | ||
| 61 | index e7ff7ba..8afde39 100644 | ||
| 62 | --- a/meson_options.txt | ||
| 63 | +++ b/meson_options.txt | ||
| 64 | @@ -19,6 +19,7 @@ option('memory-alignment', type: 'combo', | ||
| 65 | |||
| 66 | # Feature options | ||
| 67 | option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') | ||
| 68 | +option('valgrind', type : 'feature', value : 'auto', description : 'Enable Valgrind support') | ||
| 69 | option('libunwind', type : 'feature', value : 'auto', description : 'Use libunwind to generate backtraces') | ||
| 70 | option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind') | ||
| 71 | option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces') | ||
| 72 | -- | ||
| 73 | 2.17.1 | ||
| 74 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch new file mode 100644 index 000000000..0e6c44ea3 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch | |||
| @@ -0,0 +1,257 @@ | |||
| 1 | From b843400284751968862751dfe93853f151551c64 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 3 | Date: Fri, 25 Oct 2019 00:06:26 +0200 | ||
| 4 | Subject: [PATCH] meson: Add option for installed tests | ||
| 5 | |||
| 6 | This adds an option for producing installed versions of the unit tests. | ||
| 7 | These versions don't need meson to run (only a small shell script). This | ||
| 8 | makes it easier to run cross compiled tests on a target machine. | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 13 | --- | ||
| 14 | build-aux/gen-installed-test-desc.py | 18 ++++++ | ||
| 15 | build-aux/gen-installed-test-shscript.py | 25 ++++++++ | ||
| 16 | meson_options.txt | 2 + | ||
| 17 | tests/check/meson.build | 46 +++++++++++++- | ||
| 18 | tests/files/testfile | 80 ++++++++++++++++++++++++ | ||
| 19 | 5 files changed, 170 insertions(+), 1 deletion(-) | ||
| 20 | create mode 100644 build-aux/gen-installed-test-desc.py | ||
| 21 | create mode 100644 build-aux/gen-installed-test-shscript.py | ||
| 22 | create mode 100644 tests/files/testfile | ||
| 23 | |||
| 24 | diff --git a/build-aux/gen-installed-test-desc.py b/build-aux/gen-installed-test-desc.py | ||
| 25 | new file mode 100644 | ||
| 26 | index 0000000..69e8a0f | ||
| 27 | --- /dev/null | ||
| 28 | +++ b/build-aux/gen-installed-test-desc.py | ||
| 29 | @@ -0,0 +1,18 @@ | ||
| 30 | +import sys | ||
| 31 | +import os | ||
| 32 | +import argparse | ||
| 33 | + | ||
| 34 | +def write_template(filename, data): | ||
| 35 | + with open(filename, 'w') as f: | ||
| 36 | + f.write(data) | ||
| 37 | + | ||
| 38 | +def build_template(testdir, testname): | ||
| 39 | + return "[Test]\nType=session\nExec={}\n".format(os.path.join(testdir, testname)) | ||
| 40 | + | ||
| 41 | +argparser = argparse.ArgumentParser(description='Generate installed-test data.') | ||
| 42 | +argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') | ||
| 43 | +argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') | ||
| 44 | +argparser.add_argument('--output', metavar='file', required=True, help='Output file') | ||
| 45 | +args = argparser.parse_args() | ||
| 46 | + | ||
| 47 | +write_template(args.output, build_template(args.test_execdir, args.testname)) | ||
| 48 | diff --git a/build-aux/gen-installed-test-shscript.py b/build-aux/gen-installed-test-shscript.py | ||
| 49 | new file mode 100644 | ||
| 50 | index 0000000..5da86fb | ||
| 51 | --- /dev/null | ||
| 52 | +++ b/build-aux/gen-installed-test-shscript.py | ||
| 53 | @@ -0,0 +1,25 @@ | ||
| 54 | +import sys | ||
| 55 | +import os | ||
| 56 | +import argparse | ||
| 57 | + | ||
| 58 | +def write_template(filename, data): | ||
| 59 | + with open(filename, 'w') as f: | ||
| 60 | + f.write(data) | ||
| 61 | + | ||
| 62 | +def build_template(testdir, testname): | ||
| 63 | + return ''.join([ | ||
| 64 | + "#!/usr/bin/env sh\n", | ||
| 65 | + "export GST_STATE_IGNORE_ELEMENTS=''\n", | ||
| 66 | + "export CK_DEFAULT_TIMEOUT=20\n", | ||
| 67 | + "export GST_PLUGIN_LOADING_WHITELIST='gstreamer'\n", | ||
| 68 | + "{}\n".format(os.path.join(testdir, testname)), | ||
| 69 | + ]) | ||
| 70 | + | ||
| 71 | +argparser = argparse.ArgumentParser(description='Generate installed-test data.') | ||
| 72 | +argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') | ||
| 73 | +argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') | ||
| 74 | +argparser.add_argument('--output', metavar='file', required=True, help='Output file') | ||
| 75 | +args = argparser.parse_args() | ||
| 76 | + | ||
| 77 | +write_template(args.output, build_template(args.test_execdir, args.testname)) | ||
| 78 | +os.chmod(args.output, 0o755) | ||
| 79 | diff --git a/meson_options.txt b/meson_options.txt | ||
| 80 | index 8afde39..8884dcc 100644 | ||
| 81 | --- a/meson_options.txt | ||
| 82 | +++ b/meson_options.txt | ||
| 83 | @@ -16,6 +16,8 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso | ||
| 84 | option('memory-alignment', type: 'combo', | ||
| 85 | choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], | ||
| 86 | value: 'malloc') | ||
| 87 | +option('installed-tests', type : 'boolean', value : false, description : 'enable installed tests') | ||
| 88 | +option('test-files-path', type : 'string', description : 'Path where to find test files') | ||
| 89 | |||
| 90 | # Feature options | ||
| 91 | option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') | ||
| 92 | diff --git a/tests/check/meson.build b/tests/check/meson.build | ||
| 93 | index 04da83f..2db7f76 100644 | ||
| 94 | --- a/tests/check/meson.build | ||
| 95 | +++ b/tests/check/meson.build | ||
| 96 | @@ -118,11 +118,17 @@ if add_languages('cpp', required : false) | ||
| 97 | ] | ||
| 98 | endif | ||
| 99 | |||
| 100 | +test_files_path = get_option('test-files-path') | ||
| 101 | +if test_files_path == '' | ||
| 102 | + test_files_path = meson.current_source_dir() + '/../files' | ||
| 103 | +endif | ||
| 104 | +message('Using path "@0@" as the path to read test files from'.format(test_files_path)) | ||
| 105 | + | ||
| 106 | test_defines = [ | ||
| 107 | '-UG_DISABLE_ASSERT', | ||
| 108 | '-UG_DISABLE_CAST_CHECKS', | ||
| 109 | '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', | ||
| 110 | - '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', | ||
| 111 | + '-DTESTFILE="@0@"'.format(test_files_path + '/testfile'), | ||
| 112 | '-DGST_USE_UNSTABLE_API', | ||
| 113 | '-DGST_DISABLE_DEPRECATED', | ||
| 114 | ] | ||
| 115 | @@ -137,6 +143,14 @@ endif | ||
| 116 | glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep] | ||
| 117 | gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep] | ||
| 118 | |||
| 119 | +installed_tests_datadir = join_paths(prefix, get_option('datadir'), 'installed-tests', 'gstreamer-1.0') | ||
| 120 | +installed_tests_execdir = join_paths(prefix, libexecdir, 'installed-tests', 'gstreamer-1.0') | ||
| 121 | +installed_tests_enabled = get_option('installed-tests') | ||
| 122 | + | ||
| 123 | +python = import('python').find_installation() | ||
| 124 | +gen_installed_test_desc = files('../../build-aux/gen-installed-test-desc.py') | ||
| 125 | +gen_installed_test_shscript = files('../../build-aux/gen-installed-test-shscript.py') | ||
| 126 | + | ||
| 127 | foreach t : core_tests | ||
| 128 | fname = t[0] | ||
| 129 | test_name = fname.split('.')[0].underscorify() | ||
| 130 | @@ -150,8 +164,38 @@ foreach t : core_tests | ||
| 131 | include_directories : [configinc], | ||
| 132 | link_with : link_with_libs, | ||
| 133 | dependencies : test_deps + glib_deps + gst_deps, | ||
| 134 | + install_dir: installed_tests_execdir, | ||
| 135 | + install: installed_tests_enabled | ||
| 136 | ) | ||
| 137 | |||
| 138 | + if installed_tests_enabled | ||
| 139 | + installed_test_shscript = test_name + '.sh' | ||
| 140 | + shscript = custom_target (test_name + '_shscript', | ||
| 141 | + output: installed_test_shscript, | ||
| 142 | + command: [ | ||
| 143 | + python, | ||
| 144 | + gen_installed_test_shscript, | ||
| 145 | + '--test-execdir=@0@'.format(installed_tests_execdir), | ||
| 146 | + '--testname=@0@'.format(test_name), | ||
| 147 | + '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_shscript)), | ||
| 148 | + ], | ||
| 149 | + install: true, | ||
| 150 | + install_dir: installed_tests_execdir) | ||
| 151 | + | ||
| 152 | + installed_test_desc = test_name + '.test' | ||
| 153 | + data = custom_target(test_name + '_desc', | ||
| 154 | + output: installed_test_desc, | ||
| 155 | + command: [ | ||
| 156 | + python, | ||
| 157 | + gen_installed_test_desc, | ||
| 158 | + '--test-execdir=@0@'.format(installed_tests_execdir), | ||
| 159 | + '--testname=@0@'.format(installed_test_shscript), | ||
| 160 | + '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_desc)), | ||
| 161 | + ], | ||
| 162 | + install: true, | ||
| 163 | + install_dir: installed_tests_datadir) | ||
| 164 | + endif | ||
| 165 | + | ||
| 166 | env = environment() | ||
| 167 | env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) | ||
| 168 | env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') | ||
| 169 | diff --git a/tests/files/testfile b/tests/files/testfile | ||
| 170 | new file mode 100644 | ||
| 171 | index 0000000..89954e0 | ||
| 172 | --- /dev/null | ||
| 173 | +++ b/tests/files/testfile | ||
| 174 | @@ -0,0 +1,80 @@ | ||
| 175 | +................................................................................ | ||
| 176 | +................................................................................ | ||
| 177 | +................................................................................ | ||
| 178 | +................................................................................ | ||
| 179 | +................................................................................ | ||
| 180 | +................................................................................ | ||
| 181 | +................................................................................ | ||
| 182 | +................................................................................ | ||
| 183 | +................................................................................ | ||
| 184 | +................................................................................ | ||
| 185 | +................................................................................ | ||
| 186 | +................................................................................ | ||
| 187 | +................................................................................ | ||
| 188 | +................................................................................ | ||
| 189 | +................................................................................ | ||
| 190 | +................................................................................ | ||
| 191 | +................................................................................ | ||
| 192 | +................................................................................ | ||
| 193 | +................................................................................ | ||
| 194 | +................................................................................ | ||
| 195 | +................................................................................ | ||
| 196 | +................................................................................ | ||
| 197 | +................................................................................ | ||
| 198 | +................................................................................ | ||
| 199 | +................................................................................ | ||
| 200 | +................................................................................ | ||
| 201 | +................................................................................ | ||
| 202 | +................................................................................ | ||
| 203 | +................................................................................ | ||
| 204 | +................................................................................ | ||
| 205 | +................................................................................ | ||
| 206 | +................................................................................ | ||
| 207 | +................................................................................ | ||
| 208 | +................................................................................ | ||
| 209 | +................................................................................ | ||
| 210 | +................................................................................ | ||
| 211 | +................................................................................ | ||
| 212 | +................................................................................ | ||
| 213 | +................................................................................ | ||
| 214 | +................................................................................ | ||
| 215 | +................................................................................ | ||
| 216 | +................................................................................ | ||
| 217 | +................................................................................ | ||
| 218 | +................................................................................ | ||
| 219 | +................................................................................ | ||
| 220 | +................................................................................ | ||
| 221 | +................................................................................ | ||
| 222 | +................................................................................ | ||
| 223 | +................................................................................ | ||
| 224 | +................................................................................ | ||
| 225 | +................................................................................ | ||
| 226 | +................................................................................ | ||
| 227 | +................................................................................ | ||
| 228 | +................................................................................ | ||
| 229 | +................................................................................ | ||
| 230 | +................................................................................ | ||
| 231 | +................................................................................ | ||
| 232 | +................................................................................ | ||
| 233 | +................................................................................ | ||
| 234 | +................................................................................ | ||
| 235 | +................................................................................ | ||
| 236 | +................................................................................ | ||
| 237 | +................................................................................ | ||
| 238 | +................................................................................ | ||
| 239 | +................................................................................ | ||
| 240 | +................................................................................ | ||
| 241 | +................................................................................ | ||
| 242 | +................................................................................ | ||
| 243 | +................................................................................ | ||
| 244 | +................................................................................ | ||
| 245 | +................................................................................ | ||
| 246 | +................................................................................ | ||
| 247 | +................................................................................ | ||
| 248 | +................................................................................ | ||
| 249 | +................................................................................ | ||
| 250 | +................................................................................ | ||
| 251 | +................................................................................ | ||
| 252 | +................................................................................ | ||
| 253 | +................................................................................ | ||
| 254 | +................................................................................ | ||
| 255 | -- | ||
| 256 | 2.17.1 | ||
| 257 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch b/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch new file mode 100644 index 000000000..7ca3d5ad4 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | Currently gstreamer configuration depends on whether setcap is found on the host | ||
| 2 | system. Turn this into a configure option to make builds deterinistic. | ||
| 3 | |||
| 4 | RP 2020/2/19 | ||
| 5 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Index: gstreamer-1.16.1/libs/gst/helpers/meson.build | ||
| 9 | =================================================================== | ||
| 10 | --- gstreamer-1.16.1.orig/libs/gst/helpers/meson.build | ||
| 11 | +++ gstreamer-1.16.1/libs/gst/helpers/meson.build | ||
| 12 | @@ -73,7 +73,12 @@ if have_ptp | ||
| 13 | endif | ||
| 14 | endif | ||
| 15 | |||
| 16 | - setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) | ||
| 17 | + setcap_feature = get_option('setcap') | ||
| 18 | + if setcap_feature.disabled() | ||
| 19 | + setcap = find_program('dontexist', required : false) | ||
| 20 | + else | ||
| 21 | + setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) | ||
| 22 | + endif | ||
| 23 | |||
| 24 | # user/group to change to in gst-ptp-helper | ||
| 25 | ptp_helper_setuid_user = get_option('ptp-helper-setuid-user') | ||
| 26 | Index: gstreamer-1.16.1/meson_options.txt | ||
| 27 | =================================================================== | ||
| 28 | --- gstreamer-1.16.1.orig/meson_options.txt | ||
| 29 | +++ gstreamer-1.16.1/meson_options.txt | ||
| 30 | @@ -26,6 +26,7 @@ option('libunwind', type : 'feature', va | ||
| 31 | option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind') | ||
| 32 | option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces') | ||
| 33 | option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files') | ||
| 34 | +option('setcap', type : 'feature', value : 'auto', description : 'Use setcap') | ||
| 35 | |||
| 36 | # Common feature options | ||
| 37 | option('examples', type : 'feature', value : 'auto', yield : true) | ||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb index 3c9653a68..2bcf25626 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb | |||
| @@ -6,13 +6,9 @@ BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" | |||
| 6 | SECTION = "multimedia" | 6 | SECTION = "multimedia" |
| 7 | LICENSE = "LGPLv2+" | 7 | LICENSE = "LGPLv2+" |
| 8 | 8 | ||
| 9 | DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native elfutils" | 9 | DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native" |
| 10 | 10 | ||
| 11 | inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc | 11 | inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc |
| 12 | |||
| 13 | # This way common/m4/introspection.m4 will come first | ||
| 14 | # (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file) | ||
| 15 | acpaths = "-I ${S}/common/m4 -I ${S}/m4" | ||
| 16 | 12 | ||
| 17 | LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ |
| 18 | file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" | 14 | file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" |
| @@ -23,55 +19,66 @@ SRCBRANCH = "MM_04.05.01_1909_L4.19.35" | |||
| 23 | 19 | ||
| 24 | SRC_URI = " \ | 20 | SRC_URI = " \ |
| 25 | ${GST1.0_SRC};branch=${SRCBRANCH} \ | 21 | ${GST1.0_SRC};branch=${SRCBRANCH} \ |
| 26 | file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ | ||
| 27 | file://gtk-doc-tweaks.patch \ | ||
| 28 | file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ | 22 | file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ |
| 23 | file://0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ | ||
| 24 | file://0003-meson-Add-valgrind-feature.patch \ | ||
| 25 | file://0004-meson-Add-option-for-installed-tests.patch \ | ||
| 26 | file://capfix.patch \ | ||
| 29 | " | 27 | " |
| 30 | SRCREV = "a4c220605ac0923596b89f4f07c05d235bc09259" | 28 | SRCREV = "a4c220605ac0923596b89f4f07c05d235bc09259" |
| 31 | 29 | ||
| 32 | DEFAULT_PREFERENCE = "-1" | 30 | S = "${WORKDIR}/git" |
| 33 | |||
| 34 | EXTRA_AUTORECONF = "" | ||
| 35 | |||
| 36 | PACKAGECONFIG ??= "" | ||
| 37 | 31 | ||
| 38 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" | 32 | DEFAULT_PREFERENCE = "-1" |
| 39 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests" | ||
| 40 | PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," | ||
| 41 | PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks," | ||
| 42 | 33 | ||
| 43 | EXTRA_OECONF = " \ | 34 | PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ |
| 44 | --disable-dependency-tracking \ | 35 | check \ |
| 45 | --disable-examples \ | 36 | debug \ |
| 37 | tools" | ||
| 38 | |||
| 39 | PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false" | ||
| 40 | PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" | ||
| 41 | PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" | ||
| 42 | PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" | ||
| 43 | PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind," | ||
| 44 | PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" | ||
| 45 | PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" | ||
| 46 | PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" | ||
| 47 | PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled" | ||
| 48 | PACKAGECONFIG[setcap] = "-Dsetcap=enabled,-Dsetcap=disabled,libcap libcap-native" | ||
| 49 | |||
| 50 | # TODO: put this in a gettext.bbclass patch | ||
| 51 | def gettext_oemeson(d): | ||
| 52 | if d.getVar('USE_NLS') == 'no': | ||
| 53 | return '-Dnls=disabled' | ||
| 54 | # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set | ||
| 55 | if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'): | ||
| 56 | return '-Dnls=disabled' | ||
| 57 | return '-Dnls=enabled' | ||
| 58 | |||
| 59 | EXTRA_OEMESON += " \ | ||
| 60 | -Dexamples=disabled \ | ||
| 61 | -Ddbghelp=disabled \ | ||
| 62 | ${@gettext_oemeson(d)} \ | ||
| 46 | " | 63 | " |
| 47 | 64 | ||
| 48 | CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no" | 65 | GTKDOC_MESON_OPTION = "gtk_doc" |
| 66 | GTKDOC_MESON_ENABLE_FLAG = "enabled" | ||
| 67 | GTKDOC_MESON_DISABLE_FLAG = "disabled" | ||
| 49 | 68 | ||
| 50 | # musl libc generates warnings if <sys/poll.h> is included directly | 69 | GIR_MESON_ENABLE_FLAG = "enabled" |
| 51 | CACHED_CONFIGUREVARS += "ac_cv_header_sys_poll_h=no" | 70 | GIR_MESON_DISABLE_FLAG = "disabled" |
| 52 | 71 | ||
| 53 | PACKAGES += "${PN}-bash-completion" | 72 | PACKAGES += "${PN}-bash-completion" |
| 54 | 73 | ||
| 74 | # Add the core element plugins to the main package | ||
| 55 | FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" | 75 | FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" |
| 56 | FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" | 76 | FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" |
| 57 | FILES_${PN}-dev += "${datadir}/gdb/* ${datadir}/gstreamer-1.0/gdb/*" | ||
| 58 | FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" | 77 | FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" |
| 78 | FILES_${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb ${datadir}/glib-2.0/gdb" | ||
| 59 | 79 | ||
| 60 | RRECOMMENDS_${PN}_qemux86 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi" | 80 | CVE_PRODUCT = "gstreamer" |
| 61 | RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi" | ||
| 62 | |||
| 63 | delete_pkg_m4_file() { | ||
| 64 | # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection | ||
| 65 | rm "${S}/common/m4/pkg.m4" || true | ||
| 66 | rm -f "${S}/common/m4/gtk-doc.m4" | ||
| 67 | } | ||
| 68 | |||
| 69 | do_configure[prefuncs] += "delete_pkg_m4_file" | ||
| 70 | 81 | ||
| 71 | do_compile_prepend() { | 82 | require recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc |
| 72 | export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs" | ||
| 73 | } | ||
| 74 | |||
| 75 | S = "${WORKDIR}/git" | ||
| 76 | 83 | ||
| 77 | COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" | 84 | COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" |
