Patchwork [meta-fsl-arm,v2] gpu-viv-bin-mx6q: Don't package wayland libraries in non-wayland builds

login
register
mail settings
Submitter Jacob Kroon
Date July 17, 2014, 8:59 a.m.
Message ID <1405587556-12033-1-git-send-email-jacob.kroon@mikrodidakt.se>
Download mbox | patch
Permalink /patch/75897/
State Accepted
Delegated to: Otavio Salvador
Headers show

Comments

Jacob Kroon - July 17, 2014, 8:59 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.

For non-wayland builds, where libffi may or may not be available during
package time, skip packaging them so that they don't cause unexpected
dependency changes in buildhistory.

Changes in V2:
 - Check $USE_WL instead of $backend since future x11 support
   may want to drag in wayland libraries

Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>
---
 recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc | 6 ++++++
 1 file changed, 6 insertions(+)
Otavio Salvador - July 17, 2014, 5:42 p.m.
On Thu, Jul 17, 2014 at 5:59 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.
>
> For non-wayland builds, where libffi may or may not be available during
> package time, skip packaging them so that they don't cause unexpected
> dependency changes in buildhistory.
>
> Changes in V2:
>  - Check $USE_WL instead of $backend since future x11 support
>    may want to drag in wayland libraries
>
> Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se>

I have added this to master-next and will run it in a full build for
all backends; so we don't have bad surprises ;-)

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..0db37c3 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
@@ -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 if no support is requested
+    if [ "${USE_WL}" = "no" ]; 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