Patchwork [meta-fsl-arm,v2] gpu-viv-bin-mx6q: Add missing libffi dependency

login
register
mail settings
Submitter Jacob Kroon
Date July 17, 2014, 5:49 a.m.
Message ID <1405576176-26003-1-git-send-email-jacob.kroon@mikrodidakt.se>
Download mbox | patch
Permalink /patch/75875/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Jacob Kroon - July 17, 2014, 5:49 a.m.
Running

  readelf --dynamic libgc_wayland_protocol.so | grep NEEDED

shows that the library has a runtime dependency on libffi. Same thing
applies to libwayland-viv.so.

Add libffi to DEPENDS for wayland builds, so that packaging can properly
detect the runtime dependency. For non-wayland builds, skip packaging
the files, so that they don't cause unexpected changes in buildhistory.

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Jacob Kroon - July 17, 2014, 7:06 a.m.
On Thu, Jul 17, 2014 at 7:49 AM, Jacob Kroon <jacob.kroon@mikrodidakt.se>
wrote:

> Running
>
>   readelf --dynamic libgc_wayland_protocol.so | grep NEEDED
>
> shows that the library has a runtime dependency on libffi. Same thing
> applies to libwayland-viv.so.
>
> Add libffi to DEPENDS for wayland builds, so that packaging can properly
> detect the runtime dependency. For non-wayland builds, skip packaging
> the files, so that they don't cause unexpected changes in buildhistory.
>
>
Finally looked up wayland, and it looks like libffi is already a dependency
for wayland, so no need
to add it again. I'll send a new patch that only skips packaging the
wayland files when doing non-wayland builds.
I think this was the idea initially proposed by Otavio.

/Jacob

Patch

diff --git a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
index 4106848..34f34d0 100644
--- a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
+++ b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
@@ -8,7 +8,7 @@  LICENSE = "Proprietary"
 LIC_FILES_CHKSUM = "file://usr/include/gc_vdk.h;endline=11;md5=19f5925343fa3da65596eeaa4ddb5fd3"
 
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxdamage libxext libxfixes mesa', \
-                             base_contains('DISTRO_FEATURES', 'wayland', 'wayland', \
+                             base_contains('DISTRO_FEATURES', 'wayland', 'libffi wayland', \
                                            '', d), d)}"
 
 PROVIDES += "virtual/wayland-egl virtual/libgl virtual/libgal-x11 virtual/egl virtual/libgles1 virtual/libgles2 virtual/libopenvg"
@@ -174,6 +174,12 @@  do_install () {
     ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so.2
     ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so
 
+    # skip packaging wayland libraries for non-wayland backends
+    if [ ${backend} != wl ]; then
+        rm ${D}${libdir}/libgc_wayland_protocol.*
+        rm ${D}${libdir}/libwayland-viv.*
+    fi
+
     for backend in wl x11 fb dfb; do
         find ${D}${libdir} -name "*-$backend.so" -exec rm '{}' ';'
     done