diff options
author | Abhijit Potnis <abhijitpotnis@gmail.com> | 2013-07-26 04:19:08 +0000 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2013-07-25 14:59:17 -0300 |
commit | 20d7652906491f5b1851b979dc6ab174a835197b (patch) | |
tree | b61f2dc989e7f59f9688a29a57c9ad0bbc33238e | |
parent | 4b8f1b4f11f21043d4a37b1c294fafb8f37f8498 (diff) | |
download | meta-fsl-arm-20d7652906491f5b1851b979dc6ab174a835197b.tar.gz |
gpu-viv-bin-mx6q: Adding support to install Wayland GPU libs
This patch installs wayland GPU libs if the DISTRO_FEATURES contains
wayland variable. If both X11 and wayland are present in DISTRO_FEATURES
then wayland is picked as the default backend.
Signed-off-by: Abhijit Potnis <abhijitpotnis@gmail.com>
4 files changed, 62 insertions, 7 deletions
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 9a43737..eaa775c 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 | |||
@@ -7,7 +7,7 @@ SECTION = "libs" | |||
7 | LICENSE = "Proprietary" | 7 | LICENSE = "Proprietary" |
8 | LIC_FILES_CHKSUM = "file://usr/include/gc_vdk.h;endline=11;md5=19f5925343fa3da65596eeaa4ddb5fd3" | 8 | LIC_FILES_CHKSUM = "file://usr/include/gc_vdk.h;endline=11;md5=19f5925343fa3da65596eeaa4ddb5fd3" |
9 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxdamage libxext libxfixes', '', d)} mesa" | 9 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxdamage libxext libxfixes', '', d)} mesa" |
10 | PROVIDES += "virtual/libgl virtual/libgal-x11 virtual/egl virtual/libgles1 virtual/libgles2" | 10 | PROVIDES += "virtual/wayland-egl virtual/libgl virtual/libgal-x11 virtual/egl virtual/libgles1 virtual/libgles2" |
11 | 11 | ||
12 | PE = "1" | 12 | PE = "1" |
13 | 13 | ||
@@ -20,6 +20,9 @@ SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \ | |||
20 | file://glesv1_cm_x11.pc \ | 20 | file://glesv1_cm_x11.pc \ |
21 | file://glesv2.pc \ | 21 | file://glesv2.pc \ |
22 | file://glesv2_x11.pc \ | 22 | file://glesv2_x11.pc \ |
23 | file://gc_wayland_protocol.pc \ | ||
24 | file://wayland-egl.pc \ | ||
25 | file://wayland-viv.pc \ | ||
23 | " | 26 | " |
24 | 27 | ||
25 | PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \ | 28 | PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \ |
@@ -34,10 +37,14 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \ | |||
34 | libgal-mx6 libgal-mx6-dev libgal-mx6-dbg \ | 37 | libgal-mx6 libgal-mx6-dev libgal-mx6-dbg \ |
35 | libvivante-mx6 libvivante-mx6-dev libvivante-mx6-dbg \ | 38 | libvivante-mx6 libvivante-mx6-dev libvivante-mx6-dbg \ |
36 | libvivante-dri-mx6 \ | 39 | libvivante-dri-mx6 \ |
40 | libwayland-viv-mx6 libwayland-viv-mx6-dev libwayland-viv-mx6-dbg \ | ||
41 | libgc-wayland-protocol-mx6 libgc-wayland-protocol-mx6-dev libgc-wayland-protocol-mx6-dbg \ | ||
42 | libwayland-egl-mx6-dev \ | ||
37 | " | 43 | " |
38 | 44 | ||
39 | USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}" | 45 | USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}" |
40 | USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}" | 46 | USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}" |
47 | USE_WL = "${@base_contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" | ||
41 | 48 | ||
42 | # Inhibit warnings about files being stripped. | 49 | # Inhibit warnings about files being stripped. |
43 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | 50 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
@@ -86,12 +93,18 @@ do_install () { | |||
86 | 93 | ||
87 | install -d ${D}${libdir}/pkgconfig | 94 | install -d ${D}${libdir}/pkgconfig |
88 | 95 | ||
89 | # FIXME: Remove Wayland contents | 96 | # If both X11 and Wayland are set in DISTRO_FEATURES then use Wayland as base window system |
90 | rm -r ${D}${includedir}/wayland-viv | 97 | if [ "${USE_WL}" = "yes" ]; then |
91 | find ${D}${libdir} -name '*-wl.so' -exec rm '{}' ';' | 98 | backend=wl |
92 | rm ${D}${libdir}/*wayland*.so* | ||
93 | 99 | ||
94 | if [ "${USE_X11}" = "yes" ]; then | 100 | install -m 0644 ${WORKDIR}/egl.pc ${D}${libdir}/pkgconfig/egl.pc |
101 | install -m 0644 ${WORKDIR}/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc | ||
102 | install -m 0644 ${WORKDIR}/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc | ||
103 | install -m 0644 ${WORKDIR}/gc_wayland_protocol.pc ${D}${libdir}/pkgconfig/gc_wayland_protocol.pc | ||
104 | install -m 0644 ${WORKDIR}/wayland-egl.pc ${D}${libdir}/pkgconfig/wayland-egl.pc | ||
105 | install -m 0644 ${WORKDIR}/wayland-viv.pc ${D}${libdir}/pkgconfig/wayland-viv.pc | ||
106 | |||
107 | elif [ "${USE_X11}" = "yes" ]; then | ||
95 | cp -r ${S}/usr/lib/dri ${D}${libdir} | 108 | cp -r ${S}/usr/lib/dri ${D}${libdir} |
96 | backend=x11 | 109 | backend=x11 |
97 | 110 | ||
@@ -118,7 +131,7 @@ do_install () { | |||
118 | mv ${D}${libdir}/libGAL-${backend}.so ${D}${libdir}/libGAL.so | 131 | mv ${D}${libdir}/libGAL-${backend}.so ${D}${libdir}/libGAL.so |
119 | mv ${D}${libdir}/libVIVANTE-${backend}.so ${D}${libdir}/libVIVANTE.so | 132 | mv ${D}${libdir}/libVIVANTE-${backend}.so ${D}${libdir}/libVIVANTE.so |
120 | 133 | ||
121 | for backend in x11 fb dfb; do | 134 | for backend in wl x11 fb dfb; do |
122 | find ${D}${libdir} -name "*-$backend.so" -exec rm '{}' ';' | 135 | find ${D}${libdir} -name "*-$backend.so" -exec rm '{}' ';' |
123 | done | 136 | done |
124 | 137 | ||
@@ -184,5 +197,17 @@ FILES_libvivante-mx6-dbg = "${libdir}/.debug/libVIVANTE${SOLIBS}" | |||
184 | 197 | ||
185 | FILES_libvivante-dri-mx6 = "${libdir}/dri/vivante_dri.so" | 198 | FILES_libvivante-dri-mx6 = "${libdir}/dri/vivante_dri.so" |
186 | 199 | ||
200 | INSANE_SKIP_libwayland-viv-mx6 += "dev-so" | ||
201 | FILES_libwayland-viv-mx6 = "${libdir}/libwayland-viv${REALSOLIBS} ${libdir}/libwayland-viv${SOLIBS}" | ||
202 | FILES_libwayland-viv-mx6-dev = "${libdir})/libwayland-viv${SOLIBSDEV} ${libdir}/pkgconfig/wayland-viv.pc" | ||
203 | FILES_libwayland-viv-mx6-dbg = "${libdir}/.debug/libwayland-viv${SOLIBS}" | ||
204 | |||
205 | INSANE_SKIP_libgc-wayland-protocol-mx6 += "dev-so" | ||
206 | FILES_libgc-wayland-protocol-mx6 = "${libdir}/libgc_wayland_protocol${REALSOLIBS} ${libdir}/libgc_wayland_protocol${SOLIBS}" | ||
207 | FILES_libgc-wayland-protocol-mx6-dev = "${libdir}/libgc_wayland_protocol${SOLIBSDEV} ${libdir}/pkgconfig/gc_wayland_protocol.pc" | ||
208 | FILES_libgc-wayland-protocol-mx6-dbg = "${libdir}/libgc_wayland_protocol${SOLIBS}" | ||
209 | |||
210 | FILES_libwayland-egl-mx6-dev = "${libdir}/pkgconfig/wayland-egl.pc" | ||
211 | |||
187 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 212 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
188 | COMPATIBLE_MACHINE = "(mx6)" | 213 | COMPATIBLE_MACHINE = "(mx6)" |
diff --git a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/gc_wayland_protocol.pc b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/gc_wayland_protocol.pc new file mode 100644 index 0000000..f4610ea --- /dev/null +++ b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/gc_wayland_protocol.pc | |||
@@ -0,0 +1,10 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=${exec_prefix}/lib | ||
4 | includedir=${prefix}/include | ||
5 | |||
6 | Name: gc_wayland_protocol | ||
7 | Description: Vivante Wayland Protocol Extension Library | ||
8 | Version: 0.1 | ||
9 | Cflags: -I${includedir} | ||
10 | Libs: -L${libdir} -lgc_wayland_protocol | ||
diff --git a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/wayland-egl.pc b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/wayland-egl.pc new file mode 100644 index 0000000..afaeb13 --- /dev/null +++ b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/wayland-egl.pc | |||
@@ -0,0 +1,10 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=${exec_prefix}/lib | ||
4 | includedir=${prefix}/include | ||
5 | |||
6 | Name: wayland-egl | ||
7 | Description: Bind the driver EGL to the Wayland API | ||
8 | Version: 0.1 | ||
9 | Libs: -L${libdir} -lEGL | ||
10 | Cflags: -I${includedir} | ||
diff --git a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/wayland-viv.pc b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/wayland-viv.pc new file mode 100644 index 0000000..3fdedd0 --- /dev/null +++ b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q/wayland-viv.pc | |||
@@ -0,0 +1,10 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=${exec_prefix}/lib | ||
4 | includedir=${prefix}/include | ||
5 | |||
6 | Name: Wayland Vivante Lib | ||
7 | Description: Wayland server side library for Vivante's EGL driver | ||
8 | Version: 0.1 | ||
9 | Cflags: -I${includedir}/wayland-viv | ||
10 | Libs: -L${libdir} -lwayland-viv | ||