]> code.ossystems Code Review - meta-freescale.git/commitdiff
imx-gpu-viv: Rework code so it is easier to read
authorOtavio Salvador <otavio@ossystems.com.br>
Fri, 29 Apr 2016 17:12:23 +0000 (14:12 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Sat, 7 May 2016 13:07:46 +0000 (10:07 -0300)
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 <otavio@ossystems.com.br>
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc

index d7a42923cbe82e6d66d5c564d9f31c48ef10a7f9..38099cd3b79c10c5177750cb6a144645d977014d 100644 (file)
@@ -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