Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 1 | DESCRIPTION = "This repository contains the source code for the ARM side \ |
| 2 | libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib \ |
| 3 | and includes source for the ARM side code to interface to: EGL, mmal, GLESv2,\ |
| 4 | vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG." |
| 5 | LICENSE = "BSD-3-Clause" |
| 6 | LIC_FILES_CHKSUM = "file://LICENCE;md5=0448d6488ef8cc380632b1569ee6d196" |
| 7 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 8 | PROVIDES += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "virtual/libgles2 virtual/egl", d)}" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 9 | |
Andrew Geissler | 1c34914 | 2019-02-19 19:49:56 -0600 | [diff] [blame] | 10 | RPROVIDES_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "", "libgles2 egl libegl libegl1 libglesv2-2", d)}" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 11 | COMPATIBLE_MACHINE = "^rpi$" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 12 | |
| 13 | SRCBRANCH = "master" |
| 14 | SRCFORK = "raspberrypi" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 15 | SRCREV = "17d2fdc1abd370e09ba7074753294c7976dd6b0d" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 16 | |
| 17 | # Use the date of the above commit as the package version. Update this when |
| 18 | # SRCREV is changed. |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 19 | PV = "20190724" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 20 | |
| 21 | SRC_URI = "\ |
| 22 | git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ |
| 23 | file://0001-Allow-applications-to-set-next-resource-handle.patch \ |
| 24 | file://0002-wayland-Add-support-for-the-Wayland-winsys.patch \ |
| 25 | file://0003-wayland-Add-Wayland-example.patch \ |
| 26 | file://0004-wayland-egl-Add-bcm_host-to-dependencies.patch \ |
| 27 | file://0005-interface-remove-faulty-assert-to-make-weston-happy-.patch \ |
| 28 | file://0006-zero-out-wl-buffers-in-egl_surface_free.patch \ |
| 29 | file://0007-initialize-front-back-wayland-buffers.patch \ |
| 30 | file://0008-Remove-RPC_FLUSH.patch \ |
| 31 | file://0009-fix-cmake-dependency-race.patch \ |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 32 | file://0010-Fix-for-framerate-with-nested-composition.patch \ |
| 33 | file://0011-build-shared-library-for-vchostif.patch \ |
| 34 | file://0012-implement-buffer-wrapping-interface-for-dispmanx.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 35 | file://0013-Implement-triple-buffering-for-wayland.patch \ |
| 36 | file://0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch \ |
| 37 | file://0015-EGL-glplatform.h-define-EGL_CAST.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 38 | file://0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 39 | file://0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch \ |
| 40 | file://0018-Add-EGL_IMG_context_priority-related-defines.patch \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 41 | file://0019-libfdt-Undefine-__wordsize-if-already-defined.patch \ |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 42 | " |
| 43 | S = "${WORKDIR}/git" |
| 44 | |
| 45 | inherit cmake pkgconfig |
| 46 | |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 47 | ASNEEDED = "" |
| 48 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 49 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed' \ |
| 50 | -DVMCS_INSTALL_PREFIX=${exec_prefix} \ |
| 51 | " |
| 52 | |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 53 | EXTRA_OECMAKE_append_aarch64 = " -DARM64=ON " |
| 54 | |
| 55 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 56 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}" |
| 57 | |
| 58 | PACKAGECONFIG[wayland] = "-DBUILD_WAYLAND=TRUE -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=${STAGING_BINDIR_NATIVE}/wayland-scanner,,wayland-native wayland" |
| 59 | |
| 60 | CFLAGS_append = " -fPIC" |
| 61 | |
| 62 | do_install_append () { |
| 63 | for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do |
| 64 | sed -i 's/include "vcos_platform.h"/include "pthreads\/vcos_platform.h"/g' ${f} |
| 65 | sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f} |
| 66 | sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f} |
| 67 | done |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 68 | rm -rf ${D}${prefix}${sysconfdir} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 69 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" = "1" ]; then |
| 70 | rm -rf ${D}${libdir}/libEGL* |
| 71 | rm -rf ${D}${libdir}/libGLES* |
| 72 | rm -rf ${D}${libdir}/libwayland-* |
| 73 | rm -rf ${D}${libdir}/pkgconfig/egl.pc ${D}${libdir}/pkgconfig/glesv2.pc \ |
| 74 | ${D}${libdir}/pkgconfig/wayland-egl.pc |
| 75 | rm -rf ${D}${includedir}/EGL ${D}${includedir}/GLES* ${D}${includedir}/KHR |
| 76 | fi |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | # Shared libs from userland package build aren't versioned, so we need |
| 80 | # to force the .so files into the runtime package (and keep them |
| 81 | # out of -dev package). |
| 82 | FILES_SOLIBSDEV = "" |
| 83 | INSANE_SKIP_${PN} += "dev-so" |
| 84 | |
| 85 | FILES_${PN} += " \ |
| 86 | ${libdir}/*.so \ |
| 87 | ${libdir}/plugins" |
| 88 | FILES_${PN}-dev += "${includedir} \ |
| 89 | ${prefix}/src" |
| 90 | FILES_${PN}-doc += "${datadir}/install" |
| 91 | FILES_${PN}-dbg += "${libdir}/plugins/.debug" |
| 92 | |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 93 | RDEPENDS_${PN} += "bash" |
Andrew Geissler | 1c34914 | 2019-02-19 19:49:56 -0600 | [diff] [blame] | 94 | RDEPENDS_${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "libegl-mesa", "", d)}" |