From: Otavio Salvador Date: Fri, 29 Apr 2016 17:12:23 +0000 (-0300) Subject: imx-gpu-viv: Rework code so it is easier to read X-Git-Tag: 2.1~2 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=257ba68ad8688efb8c390c3a4dd541e0ce3a9adf;p=meta-freescale.git imx-gpu-viv: Rework code so it is easier to read Instead of using USE_X11 and USE_WL, we now use HAS_X11 and HAS_WL. The variable does not imply that the backend is actually used but if the distribution has, or not, the support for the backend. Change-Id: I8630b54ed0a80f2877e5e97f71ae14e78ed5aeea Signed-off-by: Otavio Salvador --- diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc index d7a42923..38099cd3 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc @@ -53,8 +53,8 @@ python __anonymous () { raise bb.parse.SkipPackage('The kernel of machine needs to have Vivante kernel driver support for this recipe to be used.') } -USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}" -USE_WL = "${@base_contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" +HAS_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}" +HAS_WL = "${@base_contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" # Inhibit warnings about files being stripped. INHIBIT_PACKAGE_STRIP = "1" @@ -112,7 +112,7 @@ do_install () { install -d ${D}${libdir}/pkgconfig # The preference order, based in DISTRO_FEATURES, is x11, wayland and fb - if [ "${USE_X11}" = "yes" ]; then + if [ "${HAS_X11}" = "yes" ]; then cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir} cp -r ${S}/apitrace/x11/usr/lib/* ${D}${libdir} cp -r ${S}/apitrace/x11/usr/bin/* ${D}${bindir} @@ -123,7 +123,7 @@ do_install () { install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm_x11.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2_x11.pc ${D}${libdir}/pkgconfig/glesv2.pc install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg_x11.pc ${D}${libdir}/pkgconfig/vg.pc - elif [ "${USE_WL}" = "yes" ]; then + elif [ "${HAS_WL}" = "yes" ]; then cp -r ${S}/apitrace/non-x11/usr/lib/* ${D}${libdir} cp -r ${S}/apitrace/non-x11/usr/bin/* ${D}${bindir} @@ -171,7 +171,7 @@ do_install () { ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so # skip packaging wayland libraries if no support is requested - if [ "${USE_WL}" = "no" ]; then + if [ "${HAS_WL}" = "no" ]; then rm ${D}${libdir}/libgc_wayland_protocol.* rm ${D}${libdir}/libwayland-viv.* fi