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)}" |
Andrew Geissler | 062316f | 2020-05-15 14:19:14 -0500 | [diff] [blame] | 9 | PROVIDES += "virtual/libomxil" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 10 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 11 | 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] | 12 | COMPATIBLE_MACHINE = "^rpi$" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 13 | |
| 14 | SRCBRANCH = "master" |
| 15 | SRCFORK = "raspberrypi" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 16 | SRCREV = "97bc8180ad682b004ea224d1db7b8e108eda4397" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 17 | |
| 18 | # Use the date of the above commit as the package version. Update this when |
| 19 | # SRCREV is changed. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | PV = "20210623" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 21 | |
| 22 | SRC_URI = "\ |
| 23 | git://github.com/${SRCFORK}/userland.git;protocol=git;branch=${SRCBRANCH} \ |
| 24 | file://0001-Allow-applications-to-set-next-resource-handle.patch \ |
| 25 | file://0002-wayland-Add-support-for-the-Wayland-winsys.patch \ |
| 26 | file://0003-wayland-Add-Wayland-example.patch \ |
| 27 | file://0004-wayland-egl-Add-bcm_host-to-dependencies.patch \ |
| 28 | file://0005-interface-remove-faulty-assert-to-make-weston-happy-.patch \ |
| 29 | file://0006-zero-out-wl-buffers-in-egl_surface_free.patch \ |
| 30 | file://0007-initialize-front-back-wayland-buffers.patch \ |
| 31 | file://0008-Remove-RPC_FLUSH.patch \ |
| 32 | file://0009-fix-cmake-dependency-race.patch \ |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 33 | file://0010-Fix-for-framerate-with-nested-composition.patch \ |
| 34 | file://0011-build-shared-library-for-vchostif.patch \ |
| 35 | file://0012-implement-buffer-wrapping-interface-for-dispmanx.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 36 | file://0013-Implement-triple-buffering-for-wayland.patch \ |
| 37 | file://0014-GLES2-gl2ext.h-Define-GL_R8_EXT-and-GL_RG8_EXT.patch \ |
| 38 | file://0015-EGL-glplatform.h-define-EGL_CAST.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 39 | file://0016-Allow-multiple-wayland-compositor-state-data-per-pro.patch \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 40 | file://0017-khronos-backport-typedef-for-EGL_EXT_image_dma_buf_i.patch \ |
| 41 | file://0018-Add-EGL_IMG_context_priority-related-defines.patch \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 42 | file://0019-libfdt-Undefine-__wordsize-if-already-defined.patch \ |
Andrew Geissler | 062316f | 2020-05-15 14:19:14 -0500 | [diff] [blame] | 43 | file://0020-openmaxil-add-pkg-config-file.patch \ |
| 44 | file://0021-cmake-Disable-format-overflow-warning-as-error.patch \ |
Andrew Geissler | 26e4bea | 2020-11-30 19:54:03 -0600 | [diff] [blame] | 45 | file://0022-all-host_applications-remove-non-existent-projects.patch \ |
| 46 | file://0023-hello_pi-optionally-build-wayland-specific-app.patch \ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 47 | file://0024-userland-Sync-needed-defines-for-weston-build.patch \ |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 48 | " |
Andrew Geissler | 6454e37 | 2020-10-30 15:41:26 -0500 | [diff] [blame] | 49 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 50 | SRC_URI:remove:toolchain-clang = "file://0021-cmake-Disable-format-overflow-warning-as-error.patch" |
Andrew Geissler | 6454e37 | 2020-10-30 15:41:26 -0500 | [diff] [blame] | 51 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 52 | S = "${WORKDIR}/git" |
| 53 | |
| 54 | inherit cmake pkgconfig |
| 55 | |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 56 | ASNEEDED = "" |
| 57 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 58 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed' \ |
| 59 | -DVMCS_INSTALL_PREFIX=${exec_prefix} \ |
| 60 | " |
| 61 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 62 | EXTRA_OECMAKE:append:aarch64 = " -DARM64=ON " |
Patrick Williams | b2e6a9b | 2017-02-23 20:31:26 -0600 | [diff] [blame] | 63 | |
| 64 | |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 65 | PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}" |
| 66 | |
| 67 | PACKAGECONFIG[wayland] = "-DBUILD_WAYLAND=TRUE -DWAYLAND_SCANNER_EXECUTABLE:FILEPATH=${STAGING_BINDIR_NATIVE}/wayland-scanner,,wayland-native wayland" |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 68 | PACKAGECONFIG[allapps] = "-DALL_APPS=true,,," |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 69 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 70 | CFLAGS:append = " -fPIC" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 71 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | do_install:append () { |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 73 | for f in `find ${D}${includedir}/interface/vcos/ -name "*.h"`; do |
| 74 | sed -i 's/include "vcos_platform.h"/include "pthreads\/vcos_platform.h"/g' ${f} |
| 75 | sed -i 's/include "vcos_futex_mutex.h"/include "pthreads\/vcos_futex_mutex.h"/g' ${f} |
| 76 | sed -i 's/include "vcos_platform_types.h"/include "pthreads\/vcos_platform_types.h"/g' ${f} |
| 77 | done |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 78 | rm -rf ${D}${prefix}${sysconfdir} |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 79 | if [ "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" = "1" ]; then |
| 80 | rm -rf ${D}${libdir}/libEGL* |
| 81 | rm -rf ${D}${libdir}/libGLES* |
| 82 | rm -rf ${D}${libdir}/libwayland-* |
| 83 | rm -rf ${D}${libdir}/pkgconfig/egl.pc ${D}${libdir}/pkgconfig/glesv2.pc \ |
| 84 | ${D}${libdir}/pkgconfig/wayland-egl.pc |
| 85 | rm -rf ${D}${includedir}/EGL ${D}${includedir}/GLES* ${D}${includedir}/KHR |
Andrew Geissler | 062316f | 2020-05-15 14:19:14 -0500 | [diff] [blame] | 86 | else |
| 87 | ln -sf brcmglesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc |
| 88 | ln -sf brcmegl.pc ${D}${libdir}/pkgconfig/egl.pc |
| 89 | ln -sf brcmvg.pc ${D}${libdir}/pkgconfig/vg.pc |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 90 | fi |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 91 | # Currently man files are installed in /usr/man instead of /usr/share/man, see comments in: |
| 92 | # https://github.com/raspberrypi/userland/commit/45a0022ac64b4d0788def3c5230c972430f6fc23 |
| 93 | mkdir -pv ${D}${datadir} |
| 94 | mv -v ${D}${prefix}/man ${D}${mandir} |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 95 | } |
| 96 | |
| 97 | # Shared libs from userland package build aren't versioned, so we need |
| 98 | # to force the .so files into the runtime package (and keep them |
| 99 | # out of -dev package). |
| 100 | FILES_SOLIBSDEV = "" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 101 | INSANE_SKIP:${PN} += "dev-so" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 102 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 103 | FILES:${PN} += " \ |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 104 | ${libdir}/*.so \ |
| 105 | ${libdir}/plugins" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 106 | FILES:${PN}-dev += "${includedir} \ |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 107 | ${prefix}/src" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 108 | FILES:${PN}-doc += "${datadir}/install" |
| 109 | FILES:${PN}-dbg += "${libdir}/plugins/.debug" |
Patrick Williams | 8b8bc41 | 2016-08-17 15:02:23 -0500 | [diff] [blame] | 110 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 111 | RDEPENDS:${PN} += "bash" |
| 112 | RDEPENDS:${PN} += "${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "libegl-mesa", "", d)}" |