From d05f5590891cc0d107473e1bf2e36523678d0114 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 6 Nov 2018 23:16:02 -0800 Subject: [PATCH] userland-nogl: Add recipe which does not include GL libraries This is needed when mesa is providing these libraries especially when using vc4graphics Signed-off-by: Khem Raj --- ...ications-to-set-next-resource-handle.patch | 0 ...d-Add-support-for-the-Wayland-winsys.patch | 0 .../0003-wayland-Add-Wayland-example.patch | 0 ...and-egl-Add-bcm_host-to-dependencies.patch | 0 ...-faulty-assert-to-make-weston-happy-.patch | 0 ...o-out-wl-buffers-in-egl_surface_free.patch | 0 ...nitialize-front-back-wayland-buffers.patch | 0 .../0008-Remove-RPC_FLUSH.patch | 0 .../0009-fix-cmake-dependency-race.patch | 0 ...or-framerate-with-nested-composition.patch | 0 ...11-build-shared-library-for-vchostif.patch | 0 ...ffer-wrapping-interface-for-dispmanx.patch | 0 ...plement-triple-buffering-for-wayland.patch | 0 ...xt.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch | 0 ...015-EGL-glplatform.h-define-EGL_CAST.patch | 0 ...ayland-compositor-state-data-per-pro.patch | 0 ...-typedef-for-EGL_EXT_image_dma_buf_i.patch | 0 ...IMG_context_priority-related-defines.patch | 0 recipes-graphics/userland/userland-nogl.bb | 87 +++++++++++++++++++ 19 files changed, 87 insertions(+) rename recipes-graphics/userland/{userland => files}/0001-Allow-applications-to-set-next-resource-handle.patch (100%) rename recipes-graphics/userland/{userland => files}/0002-wayland-Add-support-for-the-Wayland-winsys.patch (100%) rename recipes-graphics/userland/{userland => files}/0003-wayland-Add-Wayland-example.patch (100%) rename recipes-graphics/userland/{userland => files}/0004-wayland-egl-Add-bcm_host-to-dependencies.patch (100%) rename recipes-graphics/userland/{userland => files}/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch (100%) rename recipes-graphics/userland/{userland => files}/0006-zero-out-wl-buffers-in-egl_surface_free.patch (100%) rename recipes-graphics/userland/{userland => files}/0007-initialize-front-back-wayland-buffers.patch (100%) rename recipes-graphics/userland/{userland => files}/0008-Remove-RPC_FLUSH.patch (100%) rename recipes-graphics/userland/{userland => files}/0009-fix-cmake-dependency-race.patch (100%) rename recipes-graphics/userland/{userland => files}/0010-Fix-for-framerate-with-nested-composition.patch (100%) rename recipes-graphics/userland/{userland => files}/0011-build-shared-library-for-vchostif.patch (100%) rename recipes-graphics/userland/{userland => files}/0012-implement-buffer-wrapping-interface-for-dispmanx.patch (100%) rename recipes-graphics/userland/{userland => files}/0013-Implement-triple-buffering-for-wayland.patch (100%) rename recipes-graphics/userland/{userland => files}/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch (100%) rename recipes-graphics/userland/{userland => files}/0015-EGL-glplatform.h-define-EGL_CAST.patch (100%) rename recipes-graphics/userland/{userland => files}/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch (100%) rename recipes-graphics/userland/{userland => files}/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch (100%) rename recipes-graphics/userland/{userland => files}/0018-Add-EGL_IMG_context_priority-related-defines.patch (100%) create mode 100644 recipes-graphics/userland/userland-nogl.bb diff --git a/recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch b/recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch similarity index 100% rename from recipes-graphics/userland/userland/0001-Allow-applications-to-set-next-resource-handle.patch rename to recipes-graphics/userland/files/0001-Allow-applications-to-set-next-resource-handle.patch diff --git a/recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch b/recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch similarity index 100% rename from recipes-graphics/userland/userland/0002-wayland-Add-support-for-the-Wayland-winsys.patch rename to recipes-graphics/userland/files/0002-wayland-Add-support-for-the-Wayland-winsys.patch diff --git a/recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch b/recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch similarity index 100% rename from recipes-graphics/userland/userland/0003-wayland-Add-Wayland-example.patch rename to recipes-graphics/userland/files/0003-wayland-Add-Wayland-example.patch diff --git a/recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch b/recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch similarity index 100% rename from recipes-graphics/userland/userland/0004-wayland-egl-Add-bcm_host-to-dependencies.patch rename to recipes-graphics/userland/files/0004-wayland-egl-Add-bcm_host-to-dependencies.patch diff --git a/recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch b/recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch similarity index 100% rename from recipes-graphics/userland/userland/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch rename to recipes-graphics/userland/files/0005-interface-remove-faulty-assert-to-make-weston-happy-.patch diff --git a/recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch b/recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch similarity index 100% rename from recipes-graphics/userland/userland/0006-zero-out-wl-buffers-in-egl_surface_free.patch rename to recipes-graphics/userland/files/0006-zero-out-wl-buffers-in-egl_surface_free.patch diff --git a/recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch b/recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch similarity index 100% rename from recipes-graphics/userland/userland/0007-initialize-front-back-wayland-buffers.patch rename to recipes-graphics/userland/files/0007-initialize-front-back-wayland-buffers.patch diff --git a/recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch b/recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch similarity index 100% rename from recipes-graphics/userland/userland/0008-Remove-RPC_FLUSH.patch rename to recipes-graphics/userland/files/0008-Remove-RPC_FLUSH.patch diff --git a/recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch b/recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch similarity index 100% rename from recipes-graphics/userland/userland/0009-fix-cmake-dependency-race.patch rename to recipes-graphics/userland/files/0009-fix-cmake-dependency-race.patch diff --git a/recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch b/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch similarity index 100% rename from recipes-graphics/userland/userland/0010-Fix-for-framerate-with-nested-composition.patch rename to recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch diff --git a/recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch b/recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch similarity index 100% rename from recipes-graphics/userland/userland/0011-build-shared-library-for-vchostif.patch rename to recipes-graphics/userland/files/0011-build-shared-library-for-vchostif.patch diff --git a/recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch b/recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch similarity index 100% rename from recipes-graphics/userland/userland/0012-implement-buffer-wrapping-interface-for-dispmanx.patch rename to recipes-graphics/userland/files/0012-implement-buffer-wrapping-interface-for-dispmanx.patch diff --git a/recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch b/recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch similarity index 100% rename from recipes-graphics/userland/userland/0013-Implement-triple-buffering-for-wayland.patch rename to recipes-graphics/userland/files/0013-Implement-triple-buffering-for-wayland.patch diff --git a/recipes-graphics/userland/userland/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch b/recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch similarity index 100% rename from recipes-graphics/userland/userland/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch rename to recipes-graphics/userland/files/0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch diff --git a/recipes-graphics/userland/userland/0015-EGL-glplatform.h-define-EGL_CAST.patch b/recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch similarity index 100% rename from recipes-graphics/userland/userland/0015-EGL-glplatform.h-define-EGL_CAST.patch rename to recipes-graphics/userland/files/0015-EGL-glplatform.h-define-EGL_CAST.patch diff --git a/recipes-graphics/userland/userland/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch b/recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch similarity index 100% rename from recipes-graphics/userland/userland/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch rename to recipes-graphics/userland/files/0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch diff --git a/recipes-graphics/userland/userland/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch b/recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch similarity index 100% rename from recipes-graphics/userland/userland/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch rename to recipes-graphics/userland/files/0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch diff --git a/recipes-graphics/userland/userland/0018-Add-EGL_IMG_context_priority-related-defines.patch b/recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch similarity index 100% rename from recipes-graphics/userland/userland/0018-Add-EGL_IMG_context_priority-related-defines.patch rename to recipes-graphics/userland/files/0018-Add-EGL_IMG_context_priority-related-defines.patch diff --git a/recipes-graphics/userland/userland-nogl.bb b/recipes-graphics/userland/userland-nogl.bb new file mode 100644 index 0000000..ec5cbdc --- /dev/null +++ b/recipes-graphics/userland/userland-nogl.bb @@ -0,0 +1,87 @@ +DESCRIPTION = "This repository contains the source code for the ARM side \ +libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \ +and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\ +vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG." +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENCE;md5=0448d6488ef8cc380632b1569ee6d196" + +COMPATIBLE_MACHINE = "^rpi$" + +SRCBRANCH = "master" +SRCFORK = "raspberrypi" +SRCREV = "409dfcd90bae0a09b1b8c1f718a532728d26cde2" + +# Use the date of the above commit as the package version. Update this when +# SRCREV is changed. +PV = "20180702" + +SRC_URI = "\ + git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ + file://0001-Allow-applications-to-set-next-resource-handle.patch \ + file://0002-wayland-Add-support-for-the-Wayland-winsys.patch \ + file://0003-wayland-Add-Wayland-example.patch \ + file://0004-wayland-egl-Add-bcm_host-to-dependencies.patch \ + file://0005-interface-remove-faulty-assert-to-make-weston-happy-.patch \ + file://0006-zero-out-wl-buffers-in-egl_surface_free.patch \ + file://0007-initialize-front-back-wayland-buffers.patch \ + file://0008-Remove-RPC_FLUSH.patch \ + file://0009-fix-cmake-dependency-race.patch \ + file://0010-Fix-for-framerate-with-nested-composition.patch \ + file://0011-build-shared-library-for-vchostif.patch \ + file://0012-implement-buffer-wrapping-interface-for-dispmanx.patch \ + file://0013-Implement-triple-buffering-for-wayland.patch \ + file://0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch \ + file://0015-EGL-glplatform.h-define-EGL_CAST.patch \ + file://0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch \ + file://0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch \ + file://0018-Add-EGL_IMG_context_priority-related-defines.patch \ +" +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +ASNEEDED = "" + +EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed' \ + -DVMCS_INSTALL_PREFIX=${exec_prefix} \ +" + +EXTRA_OECMAKE_append_aarch64 = " -DARM64=ON " + + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}" + +PACKAGECONFIG[wayland] = "-DBUILD_WAYLAND=TRUE -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=${STAGING_BINDIR_NATIVE}/wayland-scanner,,wayland-native wayland" + +CFLAGS_append = " -fPIC" + +do_install_append () { + for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do + sed -i 's/include "vcos_platform.h"/include "pthreads\/vcos_platform.h"/g' ${f} + sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f} + sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f} + done + rm -rf ${D}${libdir}/libEGL* + rm -rf ${D}${libdir}/libGLES* + rm -rf ${D}${libdir}/libwayland-* + rm -rf ${D}${libdir}/pkgconfig/egl.pc ${D}${libdir}/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/wayland-egl.pc + rm -rf ${D}${includedir}/EGL ${D}${includedir}/GLES* ${D}${includedir}/KHR +} + +# Shared libs from userland package build aren't versioned, so we need +# to force the .so files into the runtime package (and keep them +# out of -dev package). +FILES_SOLIBSDEV = "" +INSANE_SKIP_${PN} += "dev-so" + +FILES_${PN} += " \ + ${libdir}/*.so \ + ${libdir}/plugins" +FILES_${PN}-dev += "${includedir} \ + ${prefix}/src" +FILES_${PN}-doc += "${datadir}/install" +FILES_${PN}-dbg += "${libdir}/plugins/.debug" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +RDEPENDS_${PN} += "bash libegl"