diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-04-29 15:37:57 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-30 12:05:23 +0100 |
commit | 71fecb0473dc92fa5402859d77a4634a7561cb55 (patch) | |
tree | a7b4534106fcebd734fc6ef4a3ffafece7fc1574 | |
parent | c40482a68e964d6c1c24271c12e4d052df2efaf3 (diff) | |
download | poky-71fecb0473dc92fa5402859d77a4634a7561cb55.tar.gz |
piglit: support build piglit without x11
* test PIGLIT_BUILD_GL_TESTS depend on glx library, so depend
on x11, so respect the DISTRO_FEATURES, only enable it when
x11 is enabled.
* mesa-demos depend on libGL.so which is provide by recipe
mesa, but when x11 is disabled, libGL.so is not generated.
so we can only rdepend on this when x11 is enabled
* add x11 PACKAGECONFIG to add correct config/depend/rdepend
[YOCTO #6077]
(From OE-Core rev: 2edf7a19598e10326603603dfa00ab91c9327e2d)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-graphics/piglit/piglit_git.bb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index 59d134801a..b6542a191c 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb | |||
@@ -17,11 +17,12 @@ PV = "1.0+gitr${SRCPV}" | |||
17 | 17 | ||
18 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
19 | 19 | ||
20 | DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl" | 20 | X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}" |
21 | X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)}" | ||
22 | |||
23 | DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl" | ||
21 | 24 | ||
22 | inherit cmake pkgconfig python3native distro_features_check bash-completion | 25 | inherit cmake pkgconfig python3native distro_features_check bash-completion |
23 | # depends on virtual/libx11 | ||
24 | REQUIRED_DISTRO_FEATURES = "x11" | ||
25 | 26 | ||
26 | # depends on virtual/libgl | 27 | # depends on virtual/libgl |
27 | REQUIRED_DISTRO_FEATURES += "opengl" | 28 | REQUIRED_DISTRO_FEATURES += "opengl" |
@@ -32,8 +33,10 @@ REQUIRED_DISTRO_FEATURES += "opengl" | |||
32 | export TEMP = "${B}/temp/" | 33 | export TEMP = "${B}/temp/" |
33 | do_compile[dirs] =+ "${B}/temp/" | 34 | do_compile[dirs] =+ "${B}/temp/" |
34 | 35 | ||
35 | PACKAGECONFIG ??= "" | 36 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" |
36 | PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," | 37 | PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," |
38 | PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}" | ||
39 | |||
37 | 40 | ||
38 | do_configure_prepend() { | 41 | do_configure_prepend() { |
39 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then | 42 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then |
@@ -48,7 +51,7 @@ RDEPENDS_${PN} = "waffle waffle-bin python3 python3-mako python3-json \ | |||
48 | python3-misc \ | 51 | python3-misc \ |
49 | python3-unixadmin python3-xml python3-multiprocessing \ | 52 | python3-unixadmin python3-xml python3-multiprocessing \ |
50 | python3-six python3-shell python3-io \ | 53 | python3-six python3-shell python3-io \ |
51 | python3-netserver mesa-demos bash \ | 54 | python3-netserver bash \ |
52 | " | 55 | " |
53 | 56 | ||
54 | INSANE_SKIP_${PN} += "dev-so already-stripped" | 57 | INSANE_SKIP_${PN} += "dev-so already-stripped" |