Skip to contentSkip to conversation

piglit support build without x11

PATCH New [email protected] 1 participant 3 messages Apr 29, 2019

lore
Share & tools
lore
#0 lore raw

v3 cover piglit support build without x11

From: Changqing Li <[email protected]>

To support piglit without x11 by disable PIGLIT_BUILD_GL_TESTS, but the result is piglit can use without x11, but only small part of it can be used. Most of testcase will be skipped.

Changqing Li (2):
waffle: supprt build waffle without x11
piglit: support build piglit without x11

 meta/recipes-graphics/piglit/piglit_git.bb   | 13 ++++++++-----
 meta/recipes-graphics/waffle/waffle_1.5.2.bb |  7 +++----
 2 files changed, 11 insertions(+), 9 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH v3 1/2 waffle: supprt build waffle without x11

From: Changqing Li <[email protected]>

respect DISTRO_FEATURES to make waffle support different platform, gbm platform is supported by default.

[YOCTO #6077]

---
 meta/recipes-graphics/waffle/waffle_1.5.2.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
meta/recipes-graphics/waffle/waffle_1.5.2.bb +3 -4
index 43c3edc..31572f2 100644
@@ -15,10 +15,9 @@ inherit cmake distro_features_check lib_package
 
 # This should be overridden per-machine to reflect the capabilities of the GL
 # stack.
-PACKAGECONFIG ??= "glx"
-
-# libx11 requires x11 in DISTRO_FEATURES.
-REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 'x11', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11-egl', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+                   gbm"
 
 # virtual/libgl requires opengl in DISTRO_FEATURES.
 REQUIRED_DISTRO_FEATURES += "${@bb.utils.contains('DEPENDS', 'virtual/${MLPREFIX}libgl', 'opengl', '', d)}"
Signature · 1 line
2.7.4
#2 lore raw

PATCH v3 2/2 piglit: support build piglit without x11

In reply to [email protected]

From: Changqing Li <[email protected]>

* 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]

---
 meta/recipes-graphics/piglit/piglit_git.bb | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
meta/recipes-graphics/piglit/piglit_git.bb +8 -5
index 59d1348..b6542a1 100644
@@ -17,11 +17,12 @@ PV = "1.0+gitr${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "libpng virtual/libx11 libxkbcommon libxrender waffle virtual/libgl libglu python3-mako-native python3-numpy-native python3-six-native virtual/egl"
+X11_DEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxrender libglu', '', d)}"
+X11_RDEPS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa-demos', '', d)}"
+
+DEPENDS = "libpng waffle libxkbcommon virtual/libgl python3-mako-native python3-numpy-native python3-six-native virtual/egl"
 
 inherit cmake pkgconfig python3native distro_features_check bash-completion
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
 
 # depends on virtual/libgl
 REQUIRED_DISTRO_FEATURES += "opengl"
@@ -32,8 +33,10 @@ REQUIRED_DISTRO_FEATURES += "opengl"
 export TEMP = "${B}/temp/"
 do_compile[dirs] =+ "${B}/temp/"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
 PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
+PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}"
+
 
 do_configure_prepend() {
    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 \
 	python3-misc \
 	python3-unixadmin python3-xml python3-multiprocessing \
 	python3-six python3-shell python3-io \
-	python3-netserver mesa-demos bash \
+	python3-netserver bash \
 	"
 
 INSANE_SKIP_${PN} += "dev-so already-stripped"
Signature · 1 line
2.7.4