diff options
author | Ross Burton <ross.burton@intel.com> | 2018-03-01 22:20:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-04 11:35:41 +0000 |
commit | da2e820471bb72ac72ff190183a826da85df894e (patch) | |
tree | 1946c6d27aa22addf9649906b67ff8c20aec050e /meta | |
parent | 824525d94bf71ff06db964d62651ebc3d449598b (diff) | |
download | poky-da2e820471bb72ac72ff190183a826da85df894e.tar.gz |
libepoxy: improve musl patch
dlvsym() is used by the libepoxy test suite, but this is glibc-specific and
isn't present in musl.
Instead of adding an option to control whether dlvsym is available (which could
be detected by Meson), as we don't install the test suite simply add an option
to disable the entire test suite (and submit the patch upstream).
Also remove the build dependency on util-macros as that is a remnant of the
autotools build.
(From OE-Core rev: 80cee6088fa60eb5197f8ed9d135986b8e7d471a)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 35 insertions, 62 deletions
diff --git a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch b/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch deleted file mode 100644 index bd49e36314..0000000000 --- a/meta/recipes-graphics/libepoxy/libepoxy/0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 9c964427656ef71210e2c5b48b279857806574e9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Francesco Giancane <francescogiancane8@gmail.com> | ||
3 | Date: Wed, 28 Feb 2018 21:32:24 +0100 | ||
4 | Subject: [PATCH] Make it possible to disable the use of dlvsym() (needed for | ||
5 | musl) | ||
6 | |||
7 | Add a patch to work around absence of dlvsym() on musl | ||
8 | (wasn't previously a problem as autotools weren't building tests by default) | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> | ||
12 | Signed-off-by: Francesco Giancane <francescogiancane8@gmail.com> | ||
13 | --- | ||
14 | meson_options.txt | 3 +++ | ||
15 | test/meson.build | 6 +++--- | ||
16 | 2 files changed, 6 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/meson_options.txt b/meson_options.txt | ||
19 | index b5d7c98..aa849c2 100644 | ||
20 | --- a/meson_options.txt | ||
21 | +++ b/meson_options.txt | ||
22 | @@ -1,6 +1,9 @@ | ||
23 | option('docs', | ||
24 | type: 'boolean', value: false, | ||
25 | description: 'Enable generating the Epoxy API reference (depends on Doxygen)') | ||
26 | +option('has-dlvsym', | ||
27 | + type: 'boolean', value: true, | ||
28 | + description: 'Whether dlvsym() is available (it is not when using musl C library)') | ||
29 | option('glx', | ||
30 | type: 'combo', | ||
31 | choices: [ 'auto', 'yes', 'no' ], | ||
32 | diff --git a/test/meson.build b/test/meson.build | ||
33 | index c5788b4..4c46ae6 100644 | ||
34 | --- a/test/meson.build | ||
35 | +++ b/test/meson.build | ||
36 | @@ -92,8 +92,8 @@ if build_glx | ||
37 | [ 'glx_has_extension_nocontext', [ 'glx_has_extension_nocontext.c' ], [], [], true ], | ||
38 | [ 'glx_static', [ 'glx_static.c' ], [ '-DNEEDS_TO_BE_STATIC'], [ '-static' ], libtype == 'static' ], | ||
39 | [ 'glx_shared_znow', [ 'glx_static.c', ], [], [ '-Wl,-z,now' ], has_znow ], | ||
40 | - [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ], | ||
41 | - [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple ], | ||
42 | + [ 'glx_alias_prefer_same_name', [ 'glx_alias_prefer_same_name.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple and get_option('has-dlvsym') == true ], | ||
43 | + [ 'glx_gles2', [ 'glx_gles2.c', 'dlwrap.c', 'dlwrap.h' ], [], [ '-rdynamic' ], not build_apple and get_option('has-dlvsym') == true ], | ||
44 | ] | ||
45 | |||
46 | foreach test: glx_tests | ||
47 | @@ -114,7 +114,7 @@ if build_glx | ||
48 | endif | ||
49 | endforeach | ||
50 | |||
51 | - if not build_apple | ||
52 | + if not build_apple and get_option('has-dlvsym') == true | ||
53 | # GLX/EGL tests | ||
54 | if build_egl | ||
55 | glx_egl_sources = [ | ||
56 | -- | ||
57 | 2.14.3 | ||
58 | |||
diff --git a/meta/recipes-graphics/libepoxy/libepoxy/no-tests.patch b/meta/recipes-graphics/libepoxy/libepoxy/no-tests.patch new file mode 100644 index 0000000000..d2b6c1a254 --- /dev/null +++ b/meta/recipes-graphics/libepoxy/libepoxy/no-tests.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Add option to disable tests. | ||
2 | |||
3 | Upstream-Status: Submitted (https://github.com/anholt/libepoxy/pull/158) | ||
4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
5 | |||
6 | diff --git a/meson.build b/meson.build | ||
7 | index b2ebaef..9632c7a 100644 | ||
8 | --- a/meson.build | ||
9 | +++ b/meson.build | ||
10 | @@ -242,7 +242,10 @@ libepoxy_inc = [ | ||
11 | |||
12 | subdir('include/epoxy') | ||
13 | subdir('src') | ||
14 | -subdir('test') | ||
15 | + | ||
16 | +if get_option('tests') | ||
17 | + subdir('test') | ||
18 | +endif | ||
19 | |||
20 | if get_option('docs') | ||
21 | doxygen = find_program('doxygen', required: false) | ||
22 | diff --git a/meson_options.txt b/meson_options.txt | ||
23 | index b5d7c98..dc30e68 100644 | ||
24 | --- a/meson_options.txt | ||
25 | +++ b/meson_options.txt | ||
26 | @@ -15,3 +15,7 @@ option('x11', | ||
27 | type: 'boolean', | ||
28 | value: true, | ||
29 | description: 'Enable X11 support (GLX or EGL-X11)') | ||
30 | +option('tests', | ||
31 | + type: 'boolean', | ||
32 | + value: true, | ||
33 | + description: 'Build the test suite') | ||
diff --git a/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb b/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb index dfdd19248d..5ca0868c22 100644 --- a/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb +++ b/meta/recipes-graphics/libepoxy/libepoxy_1.5.0.bb | |||
@@ -6,7 +6,7 @@ LICENSE = "MIT" | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=58ef4c80d401e07bd9ee8b6b58cf464b" |
7 | 7 | ||
8 | SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \ | 8 | SRC_URI = "https://github.com/anholt/${BPN}/releases/download/${PV}/${BP}.tar.xz \ |
9 | file://0001-Make-it-possible-to-disable-the-use-of-dlvsym-needed.patch \ | 9 | file://no-tests.patch \ |
10 | " | 10 | " |
11 | SRC_URI[md5sum] = "63fe3847789258254dcd7e3fdb9e7f5e" | 11 | SRC_URI[md5sum] = "63fe3847789258254dcd7e3fdb9e7f5e" |
12 | SRC_URI[sha256sum] = "4c94995398a6ebf691600dda2e9685a0cac261414175c2adf4645cdfab42a5d5" | 12 | SRC_URI[sha256sum] = "4c94995398a6ebf691600dda2e9685a0cac261414175c2adf4645cdfab42a5d5" |
@@ -16,10 +16,8 @@ inherit meson pkgconfig distro_features_check | |||
16 | 16 | ||
17 | REQUIRED_DISTRO_FEATURES = "opengl" | 17 | REQUIRED_DISTRO_FEATURES = "opengl" |
18 | 18 | ||
19 | DEPENDS = "util-macros" | ||
20 | |||
21 | PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl" | 19 | PACKAGECONFIG[egl] = "-Degl=yes, -Degl=no, virtual/egl" |
22 | PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no, virtual/libx11 virtual/libgl" | 20 | PACKAGECONFIG[x11] = "-Dglx=yes, -Dglx=no, virtual/libx11 virtual/libgl" |
23 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl" | 21 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)} egl" |
24 | 22 | ||
25 | EXTRA_OEMESON_append_libc-musl = " -Dhas-dlvsym=false " | 23 | EXTRA_OEMESON += "-Dtests=false" |