summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch
diff options
context:
space:
mode:
authorCarlos Rafael Giani <crg7475@mailbox.org>2020-01-12 14:59:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-16 22:33:08 +0000
commit3e71919b865433ca007bf23f9b4f9015e25ac04e (patch)
tree7c94763af8b80871f44c0628207a6a37096450c4 /meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch
parent01c1f63bdb779fe33df4b4409792f393eeee7cf9 (diff)
downloadpoky-3e71919b865433ca007bf23f9b4f9015e25ac04e.tar.gz
gstreamer1.0: Transition to meson based builds
* Moved 0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch from files/ to gstreamer1.0/ since it is gstreamer1.0 recipe specific. * Removed M4 specific patches: - 0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch - gtk-doc-tweaks.patch - add-a-target-to-compile-tests.patch * Added patches: - 0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch Backport for enabling GIR support in meson based cross compilation - 0002-meson-Add-valgrind-feature.patch Make valgrind support configurable to be able to control it through a "valgrind" packageconfig - 0003-meson-Add-option-for-installed-tests.patch Add support for installable tests and for generating .test and shell scripts which can be used with the gnome-desktop-testing suite runner * PTest support: By default, GStreamer does not allow for installing tests, and requires meson to run its unit tests. The 0003 patch fixes this by installing the binaries themselves and by generating accompanying .test and shell scripts. The scripts set up the required environment files and then call the test binaries. The .test file list the shell scripts as Exec= command line. (From OE-Core rev: 0db7ba34ca41b107042306d13a6f0162885c123b) Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch')
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch
new file mode 100644
index 0000000000..f553340f4d
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch
@@ -0,0 +1,74 @@
1From f6c7973c03d9ba7dab60c496e768c5e6c4ee824c Mon Sep 17 00:00:00 2001
2From: Carlos Rafael Giani <crg7475@mailbox.org>
3Date: Sun, 20 Oct 2019 10:36:44 +0200
4Subject: [PATCH] meson: Add valgrind feature
5
6This allows for enabling/disabling Valgrind support. Since Valgrind is
7an external dependency, such a feature is needed by build environemnts
8such as Yocto to make sure builds are deterministic. These changes also
9add more Valgrind specific configure log output.
10
11Upstream-Status: Pending
12
13Signed-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
19diff --git a/meson.build b/meson.build
20index 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
60diff --git a/meson_options.txt b/meson_options.txt
61index 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--
732.17.1
74