]> code.ossystems Code Review - meta-freescale.git/commitdiff
gpu-viv-bin-mx6q: Respect X11, DirectFB, FrameBuffer distro features
authorOtavio Salvador <otavio@ossystems.com.br>
Sat, 23 Mar 2013 12:54:39 +0000 (09:54 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 26 Mar 2013 12:20:45 +0000 (09:20 -0300)
As we cannot allow concurrent build of applications targetting
different backends we use the distro features to package the need
libraries for the backend. Currently it does:

 X11 support, if 'x11' feature is enabled
 DirectFB support, if 'x11' is not enabled AND 'directfb is enabled
 FrameBuffer, fallback

As 1.1.0 version of the Vivante libraries are build against DirectFB
1.4 we cannot support it for now, so we explicitly disable it for this
version so it is easy to add it back when new version, supporting
newer DirectFB, is released.

Change-Id: Ia8973b8107155b8a5f7fadc50d2290c1d5f28363
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
meta-fsl-arm/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q_1.1.0.bb

index ce23f2e71c87de2f6544e016bfe6df951a233f0d..e8e491ea00760910a9eac902b12c4f1cba215c5e 100644 (file)
@@ -41,8 +41,8 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
        ${@base_contains("DISTRO_FEATURES", "directfb", "${GPU_DFBLIBS}", "", d)} \
        "
 
-KEEP_XLIBS = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
-KEEP_DFBLIBS = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
+USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
+USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
 
 # Inhibit warnings about files being stripped.
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
@@ -69,19 +69,26 @@ do_install () {
     rm -r ${D}${includedir}/GL
     cp -axr ${S}/opt ${D}
 
-    if [ "${KEEP_XLIBS}" = "no" ]; then
-        rm ${D}${libdir}/*-x11.so
-    fi
-    if [ "${KEEP_DFBLIBS}" = "no" ]; then
-        rm ${D}${libdir}/*-dfb.so
-    fi
-
     # FIXME: Drop default library as we need to explicit link to one
     #        of supported backends
     rm ${D}${libdir}/libEGL.so \
        ${D}${libdir}/libGAL.so \
        ${D}${libdir}/libVIVANTE.so
 
+    if [ "${USE_X11}" = "yes" ]; then
+        find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
+        find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+    else
+        if [ "${USE_DFB}" = "yes" ]; then
+            find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
+            find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
+        else
+            # Regular framebuffer
+            find ${D}${libdir} -name '*-x11.so' -exec rm '{}' ';'
+            find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
+        fi
+    fi
+
     find ${D}${libdir} -type f -exec chmod 644 {} \;
     find ${D}${includedir} -type f -exec chmod 644 {} \;
 }
index 3de95558c852c08e1c5cf43c8cd1f4ed4ff8f0c1..994c11c595c28bc5803706b0d610628d658fb92a 100644 (file)
@@ -8,3 +8,7 @@ include gpu-viv-bin-mx6q.inc
 
 SRC_URI[md5sum] = "60f4ba65f557fc63fde6dacfeef205a8"
 SRC_URI[sha256sum] = "4238b72a6dad2d075d159bb1e86fb68bbed7c27894ce82c546a8e7c58ae5d683"
+
+# FIXME: 1.1.0 BSP release uses DirectFB 1.4 and Yocto has 1.6 so
+# disable it for now
+USE_DFB = "no"