diff options
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch')
-rw-r--r-- | meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch new file mode 100644 index 0000000000..3d685db774 --- /dev/null +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From 4bfb696fd125f044e3df9f6983c4ad518d9552c7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Thu, 26 Jan 2023 20:29:46 +0100 | ||
4 | Subject: [PATCH] meson.build: allow (a subset of) tests in cross compile | ||
5 | settings | ||
6 | |||
7 | There is no need to completely disable tests: most of them | ||
8 | do not require running target executables at build time, | ||
9 | and so can be built and installed. | ||
10 | |||
11 | This requires inserting a couple of specific guards around | ||
12 | items that do require running target executables. | ||
13 | |||
14 | Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/150] | ||
15 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
16 | --- | ||
17 | meson.build | 6 +++--- | ||
18 | tests/meson.build | 10 ++++++---- | ||
19 | 2 files changed, 9 insertions(+), 7 deletions(-) | ||
20 | |||
21 | diff --git a/meson.build b/meson.build | ||
22 | index 78f3683..e0feaee 100644 | ||
23 | --- a/meson.build | ||
24 | +++ b/meson.build | ||
25 | @@ -390,10 +390,10 @@ subdir('gdk-pixbuf') | ||
26 | # i18n | ||
27 | subdir('po') | ||
28 | |||
29 | +if get_option('tests') | ||
30 | + subdir('tests') | ||
31 | +endif | ||
32 | if not meson.is_cross_build() | ||
33 | - if get_option('tests') | ||
34 | - subdir('tests') | ||
35 | - endif | ||
36 | subdir('thumbnailer') | ||
37 | endif | ||
38 | |||
39 | diff --git a/tests/meson.build b/tests/meson.build | ||
40 | index 78d0ad9..0c9e64e 100644 | ||
41 | --- a/tests/meson.build | ||
42 | +++ b/tests/meson.build | ||
43 | @@ -4,7 +4,7 @@ | ||
44 | # gdk-pixbuf-pixdata from build directory because it needs all DLL locations in | ||
45 | # $PATH. Ideally we should use gnome.compile_resources() and let Meson deal with | ||
46 | # this problem: See https://github.com/mesonbuild/meson/issues/8266. | ||
47 | -if enabled_loaders.contains('png') and host_system != 'windows' | ||
48 | +if enabled_loaders.contains('png') and host_system != 'windows' and not meson.is_cross_build() | ||
49 | # Resources; we cannot use gnome.compile_resources() here, because we need to | ||
50 | # override the environment in order to use the utilities we just built instead | ||
51 | # of the system ones | ||
52 | @@ -172,9 +172,11 @@ endif | ||
53 | test_deps = gdk_pixbuf_deps + [ gdkpixbuf_dep, ] | ||
54 | test_args = [ '-k' ] | ||
55 | test_env = environment() | ||
56 | -test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) | ||
57 | -test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) | ||
58 | -test_env.set('GDK_PIXBUF_MODULE_FILE', loaders_cache.full_path()) | ||
59 | +if not meson.is_cross_build() | ||
60 | + test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) | ||
61 | + test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) | ||
62 | + test_env.set('GDK_PIXBUF_MODULE_FILE', loaders_cache.full_path()) | ||
63 | +endif | ||
64 | |||
65 | foreach test_name, test_data: installed_tests | ||
66 | test_sources = [ test_name + '.c', 'test-common.c' ] | ||